Skip to main content

Backend

Trait Backend 

Source
pub trait Backend:
    Sized
    + Sync
    + Send
    + 'static {
    type Frame: FrameOperations;

    // Required methods
    fn init(handle: impl GPUSurfaceHandle, width: u32, height: u32) -> Self;
    fn resize(&mut self, width: u32, height: u32);
    fn acquire(&mut self) -> Option<Self::Frame>;
    fn present(&mut self, frame: Self::Frame);
}

Required Associated Types§

Required Methods§

Source

fn init(handle: impl GPUSurfaceHandle, width: u32, height: u32) -> Self

Source

fn resize(&mut self, width: u32, height: u32)

Source

fn acquire(&mut self) -> Option<Self::Frame>

Source

fn present(&mut self, frame: Self::Frame)

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§