Struct redis_async::client::ConnectionBuilder
source · pub struct ConnectionBuilder { /* private fields */ }
Expand description
Connection builder
Implementations§
source§impl ConnectionBuilder
impl ConnectionBuilder
pub fn paired_connect( &self ) -> impl Future<Output = Result<PairedConnection, Error>>
source§impl ConnectionBuilder
impl ConnectionBuilder
pub fn new(host: impl Into<String>, port: u16) -> Result<Self, Error>
sourcepub fn password<V: Into<Arc<str>>>(&mut self, password: V) -> &mut Self
pub fn password<V: Into<Arc<str>>>(&mut self, password: V) -> &mut Self
Set the username used when connecting
sourcepub fn username<V: Into<Arc<str>>>(&mut self, username: V) -> &mut Self
pub fn username<V: Into<Arc<str>>>(&mut self, username: V) -> &mut Self
Set the password used when connecting
sourcepub fn socket_keepalive(&mut self, duration: Option<Duration>) -> &mut Self
pub fn socket_keepalive(&mut self, duration: Option<Duration>) -> &mut Self
Set the socket keepalive duration
sourcepub fn socket_timeout(&mut self, duration: Option<Duration>) -> &mut Self
pub fn socket_timeout(&mut self, duration: Option<Duration>) -> &mut Self
Set the socket timeout duration
source§impl ConnectionBuilder
impl ConnectionBuilder
pub fn pubsub_connect( &self ) -> impl Future<Output = Result<PubsubConnection, Error>>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ConnectionBuilder
impl RefUnwindSafe for ConnectionBuilder
impl Send for ConnectionBuilder
impl Sync for ConnectionBuilder
impl Unpin for ConnectionBuilder
impl UnwindSafe for ConnectionBuilder
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