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

Host for MIDI messages, opens all ports & forwards them onto a lock-free queue the audio-thread can pop from.

The host will close all MIDI connections on drop.

Implementations

Create the host, linked to GC Handle and with queue capacity of messages.

Create the host with default 100 capacity

Build a MidiHost with a pre-built queue

Get a reference to the message queue

Start the MIDI connections

For integration testing purposes MidiHost starts a virtual input which it’ll also connect into. This input contains the PID of the host process.

Generating this name dynamically avoids flakiness in integration tests.

Trait Implementations

Actor execution context type
Called when an actor gets polled the first time.
Called after an actor is in Actor::Stopping state. Read more
Called after an actor is stopped. Read more
Start a new asynchronous actor, returning its address. Read more
Construct and start a new asynchronous actor, returning its address. Read more
Start new actor in arbiter’s thread.
Start a new asynchronous actor given a Context. Read more
Returns the “default value” for a type. Read more
Executes the destructor for this type. Read more
The type of value that this handler will return. Read more
This method is called for every message received by this actor.
The type of value that this handler will return. Read more
This method is called for every message received by this actor.
Called when the supervisor restarts a failed actor.
Method is called during service initialization.
Construct and start system service
Get actor’s address from system registry

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

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

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more