pub enum RenderError {
ArgumentUndeclared {
command: String,
parameter: String,
},
ArgumentMissing {
command: String,
parameter: String,
},
ArgumentTypeMismatch {
command: String,
parameter: String,
observed: String,
declared: &'static str,
supplied: &'static str,
},
LeadingDashOperand {
command: String,
argument: String,
element: String,
marker: &'static str,
},
UnboundHole {
command: String,
parameter: String,
},
PriorFormUnrenderable {
command: String,
construct: String,
},
UnrepresentableValue {
parameter: String,
kind: &'static str,
},
InteriorNul {
parameter: String,
},
}Expand description
Why a declared command could not be rendered into an argv.
Every variant is TERMINAL for an executing action: the same parameter set against the same declaration fails identically however many times it is retried. The AWL side maps each of these back onto its own cause vocabulary with a source span; an executor reports the message as it stands.
Variants§
ArgumentUndeclared
The parameter set names something the command does not declare.
Fields
ArgumentMissing
A declared parameter has neither a supplied value nor a default.
ArgumentTypeMismatch
A supplied value’s shape does not match the parameter’s declared type.
Fields
LeadingDashOperand
An operand would emit leading-dash bytes into a position the program is still reading options in, with no end-of-options marker before it.
Fields
UnboundHole
A command line reads a parameter the command does not declare, so the declaration and its own body disagree and no parameter set could reconcile them.
Unreachable for a contract the emitter produced — the check layer refuses a hole naming an undeclared parameter before emission — so this names an archive whose stored contract was hand-edited, or one whose body and parameter list were assembled from different sources. Refused rather than rendered as empty text: an argv silently missing a value is a DIFFERENT command running under the author’s name.
Fields
PriorFormUnrenderable
The command was read from a prior-form archive and carries a construct the current form cannot express, so executing it could not mean what its author wrote.
Fields
UnrepresentableValue
A supplied value has no unambiguous argument form.
Fields
InteriorNul
A supplied string contains a NUL byte.
Refused rather than truncated: an argument reaches the kernel as a NUL-terminated string, so a NUL inside a value would silently cut the argument short and change what the program receives.
Trait Implementations§
Source§impl Clone for RenderError
impl Clone for RenderError
Source§fn clone(&self) -> RenderError
fn clone(&self) -> RenderError
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 RenderError
impl Debug for RenderError
Source§impl Display for RenderError
impl Display for RenderError
impl Eq for RenderError
Source§impl Error for RenderError
impl Error for RenderError
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()
Source§impl PartialEq for RenderError
impl PartialEq for RenderError
impl StructuralPartialEq for RenderError
Auto Trait Implementations§
impl Freeze for RenderError
impl RefUnwindSafe for RenderError
impl Send for RenderError
impl Sync for RenderError
impl Unpin for RenderError
impl UnsafeUnpin for RenderError
impl UnwindSafe for RenderError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.