matrix_sdk_crypto::types::events

Trait EventType

Source
pub trait EventType {
    const EVENT_TYPE: &'static str;

    // Provided method
    fn event_type(&self) -> &'static str { ... }
}
Expand description

A trait for event contents to define their event type.

Required Associated Constants§

Source

const EVENT_TYPE: &'static str

The event type of the event content.

Provided Methods§

Source

fn event_type(&self) -> &'static str

Get the event type of the event content.

Note: This should never be implemented manually, this takes the event type from the constant.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl<T: EventType> EventType for Raw<T>

Source§

const EVENT_TYPE: &'static str = T::EVENT_TYPE

Implementors§

Source§

impl EventType for ForwardedRoomKeyContent

Source§

const EVENT_TYPE: &'static str = "m.forwarded_room_key"

Source§

impl EventType for ToDeviceEncryptedEventContent

Source§

const EVENT_TYPE: &'static str = "m.room.encrypted"

Source§

impl EventType for RoomKeyContent

Source§

const EVENT_TYPE: &'static str = "m.room_key"

Source§

impl EventType for RoomKeyWithheldContent

Source§

const EVENT_TYPE: &'static str = "m.room_key.withheld"

Source§

impl EventType for DummyEventContent

Source§

const EVENT_TYPE: &'static str = "m.dummy"

Source§

impl EventType for RoomEncryptedEventContent

Source§

const EVENT_TYPE: &'static str = "m.room.encrypted"

Source§

impl EventType for RoomKeyRequestContent

Source§

const EVENT_TYPE: &'static str = "m.room_key_request"

Source§

impl EventType for SecretSendContent

Source§

const EVENT_TYPE: &'static str = "m.secret.send"