Struct proguard::StackFrame
source · pub struct StackFrame<'s> { /* private fields */ }
Expand description
A Java StackFrame.
Basically a Rust version of the Java StackTraceElement
.
Implementations§
source§impl<'s> StackFrame<'s>
impl<'s> StackFrame<'s>
sourcepub fn with_file(
class: &'s str,
method: &'s str,
line: usize,
file: &'s str
) -> Self
pub fn with_file( class: &'s str, method: &'s str, line: usize, file: &'s str ) -> Self
Create a new StackFrame with file information.
sourcepub fn with_parameters(
class: &'s str,
method: &'s str,
arguments: &'s str
) -> Self
pub fn with_parameters( class: &'s str, method: &'s str, arguments: &'s str ) -> Self
Create a new StackFrame with farguments information and no line. This is useful for when we try to do deobfuscation with no line information.
sourcepub fn try_parse(line: &'s [u8]) -> Option<Self>
pub fn try_parse(line: &'s [u8]) -> Option<Self>
Parses a StackFrame from a line of a Java StackTrace.
Examples
use proguard::StackFrame;
let parsed = StackFrame::try_parse(b" at some.Klass.method(Klass.java:1234)");
assert_eq!(
parsed,
Some(StackFrame::with_file(
"some.Klass",
"method",
1234,
"Klass.java"
))
);
sourcepub fn full_method(&self) -> String
pub fn full_method(&self) -> String
The fully qualified method name, including the class.
sourcepub fn parameters(&self) -> Option<&str>
pub fn parameters(&self) -> Option<&str>
The parameters of the StackFrame
Trait Implementations§
source§impl<'s> Clone for StackFrame<'s>
impl<'s> Clone for StackFrame<'s>
source§fn clone(&self) -> StackFrame<'s>
fn clone(&self) -> StackFrame<'s>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl<'s> Debug for StackFrame<'s>
impl<'s> Debug for StackFrame<'s>
source§impl<'s> Display for StackFrame<'s>
impl<'s> Display for StackFrame<'s>
source§impl<'s> PartialEq for StackFrame<'s>
impl<'s> PartialEq for StackFrame<'s>
source§fn eq(&self, other: &StackFrame<'s>) -> bool
fn eq(&self, other: &StackFrame<'s>) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl<'s> StructuralPartialEq for StackFrame<'s>
Auto Trait Implementations§
impl<'s> RefUnwindSafe for StackFrame<'s>
impl<'s> Send for StackFrame<'s>
impl<'s> Sync for StackFrame<'s>
impl<'s> Unpin for StackFrame<'s>
impl<'s> UnwindSafe for StackFrame<'s>
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