pub struct TaskStatus {
pub message: Option<Message>,
pub state: TaskState,
pub timestamp: Option<Timestamp>,
}Expand description
A container for the status of a task
JSON schema
{
"title": "Task Status",
"description": "A container for the status of a task",
"type": "object",
"required": [
"state"
],
"properties": {
"message": {
"description": "A message associated with the status.",
"$ref": "#/definitions/Message"
},
"state": {
"title": "Task State",
"description": "The current state of this task.",
"type": "string",
"enum": [
"TASK_STATE_UNSPECIFIED",
"TASK_STATE_SUBMITTED",
"TASK_STATE_WORKING",
"TASK_STATE_COMPLETED",
"TASK_STATE_FAILED",
"TASK_STATE_CANCELLED",
"TASK_STATE_INPUT_REQUIRED",
"TASK_STATE_REJECTED",
"TASK_STATE_AUTH_REQUIRED"
]
},
"timestamp": {
"description": "ISO 8601 Timestamp when the status was recorded.\n Example: \"2023-10-27T10:00:00Z\"",
"$ref": "#/definitions/Timestamp"
}
},
"additionalProperties": false,
"$schema": "https://json-schema.org/draft/2020-12/schema"
}Fields§
§message: Option<Message>A message associated with the status.
state: TaskStateThe current state of this task.
timestamp: Option<Timestamp>ISO 8601 Timestamp when the status was recorded. Example: “2023-10-27T10:00:00Z”
Implementations§
Source§impl TaskStatus
impl TaskStatus
pub fn builder() -> TaskStatus
Trait Implementations§
Source§impl Clone for TaskStatus
impl Clone for TaskStatus
Source§fn clone(&self) -> TaskStatus
fn clone(&self) -> TaskStatus
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TaskStatus
impl Debug for TaskStatus
Source§impl<'de> Deserialize<'de> for TaskStatus
impl<'de> Deserialize<'de> for TaskStatus
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 From<TaskStatus> for TaskStatus
impl From<TaskStatus> for TaskStatus
Source§fn from(value: TaskStatus) -> Self
fn from(value: TaskStatus) -> Self
Converts to this type from the input type.
Source§impl Serialize for TaskStatus
impl Serialize for TaskStatus
Source§impl TryFrom<TaskStatus> for TaskStatus
impl TryFrom<TaskStatus> for TaskStatus
Source§type Error = ConversionError
type Error = ConversionError
The type returned in the event of a conversion error.
Source§fn try_from(value: TaskStatus) -> Result<Self, ConversionError>
fn try_from(value: TaskStatus) -> Result<Self, ConversionError>
Performs the conversion.
Auto Trait Implementations§
impl Freeze for TaskStatus
impl RefUnwindSafe for TaskStatus
impl Send for TaskStatus
impl Sync for TaskStatus
impl Unpin for TaskStatus
impl UnsafeUnpin for TaskStatus
impl UnwindSafe for TaskStatus
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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