pub struct MidiReceiver<'d, A: UsbHostAllocator<'d>> { /* private fields */ }Expand description
USB-MIDI device-to-host packet receiver.
Implementations§
Source§impl<'d, A: UsbHostAllocator<'d>> MidiReceiver<'d, A>
impl<'d, A: UsbHostAllocator<'d>> MidiReceiver<'d, A>
Sourcepub fn open(
alloc: &A,
interface_number: u8,
endpoint: &MidiEndpointDescriptor,
enum_info: &EnumerationInfo,
) -> Result<Self, MidiError>
pub fn open( alloc: &A, interface_number: u8, endpoint: &MidiEndpointDescriptor, enum_info: &EnumerationInfo, ) -> Result<Self, MidiError>
Allocate the pipe of endpoint, whose cable associations give the ports.
Sourcepub fn new(
pipe: MidiInputPipe<'d, A>,
interface_number: u8,
endpoint: &MidiEndpointDescriptor,
device_address: u8,
) -> Result<Self, MidiError>
pub fn new( pipe: MidiInputPipe<'d, A>, interface_number: u8, endpoint: &MidiEndpointDescriptor, device_address: u8, ) -> Result<Self, MidiError>
Wrap an input pipe; the ports come from endpoint’s cable associations.
Sourcepub fn ports(&self) -> &[MidiInputPort]
pub fn ports(&self) -> &[MidiInputPort]
Logical ports that can send MIDI to the host.
Sourcepub fn groups(&self) -> u16
pub fn groups(&self) -> u16
Mask of the cables the function sends to the host; cable n is group n.
Auto Trait Implementations§
impl<'d, A> Forget for MidiReceiver<'d, A>
impl<'d, A> Freeze for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: Freeze,
impl<'d, A> Move for MidiReceiver<'d, A>
impl<'d, A> RefUnwindSafe for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: RefUnwindSafe,
impl<'d, A> Send for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: Send,
impl<'d, A> Sync for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: Sync,
impl<'d, A> Unpin for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: Unpin,
impl<'d, A> UnsafeUnpin for MidiReceiver<'d, A>where
MidiInputPipe<'d, A>: UnsafeUnpin,
impl<'d, A> UnwindSafe for MidiReceiver<'d, A>where
MidiInputPipe<'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