[−][src]Crate async_mpd
Async-mpd
Async-std based mpd client library for Rust
Example:
use async_mpd::MpdClient; #[async_std::main] async fn main() -> std::io::Result<()> { // Connect to server let mut mpd = MpdClient::new("localhost:6600").await?; // Get all tracks in the play queue and display them let queue = mpd.queue().await?; for track in queue { println!("{} - {}", track.artist, track.title); } // Play track nr 2 in the queue mpd.playid(2).await?; // Get and print the current server status println!("{:?}", mpd.status().await?); // Set the volume to 50% mpd.setvol(50).await?; Ok(()) }
Structs
MpdClient | Mpd Client |
QueuedTrack | Track in Queue |
Stats | Mpd database statistics |
Status | Mpd status response |
Enums
Subsystem | Subsystem |