pub enum DomQuery<'a> {
Text {
selector: &'a Expr<'a>,
},
Count {
selector: &'a Expr<'a>,
},
Value {
selector: &'a Expr<'a>,
},
Visible {
selector: &'a Expr<'a>,
},
Hidden {
selector: &'a Expr<'a>,
},
Disabled {
selector: &'a Expr<'a>,
},
Checked {
selector: &'a Expr<'a>,
},
Focused {
selector: &'a Expr<'a>,
},
Journal,
JournalShows {
first: Symbol,
second: Symbol,
},
Title,
Url,
}Expand description
What the <thing> of <selector> asks the page.
Variants§
Text
the text of SEL — the element’s text content (its own text plus its descendants’).
Count
the count of SEL — how many elements match.
Value
the value of SEL — an input’s current value.
Visible
SEL is visible — whether anything matches at all.
Hidden
SEL is hidden — the exact complement of visible, so an element is always one or the
other and a test written with either word is complete.
Disabled
SEL is disabled — whether the match carries the disabled attribute. A PRESENCE, like
the render: asking by comparing against the string "false" would call an enabled
control disabled.
Checked
SEL is checked — a checkbox’s or radio’s LIVE state, which is a property rather than an
attribute (see DomOp::SetChecked), so this follows a click.
Focused
SEL is focused — whether the match is the element focus is on.
Journal
the journal — the ACTIONS that have run, in order, as a Seq of Text.
A value rather than a bespoke assertion, so the count of, contains and item N of
all work on it and the ordinary questions need no journal-specific vocabulary.
JournalShows
the journal shows A then B — did A run and B run AFTER it?
The one question a sequence operation cannot ask without an index-of. “Then” means after, not immediately after: pinning adjacency would break a test every time an unrelated turn appeared between the two it cares about.
Title
the title — the page title.
Url
the URL — the current path.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for DomQuery<'a>
impl<'a> RefUnwindSafe for DomQuery<'a>
impl<'a> Send for DomQuery<'a>
impl<'a> Sync for DomQuery<'a>
impl<'a> Unpin for DomQuery<'a>
impl<'a> UnsafeUnpin for DomQuery<'a>
impl<'a> UnwindSafe for DomQuery<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.