Struct ic_agent::agent::NonceFactory
source · 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 more