Struct ntex_redis::Client
source · pub struct Client { /* private fields */ }
Expand description
Shared redis client
Implementations§
source§impl Client
impl Client
sourcepub fn exec<T>(
&self,
cmd: T
) -> impl Future<Output = Result<T::Output, CommandError>>where
T: Command,
pub fn exec<T>(
&self,
cmd: T
) -> impl Future<Output = Result<T::Output, CommandError>>where
T: Command,
Execute redis command
sourcepub async fn flushdb(&self) -> Result<(), Error>
pub async fn flushdb(&self) -> Result<(), Error>
Delete all the keys of the currently selected DB.
sourcepub fn is_connected(&self) -> bool
pub fn is_connected(&self) -> bool
Returns true if underlying transport is connected to redis
Trait Implementations§
source§impl Service<Request> for Client
impl Service<Request> for Client
§type Future<'f> = Either<CommandResult, Ready<Response, Error>>
type Future<'f> = Either<CommandResult, Ready<Response, Error>>
The future response value.
source§fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
fn poll_ready(&self, cx: &mut Context<'_>) -> Poll<Result<(), Self::Error>>
Returns
Ready
when the service is able to process requests. Read moresource§fn call(&self, req: Request) -> Self::Future<'_>
fn call(&self, req: Request) -> Self::Future<'_>
Process the request and return the response asynchronously. Read more
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<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Service