Skip to main content

DrawStream

Trait DrawStream 

Source
pub trait DrawStream: Send + Debug {
    // Required method
    fn draw(
        &mut self,
        op: StdOp,
        args: &[Value],
        ctx: Ctx,
    ) -> Result<Value, Error>;
}
Expand description

A random stream in use: the startup stream, or one expanded state’s.

Required Methods§

Source

fn draw(&mut self, op: StdOp, args: &[Value], ctx: Ctx) -> Result<Value, Error>

Applies the random operator op to args, drawing from the stream.

§Errors

TLC’s evaluation error of the operator, or a refusal.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§