pub struct HookContext {
pub entity: Entity,
pub component_id: ComponentId,
pub caller: MaybeLocation,
pub relationship_hook_mode: RelationshipHookMode,
}Expand description
Context provided to a ComponentHook.
Fields§
§entity: EntityThe Entity this hook was invoked for.
component_id: ComponentIdThe ComponentId this hook was invoked for.
caller: MaybeLocationThe caller location is Some if the track_caller feature is enabled.
relationship_hook_mode: RelationshipHookModeConfigures how relationship hooks will run
Trait Implementations§
Source§impl Clone for HookContext
impl Clone for HookContext
Source§fn clone(&self) -> HookContext
fn clone(&self) -> HookContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for HookContext
impl Debug for HookContext
impl Copy for HookContext
Auto Trait Implementations§
impl Freeze for HookContext
impl RefUnwindSafe for HookContext
impl Send for HookContext
impl Sync for HookContext
impl Unpin for HookContext
impl UnwindSafe for HookContext
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> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.