Type Definition specs::ReadExpect
source · pub type ReadExpect<'a, T> = Read<'a, T, PanicHandler>;
Expand description
Allows to fetch a resource in a system immutably.
This will panic if the resource does not exist.
Usage of Read
or Option<Read>
is therefore recommended.
If the nightly
feature of shred
is enabled, this will print
the type of the resource in case of a panic. That can help for debugging.
Trait Implementations
sourceimpl<'a, 'b, T> Join for &'a ReadExpect<'b, T>where
&'a T: Join,
T: Resource,
impl<'a, 'b, T> Join for &'a ReadExpect<'b, T>where
&'a T: Join,
T: Resource,
sourceunsafe fn open(self) -> (Self::Mask, Self::Value)
unsafe fn open(self) -> (Self::Mask, Self::Value)
Open this join by returning the mask and the storages. Read more
sourceunsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type
unsafe fn get(v: &mut Self::Value, i: Index) -> Self::Type
Get a joined component value by a given index.
sourcefn is_unconstrained() -> bool
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 moresourceimpl<'a, 'b, T> ParJoin for &'a ReadExpect<'b, T>where
&'a T: ParJoin,
T: Resource,
impl<'a, 'b, T> ParJoin for &'a ReadExpect<'b, T>where
&'a T: ParJoin,
T: Resource,
sourcefn par_join(self) -> JoinParIter<Self>where
Self: Sized,
fn par_join(self) -> JoinParIter<Self>where
Self: Sized,
Create a joined parallel iterator over the contents.