pub struct ComponentRegistry { /* private fields */ }Expand description
Реестр компонентов с индексами по элементам, атрибутам и директивам.
Implementations§
Source§impl ComponentRegistry
impl ComponentRegistry
Sourcepub fn builtin() -> Self
pub fn builtin() -> Self
Загружает встроенный реестр.
Встроенный registry.toml корректен по построению; если бы он не
разбирался, это ошибка сборки, поэтому здесь допустимо ожидать
успешного разбора.
Sourcepub fn all(&self) -> &[ComponentInfo]
pub fn all(&self) -> &[ComponentInfo]
Все компоненты, известные реестру.
Sourcepub fn by_name(&self, name: &str) -> Option<&ComponentInfo>
pub fn by_name(&self, name: &str) -> Option<&ComponentInfo>
Компонент по имени крейта.
Sourcepub fn component_for_element(&self, tag: &str) -> Option<&ComponentInfo>
pub fn component_for_element(&self, tag: &str) -> Option<&ComponentInfo>
Компонент, предоставляющий тег.
Sourcepub fn component_for_attribute(&self, attr: &str) -> Option<&ComponentInfo>
pub fn component_for_attribute(&self, attr: &str) -> Option<&ComponentInfo>
Компонент, предоставляющий атрибут.
Sourcepub fn component_for_directive(&self, dir: &str) -> Option<&ComponentInfo>
pub fn component_for_directive(&self, dir: &str) -> Option<&ComponentInfo>
Компонент, предоставляющий директиву.
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