pub struct Read<T: IsResource + TryDefault> { /* private fields */ }Expand description
Immutably borrowed resource that may also 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> Read<T>
impl<T: IsResource + TryDefault> Read<T>
Trait Implementations
sourceimpl<'a, T: IsResource + TryDefault> CanFetch for Read<T>
impl<'a, T: IsResource + TryDefault> CanFetch for Read<T>
sourceimpl<'a, T: IsResource + TryDefault> Deref for Read<T>
impl<'a, T: IsResource + TryDefault> Deref for Read<T>
sourceimpl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a Read<T>where
&'a T: IntoIterator,
impl<'a, T: TryDefault + Send + Sync + 'static> IntoIterator for &'a Read<T>where
&'a T: IntoIterator,
sourceimpl<'a, S: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a Read<S>where
&'a S: IntoParallelIterator,
impl<'a, S: TryDefault + Send + Sync + 'static> IntoParallelIterator for &'a Read<S>where
&'a S: IntoParallelIterator,
type Iter = <&'a S as IntoParallelIterator>::Iter
type Iter = <&'a S as IntoParallelIterator>::Iter
The parallel iterator type that will be created.
type Item = <&'a S as IntoParallelIterator>::Item
type Item = <&'a S as IntoParallelIterator>::Item
The type of item that the parallel iterator will produce.
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 Read<T>
impl<T> Send for Read<T>
impl<T> Sync for Read<T>
impl<T> Unpin for Read<T>where
T: Unpin,
impl<T> !UnwindSafe for Read<T>
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 more