pub struct Pipe<'d, C: HostController> { /* private fields */ }Expand description
An endpoint of an enumerated device.
Implementations§
Source§impl<'d, C: HostController> Pipe<'d, C>
impl<'d, C: HostController> Pipe<'d, C>
Sourcepub fn address(&self) -> EndpointAddress
pub fn address(&self) -> EndpointAddress
Endpoint number and direction.
Sourcepub fn max_packet(&self) -> u16
pub fn max_packet(&self) -> u16
Maximum packet size.
Sourcepub fn transfer_type(&self) -> EndpointType
pub fn transfer_type(&self) -> EndpointType
Bulk or interrupt.
Sourcepub fn read(&self, buffer: &mut [u8]) -> HostResult<usize>
pub fn read(&self, buffer: &mut [u8]) -> HostResult<usize>
Receive one transfer, stopping at a short packet or when buffer is
full.
Sourcepub fn write(&self, data: &[u8]) -> HostResult<usize>
pub fn write(&self, data: &[u8]) -> HostResult<usize>
Send one transfer.
An empty data sends a single zero-length packet, which is how a bulk
transfer is terminated early.
Trait Implementations§
Source§impl<C: HostController> Drop for Pipe<'_, C>
impl<C: HostController> Drop for Pipe<'_, C>
Auto Trait Implementations§
impl<'d, C> !Freeze for Pipe<'d, C>
impl<'d, C> !RefUnwindSafe for Pipe<'d, C>
impl<'d, C> !Sync for Pipe<'d, C>
impl<'d, C> Forget for Pipe<'d, C>
impl<'d, C> Move for Pipe<'d, C>
impl<'d, C> Send for Pipe<'d, C>
impl<'d, C> Unpin for Pipe<'d, C>
impl<'d, C> UnsafeUnpin for Pipe<'d, C>where
&'d C: UnsafeUnpin,
impl<'d, C> UnwindSafe for Pipe<'d, C>where
&'d C: UnwindSafe,
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