pub struct CommentRow<'a, C: CommentModel> {Show 15 fields
pub id: i64,
pub commentable_type: MorphType<C::Commentable>,
pub commentable_id: i64,
pub thread: &'a str,
pub parent_id: Option<i64>,
pub depth: i64,
pub author_id: Option<i64>,
pub guest_name: Option<&'a str>,
pub body: &'a str,
pub status: Status,
pub edited_at: Option<Timestamp>,
pub deleted_at: Option<Timestamp>,
pub replies_count: i64,
pub reactions_count: i64,
pub created_at: Option<Timestamp>,
}Expand description
The values of a comment’s columns, as CommentModel::row reads them.
Fields§
§id: i64The key.
commentable_type: MorphType<C::Commentable>The morph name of the model the comment belongs to.
commentable_id: i64The key of the model the comment belongs to.
thread: &'a strThe thread.
parent_id: Option<i64>The parent’s key, for replies.
depth: i64The depth: 0 for top-level comments.
The author’s key, for comments by users.
guest_name: Option<&'a str>The guest’s name, for comments by guests.
body: &'a strThe text.
status: StatusWhere the comment stands in moderation.
edited_at: Option<Timestamp>When the author last edited the text.
deleted_at: Option<Timestamp>When the comment was removed while it had replies.
replies_count: i64The number of direct replies.
reactions_count: i64The number of reactions of every kind.
created_at: Option<Timestamp>When the comment was posted.
Auto Trait Implementations§
impl<'a, C> Forget for CommentRow<'a, C>
impl<'a, C> Freeze for CommentRow<'a, C>where
&'static str: Freeze,
PhantomData<fn() -> <C as CommentModel>::Commentable>: Freeze,
&'a str: Freeze,
impl<'a, C> Move for CommentRow<'a, C>
impl<'a, C> RefUnwindSafe for CommentRow<'a, C>
impl<'a, C> Send for CommentRow<'a, C>
impl<'a, C> Sync for CommentRow<'a, C>
impl<'a, C> Unpin for CommentRow<'a, C>
impl<'a, C> UnsafeUnpin for CommentRow<'a, C>where
&'static str: UnsafeUnpin,
PhantomData<fn() -> <C as CommentModel>::Commentable>: UnsafeUnpin,
&'a str: UnsafeUnpin,
impl<'a, C> UnwindSafe for CommentRow<'a, C>
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<K> ForeignKey<K> for K
impl<K> ForeignKey<K> for K
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more