pub struct LiveComponentRegistries(pub Rc<RefCell<HashMap<LiveType, Box<dyn LiveComponentRegistry>>>>);
Tuple Fields
0: Rc<RefCell<HashMap<LiveType, Box<dyn LiveComponentRegistry>>>>
Implementations
sourceimpl 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
sourceimpl Clone for LiveComponentRegistries
impl Clone for LiveComponentRegistries
sourcefn clone(&self) -> LiveComponentRegistries
fn clone(&self) -> LiveComponentRegistries
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Default for LiveComponentRegistries
impl Default for LiveComponentRegistries
sourcefn 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
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more