Struct rustis::client::PreparedCommand
source · pub struct PreparedCommand<'a, E, R = ()>where
R: Response,{
pub executor: E,
pub command: Command,
pub custom_converter: Option<Box<dyn Fn(RespBuf, Command, &'a Client) -> Future<'a, R> + Send + Sync>>,
pub retry_on_error: Option<bool>,
/* private fields */
}
Expand description
Wrapper around a command about to be send with a marker for the response type and a few options to decide how the response send back by Redis should be processed.
Fields§
§executor: E
Client, Transaction or Pipeline that will actually send the command to the Redis server.
command: Command
Command to send
custom_converter: Option<Box<dyn Fn(RespBuf, Command, &'a Client) -> Future<'a, R> + Send + Sync>>
Custom converter to transform a RESP Buffer in to R
type
retry_on_error: Option<bool>
Flag to retry sending the command on network error.
Implementations§
source§impl<'a, E, R> PreparedCommand<'a, E, R>where
R: Response,
impl<'a, E, R> PreparedCommand<'a, E, R>where
R: Response,
Trait Implementations§
source§impl<'a, 'b, R: Response> BatchPreparedCommand for PreparedCommand<'a, &'a mut Pipeline<'b>, R>
impl<'a, 'b, R: Response> BatchPreparedCommand for PreparedCommand<'a, &'a mut Pipeline<'b>, R>
source§impl<'a, R: Response> BatchPreparedCommand for PreparedCommand<'a, &'a mut Transaction, R>
impl<'a, R: Response> BatchPreparedCommand for PreparedCommand<'a, &'a mut Transaction, R>
source§impl<'a, R: Response> ClientPreparedCommand<'a, R> for PreparedCommand<'a, &'a Client, R>
impl<'a, R: Response> ClientPreparedCommand<'a, R> for PreparedCommand<'a, &'a Client, R>
source§impl<'a, R> IntoFuture for PreparedCommand<'a, &'a Client, R>where
R: DeserializeOwned + Send + 'a,
impl<'a, R> IntoFuture for PreparedCommand<'a, &'a Client, R>where
R: DeserializeOwned + Send + 'a,
source§impl<'a, R> IntoFuture for PreparedCommand<'a, &'a mut Connection, R>where
R: DeserializeOwned + Send + 'a,
impl<'a, R> IntoFuture for PreparedCommand<'a, &'a mut Connection, R>where
R: DeserializeOwned + Send + 'a,
source§impl<'a, R> IntoFuture for PreparedCommand<'a, &'a mut StandaloneConnection, R>where
R: DeserializeOwned + Send + 'a,
impl<'a, R> IntoFuture for PreparedCommand<'a, &'a mut StandaloneConnection, R>where
R: DeserializeOwned + Send + 'a,
Auto Trait Implementations§
impl<'a, E, R> Freeze for PreparedCommand<'a, E, R>where
E: Freeze,
impl<'a, E, R = ()> !RefUnwindSafe for PreparedCommand<'a, E, R>
impl<'a, E, R> Send for PreparedCommand<'a, E, R>
impl<'a, E, R> Sync for PreparedCommand<'a, E, R>
impl<'a, E, R> Unpin for PreparedCommand<'a, E, R>
impl<'a, E, R = ()> !UnwindSafe for PreparedCommand<'a, E, R>
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