Struct proguard::ProguardMapper [−][src]
A Proguard Remapper.
This can remap class names, stack frames one at a time, or the complete raw stacktrace.
Implementations
impl<'s> ProguardMapper<'s>[src]
pub fn new(mapping: ProguardMapping<'s>) -> Self[src]
Create a new ProguardMapper.
pub fn remap_class(&'s self, class: &str) -> Option<&'s str>[src]
Remaps an obfuscated Class.
This works on the fully-qualified name of the class, with its complete module prefix.
Examples
let mapping = r#"android.arch.core.executor.ArchTaskExecutor -> a.a.a.a.c:"#; let mapper = proguard::ProguardMapper::from(mapping); let mapped = mapper.remap_class("a.a.a.a.c"); assert_eq!(mapped, Some("android.arch.core.executor.ArchTaskExecutor"));
pub fn remap_frame(&'s self, frame: &StackFrame<'s>) -> RemappedFrameIter<'s>ⓘNotable traits for RemappedFrameIter<'m>
impl<'m> Iterator for RemappedFrameIter<'m> type Item = StackFrame<'m>;[src]
Notable traits for RemappedFrameIter<'m>
impl<'m> Iterator for RemappedFrameIter<'m> type Item = StackFrame<'m>;Remaps a single Stackframe.
Returns zero or more StackFrames, based on the information in
the proguard mapping. This can return more than one frame in the case
of inlined functions. In that case, frames are sorted top to bottom.
pub fn remap_throwable<'a>(
&'a self,
throwable: &Throwable<'a>
) -> Option<Throwable<'a>>[src]
&'a self,
throwable: &Throwable<'a>
) -> Option<Throwable<'a>>
Remaps a throwable which is the first line of a full stacktrace.
Example
use proguard::{ProguardMapper, Throwable}; let mapping = "com.example.Mapper -> a.b:"; let mapper = ProguardMapper::from(mapping); let throwable = Throwable::try_parse(b"a.b: Crash").unwrap(); let mapped = mapper.remap_throwable(&throwable); assert_eq!( Some(Throwable::with_message("com.example.Mapper", "Crash")), mapped );
pub fn remap_stacktrace(&self, input: &str) -> Result<String, Error>[src]
Remaps a complete Java StackTrace, similar to Self::remap_stacktrace but instead works on
strings as input and output.
pub fn remap_stacktrace_typed<'a>(
&'a self,
trace: &StackTrace<'a>
) -> StackTrace<'a>[src]
&'a self,
trace: &StackTrace<'a>
) -> StackTrace<'a>
Remaps a complete Java StackTrace.
Trait Implementations
impl<'s> Clone for ProguardMapper<'s>[src]
fn clone(&self) -> ProguardMapper<'s>[src]
pub fn clone_from(&mut self, source: &Self)1.0.0[src]
impl<'s> Debug for ProguardMapper<'s>[src]
impl<'s> From<&'s str> for ProguardMapper<'s>[src]
Auto Trait Implementations
impl<'s> RefUnwindSafe for ProguardMapper<'s>
impl<'s> Send for ProguardMapper<'s>
impl<'s> Sync for ProguardMapper<'s>
impl<'s> Unpin for ProguardMapper<'s>
impl<'s> UnwindSafe for ProguardMapper<'s>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T[src]
pub fn clone_into(&self, target: &mut 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.
pub 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>,