pub struct BudgetLimits {
pub max_input_tokens: Option<u64>,
pub max_output_tokens: Option<u64>,
pub max_total_tokens: Option<u64>,
pub max_cost_usd: Option<f64>,
pub max_agents: Option<u32>,
}Expand description
Caps on what a single coordination run may consume.
Every field is optional; None means “no limit on this dimension”. A
BudgetLimits with all fields None is unbounded and imposes no overhead.
Fields§
§max_input_tokens: Option<u64>Cap on cumulative reported input (prompt) tokens.
max_output_tokens: Option<u64>Cap on cumulative reported output (completion) tokens.
max_total_tokens: Option<u64>Cap on cumulative reported input + output tokens.
max_cost_usd: Option<f64>Cap on cumulative reported cost in US dollars.
max_agents: Option<u32>Hard cap on the number of agents started, regardless of token spend.
Implementations§
Source§impl BudgetLimits
impl BudgetLimits
Sourcepub fn is_unbounded(&self) -> bool
pub fn is_unbounded(&self) -> bool
True when no dimension is constrained — the budget is a no-op.
Trait Implementations§
Source§impl Clone for BudgetLimits
impl Clone for BudgetLimits
Source§impl Debug for BudgetLimits
impl Debug for BudgetLimits
Source§impl Default for BudgetLimits
impl Default for BudgetLimits
Source§impl<'de> Deserialize<'de> for BudgetLimits
impl<'de> Deserialize<'de> for BudgetLimits
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for BudgetLimits
impl PartialEq for BudgetLimits
Source§impl Serialize for BudgetLimits
impl Serialize for BudgetLimits
impl StructuralPartialEq for BudgetLimits
Auto Trait Implementations§
impl Freeze for BudgetLimits
impl RefUnwindSafe for BudgetLimits
impl Send for BudgetLimits
impl Sync for BudgetLimits
impl Unpin for BudgetLimits
impl UnsafeUnpin for BudgetLimits
impl UnwindSafe for BudgetLimits
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
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
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