[][src]Trait launchy::InputDevice

pub trait InputDevice {
    type Message;

    const MIDI_CONNECTION_NAME: &'static str;
    const MIDI_DEVICE_KEYWORD: &'static str;

    fn decode_message(timestamp: u64, data: &[u8]) -> Self::Message;

#[must_use = "If not saved, the connection will be immediately dropped"]    fn from_port<F>(
        midi_input: MidiInput,
        port: &MidiInputPort,
        user_callback: F
    ) -> Result<InputDeviceHandler, MidiError>
    where
        F: FnMut(Self::Message) + Send + 'static
, { ... }
#[must_use = "If not saved, the connection will be immediately dropped"] fn from_port_polling(
        midi_input: MidiInput,
        port: &MidiInputPort
    ) -> Result<InputDeviceHandlerPolling<Self::Message>, MidiError>
    where
        Self::Message: Send + 'static
, { ... }
#[must_use = "If not saved, the connection will be immediately dropped"] fn guess<F>(user_callback: F) -> Result<InputDeviceHandler, MidiError>
    where
        F: FnMut(Self::Message) + Send + 'static
, { ... }
#[must_use = "If not saved, the connection will be immediately dropped"] fn guess_polling(
    ) -> Result<InputDeviceHandlerPolling<Self::Message>, MidiError>
    where
        Self::Message: Send + 'static
, { ... } }

Associated Types

type Message

Loading content...

Associated Constants

const MIDI_CONNECTION_NAME: &'static str

const MIDI_DEVICE_KEYWORD: &'static str

Loading content...

Required methods

fn decode_message(timestamp: u64, data: &[u8]) -> Self::Message

Loading content...

Provided methods

#[must_use = "If not saved, the connection will be immediately dropped"]fn from_port<F>(
    midi_input: MidiInput,
    port: &MidiInputPort,
    user_callback: F
) -> Result<InputDeviceHandler, MidiError> where
    F: FnMut(Self::Message) + Send + 'static, 

#[must_use = "If not saved, the connection will be immediately dropped"]fn from_port_polling(
    midi_input: MidiInput,
    port: &MidiInputPort
) -> Result<InputDeviceHandlerPolling<Self::Message>, MidiError> where
    Self::Message: Send + 'static, 

#[must_use = "If not saved, the connection will be immediately dropped"]fn guess<F>(user_callback: F) -> Result<InputDeviceHandler, MidiError> where
    F: FnMut(Self::Message) + Send + 'static, 

Search the midi devices and choose the first midi device matching the wanted Launchpad type.

#[must_use = "If not saved, the connection will be immediately dropped"]fn guess_polling(
) -> Result<InputDeviceHandlerPolling<Self::Message>, MidiError> where
    Self::Message: Send + 'static, 

Search the midi devices and choose the first midi device matching the wanted Launchpad type.

Loading content...

Implementors

impl InputDevice for launchy::launch_control::Input[src]

type Message = Message

impl InputDevice for launchy::launchpad_mk2::Input[src]

type Message = Message

impl InputDevice for launchy::launchpad_s::Input[src]

type Message = Message

Loading content...