Skip to main content

ARSC

Struct ARSC 

Source
pub struct ARSC { /* private fields */ }
Expand description

Represents an Android Resource Table (ARSC) file.

This struct holds the parsed global string pool and resource packages. It provides methods to query resources by ID or by name.

Implementations§

Source§

impl ARSC

Source

pub fn new(input: &mut &[u8]) -> Result<ARSC, ARCSError>

Parses raw ARSC bytes into an ARSC structure.

Source

pub fn get_resource_value(&self, id: u32) -> Option<String>

Retrieves a resource value by its numeric ID.

Recursively resolves references if the value is a reference type.

Source

pub fn get_resource_value_by_name(&self, name: &str) -> Option<String>

Retrieves a resource value by its resolved name.

Source

pub fn get_resource_name(&self, id: u32) -> Option<String>

Returns the full resource name for a given resource ID.

Uses a cache to speed up repeated lookups.

Trait Implementations§

Source§

impl Debug for ARSC

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl !Freeze for ARSC

§

impl !RefUnwindSafe for ARSC

§

impl Send for ARSC

§

impl !Sync for ARSC

§

impl Unpin for ARSC

§

impl UnsafeUnpin for ARSC

§

impl UnwindSafe for ARSC

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.