pub struct Lockfile {
pub entries: Vec<LockEntry>,
}Expand description
Version-pinning lockfile persisted as YAML.
Stored at .ta/workflow.lock (or .ta/agent.lock) and tracks the
exact version + checksum of every external dependency.
Fields§
§entries: Vec<LockEntry>Ordered list of locked entries.
Implementations§
Source§impl Lockfile
impl Lockfile
Sourcepub fn load(path: &Path) -> Result<Self, SourceError>
pub fn load(path: &Path) -> Result<Self, SourceError>
Load a lockfile from disk. Returns an empty lockfile if the file does not exist.
Sourcepub fn save(&self, path: &Path) -> Result<(), SourceError>
pub fn save(&self, path: &Path) -> Result<(), SourceError>
Persist the lockfile to disk as YAML.
Sourcepub fn add(&mut self, entry: LockEntry)
pub fn add(&mut self, entry: LockEntry)
Add or update an entry. If an entry with the same name already exists, it is replaced.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Lockfile
impl<'de> Deserialize<'de> for Lockfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
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
Mutably borrows from an owned value. Read more