diff --git a/saphyr/src/yaml.rs b/saphyr/src/yaml.rs index 2ef4376..b869fcc 100644 --- a/saphyr/src/yaml.rs +++ b/saphyr/src/yaml.rs @@ -239,6 +239,12 @@ impl YamlLoader { parser.load(&mut loader, true)?; Ok(loader.docs) } + + /// Return a reference to the parsed Yaml documents. + #[must_use] + pub fn documents(&self) -> &[Yaml] { + &self.docs + } } /// The signature of the function to call when using [`YAMLDecodingTrap::Call`].