pub struct AnyState(/* private fields */);Implementations§
Source§impl AnyState
Entity state with arbitrary components.
impl AnyState
Entity state with arbitrary components.
Sourcepub fn downcast_ref<T: ArchetypeState>(&self) -> Option<&T>
pub fn downcast_ref<T: ArchetypeState>(&self) -> Option<&T>
Returns &dyn reference to the contained state.
Sourcepub fn downcast_mut<T: ArchetypeState>(&mut self) -> Option<&mut T>
pub fn downcast_mut<T: ArchetypeState>(&mut self) -> Option<&mut T>
Returns &mut dyn reference to the contained state.
Sourcepub fn downcast<T: ArchetypeState>(self) -> Option<T>
pub fn downcast<T: ArchetypeState>(self) -> Option<T>
Returns the contained state.
Trait Implementations§
Source§impl ArchetypeState for AnyState
impl ArchetypeState for AnyState
fn ty(&self) -> TypeId
fn as_ptr(&self) -> *const u8
fn forget(self)
fn metadata(&self) -> ArchetypeMetadata
fn as_any(&self) -> &dyn Any
fn as_any_mut(&mut self) -> &mut dyn Any
fn num_components(&self) -> usize
fn component_ids(&self) -> SmallVec<[TypeId; 32]>
Auto Trait Implementations§
impl Freeze for AnyState
impl !RefUnwindSafe for AnyState
impl Send for AnyState
impl Sync for AnyState
impl Unpin for AnyState
impl !UnwindSafe for AnyState
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