pub type ClientStream<S> = Stream<TokioAdapter<S>, TokioAdapter<TlsStream<S>>>;
Expand description
Type alias for the stream type of the client_async()
functions.
Aliased Type§
enum ClientStream<S> {
Plain(TokioAdapter<S>),
Tls(TokioAdapter<TlsStream<S>>),
}
Variants§
Plain(TokioAdapter<S>)
Unencrypted socket stream.
Tls(TokioAdapter<TlsStream<S>>)
Encrypted socket stream.
Trait Implementations
Source§impl<S: AsyncRead + Unpin, T: AsyncRead + Unpin> AsyncRead for Stream<S, T>
impl<S: AsyncRead + Unpin, T: AsyncRead + Unpin> AsyncRead for Stream<S, T>
Source§impl<S: AsyncWrite + Unpin, T: AsyncWrite + Unpin> AsyncWrite for Stream<S, T>
impl<S: AsyncWrite + Unpin, T: AsyncWrite + Unpin> AsyncWrite for Stream<S, T>
Source§fn poll_write(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut Self>, cx: &mut Context<'_>, buf: &[u8], ) -> Poll<Result<usize, Error>>
Attempt to write bytes from
buf
into the object. Read moreSource§fn poll_flush(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut Self>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempt to flush the object, ensuring that any buffered data reach
their destination. Read more