pub struct SystemRandom;Expand description
Production randomness backed by the platform CSPRNG via getrandom.
On WASM/Workers this delegates to crypto.getRandomValues (matching the
source service’s RNG path).
Implementations§
Source§impl SystemRandom
impl SystemRandom
Trait Implementations§
Source§impl Clone for SystemRandom
impl Clone for SystemRandom
Source§fn clone(&self) -> SystemRandom
fn clone(&self) -> SystemRandom
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 moreimpl Copy for SystemRandom
Source§impl Debug for SystemRandom
impl Debug for SystemRandom
Source§impl Default for SystemRandom
impl Default for SystemRandom
Source§fn default() -> SystemRandom
fn default() -> SystemRandom
Returns the “default value” for a type. Read more
Source§impl RandomSource for SystemRandom
impl RandomSource for SystemRandom
Source§fn fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), RandomError>
fn fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), RandomError>
Fill
dest entirely with secure random bytes, or fail. Read moreAuto Trait Implementations§
impl Freeze for SystemRandom
impl RefUnwindSafe for SystemRandom
impl Send for SystemRandom
impl Sync for SystemRandom
impl Unpin for SystemRandom
impl UnsafeUnpin for SystemRandom
impl UnwindSafe for SystemRandom
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