[][src]Enum framering::Pow2Capacity

pub enum Pow2Capacity {
    Zero,
    Pow2(usize),
}

Implementation of capacity which represents the capacity as a power of 2. Supports infinite addressing (will not eventually result in a panic, no matter how many elements are added over the lifetime of the FramedRing).

Example

let mut ring = FramedRing::<i32, Pow2Capacity>::with_capacity(Pow2Capacity::Pow2(4));
assert_eq!(ring.capacity(), 16);

Variants

Zero
Pow2(usize)

Trait Implementations

impl Capacity for Pow2Capacity[src]

type Baser = usize

type Masker = usize

impl Clone for Pow2Capacity[src]

impl Copy for Pow2Capacity[src]

impl Default for Pow2Capacity[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.