#[non_exhaustive]pub enum LabelError {
OriginSystem,
UnknownCategory {
code: String,
},
CategoryTwice {
code: String,
},
OriginKey,
Empty {
key: String,
},
Label {
key: String,
source: LabelCodeError,
},
}Expand description
Why a label policy is refused.
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.
OriginSystem
The origin system is no absolute URI, or it holds a |.
UnknownCategory
A category key is neither a priority category nor a national one the category map declares.
CategoryTwice
Two category keys name the same category.
OriginKey
An origin key is empty or holds a control character.
Empty
A key declares no label.
Label
A key declares a label that is refused.
Trait Implementations§
Source§impl Clone for LabelError
impl Clone for LabelError
Source§impl Debug for LabelError
impl Debug for LabelError
Source§impl Display for LabelError
impl Display for LabelError
impl Eq for LabelError
Source§impl Error for LabelError
impl Error for LabelError
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 LabelError
impl PartialEq for LabelError
impl StructuralPartialEq for LabelError
Auto Trait Implementations§
impl Freeze for LabelError
impl RefUnwindSafe for LabelError
impl Send for LabelError
impl Sync for LabelError
impl Unpin for LabelError
impl UnsafeUnpin for LabelError
impl UnwindSafe for LabelError
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