iced_renderer::geometry

Trait Renderer

pub trait Renderer: Renderer {
    type Geometry: Cached;
    type Frame: Backend<Geometry = Self::Geometry>;

    // Required methods
    fn new_frame(&self, size: Size) -> Self::Frame;
    fn draw_geometry(&mut self, geometry: Self::Geometry);
}
Available on crate feature geometry only.
Expand description

A renderer capable of drawing some Self::Geometry.

Required Associated Types§

type Geometry: Cached

The kind of geometry this renderer can draw.

type Frame: Backend<Geometry = Self::Geometry>

The kind of Frame this renderer supports.

Required Methods§

fn new_frame(&self, size: Size) -> Self::Frame

Creates a new Self::Frame.

fn draw_geometry(&mut self, geometry: Self::Geometry)

Draws the given Self::Geometry.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementations on Foreign Types§

§

impl Renderer for ()

Available on debug-assertions enabled only.
§

type Geometry = ()

§

type Frame = ()

§

fn new_frame(&self, _size: Size) -> <() as Renderer>::Frame

§

fn draw_geometry(&mut self, _geometry: <() as Renderer>::Geometry)

Source§

impl Renderer for Renderer

Source§

type Geometry = Geometry

Source§

type Frame = Frame

Source§

fn new_frame(&self, size: Size) -> <Renderer as Renderer>::Frame

Source§

fn draw_geometry(&mut self, geometry: <Renderer as Renderer>::Geometry)

§

impl Renderer for Renderer

§

type Geometry = Geometry

§

type Frame = Frame

§

fn new_frame(&self, size: Size) -> <Renderer as Renderer>::Frame

§

fn draw_geometry(&mut self, geometry: <Renderer as Renderer>::Geometry)

Implementors§

Source§

impl<A, B> Renderer for iced_renderer::fallback::Renderer<A, B>
where A: Renderer, B: Renderer,

Source§

type Geometry = Geometry<<A as Renderer>::Geometry, <B as Renderer>::Geometry>

Source§

type Frame = Frame<<A as Renderer>::Frame, <B as Renderer>::Frame>