pub trait NonceProvider: Sized {
    type Builder: NonceProviderBuilder<Provider = Self>;
    type Error: Error;

    fn nonce(&self, bytes: &[u8], target_score: u32) -> Result<u64, Self::Error>;

    fn builder() -> Self::Builder { ... }
}
Expand description

A trait describing how a nonce is provided.

Required Associated Types

The type of the nonce provider builder.

Type of errors occurring when providing nonces.

Required Methods

Provides a nonce given bytes and a target score.

Provided Methods

Returns a builder for this nonce provider.

Implementations on Foreign Types

A nonce provider that returns constant nonces.

Implementors