pub trait IHardware {
// Required methods
fn id(&self) -> isize;
fn name(&self) -> Option<String>;
fn set_name(&mut self, name: Option<String>) -> Self;
fn hardware_type(&self) -> Option<HardwareType>;
fn set_hardware_type(&mut self, hardware_type: Option<HardwareType>) -> Self;
fn compute_units(&self) -> Option<isize>;
fn set_compute_units(&mut self, compute_units: Option<isize>) -> Self;
fn build(self) -> Self;
}
Expand description
Specifies Hardware behavior accross frameworks.
Required Methods§
sourcefn hardware_type(&self) -> Option<HardwareType>
fn hardware_type(&self) -> Option<HardwareType>
Returns the device_type of the Hardware
sourcefn set_hardware_type(&mut self, hardware_type: Option<HardwareType>) -> Self
fn set_hardware_type(&mut self, hardware_type: Option<HardwareType>) -> Self
Defines the hardware_type of the Hardware
sourcefn compute_units(&self) -> Option<isize>
fn compute_units(&self) -> Option<isize>
Returns the compute_units of the Hardware
sourcefn set_compute_units(&mut self, compute_units: Option<isize>) -> Self
fn set_compute_units(&mut self, compute_units: Option<isize>) -> Self
Defines the compute_units of the Hardware
Object Safety§
This trait is not object safe.