Trait VirtualInput
pub trait VirtualInput<T>: Sizedwhere
T: Send,{
// 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;
}
Available on crate feature
dep_midir
only.Expand description
Trait that is implemented by MidiInput
on platforms that
support virtual ports (currently every platform but Windows).
Required Methods§
fn 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.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.