Skip to main content

How

Enum How 

Source
pub enum How {
    Perform {
        run: Box<Runnable>,
        input: Option<String>,
        text: Option<String>,
        confirm: Option<String>,
        feature: Option<String>,
    },
    View {
        view: View,
        subject: Option<String>,
    },
    Command {
        argvs: Vec<Vec<String>>,
        interactive: bool,
        outside: Option<String>,
        token: Option<String>,
    },
    Shell {
        why: String,
        setting: Option<String>,
    },
    Words {
        why: Option<String>,
    },
}
Expand description

How an interface takes a line.

Variants§

§

Perform

speccoder performs it (actions::perform).

Fields

§run: Box<Runnable>

What runs.

§input: Option<String>

What to ask for first (Why it is skipped); None: nothing.

§text: Option<String>

The words the line gives already (a --reason "…" filled in).

§confirm: Option<String>

What to say in a confirmation first (it leaves the machine or cannot be undone).

§feature: Option<String>

The feature the line names (--feature F); None: the current.

§

View

A view to open.

Fields

§view: View

Which.

§subject: Option<String>

What it is about: a code, a task.

§

Command

A command speccoder printed as a fix and can run for the person, in the project folder and the OS sandbox (see outside) — never one composed elsewhere. Several argvs run in order, each only after the last one succeeded (a && b).

Fields

§argvs: Vec<Vec<String>>

The argvs, exactly.

§interactive: bool

It reads the keyboard (a login): a terminal of the person’s own, not a panel.

§outside: Option<String>

What it changes outside the project, for a command that runs outside the sandbox by its nature (changes your global git config); None: it runs in the sandbox, writes confined to the project and the package caches.

§token: Option<String>

The host’s proof that it issued exactly these argvs; only a host that runs commands sets it.

§

Shell

It must run in the shell speccoder starts from (export NAME=…): nothing run elsewhere reaches that shell.

Fields

§why: String

Why it cannot run here.

§setting: Option<String>

The setting that stands for it (model), if there is one.

§

Words

Words for a person (→ …), or a command only they can complete.

Fields

§why: Option<String>

Why it is not taken here; None for words.

Implementations§

Source§

impl How

Source

pub const fn copy_only(&self) -> bool

It is a copy and nothing else: words, or a shell line.

Trait Implementations§

Source§

impl Clone for How

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for How

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for How

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Eq for How

Source§

impl JsonSchema for How

Source§

fn schema_name() -> Cow<'static, str>

The name of the generated JSON Schema. Read more
Source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
Source§

fn json_schema(generator: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
Source§

fn inline_schema() -> bool

Whether JSON Schemas generated for this type should be included directly in parent schemas, rather than being re-used where possible using the $ref keyword. Read more
Source§

impl PartialEq for How

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for How

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for How

Auto Trait Implementations§

§

impl Freeze for How

§

impl RefUnwindSafe for How

§

impl Send for How

§

impl Sync for How

§

impl Unpin for How

§

impl UnsafeUnpin for How

§

impl UnwindSafe for How

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> DynClone for T
where T: Clone,

Source§

fn __clone_box(&self, _: Private) -> *mut ()

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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

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

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.