#[non_exhaustive]pub enum ConfigError {
Show 14 variants
UnsupportedFilePattern {
server: ServerId,
pattern: UnsupportedFilePattern,
},
NotUtf8(FromUtf8Error),
FileTooLarge(SizeExceeded),
DuplicateEnvKey {
server: ServerId,
error: DuplicateEnvKey,
},
InvalidEnvValue {
server: ServerId,
key: EnvKey,
error: InvalidEnvValue,
},
EnvTooLarge {
server: ServerId,
error: EnvTooLarge,
},
ArgContainsNul {
server: ServerId,
error: InvalidServerArgs,
},
NoParentDirectory {
path: PathBuf,
},
SelectionAutoOnNonTypescript {
language: LanguageId,
},
UnknownAllowedServer {
server: ServerId,
configured: Vec<ServerId>,
},
DuplicateServerId {
id: ServerId,
first: Box<EntrySummary>,
second: Box<EntrySummary>,
},
TwoCatchAllServers {
language: LanguageId,
existing: ServerId,
id: ServerId,
},
ToolClaimedTwice {
tool: ToolKind,
language: LanguageId,
existing: ServerId,
id: ServerId,
},
UnresolvableWorkspaceRoot {
written: PathBuf,
base_dir: PathBuf,
probe: PathBuf,
source: Error,
},
}Expand description
A configuration value that is invalid in the context of the entry that holds it.
Field-level rules live in the types of the fields (a rejected value cannot be built); this enum carries what only the surrounding entry or the whole configuration can add, such as which server a bad value belongs to.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnsupportedFilePattern
A server entry lists a file_patterns form that maps to no extension.
Fields
pattern: UnsupportedFilePatternThe rejected pattern and the supported forms.
NotUtf8(FromUtf8Error)
The config file’s bytes are not UTF-8.
FileTooLarge(SizeExceeded)
The config file is over its fixed size limit, which is not configurable.
DuplicateEnvKey
A server’s env table sets one variable twice, which the host treats as
one name.
Fields
error: DuplicateEnvKeyThe colliding keys.
InvalidEnvValue
A server’s env table holds a value the operating system cannot pass.
Fields
error: InvalidEnvValueWhy the value is invalid.
EnvTooLarge
A server’s env table is too large to pass to a process.
Fields
error: EnvTooLargeWhich size limit the table is over.
ArgContainsNul
An entry of a server’s args holds a NUL, which the operating system
cannot pass in an argument.
Fields
error: InvalidServerArgsWhich argument holds the NUL.
NoParentDirectory
A config path has no directory to resolve relative entries against.
SelectionAutoOnNonTypescript
selection = "auto" on an entry that is not typescript-language-server.
Fields
language: LanguageIdThe language of the offending entry.
UnknownAllowedServer
An allowed server id names no configured server.
Fields
DuplicateServerId
Two applicable entries share one server id.
TwoCatchAllServers
A language has two servers that both omit handles.
Fields
language: LanguageIdThe language both serve.
ToolClaimedTwice
Two servers of one language claim the same tool in handles.
Fields
language: LanguageIdThe language both serve.
UnresolvableWorkspaceRoot
A configured workspace root cannot be canonicalized.
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
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()