#[non_exhaustive]pub struct TriggerSpec {
pub type: Type,
pub start_time: Option<Timestamp>,
pub disabled: bool,
pub max_retries: i32,
pub trigger: Option<Trigger>,
/* private fields */
}Expand description
Task scheduling and trigger settings.
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.type: TypeRequired. Immutable. Trigger type of the user-specified Task.
start_time: Option<Timestamp>Optional. The first run of the task will be after this time. If not specified, the task will run shortly after being submitted if ON_DEMAND and based on the schedule if RECURRING.
disabled: boolOptional. Prevent the task from executing. This does not cancel already running tasks. It is intended to temporarily disable RECURRING tasks.
max_retries: i32Optional. Number of retry attempts before aborting. Set to zero to never attempt to retry a failed task.
trigger: Option<Trigger>Trigger only applies for RECURRING tasks.
Implementations§
Source§impl TriggerSpec
impl TriggerSpec
pub fn new() -> Self
Sourcepub fn set_start_time<T>(self, v: T) -> Self
pub fn set_start_time<T>(self, v: T) -> Self
Sets the value of start_time.
Sourcepub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_start_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of start_time.
Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of disabled.
Sourcepub fn set_max_retries<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_retries<T: Into<i32>>(self, v: T) -> Self
Sets the value of max_retries.
Sourcepub fn set_trigger<T: Into<Option<Trigger>>>(self, v: T) -> Self
pub fn set_trigger<T: Into<Option<Trigger>>>(self, v: T) -> Self
Sets the value of trigger.
Note that all the setters affecting trigger are mutually
exclusive.
Sourcepub fn schedule(&self) -> Option<&String>
pub fn schedule(&self) -> Option<&String>
The value of trigger
if it holds a Schedule, None if the field is not set or
holds a different branch.
Sourcepub fn set_schedule<T: Into<String>>(self, v: T) -> Self
pub fn set_schedule<T: Into<String>>(self, v: T) -> Self
Sets the value of trigger
to hold a Schedule.
Note that all the setters affecting trigger are
mutually exclusive.
Trait Implementations§
Source§impl Clone for TriggerSpec
impl Clone for TriggerSpec
Source§fn clone(&self) -> TriggerSpec
fn clone(&self) -> TriggerSpec
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more