pub struct EventFormatOptions {
pub events_reference_format: EventsReferenceFormatVersion,
pub require_event_id: bool,
pub require_room_create_room_id: bool,
pub content_field_redacts: bool,
}Expand description
Event format options derived from room version rules.
Fields§
§events_reference_format: EventsReferenceFormatVersionEvent reference format version.
require_event_id: boolWhether event_id field is required in the PDU.
require_room_create_room_id: boolWhether room_id is required in m.room.create events.
content_field_redacts: boolWhether redacts belongs in content (V11+) vs top-level (V1-V10).
In room versions 1-10, the redacts field is a top-level PDU field.
In room versions 11+, it is placed inside content.redacts instead.
See: https://spec.matrix.org/v1.17/rooms/v11/#redactions
Implementations§
Source§impl EventFormatOptions
impl EventFormatOptions
Sourcepub const fn from_room_version(room_version: &RoomVersionRules) -> Self
pub const fn from_room_version(room_version: &RoomVersionRules) -> Self
Extract event format options from room version rules.
Trait Implementations§
Source§impl Clone for EventFormatOptions
impl Clone for EventFormatOptions
Source§fn clone(&self) -> EventFormatOptions
fn clone(&self) -> EventFormatOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for EventFormatOptions
Auto Trait Implementations§
impl Freeze for EventFormatOptions
impl RefUnwindSafe for EventFormatOptions
impl Send for EventFormatOptions
impl Sync for EventFormatOptions
impl Unpin for EventFormatOptions
impl UnsafeUnpin for EventFormatOptions
impl UnwindSafe for EventFormatOptions
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