pub struct MsgLikeContent {
pub kind: MsgLikeKind,
pub reactions: ReactionsByKeyBySender,
pub in_reply_to: Option<InReplyToDetails>,
pub thread_root: Option<OwnedEventId>,
pub thread_summary: Option<ThreadSummary>,
}
Expand description
A special kind of super::TimelineItemContent
that groups together
different room message types with their respective reactions and thread
information.
Fields§
§kind: MsgLikeKind
§reactions: ReactionsByKeyBySender
§in_reply_to: Option<InReplyToDetails>
The event this message is replying to, if any.
thread_root: Option<OwnedEventId>
Event ID of the thread root, if this is a message in a thread.
thread_summary: Option<ThreadSummary>
Information about the thread this message is the root of, if any.
Implementations§
Source§impl MsgLikeContent
impl MsgLikeContent
pub fn redacted() -> Self
pub fn unable_to_decrypt(encrypted_message: EncryptedMessage) -> Self
Sourcepub fn is_threaded(&self) -> bool
pub fn is_threaded(&self) -> bool
Whether this item is part of a thread.
pub fn with_in_reply_to(&self, in_reply_to: InReplyToDetails) -> Self
pub fn with_kind(&self, kind: MsgLikeKind) -> Self
Sourcepub fn as_message(&self) -> Option<Message>
pub fn as_message(&self) -> Option<Message>
If kind
is of the MsgLikeKind
variant,
return the inner Message
.
Trait Implementations§
Source§impl Clone for MsgLikeContent
impl Clone for MsgLikeContent
Source§fn clone(&self) -> MsgLikeContent
fn clone(&self) -> MsgLikeContent
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for MsgLikeContent
impl !RefUnwindSafe for MsgLikeContent
impl Send for MsgLikeContent
impl Sync for MsgLikeContent
impl Unpin for MsgLikeContent
impl !UnwindSafe for MsgLikeContent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
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