pub struct HidKeyboard {
port: usize,
slot_id: u8,
interface: u8,
endpoint: u8,
max_packet: u16,
interval: u8,
event_queue: Vec<KeyEvent>,
last_report: [u8; 8],
report_buf: *mut u8,
}Fields§
§port: usize§slot_id: u8§interface: u8§endpoint: u8§max_packet: u16§interval: u8§event_queue: Vec<KeyEvent>§last_report: [u8; 8]§report_buf: *mut u8Implementations§
Source§impl HidKeyboard
impl HidKeyboard
pub fn new( port: usize, slot_id: u8, interface: u8, endpoint: u8, max_packet: u16, interval: u8, ) -> Self
pub fn read_event(&mut self) -> Option<KeyEvent>
pub fn process_report(&mut self, report: &[u8])
pub fn is_modifier_pressed(&self, modifier: u8) -> bool
pub fn drain_into_unified(&mut self)
Trait Implementations§
impl Send for HidKeyboard
impl Sync for HidKeyboard
Auto Trait Implementations§
impl Freeze for HidKeyboard
impl RefUnwindSafe for HidKeyboard
impl Unpin for HidKeyboard
impl UnsafeUnpin for HidKeyboard
impl UnwindSafe for HidKeyboard
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more