pub struct CustomElementRegistry {
definitions: BTreeMap<String, CustomElementDefinition>,
}Expand description
カスタム要素レジストリ(純粋データ構造)。
Fields§
§definitions: BTreeMap<String, CustomElementDefinition>Implementations§
Source§impl CustomElementRegistry
impl CustomElementRegistry
pub fn new() -> Self
Sourcepub fn define(
&mut self,
name: &str,
observed_attributes: Vec<String>,
) -> Result<(), DefineError>
pub fn define( &mut self, name: &str, observed_attributes: Vec<String>, ) -> Result<(), DefineError>
カスタム要素を登録する。
Sourcepub fn get(&self, name: &str) -> Option<&CustomElementDefinition>
pub fn get(&self, name: &str) -> Option<&CustomElementDefinition>
登録済み定義を取得する。
Sourcepub fn is_defined(&self, name: &str) -> bool
pub fn is_defined(&self, name: &str) -> bool
指定されたタグ名がカスタム要素として登録されているか。
Sourcepub fn matches_defined_pseudo_class(&self, tag_name: &str) -> bool
pub fn matches_defined_pseudo_class(&self, tag_name: &str) -> bool
CSS :defined 疑似クラスの判定。
- 通常の HTML 組み込み要素(ハイフンを含まない、または組み込みタグ): 常に true
- カスタム要素(ハイフンを含む有効なカスタム名): define 済みなら true、未定義なら false
pub fn is_empty(&self) -> bool
Trait Implementations§
Source§impl Clone for CustomElementRegistry
impl Clone for CustomElementRegistry
Source§fn clone(&self) -> CustomElementRegistry
fn clone(&self) -> CustomElementRegistry
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 CustomElementRegistry
impl Debug for CustomElementRegistry
Source§impl Default for CustomElementRegistry
impl Default for CustomElementRegistry
Source§fn default() -> CustomElementRegistry
fn default() -> CustomElementRegistry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CustomElementRegistry
impl RefUnwindSafe for CustomElementRegistry
impl Send for CustomElementRegistry
impl Sync for CustomElementRegistry
impl Unpin for CustomElementRegistry
impl UnsafeUnpin for CustomElementRegistry
impl UnwindSafe for CustomElementRegistry
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