Skip to main content

DraftFields

Trait DraftFields 

Source
pub trait DraftFields {
    // Required methods
    fn event_type(&self) -> &TimelineEventType;
    fn sender(&self) -> &UserId;
    fn state_key(&self) -> Option<&str>;
    fn content(&self) -> Cow<'_, RawValue>;
    fn redacts(&self) -> Option<&EventId>;
}
Expand description

A trait which accesses fields of a draft event

Required Methods§

Source

fn event_type(&self) -> &TimelineEventType

Get the event type of the event

Source

fn sender(&self) -> &UserId

Get the sender of the event

Source

fn state_key(&self) -> Option<&str>

Get the state key of the event

Source

fn content(&self) -> Cow<'_, RawValue>

Get the content of the event

Source

fn redacts(&self) -> Option<&EventId>

Get the event redacted, if exists

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§