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

Method new

atomic-core/src/pristine/attribute.rs:25–36  ·  view source on GitHub ↗
(introduced_by: NodeId, value: InodeAttr)

Source from the content-addressed store, hash-verified

23
24impl InodeAttrEvent {
25 pub fn new(introduced_by: NodeId, value: InodeAttr) -> Result<Self, PristineError> {
26 value.validate().map_err(invalid_attr)?;
27 if introduced_by == NodeId::ROOT {
28 return Err(PristineError::Inconsistent {
29 message: "inode attribute event cannot be introduced by ROOT".to_string(),
30 });
31 }
32 Ok(Self {
33 introduced_by,
34 value,
35 })
36 }
37}
38
39/// The causally maximal values of one attribute.

Callers

nothing calls this directly

Calls 1

validateMethod · 0.45

Tested by

no test coverage detected