Skip to main content

RenderTarget

Trait RenderTarget 

Source
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§

Source

fn style(&self, text: &str, color: Option<Color>, effect: TextEffect) -> String

Provided Methods§

Source

fn paint(&self, text: &str, color: Color) -> String

Source

fn effect(&self, text: &str, effect: TextEffect) -> String

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§