pub struct Midi2Receiver<'d, A: UsbHostAllocator<'d>> { /* private fields */ }Expand description
Device-to-host half of a Midi2Host.
Implementations§
Source§impl<'d, A: UsbHostAllocator<'d>> Midi2Receiver<'d, A>
impl<'d, A: UsbHostAllocator<'d>> Midi2Receiver<'d, A>
Sourcepub fn new(pipe: UmpInputPipe<'d, A>, groups: u16) -> Self
pub fn new(pipe: UmpInputPipe<'d, A>, groups: u16) -> Self
Wrap a UMP input pipe; groups is the mask of groups the function sends to the host.
Sourcepub const fn groups(&self) -> u16
pub const fn groups(&self) -> u16
Bit mask of the groups the function sends to the host, bit n for group n.
Sourcepub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, MidiError>
pub async fn read(&mut self, buf: &mut [u8]) -> Result<usize, MidiError>
Receive one transfer of raw UMP bytes, preceded by any partial packet read_packets holds.
Auto Trait Implementations§
impl<'d, A> Forget for Midi2Receiver<'d, A>
impl<'d, A> Freeze for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: Freeze,
impl<'d, A> Move for Midi2Receiver<'d, A>
impl<'d, A> RefUnwindSafe for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: RefUnwindSafe,
impl<'d, A> Send for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: Send,
impl<'d, A> Sync for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: Sync,
impl<'d, A> Unpin for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: Unpin,
impl<'d, A> UnsafeUnpin for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: UnsafeUnpin,
impl<'d, A> UnwindSafe for Midi2Receiver<'d, A>where
UmpInputPipe<'d, A>: 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