pub trait EntropySource: Send + Sync {
// Required methods
fn info(&self) -> &SourceInfo;
fn is_available(&self) -> bool;
fn collect(&self, n_samples: usize) -> Vec<u8> ⓘ;
// Provided method
fn name(&self) -> &'static str { ... }
}Expand description
Trait that every entropy source must implement.
Required Methods§
Sourcefn info(&self) -> &SourceInfo
fn info(&self) -> &SourceInfo
Source metadata.
Sourcefn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if this source can operate on the current machine.