pub struct OsRng;Expand description
Default RngProvider — delegates to getrandom and therefore to the
OS’s CSPRNG on every supported target.
Zero-sized; cheap to construct. Hold a single instance per session (or
wrap in Arc<dyn RngProvider> if you need to swap providers).
Implementations§
Trait Implementations§
impl Copy for OsRng
Auto Trait Implementations§
impl Freeze for OsRng
impl RefUnwindSafe for OsRng
impl Send for OsRng
impl Sync for OsRng
impl Unpin for OsRng
impl UnsafeUnpin for OsRng
impl UnwindSafe for OsRng
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