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) -> Self
pub fn new(output_path: &Path) -> Self
Initialize aapt2 convert and then specifies output path to convert
Sourcepub fn output_format(&mut self, output_format: OutputFormat) -> &mut Self
pub fn output_format(&mut self, output_format: OutputFormat) -> &mut Self
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 Self
pub fn enable_sparse_encoding( &mut self, enable_sparse_encoding: bool, ) -> &mut Self
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 Self
pub fn keep_raw_values(&mut self, keep_raw_values: bool) -> &mut Self
Preserve raw attribute values in xml files when using the ‘binary’ output format
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> 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