Skip to main content

DynSequence

Trait DynSequence 

Source
pub trait DynSequence<REQ: 'static, RSP: 'static> {
    // Required methods
    fn dyn_body<'a>(
        &'a mut self,
        ctx: &'a mut SeqCtx<REQ, RSP>,
    ) -> Pin<Box<dyn Future<Output = Result<(), SeqError>> + 'a>>;
    fn dyn_name(&self) -> &'static str;
}
Expand description

Dyn-safe mirror of Sequence, so a factory-created sequence can be held in a variable. The same treatment Component::run needed (D48/D55).

Required Methods§

Source

fn dyn_body<'a>( &'a mut self, ctx: &'a mut SeqCtx<REQ, RSP>, ) -> Pin<Box<dyn Future<Output = Result<(), SeqError>> + 'a>>

Source

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

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§

Source§

impl<S: Sequence> DynSequence<<S as Sequence>::Req, <S as Sequence>::Rsp> for S