Struct proguard::StackTrace [−][src]
A full Java StackTrace as printed by Throwable.printStackTrace()
.
Implementations
impl<'s> StackTrace<'s>
[src]
pub fn new(
exception: Option<Throwable<'s>>,
frames: Vec<StackFrame<'s>>
) -> Self
[src]
exception: Option<Throwable<'s>>,
frames: Vec<StackFrame<'s>>
) -> Self
Create a new StackTrace.
pub fn with_cause(
exception: Option<Throwable<'s>>,
frames: Vec<StackFrame<'s>>,
cause: StackTrace<'s>
) -> Self
[src]
exception: Option<Throwable<'s>>,
frames: Vec<StackFrame<'s>>,
cause: StackTrace<'s>
) -> Self
Create a new StackTrace with cause information.
pub fn try_parse(stacktrace: &'s [u8]) -> Option<Self>
[src]
Parses a StackTrace from a full Java StackTrace.
Examples
use proguard::{StackFrame, StackTrace, Throwable}; let stacktrace = "\ some.CustomException: Crashed! at some.Klass.method(Klass.java:1234) Caused by: some.InnerException at some.Klass2.method2(Klass2.java:5678) "; let parsed = StackTrace::try_parse(stacktrace.as_bytes()); assert_eq!( parsed, Some(StackTrace::with_cause( Some(Throwable::with_message("some.CustomException", "Crashed!")), vec![StackFrame::with_file( "some.Klass", "method", 1234, "Klass.java", )], StackTrace::new( Some(Throwable::new("some.InnerException")), vec![StackFrame::with_file( "some.Klass2", "method2", 5678, "Klass2.java", )] ) )) );
pub fn exception(&self) -> Option<&Throwable<'_>>
[src]
The exception at the top of the StackTrace, if present.
pub fn frames(&self) -> &[StackFrame<'_>]
[src]
All StackFrames following the exception.
pub fn cause(&self) -> Option<&StackTrace<'_>>
[src]
An optional cause describing the inner exception.
Trait Implementations
impl<'s> Clone for StackTrace<'s>
[src]
fn clone(&self) -> StackTrace<'s>
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl<'s> Debug for StackTrace<'s>
[src]
impl<'s> Display for StackTrace<'s>
[src]
impl<'s> PartialEq<StackTrace<'s>> for StackTrace<'s>
[src]
fn eq(&self, other: &StackTrace<'s>) -> bool
[src]
fn ne(&self, other: &StackTrace<'s>) -> bool
[src]
impl<'s> StructuralPartialEq for StackTrace<'s>
[src]
Auto Trait Implementations
impl<'s> RefUnwindSafe for StackTrace<'s>
impl<'s> Send for StackTrace<'s>
impl<'s> Sync for StackTrace<'s>
impl<'s> Unpin for StackTrace<'s>
impl<'s> UnwindSafe for StackTrace<'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> ToString for T where
T: Display + ?Sized,
[src]
T: Display + ?Sized,
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>,