Trait matrix_sdk::ruma::events::RawExt

source ·
pub trait RawExt<T>{
    // Required method
    fn deserialize_with_type(
        &self,
        event_type: <T as EventContent>::EventType,
    ) -> Result<T, Error>;
}
Expand description

Extension trait for Raw<T>.

Required Methods§

source

fn deserialize_with_type( &self, event_type: <T as EventContent>::EventType, ) -> Result<T, Error>

Try to deserialize the JSON as an event’s content with the given event type.

Implementations on Foreign Types§

source§

impl<T> RawExt<T> for Raw<T>

source§

fn deserialize_with_type( &self, event_type: <T as EventContent>::EventType, ) -> Result<T, Error>

Implementors§