#[non_exhaustive]pub struct RequiredStateElement {
pub event_type: Option<StateEventType>,
pub state_key: Option<String>,
}Available on crate feature
unstable-msc4186 and (crate features client or server) only.Expand description
A matcher for state events (see RequiredState).
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.event_type: Option<StateEventType>The event type to match.
None matches all types.
state_key: Option<String>The state key to match.
None matches all state keys.
Implementations§
Source§impl RequiredStateElement
impl RequiredStateElement
Sourcepub fn with_event_type(self, event_type: StateEventType) -> Self
pub fn with_event_type(self, event_type: StateEventType) -> Self
Only match state events with the given event type.
Sourcepub fn with_state_key(self, state_key: String) -> Self
pub fn with_state_key(self, state_key: String) -> Self
Only match state events with the given state key.
Trait Implementations§
Source§impl Clone for RequiredStateElement
impl Clone for RequiredStateElement
Source§impl Debug for RequiredStateElement
impl Debug for RequiredStateElement
Source§impl Default for RequiredStateElement
impl Default for RequiredStateElement
Source§impl<'de> Deserialize<'de> for RequiredStateElement
impl<'de> Deserialize<'de> for RequiredStateElement
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Forget for RequiredStateElement
impl Freeze for RequiredStateElement
impl Move for RequiredStateElement
impl RefUnwindSafe for RequiredStateElement
impl Send for RequiredStateElement
impl Sync for RequiredStateElement
impl Unpin for RequiredStateElement
impl UnsafeUnpin for RequiredStateElement
impl UnwindSafe for RequiredStateElement
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more