Struct ruma_common::events::sticker::StickerEventContent
source · pub struct StickerEventContent {
pub body: String,
pub info: ImageInfo,
pub url: OwnedMxcUri,
}Available on crate feature
events only.Expand description
The content of an m.sticker event.
A sticker message.
Fields§
§body: StringA textual representation or associated description of the sticker image.
This could be the alt text of the original image, or a message to accompany and further describe the sticker.
info: ImageInfoMetadata about the image referred to in url including a thumbnail representation.
url: OwnedMxcUriThe URL to the sticker image.
Implementations§
source§impl StickerEventContent
impl StickerEventContent
sourcepub fn new(body: String, info: ImageInfo, url: OwnedMxcUri) -> Self
pub fn new(body: String, info: ImageInfo, url: OwnedMxcUri) -> Self
Creates a new StickerEventContent with the given body, image info and URL.
Trait Implementations§
source§impl Clone for StickerEventContent
impl Clone for StickerEventContent
source§fn clone(&self) -> StickerEventContent
fn clone(&self) -> StickerEventContent
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 Debug for StickerEventContent
impl Debug for StickerEventContent
source§impl<'de> Deserialize<'de> for StickerEventContent
impl<'de> Deserialize<'de> for StickerEventContent
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 EventContent for StickerEventContent
impl EventContent for StickerEventContent
§type EventType = MessageLikeEventType
type EventType = MessageLikeEventType
The Rust enum for the event kind’s known types.
source§fn event_type(&self) -> Self::EventType
fn event_type(&self) -> Self::EventType
Get the event’s type, like
m.room.message.source§impl From<StickerEventContent> for AnyMessageLikeEventContent
impl From<StickerEventContent> for AnyMessageLikeEventContent
source§fn from(c: StickerEventContent) -> Self
fn from(c: StickerEventContent) -> Self
Converts to this type from the input type.
source§impl RedactContent for StickerEventContent
impl RedactContent for StickerEventContent
§type Redacted = RedactedStickerEventContent
type Redacted = RedactedStickerEventContent
The redacted form of the event’s content.
source§fn redact(self, version: &RoomVersionId) -> RedactedStickerEventContent
fn redact(self, version: &RoomVersionId) -> RedactedStickerEventContent
Transform
self into a redacted form (removing most or all fields) according to the spec. Read more