pub struct Dispatch<P> {
pub lease: LeaseId,
pub id: TaskId,
pub pool: PoolId,
pub attempt: u32,
pub payload: Arc<P>,
pub kind: Arc<str>,
pub key: Option<Arc<str>>,
pub timeout: Option<Duration>,
pub deadline: Option<Time>,
pub tags: Tags,
pub group: Labels,
}Expand description
A task handed to an executor.
Fields§
§lease: LeaseIdLease identifying this attempt; pass it back to complete and heartbeat.
id: TaskIdTask id.
pool: PoolIdPool the task runs in.
attempt: u32Attempt number, starting at 1.
payload: Arc<P>Opaque task payload.
kind: Arc<str>Task kind (selects the handler).
key: Option<Arc<str>>Idempotency key, if any.
timeout: Option<Duration>Per-attempt timeout, if any.
deadline: Option<Time>Completion deadline, if any.
Task tags.
group: LabelsLabels of the worker group chosen for this attempt (empty for the unlabeled group); a driver with several groups must run the attempt on a worker of this group.
Trait Implementations§
Auto Trait Implementations§
impl<P> Freeze for Dispatch<P>
impl<P> RefUnwindSafe for Dispatch<P>where
Arc<P>: RefUnwindSafe,
impl<P> Send for Dispatch<P>
impl<P> Sync for Dispatch<P>
impl<P> Unpin for Dispatch<P>
impl<P> UnsafeUnpin for Dispatch<P>where
Arc<P>: UnsafeUnpin,
impl<P> UnwindSafe for Dispatch<P>where
Arc<P>: UnwindSafe,
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