pub enum TaskCoreError {
Codec(String),
InvalidValue(String),
Io(String),
LeaseLost {
task_id: i64,
processing_token: i64,
},
LeaseRenewalTimedOut {
task_id: i64,
processing_token: i64,
},
WorkerShutdownRequested {
task_id: i64,
processing_token: i64,
},
}Expand description
Error returned by shared task helpers before product-level mapping.
Variants§
Codec(String)
A stored task value could not be decoded or serialized.
InvalidValue(String)
A task step or registry lookup failed semantic validation.
Io(String)
Runtime filesystem work failed.
LeaseLost
The current worker lost its processing lease to another worker.
Fields
LeaseRenewalTimedOut
The current worker did not renew its processing lease before the safety deadline.
Fields
WorkerShutdownRequested
The current worker observed shutdown and should release its processing lease.
Implementations§
Source§impl TaskCoreError
impl TaskCoreError
Sourcepub fn invalid_value(message: impl Into<String>) -> Self
pub fn invalid_value(message: impl Into<String>) -> Self
Creates an invalid-value error.
Sourcepub const fn is_task_lease_lost(&self) -> bool
pub const fn is_task_lease_lost(&self) -> bool
Returns whether this error means the current worker lost its lease.
Sourcepub const fn is_task_lease_renewal_timed_out(&self) -> bool
pub const fn is_task_lease_renewal_timed_out(&self) -> bool
Returns whether this error means the current worker’s lease renewal timed out.
Sourcepub const fn is_task_worker_shutdown_requested(&self) -> bool
pub const fn is_task_worker_shutdown_requested(&self) -> bool
Returns whether this error means the current worker should stop for shutdown.
Trait Implementations§
Source§impl Clone for TaskCoreError
impl Clone for TaskCoreError
Source§fn clone(&self) -> TaskCoreError
fn clone(&self) -> TaskCoreError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 TaskCoreError
impl Debug for TaskCoreError
Source§impl Display for TaskCoreError
impl Display for TaskCoreError
Source§impl Error for TaskCoreError
impl Error for TaskCoreError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl PartialEq for TaskCoreError
impl PartialEq for TaskCoreError
Source§fn eq(&self, other: &TaskCoreError) -> bool
fn eq(&self, other: &TaskCoreError) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Eq for TaskCoreError
impl StructuralPartialEq for TaskCoreError
Auto Trait Implementations§
impl Freeze for TaskCoreError
impl RefUnwindSafe for TaskCoreError
impl Send for TaskCoreError
impl Sync for TaskCoreError
impl Unpin for TaskCoreError
impl UnsafeUnpin for TaskCoreError
impl UnwindSafe for TaskCoreError
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Checks if this value is equivalent to the given key. Read more
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.