pub struct Actor(/* private fields */);Implementations§
Source§impl Actor
impl Actor
pub fn spawn( world: &mut World, bundle: impl Bundle + Send + Sync + 'static, ) -> Result<Self, WorldError>
pub fn despawn(self, world: &mut World) -> Result<(), WorldError>
pub fn insert( self, world: &mut World, bundle: impl Bundle + Send + Sync + 'static, ) -> Result<(), WorldError>
pub fn remove<T: BundleColumns>( self, world: &mut World, ) -> Result<(), WorldError>
pub fn remove_raw( self, world: &mut World, columns: Vec<ArchetypeColumnInfo>, ) -> Result<(), WorldError>
pub fn exists(self, world: &World) -> bool
pub fn entity(self) -> Entity
pub fn component<const LOCKING: bool, T: Component>( self, world: &World, ) -> Result<ComponentRef<'_, LOCKING, T>, WorldError>
pub fn component_mut<const LOCKING: bool, T: Component>( self, world: &World, ) -> Result<ComponentRefMut<'_, LOCKING, T>, WorldError>
pub fn add_child<const LOCKING: bool>( self, world: &mut World, other: Self, ) -> Result<(), WorldError>
pub fn remove_child<const LOCKING: bool>( self, world: &mut World, other: Self, ) -> Result<(), WorldError>
pub fn children<const LOCKING: bool>( self, world: &World, ) -> impl Iterator<Item = Self> + '_
pub fn parents<const LOCKING: bool>( self, world: &World, ) -> impl Iterator<Item = Self> + '_
pub fn register_message_listener<const LOCKING: bool>( self, world: &World, id: impl ToString, function: ActorMessageFunction, ) -> Result<(), WorldError>
pub fn unregister_message_listener<const LOCKING: bool>( self, world: &World, id: &str, ) -> Result<(), WorldError>
pub fn message_listener<const LOCKING: bool>( self, world: &World, id: &str, ) -> Result<Option<FunctionHandle>, WorldError>
pub fn invoke_message<const LOCKING: bool>( self, world: &World, id: &str, context: &mut Context, registry: &Registry, ) -> Result<(), WorldError>
pub fn dispatch_message<const LOCKING: bool, O: DataStackPack, I: DataStackPack>( self, world: &World, id: &str, context: &mut Context, registry: &Registry, inputs: I, ) -> Result<Option<O>, WorldError>
pub fn dispatch_message_hierarchy<const LOCKING: bool, I: DataStackPack + Clone>( self, world: &World, id: &str, context: &mut Context, registry: &Registry, inputs: I, ) -> Result<(), WorldError>
Trait Implementations§
Source§impl Ord for Actor
impl Ord for Actor
Source§impl PartialOrd for Actor
impl PartialOrd for Actor
impl Copy for Actor
impl Eq for Actor
impl StructuralPartialEq for Actor
Auto Trait Implementations§
impl Freeze for Actor
impl RefUnwindSafe for Actor
impl Send for Actor
impl Sync for Actor
impl Unpin for Actor
impl UnwindSafe for Actor
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<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<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.