pub struct HardwareEntropySource { /* private fields */ }Expand description
Hardware random number generator entropy source
On x86 / x86_64 with the std feature, this uses RDRAND when the
CPU advertises support and a probe read succeeds. Without std, runtime
CPUID-based detection is unavailable and this source reports as unavailable.
AArch64 and PowerPC do not use in-process RNDR / DARN in this
crate on stable Rust; use OsEntropySource for those targets.
Implementations§
Trait Implementations§
Source§impl Clone for HardwareEntropySource
impl Clone for HardwareEntropySource
Source§fn clone(&self) -> HardwareEntropySource
fn clone(&self) -> HardwareEntropySource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HardwareEntropySource
impl Debug for HardwareEntropySource
Source§impl Default for HardwareEntropySource
impl Default for HardwareEntropySource
Source§impl EntropySource for HardwareEntropySource
impl EntropySource for HardwareEntropySource
Source§fn get_entropy(&mut self, dest: &mut [u8]) -> Result<()>
fn get_entropy(&mut self, dest: &mut [u8]) -> Result<()>
Get entropy from the source Read more
Source§fn initialize(&mut self, config: &EntropyConfig) -> Result<()>
fn initialize(&mut self, config: &EntropyConfig) -> Result<()>
Initialize the entropy source Read more
Source§fn is_available(&self) -> bool
fn is_available(&self) -> bool
Check if the entropy source is available Read more
Source§fn source_type(&self) -> EntropySourceType
fn source_type(&self) -> EntropySourceType
Get the entropy source’s type Read more
Source§fn max_entropy_per_call(&self) -> Option<usize>
fn max_entropy_per_call(&self) -> Option<usize>
Get the maximum entropy that can be obtained in one call Read more
Source§fn requires_initialization(&self) -> bool
fn requires_initialization(&self) -> bool
Check if the entropy source requires initialization Read more
Auto Trait Implementations§
impl Freeze for HardwareEntropySource
impl RefUnwindSafe for HardwareEntropySource
impl Send for HardwareEntropySource
impl Sync for HardwareEntropySource
impl Unpin for HardwareEntropySource
impl UnsafeUnpin for HardwareEntropySource
impl UnwindSafe for HardwareEntropySource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more