Struct ADBTcpDevice

Source
pub struct ADBTcpDevice { /* private fields */ }
Expand description

Represent a device reached and available over USB.

Implementations§

Source§

impl ADBTcpDevice

Source

pub fn new(address: SocketAddr) -> Result<Self>

Instantiate a new ADBTcpDevice

Source

pub fn connect(&mut self) -> Result<()>

Send initial connect

Trait Implementations§

Source§

impl ADBDeviceExt for ADBTcpDevice

Source§

fn shell_command( &mut self, command: &[&str], output: &mut dyn Write, ) -> Result<()>

Runs command in a shell on the device, and write its output and error streams into output.
Source§

fn shell( &mut self, reader: &mut dyn Read, writer: Box<dyn Write + Send>, ) -> Result<()>

Starts an interactive shell session on the device. Input data is read from reader and write to writer.
Source§

fn stat(&mut self, remote_path: &str) -> Result<AdbStatResponse>

Display the stat information for a remote file
Source§

fn pull( &mut self, source: &dyn AsRef<str>, output: &mut dyn Write, ) -> Result<()>

Pull the remote file pointed to by source and write its contents into output
Source§

fn push(&mut self, stream: &mut dyn Read, path: &dyn AsRef<str>) -> Result<()>

Push stream to path on the device.
Source§

fn reboot(&mut self, reboot_type: RebootType) -> Result<()>

Reboot the device using given reboot type
Source§

fn install(&mut self, apk_path: &dyn AsRef<Path>) -> Result<()>

Install an APK pointed to by apk_path on device.
Source§

fn uninstall(&mut self, package: &str) -> Result<()>

Uninstall the package package from device.
Source§

fn framebuffer_inner(&mut self) -> Result<ImageBuffer<Rgba<u8>, Vec<u8>>>

Inner method requesting framebuffer from an Android device
Source§

fn run_activity(&mut self, package: &str, activity: &str) -> Result<Vec<u8>>

Run activity from package on device. Return the command output.
Source§

fn framebuffer(&mut self, path: &dyn AsRef<Path>) -> Result<()>

Dump framebuffer of this device into given path
Source§

fn framebuffer_bytes(&mut self) -> Result<Vec<u8>>

Dump framebuffer of this device and return corresponding bytes. Read more
Source§

fn boxed(self) -> Box<dyn ADBDeviceExt>
where Self: Sized + 'static,

Return a boxed instance representing this trait
Source§

impl Debug for ADBTcpDevice

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Drop for ADBTcpDevice

Source§

fn drop(&mut self)

Executes the destructor for this type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V