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