pub trait ReleaseStateQueryData: QueryData {
// Required method
fn release_state<'w>(item: Self::Item<'w, '_>) -> Self::Item<'w, 'static>;
}
Expand description
A QueryData
that does not borrow from its QueryState
.
This is implemented by most QueryData
types.
The main exceptions are FilteredEntityRef
, FilteredEntityMut
, EntityRefExcept
, and EntityMutExcept
,
which borrow an access list from their query state.
Consider using a full EntityRef
or EntityMut
if you would need those.
Required Methods§
Sourcefn release_state<'w>(item: Self::Item<'w, '_>) -> Self::Item<'w, 'static>
fn release_state<'w>(item: Self::Item<'w, '_>) -> Self::Item<'w, 'static>
Releases the borrow from the query state by converting an item to have a 'static
state lifetime.
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.