logo
pub struct IntoInnerError<W>(_, _);
Expand description

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.

Examples

use async_std::io::BufWriter;
use async_std::net::TcpStream;

let buf_writer = BufWriter::new(TcpStream::connect("127.0.0.1:34251").await?);

// unwrap the TcpStream and flush the buffer
let stream = match buf_writer.into_inner().await {
    Ok(s) => s,
    Err(e) => {
        // Here, e is an IntoInnerError
        panic!("An error occurred");
    }
};

Trait Implementations

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.