pub struct HidKeyboard { /* private fields */ }Implementations§
Source§impl HidKeyboard
impl HidKeyboard
Sourcepub fn new(
controller: Arc<XhciController>,
port: usize,
interface: u8,
endpoint: u8,
max_packet: u16,
interval: u8,
) -> Self
pub fn new( controller: Arc<XhciController>, port: usize, interface: u8, endpoint: u8, max_packet: u16, interval: u8, ) -> Self
Creates a new instance.
Sourcepub fn read_event(&mut self) -> Option<KeyEvent>
pub fn read_event(&mut self) -> Option<KeyEvent>
Reads event.
Sourcepub fn process_report(&mut self, report: &[u8; 8])
pub fn process_report(&mut self, report: &[u8; 8])
Performs the process report operation.
Sourcepub fn is_modifier_pressed(&self, modifier: u8) -> bool
pub fn is_modifier_pressed(&self, modifier: u8) -> bool
Returns whether modifier pressed.
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
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