#[non_exhaustive]pub enum LockEntry {
Http(HttpLockEntry),
Git(GitLockEntry),
Private(PrivateLockEntry),
}Expand description
A lock entry for a dependency.
A builder should be used to create the underlying HttpLockEntry or GitLockEntry and then
converted into this type with .into().
§Examples
let dep: LockEntry = HttpLockEntry::builder()
.name("my-dep")
.version("1.2.3")
.url("https://...")
.checksum("dead")
.integrity("beef")
.build()
.into();Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Http(HttpLockEntry)
A lock entry for an HTTP dependency.
Git(GitLockEntry)
A lock entry for a git dependency.
Private(PrivateLockEntry)
A lock entry for a git dependency.
Implementations§
Source§impl LockEntry
impl LockEntry
Sourcepub fn install_path(&self, deps: impl AsRef<Path>) -> PathBuf
pub fn install_path(&self, deps: impl AsRef<Path>) -> PathBuf
The install path of the dependency.
Sourcepub fn as_http(&self) -> Option<&HttpLockEntry>
pub fn as_http(&self) -> Option<&HttpLockEntry>
Get the underlying HttpLockEntry if this is an HTTP lock entry.
Sourcepub fn as_git(&self) -> Option<&GitLockEntry>
pub fn as_git(&self) -> Option<&GitLockEntry>
Get the underlying GitLockEntry if this is a git lock entry.
Sourcepub fn as_private(&self) -> Option<&PrivateLockEntry>
pub fn as_private(&self) -> Option<&PrivateLockEntry>
Get the underlying PrivateLockEntry if this is a private package lock entry.
Trait Implementations§
Source§impl From<GitLockEntry> for LockEntry
impl From<GitLockEntry> for LockEntry
Source§fn from(value: GitLockEntry) -> Self
fn from(value: GitLockEntry) -> Self
Wrap a GitLockEntry in a LockEntry.
Source§impl From<HttpLockEntry> for LockEntry
impl From<HttpLockEntry> for LockEntry
Source§fn from(value: HttpLockEntry) -> Self
fn from(value: HttpLockEntry) -> Self
Wrap an HttpLockEntry in a LockEntry.
Source§impl From<LockEntry> for TomlLockEntry
impl From<LockEntry> for TomlLockEntry
Source§impl From<PrivateLockEntry> for LockEntry
impl From<PrivateLockEntry> for LockEntry
Source§fn from(value: PrivateLockEntry) -> Self
fn from(value: PrivateLockEntry) -> Self
Wrap a PrivateLockEntry in a LockEntry.
Source§impl TryFrom<TomlLockEntry> for LockEntry
impl TryFrom<TomlLockEntry> for LockEntry
impl Eq for LockEntry
impl StructuralPartialEq for LockEntry
Auto Trait Implementations§
impl Freeze for LockEntry
impl RefUnwindSafe for LockEntry
impl Send for LockEntry
impl Sync for LockEntry
impl Unpin for LockEntry
impl UnsafeUnpin for LockEntry
impl UnwindSafe for LockEntry
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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