#[non_exhaustive]pub enum InvalidKeyReason {
LineBreak,
MissingSection,
MissingVariable,
InvalidSection,
InvalidVariable,
}Expand description
Which part of a config key ConfigError::InvalidKey rejected.
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.
LineBreak
The key contains a newline or carriage return.
MissingSection
The key has no ., so there is no section.
MissingVariable
The key ends with ., so there is no variable name.
InvalidSection
The section is empty or has characters other than alphanumerics (Unicode
char::is_alphanumeric) and -.
InvalidVariable
The variable name does not start with an ASCII letter, or has characters other than
alphanumerics (Unicode char::is_alphanumeric) and -.
Trait Implementations§
Source§impl Clone for InvalidKeyReason
impl Clone for InvalidKeyReason
impl Copy for InvalidKeyReason
Source§impl Debug for InvalidKeyReason
impl Debug for InvalidKeyReason
impl Eq for InvalidKeyReason
Source§impl PartialEq for InvalidKeyReason
impl PartialEq for InvalidKeyReason
impl StructuralPartialEq for InvalidKeyReason
Auto Trait Implementations§
impl Freeze for InvalidKeyReason
impl RefUnwindSafe for InvalidKeyReason
impl Send for InvalidKeyReason
impl Sync for InvalidKeyReason
impl Unpin for InvalidKeyReason
impl UnsafeUnpin for InvalidKeyReason
impl UnwindSafe for InvalidKeyReason
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.