Trait rinecs::storage::Storage[][src]

pub trait Storage<'a, T> {
    type Get;
    type GetMut;
    type DerefTarget: ?Sized;
    type IdedIter: Iterator<Item = (usize, Self::Get)>;
    type Iter: Iterator<Item = Self::Get>;
    type IterMut: Iterator<Item = Self::GetMut>;
Show methods fn new() -> Self;
fn with_capacity(capacity: usize) -> Self;
fn insert(&mut self, guid: usize, t: T);
fn remove(&mut self, guid: usize);
unsafe fn get(&self, guid: usize) -> Self::Get;
unsafe fn get_mut(&mut self, guid: usize) -> Self::GetMut;
unsafe fn fast_get(&self, idx: usize) -> Self::Get;
unsafe fn fast_get_mut(&mut self, idx: usize) -> Self::GetMut;
fn fast_index(&self, guid: usize) -> usize;
fn guid_from_fast_index(&self, guid: usize) -> usize;
fn contains(&self, guid: usize) -> bool;
fn ided_iter(&self) -> Self::IdedIter;
fn iter(&self) -> Self::Iter;
fn iter_mut(&mut self) -> Self::IterMut; fn update(&mut self) { ... }
fn tracks_changes() -> bool { ... }
fn storage_changed(&self) -> bool { ... }
}

Associated Types

type Get[src]

type GetMut[src]

type DerefTarget: ?Sized[src]

type IdedIter: Iterator<Item = (usize, Self::Get)>[src]

type Iter: Iterator<Item = Self::Get>[src]

type IterMut: Iterator<Item = Self::GetMut>[src]

Loading content...

Required methods

fn new() -> Self[src]

fn with_capacity(capacity: usize) -> Self[src]

fn insert(&mut self, guid: usize, t: T)[src]

fn remove(&mut self, guid: usize)[src]

unsafe fn get(&self, guid: usize) -> Self::Get[src]

unsafe fn get_mut(&mut self, guid: usize) -> Self::GetMut[src]

unsafe fn fast_get(&self, idx: usize) -> Self::Get[src]

unsafe fn fast_get_mut(&mut self, idx: usize) -> Self::GetMut[src]

fn fast_index(&self, guid: usize) -> usize[src]

fn guid_from_fast_index(&self, guid: usize) -> usize[src]

fn contains(&self, guid: usize) -> bool[src]

fn ided_iter(&self) -> Self::IdedIter[src]

fn iter(&self) -> Self::Iter[src]

fn iter_mut(&mut self) -> Self::IterMut[src]

Loading content...

Provided methods

fn update(&mut self)[src]

fn tracks_changes() -> bool[src]

fn storage_changed(&self) -> bool[src]

Loading content...

Implementors

impl<'a, T: 'a> Storage<'a, T> for Forest<T>[src]

type Get = &'a T

type GetMut = &'a mut T

type DerefTarget = T

type IdedIter = AllIdedData<'a, T>

type Iter = AllData<'a, T>

type IterMut = AllDataMut<'a, T>

impl<'a, T: 'a> Storage<'a, T> for UniqueDenseVec<T> where
    T: Hash
[src]

type Get = &'a T

type GetMut = RefMut<'a, T>

type DerefTarget = T

type IdedIter = Iter<'a, usize, T>

type Iter = Values<'a, T>

type IterMut = UniqueIterMut<'a, T>

impl<'a, T: 'a> Storage<'a, T> for VecStorage<T>[src]

type Get = &'a T

type GetMut = &'a mut T

type DerefTarget = T

type IdedIter = RawIdedIter<'a, T>

type Iter = RawIter<'a, T>

type IterMut = RawIterMut<'a, T>

impl<'a, T: 'a> Storage<'a, T> for DenseVec<T>[src]

type Get = &'a T

type GetMut = &'a mut T

type DerefTarget = T

type IdedIter = Iter<'a, usize, T>

type Iter = Values<'a, T>

type IterMut = ValuesMut<'a, T>

impl<'a, T: 'a, G: GroupExt + 'a> Storage<'a, T> for _DenseOneToNVec<T, G>[src]

type Get = SliceView<'a, T>

type GetMut = SliceViewMut<'a, T>

type DerefTarget = [T]

type IdedIter = IdedIter<'a, T, G>

type Iter = Iter<'a, T, G>

type IterMut = IterMut<'a, T, G>

impl<'a, T: 'a, S: Storage<'a, T>> Storage<'a, T> for AutoChanged<S, T> where
    <S as Storage<'a, T>>::GetMut: Changes,
    T: Component
[src]

type Get = <S as Storage<'a, T>>::Get

type GetMut = <S as Storage<'a, T>>::GetMut

type DerefTarget = <S as Storage<'a, T>>::DerefTarget

type IdedIter = <S as Storage<'a, T>>::IdedIter

type Iter = <S as Storage<'a, T>>::Iter

type IterMut = <S as Storage<'a, T>>::IterMut

impl<'a, T: 'a, S: Storage<'a, T>> Storage<'a, T> for Changed<S, T>[src]

type Get = <S as Storage<'a, T>>::Get

type GetMut = <S as Storage<'a, T>>::GetMut

type DerefTarget = <S as Storage<'a, T>>::DerefTarget

type IdedIter = <S as Storage<'a, T>>::IdedIter

type Iter = <S as Storage<'a, T>>::Iter

type IterMut = <S as Storage<'a, T>>::IterMut

Loading content...