pub trait AsyncInit: Backend {
// Required method
fn init_async(
handle: impl GPUSurfaceHandle,
width: u32,
height: u32,
sender: InitSender<Self>,
);
}👎Deprecated:
Backend::init now handles both native and web; implement that directly instead
Expand description
Extension of Backend for backends that initialise asynchronously.
§Deprecated
The Backend trait now unifies native and web initialisation via its
init method and the InitSender channel. Prefer
implementing Backend::init directly; this trait is kept for compatibility
and may be removed in a future release.
Required Methods§
Sourcefn init_async(
handle: impl GPUSurfaceHandle,
width: u32,
height: u32,
sender: InitSender<Self>,
)
👎Deprecated: Backend::init now handles both native and web; implement that directly instead
fn init_async( handle: impl GPUSurfaceHandle, width: u32, height: u32, sender: InitSender<Self>, )
Backend::init now handles both native and web; implement that directly instead
Begin async initialisation. Deliver the finished backend through sender.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".