Struct amethyst::ecs::prelude::Write [−]
pub struct Write<'a, T, F = DefaultProvider> where
T: 'a, { /* fields omitted */ }
Allows to fetch a resource in a system mutably.
If the resource isn't strictly required, you should use Option<Write<T>>.
Type parameters
T: The type of the resourceF: The setup handler (default:DefaultProvider)
Trait Implementations
impl<'a, T, F> Deref for Write<'a, T, F> where
T: Resource,
impl<'a, T, F> Deref for Write<'a, T, F> where
T: Resource, type Target = T
The resulting type after dereferencing.
ⓘImportant traits for &'a mut Rfn deref(&self) -> &T
ⓘImportant traits for &'a mut R
fn deref(&self) -> &TDereferences the value.
impl<'a, T, F> From<FetchMut<'a, T>> for Write<'a, T, F>
impl<'a, T, F> From<FetchMut<'a, T>> for Write<'a, T, F>impl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
F: SetupHandler<T>,
T: Resource,
impl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
F: SetupHandler<T>,
T: Resource, fn setup(res: &mut Resources)
fn setup(res: &mut Resources)Sets up the system data for fetching it from the Resources.
fn fetch(res: &'a Resources) -> Write<'a, T, F>
fn fetch(res: &'a Resources) -> Write<'a, T, F>Fetches the system data from Resources. Note that this is only specified for one concrete lifetime 'a, you need to implement the SystemData trait for every possible lifetime. Read more
fn reads() -> Vec<ResourceId>
fn reads() -> Vec<ResourceId>Returns all read dependencies as fetched from Self::fetch. Read more
fn writes() -> Vec<ResourceId>
fn writes() -> Vec<ResourceId>Returns all write dependencies as fetched from Self::fetch. Read more
impl<'a, T, F> DerefMut for Write<'a, T, F> where
T: Resource,
impl<'a, T, F> DerefMut for Write<'a, T, F> where
T: Resource,