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

Method from_code

atomic-repository/src/repository/observability.rs:188–197  ·  view source on GitHub ↗

Accepts only the fixed classification codes; anything else is refused so no free-form text can enter telemetry.

(code: &str)

Source from the content-addressed store, hash-verified

186 /// Accepts only the fixed classification codes; anything else is
187 /// refused so no free-form text can enter telemetry.
188 pub fn from_code(code: &str) -> Option<Self> {
189 match code {
190 "neither" => Some(Self::Neither),
191 "git_to_atomic" => Some(Self::GitToAtomic),
192 "atomic_to_git" => Some(Self::AtomicToGit),
193 "diverged" => Some(Self::Diverged),
194 "unknown" => Some(Self::Unknown),
195 _ => None,
196 }
197 }
198}
199
200/// Workspace-transaction mode code (closed code set).

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected