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

Method parse

atomic-objects/src/view_snapshot.rs:40–46  ·  view source on GitHub ↗

Parse from the object's `scope` string. Unknown values are treated as `Shared` — the safe default (a root that inherits nothing).

(s: &str)

Source from the content-addressed store, hash-verified

38 /// Parse from the object's `scope` string. Unknown values are treated as
39 /// `Shared` — the safe default (a root that inherits nothing).
40 pub fn parse(s: &str) -> Self {
41 if s == "draft" {
42 ViewScopeLabel::Draft
43 } else {
44 ViewScopeLabel::Shared
45 }
46 }
47}
48
49/// An immutable, content-addressed snapshot of a view's state.

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected