pub struct TaskRunDetail { /* private fields */ }Expand description
What the engine knows about one task of a run.
Get one from RunDetails::task, RunDetails::task_by_name or
RunDetails::tasks.
for (name, task) in details.tasks() {
println!("{name}: {} (evicted: {})", task.status(), task.is_evicted());
}Implementations§
Source§impl TaskRunDetail
impl TaskRunDetail
Sourcepub fn id(&self) -> &str
pub fn id(&self) -> &str
The engine’s id for this task run — what
RunsClient::cancel takes.
Sourcepub fn error(&self) -> Option<&str>
pub fn error(&self) -> Option<&str>
What went wrong, if anything. None both when nothing was recorded
and when the engine recorded an empty error string — an empty string
was observed even on tasks that succeeded, so it does not mean “an
error happened”.
Sourcepub fn is_evicted(&self) -> bool
pub fn is_evicted(&self) -> bool
Whether this task was taken off its worker.
Sourcepub fn output<T: DeserializeOwned>(&self) -> Result<T>
pub fn output<T: DeserializeOwned>(&self) -> Result<T>
This task’s output, as a T.
§Errors
Error::RunOutput when the task recorded no output or it is not a
T.
Trait Implementations§
Source§impl Clone for TaskRunDetail
impl Clone for TaskRunDetail
Auto Trait Implementations§
impl Forget for TaskRunDetail
impl Freeze for TaskRunDetail
impl Move for TaskRunDetail
impl RefUnwindSafe for TaskRunDetail
impl Send for TaskRunDetail
impl Sync for TaskRunDetail
impl Unpin for TaskRunDetail
impl UnsafeUnpin for TaskRunDetail
impl UnwindSafe for TaskRunDetail
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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