pub struct Selector {
pub text: String,
pub selector_type: SelectorType,
}Expand description
CSS 选择器
Fields§
§text: String选择器文本 (如 “.class”, “#id”, “div”)
selector_type: SelectorType选择器类型(增强版)
Implementations§
Source§impl Selector
impl Selector
Sourcepub fn with_type(text: &str, selector_type: SelectorType) -> Self
pub fn with_type(text: &str, selector_type: SelectorType) -> Self
创建指定类型的选择器
Sourcepub fn is_compound(&self) -> bool
pub fn is_compound(&self) -> bool
判断是否为复合选择器
Trait Implementations§
impl StructuralPartialEq for Selector
Auto Trait Implementations§
impl Freeze for Selector
impl RefUnwindSafe for Selector
impl Send for Selector
impl Sync for Selector
impl Unpin for Selector
impl UnsafeUnpin for Selector
impl UnwindSafe for Selector
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