mfp_core/lib.rs
1//! Everything the daemon and the interface both need: one definition of an episode, of every
2//! wire message, and of every filesystem path. No I/O policy of its own beyond retrieving
3//! the catalog; the daemon is the sole writer of playback and download state, and clients
4//! render what it last reported.
5
6// Test code asserts with `unwrap` and `expect` on purpose: a panic there is the failure
7// report, and threading `Result` through a test obscures what it is checking
8#![cfg_attr(
9 test,
10 allow(
11 clippy::unwrap_used,
12 clippy::expect_used,
13 clippy::panic,
14 clippy::float_cmp
15 )
16)]
17
18pub mod catalog;
19pub mod config;
20pub mod error;
21pub mod model;
22pub mod paths;
23pub mod protocol;
24
25pub use config::Config;
26pub use error::{Error, ErrorCode, Result};
27pub use model::{Catalog, Episode};
28
29/// The User-Agent every request to musicforprogramming.net carries. Upstream is a small
30/// independent host, so requests identify themselves.
31pub const USER_AGENT: &str = concat!(
32 "mfp/",
33 env!("CARGO_PKG_VERSION"),
34 " (musicforprogramming terminal player)"
35);