Trait midir::os::unix::VirtualInput
source · pub trait VirtualInput<T: Send>where
Self: Sized,{
// Required method
fn create_virtual<F>(
self,
port_name: &str,
callback: F,
data: T
) -> Result<MidiInputConnection<T>, ConnectError<Self>>
where F: FnMut(u64, &[u8], &mut T) + Send + 'static;
}
Expand description
Trait that is implemented by MidiInput
on platforms that
support virtual ports (currently every platform but Windows).
Required Methods§
sourcefn create_virtual<F>(
self,
port_name: &str,
callback: F,
data: T
) -> Result<MidiInputConnection<T>, ConnectError<Self>>
fn create_virtual<F>( self, port_name: &str, callback: F, data: T ) -> Result<MidiInputConnection<T>, ConnectError<Self>>
Creates a virtual input port. Once it has been created, other applications can connect to this port and send MIDI messages which will be received by this port.
Object Safety§
This trait is not object safe.