pub struct FanOutTask { /* private fields */ }Expand description
Composite task that executes multiple child tasks concurrently and aggregates results.
Implementations§
Source§impl FanOutTask
impl FanOutTask
Sourcepub fn new(id: impl Into<String>, children: Vec<Arc<dyn Task>>) -> Arc<Self>
pub fn new(id: impl Into<String>, children: Vec<Arc<dyn Task>>) -> Arc<Self>
Create a new FanOutTask with an explicit id and a list of child tasks.
Sourcepub fn with_prefix(self: Arc<Self>, prefix: impl Into<String>) -> Arc<Self>
pub fn with_prefix(self: Arc<Self>, prefix: impl Into<String>) -> Arc<Self>
Set a context prefix for storing aggregated child results.
Aggregation keys will be written as <prefix>.<child_id>.<field>.
Sourcepub fn with_next_action(self: Arc<Self>, next: NextAction) -> Arc<Self>
pub fn with_next_action(self: Arc<Self>, next: NextAction) -> Arc<Self>
Override the NextAction returned by the FanOutTask (default: Continue).
Trait Implementations§
Source§impl Clone for FanOutTask
impl Clone for FanOutTask
Source§fn clone(&self) -> FanOutTask
fn clone(&self) -> FanOutTask
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Task for FanOutTask
impl Task for FanOutTask
Auto Trait Implementations§
impl Freeze for FanOutTask
impl !RefUnwindSafe for FanOutTask
impl Send for FanOutTask
impl Sync for FanOutTask
impl Unpin for FanOutTask
impl !UnwindSafe for FanOutTask
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
Converts
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>
Converts
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