Trait ruma_events::RawExt
source · pub trait RawExt<T: EventContentFromType> {
// Required method
fn deserialize_with_type(&self, event_type: T::EventType) -> Result<T>;
}
Expand description
Extension trait for Raw<T>
.
Required Methods§
sourcefn deserialize_with_type(&self, event_type: T::EventType) -> Result<T>
fn deserialize_with_type(&self, event_type: T::EventType) -> Result<T>
Try to deserialize the JSON as an event’s content with the given event type.