Struct bc_components::Nonce
source · pub struct Nonce(/* private fields */);Expand description
A random nonce (“number used once”).
Implementations§
source§impl Nonce
impl Nonce
pub const NONCE_SIZE: usize = 12usize
sourcepub fn from_data_ref(data: impl AsRef<[u8]>) -> Result<Self>
pub fn from_data_ref(data: impl AsRef<[u8]>) -> Result<Self>
Restores a nonce from data.
Trait Implementations§
source§impl CBORDecodable for Nonce
impl CBORDecodable for Nonce
source§impl CBOREncodable for Nonce
impl CBOREncodable for Nonce
source§impl CBORTagged for Nonce
impl CBORTagged for Nonce
The CBOR tags assocated with this type. If more than one tag is present,
they are considered equivalent for reading, but only the first one is
used for writing.
source§impl CBORTaggedDecodable for Nonce
impl CBORTaggedDecodable for Nonce
source§fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self>
Creates an instance of this type by decoding it from untagged CBOR.
source§fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
fn from_tagged_cbor(cbor: &CBOR) -> Result<Self, Error>where
Self: Sized,
Creates an instance of this type by decoding it from tagged CBOR.
source§impl CBORTaggedEncodable for Nonce
impl CBORTaggedEncodable for Nonce
source§fn untagged_cbor(&self) -> CBOR
fn untagged_cbor(&self) -> CBOR
Returns the untagged CBOR encoding of this instance.
source§fn tagged_cbor(&self) -> CBOR
fn tagged_cbor(&self) -> CBOR
Returns the tagged CBOR encoding of this instance.
source§impl PartialEq for Nonce
impl PartialEq for Nonce
source§impl URDecodable for Nonce
impl URDecodable for Nonce
source§impl UREncodable for Nonce
impl UREncodable for Nonce
impl Eq for Nonce
impl StructuralPartialEq for Nonce
impl URCodable for Nonce
Auto Trait Implementations§
impl Freeze for Nonce
impl RefUnwindSafe for Nonce
impl Send for Nonce
impl Sync for Nonce
impl Unpin for Nonce
impl UnwindSafe for Nonce
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