Struct proguard::StackFrame[][src]

pub struct StackFrame<'s> { /* fields omitted */ }

A Java StackFrame.

Basically a Rust version of the Java StackTraceElement.

Implementations

impl<'s> StackFrame<'s>[src]

pub fn new(class: &'s str, method: &'s str, line: usize) -> Self[src]

Create a new StackFrame.

pub fn with_file(
    class: &'s str,
    method: &'s str,
    line: usize,
    file: &'s str
) -> Self
[src]

Create a new StackFrame with file information.

pub fn try_parse(line: &'s [u8]) -> Option<Self>[src]

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"
    ))
);

pub fn class(&self) -> &str[src]

The class of the StackFrame.

pub fn method(&self) -> &str[src]

The method of the StackFrame.

pub fn full_method(&self) -> String[src]

The fully qualified method name, including the class.

pub fn file(&self) -> Option<&str>[src]

The file of the StackFrame.

pub fn line(&self) -> usize[src]

The line of the StackFrame, 1-based.

Trait Implementations

impl<'s> Clone for StackFrame<'s>[src]

impl<'s> Debug for StackFrame<'s>[src]

impl<'s> Display for StackFrame<'s>[src]

impl<'s> PartialEq<StackFrame<'s>> for StackFrame<'s>[src]

impl<'s> StructuralPartialEq for StackFrame<'s>[src]

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

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.