pub struct DeferredNodeConfig {
pub merge_strategy: MergeStrategy,
pub fan_in_timeout: Option<Duration>,
pub min_predecessors: Option<usize>,
}Expand description
Configuration for a deferred (fan-in) node.
A deferred node waits for all upstream parallel paths to complete before executing. The configuration controls how outputs are merged and how long the node waits.
§Example
use std::time::Duration;
use adk_graph::deferred::{DeferredNodeConfig, MergeStrategy};
let config = DeferredNodeConfig {
merge_strategy: MergeStrategy::MergeMap,
fan_in_timeout: Some(Duration::from_secs(60)),
..Default::default()
};Fields§
§merge_strategy: MergeStrategyStrategy for combining upstream outputs.
fan_in_timeout: Option<Duration>Maximum time to wait for all upstream paths to complete.
None: Wait indefinitely for all upstream paths.Some(duration): If the timeout expires and some paths have completed, proceed with partial results. If zero paths have completed, returnGraphError::FanInTimedOut.
min_predecessors: Option<usize>How many predecessors must have arrived for fan_in_timeout to release
the node with partial results.
None means one, which is the behaviour this field replaced. Set it to
the full predecessor count to require all of them even after a timeout, or
to any value between for an n-of-m join: release once that many branches
have answered and abandon the rest.
Trait Implementations§
Source§impl Clone for DeferredNodeConfig
impl Clone for DeferredNodeConfig
Source§fn clone(&self) -> DeferredNodeConfig
fn clone(&self) -> DeferredNodeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeferredNodeConfig
impl Debug for DeferredNodeConfig
Source§impl Default for DeferredNodeConfig
impl Default for DeferredNodeConfig
Source§fn default() -> DeferredNodeConfig
fn default() -> DeferredNodeConfig
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for DeferredNodeConfig
impl !UnwindSafe for DeferredNodeConfig
impl Freeze for DeferredNodeConfig
impl Send for DeferredNodeConfig
impl Sync for DeferredNodeConfig
impl Unpin for DeferredNodeConfig
impl UnsafeUnpin for DeferredNodeConfig
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