pub trait Protocol {
type Op;
type Event;
type Expect: Copy;
// Required methods
fn expand(&self, op: Self::Op) -> Vec<Step<Self::Expect>>;
fn on_message(
&self,
msg: &[u8],
expect: Self::Expect,
what: &'static str,
index: Option<u16>,
) -> Outcome<Self::Event>;
fn progress(done: usize, total: usize) -> Self::Event;
fn done() -> Self::Event;
fn failed(e: OpError) -> Self::Event;
}Expand description
A synth’s request/reply rules.
Required Associated Types§
Sourcetype Expect: Copy
type Expect: Copy
What a step waits for; see Step::expect.
Required Methods§
Sourcefn expand(&self, op: Self::Op) -> Vec<Step<Self::Expect>>
fn expand(&self, op: Self::Op) -> Vec<Step<Self::Expect>>
The steps that make up op, in the order the engine sends them.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".