leaprs 0.2.2

Safe wrapper for the LeapC Ultraleap (Leap Motion) hand tracking device API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use derive_deref::Deref;
use leap_sys::LEAP_DROPPED_FRAME_EVENT;

use crate::DroppedFrameType;

/// # Fields
/// Available via dereference: [LEAP_DROPPED_FRAME_EVENT].
#[derive(Deref, Clone, Copy)]
pub struct DroppedFrameEventRef<'a>(pub(crate) &'a LEAP_DROPPED_FRAME_EVENT);

impl<'a> DroppedFrameEventRef<'a> {
    pub fn dropped_frame_type(&self) -> DroppedFrameType {
        self.type_.into()
    }

    // TODO: device
}