Skip to main content

LoopOutput

Trait LoopOutput 

Source
pub trait LoopOutput {
    type Inner;
}
Expand description

Helper trait to extract the inner type from a LoopResult<T>.

Used by the workflow! macro to resolve the output type of a loop node: the loop body returns LoopResult<T> but the loop itself outputs T.

use sayiir_core::loop_result::{LoopResult, LoopOutput};

// <LoopResult<u32> as LoopOutput>::Inner == u32
fn assert_inner<T: LoopOutput<Inner = u32>>() {}
assert_inner::<LoopResult<u32>>();

Required Associated Types§

Source

type Inner

The inner type after unwrapping the LoopResult envelope.

Implementors§