pub enum Selector {
Type(String),
Id(String),
TestId(String),
Class(String),
Attribute {
name: String,
value: String,
},
Descendant(Box<Selector>, Box<Selector>),
Child(Box<Selector>, Box<Selector>),
}Expand description
Parsed selector.
Variants§
Type(String)
Match by widget type name
Id(String)
Match by ID (e.g., #my-id)
TestId(String)
Match by test ID (e.g., [data-testid='foo'])
Class(String)
Match by class (e.g., .my-class)
Attribute
Match by attribute (e.g., [aria-label='foo'])
Descendant(Box<Selector>, Box<Selector>)
Descendant combinator (e.g., Container Button)
Child(Box<Selector>, Box<Selector>)
Child combinator (e.g., Row > Button)
Implementations§
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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more