pub enum Interpreter {
System,
Pwsh,
}Expand description
Which interpreter a building’s shell lines run under
(crates/kernel/spec/Config.lean §8-22, crates/runtime/Spec.lean
§8-13-2 D30).
System is the platform’s own shell, %COMSPEC% on Windows and
$SHELL elsewhere; Pwsh is PowerShell 7 on every platform. A
building that asks for one this machine lacks is refused at the
call rather than given the other, because a line written for one
interpreter is a different language under the other.
Variants§
Implementations§
Source§impl Interpreter
impl Interpreter
Sourcepub fn parse(raw: &str) -> Result<Interpreter, AxError>
pub fn parse(raw: &str) -> Result<Interpreter, AxError>
Sole constructor from text.
§Errors
ConfigInvalid for any spelling but the two, naming the key and
the value, with both spellings in the recovery: a guess would run
a building’s lines under an interpreter nobody chose.
Sourcepub fn as_str(self) -> &'static str
pub fn as_str(self) -> &'static str
The spelling Interpreter::parse reads back.
Trait Implementations§
Source§impl Clone for Interpreter
impl Clone for Interpreter
impl Copy for Interpreter
Source§impl Debug for Interpreter
impl Debug for Interpreter
Source§impl Default for Interpreter
impl Default for Interpreter
Source§impl<'de> Deserialize<'de> for Interpreter
impl<'de> Deserialize<'de> for Interpreter
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for Interpreter
Source§impl PartialEq for Interpreter
impl PartialEq for Interpreter
Source§impl Serialize for Interpreter
impl Serialize for Interpreter
impl StructuralPartialEq for Interpreter
Auto Trait Implementations§
impl Freeze for Interpreter
impl RefUnwindSafe for Interpreter
impl Send for Interpreter
impl Sync for Interpreter
impl Unpin for Interpreter
impl UnsafeUnpin for Interpreter
impl UnwindSafe for Interpreter
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