Enum ockam_core::errcode::Origin
source · #[non_exhaustive]#[repr(u8)]pub enum Origin {
Show 14 variants
Unknown = 0,
Application = 1,
Vault = 2,
Transport = 3,
Node = 4,
Api = 5,
Identity = 6,
Channel = 7,
KeyExchange = 8,
Executor = 9,
Core = 10,
Ockam = 11,
Authorization = 12,
Other = 13,
}
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 = 0
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 = 1
Reserved for errors emitted by applications using ockam.
Vault = 2
An error originating from the vault.
Transport = 3
Errors emitted by the transport layer.
Node = 4
Errors from some part of the node implementation — the router or relay, for example.
Api = 5
Errors from the surface API — for example: the FFI layer.
Identity = 6
Errors from within the identity-management code.
Channel = 7
Errors from the secure channel implementation.
KeyExchange = 8
Errors occurring from the one of the key exchange implementations.
Executor = 9
An error which occurs in the executor (e.g. ockam_executor
, since
tokio
errors will likely come from elsewhere).
Core = 10
Other errors from within ockam
or ockam_core
.
Ockam = 11
Ockam protocol crate
Authorization = 12
Errors from within the Ockam authorization code.
Other = 13
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§
source§impl<'de> Deserialize<'de> for Origin
impl<'de> Deserialize<'de> for Origin
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>,
source§impl Ord for Origin
impl Ord for Origin
source§impl PartialEq for Origin
impl PartialEq for Origin
source§impl PartialOrd for Origin
impl PartialOrd for Origin
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read more