pub trait RenderableExt:
Renderable
+ Sized
+ 'static {
// Required method
fn into_boxed_renderable(self) -> RenderableBox;
}Expand description
Extension trait for types that implement Renderable.
This trait provides convenience methods for working with renderable values.
Since it requires Renderable as a bound, it will only be implemented
for types that are actually renderable.
§Examples
use gilt::protocol::RenderableExt;
use gilt::prelude::*;
// Wrap a Text value
let text = Text::from("Hello");
let boxed = text.into_boxed_renderable();Required Methods§
Sourcefn into_boxed_renderable(self) -> RenderableBox
fn into_boxed_renderable(self) -> RenderableBox
Convert this renderable into a RenderableBox for type-erased storage.
§Returns
A RenderableBox wrapping this value.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".