pub struct Nonce { /* private fields */ }
Expand description
Implementations§
source§impl Nonce
impl Nonce
sourcepub fn from_slice(slice: &[u8]) -> Result<Nonce, UnknownCryptoError>
pub fn from_slice(slice: &[u8]) -> Result<Nonce, UnknownCryptoError>
Construct from a given byte slice.
Trait Implementations§
source§impl<'de> Deserialize<'de> for Nonce
Available on crate feature serde
only.
impl<'de> Deserialize<'de> for Nonce
Available on crate feature
serde
only.This type tries to deserialize as a Vec<u8>
would. If it succeeds, the digest
will be built using Self::from_slice
.
Note that this allocates once to store the referenced bytes on the heap.
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
source§impl PartialEq<&[u8]> for Nonce
impl PartialEq<&[u8]> for Nonce
source§impl PartialEq<Nonce> for Nonce
impl PartialEq<Nonce> for Nonce
source§impl Serialize for Nonce
Available on crate feature serde
only.
impl Serialize for Nonce
Available on crate feature
serde
only.This type tries to serialize as a &[u8]
would. Note that the serialized
type likely does not have the same protections that Orion provides, such
as constant-time operations. A good rule of thumb is to only serialize
these types for storage. Don’t operate on the serialized types.
impl Copy for Nonce
impl Eq 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