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 methods
fn name(&self) -> &'static str { ... }
fn set_config(&self, _key: &str, _value: &str) -> Result<(), String> { ... }
fn config_options(&self) -> Vec<(&'static str, String)> { ... }
}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.
Provided Methods§
Sourcefn set_config(&self, _key: &str, _value: &str) -> Result<(), String>
fn set_config(&self, _key: &str, _value: &str) -> Result<(), String>
Optional runtime configuration. Returns Err if unsupported.
Sourcefn config_options(&self) -> Vec<(&'static str, String)>
fn config_options(&self) -> Vec<(&'static str, String)>
List configurable keys and their current values.
Implementors§
impl EntropySource for GPUDivergenceSource
impl EntropySource for IOSurfaceCrossingSource
impl EntropySource for NLInferenceTimingSource
Available on non-macOS only.
impl EntropySource for DiskIOSource
impl EntropySource for FsyncJournalSource
impl EntropySource for NvmeIokitSensorsSource
impl EntropySource for NvmePassthroughLinuxSource
impl EntropySource for NvmeRawDeviceSource
impl EntropySource for USBEnumerationSource
Available on non-macOS only.
impl EntropySource for KeychainTimingSource
impl EntropySource for KqueueEventsSource
impl EntropySource for MachIPCSource
impl EntropySource for PipeBufferSource
impl EntropySource for AMXTimingSource
impl EntropySource for APRRJitTimingSource
Available on not (macOS and AArch64).
impl EntropySource for CASContentionSource
impl EntropySource for CntfrqCacheTimingSource
Available on not (macOS and AArch64).
impl EntropySource for CommonCryptoAesTimingSource
Available on not (macOS and AArch64).
impl EntropySource for DVFSRaceSource
impl EntropySource for DenormalTimingSource
impl EntropySource for DualClockDomainSource
Available on not (macOS and AArch64).
impl EntropySource for GxfRegisterTimingSource
Available on not (macOS and AArch64).
impl EntropySource for ICCAtomicContentionSource
impl EntropySource for MemoryBusCryptoSource
Available on not (macOS and AArch64).
impl EntropySource for PrefetcherStateSource
Available on non-macOS only.
impl EntropySource for SEVEventTimingSource
Available on not (macOS and AArch64).
impl EntropySource for SITVASource
Available on not (macOS and AArch64).
impl EntropySource for SpeculativeExecutionSource
impl EntropySource for TLBShootdownSource
impl EntropySource for DNSTimingSource
impl EntropySource for TCPConnectSource
impl EntropySource for WiFiRSSISource
impl EntropySource for QCicadaSource
impl EntropySource for DispatchQueueTimingSource
Available on non-macOS only.
impl EntropySource for PECoreArithmeticSource
impl EntropySource for PreemptionBoundarySource
Available on not (macOS and AArch64).
impl EntropySource for SleepJitterSource
impl EntropySource for ThreadLifecycleSource
impl EntropySource for TimerCoalescingSource
impl EntropySource for AudioNoiseSource
impl EntropySource for BluetoothNoiseSource
impl EntropySource for CameraNoiseSource
impl EntropySource for SMCHighVarTimingSource
Available on non-macOS only.
impl EntropySource for CompressionTimingSource
impl EntropySource for HashTimingSource
impl EntropySource for SpotlightTimingSource
impl EntropySource for GetentropyTimingSource
Available on non-macOS only.
impl EntropySource for IORegistryEntropySource
impl EntropySource for ProcInfoTimingSource
Available on non-macOS only.
impl EntropySource for ProcessSource
impl EntropySource for SysctlSource
impl EntropySource for VmstatSource
impl EntropySource for AudioPLLTimingSource
impl EntropySource for CounterBeatSource
impl EntropySource for DisplayPllSource
impl EntropySource for PciePllSource
impl EntropySource for AneTimingSource
impl EntropySource for ClockJitterSource
impl EntropySource for CommPageClockTimingSource
Available on non-macOS only.
impl EntropySource for DRAMRowBufferSource
impl EntropySource for MachContinuousTimingSource
Available on non-macOS only.