pub struct NonceFactory { /* private fields */ }
Expand description
A Factory for nonce blobs.
Implementations§
source§impl NonceFactory
impl NonceFactory
sourcepub fn from_iterator(iter: Box<dyn Iterator<Item = Vec<u8>> + Send>) -> Self
pub fn from_iterator(iter: Box<dyn Iterator<Item = Vec<u8>> + Send>) -> Self
Creates a nonce factory from an iterator over blobs. The iterator is not assumed to be fused.
sourcepub fn random() -> NonceFactory
pub fn random() -> NonceFactory
Creates a nonce factory that generates random blobs using getrandom
.
sourcepub fn empty() -> NonceFactory
pub fn empty() -> NonceFactory
Creates a nonce factory that returns None every time.
sourcepub fn incrementing() -> NonceFactory
pub fn incrementing() -> NonceFactory
Creates a nonce factory that generates incrementing blobs.
Trait Implementations§
source§impl Clone for NonceFactory
impl Clone for NonceFactory
source§fn clone(&self) -> NonceFactory
fn clone(&self) -> NonceFactory
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl NonceGenerator for NonceFactory
impl NonceGenerator for NonceFactory
Auto Trait Implementations§
impl Freeze for NonceFactory
impl !RefUnwindSafe for NonceFactory
impl Send for NonceFactory
impl Sync for NonceFactory
impl Unpin for NonceFactory
impl !UnwindSafe for NonceFactory
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)