pub trait IntoConnectionInfo {
// Required method
fn into_connection_info(self) -> RedisResult<ConnectionInfo>;
}
Expand description
Converts an object into a connection info struct. This allows the constructor of the client to accept connection information in a range of different formats.
Required Methods§
sourcefn into_connection_info(self) -> RedisResult<ConnectionInfo>
fn into_connection_info(self) -> RedisResult<ConnectionInfo>
Converts the object into a connection info object.
Implementations on Foreign Types§
source§impl IntoConnectionInfo for Url
impl IntoConnectionInfo for Url
fn into_connection_info(self) -> RedisResult<ConnectionInfo>
source§impl IntoConnectionInfo for String
impl IntoConnectionInfo for String
URL format: {redis|rediss}://[<username>][:<password>@]<hostname>[:port][/<db>]
- Basic:
redis://127.0.0.1:6379
- Username & Password:
redis://user:password@127.0.0.1:6379
- Password only:
redis://:password@127.0.0.1:6379
- Specifying DB:
redis://127.0.0.1:6379/0
- Enabling TLS:
rediss://127.0.0.1:6379
- Enabling Insecure TLS:
rediss://127.0.0.1:6379/#insecure
fn into_connection_info(self) -> RedisResult<ConnectionInfo>
source§impl<'a> IntoConnectionInfo for &'a str
impl<'a> IntoConnectionInfo for &'a str
URL format: {redis|rediss}://[<username>][:<password>@]<hostname>[:port][/<db>]
- Basic:
redis://127.0.0.1:6379
- Username & Password:
redis://user:password@127.0.0.1:6379
- Password only:
redis://:password@127.0.0.1:6379
- Specifying DB:
redis://127.0.0.1:6379/0
- Enabling TLS:
rediss://127.0.0.1:6379
- Enabling Insecure TLS:
rediss://127.0.0.1:6379/#insecure