Struct ComponentRegistry
pub struct ComponentRegistry { /* private fields */ }Expand description
Component registry for managing loaded components
Implementations§
§impl ComponentRegistry
impl ComponentRegistry
pub fn register(
&mut self,
component_type: ComponentType,
component_id: ComponentId,
)
pub fn register( &mut self, component_type: ComponentType, component_id: ComponentId, )
Register a component
pub fn get(&self, component_type: ComponentType) -> Option<&ComponentId>
pub fn get(&self, component_type: ComponentType) -> Option<&ComponentId>
Get a component identifier
pub fn is_registered(&self, component_type: ComponentType) -> bool
pub fn is_registered(&self, component_type: ComponentType) -> bool
Check if a component type is registered
pub fn all_components(
&self,
) -> impl Iterator<Item = (&ComponentType, &ComponentId)>
pub fn all_components( &self, ) -> impl Iterator<Item = (&ComponentType, &ComponentId)>
Get all registered components
Trait Implementations§
§impl Clone for ComponentRegistry
impl Clone for ComponentRegistry
§fn clone(&self) -> ComponentRegistry
fn clone(&self) -> ComponentRegistry
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 more§impl Debug for ComponentRegistry
impl Debug for ComponentRegistry
§impl Default for ComponentRegistry
impl Default for ComponentRegistry
§fn default() -> ComponentRegistry
fn default() -> ComponentRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for ComponentRegistry
impl RefUnwindSafe for ComponentRegistry
impl Send for ComponentRegistry
impl Sync for ComponentRegistry
impl Unpin for ComponentRegistry
impl UnwindSafe 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