Skip to main content

PackageLinkVisitor

Trait PackageLinkVisitor 

Source
pub trait PackageLinkVisitor<'g> {
    // Required method
    fn visit_link(
        &mut self,
        cx: &PackageLinkContext<'g>,
        link: PackageLink<'g>,
    ) -> bool;
}
Expand description

Represents whether a particular link within a package graph should be followed during a resolve operation.

Required Methods§

Returns true if this link should be followed during a resolve operation.

Returning false does not prevent the to package (or from package with query_reverse) from being included if it’s reachable through other means.

Trait Implementations§

Source§

impl<'g> PackageLinkVisitor<'g> for Box<dyn PackageLinkVisitor<'g> + '_>

Returns true if this link should be followed during a resolve operation. Read more
Source§

impl<'g> PackageLinkVisitor<'g> for &mut dyn PackageLinkVisitor<'g>

Returns true if this link should be followed during a resolve operation. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<'g, T> PackageLinkVisitor<'g> for &mut T
where T: PackageLinkVisitor<'g>,

Source§

impl<'g> PackageLinkVisitor<'g> for Box<dyn PackageLinkVisitor<'g> + '_>

Implementors§

Source§

impl<'g> PackageLinkVisitor<'g> for &mut dyn PackageLinkVisitor<'g>