pub struct AsyncConnection<AS, ASTU>where
AS: AsRawFdOrSocket,
Async<AS>: AsyncRead + AsyncWrite,
ASTU: TlsClientUpgrader<Async<AS>> + Unpin,
ASTU::Output: AsyncRead + AsyncWrite + Unpin,{ /* private fields */ }
Implementations§
Source§impl<AS, ASTU> AsyncConnection<AS, ASTU>where
AS: AsRawFdOrSocket,
Async<AS>: AsyncRead + AsyncWrite + Unpin,
ASTU: TlsClientUpgrader<Async<AS>> + UpgraderExtRefer<Async<AS>> + Unpin,
ASTU::Output: AsyncRead + AsyncWrite + Unpin,
impl<AS, ASTU> AsyncConnection<AS, ASTU>where
AS: AsRawFdOrSocket,
Async<AS>: AsyncRead + AsyncWrite + Unpin,
ASTU: TlsClientUpgrader<Async<AS>> + UpgraderExtRefer<Async<AS>> + Unpin,
ASTU::Output: AsyncRead + AsyncWrite + Unpin,
pub async fn new( stream: UpgradableAsyncStream<Async<AS>, ASTU>, debug: bool, greeting_read: bool, ) -> Self
pub async fn read_greeting(&mut self) -> Result<Vec<u8>>
pub async fn run_command_and_check_ok<S: AsRef<str>>( &mut self, command: S, ) -> Result<()>
pub async fn run_command_and_read_response<S: AsRef<str>>( &mut self, untagged_command: S, ) -> Result<Vec<u8>>
Auto Trait Implementations§
impl<AS, ASTU> Freeze for AsyncConnection<AS, ASTU>
impl<AS, ASTU> !RefUnwindSafe for AsyncConnection<AS, ASTU>
impl<AS, ASTU> Send for AsyncConnection<AS, ASTU>
impl<AS, ASTU> Sync for AsyncConnection<AS, ASTU>
impl<AS, ASTU> Unpin for AsyncConnection<AS, ASTU>
impl<AS, ASTU> !UnwindSafe for AsyncConnection<AS, ASTU>
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