Struct ::exo::vs::SelectionSettings

Overview

Settings for the reference typ which is used for variables

Methods

Creates a new SelectionSettings object.

Example

let s = exo::vs::SelectionSettings::new();
assert!(s is exo::vs::SelectionSettings);
fn get(self, elm: String) -> Option

Try to get a Language option from the SelectionSetting itself.

Please note, that options can be stored either in this Selection setting or a Selection object itself. This call can only returns a slection Language option from this Selection option itself.

Example:

let sel = exo::vs::SelectionSettings::new();
assert_eq!(sel.get("test"), None);
sel.insert("test", exo::Language::new_en("Test"));
assert_eq!(sel.get("test"), Some(exo::Language::new_en("Test")));
fn insert(self, ident: String, lang: Language) -> Tuple

Inserts a new Option into the SelectionSettings.

Example:

let sel = exo::vs::SelectionSettings::new();
sel.insert("test", exo::Language::new_en("Test"));
assert_eq!(sel.get("test"), Some(exo::Language::new_en("Test")));
fn remove(self, key: String) -> Tuple

Removes a Option from the Selection

Example:

let sel = exo::vs::SelectionSettings::new();
sel.insert("key0", exo::Language::new());
assert_eq!(sel.keys(), ["key0"]);
sel.remove("key0");
assert_eq!(sel.keys(), []);
fn keys(self) -> Vec

Returns all keys for the different options of the SelectionSettings

Example:

let sel = exo::vs::SelectionSettings::new();
sel.insert("key0", exo::Language::new());
assert_eq!(sel.keys(), ["key0"]);

Clones the SelectionSettings object and returns a new independet one.

Example

let s0 = exo::vs::SelectionSettings::new();
let s1 = s0.clone();
assert_eq!(s0, s1);
s1.mode = "multi";
assert_ne!(s0, s1);

Protocols

protocol partial_eq
if value == b { }

Allows for partial equality operations to work.

protocol string_debug
println("{:?}", value)

Allows the value to be debug printed.

protocol string_display
println("{}", value)

Allows the value to be display printed.

protocol get mode
let output = value.mode

Get the Selection mode which shuld is used. Available options are: 'single', 'multi', 'show'

Example

let s = exo::vs::SelectionSettings::new();
s.mode = "multi";
assert_eq!(s.mode, "multi");
protocol set mode
value.mode = input

Set the Selection mode which shuld be used. Available options are: 'single', 'multi', 'show'

Example

let s = exo::vs::SelectionSettings::new();
s.mode = "multi";
assert_eq!(s.mode, "multi");