Struct ntex_redis::RedisConnector [−][src]
pub struct RedisConnector<A, T> { /* fields omitted */ }Redis connector
Implementations
impl<A> RedisConnector<A, ()> where
A: Address + Clone, [src]
impl<A> RedisConnector<A, ()> where
A: Address + Clone, [src]pub fn new(address: A) -> RedisConnector<A, Connector<A>>[src]
Create new redis connector
impl<A, T> RedisConnector<A, T> where
A: Address + Clone,
T: Service<Request = Connect<A>, Error = ConnectError>,
T::Response: AsyncRead + AsyncWrite + Unpin + 'static, [src]
impl<A, T> RedisConnector<A, T> where
A: Address + Clone,
T: Service<Request = Connect<A>, Error = ConnectError>,
T::Response: AsyncRead + AsyncWrite + Unpin + 'static, [src]pub fn password<U>(self, password: U) -> Self where
U: AsRef<str>, [src]
U: AsRef<str>,
Add redis auth password
pub fn buffer_params(
self,
max_read_buf_size: u16,
max_write_buf_size: u16,
min_buf_size: u16
) -> Self[src]
self,
max_read_buf_size: u16,
max_write_buf_size: u16,
min_buf_size: u16
) -> Self
Set read/write buffer params
By default read buffer is 16kb, write buffer is 16kb
pub fn connector<U>(self, connector: U) -> RedisConnector<A, U> where
U: Service<Request = Connect<A>, Error = ConnectError>,
U::Response: AsyncRead + AsyncWrite + Unpin + 'static, [src]
U: Service<Request = Connect<A>, Error = ConnectError>,
U::Response: AsyncRead + AsyncWrite + Unpin + 'static,
Use custom connector
pub fn connect(&self) -> impl Future<Output = Result<Client, ConnectError>>[src]
Connect to redis server and create shared client
pub fn connect_simple(
&self
) -> impl Future<Output = Result<SimpleClient, ConnectError>>[src]
&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> where
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<A, T> RefUnwindSafe for RedisConnector<A, T> where
A: RefUnwindSafe,
T: RefUnwindSafe, impl<A, T> Send for RedisConnector<A, T> where
A: Send,
T: Send,
impl<A, T> Send for RedisConnector<A, T> where
A: Send,
T: Send, impl<A, T> Sync for RedisConnector<A, T> where
A: Sync,
T: Sync,
impl<A, T> Sync for RedisConnector<A, T> where
A: Sync,
T: Sync, impl<A, T> Unpin for RedisConnector<A, T> where
A: Unpin,
T: Unpin,
impl<A, T> Unpin for RedisConnector<A, T> where
A: Unpin,
T: Unpin, impl<A, T> UnwindSafe for RedisConnector<A, T> where
A: UnwindSafe,
T: UnwindSafe,
impl<A, T> UnwindSafe for RedisConnector<A, T> where
A: UnwindSafe,
T: UnwindSafe, Blanket Implementations
impl<T> Instrument for T[src]
impl<T> Instrument for T[src]pub fn instrument(self, span: Span) -> Instrumented<Self>[src]
pub fn in_current_span(self) -> Instrumented<Self>[src]
impl<T> Same<T> for T
impl<T> Same<T> for Ttype Output = T
Should always be Self