pub enum CapabilitySource {
Local(LocalSource),
Git(GitSource),
Catalog(CatalogSource),
Pack(PackProvenance),
}Expand description
The origin of an installed capability. Internally tagged as kind on
the wire, so a lockfile row reads [capabilities.source] kind = "git".
Variants§
Implementations§
Source§impl CapabilitySource
impl CapabilitySource
pub fn local(path: impl Into<String>) -> Self
pub fn as_git(&self) -> Option<&GitSource>
pub fn as_pack(&self) -> Option<&PackProvenance>
Sourcepub fn local_path(&self) -> Option<&str>
pub fn local_path(&self) -> Option<&str>
The local path a capability was installed from, when it has one.
Sourcepub fn default_version_scheme(&self) -> VersionScheme
pub fn default_version_scheme(&self) -> VersionScheme
The version scheme a fresh install from this source records. Git installs pin a commit until RFC-101 resolves tags; everything else carries the version its manifest declared.
Trait Implementations§
Source§impl Clone for CapabilitySource
impl Clone for CapabilitySource
Source§fn clone(&self) -> CapabilitySource
fn clone(&self) -> CapabilitySource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · 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 CapabilitySource
impl Debug for CapabilitySource
Source§impl<'de> Deserialize<'de> for CapabilitySource
impl<'de> Deserialize<'de> for CapabilitySource
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
impl Eq for CapabilitySource
Source§impl PartialEq for CapabilitySource
impl PartialEq for CapabilitySource
Source§impl Serialize for CapabilitySource
impl Serialize for CapabilitySource
impl StructuralPartialEq for CapabilitySource
Auto Trait Implementations§
impl Freeze for CapabilitySource
impl RefUnwindSafe for CapabilitySource
impl Send for CapabilitySource
impl Sync for CapabilitySource
impl Unpin for CapabilitySource
impl UnsafeUnpin for CapabilitySource
impl UnwindSafe for CapabilitySource
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