pub struct PackageLinkContext<'g> { /* private fields */ }Expand description
Context passed to a PackageLinkVisitor for each link visited during a
resolve operation.
Implementations§
Source§impl<'g> PackageLinkContext<'g>
impl<'g> PackageLinkContext<'g>
Sourcepub fn query(&self) -> &PackageQuery<'g>
pub fn query(&self) -> &PackageQuery<'g>
Returns the query this resolve operation was started from.
Sourcepub fn direction(&self) -> DependencyDirection
pub fn direction(&self) -> DependencyDirection
Returns the direction of the traversal.
Sourcepub fn starts_from_initial(&self, link: &PackageLink<'g>) -> bool
pub fn starts_from_initial(&self, link: &PackageLink<'g>) -> bool
Returns true if the link’s starting endpoint (from for forward
queries, to for reverse queries) is one of the query’s initials.
Trait Implementations§
Source§impl<'g> Clone for PackageLinkContext<'g>
impl<'g> Clone for PackageLinkContext<'g>
Source§fn clone(&self) -> PackageLinkContext<'g>
fn clone(&self) -> PackageLinkContext<'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<'g> Freeze for PackageLinkContext<'g>
impl<'g> RefUnwindSafe for PackageLinkContext<'g>
impl<'g> Send for PackageLinkContext<'g>
impl<'g> Sync for PackageLinkContext<'g>
impl<'g> Unpin for PackageLinkContext<'g>
impl<'g> UnsafeUnpin for PackageLinkContext<'g>
impl<'g> UnwindSafe for PackageLinkContext<'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