#[non_exhaustive]pub struct ConfigNodeView {
pub path: String,
pub display_value: String,
pub kind: NodeKind,
pub editable: bool,
}Expand description
One editable value inside a ConfigFileView.
§Why a flat list of nodes instead of a tree
The TOML the user writes is nested, but the UI surface a GUI renders
is usually flat (a properties panel, a form). Keeping the API flat
with a dotted path string trades a tiny bit of GUI cleverness for
a much simpler cross-language contract.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.path: StringDotted TOML path (e.g. "listener.port", "service.rule_sets").
display_value: StringCurrent value, stringified for display. A GUI can format this
however it wants; the value’s original type is in kind.
kind: NodeKindWhat shape of value this node holds.
editable: boolWhether the GUI should allow editing this field.
Trait Implementations§
Source§impl Clone for ConfigNodeView
impl Clone for ConfigNodeView
Source§fn clone(&self) -> ConfigNodeView
fn clone(&self) -> ConfigNodeView
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ConfigNodeView
impl Debug for ConfigNodeView
Auto Trait Implementations§
impl Freeze for ConfigNodeView
impl RefUnwindSafe for ConfigNodeView
impl Send for ConfigNodeView
impl Sync for ConfigNodeView
impl Unpin for ConfigNodeView
impl UnsafeUnpin for ConfigNodeView
impl UnwindSafe for ConfigNodeView
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more