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§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: 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>
impl<C> RefUnwindSafe for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized + RefUnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: RefUnwindSafe,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: RefUnwindSafe,
C: RefUnwindSafe,
<C as StateEventContent>::StateKey: RefUnwindSafe,
<C as StaticStateEventContent>::Unsigned: RefUnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: RefUnwindSafe,
impl<C> Send for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized + Send,
<C as StaticStateEventContent>::PossiblyRedacted: Send,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Send,
C: Send,
<C as StateEventContent>::StateKey: Send,
<C as StaticStateEventContent>::Unsigned: Send,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Send,
impl<C> Sync for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized + Sync,
<C as StaticStateEventContent>::PossiblyRedacted: Sync,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Sync,
C: Sync,
<C as StateEventContent>::StateKey: Sync,
<C as StaticStateEventContent>::Unsigned: Sync,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Sync,
impl<C> Unpin for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized + Unpin,
<C as StaticStateEventContent>::PossiblyRedacted: Unpin,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: Unpin,
C: Unpin,
<C as StateEventContent>::StateKey: Unpin,
<C as StaticStateEventContent>::Unsigned: Unpin,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: Unpin,
impl<C> UnwindSafe for RawSyncOrStrippedState<C>where
<C as RedactContent>::Redacted: Sized + UnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: UnwindSafe,
<<C as StaticStateEventContent>::PossiblyRedacted as PossiblyRedactedStateEventContent>::StateKey: UnwindSafe,
C: UnwindSafe,
<C as StateEventContent>::StateKey: UnwindSafe,
<C as StaticStateEventContent>::Unsigned: UnwindSafe,
<<C as RedactContent>::Redacted as RedactedStateEventContent>::StateKey: 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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)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