Struct portmidi::DeviceInfo [] [src]

pub struct DeviceInfo {
    // some fields omitted
}

Represents a PortMidi device.

Methods

impl DeviceInfo
[src]

fn new(id: PortMidiDeviceId) -> Result<Self>

Creates a new DeviceInfo instance for the given device id. Returns an Error::PortMidi(_) if the given id is invalid.

fn is_input(&self) -> bool

Returns true for an input device.

fn is_output(&self) -> bool

Returns true for an output device.

fn name(&self) -> &String

Returns the device name.

fn direction(&self) -> Direction

Returns the device event direction.

fn id(&self) -> PortMidiDeviceId

Returns the device id.

Trait Implementations

impl Debug for DeviceInfo
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Clone for DeviceInfo
[src]

fn clone(&self) -> DeviceInfo

Returns a copy of the value. Read more

fn clone_from(&mut self, source: &Self)
1.0.0

Performs copy-assignment from source. Read more

impl Display for DeviceInfo
[src]

fn fmt(&self, f: &mut Formatter) -> Result

Formats the value using the given formatter.