soroban_sdk::prng

Trait Fill

Source
pub trait Fill {
    // Required method
    fn fill(&mut self, prng: &Prng);
}
Expand description

Implemented by types that support being filled by a Prng.

Required Methods§

Source

fn fill(&mut self, prng: &Prng)

Fills the given value with the Prng.

Implementations on Foreign Types§

Source§

impl Fill for u64

Source§

fn fill(&mut self, prng: &Prng)

Source§

impl Fill for [u8]

Source§

fn fill(&mut self, prng: &Prng)

Fills the slice with the Prng.

§Panics

If the slice is greater than u32::MAX in length.

Source§

impl<const N: usize> Fill for [u8; N]

Source§

fn fill(&mut self, prng: &Prng)

Fills the array with the Prng.

§Panics

If the array is greater than u32::MAX in length.

Implementors§

Source§

impl Fill for Bytes

Source§

impl<const N: usize> Fill for BytesN<N>