[][src]Struct raft::Inflights

pub struct Inflights { /* fields omitted */ }

A buffer of inflight messages.

Methods

impl Inflights[src]

pub fn new(cap: usize) -> Inflights[src]

Creates a new buffer for inflight messages.

pub fn full(&self) -> bool[src]

Returns true if the inflights is full.

pub fn cap(&self) -> usize[src]

The buffer capacity.

pub fn add(&mut self, inflight: u64)[src]

Adds an inflight into inflights

pub fn free_to(&mut self, to: u64)[src]

Frees the inflights smaller or equal to the given to flight.

pub fn free_first_one(&mut self)[src]

Frees the first buffer entry.

pub fn reset(&mut self)[src]

Frees all inflights.

Trait Implementations

impl Clone for Inflights[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl PartialEq<Inflights> for Inflights[src]

impl Debug for Inflights[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> SendSyncUnwindSafe for T where
    T: Send + Sync + UnwindSafe + ?Sized
[src]

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,