pub struct BudgetExceededReason {
pub byte_count: usize,
pub budget_remaining: usize,
}Expand description
Failure case returned by Engine::try_charge when admitting
byte_count more bytes against ingress_byte_budget would
exceed the cap. budget_remaining is the cap minus the live
ingress_bytes_in_flight at the time of the rejection — the
caller embeds both into the resulting WireReceiveError or
AppIngressError so subscribers see the magnitude of the
rejection without re-querying the engine.
Fields§
§byte_count: usizeBytes the caller tried to admit.
budget_remaining: usizeBytes still available under ingress_byte_budget at the time
of the rejection.
Trait Implementations§
Source§impl Clone for BudgetExceededReason
impl Clone for BudgetExceededReason
Source§fn clone(&self) -> BudgetExceededReason
fn clone(&self) -> BudgetExceededReason
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 moreimpl Copy for BudgetExceededReason
Source§impl Debug for BudgetExceededReason
impl Debug for BudgetExceededReason
impl Eq for BudgetExceededReason
Source§impl PartialEq for BudgetExceededReason
impl PartialEq for BudgetExceededReason
Source§fn eq(&self, other: &BudgetExceededReason) -> bool
fn eq(&self, other: &BudgetExceededReason) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for BudgetExceededReason
Auto Trait Implementations§
impl Freeze for BudgetExceededReason
impl RefUnwindSafe for BudgetExceededReason
impl Send for BudgetExceededReason
impl Sync for BudgetExceededReason
impl Unpin for BudgetExceededReason
impl UnsafeUnpin for BudgetExceededReason
impl UnwindSafe for BudgetExceededReason
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