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 Freeze for LiveComponentRegistries
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