pub struct ComponentRegistry { /* private fields */ }Expand description
Dense component descriptor registry.
Implementations§
Source§impl ComponentRegistry
impl ComponentRegistry
Sourcepub fn register(
&mut self,
descriptor: ComponentDescriptor,
) -> Result<(), ComponentRegistryError>
pub fn register( &mut self, descriptor: ComponentDescriptor, ) -> Result<(), ComponentRegistryError>
Registers a component descriptor.
Sourcepub fn register_generated_schema(
&mut self,
schema: &GeneratedComponentSchema,
) -> Result<ComponentSchema, GeneratedSchemaRegistrationError>
pub fn register_generated_schema( &mut self, schema: &GeneratedComponentSchema, ) -> Result<ComponentSchema, GeneratedSchemaRegistrationError>
Validates and registers a generated component schema.
Sourcepub fn get(&self, id: ComponentId) -> Option<&ComponentDescriptor>
pub fn get(&self, id: ComponentId) -> Option<&ComponentDescriptor>
Gets a descriptor by component id.
Sourcepub fn iter(&self) -> impl Iterator<Item = &ComponentDescriptor>
pub fn iter(&self) -> impl Iterator<Item = &ComponentDescriptor>
Iterates over descriptors.
Trait Implementations§
Source§impl Clone for ComponentRegistry
impl Clone for ComponentRegistry
Source§fn clone(&self) -> ComponentRegistry
fn clone(&self) -> ComponentRegistry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 ComponentRegistry
impl Debug for ComponentRegistry
Source§impl Default for ComponentRegistry
impl Default for ComponentRegistry
Source§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 UnsafeUnpin 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