pub enum RunError {
Validation(ValidationError),
MissingWork(WorkItemId),
NotATask(WorkItemId),
NotExecuting {
work: WorkItemId,
status: WorkStatus,
},
NotOwner {
work: WorkItemId,
executor: ActorId,
owner: Option<ActorId>,
},
ActorNotAllowed {
actor: ActorId,
action: &'static str,
run: RunId,
executor: ActorId,
},
ManagedNeedsService(RunId),
UnsupportedSource(String),
InvalidTransition {
run: RunId,
from: RunState,
to: RunState,
},
Terminal {
run: RunId,
state: RunState,
},
LinkRefused {
run: RunId,
operation: OperationId,
reason: LinkRefusal,
},
}Expand description
Why a run request was refused.
Variants§
Validation(ValidationError)
The request is malformed.
MissingWork(WorkItemId)
The task is not in the plan.
NotATask(WorkItemId)
Only tasks execute; containers and milestones do not.
NotExecuting
A run starts on claimed or started work, so its executor is already the task’s owner.
NotOwner
The run’s executor is not the task’s owner.
Fields
§
work: WorkItemIdThe task.
ActorNotAllowed
An agent may record only its own runs; a human or service may record any.
Fields
ManagedNeedsService(RunId)
Only a service may label a run managed: nothing else can observe the executor.
UnsupportedSource(String)
A source reference names an asset or artifact the plan does not support.
InvalidTransition
The lifecycle does not allow this transition.
Terminal
The run already ended; a terminal state is final.
LinkRefused
The operation cannot be attributed to the run.
Fields
§
operation: OperationIdThe operation.
§
reason: LinkRefusalWhy the attribution would be wrong; kept as the error’s source.
Trait Implementations§
Source§impl Error for RunError
impl Error for RunError
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 From<ValidationError> for RunError
impl From<ValidationError> for RunError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for RunError
impl RefUnwindSafe for RunError
impl Send for RunError
impl Sync for RunError
impl Unpin for RunError
impl UnsafeUnpin for RunError
impl UnwindSafe for RunError
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