ecs_observer_t

Struct ecs_observer_t 

Source
#[repr(C)]
pub struct ecs_observer_t {
Show 18 fields pub hdr: ecs_header_t, pub filter: ecs_filter_t, pub events: [ecs_entity_t; 8], pub event_count: i32, pub callback: ecs_iter_action_t, pub run: ecs_run_action_t, pub ctx: *mut c_void, pub binding_ctx: *mut c_void, pub ctx_free: ecs_ctx_free_t, pub binding_ctx_free: ecs_ctx_free_t, pub observable: *mut ecs_observable_t, pub last_event_id: *mut i32, pub last_event_id_storage: i32, pub register_id: ecs_id_t, pub term_index: i32, pub is_monitor: bool, pub is_multi: bool, pub dtor: ecs_poly_dtor_t,
}
Expand description

An observer reacts to events matching a filter

Fields§

§hdr: ecs_header_t§filter: ecs_filter_t

< Query for observer

§events: [ecs_entity_t; 8]

Observer events

§event_count: i32§callback: ecs_iter_action_t

< See ecs_observer_desc_t::callback

§run: ecs_run_action_t

< See ecs_observer_desc_t::run

§ctx: *mut c_void

< Callback context

§binding_ctx: *mut c_void

< Binding context (for language bindings)

§ctx_free: ecs_ctx_free_t

< Callback to free ctx

§binding_ctx_free: ecs_ctx_free_t

< Callback to free binding_ctx

§observable: *mut ecs_observable_t

< Observable for observer

§last_event_id: *mut i32

< Last handled event id

§last_event_id_storage: i32§register_id: ecs_id_t

< Id observer is registered with (single term observers only)

§term_index: i32

< Index of the term in parent observer (single term observers only)

§is_monitor: bool

< If true, the observer only triggers when the filter did not match with the entity before the event happened.

§is_multi: bool

< If true, the observer triggers on more than one term

§dtor: ecs_poly_dtor_t

Mixins

Trait Implementations§

Source§

impl Clone for ecs_observer_t

Source§

fn clone(&self) -> ecs_observer_t

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ecs_observer_t

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Copy for ecs_observer_t

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.