pub fn links<'a>(
        &'a self,
        direction: DependencyDirection,
    ) -> impl Iterator<Item = PackageLink<'g>> + 'a {
        let graph = self.graph.0;
        self.core
            .links(graph.dep_graph(), graph.sccs(), direction)
            .map(move |(source_ix, target_ix, edge_ix)| {
                PackageLink::new(graph, source_ix, target_ix, edge_ix, None)
            })
    }
Creates an iterator over `PackageLink` instances.

If the iteration is in forward order, for any given package, at least one link where the
package is on the `to` end is returned before any links where the package is on the
`from` end.

If the iteration is in reverse order, for any given package, at least one link where the
package is on the `from` end is returned before any links where the package is on the `to`
end.

## Cycles

The links in a dependency cycle will be returned in non-dev order. When the direction is
forward, if package Foo has a dependency on Bar, and Bar has a cyclic dev-dependency on Foo,
then the link Foo -> Bar is returned before the link Bar -> Foo.
guppy/src/graph/resolve.rs