pub struct FutureCallReply<'ctx> { /* private fields */ }
Expand description
A future call reply struct that will be return in case the module invoke a blocking command using [call_blocking]. This struct can be used to set unblock handler. Notice that the struct can not outlive the `ctx lifetime, This is because the future handler must be set before the Redis GIL will be released.
Implementations§
Source§impl<'ctx> FutureCallReply<'ctx>
impl<'ctx> FutureCallReply<'ctx>
Sourcepub fn set_unblock_handler<C: FnOnce(&Context, CallResult<'static>)>(
self,
unblock_handler: C,
) -> FutureHandler<C>
pub fn set_unblock_handler<C: FnOnce(&Context, CallResult<'static>)>( self, unblock_handler: C, ) -> FutureHandler<C>
Allow to set an handler that will be called when the command gets unblock. Return [FutureHandler] that can be used to abort the command.
Trait Implementations§
Auto Trait Implementations§
impl<'ctx> Freeze for FutureCallReply<'ctx>
impl<'ctx> RefUnwindSafe for FutureCallReply<'ctx>
impl<'ctx> !Send for FutureCallReply<'ctx>
impl<'ctx> !Sync for FutureCallReply<'ctx>
impl<'ctx> Unpin for FutureCallReply<'ctx>
impl<'ctx> UnwindSafe for FutureCallReply<'ctx>
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