pub struct Throwable<'s> { /* private fields */ }
Expand description
A Java Throwable.
This is a Rust version of the first line from a Throwable.printStackTrace()
output in Java.
Implementations§
source§impl<'s> Throwable<'s>
impl<'s> Throwable<'s>
sourcepub fn with_message(class: &'s str, message: &'s str) -> Self
pub fn with_message(class: &'s str, message: &'s str) -> Self
Create a new Throwable with message.
sourcepub fn try_parse(line: &'s [u8]) -> Option<Self>
pub fn try_parse(line: &'s [u8]) -> Option<Self>
Parses a Throwable from the a line of a full Java StackTrace.
§Example
use proguard::Throwable;
let parsed = Throwable::try_parse(b"some.CustomException: Crash!");
assert_eq!(
parsed,
Some(Throwable::with_message("some.CustomException", "Crash!")),
)
Trait Implementations§
source§impl<'s> PartialEq for Throwable<'s>
impl<'s> PartialEq for Throwable<'s>
impl<'s> StructuralPartialEq for Throwable<'s>
Auto Trait Implementations§
impl<'s> Freeze for Throwable<'s>
impl<'s> RefUnwindSafe for Throwable<'s>
impl<'s> Send for Throwable<'s>
impl<'s> Sync for Throwable<'s>
impl<'s> Unpin for Throwable<'s>
impl<'s> UnwindSafe for Throwable<'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