Trait MidiIO
pub trait MidiIO {
type Port: Clone;
// Required methods
fn ports(&self) -> Vec<Self::Port> ⓘ;
fn port_count(&self) -> usize ⓘ;
fn port_name(&self, port: &Self::Port) -> Result<String, PortInfoError> ⓘ;
}
Available on crate feature
dep_midir
only.Expand description
Trait that abstracts over input and output ports.
Required Associated Types§
Required Methods§
fn ports(&self) -> Vec<Self::Port> ⓘ
fn ports(&self) -> Vec<Self::Port> ⓘ
Get a collection of all MIDI input or output ports. The resulting vector contains one object per port, which you can use to query metadata about the port or connect to it.
fn port_count(&self) -> usize ⓘ
fn port_count(&self) -> usize ⓘ
Get the number of available MIDI input or output ports.