#[non_exhaustive]pub enum FieldError {
Show 18 variants
UnknownKey(String),
BadValue {
key: Key,
value: String,
expected: &'static [&'static str],
},
Nul,
MissingExe,
EmptyArgument,
EmptyDebugChannel,
CommaInDebugChannel(String),
InvalidEnvName(String),
InvalidDllOverride(String),
BadEscape,
InvalidUtf8,
MissingEquals,
Duplicate(Key),
RetiredKey {
key: String,
reason: &'static str,
severity: Severity,
},
RetiredValue {
key: Key,
value: String,
reason: &'static str,
severity: Severity,
},
RetiredEnv {
name: String,
key: Key,
},
ArgumentsOverrideOnAny,
NotAList(Key),
}Expand description
Why a field of a rule cannot be read, or a value cannot be set.
The Display form is a short phrase, for example
unknown key "bogus", which compatdb.so logs after ignoring.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
UnknownKey(String)
A key the format does not know, as it was written.
BadValue
A value that key does not take.
From a field of a rule and from
Scalar::parse_value, expected is
Key::values, default included. From the FromStr of a value
type such as Dxgi, it lists that type’s values
alone, since default is none of them.
Fields
Nul
A NUL in a value, which the process APIs that take it would end the text at.
MissingExe
An exe that is empty, or a rule without one, which matches no
process.
EmptyArgument
An empty argument, which would append nothing.
EmptyDebugChannel
An empty debug_channels entry, which names no channel.
CommaInDebugChannel(String)
A debug_channels entry with a ,, as it was written, which
WINEDEBUG would read as more than one entry.
InvalidEnvName(String)
A variable name that is empty or holds a =, as it was written.
InvalidDllOverride(String)
A DLL override without the = between its modules and its load
order, as it was written.
BadEscape
A % in a value that two hex digits do not follow.
InvalidUtf8
A value whose escapes decode to bytes that are not UTF-8.
MissingEquals
A field without the = between its key and its value.
Duplicate(Key)
A second field for a key that holds one value: a matcher or a scalar setting.
RetiredKey
A key that the settings of a launcher may still hold but that is no
longer read (see Key::from_setting).
Fields
RetiredValue
A value of key that is no longer read (see Rule::set).
Fields
RetiredEnv
An environment variable that a setting replaced, as it was written,
with the key of that setting (see retired_env).
ArgumentsOverrideOnAny
arguments_override in a rule whose exe is * (see Rule::set).
NotAList(Key)
A list of values for a key that holds one (see Rule::set_list).
Implementations§
Source§impl FieldError
impl FieldError
Sourcepub const fn severity(&self) -> Severity
pub const fn severity(&self) -> Severity
How a launcher treats this error from Rule::set,
Rule::set_list, Rule::set_env or Key::from_setting:
Severity::Warning for a retired key or value that asks for
nothing this Wine could still do, Severity::Error for everything
else.
Table::parse_lenient ignores every field it cannot read, whatever
its severity.
Trait Implementations§
Source§impl Clone for FieldError
impl Clone for FieldError
Source§fn clone(&self) -> FieldError
fn clone(&self) -> FieldError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FieldError
impl Debug for FieldError
Source§impl Display for FieldError
impl Display for FieldError
impl Eq for FieldError
Source§impl Error for FieldError
impl Error for FieldError
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()