Struct ntex_redis::Client
source · pub struct Client { /* private fields */ }
Expand description
Shared redis client
Implementations§
source§impl Client
impl Client
sourcepub async fn exec<T>(&self, cmd: T) -> Result<T::Output, CommandError>where
T: Command,
pub async fn exec<T>(&self, cmd: T) -> 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
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§async fn call(
&self,
req: Request,
_: ServiceCtx<'_, Self>
) -> Result<Response, Error>
async fn call( &self, req: Request, _: ServiceCtx<'_, Self> ) -> Result<Response, Error>
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§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§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