Module e_collect

Source

Functions§

collect_all_targets
collect_binaries
Runs cargo run --bin (without specifying a binary name) so that Cargo prints an error with a list of available binary targets. Then parses that list to return a vector of Example instances, using the provided prefix.
collect_examples
Runs cargo run --example so that Cargo lists available examples, then parses the stderr output to return a vector of Example instances.
collect_samples
dedup_single_file_over_default_binary
Deduplicates targets by their canonicalized origin. In particular, if two targets share the same origin key and one is a SingleFile and the other is a DefaultBinary, only the SingleFile target is kept.
path_depth
Returns the “depth” of a path (number of components)