Struct bc_components::Nonce
source · pub struct Nonce(_);
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<T>(data: &T) -> Option<Self>where
T: AsRef<[u8]>,
pub fn from_data_ref<T>(data: &T) -> Option<Self>where T: AsRef<[u8]>,
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
source§impl CBORTaggedDecodable for Nonce
impl CBORTaggedDecodable for Nonce
source§fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self, Error>
fn from_untagged_cbor(untagged_cbor: &CBOR) -> Result<Self, Error>
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<Nonce> for Nonce
impl PartialEq<Nonce> for Nonce
impl Eq for Nonce
impl StructuralEq for Nonce
impl StructuralPartialEq for Nonce
Auto Trait Implementations§
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