Skip to main content

VisualTransformation

Trait VisualTransformation 

Source
pub trait VisualTransformation:
    Debug
    + Send
    + Sync
    + 'static {
    // Required method
    fn filter(&self, text: &AnnotatedString) -> 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: &AnnotatedString) -> TransformedText

Transform the text for display. Takes the original AnnotatedString and returns the transformed TransformedText with an offset mapping.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§