Skip to main content

RandomSource

Trait RandomSource 

Source
pub trait RandomSource: Send + Sync {
    // Required method
    fn fill(&self, buf: &mut [u8]) -> VckResult<()>;
}
Expand description

A cryptographically secure randomness source.

Required Methods§

Source

fn fill(&self, buf: &mut [u8]) -> VckResult<()>

Fill buf with random bytes, or return an error if randomness is unavailable.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§