Struct raft::Inflights[][src]

pub struct Inflights { /* fields omitted */ }

A buffer of inflight messages.

Implementations

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]

impl Debug for Inflights[src]

impl PartialEq<Inflights> for Inflights[src]

impl StructuralPartialEq for Inflights[src]

Auto Trait Implementations

impl RefUnwindSafe for Inflights

impl Send for Inflights

impl Sync for Inflights

impl Unpin for Inflights

impl UnwindSafe for Inflights

Blanket Implementations

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

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]