Function rust_dmx::select_port

source ·
pub fn select_port() -> Result<Box<dyn DmxPort>>
Expand description

Prompt the user to select a port via the command prompt.

Examples found in repository?
examples/select_port.rs (line 4)
3
4
5
6
7
fn main() {
    let mut port = select_port().expect("failed to open port");
    println!("Opened port: \"{}\"", port);
    port.write(vec![0, 1, 2, 3, 4, 5].as_slice()).unwrap();
}