pub struct RedisConnectOptions { /* private fields */ }Expand description
Options for connections, including credentials.
Implementationsยง
Sourceยงimpl RedisConnectOptions
impl RedisConnectOptions
pub fn set_db(&mut self, db: u32) -> &mut Self
pub fn username(&self) -> Option<&str>
pub fn set_username(&mut self, username: Option<String>) -> &mut Self
pub fn password(&self) -> Option<&str>
pub fn set_password(&mut self, password: Option<String>) -> &mut Self
pub fn enable_cluster(&self) -> bool
Sourcepub fn set_enable_cluster(&mut self, bool: bool) -> &mut Self
pub fn set_enable_cluster(&mut self, bool: bool) -> &mut Self
Enable support for Redis Cluster.
pub fn disable_hostname_verification(&self) -> bool
Sourcepub fn set_disable_hostname_verification(&mut self, bool: bool) -> &mut Self
pub fn set_disable_hostname_verification(&mut self, bool: bool) -> &mut Self
ยงWarning
Only relevant if TLS is enabled and connecting to rediss://.
Trust self-signed certificates. This is insecure. Do not use in production.
pub fn timestamp_format(&self) -> TimestampFormat
Sourcepub fn set_timestamp_format(&mut self, fmt: TimestampFormat) -> &mut Self
pub fn set_timestamp_format(&mut self, fmt: TimestampFormat) -> &mut Self
Set timestamp format. i.e. the default timestamp format is milliseconds, which is recommended by Redis.
pub fn message_field(&self) -> &'static str
Sourcepub fn set_message_field(&mut self, field: &'static str) -> &mut Self
pub fn set_message_field(&mut self, field: &'static str) -> &mut Self
The field used to hold the message. Defaults to crate::MSG.
Trait Implementationsยง
Sourceยงimpl Clone for RedisConnectOptions
impl Clone for RedisConnectOptions
Sourceยงfn clone(&self) -> RedisConnectOptions
fn clone(&self) -> RedisConnectOptions
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 ConnectOptions for RedisConnectOptions
impl ConnectOptions for RedisConnectOptions
Sourceยงfn set_timeout(&mut self, v: Duration) -> RedisResult<&mut Self>
fn set_timeout(&mut self, v: Duration) -> RedisResult<&mut Self>
Timeout for network requests. Defaults to crate::DEFAULT_TIMEOUT.
type Error = RedisErr
fn timeout(&self) -> RedisResult<Duration>
Sourceยงimpl Debug for RedisConnectOptions
impl Debug for RedisConnectOptions
Sourceยงimpl Default for RedisConnectOptions
impl Default for RedisConnectOptions
Sourceยงfn default() -> RedisConnectOptions
fn default() -> RedisConnectOptions
Returns the โdefault valueโ for a type. Read more
Auto Trait Implementationsยง
impl Freeze for RedisConnectOptions
impl RefUnwindSafe for RedisConnectOptions
impl Send for RedisConnectOptions
impl Sync for RedisConnectOptions
impl Unpin for RedisConnectOptions
impl UnwindSafe for RedisConnectOptions
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