pub struct RedisConnectionInfo { /* private fields */ }Expand description
Redis specific/connection independent information used to establish a connection to redis.
Implementations§
Source§impl RedisConnectionInfo
impl RedisConnectionInfo
Sourcepub fn username(&self) -> Option<&str>
pub fn username(&self) -> Option<&str>
Returns the username that should be used for connection.
Sourcepub fn password(&self) -> Option<&str>
pub fn password(&self) -> Option<&str>
Returns the password that should be used for connection.
Sourcepub fn protocol(&self) -> ProtocolVersion
pub fn protocol(&self) -> ProtocolVersion
Returns version of the protocol to use.
Sourcepub fn skip_set_lib_name(&self) -> bool
pub fn skip_set_lib_name(&self) -> bool
Returns true if the CLIENT SETINFO command should be skipped.
Sourcepub fn set_username(self, username: impl AsRef<str>) -> Self
pub fn set_username(self, username: impl AsRef<str>) -> Self
Sets the username for the connection’s ACL.
Sourcepub fn set_password(self, password: impl AsRef<str>) -> Self
pub fn set_password(self, password: impl AsRef<str>) -> Self
Sets the password for the connection’s ACL.
Sourcepub fn set_protocol(self, protocol: ProtocolVersion) -> Self
pub fn set_protocol(self, protocol: ProtocolVersion) -> Self
Sets the version of the RESP to use.
Sourcepub fn set_skip_set_lib_name(self) -> Self
pub fn set_skip_set_lib_name(self) -> Self
Removes the pipelined CLIENT SETINFO call from the connection creation.
Trait Implementations§
Source§impl Clone for RedisConnectionInfo
impl Clone for RedisConnectionInfo
Source§fn clone(&self) -> RedisConnectionInfo
fn clone(&self) -> RedisConnectionInfo
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedisConnectionInfo
impl Debug for RedisConnectionInfo
Source§impl Default for RedisConnectionInfo
impl Default for RedisConnectionInfo
Source§fn default() -> RedisConnectionInfo
fn default() -> RedisConnectionInfo
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RedisConnectionInfo
impl RefUnwindSafe for RedisConnectionInfo
impl Send for RedisConnectionInfo
impl Sync for RedisConnectionInfo
impl Unpin for RedisConnectionInfo
impl UnwindSafe for RedisConnectionInfo
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more