pub struct TemporaryContactKey { /* private fields */ }
Expand description
A ratcheting key used to derive temporary contact numbers.
Implementations§
Source§impl TemporaryContactKey
impl TemporaryContactKey
Sourcepub fn temporary_contact_number(&self) -> TemporaryContactNumber
pub fn temporary_contact_number(&self) -> TemporaryContactNumber
Compute the temporary contact number derived from this key.
Sourcepub fn ratchet(self) -> Option<TemporaryContactKey>
pub fn ratchet(self) -> Option<TemporaryContactKey>
Ratchet the key forward, producing a new key for a new temporary contact number.
§Returns
Some(new_key)
if the current ratchet index is less thanu16::MAX
;None
if the current ratchet index isu16::MAX
, signaling that the report authorization key should be rotated.
Trait Implementations§
Source§impl Clone for TemporaryContactKey
impl Clone for TemporaryContactKey
Source§fn clone(&self) -> TemporaryContactKey
fn clone(&self) -> TemporaryContactKey
Returns a duplicate 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 TemporaryContactKey
impl Debug for TemporaryContactKey
Source§impl PartialEq for TemporaryContactKey
impl PartialEq for TemporaryContactKey
impl Copy for TemporaryContactKey
impl Eq for TemporaryContactKey
impl StructuralPartialEq for TemporaryContactKey
Auto Trait Implementations§
impl Freeze for TemporaryContactKey
impl RefUnwindSafe for TemporaryContactKey
impl Send for TemporaryContactKey
impl Sync for TemporaryContactKey
impl Unpin for TemporaryContactKey
impl UnwindSafe for TemporaryContactKey
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