Trait coaster::device::IDevice
[−]
[src]
pub trait IDevice where
Self: Any + Clone + Eq + Any + MemorySync, { type H: IHardware; type M: IMemory + Any; fn id(&self) -> &isize; fn hardwares(&self) -> &Vec<Self::H>; fn alloc_memory(&self, size: usize) -> Result<Self::M, Error>; }
Specifies Hardware behavior across frameworks.
Associated Types
type H: IHardware
The Hardware representation for this Device.
type M: IMemory + Any
The Memory representation for this Device.
Required Methods
fn id(&self) -> &isize
Returns the unique identifier of the Device.
fn hardwares(&self) -> &Vec<Self::H>
Returns the hardwares, which define the Device.
fn alloc_memory(&self, size: usize) -> Result<Self::M, Error>
Allocate memory on the Device.