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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()