Source referencesRust module referenceoas-document
oas-document · error
Declared module signatures, types, configuration, and source documentation.
Source: oas/oas/oas-document/src/error.rs. SHA-256: c054eaf593cb626500298c19fc5307892f8adb3b04aabc86f7665bfb6afe7a4b.
This source reference follows declared modules and preserves feature attributes. It includes public declarations and implementation methods in those modules. Private-module exports and trait resolution still require the compiler; not every declaration is a crate-root import. Function bodies and constant values are omitted. Source comments describe their implementation context and are not a production deployment claim.
error::DocumentError
Errors arising from OAS Identity Document operations.
#[derive(Debug, Error)]
pub enum DocumentError {
/// The document is missing a required field.
#[error("missing required field '{field}' in OAS Identity Document")]
MissingField {
/// The name of the missing field.
field: String,
},
/// A field value is invalid.
#[error("invalid value for field '{field}': {reason}")]
InvalidField {
/// The field name.
field: String,
/// Why the value is invalid.
reason: String,
},
/// Document proof verification failed.
#[error("document proof verification failed: {reason}")]
ProofVerificationFailed {
/// Why verification failed.
reason: String,
},
/// Document proof generation failed.
#[error("document proof generation failed: {reason}")]
ProofGenerationFailed {
/// Why generation failed.
reason: String,
},
/// Conformance level requirements not met.
#[error("conformance level {level} requirements not met: {reason}")]
ConformanceNotMet {
/// The conformance level that was not met.
level: String,
/// What requirement was not satisfied.
reason: String,
},
/// JSON serialization/deserialization failed.
#[error("JSON error: {0}")]
Json(#[from] serde_json::Error),
/// DID parsing failed.
#[error("DID error: {0}")]
Did(#[from] oas_did::DidError),
/// Cryptographic operation failed.
#[error("crypto error: {0}")]
Crypto(#[from] oas_crypto::CryptoError),
/// The lifecycle status transition is not allowed.
#[error("invalid lifecycle transition from '{from}' to '{to}'")]
InvalidLifecycleTransition {
/// Current status.
from: String,
/// Attempted new status.
to: String,
},
/// Sequence number is not valid.
#[error("invalid sequence number {sequence}: {reason}")]
InvalidSequence {
/// The invalid sequence number.
sequence: u64,
/// Why it's invalid.
reason: String,
},
}Source line: 8.