有没有相当于os.startfile()
python 中的 Rust 方法?例如,我需要使用 rust 启动“mp3 文件”。在Python中是这样的os.startfile('audio.mp3')
。这将打开默认媒体播放器并开始播放该文件。我需要对 Rust 语言做同样的事情。
代码:
fltk::frame::Frame::new(0,0, 300, 100, format!("side item {}", i));
Run Code Online (Sandbox Code Playgroud)
输出错误:
the trait `std::convert::From<std::string::String>` is not implemented for `std::option::Option<&'static str>`
Run Code Online (Sandbox Code Playgroud)