Skip to main content

load

Function load 

Source
pub fn load(input: &str) -> Result<Vec<Document<Span>>, LoadError>
Expand description

Load YAML text using lossless mode and default security limits.

Returns one Document<Span> per YAML document in the stream.

ยงErrors

Returns Err if the input contains a parse error or exceeds a security limit (nesting depth or anchor count).

use rlsp_yaml_parser::loader::load;

let docs = load("hello\n").unwrap();
assert_eq!(docs.len(), 1);