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

Method mode_code

atomic-repository/src/repository/workspace_txn.rs:652–661  ·  view source on GitHub ↗

Stable observability code for the transaction mode this remediation was produced under, when the variant carries one.

(&self)

Source from the content-addressed store, hash-verified

650 /// Stable observability code for the transaction mode this remediation
651 /// was produced under, when the variant carries one.
652 pub fn mode_code(&self) -> &'static str {
653 match self {
654 Self::GitOperationInProgress { mode, .. } | Self::Unanchored { mode, .. } => {
655 mode.as_str()
656 }
657 Self::OperationHeadsDiverged { .. }
658 | Self::ConcurrentGitMutation { .. }
659 | Self::GitLocksBusy { .. } => "unknown",
660 }
661 }
662
663 /// One-line informative description for Observe output and typed refusals.
664 ///

Callers

nothing calls this directly

Calls 1

as_strMethod · 0.45

Tested by

no test coverage detected