pub struct LockedSource {
pub name: String,
pub url: String,
pub fetched_at: String,
}
Expand description
A locked source repository with resolved commit information.
Represents a Git repository that has been fetched and resolved to an exact commit hash. This ensures reproducible access to source repositories across different environments and times.
§Fields
- name: Unique identifier used in the manifest to reference this source
- url: Full Git repository URL (HTTP/HTTPS/SSH)
- commit: 40-character SHA-1 commit hash resolved at time of lock
fetched_at
: RFC 3339 timestamp of when the repository was last fetched
§Examples
A typical locked source in TOML format:
[[sources]]
name = "community"
url = "https://github.com/example/agpm-community.git"
commit = "a1b2c3d4e5f6789abcdef0123456789abcdef012"
fetched_at = "2024-01-15T10:30:00Z"
Fields§
§name: String
Unique source name from the manifest.
This corresponds to keys in the [sources]
section of agpm.toml
and is used to reference the source in resource definitions.
url: String
Full Git repository URL.
Supports HTTP, HTTPS, and SSH URLs. This is the exact URL used for cloning and fetching the repository.
fetched_at: String
Timestamp of last successful fetch in RFC 3339 format.
Records when the repository was last fetched from the remote. This helps track staleness and debugging fetch issues.
Trait Implementations§
Source§impl Clone for LockedSource
impl Clone for LockedSource
Source§fn clone(&self) -> LockedSource
fn clone(&self) -> LockedSource
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for LockedSource
impl Debug for LockedSource
Source§impl<'de> Deserialize<'de> for LockedSource
impl<'de> Deserialize<'de> for LockedSource
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 LockedSource
impl RefUnwindSafe for LockedSource
impl Send for LockedSource
impl Sync for LockedSource
impl Unpin for LockedSource
impl UnwindSafe for LockedSource
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