pubgrub/
type_aliases.rs

1// SPDX-License-Identifier: MPL-2.0
2
3//! Publicly exported type aliases.
4
5use crate::DependencyProvider;
6
7/// Map implementation used by the library.
8pub type Map<K, V> = rustc_hash::FxHashMap<K, V>;
9
10/// Set implementation used by the library.
11pub type Set<V> = rustc_hash::FxHashSet<V>;
12
13/// Concrete dependencies picked by the library during [resolve](crate::solver::resolve)
14/// from [DependencyConstraints].
15pub type SelectedDependencies<DP> =
16    Map<<DP as DependencyProvider>::P, <DP as DependencyProvider>::V>;
17
18/// Holds information about all possible versions a given package can accept.
19/// There is a difference in semantics between an empty map
20/// inside [DependencyConstraints] and [Dependencies::Unavailable](crate::solver::Dependencies::Unavailable):
21/// the former means the package has no dependency and it is a known fact,
22/// while the latter means they could not be fetched by the [DependencyProvider].
23pub type DependencyConstraints<P, VS> = Map<P, VS>;