[−][src]Struct midir::MidiOutput
An instance of MidiOutput
is required for anything related to MIDI output.
Create one with MidiOutput::new
.
Implementations
impl MidiOutput
[src]
pub fn new(client_name: &str) -> Result<Self, InitError>
[src]
Creates a new MidiOutput
object that is required for any MIDI output functionality.
pub fn ports(&self) -> MidiOutputPorts
[src]
Get a collection of all MIDI output ports that midir can connect to. The resulting vector contains one object per port, which you can use to query metadata about the port or connect to it in order to send MIDI messages.
pub fn port_count(&self) -> usize
[src]
Get the number of available MIDI output ports that midir can connect to.
pub fn port_name(&self, port: &MidiOutputPort) -> Result<String, PortInfoError>
[src]
Get the name of a specified MIDI output port.
An error will be returned when the port is no longer valid (e.g. the respective device has been disconnected).
pub fn connect(
self,
port: &MidiOutputPort,
port_name: &str
) -> Result<MidiOutputConnection, ConnectError<MidiOutput>>
[src]
self,
port: &MidiOutputPort,
port_name: &str
) -> Result<MidiOutputConnection, ConnectError<MidiOutput>>
Connect to a specified MIDI output port in order to send messages.
The connection will be kept open as long as the returned
MidiOutputConnection
is kept alive.
The port_name
is an additional name that will be assigned to the
connection. It is only used by some backends.
An error will be returned when the port is no longer valid (e.g. the respective device has been disconnected).
Trait Implementations
impl VirtualOutput for MidiOutput
[src]
fn create_virtual(
self,
port_name: &str
) -> Result<MidiOutputConnection, ConnectError<MidiOutput>>
[src]
self,
port_name: &str
) -> Result<MidiOutputConnection, ConnectError<MidiOutput>>
Auto Trait Implementations
impl !RefUnwindSafe for MidiOutput
impl Send for MidiOutput
impl !Sync for MidiOutput
impl Unpin for MidiOutput
impl !UnwindSafe for MidiOutput
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,