Type Alias shred::WriteExpect

source ·
pub type WriteExpect<'a, T> = Write<'a, T, PanicHandler>;
Expand description

Allows to fetch a resource in a system mutably. This will panic if the resource does not exist. Usage of Write or Option<Write> is therefore recommended.

Aliased Type§

struct WriteExpect<'a, T> { /* private fields */ }

Trait Implementations§

source§

impl<'a, T, F> Deref for Write<'a, T, F>where T: Resource,

§

type Target = T

The resulting type after dereferencing.
source§

fn deref(&self) -> &T

Dereferences the value.
source§

impl<'a, T, F> DerefMut for Write<'a, T, F>where T: Resource,

source§

fn deref_mut(&mut self) -> &mut T

Mutably dereferences the value.
source§

impl<'a, T, F> From<FetchMut<'a, T>> for Write<'a, T, F>

source§

fn from(inner: FetchMut<'a, T>) -> Self

Converts to this type from the input type.
source§

impl<'a, T, F> SystemData<'a> for Write<'a, T, F>where T: Resource, F: SetupHandler<T>,

source§

fn setup(world: &mut World)

Sets up the system data for fetching it from the World.
source§

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.
source§

fn reads() -> Vec<ResourceId>

Returns all read dependencies as fetched from Self::fetch. Read more
source§

fn writes() -> Vec<ResourceId>

Returns all write dependencies as fetched from Self::fetch. Read more