1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
use oro_package_spec::PackageSpec;
#[derive(Debug, Clone, PartialEq, Eq, PartialOrd, Ord)]
pub enum DepType {
Prod,
Dev,
Peer,
Opt,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Edge {
pub(crate) requested: PackageSpec,
pub(crate) dep_type: DepType,
}
impl Edge {
pub(crate) fn new(requested: PackageSpec, dep_type: DepType) -> Self {
Self {
requested,
dep_type,
}
}
}