bevy_ecs::query

Trait ReadOnlyQueryData

Source
pub unsafe trait ReadOnlyQueryData: QueryData<ReadOnly = Self> { }
Expand description

A QueryData that is read only.

§Safety

This must only be implemented for read-only QueryData’s.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

Source§

impl ReadOnlyQueryData for ()

SAFETY: each item in the tuple is read only

Source§

impl<F: ReadOnlyQueryData> ReadOnlyQueryData for (F₁, F₂, …, Fₙ)

This trait is implemented for tuples up to 16 items long. SAFETY: each item in the tuple is read only

Source§

impl<T: Component> ReadOnlyQueryData for &T

SAFETY: access is read only

Source§

impl<T: ReadOnlyQueryData> ReadOnlyQueryData for Option<T>

SAFETY: [OptionFetch] is read only because T is read only

Source§

impl<T: ?Sized> ReadOnlyQueryData for PhantomData<T>

SAFETY: PhantomData never accesses any world data.

Implementors§

Source§

impl ReadOnlyQueryData for &Archetype

SAFETY: access is read only

Source§

impl ReadOnlyQueryData for Entity

SAFETY: access is read only

Source§

impl ReadOnlyQueryData for EntityLocation

SAFETY: access is read only

Source§

impl ReadOnlyQueryData for EntityRef<'_>

SAFETY: access is read only

Source§

impl ReadOnlyQueryData for FilteredEntityRef<'_>

SAFETY: Access is read-only.

Source§

impl ReadOnlyQueryData for AnyOf<()>

SAFETY: each item in the tuple is read only

Source§

impl<'__w, T: Component> ReadOnlyQueryData for Ref<'__w, T>

SAFETY: access is read only

Source§

impl<'a, B> ReadOnlyQueryData for EntityRefExcept<'a, B>
where B: Bundle,

SAFETY: EntityRefExcept enforces read-only access to its contained components.

Source§

impl<F: ReadOnlyQueryData> ReadOnlyQueryData for AnyOf<(F₁, F₂, …, Fₙ)>

This trait is implemented for tuples up to 16 items long. SAFETY: each item in the tuple is read only

Source§

impl<T: Component> ReadOnlyQueryData for Has<T>

SAFETY: Has is read only