pub enum OptKind {
Bool,
Int {
min: u32,
max: u32,
},
Str,
Enum(&'static [&'static str]),
StrList,
}Expand description
What kind of value an option holds, and what :set will accept for it.
Variants§
Bool
:set name, :set noname, :set invname, :set name!,
:set name=on|off|true|false|yes|no|1|0.
Int
:set name=N, rejected outside min..=max.
Str
:set name=text.
Enum(&'static [&'static str])
:set name=one-of. The slice is also the completion candidate list.
StrList
A comma-separated list. Transported as OptionValue::String; hosts
that have a richer representation (TOML arrays) split on ,.
Trait Implementations§
impl Copy for OptKind
impl Eq for OptKind
impl StructuralPartialEq for OptKind
Auto Trait Implementations§
impl Freeze for OptKind
impl RefUnwindSafe for OptKind
impl Send for OptKind
impl Sync for OptKind
impl Unpin for OptKind
impl UnsafeUnpin for OptKind
impl UnwindSafe for OptKind
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