Trait xhci::context::DeviceHandler
source · 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§
sourcefn slot(&self) -> &dyn SlotHandler
fn slot(&self) -> &dyn SlotHandler
Returns a handler of Slot Context.
sourcefn slot_mut(&mut self) -> &mut dyn SlotHandler
fn slot_mut(&mut self) -> &mut dyn SlotHandler
Returns a mutable handler of Slot Context.
sourcefn endpoint(&self, dci: usize) -> &dyn EndpointHandler
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.
sourcefn endpoint_mut(&mut self, dci: usize) -> &mut dyn EndpointHandler
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.