pub enum ContainerError {
EngineUnavailable {
detail: String,
},
NoSuchContainer {
name: String,
},
NotRunning {
id: String,
},
StaleIdentity {
name: String,
expected: String,
found: String,
},
NoSuchPath {
id: String,
path: String,
},
CapabilityRefused {
what: String,
},
PoisonedName {
name: String,
},
OutputTooLarge {
what: String,
},
Protocol {
detail: String,
},
Cancelled,
Io {
detail: String,
},
}Expand description
Why a container operation did not produce a result.
Variants§
The local engine cannot be reached: the CLI is missing, the daemon is down, or the probe timed out. Retrying later is meaningful.
NoSuchContainer
The name or id resolved to nothing on the engine.
NotRunning
The container exists but is not running; attach semantics require a running container even though the engine could read stopped ones.
StaleIdentity
A previously resolved identity no longer matches the engine: the
name now maps to a different container, or the same container id
restarted (a new StartedAt incarnation). Old reads, caches and
completions must not attach to the new incarnation.
NoSuchPath
A path inside the container does not exist.
CapabilityRefused
The operation is outside this crate’s read-only capability boundary (writes, arbitrary exec, reading a directory as a file). This is a policy answer, not a failure to be retried.
PoisonedName
A user-supplied name/id could inject CLI options or otherwise cannot be a Docker name or id prefix. Refused before the engine ever sees it.
OutputTooLarge
Bounded capture overflowed: the engine had more to say than the retention limit. A partial listing is never presented as complete.
Protocol
The engine answered but not in the shape its CLI contract promises (non-canonical id, malformed JSON, malformed tar).
Cancelled
The caller’s cancellation token fired.
Io
Anything else the supervised subprocess reported: non-zero exit, deadline, pipe failure. The detail carries a bounded stderr tail.
Trait Implementations§
Source§impl Clone for ContainerError
impl Clone for ContainerError
Source§fn clone(&self) -> ContainerError
fn clone(&self) -> ContainerError
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 ContainerError
impl Debug for ContainerError
Source§impl Display for ContainerError
impl Display for ContainerError
impl Eq for ContainerError
Source§impl Error for ContainerError
impl Error for ContainerError
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()