pub struct Write<T: IsResource + TryDefault>(_);Expand description
A mutably borrowed resource that may be created by default.
Read and Write are the main way systems interact with resources.
When fetched The wrapped type T will
automatically be created, if it doesn’t already exist and if possible,
according to its TryDefault implementation.
The resource is then automatically sent back to the world on drop. For this reason, when writing async systems you must take care to drop fetched resources.
Implementations
sourceimpl<T: IsResource + TryDefault> Write<T>
impl<T: IsResource + TryDefault> Write<T>
Trait Implementations
sourceimpl<'a, T: IsResource + TryDefault> CanFetch for Write<T>
impl<'a, T: IsResource + TryDefault> CanFetch for Write<T>
sourceimpl<T: IsResource + TryDefault> Deref for Write<T>
impl<T: IsResource + TryDefault> Deref for Write<T>
sourceimpl<'a, T: IsResource + TryDefault> DerefMut for Write<T>
impl<'a, T: IsResource + TryDefault> DerefMut for Write<T>
sourceimpl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a Write<T>where
&'a T: IntoIterator,
impl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a Write<T>where
&'a T: IntoIterator,
sourceimpl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a mut Write<T>where
&'a mut T: IntoIterator,
impl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a mut Write<T>where
&'a mut T: IntoIterator,
type Item = <<&'a mut T as IntoIterator>::IntoIter as Iterator>::Item
type Item = <<&'a mut T as IntoIterator>::IntoIter as Iterator>::Item
The type of the elements being iterated over.
type IntoIter = <&'a mut T as IntoIterator>::IntoIter
type IntoIter = <&'a mut T as IntoIterator>::IntoIter
Which kind of iterator are we turning this into?
sourceimpl<'a, T: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a Write<T>where
&'a T: IntoParallelIterator,
impl<'a, T: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a Write<T>where
&'a T: IntoParallelIterator,
type Item = <&'a T as IntoParallelIterator>::Item
type Item = <&'a T as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce.
type Iter = <&'a T as IntoParallelIterator>::Iter
type Iter = <&'a T as IntoParallelIterator>::Iter
The parallel iterator type that will be created.
sourcefn into_par_iter(self) -> Self::Iter
fn into_par_iter(self) -> Self::Iter
Converts
self into a parallel iterator. Read moresourceimpl<'a, T: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a mut Write<T>where
&'a mut T: IntoParallelIterator,
impl<'a, T: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a mut Write<T>where
&'a mut T: IntoParallelIterator,
type Item = <&'a mut T as IntoParallelIterator>::Item
type Item = <&'a mut T as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce.
type Iter = <&'a mut T as IntoParallelIterator>::Iter
type Iter = <&'a mut T as IntoParallelIterator>::Iter
The parallel iterator type that will be created.
sourcefn into_par_iter(self) -> Self::Iter
fn into_par_iter(self) -> Self::Iter
Converts
self into a parallel iterator. Read moreAuto Trait Implementations
impl<T> RefUnwindSafe for Write<T>where
T: RefUnwindSafe,
impl<T> Send for Write<T>
impl<T> Sync for Write<T>
impl<T> Unpin for Write<T>
impl<T> UnwindSafe for Write<T>where
T: UnwindSafe,
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<'data, I> IntoParallelRefIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data I: IntoParallelIterator,
impl<'data, I> IntoParallelRefIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data I: IntoParallelIterator,
type Iter = <&'data I as IntoParallelIterator>::Iter
type Iter = <&'data I as IntoParallelIterator>::Iter
The type of the parallel iterator that will be returned.
type Item = <&'data I as IntoParallelIterator>::Item
type Item = <&'data I as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce.
This will typically be an
&'data T reference type. Read moresourcefn par_iter(&'data self) -> <I as IntoParallelRefIterator<'data>>::Iter
fn par_iter(&'data self) -> <I as IntoParallelRefIterator<'data>>::Iter
Converts
self into a parallel iterator. Read moresourceimpl<'data, I> IntoParallelRefMutIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data mut I: IntoParallelIterator,
impl<'data, I> IntoParallelRefMutIterator<'data> for Iwhere
I: 'data + ?Sized,
&'data mut I: IntoParallelIterator,
type Iter = <&'data mut I as IntoParallelIterator>::Iter
type Iter = <&'data mut I as IntoParallelIterator>::Iter
The type of iterator that will be created.
type Item = <&'data mut I as IntoParallelIterator>::Item
type Item = <&'data mut I as IntoParallelIterator>::Item
The type of item that will be produced; this is typically an
&'data mut T reference. Read moresourcefn par_iter_mut(
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
fn par_iter_mut(
&'data mut self
) -> <I as IntoParallelRefMutIterator<'data>>::Iter
Creates the parallel iterator from
self. Read more