Struct WorldProcessor

Source
pub struct WorldProcessor { /* private fields */ }

Implementations§

Source§

impl WorldProcessor

Source

pub fn register_entity_remapping<T: Component>( &mut self, f: impl Fn(&mut T, WorldProcessorEntityMapping<'_>) + Send + Sync + 'static, )

Source

pub fn register_entity_remapping_raw( &mut self, type_hash: TypeHash, f: impl Fn(*mut u8, WorldProcessorEntityMapping<'_>) + Send + Sync + 'static, )

Source

pub fn unregister_entity_remapping<T: Component>(&mut self)

Source

pub fn unregister_entity_remapping_raw(&mut self, type_hash: TypeHash)

Source

pub fn remap_entities<T>( &self, data: &mut T, mappings: WorldProcessorEntityMapping<'_>, )

Source

pub unsafe fn remap_entities_raw( &self, type_hash: TypeHash, pointer: *mut u8, mappings: WorldProcessorEntityMapping<'_>, )

§Safety
Source

pub fn register_entity_inspector<T: Component>( &mut self, f: impl Fn(&T) -> Vec<Entity> + Send + Sync + 'static, )

Source

pub fn register_entity_inspector_raw( &mut self, type_hash: TypeHash, f: impl Fn(*const u8) -> Vec<Entity> + Send + Sync + 'static, )

Source

pub fn unregister_entity_inspector<T: Component>(&mut self)

Source

pub fn unregister_entity_inspector_raw(&mut self, type_hash: TypeHash)

Source

pub fn related_entities<T>(&self, data: &T) -> Vec<Entity>

Source

pub unsafe fn related_entities_raw( &self, type_hash: TypeHash, pointer: *const u8, ) -> Vec<Entity>

§Safety
Source

pub fn register_display_formatter<T: Component + Display>(&mut self)

Source

pub fn register_debug_formatter<T: Component + Debug>(&mut self)

Source

pub fn register_formatter<T: Component>( &mut self, f: impl Fn(&T, &mut Formatter<'_>) -> Result + Send + Sync + 'static, )

Source

pub fn register_formatter_raw( &mut self, type_hash: TypeHash, f: impl Fn(*const u8, &mut Formatter<'_>) -> Result + Send + Sync + 'static, )

Source

pub fn unregister_formatter<T: Component>(&mut self)

Source

pub fn unregister_formatter_raw(&mut self, type_hash: TypeHash)

Source

pub fn format_component<'a, T: Component>( &'a self, data: &'a T, ) -> WorldProcessorComponentFormat<'a, T>

Source

pub unsafe fn format_component_raw( &self, type_hash: TypeHash, pointer: *const u8, ) -> WorldProcessorComponentFormatRaw<'_>

§Safety
Source

pub fn format_world<'a, const LOCKING: bool>( &'a self, world: &'a World, ) -> WorldProcessorWorldFormat<'a, LOCKING>

Trait Implementations§

Source§

impl Default for WorldProcessor

Source§

fn default() -> WorldProcessor

Returns the “default value” for a type. Read more

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> Finalize for T

Source§

unsafe fn finalize_raw(data: *mut ())

Safety Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Initialize for T
where T: Default,

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, 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.
Source§

impl<T> Component for T
where T: Send + Sync + 'static,