Trait arbitrary::Unstructured[][src]

pub trait Unstructured {
    type Error;
    fn fill_buffer(&mut self, buffer: &mut [u8]) -> Result<(), Self::Error>;

    fn container_size(&mut self) -> Result<usize, Self::Error> { ... }
}

Unstructured data from which structured Arbitrary data shall be generated.

This could be a random number generator, a static ring buffer of bytes or some such.

Associated Types

The error type for Unstructured, see implementations for details

Required Methods

Fill a buffer with bytes, forming the unstructured data from which Arbitrary structured data shall be generated.

This operation is fallible to allow implementations based on e.g. I/O.

Provided Methods

Generate a size for container.

e.g. number of elements in a vector

Implementors