output: update README

This commit is contained in:
🪞👃🪞 2025-08-23 12:42:51 +03:00
parent d92e5efdd0
commit 3e2b07158c
5 changed files with 28 additions and 79 deletions

View file

@ -47,7 +47,7 @@ impl<E: Output, C: Content<E>> Render<E> for C {
/// Opaque pointer to a renderable living on the heap.
///
/// Return this from [Content::content] to use dynamic dispatch.
pub type RenderBox<E> = Box<RenderDyn<E>>;
pub type RenderBox<E> = Box<dyn Render<E>>;
/// You can render from a box.
impl<E: Output> Content<E> for RenderBox<E> {
@ -55,11 +55,8 @@ impl<E: Output> Content<E> for RenderBox<E> {
//fn boxed <'b> (self) -> RenderBox<'b, E> where Self: Sized + 'b { self }
}
/// Opaque pointer to a renderable.
pub type RenderDyn<E> = dyn Render<E>;
/// You can render from an opaque pointer.
impl<E: Output> Content<E> for &RenderDyn<E> where Self: Sized {
impl<E: Output> Content<E> for &dyn Render<E> where Self: Sized {
fn content (&self) -> impl Render<E> + '_ {
#[allow(suspicious_double_ref_op)]
self.deref()