Skip to main content

CargoLinkVisitor

Trait CargoLinkVisitor 

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

Represents whether a particular link within a package graph should be followed while building a CargoSet.

This is similar to PackageLinkVisitor, but is passed a CargoLinkContext with additional information about the Cargo build.

Required Methods§

Returns true if this link should be followed.

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

Trait Implementations§

Source§

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

Returns true if this link should be followed. Read more
Source§

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

Returns true if this link should be followed. 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> CargoLinkVisitor<'g> for &mut T
where T: CargoLinkVisitor<'g>,

Source§

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

Implementors§

Source§

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