Input

Trait Input 

Source
pub trait Input {
    type Builder;

    // Required methods
    fn get_size(&self) -> usize;
    fn generate_input(size: usize, builder: &Self::Builder) -> Self;
}
Expand description

Trait that must be implemented by algorithms’ input types.

Required Associated Types§

Source

type Builder

The type of the builder. A builder can be used to select the type of generation for the inputs.

Required Methods§

Source

fn get_size(&self) -> usize

Returns the size of the input.

Source

fn generate_input(size: usize, builder: &Self::Builder) -> Self

Generates an input of the given size, using the given builder.

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§