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

Method try_from

atomic-core/src/pristine/path_claim.rs:36–44  ·  view source on GitHub ↗
(value: u8)

Source from the content-addressed store, hash-verified

34 type Error = PristineError;
35
36 fn try_from(value: u8) -> Result<Self, Self::Error> {
37 match value {
38 0 => Ok(Self::File),
39 1 => Ok(Self::Directory),
40 other => Err(invalid_path_claim_data(format!(
41 "unknown path-claim kind {other}"
42 ))),
43 }
44 }
45}
46
47/// State contributed by one path-claim transition.

Callers

nothing calls this directly

Calls 1

invalid_path_claim_dataFunction · 0.85

Tested by

no test coverage detected