smithay::backend::renderer

Trait Bind

Source
pub trait Bind<Target>: Unbind {
    // Required method
    fn bind(&mut self, target: Target) -> Result<(), <Self as Renderer>::Error>;

    // Provided method
    fn supported_formats(&self) -> Option<HashSet<Format>> { ... }
}
Expand description

Abstraction for Renderers, that can render into different targets

Required Methods§

Source

fn bind(&mut self, target: Target) -> Result<(), <Self as Renderer>::Error>

Bind a given rendering target, which will contain the rendering results until unbind is called.

Binding to target, while another one is already bound, is rendering defined. Some renderers might happily replace the current target, while other might drop the call or throw an error.

Provided Methods§

Source

fn supported_formats(&self) -> Option<HashSet<Format>>

Supported pixel formats for given targets, if applicable.

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§