Skip to main content

Installable

Trait Installable 

Source
pub trait Installable<'lock> {
    // Required methods
    fn install_path(&self) -> &'lock Path;
    fn lock(&self) -> &'lock Lock;
    fn roots(&self) -> impl Iterator<Item = &PackageName>;
    fn project_name(&self) -> Option<&PackageName>;

    // Provided methods
    fn group_root(
        &self,
        _groups: &DependencyGroupsWithDefaults,
    ) -> Option<&PackageName> { ... }
    fn includes_group(
        &self,
        _package: Option<&PackageName>,
        group: &GroupName,
        groups: &DependencyGroupsWithDefaults,
    ) -> bool { ... }
    fn to_resolution(
        &self,
        marker_env: &ResolverMarkerEnvironment,
        tags: &Tags,
        extras: &ExtrasSpecificationWithDefaults,
        groups: &DependencyGroupsWithDefaults,
        build_options: &BuildOptions,
        install_options: &InstallOptions,
    ) -> Result<Resolution, LockError> { ... }
    fn installable_node(
        &self,
        package: &Package,
        tags: &Tags,
        marker_env: &ResolverMarkerEnvironment,
        build_options: &BuildOptions,
    ) -> Result<Node, LockError> { ... }
    fn non_installable_node(
        &self,
        package: &Package,
        tags: &Tags,
        marker_env: &ResolverMarkerEnvironment,
    ) -> Result<Node, LockError> { ... }
    fn package_to_node(
        &self,
        package: &Package,
        tags: &Tags,
        build_options: &BuildOptions,
        install_options: &InstallOptions,
        marker_env: &ResolverMarkerEnvironment,
    ) -> Result<Node, LockError> { ... }
}

Required Methods§

Source

fn install_path(&self) -> &'lock Path

Return the root install path.

Source

fn lock(&self) -> &'lock Lock

Return the Lock to install.

Source

fn roots(&self) -> impl Iterator<Item = &PackageName>

Return the PackageName of the root packages in the target.

Source

fn project_name(&self) -> Option<&PackageName>

Return the PackageName of the target, if available.

Provided Methods§

Source

fn group_root( &self, _groups: &DependencyGroupsWithDefaults, ) -> Option<&PackageName>

Return the package whose dependency groups, but not production dependencies, are included.

Source

fn includes_group( &self, _package: Option<&PackageName>, group: &GroupName, groups: &DependencyGroupsWithDefaults, ) -> bool

Return whether a dependency group should be included for its owning package.

A None package represents groups defined directly on a non-project workspace root.

Source

fn to_resolution( &self, marker_env: &ResolverMarkerEnvironment, tags: &Tags, extras: &ExtrasSpecificationWithDefaults, groups: &DependencyGroupsWithDefaults, build_options: &BuildOptions, install_options: &InstallOptions, ) -> Result<Resolution, LockError>

Convert the Lock to a Resolution using the given marker environment, tags, and root.

Source

fn installable_node( &self, package: &Package, tags: &Tags, marker_env: &ResolverMarkerEnvironment, build_options: &BuildOptions, ) -> Result<Node, LockError>

Create an installable Node from a Package.

Source

fn non_installable_node( &self, package: &Package, tags: &Tags, marker_env: &ResolverMarkerEnvironment, ) -> Result<Node, LockError>

Create a non-installable Node from a Package.

Source

fn package_to_node( &self, package: &Package, tags: &Tags, build_options: &BuildOptions, install_options: &InstallOptions, marker_env: &ResolverMarkerEnvironment, ) -> Result<Node, LockError>

Convert a lockfile entry to a graph Node.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§