pub struct PanicHandler<W: Write> { /* private fields */ }
Implementations§
Source§impl<W: Write> PanicHandler<W>
impl<W: Write> PanicHandler<W>
Sourcepub fn new(writer: W) -> Pin<Self>
pub fn new(writer: W) -> Pin<Self>
Create a panic handler from a core::fmt::Write
Note that the returned handler is detached when it goes out of scope so in most cases it’s desired to keep the handler in scope for the full duration of the program.
Additionally, the panic handler implements Deref
for the provided Write
and can be used
in place of the original Write
throughout the app.
Trait Implementations§
Source§impl<W: Write> Deref for PanicHandler<W>
impl<W: Write> Deref for PanicHandler<W>
Source§impl<W: Write> DerefMut for PanicHandler<W>
impl<W: Write> DerefMut for PanicHandler<W>
Auto Trait Implementations§
impl<W> Freeze for PanicHandler<W>where
W: Freeze,
impl<W> RefUnwindSafe for PanicHandler<W>where
W: RefUnwindSafe,
impl<W> Send for PanicHandler<W>where
W: Send,
impl<W> Sync for PanicHandler<W>where
W: Sync,
impl<W> !Unpin for PanicHandler<W>
impl<W> UnwindSafe for PanicHandler<W>where
W: UnwindSafe,
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