Skip to main content

RenderBox

Trait RenderBox 

Source
pub trait RenderBox { }
Expand description

Something that can be rendered once out of a box.

This should only ever be used in the form Box<RenderBox> by casting Box<RenderOnce> to Box<RenderBox>. This trait has methods but I’ve hidden them because you should never call them directly. Instead, you should call the RenderOnce methods implemented on Box<RenderBox>.

FEATURE: requires “alloc”

Trait Implementations§

Source§

impl<'b> RenderOnce for Box<dyn RenderBox + 'b>

Available on crate feature alloc only.
Source§

fn render_once(self, tmpl: &mut TemplateBuffer<'_>)

Render this into a template buffer.
Source§

fn size_hint(&self) -> usize

Returns a (very) rough estimate of how many bytes this Render will use.
Source§

impl<'b> RenderOnce for Box<dyn RenderBox + Send + 'b>

Available on crate feature alloc only.
Source§

fn render_once(self, tmpl: &mut TemplateBuffer<'_>)

Render this into a template buffer.
Source§

fn size_hint(&self) -> usize

Returns a (very) rough estimate of how many bytes this Render will use.

Implementors§

Source§

impl<T> RenderBox for T
where T: RenderOnce,

Available on crate feature alloc only.