[][src]Struct tiny_ecs::MapRef

pub struct MapRef<'a, T> { /* fields omitted */ }

Immutable reference container for Persist returned by Entities::borrow()

This struct is required to contain a hidden borrow to the requested Persist. The reason for this is so we can borrow multiple Persist, but not break the borrow checker rules for borrows on a single Persist.

Methods from Deref<Target = Persist<T>>

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

Returns the actual used length regardless of capacity

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

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

Returns the storage capacity

pub fn get(&self, index: usize) -> Option<&T>[src]

pub fn is_index_live(&self, index: usize) -> bool[src]

Check if there is a value at this index

pub fn iter(&self) -> Iter<T>[src]

Trait Implementations

impl<'a, T> Deref for MapRef<'a, T>[src]

type Target = Persist<T>

The resulting type after dereferencing.

Auto Trait Implementations

impl<'a, T> !RefUnwindSafe for MapRef<'a, T>

impl<'a, T> !Send for MapRef<'a, T>

impl<'a, T> !Sync for MapRef<'a, T>

impl<'a, T> Unpin for MapRef<'a, T>

impl<'a, T> !UnwindSafe for MapRef<'a, T>

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.