Struct ntex_redis::RedisConnector
source · [−]pub struct RedisConnector<A, T> { /* private fields */ }
Expand description
Redis connector
Implementations
sourceimpl<A> RedisConnector<A, ()> where
A: Address + Clone,
impl<A> RedisConnector<A, ()> where
A: Address + Clone,
sourcepub fn new(address: A) -> RedisConnector<A, Connector<A>>
pub fn new(address: A) -> RedisConnector<A, Connector<A>>
Create new redis connector
sourceimpl<A, T> RedisConnector<A, T> where
A: Address + Clone,
impl<A, T> RedisConnector<A, T> where
A: Address + Clone,
sourcepub fn memory_pool(self, id: PoolId) -> Self
pub fn memory_pool(self, id: PoolId) -> Self
Set memory pool.
Use specified memory pool for memory allocations. By default P7 memory pool is used.
sourcepub fn connector<U>(self, connector: U) -> RedisConnector<A, U> where
U: Service<Connect<A>, Error = ConnectError>,
IoBoxed: From<U::Response>,
pub fn connector<U>(self, connector: U) -> RedisConnector<A, U> where
U: Service<Connect<A>, Error = ConnectError>,
IoBoxed: From<U::Response>,
Use custom connector
sourceimpl<A, T> RedisConnector<A, T> where
A: Address + Clone,
T: Service<Connect<A>, Error = ConnectError>,
IoBoxed: From<T::Response>,
impl<A, T> RedisConnector<A, T> where
A: Address + Clone,
T: Service<Connect<A>, Error = ConnectError>,
IoBoxed: From<T::Response>,
sourcepub fn connect(&self) -> impl Future<Output = Result<Client, ConnectError>>
pub fn connect(&self) -> impl Future<Output = Result<Client, ConnectError>>
Connect to redis server and create shared client
sourcepub fn connect_simple(
&self
) -> impl Future<Output = Result<SimpleClient, ConnectError>>
pub fn connect_simple(
&self
) -> impl Future<Output = Result<SimpleClient, ConnectError>>
Connect to redis server and create simple client
Auto Trait Implementations
impl<A, T> !RefUnwindSafe for RedisConnector<A, T>
impl<A, T> !Send for RedisConnector<A, T>
impl<A, T> !Sync for RedisConnector<A, T>
impl<A, T> Unpin for RedisConnector<A, T> where
A: Unpin,
T: Unpin,
impl<A, T> !UnwindSafe for RedisConnector<A, T>
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