pub struct RedisContext {
pub max_attempts: u32,
pub lock_by: Option<String>,
pub meta: Map<String, Value>,
}Expand description
The context for a redis storage job
Fields§
§max_attempts: u32The maximum number of attempts for the task
lock_by: Option<String>The worker that has locked the task, if any
meta: Map<String, Value>Additional metadata associated with the task
Trait Implementations§
Source§impl<Conn: ConnectionLike + Send + Clone + 'static, Res, Encode> Acknowledge<Res, RedisContext, Ulid> for RedisAck<Conn, Encode>
impl<Conn: ConnectionLike + Send + Clone + 'static, Res, Encode> Acknowledge<Res, RedisContext, Ulid> for RedisAck<Conn, Encode>
Source§type Future = Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send>>
type Future = Pin<Box<dyn Future<Output = Result<(), RedisError>> + Send>>
The future returned by the
ack methodSource§type Error = RedisError
type Error = RedisError
The error type returned by the acknowledgment process
Source§fn ack(
&mut self,
res: &Result<Res, BoxDynError>,
parts: &Parts<RedisContext, Ulid>,
) -> Self::Future
fn ack( &mut self, res: &Result<Res, BoxDynError>, parts: &Parts<RedisContext, Ulid>, ) -> Self::Future
Acknowledge the result of a task processing
Source§impl Clone for RedisContext
impl Clone for RedisContext
Source§fn clone(&self) -> RedisContext
fn clone(&self) -> RedisContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RedisContext
impl Debug for RedisContext
Source§impl Default for RedisContext
impl Default for RedisContext
Source§impl<'de> Deserialize<'de> for RedisContext
impl<'de> Deserialize<'de> for RedisContext
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<Args: Sync> FromRequest<Task<Args, RedisContext, Ulid>> for RedisContext
impl<Args: Sync> FromRequest<Task<Args, RedisContext, Ulid>> for RedisContext
Source§type Error = Infallible
type Error = Infallible
The error type that can occur during extraction.
Source§async fn from_request(
req: &Task<Args, RedisContext, Ulid>,
) -> Result<Self, Self::Error>
async fn from_request( req: &Task<Args, RedisContext, Ulid>, ) -> Result<Self, Self::Error>
Perform the extraction.
Source§impl<T: Serialize + DeserializeOwned> MetadataExt<T> for RedisContext
impl<T: Serialize + DeserializeOwned> MetadataExt<T> for RedisContext
Auto Trait Implementations§
impl Freeze for RedisContext
impl RefUnwindSafe for RedisContext
impl Send for RedisContext
impl Sync for RedisContext
impl Unpin for RedisContext
impl UnwindSafe for RedisContext
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