pub struct NullEntityCallback;Expand description
Null callback for entities not yet in the world.
Trait Implementations§
Source§impl EntityLevelCallback for NullEntityCallback
impl EntityLevelCallback for NullEntityCallback
Source§fn allows_local_position_update(&self) -> bool
fn allows_local_position_update(&self) -> bool
Returns whether direct local position writes may bypass lifecycle callbacks.
Source§fn validate_move(
&self,
_old_pos: DVec3,
_new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn validate_move( &self, _old_pos: DVec3, _new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called before an entity position change is committed.
Source§fn on_move_committed(
&self,
_old_pos: DVec3,
_new_pos: DVec3,
) -> Result<(), EntityMoveError>
fn on_move_committed( &self, _old_pos: DVec3, _new_pos: DVec3, ) -> Result<(), EntityMoveError>
Called after an entity position change has been committed.
Source§fn on_remove(&self, _reason: RemovalReason)
fn on_remove(&self, _reason: RemovalReason)
Called when entity is removed from the world.
Source§fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
fn on_bounding_box_changed(&self, _bounding_box: WorldAabb)
Called after an entity’s collision bounds change without a position change.
Auto Trait Implementations§
impl Freeze for NullEntityCallback
impl RefUnwindSafe for NullEntityCallback
impl Send for NullEntityCallback
impl Sync for NullEntityCallback
impl Unpin for NullEntityCallback
impl UnsafeUnpin for NullEntityCallback
impl UnwindSafe for NullEntityCallback
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>