pub struct EncryptionSettings {
pub algorithm: EventEncryptionAlgorithm,
pub rotation_period: Duration,
pub rotation_period_msgs: u64,
pub history_visibility: HistoryVisibility,
pub sharing_strategy: CollectStrategy,
}
Expand description
Settings for an encrypted room.
This determines the algorithm and rotation periods of a group session.
Fields§
§algorithm: EventEncryptionAlgorithm
The encryption algorithm that should be used in the room.
rotation_period: Duration
How long the session should be used before changing it.
rotation_period_msgs: u64
How many messages should be sent before changing the session.
history_visibility: HistoryVisibility
The history visibility of the room when the session was created.
sharing_strategy: CollectStrategy
The strategy used to distribute the room keys to participant. Default will send to all devices.
Implementations§
Source§impl EncryptionSettings
impl EncryptionSettings
Sourcepub fn new(
content: RoomEncryptionEventContent,
history_visibility: HistoryVisibility,
sharing_strategy: CollectStrategy,
) -> Self
pub fn new( content: RoomEncryptionEventContent, history_visibility: HistoryVisibility, sharing_strategy: CollectStrategy, ) -> Self
Create new encryption settings using an RoomEncryptionEventContent
,
a history visibility, and key sharing strategy.
Trait Implementations§
Source§impl Clone for EncryptionSettings
impl Clone for EncryptionSettings
Source§fn clone(&self) -> EncryptionSettings
fn clone(&self) -> EncryptionSettings
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 Debug for EncryptionSettings
impl Debug for EncryptionSettings
Source§impl Default for EncryptionSettings
impl Default for EncryptionSettings
Source§impl<'de> Deserialize<'de> for EncryptionSettings
impl<'de> Deserialize<'de> for EncryptionSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for EncryptionSettings
impl RefUnwindSafe for EncryptionSettings
impl Send for EncryptionSettings
impl Sync for EncryptionSettings
impl Unpin for EncryptionSettings
impl UnwindSafe for EncryptionSettings
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