pub struct TaskOptions {
pub max_retry: u32,
pub timeout: Duration,
pub delay: Option<Duration>,
pub cron: Option<String>,
pub unique_key: Option<String>,
pub priority: i32,
pub depends_on: Option<Vec<String>>,
pub group: Option<String>,
}Expand description
Task options
Fields§
§max_retry: u32Maximum number of retries
timeout: DurationTimeout duration
delay: Option<Duration>Delay execution time (in seconds)
cron: Option<String>Cron expression (for periodic tasks)
unique_key: Option<String>Unique key (for deduplication)
priority: i32Priority (0-100, lower value means higher priority) 0 is highest priority, 100 is lowest priority, default is 50
depends_on: Option<Vec<String>>Task dependencies - list of task IDs that must complete before this task runs
group: Option<String>Group name for task aggregation Tasks with the same group name will be aggregated together
Trait Implementations§
Source§impl Clone for TaskOptions
impl Clone for TaskOptions
Source§fn clone(&self) -> TaskOptions
fn clone(&self) -> TaskOptions
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 TaskOptions
impl Debug for TaskOptions
Source§impl Default for TaskOptions
impl Default for TaskOptions
Source§impl<'de> Deserialize<'de> for TaskOptions
impl<'de> Deserialize<'de> for TaskOptions
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
Auto Trait Implementations§
impl Freeze for TaskOptions
impl RefUnwindSafe for TaskOptions
impl Send for TaskOptions
impl Sync for TaskOptions
impl Unpin for TaskOptions
impl UnsafeUnpin for TaskOptions
impl UnwindSafe for TaskOptions
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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