pub struct CurrentJob { /* private fields */ }Implementations§
Source§impl CurrentJob
impl CurrentJob
pub fn attempt(&self) -> u32
pub fn execution_state<T: DeserializeOwned>(&self) -> Result<Option<T>, Error>
pub async fn update_execution_state_in_op<T: Serialize>( &mut self, op: &mut impl AtomicOperation, execution_state: &T, ) -> Result<(), JobError>
pub async fn update_execution_state<T: Serialize>( &mut self, execution_state: T, ) -> Result<(), JobError>
pub fn id(&self) -> &JobId
pub fn pool(&self) -> &PgPool
Auto Trait Implementations§
impl Freeze for CurrentJob
impl !RefUnwindSafe for CurrentJob
impl Send for CurrentJob
impl Sync for CurrentJob
impl Unpin for CurrentJob
impl !UnwindSafe for CurrentJob
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more