Trait DeviceState

pub trait DeviceState: Send + 'static {
    // Required method
    fn init(device_id: DeviceId) -> Self;
}
Expand description

A state that can be saved inside the DeviceContext.

Required Methods§

fn init(device_id: DeviceId) -> Self

Initialize a new state on the given device.

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.

Implementations on Foreign Types§

§

impl DeviceState for HipServer

§

fn init(device_id: DeviceId) -> HipServer

§

impl DeviceState for WgpuServer

§

fn init(device_id: DeviceId) -> WgpuServer

Implementors§