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

Method from_str

atomic-core/src/pristine/vault.rs:74–85  ·  view source on GitHub ↗
(s: &str)

Source from the content-addressed store, hash-verified

72 type Err = String;
73
74 fn from_str(s: &str) -> Result<Self, Self::Err> {
75 match s {
76 "session" => Ok(Self::Session),
77 "tool_result" => Ok(Self::ToolResult),
78 "memory" => Ok(Self::Memory),
79 "intent" => Ok(Self::Intent),
80 "skill" => Ok(Self::Skill),
81 "scratch" => Ok(Self::Scratch),
82 "attestation" => Ok(Self::Attestation),
83 _ => Err(format!("unknown vault entry type: {s}")),
84 }
85 }
86}
87
88impl std::fmt::Display for VaultEntryType {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected