Skip to main content

TextSpanVisitor

Trait TextSpanVisitor 

Source
pub trait TextSpanVisitor {
    // Provided methods
    fn visit_text(&mut self, _text: &str, _style: &TextStyle) { ... }
    fn visit_widget(&mut self, _widget: WidgetSpan, _style: &TextStyle) { ... }
}
Expand description

Visitor for rich text leaves. Both methods have defaults so callers can collect only the kind of leaf they need.

Provided Methods§

Source

fn visit_text(&mut self, _text: &str, _style: &TextStyle)

Source

fn visit_widget(&mut self, _widget: WidgetSpan, _style: &TextStyle)

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§