pub enum FullStateEventContent<C: StaticStateEventContent + RedactContent> {
Original {
content: C,
prev_content: Option<C::PossiblyRedacted>,
},
Redacted(C::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
Fields
§
content: C
Current content of the room state.
§
prev_content: Option<C::PossiblyRedacted>
Previous content of the room state.
Original, unredacted content of the event.
Redacted(C::Redacted)
Redacted content of the event.
Implementations§
source§impl<C: StaticStateEventContent + RedactContent> FullStateEventContent<C>where
C::Redacted: RedactedStateEventContent,
impl<C: StaticStateEventContent + RedactContent> FullStateEventContent<C>where C::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::Redacted
pub fn redact(self, version: &RoomVersionId) -> C::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 + StaticStateEventContent + RedactContent> Clone for FullStateEventContent<C>where
C::PossiblyRedacted: Clone,
C::Redacted: Clone,
impl<C: Clone + StaticStateEventContent + RedactContent> Clone for FullStateEventContent<C>where C::PossiblyRedacted: Clone, C::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 + StaticStateEventContent + RedactContent> Debug for FullStateEventContent<C>where
C::PossiblyRedacted: Debug,
C::Redacted: Debug,
impl<C: Debug + StaticStateEventContent + RedactContent> Debug for FullStateEventContent<C>where C::PossiblyRedacted: Debug, C::Redacted: Debug,
Auto Trait Implementations§
impl<C> RefUnwindSafe for FullStateEventContent<C>where C: RefUnwindSafe, <C as StaticStateEventContent>::PossiblyRedacted: RefUnwindSafe, <C as RedactContent>::Redacted: RefUnwindSafe,
impl<C> Send for FullStateEventContent<C>where C: Send, <C as StaticStateEventContent>::PossiblyRedacted: Send, <C as RedactContent>::Redacted: Send,
impl<C> Sync for FullStateEventContent<C>where C: Sync, <C as StaticStateEventContent>::PossiblyRedacted: Sync, <C as RedactContent>::Redacted: Sync,
impl<C> Unpin for FullStateEventContent<C>where C: Unpin, <C as StaticStateEventContent>::PossiblyRedacted: Unpin, <C as RedactContent>::Redacted: Unpin,
impl<C> UnwindSafe for FullStateEventContent<C>where C: UnwindSafe, <C as StaticStateEventContent>::PossiblyRedacted: UnwindSafe, <C as RedactContent>::Redacted: 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