pub struct Post {Show 13 fields
pub id: Uuid,
pub author_id: Uuid,
pub author_username: String,
pub content: String,
pub created_at: DateTime<Utc>,
pub upvotes: i32,
pub downvotes: i32,
pub hashtags: Vec<String>,
pub user_vote: Option<String>,
pub parent_post_id: Option<Uuid>,
pub reply_count: i32,
pub reply_to_user_id: Option<Uuid>,
pub reply_to_username: Option<String>,
}Fields§
§id: Uuid§content: String§created_at: DateTime<Utc>§upvotes: i32§downvotes: i32§user_vote: Option<String>User’s vote on this post (if authenticated)
parent_post_id: Option<Uuid>Parent post ID for replies (None for top-level posts)
reply_count: i32Number of replies to this post
reply_to_user_id: Option<Uuid>User ID being replied to (for @mentions in replies)
reply_to_username: Option<String>Username being replied to (for display purposes)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Post
impl<'de> Deserialize<'de> for Post
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 Post
impl RefUnwindSafe for Post
impl Send for Post
impl Sync for Post
impl Unpin for Post
impl UnwindSafe for Post
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