#[non_exhaustive]pub enum EnvironmentError {
EmptyName,
NameContainsEquals {
entry: String,
},
MissingForExec {
variable: &'static str,
program: String,
declared: String,
},
}Expand description
A fault in an environment DECLARATION, or in launching against one.
Separate from HarnessError because a declaration is validated where it is read —
in a document checker, in a CLI, in a launcher — long before any harness exists to
report through. From carries it onto the seam when a launch is what failed.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
EmptyName
A declared entry has an empty variable name.
No process environment can carry one, so the entry is an unfilled template rather than a variable anybody meant to pass through.
NameContainsEquals
A declared entry is a KEY=VALUE pair rather than a name.
The declaration passes a variable THROUGH: its value comes from the launching context. Splitting the pair silently would leave the operator believing a value they wrote is in force when the box’s value is.
MissingForExec
The declaration omits a variable this particular launch cannot proceed without.
Raised BEFORE the spawn, so the refusal names the variable instead of arriving as
the kernel’s No such file or directory against a correctly spelled command.
Trait Implementations§
Source§impl Clone for EnvironmentError
impl Clone for EnvironmentError
Source§fn clone(&self) -> EnvironmentError
fn clone(&self) -> EnvironmentError
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 EnvironmentError
impl Debug for EnvironmentError
Source§impl Display for EnvironmentError
impl Display for EnvironmentError
impl Eq for EnvironmentError
Source§impl Error for EnvironmentError
impl Error for EnvironmentError
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()