Struct governor::middleware::StateSnapshot
source · pub struct StateSnapshot { /* private fields */ }
Expand description
Information about the rate-limiting state used to reach a decision.
Implementations§
source§impl StateSnapshot
impl StateSnapshot
sourcepub fn remaining_burst_capacity(&self) -> u32
pub fn remaining_burst_capacity(&self) -> u32
Returns the number of cells that can be let through in addition to a (possible) positive outcome.
If this state snapshot is based on a negative rate limiting outcome, this method returns 0.
Trait Implementations§
source§impl Clone for StateSnapshot
impl Clone for StateSnapshot
source§fn clone(&self) -> StateSnapshot
fn clone(&self) -> StateSnapshot
Returns a copy of the value. Read more
1.0.0 · 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 StateSnapshot
impl Debug for StateSnapshot
source§impl PartialEq for StateSnapshot
impl PartialEq for StateSnapshot
source§fn eq(&self, other: &StateSnapshot) -> bool
fn eq(&self, other: &StateSnapshot) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for StateSnapshot
impl StructuralPartialEq for StateSnapshot
Auto Trait Implementations§
impl Freeze for StateSnapshot
impl RefUnwindSafe for StateSnapshot
impl Send for StateSnapshot
impl Sync for StateSnapshot
impl Unpin for StateSnapshot
impl UnwindSafe for StateSnapshot
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§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)