#[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
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
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.
§Example
ⓘ
use wkt::Timestamp;
let x = TriggerSpec::new().set_start_time(Timestamp::default()/* use setters */);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.
§Example
ⓘ
use wkt::Timestamp;
let x = TriggerSpec::new().set_or_clear_start_time(Some(Timestamp::default()/* use setters */));
let x = TriggerSpec::new().set_or_clear_start_time(None::<Timestamp>);Sourcepub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_disabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_max_retries<T: Into<i32>>(self, v: T) -> Self
pub fn set_max_retries<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_trigger<T: Into<Option<Trigger>>>(self, v: T) -> Self
pub fn set_trigger<T: Into<Option<Trigger>>>(self, v: T) -> Self
Trait Implementations§
Source§impl Clone for TriggerSpec
impl Clone for TriggerSpec
Source§fn clone(&self) -> TriggerSpec
fn clone(&self) -> TriggerSpec
Returns a duplicate of the value. Read more
1.0.0 · 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 TriggerSpec
impl Debug for TriggerSpec
Source§impl Default for TriggerSpec
impl Default for TriggerSpec
Source§fn default() -> TriggerSpec
fn default() -> TriggerSpec
Returns the “default value” for a type. Read more
Source§impl Message for TriggerSpec
impl Message for TriggerSpec
Source§impl PartialEq for TriggerSpec
impl PartialEq for TriggerSpec
impl StructuralPartialEq for TriggerSpec
Auto Trait Implementations§
impl Freeze for TriggerSpec
impl RefUnwindSafe for TriggerSpec
impl Send for TriggerSpec
impl Sync for TriggerSpec
impl Unpin for TriggerSpec
impl UnwindSafe for TriggerSpec
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