Struct hobo::hierarchy::Parent

source ·
pub struct Parent(pub Entity);
Expand description

A component with a single Entity representing the parent

Tuple Fields§

§0: Entity

Implementations§

source§

impl Parent

source

pub fn ancestors(entity: impl AsEntity) -> Vec<Entity>

Trait Implementations§

source§

impl AsEntity for Parent

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 Parent

source§

fn clone(&self) -> Parent

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 Parent

source§

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

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

impl Default for Parent

source§

fn default() -> Parent

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

impl Deref for Parent

§

type Target = Entity

The resulting type after dereferencing.
source§

fn deref(&self) -> &Self::Target

Dereferences the value.
source§

impl DerefMut for Parent

source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
source§

impl Hash for Parent

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 PartialEq<Parent> for Parent

source§

fn eq(&self, other: &Parent) -> 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 Copy for Parent

source§

impl Eq for Parent

source§

impl StructuralEq for Parent

source§

impl StructuralPartialEq for Parent

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