[−][src]Struct buf_rand::BufRand
used to generate random booleans using a bit buffer
Implementations
impl BufRand[src]
pub fn new(rand: Box<dyn RngCore>) -> Self[src]
create a new BufRand which generates random booleans using the supplied rng
pub fn next_bool(&mut self) -> bool[src]
returns a random boolean from the buffer of this BufRand
pub fn rand_char_case(&mut self, c: &char) -> Option<char>[src]
randomizes the capitalization of a char
returns None in case the changed character is empty
pub fn rand_string_case(&mut self, s: &str) -> String[src]
randomizes the capitalization of every character in the string
Methods from Deref<Target = Box<dyn RngCore>>
Trait Implementations
impl Deref for BufRand[src]
type Target = Box<dyn RngCore>
The resulting type after dereferencing.
fn deref(&self) -> &Self::Target[src]
allows borrowing the randomizer this BufRand uses
impl DerefMut for BufRand[src]
Auto Trait Implementations
impl !RefUnwindSafe for BufRand
impl !Send for BufRand
impl !Sync for BufRand
impl Unpin for BufRand
impl !UnwindSafe for BufRand
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,