pub enum Drive {
Show 17 variants
Mount {
component: String,
at: Option<String>,
},
Click {
selector: String,
},
Submit {
selector: String,
},
Press {
key: String,
selector: String,
},
Type {
text: String,
selector: String,
},
Choose {
value: String,
selector: String,
},
Hover {
selector: String,
},
Focus {
selector: String,
},
Blur {
selector: String,
},
Raise {
event: String,
target: String,
value: String,
},
DropFile {
target: String,
file: DroppedFile,
},
Navigate {
url: String,
},
Reload,
AdvanceTime {
ms: u64,
},
AnswerFetch {
method: String,
url: String,
status: i64,
body: String,
},
ServeFetchesWithRoutes,
Replay {
actions: Vec<String>,
},
}Expand description
One statement that acts on a page, with its operands evaluated — the unit every page tier is driven in.
Variants§
Mount
Mount C [at "#sel"].
Click
Click SEL.
Submit
Submit SEL.
Press
Press KEY [in SEL]. — the page itself (body) when no element is named.
Type
Type TEXT into SEL.
Choose
Choose VALUE in SEL.
Hover
Hover SEL.
Focus
Focus SEL.
Blur
Blur SEL.
Raise
Raise "offline". — a window event, delivered to the page.
DropFile
Raise "filedropped" on SEL with FILE. — file dropped on the element: its name, type and
content travel with the drop into the handler it reaches.
Navigate to URL.
Reload
Reload the page.
AdvanceTime
Advance time by N., in milliseconds.
AnswerFetch
Given that METHOD "url" answers STATUS with BODY.
ServeFetchesWithRoutes
Serve fetches with routes.
Replay
Replay these actions: a, b, c. — re-run the mounted component’s own actions, by name, in
order, each a turn of its own.
Implementations§
Trait Implementations§
impl Eq for Drive
impl StructuralPartialEq for Drive
Auto Trait Implementations§
impl Freeze for Drive
impl RefUnwindSafe for Drive
impl Send for Drive
impl Sync for Drive
impl Unpin for Drive
impl UnsafeUnpin for Drive
impl UnwindSafe for Drive
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,
§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>
Convert
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>
Convert
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)
Convert
&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)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.