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

Method from

atomic-core/src/output/error.rs:261–277  ·  view source on GitHub ↗
(err: ContentError)

Source from the content-addressed store, hash-verified

259
260impl From<ContentError> for OutputError {
261 fn from(err: ContentError) -> Self {
262 match err {
263 ContentError::Io(e) => OutputError::Io(e),
264 ContentError::ChangeNotFound { hash } => OutputError::MissingChange { hash },
265 ContentError::Truncated { expected, actual } => OutputError::ChangeStore {
266 message: format!(
267 "Content truncated: expected {} bytes, got {}",
268 expected, actual
269 ),
270 hash: None,
271 },
272 ContentError::VertexContent { node } => OutputError::NodeNotFound {
273 node,
274 change_id: Some(node.change),
275 },
276 }
277 }
278}
279
280/// Result type alias for content operations.

Callers

nothing calls this directly

Calls 1

PristineClass · 0.85

Tested by

no test coverage detected