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 supports_address(&self, ty: impl Into<AddressType>) -> bool
pub fn supports_address(&self, ty: impl Into<AddressType>) -> bool
Whether the address type is supported in any way
Sourcepub fn register_address_type(&mut self, ty: impl Into<AddressType>)
pub fn register_address_type(&mut self, ty: impl Into<AddressType>)
Register an address type to the features
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§
Source§impl Clone for DeviceProperties
impl Clone for DeviceProperties
Source§fn clone(&self) -> DeviceProperties
fn clone(&self) -> DeviceProperties
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeviceProperties
impl Debug for DeviceProperties
Source§impl PartialEq for DeviceProperties
impl PartialEq for DeviceProperties
Source§impl TypeHash for DeviceProperties
impl TypeHash for DeviceProperties
impl Eq for DeviceProperties
impl StructuralPartialEq for DeviceProperties
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.