guppy::graph

Trait PackageResolver

source
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§

source

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> PackageResolver<'g> for &mut dyn PackageResolver<'g>

source§

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> PackageResolver<'g> for Box<dyn PackageResolver<'g> + '_>

source§

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

Implementations on Foreign Types§

source§

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

source§

fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool

source§

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

source§

fn accept(&mut self, query: &PackageQuery<'g>, link: PackageLink<'g>) -> bool

Implementors§

source§

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