pub enum OptionError {
NotFound(String),
AlreadyExists(String),
ValidationFailed {
name: String,
reason: String,
},
TypeMismatch {
name: String,
expected: &'static str,
got: &'static str,
},
AliasConflict(String),
ScopeMismatch {
name: String,
option_scope: OptionScope,
requested: OptionScopeId,
},
}Expand description
Error type for option operations.
Variants§
NotFound(String)
Option not found in registry.
AlreadyExists(String)
Option already registered.
ValidationFailed
Validation failed.
TypeMismatch
Type mismatch.
AliasConflict(String)
Alias conflicts with existing name.
ScopeMismatch
Scope mismatch (e.g., setting buffer-local for global-only option).
Trait Implementations§
Source§impl Clone for OptionError
impl Clone for OptionError
Source§fn clone(&self) -> OptionError
fn clone(&self) -> OptionError
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OptionError
impl Debug for OptionError
Source§impl Display for OptionError
impl Display for OptionError
Source§impl Error for OptionError
impl Error for OptionError
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()
Source§impl PartialEq for OptionError
impl PartialEq for OptionError
impl Eq for OptionError
impl StructuralPartialEq for OptionError
Auto Trait Implementations§
impl Freeze for OptionError
impl RefUnwindSafe for OptionError
impl Send for OptionError
impl Sync for OptionError
impl Unpin for OptionError
impl UnsafeUnpin for OptionError
impl UnwindSafe for OptionError
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