ruma::events::room::avatar

Type Alias PossiblyRedactedRoomAvatarEventContent

Source
pub type PossiblyRedactedRoomAvatarEventContent = RoomAvatarEventContent;
Expand description

The possibly redacted form of RoomAvatarEventContent.

This type is used when it’s not obvious whether the content is redacted or not.

Aliased Type§

struct PossiblyRedactedRoomAvatarEventContent {
    pub info: Option<Box<ImageInfo>>,
    pub url: Option<OwnedMxcUri>,
}

Fields§

§info: Option<Box<ImageInfo>>

Information about the avatar image.

§url: Option<OwnedMxcUri>

URL of the avatar image.

Implementations

Source§

impl RoomAvatarEventContent

Source

pub fn new() -> RoomAvatarEventContent

Create an empty RoomAvatarEventContent.

Trait Implementations

Source§

impl Clone for RoomAvatarEventContent

Source§

fn clone(&self) -> RoomAvatarEventContent

Returns a copy of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for RoomAvatarEventContent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Default for RoomAvatarEventContent

Source§

fn default() -> RoomAvatarEventContent

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RoomAvatarEventContent

Source§

fn deserialize<__D>( __deserializer: __D, ) -> Result<RoomAvatarEventContent, <__D as Deserializer<'de>>::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl EventContent for RoomAvatarEventContent

Source§

type EventType = StateEventType

The Rust enum for the event kind’s known types.
Source§

fn event_type(&self) -> <RoomAvatarEventContent as EventContent>::EventType

Get the event’s type, like m.room.message.
Source§

impl PossiblyRedactedStateEventContent for RoomAvatarEventContent

Source§

type StateKey = EmptyStateKey

The type of the event’s state_key field.
Source§

impl RedactContent for RoomAvatarEventContent

Source§

type Redacted = RedactedRoomAvatarEventContent

The redacted form of the event’s content.
Source§

fn redact(self, version: &RoomVersionId) -> RedactedRoomAvatarEventContent

Transform self into a redacted form (removing most or all fields) according to the spec. Read more
Source§

impl Serialize for RoomAvatarEventContent

Source§

fn serialize<__S>( &self, __serializer: __S, ) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StateEventContent for RoomAvatarEventContent

Source§

type StateKey = EmptyStateKey

The type of the event’s state_key field.
Source§

impl StaticEventContent for RoomAvatarEventContent

Source§

const TYPE: &'static str = "m.room.avatar"

The event type.
Source§

impl StaticStateEventContent for RoomAvatarEventContent

Source§

type PossiblyRedacted = RoomAvatarEventContent

The possibly redacted form of the event’s content.
Source§

type Unsigned = StateUnsigned<<RoomAvatarEventContent as StaticStateEventContent>::PossiblyRedacted>

The type of the event’s unsigned field.