Struct depgraph::DepGraphBuilder
[−]
[src]
pub struct DepGraphBuilder { /* fields omitted */ }
Used to construct a DepGraph
See the module level documentation for an example of how to use this
Methods
impl DepGraphBuilder
[src]
fn new() -> DepGraphBuilder
Create a DepGraphBuilder
with no rules.
fn add_rule<F, P1, P2>(
self,
filename: P1,
dependencies: &[P2],
build_fn: F
) -> DepGraphBuilder where
F: Fn(&Path, &[&Path]) -> Result<(), String> + 'static,
P1: AsRef<Path>,
P2: AsRef<Path>,
self,
filename: P1,
dependencies: &[P2],
build_fn: F
) -> DepGraphBuilder where
F: Fn(&Path, &[&Path]) -> Result<(), String> + 'static,
P1: AsRef<Path>,
P2: AsRef<Path>,
Add a new rule (a file with its dependent files and build instructions).
These can be added in any order, and can be chained.
fn add_dep_to_all<P>(self, dep: P) -> DepGraphBuilder where
P: AsRef<Path>,
P: AsRef<Path>,
Add a dependency to all previously added files. Will only affect previously added files, not those added in the future.
This can be used to make all rules depend on build.rs
, for example.
fn build(self) -> DepResult<DepGraph>
Build the make graph and check for errors like cyclic dependencies and duplicate files.