Struct CryptoRng
pub struct CryptoRng { /* private fields */ }
Available on crate features
random
and csprng
only.Expand description
The OS provided cryptographically secure random number generator.
Such an RNG can be requested by any component, and will always be seeded appropriately.
Trait Implementations§
§impl RngCore for CryptoRng
impl RngCore for CryptoRng
§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill
dest
with random data. Read moreimpl CryptoRng for CryptoRng
Auto Trait Implementations§
impl Freeze for CryptoRng
impl RefUnwindSafe for CryptoRng
impl !Send for CryptoRng
impl !Sync for CryptoRng
impl Unpin for CryptoRng
impl UnwindSafe for CryptoRng
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
Source§impl<T> CryptoRngCore for T
impl<T> CryptoRngCore for T
Source§fn as_rngcore(&mut self) -> &mut dyn RngCore
fn as_rngcore(&mut self) -> &mut dyn RngCore
Upcast to an
RngCore
trait object.