devela::_dep::midir::os::unix

Trait VirtualInput

pub trait VirtualInput<T>: Sized
where 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>>
where F: FnMut(u64, &[u8], &mut T) + Send + 'static,

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.

Implementors§

§

impl<T> VirtualInput<T> for MidiInput
where T: Send,