[][src]Struct portmidi::DeviceInfo

pub struct DeviceInfo { /* fields omitted */ }

Represents a PortMidi device.

Implementations

impl DeviceInfo[src]

pub fn new(id: PortMidiDeviceId) -> Result<Self>[src]

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

pub fn is_input(&self) -> bool[src]

Returns true for an input device.

pub fn is_output(&self) -> bool[src]

Returns true for an output device.

pub fn name(&self) -> &String[src]

Returns the device name.

pub fn direction(&self) -> Direction[src]

Returns the device event direction.

pub fn id(&self) -> PortMidiDeviceId[src]

Returns the device id.

Trait Implementations

impl Clone for DeviceInfo[src]

impl Debug for DeviceInfo[src]

impl Display for DeviceInfo[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.