#[non_exhaustive]pub enum Event<'a> {
Bind,
Unbind,
Enable,
Disable,
Suspend,
Resume,
SetupHostToDevice(CtrlReceiver<'a>),
SetupDeviceToHost(CtrlSender<'a>),
Unknown(u8),
}Expand description
USB event.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Bind
Bind to gadget.
Unbind
Unbind from gadget.
Enable
Function was enabled.
Disable
Function was disabled.
Suspend
Device suspend.
Resume
Device resume.
SetupHostToDevice(CtrlReceiver<'a>)
Control request with data from host to device.
SetupDeviceToHost(CtrlSender<'a>)
Control request with data from device to host.
Unknown(u8)
Unknown event.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Event<'a>
impl<'a> RefUnwindSafe for Event<'a>
impl<'a> Send for Event<'a>
impl<'a> Sync for Event<'a>
impl<'a> Unpin for Event<'a>
impl<'a> UnsafeUnpin for Event<'a>
impl<'a> !UnwindSafe for Event<'a>
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