dep-tree

Crates.iodep-tree
lib.rsdep-tree
version0.1.0
created_at2024-11-21 12:16:10.513816+00
updated_at2024-11-21 12:16:10.513816+00
descriptionDependency tree structure for building dependency requirements
homepage
repositoryhttps://github.com/ay0ks/dep-tree
max_upload_size
id1456075
size7,154
Dymitr (ay0ks)

documentation

README

Dependency tree structure for building dependency requirements

Example:

use dep_tree::DepTreeBuilder;

fn main() {
  let deps = DepTreeBuilder::new()
    .with_dep((1, 1), vec![(1, 2), (1, 3)])
    .with_dep((1, 2), vec![])
    .with_dep((1, 3), vec![(1, 3)]) // Self-dependency
    .with_dep((2, 0), vec![(2, 1)]) 
    .with_dep((2, 1), vec![(2, 2)]) // Circular dependency
    .with_dep((2, 2), vec![(2, 1)])
    .with_dep((2, 3), vec![])
    .build();
  println!("{}", deps.unwrap_or_else(|e| panic!("{}", e.to_string())));
}
Commit count: 0

cargo fmt