#[non_exhaustive]pub enum ValidatorIdError {
Empty,
EmptySegment,
InvalidSegment,
}Expand description
A stable validator ID protocol violation.
§Examples
use qubit_validator::{ValidatorId, ValidatorIdError};
let error = ValidatorId::try_new("rules..required").unwrap_err();
assert_eq!(error, ValidatorIdError::EmptySegment);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.
Empty
The complete ID is empty.
EmptySegment
One dot-separated segment is empty.
InvalidSegment
One segment contains an invalid character or initial byte.
Trait Implementations§
Source§impl Clone for ValidatorIdError
impl Clone for ValidatorIdError
impl Copy for ValidatorIdError
Source§impl Debug for ValidatorIdError
impl Debug for ValidatorIdError
Source§impl Display for ValidatorIdError
impl Display for ValidatorIdError
impl Eq for ValidatorIdError
Source§impl Error for ValidatorIdError
impl Error for ValidatorIdError
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 ValidatorIdError
impl PartialEq for ValidatorIdError
impl StructuralPartialEq for ValidatorIdError
Auto Trait Implementations§
impl Forget for ValidatorIdError
impl Freeze for ValidatorIdError
impl Move for ValidatorIdError
impl RefUnwindSafe for ValidatorIdError
impl Send for ValidatorIdError
impl Sync for ValidatorIdError
impl Unpin for ValidatorIdError
impl UnsafeUnpin for ValidatorIdError
impl UnwindSafe for ValidatorIdError
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