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§
Sourcefn visit_link(
&mut self,
cx: &CargoLinkContext<'_, 'g>,
link: PackageLink<'g>,
) -> bool
fn visit_link( &mut self, cx: &CargoLinkContext<'_, 'g>, link: PackageLink<'g>, ) -> bool
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> + '_>
impl<'g> CargoLinkVisitor<'g> for Box<dyn CargoLinkVisitor<'g> + '_>
Source§fn visit_link(
&mut self,
cx: &CargoLinkContext<'_, 'g>,
link: PackageLink<'g>,
) -> bool
fn visit_link( &mut self, cx: &CargoLinkContext<'_, 'g>, link: PackageLink<'g>, ) -> bool
Returns true if this link should be followed. Read more
Source§impl<'g> CargoLinkVisitor<'g> for &mut dyn CargoLinkVisitor<'g>
impl<'g> CargoLinkVisitor<'g> for &mut dyn CargoLinkVisitor<'g>
Source§fn visit_link(
&mut self,
cx: &CargoLinkContext<'_, 'g>,
link: PackageLink<'g>,
) -> bool
fn visit_link( &mut self, cx: &CargoLinkContext<'_, 'g>, link: PackageLink<'g>, ) -> bool
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".