pub trait DeviceHandler {
    // Required methods
    fn slot(&self) -> &dyn SlotHandler;
    fn slot_mut(&mut self) -> &mut dyn SlotHandler;
    fn endpoint(&self, dci: usize) -> &dyn EndpointHandler;
    fn endpoint_mut(&mut self, dci: usize) -> &mut dyn EndpointHandler;
}
Expand description

A trait to handle Device Context.

Required Methods§

source

fn slot(&self) -> &dyn SlotHandler

Returns a handler of Slot Context.

source

fn slot_mut(&mut self) -> &mut dyn SlotHandler

Returns a mutable handler of Slot Context.

source

fn endpoint(&self, dci: usize) -> &dyn EndpointHandler

Returns a handler of Endpoint Context.

Panics

This method panics if dci > 31 || dci == 0. Call DeviceHandler::slot if you want a handler of Slot Context.

source

fn endpoint_mut(&mut self, dci: usize) -> &mut dyn EndpointHandler

Returns a mutable handler of Endpoint Context.

Panics

This method panics if dci > 31 || dci == 0. Call DeviceHandler::slot_mut if you want a mutable handler of Slot Context.

Implementors§

source§

impl<const N: usize> DeviceHandler for Device<N>