Struct PreparedCommand

Source
pub struct PreparedCommand<'a, T, R>
where R: FromValue,
{ pub phantom: PhantomData<R>, pub executor: &'a mut T, pub command: Command, pub keep_command_for_result: bool, pub post_process: Option<Box<dyn Fn(Value, Command, &'a mut dyn ClientTrait) -> Future<'a, R> + Send + Sync>>, }

Fields§

§phantom: PhantomData<R>§executor: &'a mut T§command: Command§keep_command_for_result: bool§post_process: Option<Box<dyn Fn(Value, Command, &'a mut dyn ClientTrait) -> Future<'a, R> + Send + Sync>>

Implementations§

Source§

impl<'a, T, R> PreparedCommand<'a, T, R>
where R: FromValue,

Source

pub fn new(executor: &'a mut T, command: Command) -> Self

Source

pub fn keep_command_for_result(self) -> Self

Source

pub fn post_process( self, post_process: Box<dyn Fn(Value, Command, &'a mut dyn ClientTrait) -> Future<'a, R> + Send + Sync>, ) -> Self

Source

pub fn command(&self) -> &Command

Trait Implementations§

Source§

impl<'a, R> ClientPreparedCommand<'a, R> for PreparedCommand<'a, Client, R>
where R: FromValue + Send + 'a,

Source§

fn forget(self) -> Result<()>

Send command and forget its response

§Errors

Any Redis driver Error that occur during the send operation

Source§

impl<'a, R> ClientPreparedCommand<'a, R> for PreparedCommand<'a, InnerClient, R>
where R: FromValue + Send + 'a,

Source§

fn forget(self) -> Result<()>

Send command and forget its response

§Errors

Any Redis driver Error that occur during the send operation

Source§

impl<'a, R> IntoFuture for PreparedCommand<'a, Client, R>
where R: FromValue + Send + 'a,

Source§

type Output = Result<R, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'a>>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<'a, R> IntoFuture for PreparedCommand<'a, InnerClient, R>
where R: FromValue + Send + 'a,

Source§

type Output = Result<R, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'a>>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<'a, R> IntoFuture for PreparedCommand<'a, MultiplexedClient, R>
where R: FromValue + Send + 'a,

Source§

type Output = Result<R, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'a>>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<'a, R> IntoFuture for PreparedCommand<'a, StandaloneConnection, R>
where R: FromValue + Send + 'a,

Source§

type Output = Result<R, Error>

The output that the future will produce on completion.
Source§

type IntoFuture = Pin<Box<dyn Future<Output = Result<R, Error>> + Send + 'a>>

Which kind of future are we turning this into?
Source§

fn into_future(self) -> Self::IntoFuture

Creates a future from a value. Read more
Source§

impl<'a, R> MultiplexedPreparedCommand<'a, R> for PreparedCommand<'a, MultiplexedClient, R>
where R: FromValue + Send + 'a,

Source§

fn forget(self) -> Result<()>

Send command and forget its response

§Errors

Any Redis driver Error that occur during the send operation

Source§

impl<'a, R> PipelinePreparedCommand<'a, R> for PreparedCommand<'a, Pipeline, R>
where R: FromValue + Send + 'a,

Source§

fn queue(self)

Queue a command.

Source§

fn forget(self)

Queue a command and forget its response.

Source§

impl<'a, R> PipelinePreparedCommand<'a, R> for PreparedCommand<'a, Transaction, R>
where R: FromValue + Send + 'a,

Source§

fn queue(self)

Queue a command into the transaction.

Source§

fn forget(self)

Queue a command into the transaction and forget its response.

Auto Trait Implementations§

§

impl<'a, T, R> Freeze for PreparedCommand<'a, T, R>

§

impl<'a, T, R> !RefUnwindSafe for PreparedCommand<'a, T, R>

§

impl<'a, T, R> Send for PreparedCommand<'a, T, R>
where R: Send, T: Send,

§

impl<'a, T, R> Sync for PreparedCommand<'a, T, R>
where R: Sync, T: Sync,

§

impl<'a, T, R> Unpin for PreparedCommand<'a, T, R>
where R: Unpin,

§

impl<'a, T, R> !UnwindSafe for PreparedCommand<'a, T, R>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> ErasedDestructor for T
where T: 'static,