Trait ContainsEntity
Source pub trait ContainsEntity {
// Required method
fn entity(&self) -> Entity;
}
Expand description
A trait for types that contain an Entity
.
This trait behaves similarly to Borrow<Entity>
, but yielding Entity
directly.
It should only be implemented when:
- Retrieving the
Entity
is a simple operation.
- The
Entity
contained by the type is unambiguous.
Returns the contained entity.