Skip to main content

IOutputBackend

Trait IOutputBackend 

Source
pub trait IOutputBackend: IPlatformRenderSurface {
    // Required methods
    fn pixel_size(&self) -> PixelSize;
    fn scaling(&self) -> f64;
    fn set_scaling(&self, value: f64);
    fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ;

    // Provided methods
    fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend> { ... }
    fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation> { ... }
}

Required Methods§

Source

fn pixel_size(&self) -> PixelSize

Source

fn scaling(&self) -> f64

Source

fn set_scaling(&self, value: f64)

Source

fn as_render_surface(self: Arc<Self>) -> Arc<dyn IPlatformRenderSurface> ⓘ

The output as the render surface of the top-level.

Provided Methods§

Source

fn as_gl_output_backend(&self) -> Option<&dyn IGlOutputBackend>

The output as one that renders with OpenGL (the reference tests the type).

Source

fn as_surface_orientation(&self) -> Option<&dyn ISurfaceOrientation>

The output as one that has an orientation (the reference tests the type).

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§