pub enum VtcError {
NotAuthenticated,
Http {
status: u16,
body: String,
},
Url(String),
Transport(Error),
Auth(VtaError),
Unsupported(&'static str),
Signing(String),
}Expand description
Errors surfaced by the VTC client.
Variants§
NotAuthenticated
A request needed a bearer token but the client has none — call
VtcClient::connect (or construct via VtcClient::with_token).
Http
The VTC returned a non-success HTTP status.
Url(String)
A request URL could not be built.
Transport(Error)
A transport-level error talking to the VTC.
Auth(VtaError)
Challenge-response authentication failed.
Unsupported(&'static str)
The operation’s route no longer exists on the VTC and this client has no replacement for it. Carries what to use instead.
Signing(String)
Building or signing a holder Trust Task failed — e.g. a non-did:key
applicant, or an undecodable private key.
Trait Implementations§
Source§impl Error for VtcError
impl Error for VtcError
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()
Auto Trait Implementations§
impl !RefUnwindSafe for VtcError
impl !UnwindSafe for VtcError
impl Freeze for VtcError
impl Send for VtcError
impl Sync for VtcError
impl Unpin for VtcError
impl UnsafeUnpin for VtcError
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