Struct ratelimit_meter::example_algorithms::Allower [] [src]

pub struct Allower {}

The most naive implementation of a rate-limiter ever: Always allows every cell through.

Example

use ratelimit_meter::{Decider};
use ratelimit_meter::example_algorithms::Allower;
let mut allower = Allower::new();
assert!(allower.check().unwrap().is_compliant());

Methods

impl Allower
[src]

[src]

Trait Implementations

impl Copy for Allower
[src]

impl Clone for Allower
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more

impl DeciderImpl for Allower
[src]

Allower never returns a negative answer, so negative answers don't carry information.

[src]

Allows the cell through unconditionally.

impl Decider for Allower
[src]

[src]

Tests if a single cell can be accomodated at Instant::now(). See check_at. Read more

[src]

Tests is a single cell can be accomodated at the given time stamp. Read more