pub struct IntoInnerError<W>(/* private fields */);Expand description
An error returned by BufWriter::into_inner which combines an error that
happened while writing out the buffer, and the buffered writer object
which may be used to recover from the condition.
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 BufWriter::into_inner()
to fail.
This error was returned when attempting to write the internal buffer.
Sourcepub fn into_inner(self) -> W
pub fn into_inner(self) -> W
Returns the buffered writer instance which generated the error.
The returned object can be used for error recovery, such as re-inspecting the 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
BufWriter::into_inner() to fail. Unlike error, this can be used to
obtain ownership of the underlying error.
Sourcepub fn into_parts(self) -> (Error, W)
pub fn into_parts(self) -> (Error, W)
Consumes the IntoInnerError and returns the error which caused the call to
BufWriter::into_inner() to fail, and the underlying writer.
This can be used to simply obtain ownership of the underlying error; it can also be used for advanced error recovery.