Function nccl::parse_file_with
[−]
[src]
pub fn parse_file_with(
filename: &str,
pair: Pair
) -> Result<Pair, Vec<Box<Error>>>
Parses a file, merging the results with the supplied pair. Allows for a kind of inheritance of configuration.
Examples:
let schemas = nccl::parse_file("examples/inherit.nccl").unwrap(); let user = nccl::parse_file_with("examples/inherit2.nccl", schemas).unwrap(); assert_eq!(user["sandwich"]["meat"].keys_as::<String>().unwrap().len(), 3); assert_eq!(user["hello"]["world"].keys_as::<String>().unwrap().len(), 3);