[−][src]Struct tcn::TemporaryContactKey
A ratcheting key used to derive temporary contact numbers.
Methods
impl TemporaryContactKey
[src]
pub fn index(&self) -> u16
[src]
The current ratchet index.
pub fn temporary_contact_number(&self) -> TemporaryContactNumber
[src]
Compute the temporary contact number derived from this key.
pub fn ratchet(self) -> Option<TemporaryContactKey>
[src]
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.
impl TemporaryContactKey
[src]
pub fn read<R: Read>(reader: R) -> Result<TemporaryContactKey, Error>
[src]
Try to read a TemporaryContactKey
from a generic io::Read
er.
pub fn write<W: Write>(&self, writer: W) -> Result<(), Error>
[src]
Try to write a TemporaryContactKey
into a generic io::Write
er.
Trait Implementations
impl Clone for TemporaryContactKey
[src]
fn clone(&self) -> TemporaryContactKey
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for TemporaryContactKey
[src]
impl Debug for TemporaryContactKey
[src]
impl Eq for TemporaryContactKey
[src]
impl PartialEq<TemporaryContactKey> for TemporaryContactKey
[src]
fn eq(&self, other: &TemporaryContactKey) -> bool
[src]
fn ne(&self, other: &TemporaryContactKey) -> bool
[src]
impl StructuralEq for TemporaryContactKey
[src]
impl StructuralPartialEq for TemporaryContactKey
[src]
Auto Trait Implementations
impl RefUnwindSafe for TemporaryContactKey
impl Send for TemporaryContactKey
impl Sync for TemporaryContactKey
impl Unpin for TemporaryContactKey
impl UnwindSafe for TemporaryContactKey
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,