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§
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§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)