pub enum RawSyncOrStrippedState<C>{
Sync(Raw<SyncStateEvent<C>>),
Stripped(Raw<StrippedStateEvent<C::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::PossiblyRedacted>>)
An event from a room in invited state.
Implementations§
Source§impl<C> RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent,
C::Redacted: RedactedStateEventContent + Debug + Clone,
impl<C> RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent,
C::Redacted: RedactedStateEventContent + Debug + Clone,
Sourcepub fn deserialize(&self) -> Result<SyncOrStrippedState<C>>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedStateEventContent<StateKey = C::StateKey> + EventContentFromType,
C::PossiblyRedacted: PossiblyRedactedStateEventContent + EventContentFromType,
pub fn deserialize(&self) -> Result<SyncOrStrippedState<C>>where
C: StaticStateEventContent + EventContentFromType + RedactContent,
C::Redacted: RedactedStateEventContent<StateKey = C::StateKey> + EventContentFromType,
C::PossiblyRedacted: PossiblyRedactedStateEventContent + EventContentFromType,
Try to deserialize the inner JSON as the expected type.
Trait Implementations§
Source§impl<C> Clone for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Clone,
C::Redacted: RedactedStateEventContent,
C::PossiblyRedacted: Clone,
impl<C> Clone for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Clone,
C::Redacted: RedactedStateEventContent,
C::PossiblyRedacted: Clone,
Source§impl<C> Debug for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Debug,
C::Redacted: RedactedStateEventContent,
C::PossiblyRedacted: Debug,
impl<C> Debug for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Debug,
C::Redacted: RedactedStateEventContent,
C::PossiblyRedacted: Debug,
Source§impl<C> Serialize for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Serialize,
C::Redacted: RedactedStateEventContent,
impl<C> Serialize for RawSyncOrStrippedState<C>where
C: StaticStateEventContent + RedactContent + Serialize,
C::Redacted: RedactedStateEventContent,
Auto Trait Implementations§
impl<C> Freeze for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: Freeze,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: Freeze,
impl<C> RefUnwindSafe for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: RefUnwindSafe,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: RefUnwindSafe,
impl<C> Send for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: Send,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: Send,
impl<C> Sync for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: Sync,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: Sync,
impl<C> Unpin for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: Unpin,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: Unpin,
impl<C> UnsafeUnpin for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: UnsafeUnpin,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: UnsafeUnpin,
impl<C> UnwindSafe for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized,
Raw<SyncStateEvent<C>>: UnwindSafe,
Raw<StrippedStateEvent<<C as StaticStateEventContent>::PossiblyRedacted>>: UnwindSafe,
Blanket Implementations§
impl<T> AsyncTraitDeps for T
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T> DropFlavorWrapper<T> for T
impl<T> DropFlavorWrapper<T> for T
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more