Struct jack::MidiWriter

source ·
pub struct MidiWriter<'a> { /* private fields */ }
Expand description

Write midi events to an output midi port.

Implementations§

source§

impl<'a> MidiWriter<'a>

source

pub fn write(&mut self, message: &RawMidi<'_>) -> Result<(), Error>

Write an event into an event port buffer.

Clients must write normalised MIDI data to the port - no running status and no (1-byte) realtime messages interspersed with other messagse (realtime messages are fine when they occur on their own, like other messages).

source

pub fn lost_count(&self) -> usize

Get the number of events that could not be written to port_buffer.

If the return value is greater than 0, than the buffer is full. Currently, the only way this can happen is if events are lost on port mixdown.

source

pub fn max_event_size(&self) -> usize

Get the size of the largest event that can be stored by the port.

This function returns the current space available, taking into account events already stored in the port.

Trait Implementations§

source§

impl<'a> Debug for MidiWriter<'a>

source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for MidiWriter<'a>

§

impl<'a> !Send for MidiWriter<'a>

§

impl<'a> !Sync for MidiWriter<'a>

§

impl<'a> Unpin for MidiWriter<'a>

§

impl<'a> UnwindSafe for MidiWriter<'a>

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

const: unstable · source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

const: unstable · source§

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

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

const: unstable · source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

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

const: unstable · 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 Twhere
U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.
source§

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

§

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

The type returned in the event of a conversion error.
const: unstable · source§

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

Performs the conversion.