pub struct DeviceProperties {
pub features: Features,
pub memory: MemoryDeviceProperties,
pub hardware: HardwareProperties,
pub timing_method: TimingMethod,
}Expand description
Properties of what the device can do, like what Feature are
supported by it and what its memory properties are.
Fields§
§features: FeaturesThe features supported by the runtime.
memory: MemoryDevicePropertiesThe memory properties of this client.
hardware: HardwarePropertiesThe topology properties of this client.
timing_method: TimingMethodThe method used for profiling on the device.
Implementations§
Source§impl DeviceProperties
impl DeviceProperties
Sourcepub fn new(
features: Features,
memory_props: MemoryDeviceProperties,
hardware: HardwareProperties,
timing_method: TimingMethod,
) -> Self
pub fn new( features: Features, memory_props: MemoryDeviceProperties, hardware: HardwareProperties, timing_method: TimingMethod, ) -> Self
Create a new feature set with the given features and memory properties.
Sourcepub fn type_usage(&self, ty: StorageType) -> EnumSet<TypeUsage>
pub fn type_usage(&self, ty: StorageType) -> EnumSet<TypeUsage>
Get the usages for a type
Sourcepub fn supports_type(&self, ty: impl Into<Type>) -> bool
pub fn supports_type(&self, ty: impl Into<Type>) -> bool
Whether the type is supported in any way
Sourcepub fn register_type_usage(
&mut self,
ty: impl Into<StorageType>,
uses: impl Into<EnumSet<TypeUsage>>,
)
pub fn register_type_usage( &mut self, ty: impl Into<StorageType>, uses: impl Into<EnumSet<TypeUsage>>, )
Register a storage type to the features
Sourcepub fn register_semantic_type(&mut self, ty: SemanticType)
pub fn register_semantic_type(&mut self, ty: SemanticType)
Register a semantic type to the features
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DeviceProperties
impl RefUnwindSafe for DeviceProperties
impl Send for DeviceProperties
impl Sync for DeviceProperties
impl Unpin for DeviceProperties
impl UnwindSafe for DeviceProperties
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more