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§async fn ready(&self, _: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
async fn ready(&self, _: ServiceCtx<'_, Self>) -> Result<(), Self::Error>
Returns when the service is able to process requests. Read more
source§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 Freeze for Client
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
impl<Svc, Req> IntoService<Svc, Req> for Svcwhere
Svc: Service<Req>,
source§fn into_service(self) -> Svc
fn into_service(self) -> Svc
Convert to a
Service