pub struct Apk { /* private fields */ }Implementations§
Source§impl Apk
impl Apk
Sourcepub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
pub fn from_path<P: AsRef<Path>>(path: P) -> Result<Self, Error>
Examples found in repository?
examples/exporter.rs (line 45)
28fn run() -> Result<(), Error> {
29 let apk_path = match env::args().nth(1) {
30 Some(path) => path,
31 None => {
32 println!("Usage: exporter <apk> <path>");
33 return Ok(());
34 }
35 };
36
37 let output = match env::args().nth(2) {
38 Some(path) => path,
39 None => {
40 println!("Usage: exporter <apk> <path>");
41 return Ok(());
42 }
43 };
44
45 let mut apk = Apk::from_path(&apk_path).context("error loading APK")?;
46 apk.export(Path::new(&output), true)
47 .context("APK could not be exported")?;
48
49 Ok(())
50}Sourcepub fn export<P: AsRef<Path>>(
&mut self,
output_path: P,
force: bool,
) -> Result<(), Error>
pub fn export<P: AsRef<Path>>( &mut self, output_path: P, force: bool, ) -> Result<(), Error>
It exports to target output_path the contents of the APK, transcoding the binary XML files found on it.
Examples found in repository?
examples/exporter.rs (line 46)
28fn run() -> Result<(), Error> {
29 let apk_path = match env::args().nth(1) {
30 Some(path) => path,
31 None => {
32 println!("Usage: exporter <apk> <path>");
33 return Ok(());
34 }
35 };
36
37 let output = match env::args().nth(2) {
38 Some(path) => path,
39 None => {
40 println!("Usage: exporter <apk> <path>");
41 return Ok(());
42 }
43 };
44
45 let mut apk = Apk::from_path(&apk_path).context("error loading APK")?;
46 apk.export(Path::new(&output), true)
47 .context("APK could not be exported")?;
48
49 Ok(())
50}Trait Implementations§
Auto Trait Implementations§
impl Freeze for Apk
impl RefUnwindSafe for Apk
impl Send for Apk
impl Sync for Apk
impl Unpin for Apk
impl UnsafeUnpin for Apk
impl UnwindSafe for Apk
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