#[non_exhaustive]pub enum StandardCode {
Show 14 variants
MalformedRequest,
UnsupportedType,
UnsupportedVersion,
Expired,
ProofRequired,
ProofInvalid,
PermissionDenied,
WrongRecipient,
IdentityMismatch,
IdConflict,
Cancelled,
TaskFailed,
Unavailable,
InternalError,
}Expand description
The framework-defined standard error codes (SPEC.md §8.3).
Marked #[non_exhaustive] as of 0.7.0: the framework adds a standard code
from time to time (idConflict in 0.4), and without this every such
addition would be a breaking change for any downstream match. Downstream
code must carry a wildcard arm; in exchange, future codes arrive as a minor
bump rather than a major one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
MalformedRequest
The document did not validate against the framework schema or the task-specific payload schema.
UnsupportedType
The consumer does not recognize the type URI.
UnsupportedVersion
The type URI was recognized but its MAJOR.MINOR is not supported.
Expired
expiresAt was in the past at the time of evaluation.
ProofRequired
A proof was required and was missing.
ProofInvalid
A proof was present but failed verification.
PermissionDenied
The requesting party is not authorized to invoke this task.
WrongRecipient
The document’s recipient does not identify the receiving consumer.
IdentityMismatch
An in-band issuer or recipient is inconsistent with the transport-
authenticated identity for the same party.
IdConflict
The document’s id matches one the consumer has already accepted, but
its content differs (SPEC.md §7.2 item 11).
Cancelled
The consumer stopped the task on its own initiative — operator action,
policy, capacity, or a compliance hold (SPEC.md §12). Distinct from a
producer-requested cancellation, which is answered by a response to the
trust-task-control document rather than by an error.
TaskFailed
The recipient party attempted the task and could not complete it.
The recipient party is temporarily unable to process the task.
InternalError
The recipient party encountered an unexpected internal failure.
Implementations§
Source§impl StandardCode
impl StandardCode
Sourcepub fn default_retryable(self) -> bool
pub fn default_retryable(self) -> bool
The default retryable value an emitter SHOULD use per SPEC.md §8.3,
unless task-specific knowledge dictates otherwise.
TaskFailed is varies in the spec; we treat its default as false.
Trait Implementations§
Source§impl Clone for StandardCode
impl Clone for StandardCode
Source§fn clone(&self) -> StandardCode
fn clone(&self) -> StandardCode
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for StandardCode
Source§impl Debug for StandardCode
impl Debug for StandardCode
Source§impl Display for StandardCode
impl Display for StandardCode
impl Eq for StandardCode
Source§impl From<StandardCode> for ErrorPayload
impl From<StandardCode> for ErrorPayload
Source§fn from(code: StandardCode) -> ErrorPayload
fn from(code: StandardCode) -> ErrorPayload
Source§impl From<StandardCode> for TrustTaskCode
impl From<StandardCode> for TrustTaskCode
Source§fn from(code: StandardCode) -> TrustTaskCode
fn from(code: StandardCode) -> TrustTaskCode
Source§impl Hash for StandardCode
impl Hash for StandardCode
Source§impl PartialEq for StandardCode
impl PartialEq for StandardCode
impl StructuralPartialEq for StandardCode
Auto Trait Implementations§
impl Freeze for StandardCode
impl RefUnwindSafe for StandardCode
impl Send for StandardCode
impl Sync for StandardCode
impl Unpin for StandardCode
impl UnsafeUnpin for StandardCode
impl UnwindSafe for StandardCode
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
Source§impl<T> BorrowUnordered for T
impl<T> BorrowUnordered for T
fn as_unordered(&self) -> &Unordered<T>
Source§impl<T> CallHasher for T
impl<T> CallHasher for 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,
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.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
fn equivalent(&self, key: &K) -> bool
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::RequestSource§impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
impl<T, U, C> IntoWithContext<U, C> for Twhere
U: FromWithContext<T, C>,
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> ResourceProvider<()> for T
impl<T> ResourceProvider<()> for T
Source§fn get_resource(&self) -> &()
fn get_resource(&self) -> &()
T.