pub trait TextTransform: Send + Sync {
// Required method
fn transform(&self, text: Text) -> Result<Text, PluginError>;
}Expand description
Rewrites a Text: keeps some lines, styles matches, masks secrets.
Registered under a name with PluginRegistrar::transform; a host chains
named transforms into a pipeline.
The text comes from the input being rendered, so treat it as untrusted. Change styles freely; text a transform adds must not carry terminal control sequences.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".