pub trait RenderTarget {
// Required method
fn style(
&self,
text: &str,
color: Option<Color>,
effect: TextEffect,
) -> String;
// Provided methods
fn paint(&self, text: &str, color: Color) -> String { ... }
fn effect(&self, text: &str, effect: TextEffect) -> String { ... }
fn hyperlink(&self, text: &str, url: Option<&str>) -> String { ... }
}Required Methods§
Provided Methods§
fn paint(&self, text: &str, color: Color) -> String
fn effect(&self, text: &str, effect: TextEffect) -> String
fn hyperlink(&self, text: &str, url: Option<&str>) -> String
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".