pub struct ComponentRegistry { /* private fields */ }Expand description
Registry der inspizierbaren Components. Wird einmal aufgebaut und mit der ECS-Welt geteilt.
Implementations§
Source§impl ComponentRegistry
impl ComponentRegistry
pub fn new() -> Self
pub fn register<T>(&mut self, name: &'static str)
pub fn type_names(&self) -> Vec<&'static str>
pub fn has_type(&self, name: &str) -> bool
pub fn entities_with(&self, world: &World, name: &str) -> Option<Vec<Entity>>
pub fn to_json( &self, world: &World, name: &str, entity: Entity, ) -> Option<Value>
pub fn from_json( &self, world: &mut World, name: &str, entity: Entity, value: Value, ) -> Result<(), String>
pub fn type_of(&self, type_id: TypeId) -> Option<&'static str>
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ComponentRegistry
impl !UnwindSafe for ComponentRegistry
impl Freeze for ComponentRegistry
impl Send for ComponentRegistry
impl Sync for ComponentRegistry
impl Unpin for ComponentRegistry
impl UnsafeUnpin for ComponentRegistry
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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> Component for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
Read this value from the supplied reader. Same as
ReadEndian::read_from_little_endian().