Expand description
Multi-document loading and iteration. Multi-document YAML loading.
This module provides functionality for parsing YAML documents that contain
multiple documents separated by ---.
§Examples
use noyalib::document::load_all;
let yaml = "---
name: doc1
---
name: doc2
";
let docs: Vec<_> = load_all(yaml).unwrap().collect();
assert_eq!(docs.len(), 2);Structs§
- Document
Iterator - An iterator over YAML documents in a string.
- Document
Read Iterator std - Lazy iterator that yields
Result<T>per YAML document parsed from a reader.
Functions§
- load_
all - Load all YAML documents from a string.
- load_
all_ as - Load all YAML documents and deserialize them into a typed vector.
- load_
all_ with_ config - Load all YAML documents from a string with custom security limits.
- read
std - Stream-decode every YAML document from a reader into typed
values, yielding one
Result<T>per document. - read_
with_ config std readwith a customParserConfigfor tightened security limits.- try_
load_ all - Load all YAML documents from a string, returning an error if parsing fails.