MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / ChangeError

Enum ChangeError

atomic-core/src/change/change.rs:81–113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79/// Errors that can occur during change operations.
80#[derive(Debug, Error)]
81pub enum ChangeError {
82 /// IO error during read/write
83 #[error("IO error: {0}")]
84 Io(#[from] std::io::Error),
85
86 /// V3 format error (postcard serialization, compression, hash verification, etc.)
87 #[error("Format error: {0}")]
88 Format(#[from] format_v3::FormatError),
89
90 /// JSON error for unhashed section
91 #[error("JSON error: {0}")]
92 Json(#[from] serde_json::Error),
93
94 /// Hash mismatch during verification
95 #[error("Change hash mismatch: claimed {claimed}, computed {computed}")]
96 HashMismatch { claimed: String, computed: String },
97
98 /// Contents hash mismatch
99 #[error("Contents hash mismatch: claimed {claimed}, computed {computed}")]
100 ContentsHashMismatch { claimed: String, computed: String },
101
102 /// Missing required content
103 #[error("Missing contents for hash {hash}")]
104 MissingContents { hash: String },
105
106 /// Invalid change structure
107 #[error("Invalid change: {0}")]
108 Invalid(String),
109
110 /// Invalid or noncanonical hashed change facts.
111 #[error(transparent)]
112 Validation(#[from] ChangeValidationError),
113}
114
115/// A complete change (patch).
116///

Callers 2

fromMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected