Trait RandomElem

Source
pub trait RandomElem {
    type Output;

    // Required method
    fn random() -> Self::Output;
}
Expand description

Struct can be generated randomly

Required Associated Types§

Source

type Output

The type that implements this trait

Required Methods§

Source

fn random() -> Self::Output

Return a randomly generated type

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§