Struct ntex_redis::RedisConnector [−][src]
Redis connector
Implementations
impl<A> RedisConnector<A, ()> where
A: Address + Clone,
[src]
A: Address + Clone,
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]
A: Address + Clone,
T: Service<Request = Connect<A>, Error = ConnectError>,
T::Response: AsyncRead + AsyncWrite + Unpin + 'static,
pub fn password<U>(self, password: U) -> Self where
U: AsRef<str>,
[src]
U: AsRef<str>,
Add redis auth password
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
pub fn connect_simple(
&self
) -> impl Future<Output = Result<SimpleClient<T::Response>, ConnectError>>
[src]
&self
) -> impl Future<Output = Result<SimpleClient<T::Response>, 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,
A: RefUnwindSafe,
T: RefUnwindSafe,
impl<A, T> Send for RedisConnector<A, T> where
A: Send,
T: Send,
A: Send,
T: Send,
impl<A, T> Sync for RedisConnector<A, T> where
A: Sync,
T: Sync,
A: Sync,
T: Sync,
impl<A, T> Unpin for RedisConnector<A, T> where
A: Unpin,
T: Unpin,
A: Unpin,
T: Unpin,
impl<A, T> UnwindSafe for RedisConnector<A, T> where
A: UnwindSafe,
T: UnwindSafe,
A: UnwindSafe,
T: UnwindSafe,
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> 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, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,