pub struct EncryptionSettings {
pub algorithm: EventEncryptionAlgorithm,
pub rotation_period: u64,
pub rotation_period_msgs: u64,
pub history_visibility: HistoryVisibility,
pub only_allow_trusted_devices: bool,
pub error_on_verified_user_problem: bool,
}
Expand description
Settings that should be used when a room key is shared.
These settings control which algorithm the room key should use, how long a room key should be used and some other important information that determines the lifetime of a room key.
Fields§
§algorithm: EventEncryptionAlgorithm
The encryption algorithm that should be used in the room.
rotation_period: u64
How long can the room key be used before it should be rotated. Time in seconds.
rotation_period_msgs: u64
How many messages should be sent before the room key should be rotated.
history_visibility: HistoryVisibility
The current history visibility of the room. The visibility will be tracked by the room key and the key will be rotated if the visibility changes.
only_allow_trusted_devices: bool
Should untrusted devices receive the room key, or should they be excluded from the conversation.
error_on_verified_user_problem: bool
Should fail to send when a verified user has unverified devices, or when a previously verified user replaces their identity.
Trait Implementations§
Source§impl<UT> ConvertError<UT> for EncryptionSettings
impl<UT> ConvertError<UT> for EncryptionSettings
fn try_convert_unexpected_callback_error( e: UnexpectedUniFFICallbackError, ) -> Result<Self>
Source§impl<UT> FfiConverter<UT> for EncryptionSettings
impl<UT> FfiConverter<UT> for EncryptionSettings
Source§const TYPE_ID_META: MetadataBuffer = _
const TYPE_ID_META: MetadataBuffer = _
Source§type FfiType = RustBuffer
type FfiType = RustBuffer
Source§fn lower(v: Self) -> RustBuffer
fn lower(v: Self) -> RustBuffer
Source§fn try_lift(buf: RustBuffer) -> Result<Self>
fn try_lift(buf: RustBuffer) -> Result<Self>
Source§impl From<EncryptionSettings> for EncryptionSettings
impl From<EncryptionSettings> for EncryptionSettings
Source§fn from(v: EncryptionSettings) -> Self
fn from(v: EncryptionSettings) -> Self
Source§impl<UT> Lift<UT> for EncryptionSettings
impl<UT> Lift<UT> for EncryptionSettings
Source§impl<UT> LiftRef<UT> for EncryptionSettings
impl<UT> LiftRef<UT> for EncryptionSettings
Source§impl<UT> LiftReturn<UT> for EncryptionSettings
impl<UT> LiftReturn<UT> for EncryptionSettings
Source§type ReturnType = <EncryptionSettings as Lift<UT>>::FfiType
type ReturnType = <EncryptionSettings as Lift<UT>>::FfiType
Source§fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
fn try_lift_successful_return(v: Self::ReturnType) -> Result<Self>
Source§fn lift_foreign_return(
ffi_return: Self::ReturnType,
call_status: RustCallStatus,
) -> Self
fn lift_foreign_return( ffi_return: Self::ReturnType, call_status: RustCallStatus, ) -> Self
Source§fn lift_error(_buf: RustBuffer) -> Self
fn lift_error(_buf: RustBuffer) -> Self
Source§fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
fn handle_callback_unexpected_error(e: UnexpectedUniFFICallbackError) -> Self
Source§impl<UT> Lower<UT> for EncryptionSettings
impl<UT> Lower<UT> for EncryptionSettings
type FfiType = <EncryptionSettings as FfiConverter<UT>>::FfiType
fn lower(obj: Self) -> Self::FfiType
fn write(obj: Self, buf: &mut Vec<u8>)
Source§fn lower_into_rust_buffer(obj: Self) -> RustBuffer
fn lower_into_rust_buffer(obj: Self) -> RustBuffer
Source§impl<UT> LowerError<UT> for EncryptionSettings
impl<UT> LowerError<UT> for EncryptionSettings
Source§fn lower_error(obj: Self) -> RustBuffer
fn lower_error(obj: Self) -> RustBuffer
Source§impl<UT> LowerReturn<UT> for EncryptionSettings
impl<UT> LowerReturn<UT> for EncryptionSettings
Source§type ReturnType = <EncryptionSettings as Lower<UT>>::FfiType
type ReturnType = <EncryptionSettings as Lower<UT>>::FfiType
Source§fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
fn lower_return(obj: Self) -> Result<Self::ReturnType, RustBuffer>
Source§impl<UT> TypeId<UT> for EncryptionSettings
impl<UT> TypeId<UT> for EncryptionSettings
const TYPE_ID_META: MetadataBuffer = _
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
§impl<T> CompatExt for T
impl<T> CompatExt for T
Source§impl<T, UT> HandleAlloc<UT> for T
impl<T, UT> HandleAlloc<UT> for T
Source§fn consume_handle(handle: Handle) -> Arc<T>
fn consume_handle(handle: Handle) -> Arc<T>
Arc<>
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,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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