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

Function sample_mapping

atomic-repository/src/repository/ref_mapping.rs:614–634  ·  view source on GitHub ↗
(
        view: &str,
        local_ref: Option<&str>,
        last_observed_local: Option<&str>,
        last_observed_atomic: Option<&str>,
    )

Source from the content-addressed store, hash-verified

612 use super::*;
613
614 pub fn sample_mapping(
615 view: &str,
616 local_ref: Option<&str>,
617 last_observed_local: Option<&str>,
618 last_observed_atomic: Option<&str>,
619 ) -> RefMapping {
620 RefMapping {
621 version: REF_MAPPING_VERSION,
622 view_id: 1,
623 view_name: view.to_string(),
624 scope: ViewScope::Shared as u8,
625 local_ref: local_ref.map(str::to_string),
626 remote: None,
627 last_observed_local: last_observed_local.map(str::to_string),
628 last_observed_remote: None,
629 last_exported: None,
630 last_exported_state: None,
631 last_observed_atomic: last_observed_atomic.map(str::to_string),
632 status: RefSyncStatus::Synchronized,
633 }
634 }
635}
636#[cfg(test)]
637mod containment_tests {

Calls

no outgoing calls