pub trait VisualTransformation:
Debug
+ Send
+ Sync
+ 'static {
// Required method
fn filter(&self, text: &AnnotatedString) -> TransformedText;
}Expand description
Transforms display text without changing the underlying value (e.g. password masking).
Required Methods§
Sourcefn filter(&self, text: &AnnotatedString) -> TransformedText
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".