#[non_exhaustive]pub struct Attempt {
pub schedule_time: Option<Timestamp>,
pub dispatch_time: Option<Timestamp>,
pub response_time: Option<Timestamp>,
pub response_status: Option<Status>,
/* private fields */
}Expand description
The status of a task attempt.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.schedule_time: Option<Timestamp>Output only. The time that this attempt was scheduled.
schedule_time will be truncated to the nearest microsecond.
dispatch_time: Option<Timestamp>Output only. The time that this attempt was dispatched.
dispatch_time will be truncated to the nearest microsecond.
response_time: Option<Timestamp>Output only. The time that this attempt response was received.
response_time will be truncated to the nearest microsecond.
response_status: Option<Status>Output only. The response from the worker for this attempt.
If response_time is unset, then the task has not been attempted or is
currently running and the response_status field is meaningless.
Implementations§
Source§impl Attempt
impl Attempt
pub fn new() -> Self
Sourcepub fn set_schedule_time<T>(self, v: T) -> Self
pub fn set_schedule_time<T>(self, v: T) -> Self
Sets the value of schedule_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_schedule_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_schedule_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_schedule_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of schedule_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_or_clear_schedule_time(Some(Timestamp::default()/* use setters */));
let x = Attempt::new().set_or_clear_schedule_time(None::<Timestamp>);Sourcepub fn set_dispatch_time<T>(self, v: T) -> Self
pub fn set_dispatch_time<T>(self, v: T) -> Self
Sets the value of dispatch_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_dispatch_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_dispatch_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_dispatch_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of dispatch_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_or_clear_dispatch_time(Some(Timestamp::default()/* use setters */));
let x = Attempt::new().set_or_clear_dispatch_time(None::<Timestamp>);Sourcepub fn set_response_time<T>(self, v: T) -> Self
pub fn set_response_time<T>(self, v: T) -> Self
Sets the value of response_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_response_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_response_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_response_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of response_time.
§Example
use wkt::Timestamp;
let x = Attempt::new().set_or_clear_response_time(Some(Timestamp::default()/* use setters */));
let x = Attempt::new().set_or_clear_response_time(None::<Timestamp>);Sourcepub fn set_response_status<T>(self, v: T) -> Self
pub fn set_response_status<T>(self, v: T) -> Self
Sets the value of response_status.
§Example
use rpc::model::Status;
let x = Attempt::new().set_response_status(Status::default()/* use setters */);Sourcepub fn set_or_clear_response_status<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_response_status<T>(self, v: Option<T>) -> Self
Sets or clears the value of response_status.
§Example
use rpc::model::Status;
let x = Attempt::new().set_or_clear_response_status(Some(Status::default()/* use setters */));
let x = Attempt::new().set_or_clear_response_status(None::<Status>);