pub trait DemuxEnumPush<Outputs, Meta: Copy>: DemuxEnumBase {
type Ctx<'ctx>: Context<'ctx>;
type CanPend: Toggle;
// Required methods
fn poll_ready(
outputs: &mut Outputs,
ctx: &mut Self::Ctx<'_>,
) -> PushStep<Self::CanPend>;
fn start_send(self, meta: Meta, outputs: &mut Outputs);
fn poll_flush(
outputs: &mut Outputs,
ctx: &mut Self::Ctx<'_>,
) -> PushStep<Self::CanPend>;
}Available on crate feature
dfir_macro only.Expand description
Trait for use with the demux_enum operator (Push-based version).
This trait is meant to be derived: #[derive(DemuxEnum)].
The derive will implement this such that Outputs can be any tuple where each item is a
Push that corresponds to each of the variants of the tuple, in alphabetic order.
Required Associated Types§
Required Methods§
Sourcefn poll_ready(
outputs: &mut Outputs,
ctx: &mut Self::Ctx<'_>,
) -> PushStep<Self::CanPend>
fn poll_ready( outputs: &mut Outputs, ctx: &mut Self::Ctx<'_>, ) -> PushStep<Self::CanPend>
Poll readiness of all output pushes.
Sourcefn start_send(self, meta: Meta, outputs: &mut Outputs)
fn start_send(self, meta: Meta, outputs: &mut Outputs)
Pushes self into the corresponding output push in outputs.
Sourcefn poll_flush(
outputs: &mut Outputs,
ctx: &mut Self::Ctx<'_>,
) -> PushStep<Self::CanPend>
fn poll_flush( outputs: &mut Outputs, ctx: &mut Self::Ctx<'_>, ) -> PushStep<Self::CanPend>
Flushes all output pushes.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.