Skip to main content

SurfaceCtxView

Trait SurfaceCtxView 

Source
pub trait SurfaceCtxView: Send {
    type Spawner: MainThreadSpawner;

    // Required method
    fn surface_ctx(&mut self) -> SurfaceCtx<'_, Self::Spawner>;
}

Required Associated Types§

Source

type Spawner: MainThreadSpawner

Spawner used to run main-thread-only windowing operations.

Required Methods§

Source

fn surface_ctx(&mut self) -> SurfaceCtx<'_, Self::Spawner>

returns a struct of references. Returning all references in a struct allows us to use multiple mutable references at the same time.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§