pub trait InvocationBudgetProvider:
Send
+ Sync
+ 'static {
// Required method
fn remaining(
&self,
context: InvocationBudgetContext,
) -> BoxFuture<'_, Result<BudgetRemaining, InvocationBudgetProviderError>>;
}Expand description
Trusted admission/accounting source for exact remaining run capacity.
Implementations load the immutable resolved budget and cumulative durable
DIRECT-only usage by provenance, recheck the intent/attempt admission policy, and
return a finite BudgetRemaining evaluated at observed_at. The executor
never accepts a caller-authored remaining-budget value directly. The executor
deducts verified child subtree charges exactly once, then binds their account
digest to the durable start transaction. Providers must not include children.
Required Methods§
Sourcefn remaining(
&self,
context: InvocationBudgetContext,
) -> BoxFuture<'_, Result<BudgetRemaining, InvocationBudgetProviderError>>
fn remaining( &self, context: InvocationBudgetContext, ) -> BoxFuture<'_, Result<BudgetRemaining, InvocationBudgetProviderError>>
Resolves exact remaining capacity before a durable attempt start.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".