pub struct ADBPull { /* private fields */ }
Expand description
Copy files/directories from device
Implementations§
Source§impl ADBPull
impl ADBPull
Sourcepub fn new(remote: &str, local: &str) -> Self
pub fn new(remote: &str, local: &str) -> Self
Examples found in repository?
examples/file_transfer/pull.rs (line 16)
9fn main() {
10 let mut manager = ADBManager::new();
11 match manager.connect("192.168.0.105", 33363) {
12 Ok(()) => println!("Successfully connected"),
13 Err(e) => println!("Could not connect: {}", e),
14 }
15
16 let mut pull = ADBPull::new("/storage/emulated/0/DCIM/IMG_00000001.jpg", ".");
17 match manager.execute_path_based(&mut pull) {
18 Ok(ok) => println!("{ok}"),
19 Err(err) => println!("error {err}"),
20 }
21}
Sourcepub fn compression(self, algorithm: CompressionAlgorithm) -> Self
pub fn compression(self, algorithm: CompressionAlgorithm) -> Self
Enable compression with the specified algorithm
Sourcepub fn no_compression(self) -> Self
pub fn no_compression(self) -> Self
Disable compression
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ADBPull
impl !RefUnwindSafe for ADBPull
impl Send for ADBPull
impl Sync for ADBPull
impl Unpin for ADBPull
impl !UnwindSafe for ADBPull
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