Enum ratelimit_meter::Decision
[−]
[src]
pub enum Decision<T> { Yes, No(T), }
A decision on a single cell from the metered rate-limiter.
Variants
Yes
The cell is conforming, allow it through.
No(T)
The cell is non-conforming. A rate-limiting algorithm implementation may return additional information for the caller, e.g. a time when the cell was expected to arrive.
Methods
impl<T> Decision<T>
[src]
fn is_compliant(&self) -> bool
[src]
Check if a decision on a cell indicates the cell is compliant
or not. Returns true
iff the cell was compliant, i.e. the
decision was Decision::Yes
.
Note: This method is mostly useful in tests.
Trait Implementations
impl<T: PartialEq> PartialEq for Decision<T>
[src]
fn eq(&self, __arg_0: &Decision<T>) -> bool
[src]
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Decision<T>) -> bool
[src]
This method tests for !=
.