pub enum ConfigError {
UnknownOption(String),
DuplicateName(String),
NotBoolean(String),
Validation(String),
Parse(String),
QueryNotAllowed(String),
TypeMismatch {
expected: &'static str,
actual: &'static str,
},
}Expand description
What the registry’s fallible operations can fail with. Kept
separate from raw String errors so callers can echo the
canonical message without re-stringifying.
Vim-style E codes match the existing TUI cmdline echo
wording; renderer-agnostic by design (every renderer surfaces
these the same way).
Variants§
UnknownOption(String)
No option (or alias) is registered under this name. Also
returned by ConfigRegistry::parse_for_buffer_local for an
option registered without a TypeId (it cannot be layered).
DuplicateName(String)
ConfigRegistry::try_register found this name or alias
already taken. Nothing was registered.
NotBoolean(String)
:set noFOO against a non-bool option. Wording matches the
pre-typed-options TUI echo.
Validation(String)
:set tabstop=999 (out-of-range) etc. — produced by the
option’s validate closure. Wording is the closure’s verbatim.
Parse(String)
:set foldmethod=xyz — produced by the option type’s
parse impl. Wording is the impl’s verbatim.
QueryNotAllowed(String)
name? passed to parse_for_buffer_local. Query forms are
not writes; callers should use :set name? or :setlocal name?
to echo instead of calling into the write path.
TypeMismatch
A typed access named a value type the registered option does
not have. Currently constructed nowhere in the workspace — the
typed paths report a mismatch as None (ConfigRegistry::try_get)
or a String error (ConfigRegistry::set) instead.
Fields
expected: &'static strThe accessor’s OptionType::type_label.
Trait Implementations§
Source§impl Debug for ConfigError
impl Debug for ConfigError
Source§impl Display for ConfigError
impl Display for ConfigError
Source§impl Error for ConfigError
impl Error for ConfigError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()