Skip to main content

save

Function save 

Source
pub fn save(doc: &Document, path: &Path) -> Result<()>
Expand description

Serialize doc and write it to path, replacing any previous contents.

Document’s Display impl emits the underlying syntax tree verbatim, so untouched regions round-trip byte-for-byte (modulo the upstream pre-document-trivia limitation noted in the module docs).