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

Trait Implementations

Attempt to construct Self with the given LoanManager.
Return a plugin containing the systems and sub-resources required to create and use the type. Read more
The resulting type after dereferencing.
Dereferences the value.
The type of the elements being iterated over.
Which kind of iterator are we turning this into?
Creates an iterator from a value. Read more
The parallel iterator type that will be created.
The type of item that the parallel iterator will produce.
Converts self into a parallel iterator. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type of the parallel iterator that will be returned.
The type of item that the parallel iterator will produce. This will typically be an &'data T reference type. Read more
Converts self into a parallel iterator. Read more
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.