Skip to main content

Humanizer

Trait Humanizer 

Source
pub trait Humanizer: Send + Sync {
    // Required methods
    fn humanize(
        &self,
        code: &CodeBlock,
        profile: &StyleProfile,
    ) -> Result<String>;
    fn learn_style(&self, repo_path: &PathBuf) -> Result<StyleProfile>;
}
Expand description

Trait for code humanizers

Required Methods§

Source

fn humanize(&self, code: &CodeBlock, profile: &StyleProfile) -> Result<String>

Humanize a code block based on a style profile

Source

fn learn_style(&self, repo_path: &PathBuf) -> Result<StyleProfile>

Learn style from a repository

Implementors§