pub struct CreatePost {
pub name: String,
pub community_id: CommunityId,
pub url: Option<String>,
pub body: Option<String>,
pub alt_text: Option<String>,
pub honeypot: Option<String>,
pub nsfw: Option<bool>,
pub language_id: Option<LanguageId>,
pub custom_thumbnail: Option<String>,
}
Expand description
Create a post.
Fields§
§name: String
§community_id: CommunityId
§url: Option<String>
§body: Option<String>
An optional body for the post in markdown.
alt_text: Option<String>
An optional alt_text, usable for image posts.
honeypot: Option<String>
A honeypot to catch bots. Should be None.
nsfw: Option<bool>
§language_id: Option<LanguageId>
§custom_thumbnail: Option<String>
Instead of fetching a thumbnail, use a custom one.
Trait Implementations§
Source§impl Clone for CreatePost
impl Clone for CreatePost
Source§fn clone(&self) -> CreatePost
fn clone(&self) -> CreatePost
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for CreatePost
impl Debug for CreatePost
Source§impl Default for CreatePost
impl Default for CreatePost
Source§fn default() -> CreatePost
fn default() -> CreatePost
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for CreatePost
impl<'de> Deserialize<'de> for CreatePost
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Hash for CreatePost
impl Hash for CreatePost
Source§impl PartialEq for CreatePost
impl PartialEq for CreatePost
Source§impl Serialize for CreatePost
impl Serialize for CreatePost
impl Eq for CreatePost
impl StructuralPartialEq for CreatePost
Auto Trait Implementations§
impl Freeze for CreatePost
impl RefUnwindSafe for CreatePost
impl Send for CreatePost
impl Sync for CreatePost
impl Unpin for CreatePost
impl UnwindSafe for CreatePost
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