pub trait PackageResolver<'g> {
// Required method
fn accept(
&mut self,
query: &PackageQuery<'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§
Sourcefn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
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, 'a> PackageResolver<'g> for &'a mut dyn PackageResolver<'g>
impl<'g, 'a> PackageResolver<'g> for &'a mut dyn PackageResolver<'g>
Source§fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
Returns true if this link should be followed during a resolve operation. Read more
Source§impl<'g, 'a> PackageResolver<'g> for Box<dyn PackageResolver<'g> + 'a>
impl<'g, 'a> PackageResolver<'g> for Box<dyn PackageResolver<'g> + 'a>
Source§fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool
Returns true if this link should be followed during a resolve operation. Read more