diff --git a/src/client.rs b/src/client.rs index 026f7eb7..19452bf0 100644 --- a/src/client.rs +++ b/src/client.rs @@ -1,8 +1,8 @@ //! This module defines client data structure — the main entry point to MPD communication //! -//! Almost every method of the `Client` structure corresponds to some command in [MPD protocol][proto]. +//! Almost every method of the [`Client`] structure corresponds to some command in [MPD protocol][proto]. //! -//! [proto]: http://www.musicpd.org/doc/protocol/ +//! [proto]: https://www.musicpd.org/doc/protocol/ use bufstream::BufStream; diff --git a/src/error.rs b/src/error.rs index 331fb299..cd6858af 100644 --- a/src/error.rs +++ b/src/error.rs @@ -22,7 +22,7 @@ use std::str::FromStr; use std::string::ParseError as StringParseError; // Server errors {{{ -/// Server error codes, as defined in [libmpdclient](http://www.musicpd.org/doc/libmpdclient/protocol_8h_source.html) +/// Server error codes, as defined in [libmpdclient](https://www.musicpd.org/doc/libmpdclient/protocol_8h_source.html) #[cfg_attr(feature = "serde", derive(serde_repr::Serialize_repr, serde_repr::Deserialize_repr))] #[derive(Debug, Clone, Copy, PartialEq, PartialOrd)] #[repr(u8)] diff --git a/src/idle.rs b/src/idle.rs index 9c458983..fc9edcac 100644 --- a/src/idle.rs +++ b/src/idle.rs @@ -1,17 +1,18 @@ //! The module defines structures and protocols for asynchronous MPD communication //! //! The MPD supports very simple protocol for asynchronous client notifications about -//! different player events. First user issues `idle` command with optional argument -//! to filter events by source subsystem (like "database", "player", "mixer" etc.) +//! different player events. First user issues [`idle`](Client::idle) command +//! with optional argument to filter events by source subsystem (like +//! "database", "player", "mixer" etc.) //! //! Once in "idle" mode, client connection timeout is disabled, and MPD will notify //! client about next event when one occurs (if originated from one of designated //! subsystems, if specified). //! //! (Actually MPD notifies only about general subsystem source of event, e.g. -//! if user changed volume, client will get `mixer` event in idle mode, so -//! it should issue `status` command then and check for any mixer-related field -//! changes.) +//! if user changed volume, client will get [`mixer`](Subsystem::Mixer) event +//! in idle mode, so it should issue [`status`](Client::status) command then and +//! check for any mixer-related field changes.) //! //! Once some such event occurs, and client is notified about it, idle mode is interrupted, //! and client must issue another `idle` command to continue listening for interesting @@ -22,8 +23,8 @@ //! since last `idle` command, if they occurred. //! //! The module describes subsystems enum only, but the main workflow is determined by -//! [`IdleGuard`](struct.IdleGuard.html) struct, which catches mutable reference -//! to original `Client` struct, thus enforcing MPD contract in regards of (im)possibility +//! [`IdleGuard`] struct, which catches mutable reference +//! to original [`Client`] struct, thus enforcing MPD contract in regards of (im)possibility //! to send commands while in "idle" mode. use crate::client::Client; diff --git a/src/lib.rs b/src/lib.rs index ccc9c01f..a552db69 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -3,12 +3,12 @@ //! MPD client for Rust //! //! This crate tries to provide idiomatic Rust API for [Music Player Daemon][mpd]. -//! The main entry point to the API is [`Client`](client/struct.Client.html) struct, -//! and inherent methods of the struct follow [MPD protocol][proto] for most part, -//! making use of traits to overload different parameters for convenience. +//! The main entry point to the API is [`Client`] struct, and inherent methods +//! of the struct follow [MPD protocol][proto] for most part, making use of +//! traits to overload different parameters for convenience. //! -//! [mpd]: http://www.musicpd.org/ -//! [proto]: http://www.musicpd.org/doc/protocol/ +//! [mpd]: https://www.musicpd.org/ +//! [proto]: https://www.musicpd.org/doc/protocol/ //! //! # Usage //! diff --git a/src/message.rs b/src/message.rs index 04cbbc9b..9a81295d 100644 --- a/src/message.rs +++ b/src/message.rs @@ -71,9 +71,9 @@ impl Channel { /// Create channel with arbitrary name, bypassing name validity checks /// - /// Not recommened! Use `new()` method above instead. + /// Not recommened! Use [`new()`](Channel::new) method above instead. /// # Safety - /// Only if Channel::is_valid_name(name) + /// Only if [`Channel::is_valid_name(name)`](Channel::is_valid_name) pub unsafe fn new_unchecked(name: String) -> Channel { Channel(name) } diff --git a/src/mount.rs b/src/mount.rs index 11287cba..092308d7 100644 --- a/src/mount.rs +++ b/src/mount.rs @@ -7,7 +7,7 @@ //! a source of songs for its database (like network shares). //! //! Possible, but inactive, mounts are named "neighbors" and can be -//! listed with `neighbors()` method. +//! listed with [`neighbors()`](crate::Client::neighbors) method. use crate::convert::FromMap; use crate::error::{Error, ProtoError}; diff --git a/src/search.rs b/src/search.rs index eed5e3b6..23e7b867 100644 --- a/src/search.rs +++ b/src/search.rs @@ -1,4 +1,5 @@ #![allow(missing_docs)] +//! The module defines data structures used in MPD search queries. // TODO: unfinished functionality use crate::proto::{Quoted, ToArguments}; diff --git a/src/status.rs b/src/status.rs index 734de621..a1fa51c9 100644 --- a/src/status.rs +++ b/src/status.rs @@ -50,7 +50,8 @@ pub struct Status { pub audio: Option, /// current DB updating job number (if DB updating is in progress) pub updating_db: Option, - /// last player error (if happened, can be reset with `clearerror()` method) + /// last player error (if happened, can be reset with + /// [`clearerror()`](crate::Client::clearerror) method) pub error: Option, /// replay gain mode pub replaygain: Option,