pub struct RecordingDriver<D: DeviceDriver> { /* private fields */ }Expand description
Proxy driver that records all mutating actions.
Read-only methods (screenshot, get_ui_tree, etc.) pass through without recording.
Implementations§
Source§impl<D: DeviceDriver> RecordingDriver<D>
impl<D: DeviceDriver> RecordingDriver<D>
Trait Implementations§
Source§impl<D: DeviceDriver> DeviceDriver for RecordingDriver<D>
impl<D: DeviceDriver> DeviceDriver for RecordingDriver<D>
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Establish connection to the device.
Source§fn ensure_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn ensure_connected<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connect if not already connected.
Source§fn tap<'life0, 'async_trait>(
&'life0 self,
x: i32,
y: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn tap<'life0, 'async_trait>(
&'life0 self,
x: i32,
y: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Tap at absolute pixel coordinates.
Source§fn swipe<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn swipe<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Swipe from (x1, y1) to (x2, y2) over duration_ms.
Source§fn input_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
clear: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn input_text<'life0, 'life1, 'async_trait>(
&'life0 self,
text: &'life1 str,
clear: bool,
) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Type text into the currently focused field.
Source§fn press_key<'life0, 'async_trait>(
&'life0 self,
keycode: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn press_key<'life0, 'async_trait>(
&'life0 self,
keycode: i32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Send a single key event.
Source§fn drag<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn drag<'life0, 'async_trait>(
&'life0 self,
x1: i32,
y1: i32,
x2: i32,
y2: i32,
duration_ms: u32,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Drag from (x1, y1) to (x2, y2).
Source§fn start_app<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
package: &'life1 str,
activity: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn start_app<'life0, 'life1, 'life2, 'async_trait>(
&'life0 self,
package: &'life1 str,
activity: Option<&'life2 str>,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Launch an application.
Source§fn install_app<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn install_app<'life0, 'life1, 'async_trait>(
&'life0 self,
path: &'life1 Path,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Install an APK.
Source§fn get_apps<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_apps<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<AppInfo>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List installed apps with labels.
Source§fn list_packages<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_packages<'life0, 'async_trait>(
&'life0 self,
include_system: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List installed package names.
Source§fn screenshot<'life0, 'async_trait>(
&'life0 self,
hide_overlay: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn screenshot<'life0, 'async_trait>(
&'life0 self,
hide_overlay: bool,
) -> Pin<Box<dyn Future<Output = Result<Vec<u8>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Take a screenshot (PNG bytes).
Source§fn get_ui_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_ui_tree<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Value>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the accessibility tree + phone state as JSON.
Source§fn get_date<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_date<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<String>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get the device date/time.
Source§fn supported_actions(&self) -> &HashSet<Action>
fn supported_actions(&self) -> &HashSet<Action>
Which actions this driver supports.
Auto Trait Implementations§
impl<D> !Freeze for RecordingDriver<D>
impl<D> RefUnwindSafe for RecordingDriver<D>where
D: RefUnwindSafe,
impl<D> Send for RecordingDriver<D>
impl<D> Sync for RecordingDriver<D>
impl<D> Unpin for RecordingDriver<D>where
D: Unpin,
impl<D> UnsafeUnpin for RecordingDriver<D>where
D: UnsafeUnpin,
impl<D> UnwindSafe for RecordingDriver<D>where
D: UnwindSafe,
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