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

Function fallback_mapping

atomic-repository/src/repository/ref_mapping.rs:593–608  ·  view source on GitHub ↗

A minimal `Unrepresentable` mapping for a view that has no stored row but must be represented in mapping-scoped output (deleted Shared view).

(view: &str, scope: ViewScope)

Source from the content-addressed store, hash-verified

591/// A minimal `Unrepresentable` mapping for a view that has no stored row but
592/// must be represented in mapping-scoped output (deleted Shared view).
593fn fallback_mapping(view: &str, scope: ViewScope) -> RefMapping {
594 RefMapping {
595 version: REF_MAPPING_VERSION,
596 view_id: 0,
597 view_name: view.to_string(),
598 scope: scope as u8,
599 local_ref: None,
600 remote: None,
601 last_observed_local: None,
602 last_observed_remote: None,
603 last_exported: None,
604 last_exported_state: None,
605 last_observed_atomic: None,
606 status: RefSyncStatus::Unrepresentable,
607 }
608}
609
610/// Shared sample-mapping builder for decision tests.
611pub mod tests_support {

Calls

no outgoing calls

Tested by

no test coverage detected