Struct lemmy_db_schema::source::post::Post [−][src]
pub struct Post {Show 19 fields
pub id: PostId,
pub name: String,
pub url: Option<DbUrl>,
pub body: Option<String>,
pub creator_id: PersonId,
pub community_id: CommunityId,
pub removed: bool,
pub locked: bool,
pub published: NaiveDateTime,
pub updated: Option<NaiveDateTime>,
pub deleted: bool,
pub nsfw: bool,
pub stickied: bool,
pub embed_title: Option<String>,
pub embed_description: Option<String>,
pub embed_html: Option<String>,
pub thumbnail_url: Option<DbUrl>,
pub ap_id: DbUrl,
pub local: bool,
}
Fields
id: PostId
name: String
url: Option<DbUrl>
body: Option<String>
creator_id: PersonId
community_id: CommunityId
removed: bool
locked: bool
published: NaiveDateTime
updated: Option<NaiveDateTime>
deleted: bool
nsfw: bool
stickied: bool
embed_title: Option<String>
embed_description: Option<String>
embed_html: Option<String>
thumbnail_url: Option<DbUrl>
ap_id: DbUrl
local: bool
Implementations
pub fn list_for_community(
conn: &PgConnection,
the_community_id: CommunityId
) -> Result<Vec<Self>, Error>
pub fn update_ap_id(
conn: &PgConnection,
post_id: PostId,
apub_id: DbUrl
) -> Result<Self, Error>
pub fn permadelete_for_creator(
conn: &PgConnection,
for_creator_id: PersonId
) -> Result<Vec<Self>, Error>
pub fn update_deleted(
conn: &PgConnection,
post_id: PostId,
new_deleted: bool
) -> Result<Self, Error>
pub fn update_removed(
conn: &PgConnection,
post_id: PostId,
new_removed: bool
) -> Result<Self, Error>
pub fn update_removed_for_creator(
conn: &PgConnection,
for_creator_id: PersonId,
for_community_id: Option<CommunityId>,
new_removed: bool
) -> Result<Vec<Self>, Error>
pub fn update_locked(
conn: &PgConnection,
post_id: PostId,
new_locked: bool
) -> Result<Self, Error>
pub fn update_stickied(
conn: &PgConnection,
post_id: PostId,
new_stickied: bool
) -> Result<Self, Error>
Trait Implementations
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = post_id
type ForeignKeyColumn = post_id
The database column representing the foreign key of the table this struct represents Read more
Returns the foreign key for self
Returns the foreign key column of this struct’s table
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
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Post where
(PostId, String, Option<DbUrl>, Option<String>, PersonId, CommunityId, bool, bool, NaiveDateTime, Option<NaiveDateTime>, bool, bool, bool, Option<String>, Option<String>, Option<String>, Option<DbUrl>, DbUrl, bool): Queryable<__ST, __DB>,
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Post where
(PostId, String, Option<DbUrl>, Option<String>, PersonId, CommunityId, bool, bool, NaiveDateTime, Option<NaiveDateTime>, bool, bool, bool, Option<String>, Option<String>, Option<String>, Option<DbUrl>, DbUrl, bool): Queryable<__ST, __DB>,
The Rust type you’d like to map from. Read more
Auto Trait Implementations
impl RefUnwindSafe for Post
impl UnwindSafe for Post
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Convert self
to an expression for Diesel’s query builder. Read more
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
fn as_sql<'a, T>(&'a self) -> <&'a Self as AsExpression<T>>::Expression where
&'a Self: AsExpression<T>,
Convert &self
to an expression for Diesel’s query builder. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more