Struct matrix_sdk_ui::timeline::Message
source · pub struct Message { /* private fields */ }
Expand description
An m.room.message
event or extensible event, including edits.
Implementations§
source§impl Message
impl Message
sourcepub fn msgtype(&self) -> &MessageType
pub fn msgtype(&self) -> &MessageType
Get the msgtype
-specific data of this message.
sourcepub fn body(&self) -> &str
pub fn body(&self) -> &str
Get a reference to the message body.
Shorthand for .msgtype().body()
.
sourcepub fn in_reply_to(&self) -> Option<&InReplyToDetails>
pub fn in_reply_to(&self) -> Option<&InReplyToDetails>
Get the event this message is replying to, if any.
sourcepub fn is_threaded(&self) -> bool
pub fn is_threaded(&self) -> bool
Whether this message is part of a thread.
sourcepub fn thread_root(&self) -> Option<&OwnedEventId>
pub fn thread_root(&self) -> Option<&OwnedEventId>
Get the OwnedEventId
of the root event of a thread if it exists.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Message
impl !RefUnwindSafe for Message
impl Send for Message
impl Sync for Message
impl Unpin for Message
impl !UnwindSafe for Message
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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