Skip to main content

Renderable

Trait Renderable 

Source
pub trait Renderable {
    // Required method
    fn render<'a>(
        &'a self,
        console: &Console,
        options: &ConsoleOptions,
    ) -> Vec<Segment<'a>>;
}
Expand description

Trait for objects that can be rendered to the console.

Required Methods§

Source

fn render<'a>( &'a self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment<'a>>

Render the object to a list of segments.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementations on Foreign Types§

Source§

impl Renderable for String

Source§

fn render<'a>( &'a self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment<'a>>

Source§

impl Renderable for str

Source§

fn render<'a>( &'a self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment<'a>>

Source§

impl<T: Renderable + ?Sized> Renderable for &T

Source§

fn render<'a>( &'a self, console: &Console, options: &ConsoleOptions, ) -> Vec<Segment<'a>>

Implementors§