pub struct PortalClient { /* private fields */ }Expand description
Portal client with automatic TCP/ContentProvider fallback.
Implementations§
Source§impl PortalClient
impl PortalClient
pub fn new(device: AdbDevice, prefer_tcp: bool, remote_port: u16) -> Self
Sourcepub async fn connect(&mut self) -> Result<()>
pub async fn connect(&mut self) -> Result<()>
Establish connection, trying TCP first if preferred.
Sourcepub async fn get_state(&self) -> Result<Value>
pub async fn get_state(&self) -> Result<Value>
Get device state (accessibility tree + phone state).
Sourcepub async fn input_text(&self, text: &str, clear: bool) -> Result<bool>
pub async fn input_text(&self, text: &str, clear: bool) -> Result<bool>
Input text via keyboard.
Sourcepub async fn get_apps(&self, include_system: bool) -> Result<Vec<AppInfo>>
pub async fn get_apps(&self, include_system: bool) -> Result<Vec<AppInfo>>
Get installed apps with labels.
Sourcepub async fn get_version(&self) -> Result<String>
pub async fn get_version(&self) -> Result<String>
Get Portal version.
Auto Trait Implementations§
impl Freeze for PortalClient
impl !RefUnwindSafe for PortalClient
impl Send for PortalClient
impl Sync for PortalClient
impl Unpin for PortalClient
impl UnsafeUnpin for PortalClient
impl !UnwindSafe for PortalClient
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