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