Rand0_6CompatExt

Trait Rand0_6CompatExt 

Source
pub trait Rand0_6CompatExt {
    // Provided methods
    fn compat(self) -> Rand0_6CompatWrapper<Self>
       where Self: Sized { ... }
    fn compat_by_ref(&mut self) -> Rand0_6CompatWrapper<&mut Self>
       where Self: Sized { ... }
}
Expand description

Compatibility extension trait for RNGs implementing 0.9 RngCore trait.

Provided Methods§

Source

fn compat(self) -> Rand0_6CompatWrapper<Self>
where Self: Sized,

Wraps self in a compatibility wrapper that implements 0.6 traits.

Source

fn compat_by_ref(&mut self) -> Rand0_6CompatWrapper<&mut Self>
where Self: Sized,

Wraps self in a compatibility wrapper that implements 0.6 traits.

Same as Rand0_6CompatExt::compat but instead of taking ownership it borrows.

Implementors§

Source§

impl<T> Rand0_6CompatExt for T
where T: TryRngCore + ?Sized,