Skip to main content

ModeledSource

Trait ModeledSource 

Source
pub trait ModeledSource {
    type Sample: DeviceSample;

    // Required method
    fn at(&self, index: u64) -> Self::Sample;
}
Expand description

A deterministic sample source driven entirely by an integer index.

Implementations must not read clocks, random sources, hardware, network, or process state. The same source and index must always produce the same sample.

Required Associated Types§

Source

type Sample: DeviceSample

Sample type emitted by the source.

Required Methods§

Source

fn at(&self, index: u64) -> Self::Sample

Returns the sample for index.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§