pub struct IntoInnerError<W>(_, _);
An error returned by 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.
use std::io::BufWriter;
use std::net::TcpStream;
let mut stream = BufWriter::new(TcpStream::connect("127.0.0.1:34254").unwrap());
let stream = match stream.into_inner() {
Ok(s) => s,
Err(e) => {
panic!("An error occurred");
}
};Run
Returns the error which caused the call to into_inner() to fail.
This error was returned when attempting to write the internal buffer.
use std::io::BufWriter;
use std::net::TcpStream;
let mut stream = BufWriter::new(TcpStream::connect("127.0.0.1:34254").unwrap());
let stream = match stream.into_inner() {
Ok(s) => s,
Err(e) => {
println!("{}", e.error());
panic!("An unexpected error occurred.");
}
};Run
Returns the buffered writer instance which generated the error.
The returned object can be used for error recovery, such as
re-inspecting the buffer.
use std::io::BufWriter;
use std::net::TcpStream;
let mut stream = BufWriter::new(TcpStream::connect("127.0.0.1:34254").unwrap());
let stream = match stream.into_inner() {
Ok(s) => s,
Err(e) => {
let buffer = e.into_inner();
buffer.into_inner().unwrap()
}
};Run
Deprecated since 1.33.0:
replaced by Error::source, which can support downcasting
The lower-level cause of this error, if any. Read more
The lower-level source of this error, if any. Read more
Formats the value using the given formatter. Read more
Formats the value using the given formatter. Read more
🔬 This is a nightly-only experimental API. (
try_from #33417)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (
try_from #33417)
🔬 This is a nightly-only experimental API. (
try_from #33417)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (
try_from #33417)
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id #27745)
this method will likely be replaced by an associated static
Converts the given value to a String. Read more