pub struct UnwrapErr<R: TryRngCore>(pub R);
Expand description
Wrapper around TryRngCore
implementation which implements RngCore
by panicking on potential errors.
Tuple Fields§
§0: R
Trait Implementations§
Source§impl<R: TryRngCore> RngCore for UnwrapErr<R>
impl<R: TryRngCore> RngCore for UnwrapErr<R>
impl<R: Copy + TryRngCore> Copy for UnwrapErr<R>
impl<R: TryCryptoRng> CryptoRng for UnwrapErr<R>
impl<R: Eq + TryRngCore> Eq for UnwrapErr<R>
impl<R: TryRngCore> StructuralPartialEq for UnwrapErr<R>
Auto Trait Implementations§
impl<R> Freeze for UnwrapErr<R>where
R: Freeze,
impl<R> RefUnwindSafe for UnwrapErr<R>where
R: RefUnwindSafe,
impl<R> Send for UnwrapErr<R>where
R: Send,
impl<R> Sync for UnwrapErr<R>where
R: Sync,
impl<R> Unpin for UnwrapErr<R>where
R: Unpin,
impl<R> UnwindSafe for UnwrapErr<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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<R> TryRngCore for Rwhere
R: RngCore,
impl<R> TryRngCore for Rwhere
R: RngCore,
Source§type Error = Infallible
type Error = Infallible
The type returned in the event of a RNG error.
Source§fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
fn try_next_u32(&mut self) -> Result<u32, <R as TryRngCore>::Error>
Return the next random
u32
.Source§fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
fn try_next_u64(&mut self) -> Result<u64, <R as TryRngCore>::Error>
Return the next random
u64
.Source§fn try_fill_bytes(
&mut self,
dst: &mut [u8],
) -> Result<(), <R as TryRngCore>::Error>
fn try_fill_bytes( &mut self, dst: &mut [u8], ) -> Result<(), <R as TryRngCore>::Error>
Fill
dest
entirely with random data.Source§fn read_adapter(&mut self) -> RngReadAdapter<'_, Self> ⓘwhere
Self: Sized,
fn read_adapter(&mut self) -> RngReadAdapter<'_, Self> ⓘwhere
Self: Sized,
Convert an
RngCore
to a RngReadAdapter
.