Skip to main content

TopologyOps

Trait TopologyOps 

Source
pub trait TopologyOps {
    // Required method
    fn sort(
        &self,
        names: &[&str],
        requires: &[&[&str]],
    ) -> Result<Vec<usize>, ConfigError>;
}
Expand description

Topological dependency resolver for feature load ordering.

Implemented by crate::Topology.

Required Methods§

Source

fn sort( &self, names: &[&str], requires: &[&[&str]], ) -> Result<Vec<usize>, ConfigError>

Return a topological ordering of the provided names.

names is the list of feature names; requires[i] is the slice of dependencies for names[i].

§Errors

Returns ConfigError::Validation listing all nodes involved in a detected cycle.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§