Struct hobo::entity::Entity

source ·
pub struct Entity(_);
Expand description

An opaque copyable identifier that is used to attach and fetch components

Trait Implementations§

source§

impl AsEntity for Entity

source§

fn as_entity(&self) -> Entity

source§

fn try_get_cmp<'a, C: 'static>( &self ) -> Option<OwningRef<StorageGuard<C, StorageRef<'a, C>>, C>>where Self: Sized,

source§

fn try_get_cmp_mut<'a, C: 'static>( &self ) -> Option<OwningRefMut<StorageGuardMut<C, StorageRefMut<'a, C>>, C>>where Self: Sized,

source§

fn get_cmp<'a, C: 'static>( &self ) -> OwningRef<StorageGuard<C, StorageRef<'a, C>>, C>

source§

fn get_cmp_mut<'a, C: 'static>( &self ) -> OwningRefMut<StorageGuardMut<C, StorageRefMut<'a, C>>, C>

source§

fn get_cmp_mut_or<'a, C: 'static>( &self, f: impl FnOnce() -> C ) -> OwningRefMut<StorageGuardMut<C, StorageRefMut<'a, C>>, C>

source§

fn get_cmp_mut_or_default<'a, C: 'static + Default>( &self ) -> OwningRefMut<StorageGuardMut<C, StorageRefMut<'a, C>>, C>

source§

fn remove_cmp<C: 'static>(&self)where Self: Sized,

source§

fn find_in_ancestors<Q: Query>(&self) -> Vec<Q::Fetch>

source§

fn try_find_first_in_ancestors<Q: Query>(&self) -> Option<Q::Fetch>

source§

fn find_first_in_ancestors<Q: Query>(&self) -> Q::Fetch

source§

fn find_in_descendants<Q: Query>(&self) -> Vec<Q::Fetch>

source§

fn find_in_children<Q: Query>(&self) -> Vec<Q::Fetch>

source§

fn try_find_first_in_descendants<Q: Query>(&self) -> Option<Q::Fetch>

source§

fn try_find_first_in_children<Q: Query>(&self) -> Option<Q::Fetch>

source§

fn find_first_in_descendants<Q: Query>(&self) -> Q::Fetch

source§

fn find_first_in_children<Q: Query>(&self) -> Q::Fetch

source§

fn remove(&self)

source§

fn add_component<T: 'static>(&self, component: T)

source§

fn component<T: 'static>(self, component: T) -> Selfwhere Self: Sized,

source§

fn has_cmp<C: 'static>(&self) -> boolwhere Self: Sized,

source§

fn is_dead(&self) -> bool

source§

fn spawn(&self, f: impl Future<Output = ()> + 'static)

source§

fn spawn_in<F: FnOnce(&Self) -> Fut, Fut: Future<Output = ()> + 'static>( self, f: F ) -> Selfwhere Self: Sized,

source§

impl AsMut<Entity> for Parent

source§

fn as_mut(&mut self) -> &mut Entity

Converts this type into a mutable reference of the (usually inferred) input type.
source§

impl AsRef<Entity> for Parent

source§

fn as_ref(&self) -> &Entity

Converts this type into a shared reference of the (usually inferred) input type.
source§

impl Borrow<Entity> for Parent

source§

fn borrow(&self) -> &Entity

Immutably borrows from an owned value. Read more
source§

impl BorrowMut<Entity> for Parent

source§

fn borrow_mut(&mut self) -> &mut Entity

Mutably borrows from an owned value. Read more
source§

impl Clone for Entity

source§

fn clone(&self) -> Entity

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Entity

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Entity

source§

fn default() -> Entity

Returns the “default value” for a type. Read more
source§

impl Hash for Entity

source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · source§

fn hash_slice<H>(data: &[Self], state: &mut H)where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
source§

impl Ord for Entity

source§

fn cmp(&self, other: &Entity) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · source§

fn max(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · source§

fn min(self, other: Self) -> Selfwhere Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · source§

fn clamp(self, min: Self, max: Self) -> Selfwhere Self: Sized + PartialOrd<Self>,

Restrict a value to a certain interval. Read more
source§

impl PartialEq<Entity> for Entity

source§

fn eq(&self, other: &Entity) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd<Entity> for Entity

source§

fn partial_cmp(&self, other: &Entity) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · source§

fn lt(&self, other: &Rhs) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · source§

fn le(&self, other: &Rhs) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · source§

fn gt(&self, other: &Rhs) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · source§

fn ge(&self, other: &Rhs) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Query for Entity

§

type Fetch = Entity

source§

fn fetch(world: &World, entity: Entity) -> Self::Fetch

source§

fn filter(world: &World, entities: &mut Option<BTreeSet<Entity>>)

source§

impl Copy for Entity

source§

impl Eq for Entity

source§

impl StructuralEq for Entity

source§

impl StructuralPartialEq for Entity

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for Twhere T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> AsAny for Twhere T: Any,

source§

fn as_any(&self) -> &(dyn Any + 'static)

source§

fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)

source§

fn type_name(&self) -> &'static str

Gets the type name of self
source§

impl<T> Borrow<T> for Twhere T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for Twhere T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> DefaultResource for Twhere T: Default + 'static,

source§

fn resource_or_default<'a>( ) -> OwningRef<StorageGuard<Self, StorageRef<'a, Self>>, Self>where Self: Sized,

source§

fn resource_mut_or_default<'a>( ) -> OwningRefMut<StorageGuardMut<Self, StorageRefMut<'a, Self>>, Self>where Self: Sized,

source§

impl<T> Downcast for Twhere T: AsAny + ?Sized,

source§

fn is<T>(&self) -> boolwhere T: AsAny,

Returns true if the boxed type is the same as T. Read more
source§

fn downcast_ref<T>(&self) -> Option<&T>where T: AsAny,

Forward to the method defined on the type Any.
source§

fn downcast_mut<T>(&mut self) -> Option<&mut T>where T: AsAny,

Forward to the method defined on the type Any.
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for Twhere U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> Resource for Twhere T: 'static,

source§

fn register_resource(self)where Self: Sized,

source§

fn resource<'a>() -> OwningRef<StorageGuard<Self, StorageRef<'a, Self>>, Self>where Self: Sized,

source§

fn resource_mut<'a>( ) -> OwningRefMut<StorageGuardMut<Self, StorageRefMut<'a, Self>>, Self>where Self: Sized,

source§

fn try_resource<'a>( ) -> Option<OwningRef<StorageGuard<Self, StorageRef<'a, Self>>, Self>>where Self: Sized,

source§

fn try_resource_mut<'a>( ) -> Option<OwningRefMut<StorageGuardMut<Self, StorageRefMut<'a, Self>>, Self>>where Self: Sized,

source§

fn remove_resource()where Self: Sized,

source§

impl<T> ToOwned for Twhere T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for Twhere U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for Twhere U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Erased for T