[][src]Trait iced_native::renderer::Renderer

pub trait Renderer: Sized {
    type Output;
    type Defaults: Default;
    fn layout<'a, Message>(
        &mut self,
        element: &Element<'a, Message, Self>,
        limits: &Limits
    ) -> Node { ... } }

A component that can take the state of a user interface and produce an output for its users.

Associated Types

type Output

The type of output of the Renderer.

If you are implementing a graphical renderer, your output will most likely be a tree of visual primitives.

type Defaults: Default

The default styling attributes of the Renderer.

This type can be leveraged to implement style inheritance.

Loading content...

Provided methods

fn layout<'a, Message>(
    &mut self,
    element: &Element<'a, Message, Self>,
    limits: &Limits
) -> Node

Lays out the elements of a user interface.

You should override this if you need to perform any operations before or after layouting. For instance, trimming the measurements cache.

Loading content...

Implementors

impl Renderer for Null[src]

type Output = ()

type Defaults = ()

Loading content...