pub struct Dependency<'a> {
pub manager: &'a str,
pub package: &'a str,
pub req: Option<VersionReq>,
pub version_str: Option<String>,
pub description: Option<&'a str>,
}Expand description
A parsed dependency specification.
This represents a requirement for another package, which may be managed by Zoi
or an external package manager (e.g. apt, brew, npm).
Fields§
§manager: &'a strThe name of the package manager responsible for this dependency (e.g. “zoi”, “apt”).
package: &'a strThe name of the package in the target ecosystem.
req: Option<VersionReq>A semver version requirement, if applicable.
version_str: Option<String>The raw version string or channel name (e.g. “1.2.3”, “stable”).
description: Option<&'a str>An optional description of the dependency.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Dependency<'a>
impl<'a> RefUnwindSafe for Dependency<'a>
impl<'a> Send for Dependency<'a>
impl<'a> Sync for Dependency<'a>
impl<'a> Unpin for Dependency<'a>
impl<'a> UnsafeUnpin for Dependency<'a>
impl<'a> UnwindSafe for Dependency<'a>
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> 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