[−][src]Struct shine_ecs::resources::named::WriteGuard
Guarded update access to a store
Methods
impl<'a, D> WriteGuard<'a, D> where
D: 'a + Data,
[src]
D: 'a + Data,
pub fn get(&self, k: &<D as Data>::Key) -> Option<Index<D>>
[src]
pub fn get_or_add(&mut self, k: &<D as Data>::Key) -> Index<D>
[src]
pub fn is_empty(&self) -> bool
[src]
Returns if the store is empty.
pub fn finalize_requests(&mut self)
[src]
Move all new (pending) resources into the active resources
pub fn drain_unused_filtered<F>(&mut self, filter: F) where
F: FnMut(&mut D) -> bool,
[src]
F: FnMut(&mut D) -> bool,
Drain unreferenced elements those specified by the predicate. In other words, remove all unreferenced resources such that f(&mut data) returns true.
pub fn drain_unused(&mut self)
[src]
Drain all unreferenced items. Only the referenced items are kept in the store.
pub fn at(&self, index: &Index<D>) -> &D
[src]
pub fn at_mut(&mut self, index: &Index<D>) -> &mut D
[src]
Trait Implementations
impl<'a, 'i, D> IndexMut<&'i Index<D>> for WriteGuard<'a, D> where
D: 'a + Data,
[src]
D: 'a + Data,
fn index_mut(
&mut self,
index: &Index<D>
) -> &mut <WriteGuard<'a, D> as Index<&'i Index<D>>>::Output
[src]
&mut self,
index: &Index<D>
) -> &mut <WriteGuard<'a, D> as Index<&'i Index<D>>>::Output
impl<'a, 'i, D> Index<&'i Index<D>> for WriteGuard<'a, D> where
D: 'a + Data,
[src]
D: 'a + Data,
Auto Trait Implementations
impl<'a, D> !Send for WriteGuard<'a, D>
impl<'a, D> !Sync for WriteGuard<'a, D>
Blanket Implementations
impl<T> From for T
[src]
impl<T, U> Into for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Any for T where
T: Any,
T: Any,