pub struct MsgLikeContent {
pub kind: MsgLikeKind,
pub reactions: ReactionsByKeyBySender,
pub thread_root: Option<OwnedEventId>,
pub in_reply_to: Option<InReplyToDetails>,
}
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
§thread_root: Option<OwnedEventId>
Event ID of the thread root, if this is a threaded message.
in_reply_to: Option<InReplyToDetails>
The event this message is replying to, 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
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 copy 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,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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