#[non_exhaustive]pub struct ResourceLimits {
pub max_concurrent_nodes: usize,
pub max_execution_records: usize,
pub max_checkpoint_bytes: usize,
pub max_dag_nodes: usize,
pub max_sequential_steps: usize,
}Expand description
Configurable resource boundaries for graph execution.
Provides hard limits on concurrency, memory usage, and cardinality to prevent unbounded resource consumption in production.
§Defaults
All defaults are generous enough for typical workloads:
- 64 concurrent DAG nodes
- 10,000 execution history records
- 10 MB max checkpoint payload
- 10,000 max DAG nodes
- 1,000 max sequential steps (loop protection)
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.max_concurrent_nodes: usizeMaximum concurrent nodes in a DAG wave (default: 64).
max_execution_records: usizeMaximum execution history records retained in memory (default: 10,000).
max_checkpoint_bytes: usizeMaximum checkpoint payload size in bytes (default: 10 MB).
max_dag_nodes: usizeMaximum DAG nodes allowed (default: 10,000).
max_sequential_steps: usizeMaximum sequential steps before aborting (default: 1,000). Prevents infinite loops when conditional edges create cycles.
Implementations§
Source§impl ResourceLimits
impl ResourceLimits
Sourcepub fn with_max_concurrent_nodes(self, n: usize) -> Self
pub fn with_max_concurrent_nodes(self, n: usize) -> Self
Set the maximum concurrent nodes in a DAG wave.
Sourcepub fn with_max_execution_records(self, n: usize) -> Self
pub fn with_max_execution_records(self, n: usize) -> Self
Set the maximum execution history records.
Sourcepub fn with_max_checkpoint_bytes(self, n: usize) -> Self
pub fn with_max_checkpoint_bytes(self, n: usize) -> Self
Set the maximum checkpoint payload size in bytes.
Sourcepub fn with_max_dag_nodes(self, n: usize) -> Self
pub fn with_max_dag_nodes(self, n: usize) -> Self
Set the maximum DAG nodes allowed.
Sourcepub fn with_max_sequential_steps(self, n: usize) -> Self
pub fn with_max_sequential_steps(self, n: usize) -> Self
Set the maximum sequential steps before aborting. Prevents infinite loops when conditional edges create cycles.
Trait Implementations§
Source§impl Clone for ResourceLimits
impl Clone for ResourceLimits
Source§fn clone(&self) -> ResourceLimits
fn clone(&self) -> ResourceLimits
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ResourceLimits
impl Debug for ResourceLimits
Auto Trait Implementations§
impl Freeze for ResourceLimits
impl RefUnwindSafe for ResourceLimits
impl Send for ResourceLimits
impl Sync for ResourceLimits
impl Unpin for ResourceLimits
impl UnsafeUnpin for ResourceLimits
impl UnwindSafe for ResourceLimits
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> 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>
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