pub struct Endpoint<'a, B: UsbBus, D: EndpointDir> { /* private fields */ }Expand description
A handle to a specific USB endpoint.
The lifetime 'a is tied to the crate::device::bus::UsbBusAllocator that produced
this handle, ensuring the underlying bus cannot be dropped or moved while the
handle is alive.
Use the type aliases EndpointIn and EndpointOut for convenience.
Implementations§
Source§impl<'a, B: UsbBus, D: EndpointDir> Endpoint<'a, B, D>
impl<'a, B: UsbBus, D: EndpointDir> Endpoint<'a, B, D>
Sourcepub fn address(&self) -> EndpointAddress
pub fn address(&self) -> EndpointAddress
Endpoint address (number + direction).
Sourcepub fn ep_type(&self) -> EndpointType
pub fn ep_type(&self) -> EndpointType
Transfer type of this endpoint.
Sourcepub fn max_packet_size(&self) -> u16
pub fn max_packet_size(&self) -> u16
Maximum packet size in bytes.
Trait Implementations§
impl<B: UsbBus + Send, D: EndpointDir> Send for Endpoint<'_, B, D>
impl<B: UsbBus + Sync, D: EndpointDir> Sync for Endpoint<'_, B, D>
Auto Trait Implementations§
impl<'a, B, D> Forget for Endpoint<'a, B, D>
impl<'a, B, D> Freeze for Endpoint<'a, B, D>
impl<'a, B, D> Move for Endpoint<'a, B, D>
impl<'a, B, D> RefUnwindSafe for Endpoint<'a, B, D>
impl<'a, B, D> Unpin for Endpoint<'a, B, D>
impl<'a, B, D> UnsafeUnpin for Endpoint<'a, B, D>
impl<'a, B, D> UnwindSafe for Endpoint<'a, B, D>
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