Struct specs::Write [−][src]
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> SystemData<'a> for Write<'a, T, F> where
F: SetupHandler<T>,
T: Resource,
[src]
impl<'a, T, F> SystemData<'a> for Write<'a, T, F> where
F: SetupHandler<T>,
T: Resource,
fn setup(res: &mut Resources)
[src]
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>
[src]
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>
[src]
fn reads() -> Vec<ResourceId>
Returns all read dependencies as fetched from Self::fetch
. Read more
fn writes() -> Vec<ResourceId>
[src]
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,
[src]
impl<'a, T, F> DerefMut for Write<'a, T, F> where
T: Resource,
ⓘImportant traits for &'a mut Rfn deref_mut(&mut self) -> &mut T
[src]
fn deref_mut(&mut self) -> &mut T
Mutably dereferences the value.
impl<'a, T, F> Deref for Write<'a, T, F> where
T: Resource,
[src]
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
[src]
fn deref(&self) -> &T
Dereferences the value.
impl<'a, T, F> From<FetchMut<'a, T>> for Write<'a, T, F>
[src]
impl<'a, T, F> From<FetchMut<'a, T>> for Write<'a, T, F>
impl<'a, 'b, T> Join for &'a mut Write<'b, T> where
&'a mut T: Join,
T: Resource,
[src]
impl<'a, 'b, T> Join for &'a mut Write<'b, T> where
&'a mut T: Join,
T: Resource,
type Type = <&'a mut T as Join>::Type
Type of joined components.
type Value = <&'a mut T as Join>::Value
Type of joined storages.
type Mask = <&'a mut T as Join>::Mask
Type of joined bit mask.
unsafe fn open(self) -> (Self::Mask, Self::Value)
[src]
unsafe fn open(self) -> (Self::Mask, Self::Value)
Open this join by returning the mask and the storages. Read more
unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type
[src]
unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type
Get a joined component value by a given index.
fn is_unconstrained() -> bool
[src]
fn is_unconstrained() -> bool
If this Join
typically returns all indices in the mask, then iterating over only it or combined with other joins that are also dangerous will cause the JoinIter
/ParJoin
to go through all indices which is usually not what is wanted and will kill performance. Read more
ⓘImportant traits for JoinIter<J>fn join(self) -> JoinIter<Self> where
Self: Sized,
[src]
fn join(self) -> JoinIter<Self> where
Self: Sized,
Create a joined iterator over the contents.
fn maybe(self) -> MaybeJoin<Self> where
Self: Sized,
[src]
fn maybe(self) -> MaybeJoin<Self> where
Self: Sized,
Returns a Join
-able structure that yields all indices, returning None
for all missing elements and Some(T)
for found elements. Read more
impl<'a, 'b, T> ParJoin for &'a mut Write<'b, T> where
&'a mut T: ParJoin,
T: Resource,
[src]
impl<'a, 'b, T> ParJoin for &'a mut Write<'b, T> where
&'a mut T: ParJoin,
T: Resource,
fn par_join(self) -> JoinParIter<Self> where
Self: Sized,
[src]
fn par_join(self) -> JoinParIter<Self> where
Self: Sized,
Create a joined parallel iterator over the contents.