pub enum MeshError {
Io(Error),
InvalidKey(String),
BadSignature,
InvalidCertChain(String),
CaveatAmplification,
Expired(String),
MalformedEnvelope(String),
Replay,
BadSequence {
expected: u64,
actual: u64,
},
Encoding(String),
}Expand description
Errors that can arise from agent-mesh primitives.
Variants§
Io(Error)
Underlying I/O failure (file read/write, permission, etc.).
InvalidKey(String)
A key blob (private or public) was malformed or rejected by the underlying crypto library.
BadSignature
An ed25519 signature failed to verify against its claimed key and message.
InvalidCertChain(String)
A cert chain was structurally valid but semantically wrong — e.g. the user pubkey didn’t sign the embedded metadata.
CaveatAmplification
A delegated agent’s caveats are not ⊑ its parent’s — delegation is
attenuation-only, so a child may never grant more authority than the
parent it chains to.
Expired(String)
A credential or envelope was rejected because it claims an expired validity window.
MalformedEnvelope(String)
A wire envelope was structurally malformed (wrong shape, wrong CID, missing fields).
Replay
A duplicate nonce was observed (replay detection).
BadSequence
An envelope arrived with the wrong sequence number for its sender’s session.
Encoding(String)
A serialization/deserialization failure (hex, serde, etc.).
Trait Implementations§
Source§impl Error for MeshError
impl Error for MeshError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()