Struct rinecs::Resources [−][src]
pub struct Resources<'a> { /* fields omitted */ }
Gives access to the world global Send
resources for reading and writing
Resources are useful for certain data that needs to be accessed from several systems but doesn’t belong to any specific entity
It’s similar to a singleton in that it can be accessed from any system and there’s only one instance per type
Implementations
impl<'a> Resources<'a>
[src]
impl<'a> Resources<'a>
[src]pub fn get<T: 'static + Send>(&self) -> Option<ReadGuardRef<'a, T>>
[src]
pub fn get_mut<T: 'static + Send>(&self) -> Option<WriteGuardRef<'a, T>>
[src]
pub fn as_trait<T: 'static + Send + ?Sized>(
&self
) -> Option<ReadGuardRef<'a, T>>
[src]
&self
) -> Option<ReadGuardRef<'a, T>>
pub fn as_trait_mut<T: 'static + Send + ?Sized>(
&self
) -> Option<WriteGuardRef<'a, T>>
[src]
&self
) -> Option<WriteGuardRef<'a, T>>
Trait Implementations
impl<'a> ResourcesExt for Resources<'a>
[src]
impl<'a> ResourcesExt for Resources<'a>
[src]fn resource<T: 'static + Send>(&self) -> Option<ReadGuardRef<'_, T>>
[src]
fn resource_mut<T: 'static + Send>(&self) -> Option<WriteGuardRef<'_, T>>
[src]
fn resource_as_trait<T: 'static + Send + ?Sized>(
&self
) -> Option<ReadGuardRef<'_, T>>
[src]
&self
) -> Option<ReadGuardRef<'_, T>>
fn resource_as_trait_mut<T: 'static + Send + ?Sized>(
&self
) -> Option<WriteGuardRef<'_, T>>
[src]
&self
) -> Option<WriteGuardRef<'_, T>>