pub struct OptionDesc {
pub name: &'static str,
pub aliases: &'static [&'static str],
pub kind: OptKind,
pub scope: OptScope,
pub get: fn(&Settings) -> OptionValue,
pub set: fn(&mut Settings, OptionValue) -> Result<(), String>,
}Expand description
One :set-able option.
Fields§
§name: &'static strCanonical name, as :set name? echoes it and as a config key.
aliases: &'static [&'static str]Vim-style short forms (cul for cursorline).
kind: OptKind§scope: OptScope§get: fn(&Settings) -> OptionValueRead the live value.
set: fn(&mut Settings, OptionValue) -> Result<(), String>Write it, rejecting a value the option cannot hold.
Implementations§
Auto Trait Implementations§
impl Freeze for OptionDesc
impl RefUnwindSafe for OptionDesc
impl Send for OptionDesc
impl Sync for OptionDesc
impl Unpin for OptionDesc
impl UnsafeUnpin for OptionDesc
impl UnwindSafe for OptionDesc
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