[−][src]Struct keeshond::scene::Entity
A handle to a living object in a Scene
Implementations
impl Entity
[src]
pub fn new(id: usize, generation: u64) -> Entity
[src]
Creates a new Entity with the given ID and generation value. You don't normally need to call this directly. Instead, use Scene::add_entity().
pub fn null() -> Entity
[src]
Creates a "null" Entity that refers to no object in particular.
pub fn get_id(&self) -> usize
[src]
Returns this Entity's identifier, used for indexing operations. ID values may be reused with other Entities, though only one Entity with a given ID may be alive at a time.
pub fn get_generation(&self) -> u64
[src]
Returns this Entity's generation. This is incremented by one every time an Entity is removed and put back into the pool for reuse. When querying based on Entity, both the id and generation must match. This prevents the use of stale Entity handlers.
pub fn is_null(&self) -> bool
[src]
Return true if this is a "null" Entity that refers to no object.
Trait Implementations
impl Clone for Entity
[src]
impl Debug for Entity
[src]
impl Default for Entity
[src]
impl Display for Entity
[src]
impl Eq for Entity
[src]
impl<'_> From<&'_ SpawnArg> for Entity
[src]
impl From<Entity> for SpawnArg
[src]
impl From<SpawnArg> for Entity
[src]
impl Hash for Entity
[src]
fn hash<__H: Hasher>(&self, state: &mut __H)
[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher,
1.3.0[src]
H: Hasher,
impl PartialEq<Entity> for Entity
[src]
impl StructuralEq for Entity
[src]
impl StructuralPartialEq for Entity
[src]
Auto Trait Implementations
impl RefUnwindSafe for Entity
impl Send for Entity
impl Sync for Entity
impl Unpin for Entity
impl UnwindSafe for Entity
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Downcast for T where
T: Any,
[src]
T: Any,
fn into_any(self: Box<T>) -> Box<dyn Any + 'static>
[src]
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
[src]
fn as_any(&self) -> &(dyn Any + 'static)
[src]
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
[src]
impl<T> DowncastSync for T where
T: Send + Sync + Any,
[src]
T: Send + Sync + Any,
impl<T> Erased for T
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
[src]
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,