Struct redis_tang::RedisManager
source · [−]pub struct RedisManager { /* private fields */ }
Implementations
sourceimpl RedisManager
impl RedisManager
pub fn new(params: impl IntoConnectionInfo) -> Self
Trait Implementations
sourceimpl Clone for RedisManager
impl Clone for RedisManager
sourcefn clone(&self) -> RedisManager
fn clone(&self) -> RedisManager
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for RedisManager
impl Debug for RedisManager
sourceimpl GarbageCollect for RedisManager
impl GarbageCollect for RedisManager
fn garbage_collect(&self, shared_pool: &Arc<ManagedPool<Self>>)
sourceimpl Manager for RedisManager
impl Manager for RedisManager
type Connection = MultiplexedConnection
type Error = RedisPoolError
type Timeout = Sleep
type TimeoutError = ()
sourcefn connect(&self) -> ManagerFuture<'_, Result<Self::Connection, Self::Error>>
fn connect(&self) -> ManagerFuture<'_, Result<Self::Connection, Self::Error>>
generate a new connection and put it into pool.
sourcefn is_valid<'a>(
&self,
c: &'a mut Self::Connection
) -> ManagerFuture<'a, Result<(), Self::Error>>
fn is_valid<'a>(
&self,
c: &'a mut Self::Connection
) -> ManagerFuture<'a, Result<(), Self::Error>>
check if a connection is valid. Read more
sourcefn is_closed(&self, _conn: &mut Self::Connection) -> bool
fn is_closed(&self, _conn: &mut Self::Connection) -> bool
check if a connection is closed. Read more
sourcefn spawn<Fut>(&self, fut: Fut) where
Fut: Future<Output = ()> + Send + 'static,
fn spawn<Fut>(&self, fut: Fut) where
Fut: Future<Output = ()> + Send + 'static,
spawn futures on your executor Read more
sourcefn timeout<Fut: Future>(
&self,
fut: Fut,
dur: Duration
) -> ManagerTimeout<Fut, Self::Timeout>
fn timeout<Fut: Future>(
&self,
fut: Fut,
dur: Duration
) -> ManagerTimeout<Fut, Self::Timeout>
Used to cancel futures and return Manager::TimeoutError
. Read more
sourcefn on_start(&self, shared_pool: &SharedManagedPool<Self>)
fn on_start(&self, shared_pool: &SharedManagedPool<Self>)
This method will be called when Pool<Manager>::init()
executes.
sourceimpl ManagerInterval for RedisManager
impl ManagerInterval for RedisManager
sourceimpl ScheduleReaping for RedisManager
impl ScheduleReaping for RedisManager
fn schedule_reaping(&self, shared_pool: &Arc<ManagedPool<Self>>)
Auto Trait Implementations
impl RefUnwindSafe for RedisManager
impl Send for RedisManager
impl Sync for RedisManager
impl Unpin for RedisManager
impl UnwindSafe for RedisManager
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more