Skip to main content

TerminationTarget

Trait TerminationTarget 

Source
pub trait TerminationTarget<A: Address>: Copy {
    type Report;
    type Request: InterpreterRequest<ReturnToEmitter = ReturnsToEmitter<Self::Report, Here>>;

    // Required methods
    fn request(self) -> Self::Request;
    fn matches(self, report: &Self::Report) -> bool;
    fn outcome(report: Self::Report) -> TerminalOutcome<A>;
}
Expand description

A statically selected source of one authoritative terminal report.

Implementations identify both the interpreter request and the exact report returned to this composition. This keeps owned-child and known-peer selection concrete without a runtime target enum or topology lookup.

Required Associated Types§

Required Methods§

Source

fn request(self) -> Self::Request

Source

fn matches(self, report: &Self::Report) -> bool

Source

fn outcome(report: Self::Report) -> TerminalOutcome<A>

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.

Implementors§

Source§

impl<A> TerminationTarget<A> for PeerTermination<A>
where A: Address + Copy + Eq,

Source§

impl<P, Occurrence> TerminationTarget<<P as Protocol>::Addr> for ChildTermination<P, Occurrence>
where P: Protocol,