Skip to main content

VisualTransformation

Trait VisualTransformation 

Source
pub trait VisualTransformation:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn filter(&self, text: &str) -> TransformedText;
}
Expand description

Transforms the visual representation of a text field’s text without changing the underlying value. For example, password masking.

Required Methods§

Source

fn filter(&self, text: &str) -> TransformedText

Transform the text for display. Returns the transformed text and an offset-translation function that maps offsets in the display text back to the original text.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§