Type Alias shred::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.
Aliased Type§
struct ReadExpect<'a, T> { /* private fields */ }
Trait Implementations§
source§impl<'a, T, F> SystemData<'a> for Read<'a, T, F>where
T: Resource,
F: SetupHandler<T>,
impl<'a, T, F> SystemData<'a> for Read<'a, T, F>where T: Resource, F: SetupHandler<T>,
source§fn 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.