pub struct YamlAnnotator { /* private fields */ }Expand description
YAML document annotator using string-based line injection
Since yaml-edit doesn’t support comment injection, we use a string-based approach that tracks indentation to map lines to paths.
Implementations§
Source§impl YamlAnnotator
impl YamlAnnotator
pub fn new(config: AnnotatorConfig) -> Self
Trait Implementations§
Source§impl Annotator for YamlAnnotator
impl Annotator for YamlAnnotator
Source§fn annotate(
&self,
content: &str,
annotations: &AnnotationMap,
) -> Result<String, AnnotatorError>
fn annotate( &self, content: &str, annotations: &AnnotationMap, ) -> Result<String, AnnotatorError>
Annotate a document with comments from the annotation map