Struct ntex_redis::Client [−][src]
pub struct Client { /* fields omitted */ }
Shared redis client
Implementations
impl Client
[src]
pub fn exec<T>(
&self,
cmd: T
) -> impl Future<Output = Result<T::Output, CommandError>> where
T: Command,
[src]
&self,
cmd: T
) -> impl Future<Output = Result<T::Output, CommandError>> where
T: Command,
Execute redis command
pub async fn flushdb(&self) -> Result<(), Error>
[src]
Delete all the keys of the currently selected DB.
pub fn is_connected(&self) -> bool
[src]
Returns true if underlying transport is connected to redis
Trait Implementations
impl Clone for Client
[src]
impl Debug for Client
[src]
impl Service for Client
[src]
type Request = Request
Requests handled by the service.
type Response = Response
Responses given by the service.
type Error = Error
Errors produced by the service.
type Future = Either<CommandResult, Ready<Response, Error>>
The future response value.
fn poll_ready(&self, _cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
[src]
fn call(&self, req: Request) -> Self::Future
[src]
pub fn poll_shutdown(&self, ctx: &mut Context<'_>, is_error: bool) -> Poll<()>
pub fn map<F, R>(self, f: F) -> Map<Self, F, R> where
F: FnMut(Self::Response) -> R,
F: FnMut(Self::Response) -> R,
pub fn map_err<F, E>(self, f: F) -> MapErr<Self, F, E> where
F: Fn(Self::Error) -> E,
F: Fn(Self::Error) -> E,
Auto Trait Implementations
impl !RefUnwindSafe for Client
impl !Send for Client
impl !Sync for Client
impl Unpin for Client
impl !UnwindSafe for Client
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> IntoService<T> for T where
T: Service,
T: Service,
pub fn into_service(self) -> T
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
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>,