#[non_exhaustive]pub enum StaticTokensError {
#[non_exhaustive] BlankSecret {
index: usize,
},
#[non_exhaustive] DuplicateSecret {
index: usize,
first: usize,
},
#[non_exhaustive] InvalidLabel {
index: usize,
},
#[non_exhaustive] DuplicateLabel {
index: usize,
first: usize,
label: String,
},
}Expand description
Why StaticTokens::with (or StaticTokens::single) refused an entry.
Each variant names the entry by its 0-based position in the set, and never
includes a secret.
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.
#[non_exhaustive]BlankSecret
The secret was empty or whitespace-only; a blank secret must never be matchable.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]DuplicateSecret
The secret is already in the set, at position first.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]InvalidLabel
The label is empty, longer than StaticTokens::MAX_LABEL_LEN, or
holds a character outside visible ASCII (! through ~). The label
itself is not echoed, since it failed the rules that make it log-safe.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
#[non_exhaustive]DuplicateLabel
The label is already used by the entry at position first.
Fields
This variant is marked as non-exhaustive
Non-exhaustive enum variants could have additional fields added in future. Therefore, non-exhaustive enum variants cannot be constructed in external crates and cannot be matched against.
Trait Implementations§
Source§impl Clone for StaticTokensError
impl Clone for StaticTokensError
Source§impl Debug for StaticTokensError
impl Debug for StaticTokensError
Source§impl Display for StaticTokensError
impl Display for StaticTokensError
impl Eq for StaticTokensError
Source§impl Error for StaticTokensError
impl Error for StaticTokensError
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 StaticTokensError
impl PartialEq for StaticTokensError
impl StructuralPartialEq for StaticTokensError
Auto Trait Implementations§
impl Freeze for StaticTokensError
impl RefUnwindSafe for StaticTokensError
impl Send for StaticTokensError
impl Sync for StaticTokensError
impl Unpin for StaticTokensError
impl UnsafeUnpin for StaticTokensError
impl UnwindSafe for StaticTokensError
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