pub struct Execution<J> { /* private fields */ }Expand description
Details of an execution of a job.
Implementations§
Source§impl<J> Execution<J>
impl<J> Execution<J>
Sourcepub const fn id(&self) -> ExecutionId
pub const fn id(&self) -> ExecutionId
Return the ID of the execution.
Sourcepub const fn executor_id(&self) -> Option<ExecutorId>
pub const fn executor_id(&self) -> Option<ExecutorId>
Return the executor ID that executed the job, if any.
Sourcepub const fn status(&self) -> ExecutionStatus
pub const fn status(&self) -> ExecutionStatus
Return the status of the execution.
Sourcepub const fn created_at(&self) -> SystemTime
pub const fn created_at(&self) -> SystemTime
Return the timestamp when the execution was created.
Sourcepub const fn started_at(&self) -> Option<SystemTime>
pub const fn started_at(&self) -> Option<SystemTime>
Return the timestamp when the execution started.
Sourcepub const fn succeeded_at(&self) -> Option<SystemTime>
pub const fn succeeded_at(&self) -> Option<SystemTime>
Return the timestamp when the execution successfully completed.
Sourcepub const fn failed_at(&self) -> Option<SystemTime>
pub const fn failed_at(&self) -> Option<SystemTime>
Return the timestamp when the execution failed.
Sourcepub const fn cancelled_at(&self) -> Option<SystemTime>
pub const fn cancelled_at(&self) -> Option<SystemTime>
Return the timestamp when the execution was cancelled.
Sourcepub fn ended_at(&self) -> Option<SystemTime>
pub fn ended_at(&self) -> Option<SystemTime>
Get the end time of the execution, if any.
This is the time when the execution either succeeded, failed, or was cancelled.
Sourcepub fn output(&self) -> Result<Option<J::Output>>where
J: JobType,
pub fn output(&self) -> Result<Option<J::Output>>where
J: JobType,
Parse the output of the execution.
Sourcepub fn output_json(&self) -> Option<&str>
pub fn output_json(&self) -> Option<&str>
Return the raw JSON output of the execution.
Sourcepub fn failure_reason(&self) -> Option<&str>
pub fn failure_reason(&self) -> Option<&str>
Return the failure reason if the execution failed or was cancelled.
Trait Implementations§
Auto Trait Implementations§
impl<J> Freeze for Execution<J>
impl<J> RefUnwindSafe for Execution<J>where
J: RefUnwindSafe,
impl<J> Send for Execution<J>where
J: Send,
impl<J> Sync for Execution<J>where
J: Sync,
impl<J> Unpin for Execution<J>where
J: Unpin,
impl<J> UnsafeUnpin for Execution<J>
impl<J> UnwindSafe for Execution<J>where
J: UnwindSafe,
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request