pub struct Aapt2Convert { /* private fields */ }Expand description
Converts an apk between binary and proto formats.
Implementations§
Source§impl Aapt2Convert
impl Aapt2Convert
Sourcepub fn new(output_path: &Path) -> Aapt2Convert
pub fn new(output_path: &Path) -> Aapt2Convert
Initialize aapt2 convert and then specifies output path to convert
Sourcepub fn output_format(
&mut self,
output_format: OutputFormat,
) -> &mut Aapt2Convert
pub fn output_format( &mut self, output_format: OutputFormat, ) -> &mut Aapt2Convert
Format of the output. Accepted values are proto and binary. When not set,
defaults to binary
Sourcepub fn enable_sparse_encoding(
&mut self,
enable_sparse_encoding: bool,
) -> &mut Aapt2Convert
pub fn enable_sparse_encoding( &mut self, enable_sparse_encoding: bool, ) -> &mut Aapt2Convert
Enables encoding sparse entries using a binary search tree. This decreases APK size at the cost of resource retrieval performance
Sourcepub fn keep_raw_values(&mut self, keep_raw_values: bool) -> &mut Aapt2Convert
pub fn keep_raw_values(&mut self, keep_raw_values: bool) -> &mut Aapt2Convert
Preserve raw attribute values in xml files when using the ‘binary’ output format
Sourcepub fn verbose(&mut self, verbose: bool) -> &mut Aapt2Convert
pub fn verbose(&mut self, verbose: bool) -> &mut Aapt2Convert
Enables verbose logging
Sourcepub fn help(&mut self, help: bool) -> &mut Aapt2Convert
pub fn help(&mut self, help: bool) -> &mut Aapt2Convert
Displays this help menu
Trait Implementations§
Source§impl Default for Aapt2Convert
impl Default for Aapt2Convert
Source§fn default() -> Aapt2Convert
fn default() -> Aapt2Convert
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Aapt2Convert
impl RefUnwindSafe for Aapt2Convert
impl Send for Aapt2Convert
impl Sync for Aapt2Convert
impl Unpin for Aapt2Convert
impl UnwindSafe for Aapt2Convert
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more