Struct entity_data::state::AnyState
source · pub struct AnyState(_);
Implementations§
source§impl AnyState
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 !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