Skip to main content

Command

Enum Command 

Source
pub enum Command {
    Chrome {
        title: ChromeTitle,
        status: Option<ChromeStatus>,
        width: Option<u32>,
        height: Option<u32>,
    },
    Message {
        title: ChromeTitle,
        message: String,
        status: Option<ChromeStatus>,
        buttons: ButtonsPreset,
        custom_buttons: Option<Vec<String>>,
        default_button: Option<u32>,
        level: Option<MessageLevel>,
        icon: Option<MediaRef>,
        image: Option<MediaRef>,
        markdown: bool,
        width: Option<u32>,
        height: Option<u32>,
    },
    Input {
Show 16 fields title: ChromeTitle, message: String, status: Option<ChromeStatus>, icon: Option<MediaRef>, markdown: bool, multiline: bool, placeholder: Option<String>, default: Option<String>, password: bool, mode: InputMode, filter: Option<Vec<String>>, multiple: bool, start_path: Option<String>, buttons: ButtonsPreset, width: Option<u32>, height: Option<u32>,
}, Markdown { title: Option<ChromeTitle>, file: Option<String>, content: Option<String>, status: Option<ChromeStatus>, buttons: ButtonsPreset, width: Option<u32>, height: Option<u32>, }, Question { questions: Vec<QuestionCard>, questions_raw: Vec<Value>, width: Option<u32>, height: Option<u32>, }, Wizard(WizardCommand), Report(ReportCommand), }
Expand description

Executable command after successful validation.

Variants§

§

Chrome

Foundation chrome frame: required title, optional status.

Fields

§width: Option<u32>
§height: Option<u32>
§

Message

Modal message dialog (Phase B sprint b.1 / b.2).

Fields

§message: String
§custom_buttons: Option<Vec<String>>
§default_button: Option<u32>
§markdown: bool
§width: Option<u32>
§height: Option<u32>
§

Input

Modal input dialog — text / file / folder (REQ-0013 / REQ-0015).

Fields

§message: String
§markdown: bool
§multiline: bool
§placeholder: Option<String>
§default: Option<String>
§password: bool

Mask the text field (type=password); text mode only (c.11).

§filter: Option<Vec<String>>

Extension patterns (*.json, …); file mode only (REQ-0015 / REQ-0059).

§multiple: bool

Multi-file selection; file mode only (REQ-0015 / REQ-0059).

§start_path: Option<String>

Initial picker directory; file or folder mode only (REQ-0059).

§width: Option<u32>
§height: Option<u32>
§

Markdown

Markdown viewer — exactly one of file or content (REQ-0016 / REQ-0058).

Fields

§title: Option<ChromeTitle>

Window title; omitted → filename (file) or "Markdown" (inline).

§file: Option<String>

Path to a .md file (mutually exclusive with content).

§content: Option<String>

Inline markdown source (mutually exclusive with file).

§buttons: ButtonsPreset

Defaults to ButtonsPreset::Ok when omitted.

§width: Option<u32>
§height: Option<u32>
§

Question

Question cards dialog (REQ-0061 / REQ-0062).

Fields

§questions: Vec<QuestionCard>

Typed cards used for rendering and host-side answer checks.

§questions_raw: Vec<Value>

Verbatim questions array entries for stdout echo (REQ-0067).

§width: Option<u32>
§height: Option<u32>
§

Wizard(WizardCommand)

Multi-page wizard (Phase D / REQ-0017 / REQ-0026).

§

Report(ReportCommand)

Static XHTML/HTML report (Phase H / REQ-0140 / ADR-0025).

Implementations§

Source§

impl Command

Source

pub fn window_width(&self) -> Option<u32>

Optional viewer window width from command JSON (width).

Source

pub fn window_height(&self) -> Option<u32>

Optional viewer window height from command JSON (height).

Source

pub fn window_size_hint(&self) -> WindowSizeHint

Combined optional window size hint.

Trait Implementations§

Source§

impl Clone for Command

Source§

fn clone(&self) -> Command

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 Command

Source§

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

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

impl Eq for Command

Source§

impl PartialEq for Command

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Command

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> 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> 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, <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.