pub struct LockFile {
pub metadata: Option<LockMetadata>,
pub dependencies: Vec<LockedDependency>,
}Expand description
Lock file structure for actr.lock.toml
Format matches documentation spec:
[metadata]
version = 1
generated_at = "2024-01-15T10:30:00Z"
[[dependency]]
name = "user-service"
actr_type = "acme+user-service"
description = "User management service"
fingerprint = "service_semantic:a1b2c3d4e5f6..."
published_at = 1705315800
tags = ["latest", "stable"]
cached_at = "2024-01-15T10:30:00Z"
[[dependency.files]]
path = "user-service/user.v1.proto"
fingerprint = "semantic:abc123..."Fields§
§metadata: Option<LockMetadata>Lock file metadata
dependencies: Vec<LockedDependency>Locked dependencies (ordered array for deterministic output)
Implementations§
Source§impl LockFile
impl LockFile
Sourcepub fn add_dependency(&mut self, dep: LockedDependency)
pub fn add_dependency(&mut self, dep: LockedDependency)
Add or update a dependency
Sourcepub fn get_dependency(&self, name: &str) -> Option<&LockedDependency>
pub fn get_dependency(&self, name: &str) -> Option<&LockedDependency>
Get a dependency by name
Sourcepub fn remove_dependency(&mut self, name: &str) -> bool
pub fn remove_dependency(&mut self, name: &str) -> bool
Remove a dependency by name
Sourcepub fn update_timestamp(&mut self)
pub fn update_timestamp(&mut self)
Update generation timestamp
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 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
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>
Converts
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>
Converts
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