pub struct PlanBudget { /* private fields */ }Expand description
A bounded plan-step counter. Total executed steps can never exceed
max_steps — the anti-unbounded-loop guard (ADR 0068 §4).
Implementations§
Source§impl PlanBudget
impl PlanBudget
Sourcepub fn new(requested_steps: Option<usize>, cap: usize) -> PlanBudget
pub fn new(requested_steps: Option<usize>, cap: usize) -> PlanBudget
Build a budget from a per-query STEPS N request and the config cap.
The request is clamped so it can never exceed the cap.
Sourcepub fn executed_count(&self) -> usize
pub fn executed_count(&self) -> usize
How many steps have executed so far.
Sourcepub fn executed_steps(&self) -> &[PlanStep]
pub fn executed_steps(&self) -> &[PlanStep]
The executed steps, in order — surfaced to the audit row.
Trait Implementations§
Source§impl Clone for PlanBudget
impl Clone for PlanBudget
Source§fn clone(&self) -> PlanBudget
fn clone(&self) -> PlanBudget
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 moreAuto Trait Implementations§
impl Freeze for PlanBudget
impl RefUnwindSafe for PlanBudget
impl Send for PlanBudget
impl Sync for PlanBudget
impl Unpin for PlanBudget
impl UnsafeUnpin for PlanBudget
impl UnwindSafe for PlanBudget
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> 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 moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request