[][src]Struct panic_write::PanicHandler

pub struct PanicHandler<W: Write> { /* fields omitted */ }

Implementations

impl<W: Write> PanicHandler<W>[src]

#[must_use = "the panic handler must be kept in scope"]pub fn new(writer: W) -> Pin<Self>[src]

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.

pub fn detach(handler: Pin<Self>) -> W[src]

Detach this panic handler and return the underlying writer

Trait Implementations

impl<W: Write> Deref for PanicHandler<W>[src]

type Target = W

The resulting type after dereferencing.

impl<W: Write> DerefMut for PanicHandler<W>[src]

impl<W: Write> Drop for PanicHandler<W>[src]

Auto Trait Implementations

impl<W> Send for PanicHandler<W> where
    W: Send

impl<W> Sync for PanicHandler<W> where
    W: Sync

impl<W> !Unpin for PanicHandler<W>

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, 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.