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 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.
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<StackFrame<'s>> for StackFrame<'s>
impl<'s> PartialEq<StackFrame<'s>> 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 ==
.