pub struct SenderRatchetConfiguration { /* private fields */ }
Expand description
Stores the configuration parameters for DecryptionRatchet
s.
Parameters
- out_of_order_tolerance: This parameter defines a window for which decryption secrets are kept. This is useful in case the DS cannot guarantee that all application messages have total order within an epoch. Use this carefully, since keeping decryption secrets affects forward secrecy within an epoch. The default value is 5.
- maximum_forward_distance: This parameter defines how many incoming messages can be skipped. This is useful if the DS drops application messages. The default value is 1000.
Implementations§
Source§impl SenderRatchetConfiguration
impl SenderRatchetConfiguration
Sourcepub fn new(out_of_order_tolerance: u32, maximum_forward_distance: u32) -> Self
pub fn new(out_of_order_tolerance: u32, maximum_forward_distance: u32) -> Self
Create a new configuration
Sourcepub fn out_of_order_tolerance(&self) -> u32
pub fn out_of_order_tolerance(&self) -> u32
Get a reference to the sender ratchet configuration’s out of order tolerance.
Sourcepub fn maximum_forward_distance(&self) -> u32
pub fn maximum_forward_distance(&self) -> u32
Get a reference to the sender ratchet configuration’s maximum forward distance.
Trait Implementations§
Source§impl Clone for SenderRatchetConfiguration
impl Clone for SenderRatchetConfiguration
Source§fn clone(&self) -> SenderRatchetConfiguration
fn clone(&self) -> SenderRatchetConfiguration
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 SenderRatchetConfiguration
impl Debug for SenderRatchetConfiguration
Source§impl Default for SenderRatchetConfiguration
impl Default for SenderRatchetConfiguration
Source§impl<'de> Deserialize<'de> for SenderRatchetConfiguration
impl<'de> Deserialize<'de> for SenderRatchetConfiguration
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
impl Eq for SenderRatchetConfiguration
impl StructuralPartialEq for SenderRatchetConfiguration
Auto Trait Implementations§
impl Freeze for SenderRatchetConfiguration
impl RefUnwindSafe for SenderRatchetConfiguration
impl Send for SenderRatchetConfiguration
impl Sync for SenderRatchetConfiguration
impl Unpin for SenderRatchetConfiguration
impl UnwindSafe for SenderRatchetConfiguration
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> 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