pub enum VcpError {
ParseError(String),
InvalidPersona(char),
InvalidAdherence(u8),
InvalidIntensity(u8),
InvalidScope(char),
MalformedToken(String),
HashMismatch {
expected: String,
actual: String,
},
SignatureError(String),
JsonError(String),
HookError(String),
RevocationError(String),
}Expand description
Errors that can occur during VCP token parsing, encoding, or verification.
Variants§
ParseError(String)
A string could not be parsed into the expected VCP structure.
InvalidPersona(char)
An unrecognised persona character was encountered.
InvalidAdherence(u8)
An adherence level outside the valid 0-5 range.
InvalidIntensity(u8)
An intensity value outside the valid 1-5 range.
InvalidScope(char)
An unrecognised scope character was encountered.
MalformedToken(String)
A token string is structurally malformed.
HashMismatch
A content hash did not match its expected value.
SignatureError(String)
A cryptographic signature could not be verified.
JsonError(String)
A JSON serialization / deserialization error.
HookError(String)
A hook registration or execution error.
RevocationError(String)
A revocation check error.
Trait Implementations§
impl Eq for VcpError
Source§impl Error for VcpError
impl Error for VcpError
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()
impl StructuralPartialEq for VcpError
Auto Trait Implementations§
impl Freeze for VcpError
impl RefUnwindSafe for VcpError
impl Send for VcpError
impl Sync for VcpError
impl Unpin for VcpError
impl UnsafeUnpin for VcpError
impl UnwindSafe for VcpError
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