pub enum OptionValue {
Bool(bool),
Integer(i64),
String(String),
Choice {
value: String,
choices: Vec<String>,
},
}Expand description
Type-safe option value.
This is the core value type for editor options. Each variant maps to a common configuration pattern:
Bool: Toggle settings (number, wrap, etc.)Integer: Numeric settings (tabwidth, scrolloff)String: Free-form text (theme name, paths)Choice: Enum-like selection from predefined values
Variants§
Bool(bool)
Boolean on/off option (e.g., number, relativenumber)
Integer(i64)
Integer option (e.g., tabwidth, scrolloff)
String(String)
String option (e.g., theme, signcolumn)
Choice
Choice option with predefined valid values.
The choices field stores all valid values for validation.
Implementations§
Trait Implementations§
Source§impl Clone for OptionValue
impl Clone for OptionValue
Source§fn clone(&self) -> OptionValue
fn clone(&self) -> OptionValue
Returns a duplicate of the value. Read more
1.0.0 · 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 OptionValue
impl Debug for OptionValue
Source§impl Display for OptionValue
impl Display for OptionValue
Source§impl PartialEq for OptionValue
impl PartialEq for OptionValue
impl Eq for OptionValue
impl StructuralPartialEq for OptionValue
Auto Trait Implementations§
impl Freeze for OptionValue
impl RefUnwindSafe for OptionValue
impl Send for OptionValue
impl Sync for OptionValue
impl Unpin for OptionValue
impl UnsafeUnpin for OptionValue
impl UnwindSafe for OptionValue
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