Rust referenceweave-identity
weave-identity · error
Source declarations, signatures and documentation for error.
Source: sigil/weave/adapters/weave-identity/src/error.rs. SHA-256: 6de6d453bfe7885cfc7ba3df4f2c4d735f5a94e8814cf8368356e4143058509f.
This reference follows declared source modules, retains conditional attributes, and includes public declarations and implementation methods. Private-module re-exports and trait resolution require the compiler; this is a source reference, not a claim that every listed item is a root import. Function bodies and constant values are omitted.
error::IdentityError
Errors that can occur during identity operations
#[derive(Debug, Error)]
pub enum IdentityError {
/// Invalid DID format
#[error("Invalid DID format: {0}")]
InvalidDid(String),
/// Invalid key format or data
#[error("Invalid key: {0}")]
InvalidKey(String),
/// Invalid signature format or data
#[error("Invalid signature: {0}")]
InvalidSignature(String),
/// Cryptographic operation failed
#[error("Cryptographic operation failed: {0}")]
CryptographicError(String),
/// Identity type mismatch
#[error("Identity type mismatch: expected {expected}, got {actual}")]
TypeMismatch { expected: String, actual: String },
/// Missing required field
#[error("Missing required field: {0}")]
MissingField(String),
/// Serialization/deserialization error
#[error("Serialization error: {0}")]
Serialization(#[from] serde_json::Error),
/// I/O error
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
/// System error
#[error("System error: {0}")]
SystemError(String),
/// Key generation failed
#[error("Key generation failed: {0}")]
KeyGeneration(String),
/// Verification failed
#[error("Verification failed: {0}")]
VerificationFailed(String),
/// Unsupported operation
#[error("Unsupported operation: {0}")]
UnsupportedOperation(String),
#[error("Invalid identity type: {0}")]
InvalidIdentityType(String),
/// Key not found
#[error("Key not found: {0}")]
KeyNotFound(String),
/// Identity not found
#[error("Identity not found: {0}")]
NotFound(String),
/// Parse error
#[error("Parse error: {0}")]
ParseError(String),
}Source line: 7.
error::Result
Standard result type for identity operations
pub type Result<T> = std::result::Result<T, IdentityError>;Source line: 73.