pub enum RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,{
Sync(Raw<SyncStateEvent<C>>),
Stripped(Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>),
}
Expand description
Wrapper around both versions of a raw state event.
Variants§
Sync(Raw<SyncStateEvent<C>>)
An event from a room in joined or left state.
Stripped(Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>)
An event from a room in invited state.
Implementations§
source§impl<C> RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug + Clone,
impl<C> RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent + Debug + Clone,
sourcepub fn deserialize(&self) -> Result<SyncOrStrippedState<C>, Error>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + EventContentFromType,
<C as StaticStateEventContent>::PossiblyRedacted: PossiblyRedactedStateEventContent + EventContentFromType,
pub fn deserialize(&self) -> Result<SyncOrStrippedState<C>, Error>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent<StateKey = <C as StateEventContent>::StateKey> + EventContentFromType,
<C as StaticStateEventContent>::PossiblyRedacted: PossiblyRedactedStateEventContent + EventContentFromType,
Try to deserialize the inner JSON as the expected type.
Trait Implementations§
source§impl<C> Clone for RawSyncOrStrippedState<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
impl<C> Clone for RawSyncOrStrippedState<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
source§fn clone(&self) -> RawSyncOrStrippedState<C>
fn clone(&self) -> RawSyncOrStrippedState<C>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<C> Debug for RawSyncOrStrippedState<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as StaticStateEventContent>::PossiblyRedacted: Debug,
impl<C> Debug for RawSyncOrStrippedState<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
<C as StaticStateEventContent>::PossiblyRedacted: Debug,
source§impl<C> Serialize for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Serialize,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl<C> Serialize for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Serialize,
<C as RedactContent>::Redacted: RedactedStateEventContent,
source§fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl<C> RefUnwindSafe for RawSyncOrStrippedState<C>where
C: RefUnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: RefUnwindSafe,
<C as RedactContent>::Redacted: RefUnwindSafe,
<C as StateEventContent>::StateKey: RefUnwindSafe,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: RefUnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: RefUnwindSafe,
<C as StaticStateEventContent>::Unsigned: RefUnwindSafe,
impl<C> Send for RawSyncOrStrippedState<C>where
C: Send,
<C as StaticStateEventContent>::PossiblyRedacted: Send,
<C as RedactContent>::Redacted: Send,
<C as StateEventContent>::StateKey: Send,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Send,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Send,
<C as StaticStateEventContent>::Unsigned: Send,
impl<C> Sync for RawSyncOrStrippedState<C>where
C: Sync,
<C as StaticStateEventContent>::PossiblyRedacted: Sync,
<C as RedactContent>::Redacted: Sync,
<C as StateEventContent>::StateKey: Sync,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Sync,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Sync,
<C as StaticStateEventContent>::Unsigned: Sync,
impl<C> Unpin for RawSyncOrStrippedState<C>where
C: Unpin,
<C as StaticStateEventContent>::PossiblyRedacted: Unpin,
<C as RedactContent>::Redacted: Unpin,
<C as StateEventContent>::StateKey: Unpin,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Unpin,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Unpin,
<C as StaticStateEventContent>::Unsigned: Unpin,
impl<C> UnwindSafe for RawSyncOrStrippedState<C>where
C: UnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: UnwindSafe,
<C as RedactContent>::Redacted: UnwindSafe,
<C as StateEventContent>::StateKey: UnwindSafe,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: UnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: UnwindSafe,
<C as StaticStateEventContent>::Unsigned: UnwindSafe,
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
§fn new_handle(value: Arc<T>) -> Handle
fn new_handle(value: Arc<T>) -> Handle
Create a new handle for an Arc value Read more
§fn clone_handle(handle: Handle) -> Handle
fn clone_handle(handle: Handle) -> Handle
Clone a handle Read more
§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Consume a handle, getting back the initial
Arc<>