[][src]Struct framering::LinearCapacity

pub struct LinearCapacity {
    pub cap: usize,
}

Implementation of capacity which represents the capacity as usize. Does not support infinite addressing, and will panic if more than usize::MAX elements are inserted in a forward fashion (due to addition overflow).

LinearCapacity does not necessarily grow in a doubling fashion - if bulk addition requires more elements than a standard doubling, the FramedRing will expand to fit all of the elements instead.

Example

let mut ring = FramedRing::<i32, LinearCapacity>::with_capacity(LinearCapacity{cap: 9});
assert_eq!(ring.capacity(), 9);

Fields

cap: usize

Trait Implementations

impl Capacity for LinearCapacity[src]

type Baser = usize

type Masker = usize

impl Clone for LinearCapacity[src]

impl Copy for LinearCapacity[src]

impl Default for LinearCapacity[src]

Auto Trait Implementations

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> 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.