#[non_exhaustive]pub enum LinkedVpError {
InvalidService {
id: DidUrl,
reason: String,
},
UnsupportedEndpoint(Url),
Http {
url: Url,
source: HttpError,
},
HttpStatus {
url: Url,
status: u16,
},
UnsupportedFormat(Url),
InvalidBody {
url: Url,
reason: String,
},
HolderMismatch {
did: Did,
holder: Did,
},
Presentation(PresentationValidationError),
Validation(ValidationError),
Resolution(ResolutionError),
TooManyUrls(usize),
}Available on crate feature
linked-vp only.Expand description
Why a linked presentation could not be found, fetched or validated.
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.
InvalidService
A LinkedVerifiablePresentation service does not name one or more URLs.
UnsupportedEndpoint(Url)
A URL is not https: an ipfs:// endpoint, say. Only HTTPS is fetched.
Http
The HttpClient got no response.
HttpStatus
The server answered with a status other than 2xx.
UnsupportedFormat(Url)
The body is a JSON object: a presentation in the JSON-LD form, which this crate does not process.
InvalidBody
The body is not a compact JWT.
HolderMismatch
The presentation’s holder is not the DID whose document links it.
Presentation(PresentationValidationError)
The presentation or some of its credentials did not validate.
Validation(ValidationError)
The presentation did not decode, or did not sign.
Resolution(ResolutionError)
The DID did not resolve.
TooManyUrls(usize)
The URL was not fetched: the DID document lists more URLs than the client’s limit, given here.
Trait Implementations§
Source§impl Debug for LinkedVpError
impl Debug for LinkedVpError
Source§impl Display for LinkedVpError
impl Display for LinkedVpError
Source§impl Error for LinkedVpError
impl Error for LinkedVpError
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 From<PresentationValidationError> for LinkedVpError
impl From<PresentationValidationError> for LinkedVpError
Source§fn from(source: PresentationValidationError) -> Self
fn from(source: PresentationValidationError) -> Self
Converts to this type from the input type.
Source§impl From<ResolutionError> for LinkedVpError
impl From<ResolutionError> for LinkedVpError
Source§fn from(source: ResolutionError) -> Self
fn from(source: ResolutionError) -> Self
Converts to this type from the input type.
Source§impl From<ValidationError> for LinkedVpError
impl From<ValidationError> for LinkedVpError
Source§fn from(source: ValidationError) -> Self
fn from(source: ValidationError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl !RefUnwindSafe for LinkedVpError
impl !UnwindSafe for LinkedVpError
impl Freeze for LinkedVpError
impl Send for LinkedVpError
impl Sync for LinkedVpError
impl Unpin for LinkedVpError
impl UnsafeUnpin for LinkedVpError
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