pub struct LiveComponentRegistries(pub Rc<RefCell<HashMap<LiveType, Box<dyn LiveComponentRegistry>>>>);
Tuple Fields§
§0: Rc<RefCell<HashMap<LiveType, Box<dyn LiveComponentRegistry>>>>
Implementations§
source§impl LiveComponentRegistries
impl LiveComponentRegistries
pub fn find_component( &self, ty: LiveId, name: LiveId ) -> Option<LiveComponentInfo>
pub fn new() -> Self
pub fn get<T: 'static + LiveComponentRegistry>(&self) -> Ref<'_, T>
pub fn get_or_create<T: 'static + Default + LiveComponentRegistry>( &self ) -> RefMut<'_, T>
Trait Implementations§
source§impl Clone for LiveComponentRegistries
impl Clone for LiveComponentRegistries
source§fn clone(&self) -> LiveComponentRegistries
fn clone(&self) -> LiveComponentRegistries
Returns a copy 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 moresource§impl Default for LiveComponentRegistries
impl Default for LiveComponentRegistries
source§fn default() -> LiveComponentRegistries
fn default() -> LiveComponentRegistries
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for LiveComponentRegistries
impl !Send for LiveComponentRegistries
impl !Sync for LiveComponentRegistries
impl Unpin for LiveComponentRegistries
impl !UnwindSafe for LiveComponentRegistries
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