pub struct ThreadSummary {
pub latest_reply: Option<OwnedEventId>,
pub num_replies: u32,
}Expand description
A simplified thread summary.
A thread summary contains useful information pertaining to a thread, and that would be usually attached in clients to a thread root event (i.e. the first event from which the thread originated), along with links into the thread’s view. This summary may include, for instance:
- the number of replies to the thread,
- the full event of the latest reply to the thread,
- whether the user participated or not to this thread.
Fields§
§latest_reply: Option<OwnedEventId>The event id for the latest reply to the thread.
num_replies: u32The number of replies to the thread.
This doesn’t include the thread root event itself. It can be zero if no events in the thread are considered to be meaningful (or they’ve all been redacted).
Implementations§
Source§impl ThreadSummary
impl ThreadSummary
Sourcepub fn new<N>(latest_reply: Option<OwnedEventId>, num_replies: N) -> Self
pub fn new<N>(latest_reply: Option<OwnedEventId>, num_replies: N) -> Self
Create a new ThreadSummary.
num_replies is set to u32::MAX if it fails to convert.
Trait Implementations§
Source§impl Clone for ThreadSummary
impl Clone for ThreadSummary
Source§impl Debug for ThreadSummary
impl Debug for ThreadSummary
Source§impl<'de> Deserialize<'de> for ThreadSummary
impl<'de> Deserialize<'de> for ThreadSummary
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
Source§impl PartialEq for ThreadSummary
impl PartialEq for ThreadSummary
Source§impl Serialize for ThreadSummary
impl Serialize for ThreadSummary
impl StructuralPartialEq for ThreadSummary
Auto Trait Implementations§
impl Freeze for ThreadSummary
impl RefUnwindSafe for ThreadSummary
impl Send for ThreadSummary
impl Sync for ThreadSummary
impl Unpin for ThreadSummary
impl UnsafeUnpin for ThreadSummary
impl UnwindSafe for ThreadSummary
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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