#[non_exhaustive]pub enum RegisterError {
Extension {
kind: &'static str,
format: &'static str,
earlier: &'static str,
extension: &'static str,
},
Id {
kind: &'static str,
format: &'static str,
},
BadExtension {
kind: &'static str,
format: &'static str,
extension: &'static str,
},
Reserved {
kind: &'static str,
format: &'static str,
},
SectionTwice {
section: &'static str,
},
SectionWithoutDefault {
section: &'static str,
},
SectionAllowsUnknownFields {
section: &'static str,
},
}Expand description
Why a format, or a section of import settings, could not be registered. More reasons may come (ADR-0039).
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.
Extension
It claims an extension an earlier format of its kind claims.
Fields
Id
An earlier format of its kind has its id.
BadExtension
One of its extensions isn’t lowercase, has a dot, or is empty.
Fields
Reserved
It claims meta, the extension of import settings files.
SectionTwice
A section of import settings of its name is registered already.
SectionWithoutDefault
The section’s type can’t read (): a field has no default.
SectionAllowsUnknownFields
The section’s type reads a field it doesn’t have, so a typo would go unseen.
Trait Implementations§
Source§impl Clone for RegisterError
impl Clone for RegisterError
Source§fn clone(&self) -> RegisterError
fn clone(&self) -> RegisterError
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 moreSource§impl Debug for RegisterError
impl Debug for RegisterError
Source§impl Display for RegisterError
impl Display for RegisterError
impl Eq for RegisterError
Source§impl Error for RegisterError
impl Error for RegisterError
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 RegisterError
impl PartialEq for RegisterError
impl StructuralPartialEq for RegisterError
Auto Trait Implementations§
impl Freeze for RegisterError
impl RefUnwindSafe for RegisterError
impl Send for RegisterError
impl Sync for RegisterError
impl Unpin for RegisterError
impl UnsafeUnpin for RegisterError
impl UnwindSafe for RegisterError
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