Enum ockam_core::errcode::Origin
source · [−]#[repr(u8)]
#[non_exhaustive]
pub enum Origin {
Show 14 variants
Unknown,
Application,
Vault,
Transport,
Node,
Api,
Identity,
Channel,
KeyExchange,
Executor,
Core,
Ockam,
Authorization,
Other,
}
Expand description
Origin indicates the abstract source of an error.
Note that Error
should already contain precise origin
information (file, line) where the error originated from.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Unknown
An error for which there is no way to determine a more specific origin.
Eventually this should also be used for errors which, during
deserialization, have an unknown Origin
(for now this is too
error-prone for various reasons).
Application
Reserved for errors emitted by applications using ockam.
Vault
An error originating from the vault.
Transport
Errors emitted by the transport layer.
Node
Errors from some part of the node implementation — the router or relay, for example.
Api
Errors from the surface API — for example: the FFI layer.
Identity
Errors from within the identity-management code.
Channel
Errors from the secure channel implementation.
KeyExchange
Errors occurring from the one of the key exchange implementations.
Executor
An error which occurs in the executor (e.g. ockam_executor
, since
tokio
errors will likely come from elsewhere).
Core
Other errors from within ockam
or ockam_core
.
Ockam
Ockam protocol crate
Authorization
Errors from within the Ockam authorization code.
Other
Errors from other sources, such as libraries extending ockam
.
Note: The actual source (file, line, …) will (hopefully) be available on the error itself, as one of the members of the payload.
Implementations
Trait Implementations
sourceimpl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
sourcefn 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>,
sourceimpl Ord for Origin
impl Ord for Origin
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Selfwhere
Self: PartialOrd<Self>,
sourceimpl PartialOrd<Origin> for Origin
impl PartialOrd<Origin> for Origin
sourcefn partial_cmp(&self, other: &Origin) -> Option<Ordering>
fn partial_cmp(&self, other: &Origin) -> Option<Ordering>
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more