struct CompoundSel {
tag: Option<String>,
id: Option<String>,
classes: Vec<String>,
attrs: Vec<AttrSel>,
not: Vec<CompoundSel>,
is_list: Vec<CompoundSel>,
pos: Vec<PosPseudo>,
pos_of_type: Vec<PosPseudo>,
is_scope: bool,
}Fields§
§tag: Option<String>§id: Option<String>§classes: Vec<String>§attrs: Vec<AttrSel>§not: Vec<CompoundSel>:not(sel1, sel2, ...) の中身(コンパウンドセレクタのみ対応。結合子を含む
複雑なセレクタは非対応)。いずれか1つでも一致すれば不一致とする。
is_list: Vec<CompoundSel>:is(sel1, sel2, ...)/:where(...) の中身(コンパウンドセレクタのみ対応。
仕様上 :where() は詳細度の扱いのみ :is() と異なるが、この処理系は
詳細度を計算しないためマッチ判定は完全に同一として扱う)。いずれか1つでも
一致すれば一致とする(空なら制約なし = 常に一致)。
pos: Vec<PosPseudo>:first-child/:last-child/:only-child/:nth-child(...)。
pos_of_type: Vec<PosPseudo>:first-of-type/:last-of-type/:only-of-type/:nth-of-type(...)
(タグ名が同じ兄弟のみを数える点以外は pos と同じ規則)。
is_scope: bool:scope(Selectors Level 4。丸ごと未対応だった)。マッチ時に呼び出し元が
渡す scope_root(element.querySelectorAll/matches/closest 等の
起点ノード)と一致する場合のみ真になる。詳細は compound_matches 参照。
Trait Implementations§
Source§impl Default for CompoundSel
impl Default for CompoundSel
Source§fn default() -> CompoundSel
fn default() -> CompoundSel
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for CompoundSel
impl RefUnwindSafe for CompoundSel
impl Send for CompoundSel
impl Sync for CompoundSel
impl Unpin for CompoundSel
impl UnsafeUnpin for CompoundSel
impl UnwindSafe for CompoundSel
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