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
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.