pub trait ConnectionManagerContext: Send + Sync + 'static + Sized {
    type ConnectionInfo: ConnectionInfo;

    // Required methods
    fn connection_manager() -> &'static ConnectionManager<Self::ConnectionInfo>;
    fn state_cache(
    ) -> &'static LocalKey<RefCell<Cache<&'static ArcSwapOption<ConnectionState>, Option<Arc<ConnectionState>>>>>;

    // Provided methods
    fn get_connection() -> ManagedConnection<Self> { ... }
    fn client() -> &'static RedisResult<Client> { ... }
    fn get_db() -> i64 { ... }
    fn with_state<T>(with_fn: fn(_: &Option<Arc<ConnectionState>>) -> T) -> T { ... }
}

Required Associated Types§

Required Methods§

source

fn connection_manager() -> &'static ConnectionManager<Self::ConnectionInfo>

source

fn state_cache( ) -> &'static LocalKey<RefCell<Cache<&'static ArcSwapOption<ConnectionState>, Option<Arc<ConnectionState>>>>>

Provided Methods§

source

fn get_connection() -> ManagedConnection<Self>

source

fn client() -> &'static RedisResult<Client>

source

fn get_db() -> i64

source

fn with_state<T>(with_fn: fn(_: &Option<Arc<ConnectionState>>) -> T) -> T

Object Safety§

This trait is not object safe.

Implementors§