pub struct MessageEventContentWithoutRelation {
pub text: TextContentBlock,
pub automated: bool,
pub url_previews: Option<Vec<UrlPreview>>,
}
Expand description
Form of MessageEventContent
without relation.
To construct this type, construct a MessageEventContent
and then use one of its ::from()
/ .into()
methods.
Fields§
§text: TextContentBlock
The message’s text content.
automated: bool
Whether this message is automated.
url_previews: Option<Vec<UrlPreview>>
MSC4095-style bundled url previews
Implementations§
source§impl MessageEventContentWithoutRelation
impl MessageEventContentWithoutRelation
sourcepub fn with_relation(
self,
relates_to: Option<Relation<MessageEventContentWithoutRelation>>,
) -> MessageEventContent
pub fn with_relation( self, relates_to: Option<Relation<MessageEventContentWithoutRelation>>, ) -> MessageEventContent
Transform self
into a MessageEventContent
with the given relation.
Trait Implementations§
source§impl Clone for MessageEventContentWithoutRelation
impl Clone for MessageEventContentWithoutRelation
source§fn clone(&self) -> MessageEventContentWithoutRelation
fn clone(&self) -> MessageEventContentWithoutRelation
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 moresource§impl<'de> Deserialize<'de> for MessageEventContentWithoutRelation
impl<'de> Deserialize<'de> for MessageEventContentWithoutRelation
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 From<MessageEventContent> for MessageEventContentWithoutRelation
impl From<MessageEventContent> for MessageEventContentWithoutRelation
source§fn from(c: MessageEventContent) -> Self
fn from(c: MessageEventContent) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for MessageEventContentWithoutRelation
impl RefUnwindSafe for MessageEventContentWithoutRelation
impl Send for MessageEventContentWithoutRelation
impl Sync for MessageEventContentWithoutRelation
impl Unpin for MessageEventContentWithoutRelation
impl UnwindSafe for MessageEventContentWithoutRelation
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)