Skip to main content

Sequence

Trait Sequence 

Source
pub trait Sequence: Sized + 'static {
    type Req: 'static;
    type Rsp: 'static;

    // Required method
    fn body(
        &mut self,
        ctx: &mut SeqCtx<Self::Req, Self::Rsp>,
    ) -> impl Future<Output = Result<(), SeqError>>;

    // Provided methods
    fn seq_name(&self) -> &'static str { ... }
    fn start(
        &mut self,
        seqr: &Sequencer<Self::Req, Self::Rsp>,
    ) -> impl Future<Output = Result<(), SeqError>> { ... }
    fn start_virtual(&mut self) -> impl Future<Output = Result<(), SeqError>> { ... }
}
Expand description

A sequence: a program that produces stimulus.

Not a component — no place in the tree, no path, no phases. The request and response types are associated, not parameters, so that set_seq_override can pair two sequences without being told them again.

Required Associated Types§

Source

type Req: 'static

Source

type Rsp: 'static

Required Methods§

Source

fn body( &mut self, ctx: &mut SeqCtx<Self::Req, Self::Rsp>, ) -> impl Future<Output = Result<(), SeqError>>

Provided Methods§

Source

fn seq_name(&self) -> &'static str

The name this sequence logs under (D98). Defaults to the type name, so nobody is forced to invent a label; override it when a run has two of the same type to tell apart. For reading only — nothing is looked up by it.

Source

fn start( &mut self, seqr: &Sequencer<Self::Req, Self::Rsp>, ) -> impl Future<Output = Result<(), SeqError>>

Run this sequence on a sequencer, returning when it is done.

Source

fn start_virtual(&mut self) -> impl Future<Output = Result<(), SeqError>>

Run this sequence with no sequencer — a virtual sequence, which starts other sequences rather than sending items of its own. Calling start_item inside one is an error, as it is in pyuvm.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§