Expand description
MPD client for Rust
This crate tries to provide idiomatic Rust API for Music Player Daemon.
The main entry point to the API is Client
struct,
and inherent methods of the struct follow MPD protocol for most part,
making use of traits to overload different parameters for convenience.
§Usage
[dependencies]
mpd = "*"
extern crate mpd;
use mpd::Client;
use std::net::TcpStream;
let mut conn = Client::connect("127.0.0.1:6600").unwrap();
conn.volume(100).unwrap();
conn.load("My Lounge Playlist", ..).unwrap();
conn.play().unwrap();
println!("Status: {:?}", conn.status());
Re-exports§
pub use client::Client;
pub use idle::Idle;
pub use idle::Subsystem;
pub use message::Channel;
pub use message::Message;
pub use mount::Mount;
pub use mount::Neighbor;
pub use output::Output;
pub use playlist::Playlist;
pub use plugin::Plugin;
pub use search::Query;
pub use search::Term;
pub use song::Id;
pub use song::Song;
pub use stats::Stats;
pub use status::ReplayGain;
pub use status::State;
pub use status::Status;
pub use version::Version;
Modules§
- client
- This module defines client data structure — the main entry point to MPD communication
- error
- This module defines different errors occurring during communication with MPD.
- idle
- The module defines structures and protocols for asynchronous MPD communication
- message
- The module defines structures for MPD client-to-client messaging/subscription protocol
- mount
- The module describes data structures for MPD (virtual) mounts system
- output
- The module describes output
- playlist
- The module defines playlist data structures
- plugin
- The module defines decoder plugin data structures
- reply
- The module describes all possible replies from MPD server.
- search
- song
- The module defines song structs and methods.
- stats
- The module describes DB and playback statistics
- status
- The module defines MPD status data structures
- version
- This module defines MPD version type and parsing code