pub enum Dependency {
Path {
path: String,
},
Both {
registry: String,
version: String,
git: String,
branch: Option<String>,
tag: Option<String>,
rev: Option<String>,
},
Git {
git: String,
branch: Option<String>,
tag: Option<String>,
rev: Option<String>,
},
Registry {
registry: String,
version: String,
},
}Variants§
Path
Both
A dual reference: the vcs registry is the PRIMARY, default resolution
source (pinned via lex.lock), and git is a recorded mirror/fallback
— used only when the registry is unreachable, or when the CLI is asked
to resolve from git instead (--source git). Listed before Git/
Registry so the untagged deserializer picks it whenever all of
registry + version + git are present. This is what lets a manifest
carry BOTH a git and a vcs reference for the same dependency.
Fields
Git
Registry
Implementations§
Source§impl Dependency
impl Dependency
Sourcepub fn validate(&self) -> Result<(), String>
pub fn validate(&self) -> Result<(), String>
Return an error if more than one of branch/tag/rev is set.
Sourcepub fn registry_coord(&self) -> Option<(&str, &str)>
pub fn registry_coord(&self) -> Option<(&str, &str)>
The vcs/registry coordinate (registry, version) if this dep resolves
(by default) from a registry — both a bare Registry and the dual
Both. None for pure git or path deps.
Trait Implementations§
Source§impl Debug for Dependency
impl Debug for Dependency
Source§impl<'de> Deserialize<'de> for Dependency
impl<'de> Deserialize<'de> for Dependency
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 Dependency
impl RefUnwindSafe for Dependency
impl Send for Dependency
impl Sync for Dependency
impl Unpin for Dependency
impl UnsafeUnpin for Dependency
impl UnwindSafe for Dependency
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