Skip to main content

Finger

Enum Finger 

Source
#[repr(u8)]
pub enum Finger { Unknown = 0, LeftThumb = 1, LeftIndex = 2, LeftMiddle = 3, LeftRing = 4, LeftLittle = 5, RightThumb = 6, RightIndex = 7, RightMiddle = 8, RightRing = 9, RightLittle = 10, }
Expand description

A finger, matching libfprint’s FpFinger enum ordering (see fp-print.h).

The discriminant is meaningful: it is the value stored in the FP3 template finger byte, and it names the per-finger files under /var/lib/fprint/<user>/<driver>/. Unknown = 0; real fingers are 1..=10.

Variants§

§

Unknown = 0

FP_FINGER_UNKNOWN: no finger recorded. Not one of Finger::ALL.

§

LeftThumb = 1

FP_FINGER_LEFT_THUMB.

§

LeftIndex = 2

FP_FINGER_LEFT_INDEX.

§

LeftMiddle = 3

FP_FINGER_LEFT_MIDDLE.

§

LeftRing = 4

FP_FINGER_LEFT_RING.

§

LeftLittle = 5

FP_FINGER_LEFT_LITTLE.

§

RightThumb = 6

FP_FINGER_RIGHT_THUMB.

§

RightIndex = 7

FP_FINGER_RIGHT_INDEX.

§

RightMiddle = 8

FP_FINGER_RIGHT_MIDDLE.

§

RightRing = 9

FP_FINGER_RIGHT_RING.

§

RightLittle = 10

FP_FINGER_RIGHT_LITTLE.

Implementations§

Source§

impl Finger

Source

pub const FIRST: Finger = Finger::LeftThumb

First real finger (FP_FINGER_FIRST).

Source

pub const LAST: Finger = Finger::RightLittle

Last real finger (FP_FINGER_LAST).

Source

pub const ALL: [Finger; 10]

All ten real fingers in canonical order.

Source

pub fn from_u8(v: u8) -> Option<Finger>

Reconstruct from the raw FP3/FpFinger byte.

Source

pub fn as_u8(self) -> u8

The raw FP3/FpFinger byte value.

Trait Implementations§

Source§

impl Clone for Finger

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for Finger

Source§

impl Debug for Finger

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Eq for Finger

Source§

impl From<Finger> for u8

Source§

fn from(finger: Finger) -> u8

The raw FP3/FpFinger byte value — the From form of Finger::as_u8.

Source§

impl Hash for Finger

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for Finger

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for Finger

Source§

impl TryFrom<u8> for Finger

Source§

fn try_from(v: u8) -> Result<Finger, InvalidFinger>

Reconstruct from the raw FP3/FpFinger byte — the TryFrom form of Finger::from_u8, naming the offending byte on failure.

Source§

type Error = InvalidFinger

The type returned in the event of a conversion error.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.