AUDIO
Source snapshot · 11 November 2026

API reference / ravet_midi_device::PreparedUmpInput

Struct PreparedUmpInput 

pub struct PreparedUmpInput { /* private fields */ }
Expand description

Unique prepared producer. Construction/drop belong outside callbacks. Capacity is 1..4096 packets. No allocation/locks/I/O on push; its native producer callback must obey single-producer ownership. No deadline guarantee.

Implementations§

§

impl PreparedUmpInput

pub fn new(capacity: usize) -> Result<(Self, UmpReceiver), UmpInputError>

pub fn statistics(&self) -> MidiInputStatistics

pub fn try_push(&mut self, record: TimedUmp) -> Result<(), UmpInputError>

Copies one framed packet. Accepted counts publication, not consumption; receiver abandonment can race the initial check. Rejected records remain caller-owned because TimedUmp is Copy. Counters wrap/coalesce relaxedly.

pub fn push_words( &mut self, timestamp: u64, protocol: UmpProtocol, words: &[u32], ) -> Result<UmpDelivery, UmpInputError>

Preflight <=4096 numeric words at a known packet boundary. A malformed or oversized whole batch publishes nothing. All packets retain the supplied timestamp/protocol label. Framing accepts opaque/reserved message types; semantic/protocol conformance belongs to the native producer/consumer. Full/abandoned queues retain the accepted prefix and discard the suffix; dropped_full counts packets refused because full, invalid counts batches.

Auto Trait Implementations§

Blanket Implementations§

§

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

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

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

§

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

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

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

§

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

Mutably borrows from an owned value. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

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

§

fn into(self) -> U

Calls U::from(self).

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

§

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

§

type Error = Infallible

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

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

Performs the conversion.
§

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

§

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

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

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

Performs the conversion.