pub struct RngCompat<R>(pub R);Expand description
Compatability wrapper between rand_core 0.9 and rand_core 0.6.
This implements the rand_core_0_6::RngCore and
rand_core_0_6::CryptoRng for any version 0.9 RNG that implements the
corresponding traits.
Tuple Fields§
§0: RTrait Implementations§
Source§impl<R: RngCore> RngCore for RngCompat<R>
impl<R: RngCore> RngCore for RngCompat<R>
Source§fn fill_bytes(&mut self, dest: &mut [u8])
fn fill_bytes(&mut self, dest: &mut [u8])
Fill
dest with random data. Read moreimpl<R: CryptoRng> CryptoRng for RngCompat<R>
Auto Trait Implementations§
impl<R> Freeze for RngCompat<R>where
R: Freeze,
impl<R> RefUnwindSafe for RngCompat<R>where
R: RefUnwindSafe,
impl<R> Send for RngCompat<R>where
R: Send,
impl<R> Sync for RngCompat<R>where
R: Sync,
impl<R> Unpin for RngCompat<R>where
R: Unpin,
impl<R> UnwindSafe for RngCompat<R>where
R: UnwindSafe,
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.