pub trait Params:
Serialize
+ DeserializeOwned
+ Clone
+ PartialEq
+ 'static {
// Provided methods
fn choices(_field: &str) -> Option<&'static [&'static str]> { ... }
fn element_label(field: &str, _len: usize, i: usize) -> String { ... }
fn on_choice(_value: &mut Value, _field: &str, _choice: &str) { ... }
}Expand description
An op the editor can edit: it serializes to a JSON object whose numbers, short number lists,
choices and switches are its parameters, and deserializing checks new values. The hooks say
what JSON alone cannot (which text fields are choices, labels of list elements); each has a
default, so impl Params for MyOp {} is enough for an op with numbers only.
Provided Methods§
Sourcefn choices(_field: &str) -> Option<&'static [&'static str]>
fn choices(_field: &str) -> Option<&'static [&'static str]>
The options of a text field shown as a menu (band: low pass, high pass…); None for a
field that is not a choice (it is not shown).
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".