Function convo::exporter::export [−][src]
pub fn export<P>(tree: &Tree, path: P) -> Result<(), ExportError> where
P: AsRef<Path>,
Expand description
Try to save a Tree
as a file.
Arguments
tree
- ATree
that will be saved in a file.
Errors
- An
ExportError
will be returned if the tree is not considered legal or incurs issues saving. See also: validation rules.
Examples
use convo::{importer, exporter}; let tree = importer::import("examples/dialogue_files/ex_min.convo.yml").unwrap(); // Make a copy of the file exporter::export(&tree, "examples/dialogue_files/export.convo.yml").unwrap();