Skip to main content

RtpMidiPort

Struct RtpMidiPort 

Source
pub struct RtpMidiPort { /* private fields */ }
Expand description

An opened RTP-MIDI source port and its callback queue.

Implementations§

Source§

impl RtpMidiPort

Source

pub fn spec(&self) -> &HostDeviceSpec

Returns the device spec backing this port.

Source

pub fn queue(&self) -> &HostCallbackQueue

Returns the callback queue host callbacks enqueue into.

Source

pub fn stream(&self) -> Arc<StreamValue>

Returns a shared handle to the underlying stream value.

Source

pub fn receive_packet_from_callback(&self, packet: MidiPacket) -> Result<()>

Enqueues a MIDI packet received by a host callback.

Source

pub fn receive_envelope_from_callback( &self, sequence: u64, packet: MidiPacket, ) -> Result<StreamEnvelope>

Enqueues a MIDI packet and returns the stream envelope describing it under the LAN MIDI/control transport profile.

Source

pub fn close(&self) -> Result<()>

Closes the port’s callback queue.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

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

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.