pub trait Transport {
// Required methods
fn send(&mut self, message: &[u8]) -> Result<()>;
fn receive(&mut self, timeout: Duration) -> Result<Vec<u8>>;
}Expand description
Bidirectional transport carrying complete MIDI messages.
Implementations supply message boundaries and bounded receive waits. A local socket implementation can length-prefix the same messages; an in-process implementation can pass them directly. No terminal behavior is required.
Required Methods§
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".