pub struct Community {Show 15 fields
pub id: usize,
pub created: usize,
pub title: String,
pub context: CommunityContext,
pub owner: usize,
pub read_access: CommunityReadAccess,
pub write_access: CommunityWriteAccess,
pub join_access: CommunityJoinAccess,
pub likes: isize,
pub dislikes: isize,
pub member_count: usize,
pub is_forge: bool,
pub post_count: usize,
pub is_forum: bool,
pub topics: HashMap<usize, ForumTopic>,
}Fields§
§id: usize§created: usize§title: String§context: CommunityContext§owner: usizeThe ID of the owner of the community.
read_access: CommunityReadAccessWho can read the community.
write_access: CommunityWriteAccessWho can write to the community (create posts belonging to it).
The owner of the community (and moderators) are the only people capable of removing posts.
join_access: CommunityJoinAccessWho can join the community.
likes: isize§dislikes: isize§member_count: usize§is_forge: bool§post_count: usize§is_forum: bool§topics: HashMap<usize, ForumTopic>The topics of a community if the community has is_forum enabled.
Since topics are given a unique ID (the key of the hashmap), a removal of a topic should be done through a specific DELETE endpoint which ALSO deletes all posts within the topic.
Communities should be limited to 10 topics per community.
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Community
impl<'de> Deserialize<'de> for Community
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
Auto Trait Implementations§
impl Freeze for Community
impl RefUnwindSafe for Community
impl Send for Community
impl Sync for Community
impl Unpin for Community
impl UnwindSafe for Community
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