pub struct ADBDevices { /* private fields */ }
Expand description
List connected devices
Implementations§
Source§impl ADBDevices
impl ADBDevices
Sourcepub fn long(self) -> Self
pub fn long(self) -> Self
Examples found in repository?
examples/general/general_info.rs (line 17)
10fn main() {
11 let mut manager = ADBManager::new();
12 match manager.connect("192.168.0.105", 33363) {
13 Ok(()) => println!("Successfully connected"),
14 Err(e) => println!("Could not connect: {}", e),
15 }
16
17 let mut list = ADBDevices::default().long();
18 match manager.execute(&mut list) {
19 Ok(ok) => {
20 println!("{}", ok.to_string());
21
22 let parsed = DeviceInfo::from(ok);
23 println!(
24 "{} {} {}",
25 parsed.product, parsed.model, parsed.transport_id
26 );
27 }
28 Err(err) => println!("Error: {}", err),
29 }
30
31 let mut help = ADBHelp::default();
32 println!("{}", manager.execute(&mut help).unwrap().to_string());
33
34 let mut version = ADBVersion::default();
35 let version = Version::from(manager.execute(&mut version).unwrap());
36 println!(
37 "adb version: {}, version: {}, install: {}",
38 version.adb_version, version.version, version.install_path
39 );
40}
Trait Implementations§
Source§impl ADBCommand for ADBDevices
impl ADBCommand for ADBDevices
Auto Trait Implementations§
impl Freeze for ADBDevices
impl !RefUnwindSafe for ADBDevices
impl Send for ADBDevices
impl Sync for ADBDevices
impl Unpin for ADBDevices
impl !UnwindSafe for ADBDevices
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