Enum ratelimit_meter::Decision [] [src]

pub enum Decision<T> {
    Yes,
    No(T),
}

A decision on a single cell from the metered rate-limiter.

Variants

The cell is conforming, allow it through.

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]

[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]

[src]

This method tests for self and other values to be equal, and is used by ==. Read more

[src]

This method tests for !=.

impl<T: Debug> Debug for Decision<T>
[src]

[src]

Formats the value using the given formatter.