pub struct LockFile {
pub version: u32,
pub dependencies: IndexMap<SourceName, LockedSource>,
pub items: IndexMap<String, LockedItemV2>,
pub config_entries: BTreeMap<String, BTreeMap<String, ConfigEntryRecord>>,
}Expand description
The complete lock file — ownership registry for all managed items.
Schema version 2: items are keyed by logical identity (“kind/name”), and each item carries a list of per-output records (one per target root materialization).
TOML format, deterministically ordered (sorted keys) for clean git diffs.
Fields§
§version: u32Schema version. Current version is 2.
dependencies: IndexMap<SourceName, LockedSource>§items: IndexMap<String, LockedItemV2>V2: logical items keyed by “kind/name” identity string.
config_entries: BTreeMap<String, BTreeMap<String, ConfigEntryRecord>>Config entries installed by mars sync, keyed by target root and entry key.
Implementations§
Source§impl LockFile
impl LockFile
Sourcepub fn find_by_dest_path(&self, dest_path: &DestPath) -> Option<LockedItem>
pub fn find_by_dest_path(&self, dest_path: &DestPath) -> Option<LockedItem>
Look up a locked item by its output dest_path, returning a flat LockedItem view.
Searches across all items and their output records. Returns the first match.
Sourcepub fn contains_dest_path(&self, dest_path: &DestPath) -> bool
pub fn contains_dest_path(&self, dest_path: &DestPath) -> bool
Check if any output record has the given dest_path.
Sourcepub fn all_output_dest_paths(&self) -> impl Iterator<Item = &DestPath>
pub fn all_output_dest_paths(&self) -> impl Iterator<Item = &DestPath>
Iterate all output dest_paths across all items.
Sourcepub fn output_dest_paths_for_target(&self, target_root: &str) -> HashSet<String>
pub fn output_dest_paths_for_target(&self, target_root: &str) -> HashSet<String>
Dest paths previously managed under a specific target root.
Sourcepub fn contains_output(&self, target_root: &str, dest_path: &str) -> bool
pub fn contains_output(&self, target_root: &str, dest_path: &str) -> bool
Whether the lock records ownership of dest_path under target_root.
Sourcepub fn canonical_flat_items(&self) -> Vec<(DestPath, LockedItem)>
pub fn canonical_flat_items(&self) -> Vec<(DestPath, LockedItem)>
Flat view of canonical .mars outputs only.
Sourcepub fn flat_items_for_target(
&self,
target_root: &str,
) -> Vec<(DestPath, LockedItem)>
pub fn flat_items_for_target( &self, target_root: &str, ) -> Vec<(DestPath, LockedItem)>
Flat view of outputs materialized under target_root.
Sourcepub fn flat_items(&self) -> Vec<(DestPath, LockedItem)>
pub fn flat_items(&self) -> Vec<(DestPath, LockedItem)>
Flat view of all items as owned (dest_path, LockedItem) pairs.
Used by diff, orphan scan, and CLI commands that need a per-output view.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for LockFile
Custom Deserialize for LockFile: delegates to the v2 wire type.
impl<'de> Deserialize<'de> for LockFile
Custom Deserialize for LockFile: delegates to the v2 wire type.
For reading v1 lock files, always go through load() which handles
the v1→v2 promotion. Direct deserialization via toml::from_str::<LockFile>
only supports v2 format.
Source§fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
fn deserialize<D: Deserializer<'de>>(deserializer: D) -> Result<Self, D::Error>
impl StructuralPartialEq for LockFile
Auto Trait Implementations§
impl Freeze for LockFile
impl RefUnwindSafe for LockFile
impl Send for LockFile
impl Sync for LockFile
impl Unpin for LockFile
impl UnsafeUnpin for LockFile
impl UnwindSafe for LockFile
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more