pub struct NoopBudgetGuard;Expand description
Default implementation that always allows everything. Used when no host-supplied guard is configured.
Trait Implementations§
Source§impl BudgetGuard for NoopBudgetGuard
impl BudgetGuard for NoopBudgetGuard
Source§fn check_before_llm<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
estimated_prompt_tokens: usize,
) -> Pin<Box<dyn Future<Output = BudgetDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn check_before_llm<'life0, 'life1, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
estimated_prompt_tokens: usize,
) -> Pin<Box<dyn Future<Output = BudgetDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Called immediately before an LLM API call. Read more
Source§fn record_after_llm<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
usage: &'life2 TokenUsage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn record_after_llm<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
usage: &'life2 TokenUsage,
) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called after every successful LLM call with the actual usage
reported by the provider. Lets the impl keep its running spend
total in sync with reality. Read more
Source§fn check_before_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
tool_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = BudgetDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn check_before_tool<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
session_id: &'life1 str,
tool_name: &'life2 str,
) -> Pin<Box<dyn Future<Output = BudgetDecision> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Called immediately before a tool invocation. The framework does
not pass tool arguments — impls that need argument-aware caps
must wrap the executor via a custom
ToolExecutor.Source§impl Clone for NoopBudgetGuard
impl Clone for NoopBudgetGuard
Source§fn clone(&self) -> NoopBudgetGuard
fn clone(&self) -> NoopBudgetGuard
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 NoopBudgetGuard
impl Debug for NoopBudgetGuard
Source§impl Default for NoopBudgetGuard
impl Default for NoopBudgetGuard
Source§fn default() -> NoopBudgetGuard
fn default() -> NoopBudgetGuard
Returns the “default value” for a type. Read more
impl Copy for NoopBudgetGuard
Auto Trait Implementations§
impl Freeze for NoopBudgetGuard
impl RefUnwindSafe for NoopBudgetGuard
impl Send for NoopBudgetGuard
impl Sync for NoopBudgetGuard
impl Unpin for NoopBudgetGuard
impl UnsafeUnpin for NoopBudgetGuard
impl UnwindSafe for NoopBudgetGuard
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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