pub struct SubWorldRaw<A, T> { /* private fields */ }
Expand description

Represents a borrow of the world which can only access a subset of components (unless AllAccess is used).

This type allows for any reference kind, such as &World, AtomicRef, Ref, etc.

Type alises are provided for the most common usages, with SubWorld being the one used by Schedule.

Implementations

Splits the world into a subworld. No borrow checking is performed so may fail during query unless guarded otherwise.

Returns true if the subworld can access the borrow of T

Returns true if the world satisfies the whole query

Query the subworld.

Panics

Panics if the query items are not a compatible subset of the subworld.

Query the subworld for a single entity. Wraps the hecs::NoSuchEntity error and provides the entity id

Get a single component from the world.

Wraps the hecs::NoSuchEntity error and provides the entity id

Get a single component from the world.

Wraps the hecs::NoSuchEntity error and provides the entity id

Reserve multiple entities concurrently

Query the subworld.

Panics

Panics if the query items are not a compatible subset of the subworld.

Query the full access of the subworld. Does not fail as access is guaranteed

Splits the subworld further into a compatible subworld. Fails if not compatible

Trait Implementations

Returns a list of all component accesses

Returns true if U exists in Self

Returns true if id exists in Self

Performs the conversion.

Performs the conversion.

Performs the conversion.

Performs the conversion.

Reserve an entity

Convert the subworld into another holding an internal reference to the original world.

Queries the world

Queries the world for a specific entity

Get a single component for an entity Returns the contextual result since hecs-schedule is required to be imported anyway Read more

Get a single component for an entity Returns the contextual result since hecs-schedule is required to be imported anyway Read more

Transform this into a subworld which borrows no components. This is useful for concurrent access of entities. Read more

The type which View comes from

Splits from the containing superset

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

Performs the conversion.

Performs the conversion.

Performs the conversion.

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.