Trait coaster::device::IDevice

source ·
pub trait IDevice
where Self: Any + Clone + Eq + MemorySync,
{ type H: IHardware; type M: IMemory + Any; // Required methods fn id(&self) -> &isize; fn hardwares(&self) -> &Vec<Self::H>; fn alloc_memory(&self, size: usize) -> Result<Self::M, Error>; }
Expand description

Specifies Hardware behavior across frameworks.

Required Associated Types§

source

type H: IHardware

The Hardware representation for this Device.

source

type M: IMemory + Any

The Memory representation for this Device.

Required Methods§

source

fn id(&self) -> &isize

Returns the unique identifier of the Device.

source

fn hardwares(&self) -> &Vec<Self::H>

Returns the hardwares, which define the Device.

source

fn alloc_memory(&self, size: usize) -> Result<Self::M, Error>

Allocate memory on the Device.

Object Safety§

This trait is not object safe.

Implementors§