pub enum TypedErrorPayload {
LastServiceRefused,
ServiceNotPresent,
ServiceAlreadyEnabled,
MediatorHandshakeFailed {
reason: String,
},
DrainTtlOutOfBounds {
min: u64,
max: u64,
requested: u64,
},
NoPriorMutation,
UnsupportedTransport {
detail: String,
},
}Expand description
Wire-format companion to the typed VtaError variants emitted
by the runtime service-management surface.
The free-form comment string carried by DIDComm problem-reports
(and the body string of REST error responses) is fine for the
variants whose only data is a human-readable message
(VtaError::Conflict, VtaError::NotFound, …) but lossy for
variants like VtaError::DrainTtlOutOfBounds that carry three
numeric fields the CLI needs to switch on.
Servers serialize a TypedErrorPayload into the response body
(REST) or problem-report args (DIDComm); clients deserialize
it back via VtaError::from_typed_payload. The discriminator
is the kebab-cased variant name in the code field.
Variants line up 1:1 with the §4 spec list — the existing
VtaError::UnsupportedTransport is included so the same
channel carries every typed-error wire form.
Variants§
LastServiceRefused
ServiceNotPresent
ServiceAlreadyEnabled
MediatorHandshakeFailed
DrainTtlOutOfBounds
NoPriorMutation
UnsupportedTransport
Trait Implementations§
Source§impl Clone for TypedErrorPayload
impl Clone for TypedErrorPayload
Source§impl Debug for TypedErrorPayload
impl Debug for TypedErrorPayload
Source§impl<'de> Deserialize<'de> for TypedErrorPayload
impl<'de> Deserialize<'de> for TypedErrorPayload
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
impl Eq for TypedErrorPayload
Source§impl PartialEq for TypedErrorPayload
impl PartialEq for TypedErrorPayload
Source§impl Serialize for TypedErrorPayload
impl Serialize for TypedErrorPayload
impl StructuralPartialEq for TypedErrorPayload
Auto Trait Implementations§
impl Freeze for TypedErrorPayload
impl RefUnwindSafe for TypedErrorPayload
impl Send for TypedErrorPayload
impl Sync for TypedErrorPayload
impl Unpin for TypedErrorPayload
impl UnsafeUnpin for TypedErrorPayload
impl UnwindSafe for TypedErrorPayload
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.