#[non_exhaustive]pub struct DeviceInfo {
pub id: DeviceId,
pub driver: DriverId,
pub name: String,
pub scan_type: ScanType,
pub features: DeviceFeature,
pub enroll_stages: u32,
}Expand description
Static description of a device, known once it is discovered.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.id: DeviceIdBackend-assigned identity of this reader.
driver: DriverIdDriver id, which templates are bound to.
name: StringHuman-readable model name.
scan_type: ScanTypeHow the finger is presented to this sensor.
features: DeviceFeatureEverything this device advertises it can do; query it via Device::has_feature.
enroll_stages: u32Number of finger presentations a full enrollment needs.
Implementations§
Source§impl DeviceInfo
impl DeviceInfo
Sourcepub fn new(
id: DeviceId,
driver: DriverId,
name: impl Into<String>,
scan_type: ScanType,
features: DeviceFeature,
enroll_stages: u32,
) -> Self
pub fn new( id: DeviceId, driver: DriverId, name: impl Into<String>, scan_type: ScanType, features: DeviceFeature, enroll_stages: u32, ) -> Self
Describe a device from its discovered static metadata.
The sensor’s thermal state is deliberately not here: it changes as the device runs, so it
is a live reading via Device::temperature, not a field frozen into this static shape.
Trait Implementations§
Source§impl Clone for DeviceInfo
impl Clone for DeviceInfo
Source§impl Debug for DeviceInfo
impl Debug for DeviceInfo
impl Eq for DeviceInfo
Source§impl PartialEq for DeviceInfo
impl PartialEq for DeviceInfo
impl StructuralPartialEq for DeviceInfo
Auto Trait Implementations§
impl Freeze for DeviceInfo
impl RefUnwindSafe for DeviceInfo
impl Send for DeviceInfo
impl Sync for DeviceInfo
impl Unpin for DeviceInfo
impl UnsafeUnpin for DeviceInfo
impl UnwindSafe for DeviceInfo
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