pub trait Adapter: Sized {
type CommandQueue: CommandQueue;
type Device: Device;
type QueueFamily: QueueFamily;
// Required methods
fn enumerate_adapters() -> Vec<Self>;
fn open<'a, I>(
&self,
queue_descs: I,
) -> (Self::Device, Vec<Self::CommandQueue>)
where I: Iterator<Item = (&'a Self::QueueFamily, u32)>;
fn get_info(&self) -> &AdapterInfo;
fn get_queue_families(&self) -> &[Self::QueueFamily];
}Expand description
Represents a physical or virtual device, which is capable of running the backend.
Required Associated Types§
Sourcetype CommandQueue: CommandQueue
type CommandQueue: CommandQueue
Associated CommandQueue type.
Sourcetype QueueFamily: QueueFamily
type QueueFamily: QueueFamily
Associated QueueFamily type.
Required Methods§
Sourcefn enumerate_adapters() -> Vec<Self>
fn enumerate_adapters() -> Vec<Self>
Enumerate all available adapters supporting this backend
Sourcefn open<'a, I>(&self, queue_descs: I) -> (Self::Device, Vec<Self::CommandQueue>)
fn open<'a, I>(&self, queue_descs: I) -> (Self::Device, Vec<Self::CommandQueue>)
Create a new device and command queues.
Sourcefn get_info(&self) -> &AdapterInfo
fn get_info(&self) -> &AdapterInfo
Get the AdapterInfo for this adapater.
Sourcefn get_queue_families(&self) -> &[Self::QueueFamily]
fn get_queue_families(&self) -> &[Self::QueueFamily]
Return the supported queue families for this adapter.
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.