Trait env_parser::Transform

source ·
pub trait Transform {
    // Required method
    fn write(
        &mut self,
        comments: Vec<String>,
        key: &str,
        inferred_type: EnvType
    );

    // Provided method
    fn remove_comments_if_blank_line_occurs(&self) -> bool { ... }
}
Expand description

Customize transformation by implementing this trait

Required Methods§

source

fn write(&mut self, comments: Vec<String>, key: &str, inferred_type: EnvType)

Writes the output

Provided Methods§

source

fn remove_comments_if_blank_line_occurs(&self) -> bool

If two comments appear but with a blank line in between them, it may mean that the above comment should be skipped, e.g.: `

This is some comment
  • blank line-
This is another comment

` If this method returns true, the first comment will not be included when calling env_type in the comments parameter

Implementors§