pub struct DeviceClassSpec {
pub config: Option<Vec<DeviceClassConfiguration>>,
pub selectors: Option<Vec<DeviceSelector>>,
}
Expand description
DeviceClassSpec is used in a [DeviceClass] to define what can be allocated and how to configure it.
Fields§
§config: Option<Vec<DeviceClassConfiguration>>
Config defines configuration parameters that apply to each device that is claimed via this class. Some classses may potentially be satisfied by multiple drivers, so each instance of a vendor configuration applies to exactly one driver.
They are passed to the driver, but are not considered while allocating the claim.
selectors: Option<Vec<DeviceSelector>>
Each selector must be satisfied by a device which is claimed via this class.
Trait Implementations§
Source§impl Clone for DeviceClassSpec
impl Clone for DeviceClassSpec
Source§fn clone(&self) -> DeviceClassSpec
fn clone(&self) -> DeviceClassSpec
Returns a copy 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 DeviceClassSpec
impl Debug for DeviceClassSpec
Source§impl DeepMerge for DeviceClassSpec
impl DeepMerge for DeviceClassSpec
Source§fn merge_from(&mut self, other: Self)
fn merge_from(&mut self, other: Self)
Merge
other
into self
.Source§impl Default for DeviceClassSpec
impl Default for DeviceClassSpec
Source§fn default() -> DeviceClassSpec
fn default() -> DeviceClassSpec
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for DeviceClassSpec
impl<'de> Deserialize<'de> for DeviceClassSpec
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for DeviceClassSpec
impl PartialEq for DeviceClassSpec
Source§impl Serialize for DeviceClassSpec
impl Serialize for DeviceClassSpec
impl StructuralPartialEq for DeviceClassSpec
Auto Trait Implementations§
impl Freeze for DeviceClassSpec
impl RefUnwindSafe for DeviceClassSpec
impl Send for DeviceClassSpec
impl Sync for DeviceClassSpec
impl Unpin for DeviceClassSpec
impl UnwindSafe for DeviceClassSpec
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