Skip to main content

Transformer

Trait Transformer 

Source
pub trait Transformer: Fn(&[u8], Option<&str>) -> Result<Vec<u8>, String> { }
Expand description

A generic trait for transforming staged files.

Example implementors might be a builtin trailing whitespace transformer, or shell transformer.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<T> Transformer for T
where T: Fn(&[u8], Option<&str>) -> Result<Vec<u8>, String>,