pub enum FullStateEventContent<C>where
C: StaticStateEventContent + RedactContent,{
Original {
content: C,
prev_content: Option<<C as StaticStateEventContent>::PossiblyRedacted>,
},
Redacted(<C as RedactContent>::Redacted),
}
Available on crate feature
events
only.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