carnelian::render::generic

Trait Backend

Source
pub trait Backend:
    Copy
    + Debug
    + Default
    + Eq
    + Hash
    + Ord
    + Sized
    + 'static {
    type Image: Copy + Debug + Eq + Hash + Ord;
    type Context: Context<Self>;
    type Path: Clone + Eq;
    type PathBuilder: PathBuilder<Self>;
    type Raster: Raster;
    type RasterBuilder: RasterBuilder<Self>;
    type Composition: Composition<Self>;

    // Required method
    fn new_context(
        token: ClientEnd<BufferCollectionTokenMarker>,
        size: Size2D<u32>,
        display_rotation: DisplayRotation,
    ) -> Self::Context;
}
Expand description

Either Spinel or Forma. Zero-sized.

Required Associated Types§

Source

type Image: Copy + Debug + Eq + Hash + Ord

Buffer-backed image that can be used for rendering or storing pixel data.

Source

type Context: Context<Self>

Backend’s rendering context.

Source

type Path: Clone + Eq

Vector path.

Source

type PathBuilder: PathBuilder<Self>

Stateful path builder.

Source

type Raster: Raster

Compact rasterized form of any number of paths.

Source

type RasterBuilder: RasterBuilder<Self>

Stateful raster builder.

Source

type Composition: Composition<Self>

Composition of stylized rasters.

Required Methods§

Source

fn new_context( token: ClientEnd<BufferCollectionTokenMarker>, size: Size2D<u32>, display_rotation: DisplayRotation, ) -> Self::Context

Creates a new rendering context

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.

Implementors§