Struct ruma_common::events::image::ImageEventContentWithoutRelation
source · pub struct ImageEventContentWithoutRelation {
pub message: MessageContent,
pub file: FileContent,
pub image: Box<ImageContent>,
pub thumbnail: Vec<ThumbnailContent>,
pub caption: Option<MessageContent>,
}Available on crate features
events and unstable-msc3552 only.Expand description
Form of ImageEventContent without relation.
To construct this type, construct a ImageEventContent and then use one of its ::from() / .into() methods.
Fields§
§message: MessageContentThe text representation of the message.
file: FileContentThe file content of the message.
image: Box<ImageContent>The image content of the message.
thumbnail: Vec<ThumbnailContent>The thumbnails of the message.
caption: Option<MessageContent>The captions of the message.
Implementations§
source§impl ImageEventContentWithoutRelation
impl ImageEventContentWithoutRelation
sourcepub fn with_relation(
self,
relates_to: Option<Relation<ImageEventContentWithoutRelation>>
) -> ImageEventContent
pub fn with_relation(
self,
relates_to: Option<Relation<ImageEventContentWithoutRelation>>
) -> ImageEventContent
Transform self into a ImageEventContent with the given relation.
Trait Implementations§
source§impl Clone for ImageEventContentWithoutRelation
impl Clone for ImageEventContentWithoutRelation
source§fn clone(&self) -> ImageEventContentWithoutRelation
fn clone(&self) -> ImageEventContentWithoutRelation
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 ImageEventContentWithoutRelation
impl<'de> Deserialize<'de> for ImageEventContentWithoutRelation
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<ImageEventContent> for ImageEventContentWithoutRelation
impl From<ImageEventContent> for ImageEventContentWithoutRelation
source§fn from(c: ImageEventContent) -> Self
fn from(c: ImageEventContent) -> Self
Converts to this type from the input type.