pub struct Write<'a, T: 'a, F = DefaultProvider> { /* private fields */ }
Expand description
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
sourceimpl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
T: Resource,
F: SetupHandler<T>,
impl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
T: Resource,
F: SetupHandler<T>,
sourcefn fetch(world: &'a World) -> Self
fn fetch(world: &'a World) -> Self
Fetches the system data from World
. Note that this is only specified
for one concrete lifetime 'a
, you need to implement the
SystemData
trait for every possible lifetime. Read more
sourcefn reads() -> Vec<ResourceId>
fn reads() -> Vec<ResourceId>
Returns all read dependencies as fetched from Self::fetch
. Read more
sourcefn writes() -> Vec<ResourceId>
fn writes() -> Vec<ResourceId>
Returns all write dependencies as fetched from Self::fetch
. Read more
Auto Trait Implementations
impl<'a, T, F = DefaultProvider> !RefUnwindSafe for Write<'a, T, F>
impl<'a, T, F> Send for Write<'a, T, F> where
F: Send,
T: Send,
impl<'a, T, F> Sync for Write<'a, T, F> where
F: Sync,
T: Sync,
impl<'a, T, F> Unpin for Write<'a, T, F> where
F: Unpin,
impl<'a, T, F = DefaultProvider> !UnwindSafe for Write<'a, T, F>
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more