pub struct IntoInnerError<W> { /* private fields */ }
Expand description
IntoInnerError
occurs when consuming a Writer
fails.
Consuming the Writer
causes a flush to happen. If the flush fails, then
this error is returned, which contains both the original Writer
and
the error that occurred.
The type parameter W
is the unconsumed writer.
Implementations§
source§impl<W> IntoInnerError<W>
impl<W> IntoInnerError<W>
sourcepub fn error(&self) -> &Error
pub fn error(&self) -> &Error
Returns the error which caused the call to into_inner
to fail.
This error was returned when attempting to flush the internal buffer.
sourcepub fn into_error(self) -> Error
pub fn into_error(self) -> Error
Consumes the IntoInnerError
and returns the error which caused the
call to Writer::into_inner
to fail.
Unlike IntoInnerError::error
, this can be used to obtain ownership
of the underlying error.
sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Returns the underlying writer which generated the error.
The returned value can be used for error recovery, such as re-inspecting the buffer.
Trait Implementations§
source§impl<W> Debug for IntoInnerError<W>
impl<W> Debug for IntoInnerError<W>
source§impl<W> Display for IntoInnerError<W>
impl<W> Display for IntoInnerError<W>
source§impl<W: Any> Error for IntoInnerError<W>
impl<W: Any> Error for IntoInnerError<W>
1.30.0 · source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0: use the Display impl or to_string()
Auto Trait Implementations§
impl<W> Freeze for IntoInnerError<W>where
W: Freeze,
impl<W> !RefUnwindSafe for IntoInnerError<W>
impl<W> Send for IntoInnerError<W>where
W: Send,
impl<W> Sync for IntoInnerError<W>where
W: Sync,
impl<W> Unpin for IntoInnerError<W>where
W: Unpin,
impl<W> !UnwindSafe for IntoInnerError<W>
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