switchyard-fs 1.0.0

Switchyard: safe, atomic, reversible filesystem swaps with policy and audit
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use crate::api::DebugLockManager;

pub(crate) fn lock_backend_label(mgr: Option<&dyn DebugLockManager>) -> String {
    if let Some(m) = mgr {
        // MSRV-friendly detection: use Debug representation to hint at backend
        let dbg = format!("{m:?}");
        if dbg.contains("FileLockManager") {
            "file".to_string()
        } else {
            "custom".to_string()
        }
    } else {
        "none".to_string()
    }
}