pub enum RedisStream {
Tcp(TcpStream),
Unix(UnixStream),
NativeTls(Box<TlsStream<TcpStream>>),
Rustls(Box<TlsStream<TcpStream>>),
}Expand description
Transport abstraction over TCP, Unix, and TLS connections.
Implements AsyncRead + AsyncWrite so it can be used with
tokio_util::codec::Framed. The active variant is determined at
connection time based on the URL scheme or connect method used.
Variants§
Tcp(TcpStream)
Plain TCP connection.
Unix(UnixStream)
Available on Unix only.
Unix domain socket connection.
NativeTls(Box<TlsStream<TcpStream>>)
Available on crate feature
tls-native-tls only.TLS connection via native-tls.
Rustls(Box<TlsStream<TcpStream>>)
Available on crate feature
tls-rustls only.TLS connection via rustls.
Trait Implementations§
Source§impl AsyncRead for RedisStream
impl AsyncRead for RedisStream
Source§impl AsyncWrite for RedisStream
impl AsyncWrite for RedisStream
Source§fn poll_write(
self: Pin<&mut RedisStream>,
cx: &mut Context<'_>,
buf: &[u8],
) -> Poll<Result<usize, Error>>
fn poll_write( self: Pin<&mut RedisStream>, 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 RedisStream>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_flush( self: Pin<&mut RedisStream>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Attempts to flush the object, ensuring that any buffered data reach
their destination. Read more
Source§fn poll_shutdown(
self: Pin<&mut RedisStream>,
cx: &mut Context<'_>,
) -> Poll<Result<(), Error>>
fn poll_shutdown( self: Pin<&mut RedisStream>, cx: &mut Context<'_>, ) -> Poll<Result<(), Error>>
Initiates or attempts to shut down this writer, returning success when
the I/O connection has completely shut down. Read more
Source§fn poll_write_vectored(
self: Pin<&mut Self>,
cx: &mut Context<'_>,
bufs: &[IoSlice<'_>],
) -> Poll<Result<usize, Error>>
fn poll_write_vectored( self: Pin<&mut Self>, cx: &mut Context<'_>, bufs: &[IoSlice<'_>], ) -> Poll<Result<usize, Error>>
Like
poll_write, except that it writes from a slice of buffers. Read moreSource§fn is_write_vectored(&self) -> bool
fn is_write_vectored(&self) -> bool
Determines if this writer has an efficient
poll_write_vectored
implementation. Read moreAuto Trait Implementations§
impl !Freeze for RedisStream
impl !RefUnwindSafe for RedisStream
impl !UnwindSafe for RedisStream
impl Send for RedisStream
impl Sync for RedisStream
impl Unpin for RedisStream
impl UnsafeUnpin for RedisStream
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