Skip to main content

Options

Trait Options 

Source
pub trait Options {
    // Required method
    fn value(&self, name: &str) -> Option<&OptionValue>;

    // Provided methods
    fn str(&self, name: &str) -> Option<&str> { ... }
    fn int(&self, name: &str) -> Option<i64> { ... }
    fn bool(&self, name: &str) -> Option<bool> { ... }
}
Expand description

Reads option and modal values by name.

Required Methods§

Source

fn value(&self, name: &str) -> Option<&OptionValue>

The value named name.

Provided Methods§

Source

fn str(&self, name: &str) -> Option<&str>

A text value (string options, modal text inputs).

Source

fn int(&self, name: &str) -> Option<i64>

An integer value.

Source

fn bool(&self, name: &str) -> Option<bool>

A boolean value.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§