Enum SettingError
#[non_exhaustive]pub enum SettingError {
InvalidKey(String),
Duplicate(String),
EmptyLabel,
InvalidChoice,
EmptyRange,
InvalidStep,
DefaultOutOfRange,
ColorAlpha,
}Expand description
Why a setting was refused at registration.
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.
InvalidKey(String)
The key is empty, too long, starts with . or holds another character than a-z,
0-9, _, - and ..
Duplicate(String)
The mod registered a setting with this key already.
EmptyLabel
The label (or an option of a choice) is empty.
InvalidChoice
A choice has no options, or its default is not one of them.
EmptyRange
A range’s min is not below its max, or a bound is not finite.
InvalidStep
A range’s step is zero, negative, not finite or wider than the range.
DefaultOutOfRange
A range’s default is outside min..=max.
ColorAlpha
A colour holds alpha or more than 24 bits.
Trait Implementations§
§impl Clone for SettingError
impl Clone for SettingError
§fn clone(&self) -> SettingError
fn clone(&self) -> SettingError
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more§impl Debug for SettingError
impl Debug for SettingError
§impl Display for SettingError
impl Display for SettingError
impl Eq for SettingError
§impl Error for SettingError
impl Error for SettingError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
§impl PartialEq for SettingError
impl PartialEq for SettingError
impl StructuralPartialEq for SettingError
Auto Trait Implementations§
impl Freeze for SettingError
impl RefUnwindSafe for SettingError
impl Send for SettingError
impl Sync for SettingError
impl Unpin for SettingError
impl UnsafeUnpin for SettingError
impl UnwindSafe for SettingError
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