pub enum ScriptLawError {
BadName {
name: String,
},
EmptyRun,
RelativeProgram {
program: String,
},
InterpreterMissingScriptArg {
interpreter: String,
},
RelativeScriptArg {
interpreter: String,
arg: String,
},
EscapedPluginRoot {
path: String,
},
ScriptFileMissing {
path: String,
},
ScriptFileNotExecutable {
path: String,
},
}Expand description
Path-law violation at definition/install time. Fail-closed: reject what is illegal, no compromises.
Variants§
BadName
Tool name is invalid (character set / reserved word / too long).
EmptyRun
run is empty.
RelativeProgram
run[0] is not an absolute path and not in the interpreter whitelist — rejected to prevent shadowing.
InterpreterMissingScriptArg
The interpreter lacks a script file argument (-File/-f//c not found), so the script path cannot be pinned.
RelativeScriptArg
The interpreter’s script file argument is not an absolute path.
EscapedPluginRoot
A path inside a plugin escapes the plugin root after resolution (../ escape / absolute path outside).
ScriptFileMissing
The script file does not exist at install/mount time (or is not a regular file).
ScriptFileNotExecutable
The script body (the non-interpreter form’s run[0]) has no executable bit.
Trait Implementations§
Source§impl Clone for ScriptLawError
impl Clone for ScriptLawError
Source§impl Debug for ScriptLawError
impl Debug for ScriptLawError
Source§impl Display for ScriptLawError
impl Display for ScriptLawError
impl Eq for ScriptLawError
Source§impl Error for ScriptLawError
impl Error for ScriptLawError
1.30.0 · 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 PartialEq for ScriptLawError
impl PartialEq for ScriptLawError
impl StructuralPartialEq for ScriptLawError
Auto Trait Implementations§
impl Forget for ScriptLawError
impl Freeze for ScriptLawError
impl Move for ScriptLawError
impl RefUnwindSafe for ScriptLawError
impl Send for ScriptLawError
impl Sync for ScriptLawError
impl Unpin for ScriptLawError
impl UnsafeUnpin for ScriptLawError
impl UnwindSafe for ScriptLawError
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
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
Compare self to
key and return true if they are equal.