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§
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
Object Safety§
This trait is not object safe.