Struct uell::Uell[][src]

pub struct Uell<'b, T> { /* fields omitted */ }
Expand description

An unrolled exponential linked list.

An append-only container, that can be useful in case reallocating memory can be inefficient.

It is backed by a bumpalo allocator where reallocating memory means wasting memory, as bumpalo cannot reuse freed memory.

Implementations

impl<'b, T: Copy + Default> Uell<'b, T>[src]

pub fn new_in(bump: &'b Bump) -> Uell<'_, T>[src]

Constructs a new, empty Uell<'bump, T>.

The unrolled exponential linked list will not allocate until elements are pushed onto it.

pub fn from_iter_in<I>(iter: I, bump: &'b Bump) -> Uell<'_, T> where
    I: IntoIterator<Item = T>, 
[src]

Construct a new Uell<'bump, T> from the given iterator’s items.

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

Returns the number of elements in the linked list, also referred to as its ‘length’.

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

Returns true if the linked list contains no elements.

pub fn push(&mut self, elem: T)[src]

Appends an element to the back of the collection.

Trait Implementations

impl<'b, T> Drop for Uell<'b, T>[src]

fn drop(&mut self)[src]

Executes the destructor for this type. Read more

impl<'b, T: 'b + Copy> IntoIterator for Uell<'b, T>[src]

type Item = T

The type of the elements being iterated over.

type IntoIter = IntoIter<'b, T>

Which kind of iterator are we turning this into?

fn into_iter(self) -> Self::IntoIter[src]

Creates an iterator from a value. Read more

Auto Trait Implementations

impl<'b, T> !RefUnwindSafe for Uell<'b, T>

impl<'b, T> !Send for Uell<'b, T>

impl<'b, T> !Sync for Uell<'b, T>

impl<'b, T> Unpin for Uell<'b, T> where
    T: Unpin

impl<'b, T> !UnwindSafe for Uell<'b, T>

Blanket Implementations

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

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

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

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

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

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

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

pub fn from(t: T) -> T[src]

Performs the conversion.

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

pub fn into(self) -> U[src]

Performs the conversion.

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.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

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.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.