Skip to main content

FieldError

Enum FieldError 

Source
#[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
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

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

§key: Key

The key whose value it is.

§value: String

The value as it was written, decoded.

§expected: &'static [&'static str]

The spellings the value can have there, in lowercase.

§

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

§key: String

The key as it was written.

§reason: &'static str

Why it is no longer read and what to do instead, a clause that follows the key.

§severity: Severity

Whether a launcher ignores it or refuses it.

§

RetiredValue

A value of key that is no longer read (see Rule::set).

Fields

§key: Key

The key whose value it is.

§value: String

The value as it was written.

§reason: &'static str

Why it is no longer read and what to do instead, a clause that follows the value.

§severity: Severity

Whether a launcher ignores it or refuses it.

§

RetiredEnv

An environment variable that a setting replaced, as it was written, with the key of that setting (see retired_env).

Fields

§name: String

The variable as it was written.

§key: Key

The setting that replaced it.

§

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

Source

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

Source§

fn clone(&self) -> FieldError

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FieldError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Display for FieldError

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for FieldError

Source§

impl Error for FieldError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl PartialEq for FieldError

Source§

fn eq(&self, other: &FieldError) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for FieldError

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.