pub struct Context { /* private fields */ }
Implementations§
source§impl Context
impl Context
pub fn new(job: Job, cancellation_token: CancellationToken) -> Self
pub fn id(&self) -> &str
pub fn queue(&self) -> &str
pub fn kind(&self) -> &str
pub fn payload(&self) -> &Value
pub fn deserialize<T>(self) -> Result<T, Error>where
T: DeserializeOwned,
pub fn error_reason(&self) -> &Option<Value>
pub fn lease_time(&self) -> &Duration
pub fn cancellation_token(&self) -> &CancellationToken
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Context
impl RefUnwindSafe for Context
impl Send for Context
impl Sync for Context
impl Unpin for Context
impl UnwindSafe for Context
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