pub struct Nonce { /* private fields */ }
Expand description
Implementations
sourceimpl 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
sourceimpl<'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.
sourcefn 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
sourceimpl 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
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more