Struct android_tools::aapt2::Aapt2Convert
source · [−]pub struct Aapt2Convert { /* private fields */ }
Expand description
Converts an apk between binary and proto formats.
Implementations
sourceimpl 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
sourceimpl Default for Aapt2Convert
impl Default for Aapt2Convert
sourcefn default() -> Aapt2Convert
fn default() -> Aapt2Convert
Returns the “default value” for a type. Read more
Auto Trait Implementations
impl RefUnwindSafe for Aapt2Convert
impl Send for Aapt2Convert
impl Sync for Aapt2Convert
impl Unpin for Aapt2Convert
impl UnwindSafe for Aapt2Convert
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more