pub struct SecRandom(/* private fields */);Expand description
A source of random data.
§Examples
let rng = apple_security_framework::random::SecRandom::default();
let mut buf = [0; 32];
rng.copy_bytes(&mut buf).unwrap();
println!("{}", hex::encode(buf));Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for SecRandom
impl RefUnwindSafe for SecRandom
impl Unpin for SecRandom
impl UnwindSafe for SecRandom
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