adb_utils/commands/file_transfer/
mod.rs

1pub mod pull;
2pub mod push;
3pub mod sync;
4
5pub use pull::*;
6pub use push::*;
7pub use sync::*;
8
9use std::fmt::Display;
10
11/// Compression algorithm that can be used by all file transfer commands
12pub enum CompressionAlgorithm {
13    Any,
14    None,
15    Brotli,
16    Lz4,
17    Zstd,
18}
19
20impl Display for CompressionAlgorithm {
21    fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
22        write!(
23            f,
24            "{}",
25            match self {
26                CompressionAlgorithm::Any => "any",
27                CompressionAlgorithm::None => "none",
28                CompressionAlgorithm::Brotli => "brotli",
29                CompressionAlgorithm::Lz4 => "lz4",
30                CompressionAlgorithm::Zstd => "zstd",
31            }
32        )
33    }
34}