pub struct OsSecureRandom;Expand description
SecureRandom implementation backed by the operating system’s CSPRNG.
Trait Implementations§
Source§impl Default for OsSecureRandom
impl Default for OsSecureRandom
Source§fn default() -> OsSecureRandom
fn default() -> OsSecureRandom
Returns the “default value” for a type. Read more
Source§impl SecureRandom for OsSecureRandom
impl SecureRandom for OsSecureRandom
Source§fn fill_secure(
&mut self,
output: &mut [u8],
kind: RngOutputKind,
) -> Result<(), CryptoError>
fn fill_secure( &mut self, output: &mut [u8], kind: RngOutputKind, ) -> Result<(), CryptoError>
Fills
output with secure random bytes, tagging any error with kind.
Returns an error if entropy is unavailable.Auto Trait Implementations§
impl Freeze for OsSecureRandom
impl RefUnwindSafe for OsSecureRandom
impl Send for OsSecureRandom
impl Sync for OsSecureRandom
impl Unpin for OsSecureRandom
impl UnsafeUnpin for OsSecureRandom
impl UnwindSafe for OsSecureRandom
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