pub struct FanOutTransition { /* private fields */ }Expand description
A typed fan-out transition builder that must be connected to a join before it can run.
Build one with Transition::fan_out and add additional branch targets with
FanOutTransition::and. Each branch input is type-checked before the branch target is erased
for runtime scheduling.
Fan-out always represents a joined branch group. True unjoined fan-out with multiple independent task endings is not supported; model that shape by sending each branch to a join node and finishing from the join node.
Implementations§
Source§impl FanOutTransition
impl FanOutTransition
Sourcepub fn and<T, Input>(self, node_id: &NodeId<T>, context: Input) -> Self
pub fn and<T, Input>(self, node_id: &NodeId<T>, context: Input) -> Self
Adds another typed branch target to this fan-out.
The branch input must convert into the target node’s input type.
Sourcepub fn join_with<J>(self, join_target: J) -> Transitionwhere
J: JoinDestination,
pub fn join_with<J>(self, join_target: J) -> Transitionwhere
J: JoinDestination,
Attaches every branch from this fan-out to the provided join target.
This defines the branch group and the join node that waits for every branch in that group. Each branch still needs its own registered transition to the same join target when it is ready to contribute its output. If branches are conceptually terminal, register each branch to transition to this join target and finish from the join node.
Sourcepub fn concurrency_model(self, concurrency_model: ConcurrencyModel) -> Self
pub fn concurrency_model(self, concurrency_model: ConcurrencyModel) -> Self
Overrides the concurrency model for work scheduled by this fan-out.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for FanOutTransition
impl !UnwindSafe for FanOutTransition
impl Forget for FanOutTransition
impl Freeze for FanOutTransition
impl Send for FanOutTransition
impl Sync for FanOutTransition
impl Unpin for FanOutTransition
impl UnsafeUnpin for FanOutTransition
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more