[][src]Struct memur::List

pub struct List<T> where
    T: Sized
{ /* fields omitted */ }

Append-only list

Implementations

impl<T> List<T> where
    T: Sized
[src]

pub fn new(arena: &Arena) -> Result<List<T>, UploadError>[src]

Initializes a new list in arena and returns a handle to it.

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

pub fn iter(&self) -> impl ExactSizeIterator<Item = &T>[src]

Iterates over the item references in arena, returns no items if the arena is dead.

pub fn safer_iter(&self) -> Option<impl ExactSizeIterator<Item = &T>>[src]

Iterates over the item references in arena if the arena is alive.

pub fn iter_mut(&mut self) -> impl ExactSizeIterator<Item = &mut T>[src]

Iterates over the mutable item references in arena, returns no items if the arena is dead.

pub fn safer_iter_mut(
    &mut self
) -> Option<impl ExactSizeIterator<Item = &mut T>>
[src]

Iterates over the mutable item references in arena if the arena is alive.

pub fn push(&mut self, item: T) -> Result<(), UploadError>[src]

Appends a new item to list if the arena is alive.

Trait Implementations

impl<T> Debug for List<T> where
    T: Debug,
    T: Sized
[src]

Auto Trait Implementations

impl<T> RefUnwindSafe for List<T> where
    T: RefUnwindSafe

impl<T> !Send for List<T>

impl<T> !Sync for List<T>

impl<T> Unpin for List<T>

impl<T> UnwindSafe for List<T> where
    T: RefUnwindSafe

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