pub enum SessionError {
NotFound(WorkRef),
Busy {
active: WorkRef,
},
Conflict,
CapacityExceeded,
InvalidInput(String),
StaleRevision {
work: WorkRef,
expected: u64,
actual: u64,
},
NotPaused(WorkRef),
InvalidResume(String),
Closed,
Faulted {
reason: String,
},
ConfigMismatch,
InvalidCheckpoint(String),
}Expand description
Rejections of the session operations.
Request rejections (busy, input, conflict, capacity) are distinct from internal faults: they leave no accepted work behind, and they do not consume a request key.
Variants§
NotFound(WorkRef)
The referenced work does not belong to this session (unknown or foreign).
Busy
The session already holds an active work; no queue and no steering.
Conflict
The request key was reused with different arguments.
CapacityExceeded
The retained-work capacity is exhausted.
InvalidInput(String)
The submitted input is unusable (e.g. empty parts).
StaleRevision
The resume named a revision that is not the work’s current paused revision.
Fields
NotPaused(WorkRef)
The work is not in a resumable (Paused) state.
InvalidResume(String)
The driver rejected the resume request; nothing executed and the paused material is unchanged.
Closed
The owner has been dropped (or the session closed); no new work is accepted. Retained results remain readable, and a same-key replay of an already-accepted request still returns its original receipt — only a new request is rejected.
Faulted
The worker faulted; the session refuses new work until the harness handles it.
ConfigMismatch
The checkpoint’s configuration description does not match the freshly assembled options: restore refuses rather than resuming under a swapped model, tool surface, policy, or limits.
InvalidCheckpoint(String)
The checkpoint is not usable by this runtime: an unsupported envelope version, or internally inconsistent material (an unregistered paused work, a receipt referencing an unknown work, an impossible state). The rejection carries the original checkpoint back untouched.
Trait Implementations§
Source§impl Clone for SessionError
impl Clone for SessionError
Source§fn clone(&self) -> SessionError
fn clone(&self) -> SessionError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SessionError
impl Debug for SessionError
Source§impl Display for SessionError
impl Display for SessionError
impl Eq for SessionError
Source§impl Error for SessionError
impl Error for SessionError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()