Trait ruma_events::EventContentFromType

source ·
pub trait EventContentFromType: EventContent {
    // Required method
    fn from_parts(event_type: &str, content: &RawJsonValue) -> Result<Self>;
}
Expand description

Event content that can be deserialized with its event type.

Required Methods§

source

fn from_parts(event_type: &str, content: &RawJsonValue) -> Result<Self>

Constructs this event content from the given event type and JSON.

Object Safety§

This trait is not object safe.

Implementors§