Struct lemmy_db_schema::source::community::Community [−][src]
pub struct Community {Show 19 fields
pub id: CommunityId,
pub name: String,
pub title: String,
pub description: Option<String>,
pub removed: bool,
pub published: NaiveDateTime,
pub updated: Option<NaiveDateTime>,
pub deleted: bool,
pub nsfw: bool,
pub actor_id: DbUrl,
pub local: bool,
pub private_key: Option<String>,
pub public_key: String,
pub last_refreshed_at: NaiveDateTime,
pub icon: Option<DbUrl>,
pub banner: Option<DbUrl>,
pub followers_url: DbUrl,
pub inbox_url: DbUrl,
pub shared_inbox_url: Option<DbUrl>,
}
Fields
id: CommunityId
name: String
title: String
description: Option<String>
removed: bool
published: NaiveDateTime
updated: Option<NaiveDateTime>
deleted: bool
nsfw: bool
actor_id: DbUrl
local: bool
private_key: Option<String>
public_key: String
last_refreshed_at: NaiveDateTime
icon: Option<DbUrl>
followers_url: DbUrl
inbox_url: DbUrl
Implementations
pub fn update_deleted(
conn: &PgConnection,
community_id: CommunityId,
new_deleted: bool
) -> Result<Community, Error>
pub fn update_removed(
conn: &PgConnection,
community_id: CommunityId,
new_removed: bool
) -> Result<Community, Error>
pub fn upsert(
conn: &PgConnection,
community_form: &CommunityForm
) -> Result<Community, Error>
Trait Implementations
impl<__FK> BelongsTo<Community> for CommunityModerator where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Community> for CommunityModerator where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = community_id
type ForeignKeyColumn = community_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
impl<__FK> BelongsTo<Community> for CommunityPersonBan where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Community> for CommunityPersonBan where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = community_id
type ForeignKeyColumn = community_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
impl<__FK> BelongsTo<Community> for CommunityFollower where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Community> for CommunityFollower where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = community_id
type ForeignKeyColumn = community_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
impl<__FK> BelongsTo<Community> for CommunityBlock where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
impl<__FK> BelongsTo<Community> for CommunityBlock where
__FK: Hash + Eq,
for<'__a> &'__a CommunityId: Into<Option<&'__a __FK>>,
for<'__a> &'__a Community: Identifiable<Id = &'__a __FK>,
type ForeignKey = __FK
type ForeignKey = __FK
The foreign key of this struct
type ForeignKeyColumn = community_id
type ForeignKeyColumn = community_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 Form = CommunityForm
type IdType = CommunityId
fn update(
conn: &PgConnection,
community_id: CommunityId,
new_community: &CommunityForm
) -> Result<Self, Error>
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 Community where
(CommunityId, String, String, Option<String>, bool, NaiveDateTime, Option<NaiveDateTime>, bool, bool, DbUrl, bool, Option<String>, String, NaiveDateTime, Option<DbUrl>, Option<DbUrl>, DbUrl, DbUrl, Option<DbUrl>): Queryable<__ST, __DB>,
impl<__DB: Backend, __ST> Queryable<__ST, __DB> for Community where
(CommunityId, String, String, Option<String>, bool, NaiveDateTime, Option<NaiveDateTime>, bool, bool, DbUrl, bool, Option<String>, String, NaiveDateTime, Option<DbUrl>, Option<DbUrl>, DbUrl, DbUrl, Option<DbUrl>): Queryable<__ST, __DB>,
The Rust type you’d like to map from. Read more
Auto Trait Implementations
impl RefUnwindSafe for Community
impl UnwindSafe for Community
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