Struct Editor Field Spec
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-ffi.
pub struct EditorFieldSpec {
pub name: &'static str,
pub label: &'static str,
pub kind: EditorFieldKind,
pub enum_values: &'static [&'static str],
pub optional: bool,
pub nested_schema: Option<fn() -> &'static EditorSchema>,
pub nested_default: Option<fn() -> Value>,
}
Static editor metadata for one configuration field.
Fields
name: &'static str
Serialized field name.
label: &'static str
Human-readable label.
kind: EditorFieldKind
Editor control shape.
enum_values: &'static [&'static str]
Allowed string enum values, when EditorFieldKind::Enum is used.
optional: bool
Whether the field is represented as an Option<T> in Rust.
nested_schema: Option<fn() -> &'static EditorSchema>
Nested editor schema for section fields.
nested_default: Option<fn() -> Value>
Default value for a nested section.
Implementations
impl EditorFieldSpec
impl EditorFieldSpec
schema
pub fn schema(self) -> Option<&'static EditorSchema>
Returns the nested schema for this field, if it is a section.
default_value
pub fn default_value(self) -> Option<Json>
Returns the typed default value for this field’s nested section.
Trait Implementations
impl Clone for EditorFieldSpec
impl Clone for EditorFieldSpec
clone
fn clone(&self) -> EditorFieldSpec
clone_from
fn clone_from(&mut self, source: &Self)
impl Copy for EditorFieldSpec
impl Copy for EditorFieldSpec