Trait ruma_common::events::Redact
source · [−]pub trait Redact {
type Redacted;
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self::Redacted;
}
Expand description
Trait to define the behavior of redacting an event.
Required Associated Types
Required Methods
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self::Redacted
fn redact(
self,
redaction: SyncRoomRedactionEvent,
version: &RoomVersionId
) -> Self::Redacted
Transforms self
into a redacted form (removing most fields) according to the spec.
A small number of events have room-version specific redaction behavior, so a version has to be specified.