Struct async_imap::Connection
source · pub struct Connection<T: Read + Write + Unpin + Debug> { /* private fields */ }
Expand description
The underlying primitives type. Both Client
(unauthenticated) and Session
(after succesful
login) use a Connection
internally for the TCP stream primitives.
Implementations§
source§impl<T: Read + Write + Unpin + Debug> Connection<T>
impl<T: Read + Write + Unpin + Debug> Connection<T>
sourcepub fn into_inner(self) -> T
pub fn into_inner(self) -> T
Convert this connection into the raw underlying stream.
sourcepub async fn read_response(&mut self) -> Option<Result<ResponseData>>
pub async fn read_response(&mut self) -> Option<Result<ResponseData>>
Read the next response on the connection.
sourcepub async fn run_command_and_check_ok(
&mut self,
command: &str,
unsolicited: Option<Sender<UnsolicitedResponse>>
) -> Result<()>
pub async fn run_command_and_check_ok( &mut self, command: &str, unsolicited: Option<Sender<UnsolicitedResponse>> ) -> Result<()>
Execute a command and check that the next response is a matching done.