Skip to main content

WalkOutcome

Enum WalkOutcome 

Source
pub enum WalkOutcome {
    RunScript {
        command: String,
        docker: Option<String>,
        cwd: PathBuf,
    },
    ExecCommand {
        config: Box<CommandConfig>,
        preset: Option<String>,
        tail: Vec<String>,
        cmd_dir: PathBuf,
    },
    RefreshSchema {
        config: Box<CommandConfig>,
        cmd_dir: PathBuf,
        cmd_name: String,
    },
    PrintCommandHelp {
        config: Box<CommandConfig>,
        name: String,
    },
    PrintPresetHelp {
        config: Box<CommandConfig>,
        parent_label: String,
        preset_name: String,
    },
    PrintRunHelp {
        name: String,
        description: Option<String>,
        run: String,
        docker: Option<String>,
    },
    UnknownCommand {
        name: String,
    },
    PresetAtTopLevel {
        name: String,
    },
    Error(String),
}
Expand description

What the outer walker resolved a user invocation to. The caller owns every impure action (spawning, printing, exit code); the walker just returns the terminal state.

Variants§

§

RunScript

Top-level or nested Run — caller runs the inline script.

Fields

§command: String
§docker: Option<String>
§

ExecCommand

Path-or-Preset terminal → caller invokes the child’s entry. For a Preset, preset is the preset name inside the enclosing commands: block; for a Path-Exec it is None.

Fields

§preset: Option<String>
§tail: Vec<String>
§cmd_dir: PathBuf
§

RefreshSchema

Path terminal with --refresh-schema in the tail.

Fields

§cmd_dir: PathBuf
§cmd_name: String
§

PrintCommandHelp

Path terminal with --help / -h in the tail.

Fields

§name: String
§

PrintPresetHelp

Preset terminal with --help / -h in the tail.

Fields

§parent_label: String
§preset_name: String
§

PrintRunHelp

Run terminal with --help / -h in the tail.

Fields

§name: String
§description: Option<String>
§docker: Option<String>
§

UnknownCommand

The top-level or descended-into name doesn’t exist in the current commands: map. Caller prints the project-help banner.

Fields

§name: String
§

PresetAtTopLevel

A Preset-kind command at the top level has nothing to reuse an entry: from. Caller prints a pointer to the fix.

Fields

§name: String
§

Error(String)

Structural error: spec declares both run: and path:, or a child fdl.yml failed to load / parse. String is the diagnostic.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.