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.
Trait Implementations§
impl<T: Read + Write + Unpin + Debug> Unpin for Connection<T>
Auto Trait Implementations§
impl<T> RefUnwindSafe for Connection<T>where
T: RefUnwindSafe,
impl<T> Send for Connection<T>where
T: Send,
impl<T> Sync for Connection<T>where
T: Sync,
impl<T> UnwindSafe for Connection<T>where
T: UnwindSafe,
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more