Skip to main content

TypeExt

Trait TypeExt 

Source
pub trait TypeExt {
    // Required method
    fn with_state_key(
        self,
        state_key: impl Into<StateKey>,
    ) -> (StateEventType, StateKey);
}
Expand description

Convenience trait for adding event type plus state key to state maps.

Required Methods§

Source

fn with_state_key( self, state_key: impl Into<StateKey>, ) -> (StateEventType, StateKey)

Pairs this event type with an owned state key.

Timeline event types are converted to their state-event type spelling. Borrowed event types are cloned as needed for the returned pair.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementations on Foreign Types§

Source§

impl TypeExt for &StateEventType

Source§

fn with_state_key( self, state_key: impl Into<StateKey>, ) -> (StateEventType, StateKey)

Source§

impl TypeExt for &TimelineEventType

Source§

fn with_state_key( self, state_key: impl Into<StateKey>, ) -> (StateEventType, StateKey)

Source§

impl TypeExt for StateEventType

Source§

fn with_state_key( self, state_key: impl Into<StateKey>, ) -> (StateEventType, StateKey)

Source§

impl TypeExt for TimelineEventType

Source§

fn with_state_key( self, state_key: impl Into<StateKey>, ) -> (StateEventType, StateKey)

Implementors§