Struct move_package::resolution::resolution_graph::ResolutionGraph
source · pub struct ResolutionGraph<T> {
pub build_options: BuildConfig,
pub root_package: SourceManifest,
pub graph: DiGraphMap<PackageName, ()>,
pub package_table: BTreeMap<PackageName, ResolutionPackage<T>>,
}
Expand description
A ResolutionGraph
comes in two flavors:
- a
ResolutionGraph
during resolution (some named addresses may yet be instantiated) - a
ResolvedGraph
which is a graph after resolution in which all named addresses have been assigned a value.
Named addresses can be assigned values in a couple different ways:
- They can be assigned a value in the declaring package. In this case the value of that named address will always be that value.
- Can be left unassigned in the declaring package. In this case it can receive its value through unification across the package graph.
Named addresses can also be renamed in a package and will be re-exported under thes new names in this case.
Fields§
§build_options: BuildConfig
Build options
root_package: SourceManifest
Root package
graph: DiGraphMap<PackageName, ()>
Dependency graph
package_table: BTreeMap<PackageName, ResolutionPackage<T>>
A mapping of package name to its resolution
Implementations§
source§impl ResolutionGraph<ResolvingNamedAddress>
impl ResolutionGraph<ResolvingNamedAddress>
pub fn new( root_package: SourceManifest, root_package_path: PathBuf, build_options: BuildConfig ) -> Result<ResolutionGraph<ResolvingNamedAddress>>
pub fn resolve(self) -> Result<ResolvedGraph>
source§impl ResolutionGraph<AccountAddress>
impl ResolutionGraph<AccountAddress>
pub fn get_package(&self, package_ident: &PackageName) -> &ResolvedPackage
Trait Implementations§
source§impl<T: Clone> Clone for ResolutionGraph<T>
impl<T: Clone> Clone for ResolutionGraph<T>
source§fn clone(&self) -> ResolutionGraph<T>
fn clone(&self) -> ResolutionGraph<T>
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more