[−][src]Struct dex::Dex
Represents a Dex file
Methods
impl<T> Dex<T> where
T: AsRef<[u8]>,
[src]
T: AsRef<[u8]>,
pub fn get_string(&self, string_id: uint) -> Result<Ref<JString>>
[src]
Returns a reference to the JString
represented by the given id.
pub fn get_type(&self, type_id: TypeId) -> Result<Type>
[src]
Returns the Type
represented by the give type_id.
pub fn find_class_by_name(&self, type_descriptor: &str) -> Result<Option<Class>>
[src]
Finds Class
by the given class name. The name should be in smali format.
This method uses binary search to find the class definition using the property
that the strings, type ids and class defs sections are in sorted.
pub fn strings(&self) -> impl Iterator<Item = Result<Ref<JString>>>
[src]
Iterator over the strings
pub fn classes(&self) -> impl Iterator<Item = Result<Class>> + '_
[src]
Iterator over the classes
Trait Implementations
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for EncodedAnnotation where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for AnnotationElement where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for AnnotationItem where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for AnnotationSetRefList where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for AnnotationSetItem where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for ParameterAnnotation where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for MethodAnnotation where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for FieldAnnotation where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for AnnotationsDirectoryItem where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for ClassDataItem where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], dex: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for EncodedValue where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], dex: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S> TryFromCtx<'a, &'_ Dex<S>, [u8]> for EncodedArray where
S: AsRef<[u8]>,
[src]
S: AsRef<[u8]>,
type Error = Error
type Size = usize
fn try_from_ctx(source: &'a [u8], ctx: &Dex<S>) -> Result<(Self, Self::Size)>
[src]
impl<'a, '_, S: AsRef<[u8]>> TryFromCtx<'a, &'_ Dex<S>, [u8]> for MethodHandleItem
[src]
Auto Trait Implementations
impl<T> !Send for Dex<T>
impl<T> !Sync for Dex<T>
impl<T> Unpin for Dex<T>
impl<T> !UnwindSafe for Dex<T>
impl<T> !RefUnwindSafe for Dex<T>
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,