pub struct CreatePostBuilder {
pub title: Option<String>,
pub privacy: Option<PostPrivacy>,
pub anonymous: Option<bool>,
pub nsfw: Option<bool>,
pub images: Vec<UploadPostFile>,
}Expand description
A builder for creating a post.
This builder is for the low-level function.
Fields§
§title: Option<String>The title of the post.
If specified, it must be at least 3 characters long.
privacy: Option<PostPrivacy>The post privacy.
Defaults to hidden.
anonymous: Option<bool>Whether the post should be tied to the user.
nsfw: Option<bool>Whether this post is nsfw.
images: Vec<UploadPostFile>The images of the post
Implementations§
Source§impl CreatePostBuilder
impl CreatePostBuilder
Sourcepub fn title(&mut self, title: impl Into<String>) -> &mut Self
pub fn title(&mut self, title: impl Into<String>) -> &mut Self
Set the title.
It must be at least 3 characters long.
Sourcepub fn privacy(&mut self, privacy: PostPrivacy) -> &mut Self
pub fn privacy(&mut self, privacy: PostPrivacy) -> &mut Self
Set the post privacy.
Defaults to hidden.
Sourcepub fn anonymous(&mut self, anonymous: bool) -> &mut Self
pub fn anonymous(&mut self, anonymous: bool) -> &mut Self
Set whether this post should be anonymous.
Sourcepub fn image(&mut self, file: UploadPostFile) -> &mut Self
pub fn image(&mut self, file: UploadPostFile) -> &mut Self
Add a new image to this post.
Trait Implementations§
Source§impl Debug for CreatePostBuilder
impl Debug for CreatePostBuilder
Auto Trait Implementations§
impl Freeze for CreatePostBuilder
impl !RefUnwindSafe for CreatePostBuilder
impl Send for CreatePostBuilder
impl Sync for CreatePostBuilder
impl Unpin for CreatePostBuilder
impl !UnwindSafe for CreatePostBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more