pub struct CargoLinkContext<'a, 'g> { /* private fields */ }Expand description
Context passed to a CargoLinkVisitor for each link visited while
building a CargoSet.
Implementations§
Source§impl<'a, 'g> CargoLinkContext<'a, 'g>
impl<'a, 'g> CargoLinkContext<'a, 'g>
Sourcepub fn package_context(&self) -> &PackageLinkContext<'g>
pub fn package_context(&self) -> &PackageLinkContext<'g>
Returns the context for the underlying package graph traversal.
Sourcepub fn build_platform(&self) -> BuildPlatform
pub fn build_platform(&self) -> BuildPlatform
Returns the platform this link is being evaluated for: the target pass or the host pass.
Sourcepub fn platform_spec(&self) -> &PlatformSpec
pub fn platform_spec(&self) -> &PlatformSpec
Returns the platform spec that normal and dev dependencies are evaluated against in this pass.
Sourcepub fn build_dep_platform_spec(&self) -> &PlatformSpec
pub fn build_dep_platform_spec(&self) -> &PlatformSpec
Returns the platform spec that build dependencies are evaluated against in this pass (always the host platform).
Sourcepub fn considers_dev_deps(&self, link: &PackageLink<'g>) -> bool
pub fn considers_dev_deps(&self, link: &PackageLink<'g>) -> bool
Returns true if dev-dependencies of this link may be followed:
CargoOptions::set_include_dev is set and the from package is an
initial.
Sourcepub fn considers_build_deps(&self, link: &PackageLink<'g>) -> bool
pub fn considers_build_deps(&self, link: &PackageLink<'g>) -> bool
Returns true if build-dependencies of this link may be followed: the
from package has a build script.
Trait Implementations§
Source§impl<'a, 'g> Clone for CargoLinkContext<'a, 'g>
impl<'a, 'g> Clone for CargoLinkContext<'a, 'g>
Source§fn clone(&self) -> CargoLinkContext<'a, 'g>
fn clone(&self) -> CargoLinkContext<'a, 'g>
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 moreAuto Trait Implementations§
impl<'a, 'g> Freeze for CargoLinkContext<'a, 'g>
impl<'a, 'g> RefUnwindSafe for CargoLinkContext<'a, 'g>
impl<'a, 'g> Send for CargoLinkContext<'a, 'g>
impl<'a, 'g> Sync for CargoLinkContext<'a, 'g>
impl<'a, 'g> Unpin for CargoLinkContext<'a, 'g>
impl<'a, 'g> UnsafeUnpin for CargoLinkContext<'a, 'g>
impl<'a, 'g> UnwindSafe for CargoLinkContext<'a, 'g>
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<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