Trait wasefire_board_api::usb::serial::HasSerial
source · pub trait HasSerial: Send {
type UsbBus: UsbBus;
// Required method
fn with_serial<R>(f: impl FnOnce(&mut Serial<'_, Self::UsbBus>) -> R) -> R;
}
Available on crate features
internal-api-usb
and api-usb-serial
only.Expand description
Helper trait for boards using the usbd_serial
crate.
Required Associated Types§
Required Methods§
sourcefn with_serial<R>(f: impl FnOnce(&mut Serial<'_, Self::UsbBus>) -> R) -> R
fn with_serial<R>(f: impl FnOnce(&mut Serial<'_, Self::UsbBus>) -> R) -> R
Provides scoped access to the serial type.
Object Safety§
This trait is not object safe.