pub enum FullStateEventContent<C>where
C: StaticStateEventContent + RedactContent,{
Original {
content: C,
prev_content: Option<<C as StaticStateEventContent>::PossiblyRedacted>,
},
Redacted(<C as RedactContent>::Redacted),
}
Expand description
A possibly-redacted state event content.
A non-redacted content also contains the prev_content
from the unsigned event data.
Variants§
Original
Original, unredacted content of the event.
Fields
§
content: C
Current content of the room state.
§
prev_content: Option<<C as StaticStateEventContent>::PossiblyRedacted>
Previous content of the room state.
Redacted(<C as RedactContent>::Redacted)
Redacted content of the event.
Implementations§
Source§impl<C> FullStateEventContent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
impl<C> FullStateEventContent<C>where
C: StaticStateEventContent + RedactContent,
<C as RedactContent>::Redacted: RedactedStateEventContent,
Sourcepub fn event_type(&self) -> StateEventType
pub fn event_type(&self) -> StateEventType
Get the event’s type, like m.room.create
.
Sourcepub fn redact(self, version: &RoomVersionId) -> <C as RedactContent>::Redacted
pub fn redact(self, version: &RoomVersionId) -> <C as RedactContent>::Redacted
Transform self
into a redacted form (removing most or all fields) according to the spec.
If self
is already Redacted
, return the inner data unmodified.
A small number of events have room-version specific redaction behavior, so a version has to be specified.
Trait Implementations§
Source§impl<C> Clone for FullStateEventContent<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
<C as RedactContent>::Redacted: Clone,
impl<C> Clone for FullStateEventContent<C>where
C: Clone + StaticStateEventContent + RedactContent,
<C as StaticStateEventContent>::PossiblyRedacted: Clone,
<C as RedactContent>::Redacted: Clone,
Source§fn clone(&self) -> FullStateEventContent<C>
fn clone(&self) -> FullStateEventContent<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 FullStateEventContent<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as StaticStateEventContent>::PossiblyRedacted: Debug,
<C as RedactContent>::Redacted: Debug,
impl<C> Debug for FullStateEventContent<C>where
C: Debug + StaticStateEventContent + RedactContent,
<C as StaticStateEventContent>::PossiblyRedacted: Debug,
<C as RedactContent>::Redacted: Debug,
Auto Trait Implementations§
impl<C> Freeze for FullStateEventContent<C>where
C: Freeze,
<C as RedactContent>::Redacted: Freeze,
<C as StaticStateEventContent>::PossiblyRedacted: Freeze,
impl<C> RefUnwindSafe for FullStateEventContent<C>where
C: RefUnwindSafe,
<C as RedactContent>::Redacted: RefUnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: RefUnwindSafe,
impl<C> Send for FullStateEventContent<C>where
C: Send,
<C as RedactContent>::Redacted: Send,
<C as StaticStateEventContent>::PossiblyRedacted: Send,
impl<C> Sync for FullStateEventContent<C>where
C: Sync,
<C as RedactContent>::Redacted: Sync,
<C as StaticStateEventContent>::PossiblyRedacted: Sync,
impl<C> Unpin for FullStateEventContent<C>where
C: Unpin,
<C as RedactContent>::Redacted: Unpin,
<C as StaticStateEventContent>::PossiblyRedacted: Unpin,
impl<C> UnwindSafe for FullStateEventContent<C>where
C: UnwindSafe,
<C as RedactContent>::Redacted: UnwindSafe,
<C as StaticStateEventContent>::PossiblyRedacted: 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§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