[−][src]Struct bootkbd::BootKeyboard
Boot protocol keyboard driver for USB hosts.
Methods
impl<F> BootKeyboard<F> where
F: FnMut(u8, &[u8]),
[src]
F: FnMut(u8, &[u8]),
pub fn new(callback: F) -> Self
[src]
Create a new driver instance which will call
callback(address: u8, buffer: &[u8])
when a new keyboard
report is received.
address
is the address of the USB device which received the
report and buffer
is the contents of the report itself.
Trait Implementations
impl<F> Debug for BootKeyboard<F>
[src]
impl<F> Driver for BootKeyboard<F> where
F: FnMut(u8, &[u8]),
[src]
F: FnMut(u8, &[u8]),
fn want_device(&self, _device: &DeviceDescriptor) -> bool
[src]
fn add_device(
&mut self,
device: DeviceDescriptor,
address: u8
) -> Result<(), DriverError>
[src]
&mut self,
device: DeviceDescriptor,
address: u8
) -> Result<(), DriverError>
fn remove_device(&mut self, address: u8)
[src]
fn tick(
&mut self,
millis: usize,
host: &mut dyn USBHost
) -> Result<(), DriverError>
[src]
&mut self,
millis: usize,
host: &mut dyn USBHost
) -> Result<(), DriverError>
Auto Trait Implementations
impl<F> Unpin for BootKeyboard<F> where
F: Unpin,
F: Unpin,
impl<F> Sync for BootKeyboard<F> where
F: Sync,
F: Sync,
impl<F> Send for BootKeyboard<F> where
F: Send,
F: Send,
Blanket Implementations
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,