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

Method as_str

atomic-objects/src/sync.rs:92–101  ·  view source on GitHub ↗

The storage key segment for this family (the `{family}` in `{prefix}/{family}/{key}`). Stable on the wire — do not rename without a protocol bump.

(self)

Source from the content-addressed store, hash-verified

90 /// `{prefix}/{family}/{key}`). Stable on the wire — do not rename without a
91 /// protocol bump.
92 pub fn as_str(self) -> &'static str {
93 match self {
94 ObjectFamily::Change => "changes",
95 ObjectFamily::Tag => "tags",
96 ObjectFamily::Provenance => "provenance",
97 ObjectFamily::Attest => "attest",
98 ObjectFamily::View => "views",
99 ObjectFamily::Conflict => "conflicts",
100 }
101 }
102
103 /// Parse a family from its storage key segment; `None` for an unknown one.
104 pub fn from_segment(s: &str) -> Option<Self> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected