pub struct Object<'w, 's, 'a, T: Kind = Any> { /* private fields */ }Implementations§
Trait Implementations§
Source§impl<'w, 's, 'a, T: Kind> ObjectHierarchy<T> for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T: Kind> ObjectHierarchy<T> for Object<'w, 's, 'a, T>
fn parent(&self) -> Option<Self::Rebind<Any>>
fn children(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn ancestors(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn descendants_wide(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn descendants_deep(&self) -> impl Iterator<Item = Self::Rebind<Any>>
Source§fn find_by_path(&self, path: impl AsRef<str>) -> Option<Self::Rebind<Any>>
fn find_by_path(&self, path: impl AsRef<str>) -> Option<Self::Rebind<Any>>
Attempts to find an object by its path, relative to this one. Read more
fn root(&self) -> Self::Rebind<Any>
fn is_root(&self) -> bool
fn is_child(&self) -> bool
fn is_child_of(&self, parent: Entity) -> bool
fn has_children(&self) -> bool
fn query_children<'a, Q: QueryData, F: QueryFilter>( &'a self, query: &'a Query<'_, '_, Q, F>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn children_of_kind<'a, U: Kind>( &'a self, objects: &'a Objects<'_, '_, U>, ) -> impl Iterator<Item = Self::Rebind<U>> + 'a
fn find_child_of_kind<U: Kind>( &self, objects: &Objects<'_, '_, U>, ) -> Option<Self::Rebind<U>>
fn self_and_ancestors(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn is_ancestor_of(&self, entity: Entity) -> bool
fn query_ancestors<'a, Q: QueryData, F: QueryFilter>( &'a self, query: &'a Query<'_, '_, Q, F>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn query_self_and_ancestors<'a, Q: QueryData, F: QueryFilter>( &'a self, query: &'a Query<'_, '_, Q, F>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn ancestors_of_kind<'a, U: Kind>( &'a self, objects: &'a Objects<'_, '_, U>, ) -> impl Iterator<Item = Self::Rebind<U>> + 'a
fn find_ancestor_of_kind<U: Kind>( &self, objects: &Objects<'_, '_, U>, ) -> Option<Self::Rebind<U>>
fn self_and_descendants_wide(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn self_and_descendants_deep(&self) -> impl Iterator<Item = Self::Rebind<Any>>
fn is_descendant_of(&self, entity: Entity) -> bool
fn descendants_of_kind_wide<'a, U: Kind>( &'a self, objects: &'a Objects<'_, '_, U>, ) -> impl Iterator<Item = Self::Rebind<U>> + 'a
fn descendants_of_kind_deep<'a, U: Kind>( &'a self, objects: &'a Objects<'_, '_, U>, ) -> impl Iterator<Item = Self::Rebind<U>> + 'a
fn query_descendants_wide<'a, Q: QueryData>( &'a self, query: &'a Query<'_, '_, Q>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn query_descendants_deep<'a, Q: QueryData>( &'a self, query: &'a Query<'_, '_, Q>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn query_self_and_descendants_wide<'a, Q: QueryData>( &'a self, query: &'a Query<'_, '_, Q>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn query_self_and_descendants_deep<'a, Q: QueryData>( &'a self, query: &'a Query<'_, '_, Q>, ) -> impl Iterator<Item = QueryItem<'a, Q::ReadOnly>> + 'a
fn find_descendant_of_kind_wide<U: Kind>( &self, objects: &Objects<'_, '_, U>, ) -> Option<Self::Rebind<U>>
fn find_descendant_of_kind_deep<U: Kind>( &self, objects: &Objects<'_, '_, U>, ) -> Option<Self::Rebind<U>>
Source§impl<T: Kind> ObjectInstance<T> for Object<'_, '_, '_, T>
impl<T: Kind> ObjectInstance<T> for Object<'_, '_, '_, T>
Source§impl<T: Kind> ObjectName for Object<'_, '_, '_, T>
impl<T: Kind> ObjectName for Object<'_, '_, '_, T>
Source§impl<'w, 's, 'a, T: Kind> ObjectRebind<T> for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T: Kind> ObjectRebind<T> for Object<'w, 's, 'a, T>
type Rebind<U: Kind> = Object<'w, 's, 'a, U>
Source§fn cast_into_any(self) -> Self::Rebind<Any>
fn cast_into_any(self) -> Self::Rebind<Any>
Casts this object into an
Object<Any>. Read moreimpl<T: Kind> Copy for Object<'_, '_, '_, T>
impl<T: Kind> Eq for Object<'_, '_, '_, T>
Auto Trait Implementations§
impl<'w, 's, 'a, T> Freeze for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T = Any> !RefUnwindSafe for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T> Send for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T> Sync for Object<'w, 's, 'a, T>
impl<'w, 's, 'a, T> Unpin for Object<'w, 's, 'a, T>where
T: Unpin,
impl<'w, 's, 'a, T = Any> !UnwindSafe for Object<'w, 's, 'a, T>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.