Struct lemmy_db_schema::source::post::PostInsertForm

source ·
pub struct PostInsertForm {
Show 22 fields pub name: String, pub creator_id: PersonId, pub community_id: CommunityId, pub nsfw: Option<bool>, pub url: Option<DbUrl>, pub body: Option<String>, pub removed: Option<bool>, pub locked: Option<bool>, pub updated: Option<DateTime<Utc>>, pub published: Option<DateTime<Utc>>, pub deleted: Option<bool>, pub embed_title: Option<String>, pub embed_description: Option<String>, pub embed_video_url: Option<DbUrl>, pub thumbnail_url: Option<DbUrl>, pub ap_id: Option<DbUrl>, pub local: Option<bool>, pub language_id: Option<LanguageId>, pub featured_community: Option<bool>, pub featured_local: Option<bool>, pub url_content_type: Option<String>, pub alt_text: Option<String>,
}

Fields§

§name: String§creator_id: PersonId§community_id: CommunityId§nsfw: Option<bool>§url: Option<DbUrl>§body: Option<String>§removed: Option<bool>§locked: Option<bool>§updated: Option<DateTime<Utc>>§published: Option<DateTime<Utc>>§deleted: Option<bool>§embed_title: Option<String>§embed_description: Option<String>§embed_video_url: Option<DbUrl>§thumbnail_url: Option<DbUrl>§ap_id: Option<DbUrl>§local: Option<bool>§language_id: Option<LanguageId>§featured_community: Option<bool>§featured_local: Option<bool>§url_content_type: Option<String>§alt_text: Option<String>

Implementations§

source§

impl PostInsertForm

source

pub fn builder() -> PostInsertFormBuilder<((), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), (), ())>

Create a builder for building PostInsertForm. On the builder, call .name(...), .creator_id(...), .community_id(...), .nsfw(...)(optional), .url(...)(optional), .body(...)(optional), .removed(...)(optional), .locked(...)(optional), .updated(...)(optional), .published(...)(optional), .deleted(...)(optional), .embed_title(...)(optional), .embed_description(...)(optional), .embed_video_url(...)(optional), .thumbnail_url(...)(optional), .ap_id(...)(optional), .local(...)(optional), .language_id(...)(optional), .featured_community(...)(optional), .featured_local(...)(optional), .url_content_type(...)(optional), .alt_text(...)(optional) to set the values of the fields. Finally, call .build() to create the instance of PostInsertForm.

Trait Implementations§

source§

impl Clone for PostInsertForm

source§

fn clone(&self) -> PostInsertForm

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for PostInsertForm

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.