Trait rand::rng::Fill

source ·
pub trait Fill {
    // Required method
    fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>;
}
Expand description

Types which may be filled with random data

This trait allows arrays to be efficiently filled with random data.

Implementations are expected to be portable across machines unless clearly documented otherwise (see the Chapter on Portability).

Required Methods§

source

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

Fill self with random data

Object Safety§

This trait is not object safe.

Implementations on Foreign Types§

source§

impl Fill for [bool]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [char]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [f32]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [f64]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [i8]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [i16]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [i32]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [i64]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [i128]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [isize]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [u8]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [u16]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [u32]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [u64]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [u128]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [usize]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<i8>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<i16>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<i32>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<i64>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<i128>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<isize>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<u16>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<u32>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<u64>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<u128>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl Fill for [Wrapping<usize>]

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 0]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 1]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 2]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 3]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 4]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 5]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 6]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 7]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 8]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 9]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 10]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 11]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 12]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 13]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 14]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 15]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 16]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 17]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 18]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 19]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 20]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 21]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 22]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 23]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 24]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 25]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 26]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 27]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 28]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 29]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 30]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 31]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 32]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 64]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 128]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 256]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 512]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 1024]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 2048]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

source§

impl<T> Fill for [T; 4096]
where [T]: Fill,

source§

fn try_fill<R: Rng + ?Sized>(&mut self, rng: &mut R) -> Result<(), Error>

Implementors§