Trait soroban_sdk::prng::GenLen

source ·
pub trait GenLen {
    type Len;

    // Required method
    fn gen_len(prng: &Prng, len: Self::Len) -> Self;
}
Expand description

Implemented by types that support being generated of specific length by a Prng.

Required Associated Types§

Required Methods§

source

fn gen_len(prng: &Prng, len: Self::Len) -> Self

Generates a value of the given implementing type with length with the Prng.

Panics

If the length is greater than u32::MAX.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl GenLen for Bytes

§

type Len = u32