pub struct DagBuilder<CONTEXT: Send + Sync, ERROR: Error + Send + Sync, RESOURCE: Clone + Debug + DeserializeOwned + Resource<DynamicType = ()> + Send + Sync, TASK: Task<CONTEXT, ERROR, RESOURCE>>(/* private fields */);
Expand description
A DAG builder.
Implementations§
Source§impl<CONTEXT: Send + Sync, ERROR: Error + Send + Sync, RESOURCE: Clone + Debug + DeserializeOwned + Resource<DynamicType = ()> + Send + Sync, TASK: Task<CONTEXT, ERROR, RESOURCE>> DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT: Send + Sync, ERROR: Error + Send + Sync, RESOURCE: Clone + Debug + DeserializeOwned + Resource<DynamicType = ()> + Send + Sync, TASK: Task<CONTEXT, ERROR, RESOURCE>> DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
Sourcepub fn action(self, action: Action) -> Self
pub fn action(self, action: Action) -> Self
Define the final action of the DAG (when all tasks are completed).
Sourcepub fn requeue_delay(self, delay: Duration) -> Self
pub fn requeue_delay(self, delay: Duration) -> Self
Define the delay between two reconciliations.
Sourcepub fn start_with<TASKS: IntoIterator<Item = TASK>>(
self,
tasks: TASKS,
) -> DagBuilderThen<CONTEXT, ERROR, RESOURCE, TASK>
pub fn start_with<TASKS: IntoIterator<Item = TASK>>( self, tasks: TASKS, ) -> DagBuilderThen<CONTEXT, ERROR, RESOURCE, TASK>
Define the first group tasks to run. The tasks will be run asynchronously.
Trait Implementations§
Source§impl<CONTEXT: Default + Send + Sync, ERROR: Default + Error + Send + Sync, RESOURCE: Default + Clone + Debug + DeserializeOwned + Resource<DynamicType = ()> + Send + Sync, TASK: Default + Task<CONTEXT, ERROR, RESOURCE>> Default for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT: Default + Send + Sync, ERROR: Default + Error + Send + Sync, RESOURCE: Default + Clone + Debug + DeserializeOwned + Resource<DynamicType = ()> + Send + Sync, TASK: Default + Task<CONTEXT, ERROR, RESOURCE>> Default for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
Source§fn default() -> DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
fn default() -> DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<CONTEXT, ERROR, RESOURCE, TASK> Freeze for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT, ERROR, RESOURCE, TASK> RefUnwindSafe for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT, ERROR, RESOURCE, TASK> Send for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT, ERROR, RESOURCE, TASK> Sync for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT, ERROR, RESOURCE, TASK> Unpin for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
impl<CONTEXT, ERROR, RESOURCE, TASK> UnwindSafe for DagBuilder<CONTEXT, ERROR, RESOURCE, TASK>
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> 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