pub enum SelectorType {
Tag(String),
Id(String),
Class(String),
Attribute {
name: String,
value: Option<String>,
},
Universal,
Compound(Vec<SelectorType>),
Descendant(Box<SelectorType>, Box<SelectorType>),
Child(Box<SelectorType>, Box<SelectorType>),
}Expand description
CSS 选择器类型
Variants§
Tag(String)
标签选择器: div, p, span
Id(String)
ID 选择器: #id
Class(String)
Class 选择器: .class
Attribute
属性选择器: [attr=value]
Universal
通配符: *
Compound(Vec<SelectorType>)
复合选择器: div.class#id
Descendant(Box<SelectorType>, Box<SelectorType>)
后代选择器: div p
Child(Box<SelectorType>, Box<SelectorType>)
子元素选择器: div > p
Trait Implementations§
Source§impl Clone for SelectorType
impl Clone for SelectorType
Source§fn clone(&self) -> SelectorType
fn clone(&self) -> SelectorType
Returns a duplicate 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 Debug for SelectorType
impl Debug for SelectorType
Source§impl PartialEq for SelectorType
impl PartialEq for SelectorType
impl StructuralPartialEq for SelectorType
Auto Trait Implementations§
impl Freeze for SelectorType
impl RefUnwindSafe for SelectorType
impl Send for SelectorType
impl Sync for SelectorType
impl Unpin for SelectorType
impl UnsafeUnpin for SelectorType
impl UnwindSafe for SelectorType
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