pub struct PushedRules {
pub etag: Option<String>,
pub budget: BudgetSpec,
pub budget_policies: Vec<String>,
pub allowlists: Vec<PushedAllowlist>,
pub schemas: Vec<PushedSchema>,
}Expand description
Everything the daemon applied from one console bundle.
Fields§
§etag: Option<String>The bundle etag these rules came from; None before any bundle.
budget: BudgetSpecPushed budget caps (merged with the local budget, stricter wins).
budget_policies: Vec<String>Console names of the budget policies merged into budget.
allowlists: Vec<PushedAllowlist>Pushed allowlist rules.
schemas: Vec<PushedSchema>Pushed argument schemas.
Implementations§
Source§impl PushedRules
impl PushedRules
Sourcepub fn budget_policy_for(
&self,
local: &BudgetSpec,
limit: &str,
cap: u64,
) -> Option<String>
pub fn budget_policy_for( &self, local: &BudgetSpec, limit: &str, cap: u64, ) -> Option<String>
Which pushed budget policy set the cap a refusal hit, when the
binding cap came from the console rather than the local config.
limit is the refusal’s limit name (max_tokens,
max_tool_calls.db_write, …).
Trait Implementations§
Source§impl Debug for PushedRules
impl Debug for PushedRules
Source§impl Default for PushedRules
impl Default for PushedRules
Source§fn default() -> PushedRules
fn default() -> PushedRules
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PushedRules
impl !RefUnwindSafe for PushedRules
impl Send for PushedRules
impl Sync for PushedRules
impl Unpin for PushedRules
impl UnsafeUnpin for PushedRules
impl !UnwindSafe for PushedRules
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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