Trait rin::ecs::Storage [−][src]
pub trait Storage<'a, T> { type Get; type GetMut; type DerefTarget: ?Sized; type IdedIter: Iterator; type Iter: Iterator; type IterMut: Iterator;}Show methods
pub fn new() -> Self; pub fn with_capacity(capacity: usize) -> Self; pub fn insert(&mut self, guid: usize, t: T); pub fn remove(&mut self, guid: usize); pub unsafe fn get(&self, guid: usize) -> Self::Get; pub unsafe fn get_mut(&mut self, guid: usize) -> Self::GetMut; pub unsafe fn fast_get(&self, idx: usize) -> Self::Get; pub unsafe fn fast_get_mut(&mut self, idx: usize) -> Self::GetMut; pub fn fast_index(&self, guid: usize) -> usize; pub fn guid_from_fast_index(&self, guid: usize) -> usize; pub fn contains(&self, guid: usize) -> bool; pub fn ided_iter(&self) -> Self::IdedIter; pub fn iter(&self) -> Self::Iter; pub fn iter_mut(&mut self) -> Self::IterMut; pub fn update(&mut self) { ... } pub fn tracks_changes() -> bool { ... } pub fn storage_changed(&self) -> bool { ... }
Associated Types
type Get
[src]
type GetMut
[src]
type DerefTarget: ?Sized
[src]
type IdedIter: Iterator
[src]
type Iter: Iterator
[src]
type IterMut: Iterator
[src]
Required methods
pub fn new() -> Self
[src]
pub fn with_capacity(capacity: usize) -> Self
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> Self::Get
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> Self::GetMut
[src]
pub unsafe fn fast_get(&self, idx: usize) -> Self::Get
[src]
pub unsafe fn fast_get_mut(&mut self, idx: usize) -> Self::GetMut
[src]
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, guid: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> Self::IdedIter
[src]
pub fn iter(&self) -> Self::Iter
[src]
pub fn iter_mut(&mut self) -> Self::IterMut
[src]
Provided methods
pub fn update(&mut self)
[src]
pub fn tracks_changes() -> bool
[src]
pub fn storage_changed(&self) -> bool
[src]
Implementations on Foreign Types
impl<'a, T> Storage<'a, T> for KeyedDenseVec<usize, T> where
T: 'a,
[src]
impl<'a, T> Storage<'a, T> for KeyedDenseVec<usize, T> where
T: 'a,
[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>
pub fn new() -> KeyedDenseVec<usize, T>
[src]
pub fn with_capacity(capacity: usize) -> KeyedDenseVec<usize, T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> &'a mut T
[src]
pub unsafe fn fast_get(
&self,
idx: usize
) -> <KeyedDenseVec<usize, T> as Storage<'a, T>>::Get
[src]
&self,
idx: usize
) -> <KeyedDenseVec<usize, T> as Storage<'a, T>>::Get
pub unsafe fn fast_get_mut(
&mut self,
idx: usize
) -> <KeyedDenseVec<usize, T> as Storage<'a, T>>::GetMut
[src]
&mut self,
idx: usize
) -> <KeyedDenseVec<usize, T> as Storage<'a, T>>::GetMut
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> Iter<'a, usize, T>
[src]
pub fn iter(&self) -> Values<'a, T>
[src]
pub fn iter_mut(&mut self) -> ValuesMut<'a, T>
[src]
Implementors
impl<'a, T> Storage<'a, T> for Forest<T> where
T: 'a,
[src]
impl<'a, T> Storage<'a, T> for Forest<T> where
T: 'a,
[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>
pub fn new() -> Forest<T>
[src]
pub fn with_capacity(capacity: usize) -> Forest<T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> &'a mut T
[src]
pub unsafe fn fast_get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn fast_get_mut(&mut self, guid: usize) -> &'a mut T
[src]
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> <Forest<T> as Storage<'a, T>>::IdedIter
[src]
pub fn iter(&self) -> <Forest<T> as Storage<'a, T>>::Iter
[src]
pub fn iter_mut(&mut self) -> <Forest<T> as Storage<'a, T>>::IterMut
[src]
impl<'a, T> Storage<'a, T> for OneToNForest<T> where
T: 'a + Component,
[src]
impl<'a, T> Storage<'a, T> for OneToNForest<T> where
T: 'a + Component,
[src]type Get = RootsIter<'a, T>
type GetMut = RootsIterMut<'a, T>
type DerefTarget = RootsIter<'a, T>
type IdedIter = RawIdedIter<'a, T>
type Iter = RawIter<'a, T>
type IterMut = RawIterMut<'a, T>
pub fn new() -> OneToNForest<T>
[src]
pub fn with_capacity(capacity: usize) -> OneToNForest<T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> RootsIter<'a, T>
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> RootsIterMut<'a, T>
[src]
pub unsafe fn fast_get(&self, guid: usize) -> RootsIter<'a, T>
[src]
pub unsafe fn fast_get_mut(&mut self, guid: usize) -> RootsIterMut<'a, T>
[src]
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> <OneToNForest<T> as Storage<'a, T>>::IdedIter
[src]
pub fn iter(&self) -> <OneToNForest<T> as Storage<'a, T>>::Iter
[src]
pub fn iter_mut(&mut self) -> <OneToNForest<T> as Storage<'a, T>>::IterMut
[src]
impl<'a, T> Storage<'a, T> for UniqueDenseVec<T> where
T: 'a + Hash,
[src]
impl<'a, T> Storage<'a, T> for UniqueDenseVec<T> where
T: 'a + 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>
pub fn new() -> UniqueDenseVec<T>
[src]
pub fn with_capacity(capacity: usize) -> UniqueDenseVec<T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn get_mut(
&mut self,
guid: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::GetMut
[src]
&mut self,
guid: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::GetMut
pub unsafe fn fast_get(
&self,
idx: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::Get
[src]
&self,
idx: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::Get
pub unsafe fn fast_get_mut(
&mut self,
idx: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::GetMut
[src]
&mut self,
idx: usize
) -> <UniqueDenseVec<T> as Storage<'a, T>>::GetMut
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> Iter<'a, usize, T>
[src]
pub fn iter(&self) -> Values<'a, T>
[src]
pub fn iter_mut(&mut self) -> UniqueIterMut<'a, T>ⓘNotable traits for UniqueIterMut<'a, T>
impl<'a, T> Iterator for UniqueIterMut<'a, T> where
T: 'a, type Item = RefMut<'a, T>;
[src]
Notable traits for UniqueIterMut<'a, T>
impl<'a, T> Iterator for UniqueIterMut<'a, T> where
T: 'a, type Item = RefMut<'a, T>;
impl<'a, T> Storage<'a, T> for VecStorage<T> where
T: 'a,
[src]
impl<'a, T> Storage<'a, T> for VecStorage<T> where
T: 'a,
[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>
pub fn new() -> VecStorage<T>
[src]
pub fn with_capacity(capacity: usize) -> VecStorage<T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> &'a mut T
[src]
pub unsafe fn fast_get(&self, guid: usize) -> &'a T
[src]
pub unsafe fn fast_get_mut(&mut self, guid: usize) -> &'a mut T
[src]
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn ided_iter(&self) -> <VecStorage<T> as Storage<'a, T>>::IdedIter
[src]
pub fn iter(&self) -> <VecStorage<T> as Storage<'a, T>>::Iter
[src]
pub fn iter_mut(&mut self) -> <VecStorage<T> as Storage<'a, T>>::IterMut
[src]
impl<'a, T, G> Storage<'a, T> for _DenseOneToNVec<T, G> where
T: 'a,
G: 'a + GroupExt,
[src]
impl<'a, T, G> Storage<'a, T> for _DenseOneToNVec<T, G> where
T: 'a,
G: 'a + GroupExt,
[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>
pub fn new() -> _DenseOneToNVec<T, G>
[src]
pub fn with_capacity(capacity: usize) -> _DenseOneToNVec<T, G>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> SliceView<'a, T>
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> SliceViewMut<'a, T>
[src]
pub unsafe fn fast_get(&self, guid: usize) -> SliceView<'a, T>
[src]
pub unsafe fn fast_get_mut(&mut self, guid: usize) -> SliceViewMut<'a, T>
[src]
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn iter(&self) -> <_DenseOneToNVec<T, G> as Storage<'a, T>>::Iter
[src]
pub fn iter_mut(&mut self) -> <_DenseOneToNVec<T, G> as Storage<'a, T>>::IterMut
[src]
pub fn ided_iter(&self) -> <_DenseOneToNVec<T, G> as Storage<'a, T>>::IdedIter
[src]
impl<'a, T, S> Storage<'a, T> for AutoChanged<S, T> where
T: 'a + Component,
S: Storage<'a, T>,
<S as Storage<'a, T>>::GetMut: Changes,
[src]
impl<'a, T, S> Storage<'a, T> for AutoChanged<S, T> where
T: 'a + Component,
S: Storage<'a, T>,
<S as Storage<'a, T>>::GetMut: Changes,
[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
pub fn new() -> AutoChanged<S, T>
[src]
pub fn with_capacity(capacity: usize) -> AutoChanged<S, T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> <S as Storage<'a, T>>::Get
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> <S as Storage<'a, T>>::GetMut
[src]
pub unsafe fn fast_get(&self, idx: usize) -> <S as Storage<'a, T>>::Get
[src]
pub unsafe fn fast_get_mut(
&mut self,
idx: usize
) -> <S as Storage<'a, T>>::GetMut
[src]
&mut self,
idx: usize
) -> <S as Storage<'a, T>>::GetMut
pub fn fast_index(&self, guid: usize) -> usize
[src]
pub fn guid_from_fast_index(&self, idx: usize) -> usize
[src]
pub fn contains(&self, guid: usize) -> bool
[src]
pub fn update(&mut self)
[src]
pub fn tracks_changes() -> bool
[src]
pub fn storage_changed(&self) -> bool
[src]
pub fn ided_iter(&self) -> <AutoChanged<S, T> as Storage<'a, T>>::IdedIter
[src]
pub fn iter(&self) -> <AutoChanged<S, T> as Storage<'a, T>>::Iter
[src]
pub fn iter_mut(&mut self) -> <AutoChanged<S, T> as Storage<'a, T>>::IterMut
[src]
impl<'a, T, S> Storage<'a, T> for Changed<S, T> where
T: 'a,
S: Storage<'a, T>,
[src]
impl<'a, T, S> Storage<'a, T> for Changed<S, T> where
T: 'a,
S: Storage<'a, 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
pub fn new() -> Changed<S, T>
[src]
pub fn with_capacity(capacity: usize) -> Changed<S, T>
[src]
pub fn insert(&mut self, guid: usize, t: T)
[src]
pub fn remove(&mut self, guid: usize)
[src]
pub unsafe fn get(&self, guid: usize) -> <S as Storage<'a, T>>::Get
[src]
pub unsafe fn get_mut(&mut self, guid: usize) -> <S as Storage<'a, T>>::GetMut
[src]
pub unsafe fn fast_get(&self, guid: usize) -> <S as Storage<'a, T>>::Get
[src]
pub unsafe fn fast_get_mut(
&mut self,
guid: usize
) -> <S as Storage<'a, T>>::GetMut
[src]
&mut self,
guid: usize
) -> <S as Storage<'a, T>>::GetMut