Skip to main content

ChildPulse

Trait ChildPulse 

Source
pub trait ChildPulse: Pulse {
    // Required method
    fn finish(self: Box<Self>, outcome: Outcome) -> Result<(), PlanError>;

    // Provided methods
    fn complete_inferred(self: Box<Self>, outcome: Outcome) { ... }
    fn complete_as(self: Box<Self>, outcome: Outcome) { ... }
}
Expand description

What a pulse’s children add: publishing a terminal outcome.

Implement this for the type your Pulse::split returns, and wrap each child with Child::new. Library code never calls it directly; it calls Child::finish, which consumes the handle so a child is finished at most once.

Required Methods§

Source

fn finish(self: Box<Self>, outcome: Outcome) -> Result<(), PlanError>

Publish this child’s terminal outcome.

Provided Methods§

Source

fn complete_inferred(self: Box<Self>, outcome: Outcome)

Resolve an untouched phase from its enclosing result. The default uses ordinary completion; trackers can retain the inference as evidence.

Source

fn complete_as(self: Box<Self>, outcome: Outcome)

Complete best-effort observation. Trackers may infer untouched descendants from this result; the default preserves older implementors’ finish logic.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§