ConnectionInfo

Trait ConnectionInfo 

Source
pub trait ConnectionInfo:
    Send
    + Sync
    + Sized {
    // Required methods
    fn new(client: RedisResult<Client>, db_index: i64) -> Self;
    fn get_db(&self) -> i64;
    fn client(&self) -> &RedisResult<Client>;

    // Provided methods
    fn parse_index(url: &Url) -> Option<i64> { ... }
    fn from_url(url: &Url) -> Self { ... }
}
Expand description

Trait for defining redis client creation and db selection

Required Methods§

Source

fn new(client: RedisResult<Client>, db_index: i64) -> Self

Source

fn get_db(&self) -> i64

Source

fn client(&self) -> &RedisResult<Client>

Provided Methods§

Source

fn parse_index(url: &Url) -> Option<i64>

Source

fn from_url(url: &Url) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§