pub struct TightenResourceQuota {
pub max_concurrent_subagents: Option<u32>,
pub max_total_subagents: Option<u32>,
pub max_spawn_depth: Option<u32>,
pub max_workflow_nodes: Option<u32>,
}Expand description
Quotas only ever shrink at runtime. Growing one is a reservation fact, not a policy patch, and needs its own contract before it exists.
Fields§
§max_concurrent_subagents: Option<u32>§max_total_subagents: Option<u32>§max_spawn_depth: Option<u32>§max_workflow_nodes: Option<u32>Implementations§
Source§impl TightenResourceQuota
impl TightenResourceQuota
Sourcepub fn tighten(
&self,
current: &ResourceQuota,
) -> Result<ResourceQuota, WireRejection>
pub fn tighten( &self, current: &ResourceQuota, ) -> Result<ResourceQuota, WireRejection>
Fold this patch onto the current quota, refusing any axis that would widen it.
“Uncapped ⇒ capped” is a tightening and is allowed; “capped ⇒ uncapped” is not expressible (an absent axis means unchanged here, not cleared), and a larger cap is refused outright rather than clamped — a silently clamped budget is a budget the host thinks it raised.
Trait Implementations§
Source§impl Clone for TightenResourceQuota
impl Clone for TightenResourceQuota
Source§fn clone(&self) -> TightenResourceQuota
fn clone(&self) -> TightenResourceQuota
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 TightenResourceQuota
impl Debug for TightenResourceQuota
Source§impl Default for TightenResourceQuota
impl Default for TightenResourceQuota
Source§fn default() -> TightenResourceQuota
fn default() -> TightenResourceQuota
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for TightenResourceQuota
impl<'de> Deserialize<'de> for TightenResourceQuota
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 TightenResourceQuota
impl PartialEq for TightenResourceQuota
Source§impl Serialize for TightenResourceQuota
impl Serialize for TightenResourceQuota
impl StructuralPartialEq for TightenResourceQuota
Auto Trait Implementations§
impl Freeze for TightenResourceQuota
impl RefUnwindSafe for TightenResourceQuota
impl Send for TightenResourceQuota
impl Sync for TightenResourceQuota
impl Unpin for TightenResourceQuota
impl UnsafeUnpin for TightenResourceQuota
impl UnwindSafe for TightenResourceQuota
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