Skip to content

Commit d26a58e

Browse files
authored
Merge pull request #71 from naglis/doc-comment-update
Doc comment update
2 parents 84a970b + 7aa7b56 commit d26a58e

File tree

8 files changed

+22
-19
lines changed

8 files changed

+22
-19
lines changed

src/client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
//! This module defines client data structure — the main entry point to MPD communication
22
//!
3-
//! Almost every method of the `Client` structure corresponds to some command in [MPD protocol][proto].
3+
//! Almost every method of the [`Client`] structure corresponds to some command in [MPD protocol][proto].
44
//!
5-
//! [proto]: http://www.musicpd.org/doc/protocol/
5+
//! [proto]: https://www.musicpd.org/doc/protocol/
66
77
use bufstream::BufStream;
88

src/error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ use std::str::FromStr;
2222
use std::string::ParseError as StringParseError;
2323

2424
// Server errors {{{
25-
/// Server error codes, as defined in [libmpdclient](http://www.musicpd.org/doc/libmpdclient/protocol_8h_source.html)
25+
/// Server error codes, as defined in [libmpdclient](https://www.musicpd.org/doc/libmpdclient/protocol_8h_source.html)
2626
#[cfg_attr(feature = "serde", derive(serde_repr::Serialize_repr, serde_repr::Deserialize_repr))]
2727
#[derive(Debug, Clone, Copy, PartialEq, PartialOrd)]
2828
#[repr(u8)]

src/idle.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
//! The module defines structures and protocols for asynchronous MPD communication
22
//!
33
//! The MPD supports very simple protocol for asynchronous client notifications about
4-
//! different player events. First user issues `idle` command with optional argument
5-
//! to filter events by source subsystem (like "database", "player", "mixer" etc.)
4+
//! different player events. First user issues [`idle`](Client::idle) command
5+
//! with optional argument to filter events by source subsystem (like
6+
//! "database", "player", "mixer" etc.)
67
//!
78
//! Once in "idle" mode, client connection timeout is disabled, and MPD will notify
89
//! client about next event when one occurs (if originated from one of designated
910
//! subsystems, if specified).
1011
//!
1112
//! (Actually MPD notifies only about general subsystem source of event, e.g.
12-
//! if user changed volume, client will get `mixer` event in idle mode, so
13-
//! it should issue `status` command then and check for any mixer-related field
14-
//! changes.)
13+
//! if user changed volume, client will get [`mixer`](Subsystem::Mixer) event
14+
//! in idle mode, so it should issue [`status`](Client::status) command then and
15+
//! check for any mixer-related field changes.)
1516
//!
1617
//! Once some such event occurs, and client is notified about it, idle mode is interrupted,
1718
//! and client must issue another `idle` command to continue listening for interesting
@@ -22,8 +23,8 @@
2223
//! since last `idle` command, if they occurred.
2324
//!
2425
//! The module describes subsystems enum only, but the main workflow is determined by
25-
//! [`IdleGuard`](struct.IdleGuard.html) struct, which catches mutable reference
26-
//! to original `Client` struct, thus enforcing MPD contract in regards of (im)possibility
26+
//! [`IdleGuard`] struct, which catches mutable reference
27+
//! to original [`Client`] struct, thus enforcing MPD contract in regards of (im)possibility
2728
//! to send commands while in "idle" mode.
2829
2930
use crate::client::Client;

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
//! MPD client for Rust
44
//!
55
//! This crate tries to provide idiomatic Rust API for [Music Player Daemon][mpd].
6-
//! The main entry point to the API is [`Client`](client/struct.Client.html) struct,
7-
//! and inherent methods of the struct follow [MPD protocol][proto] for most part,
8-
//! making use of traits to overload different parameters for convenience.
6+
//! The main entry point to the API is [`Client`] struct, and inherent methods
7+
//! of the struct follow [MPD protocol][proto] for most part, making use of
8+
//! traits to overload different parameters for convenience.
99
//!
10-
//! [mpd]: http://www.musicpd.org/
11-
//! [proto]: http://www.musicpd.org/doc/protocol/
10+
//! [mpd]: https://www.musicpd.org/
11+
//! [proto]: https://www.musicpd.org/doc/protocol/
1212
//!
1313
//! # Usage
1414
//!

src/message.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ impl Channel {
7171

7272
/// Create channel with arbitrary name, bypassing name validity checks
7373
///
74-
/// Not recommened! Use `new()` method above instead.
74+
/// Not recommened! Use [`new()`](Channel::new) method above instead.
7575
/// # Safety
76-
/// Only if Channel::is_valid_name(name)
76+
/// Only if [`Channel::is_valid_name(name)`](Channel::is_valid_name)
7777
pub unsafe fn new_unchecked(name: String) -> Channel {
7878
Channel(name)
7979
}

src/mount.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! a source of songs for its database (like network shares).
88
//!
99
//! Possible, but inactive, mounts are named "neighbors" and can be
10-
//! listed with `neighbors()` method.
10+
//! listed with [`neighbors()`](crate::Client::neighbors) method.
1111
1212
use crate::convert::FromMap;
1313
use crate::error::{Error, ProtoError};

src/search.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#![allow(missing_docs)]
2+
//! The module defines data structures used in MPD search queries.
23
// TODO: unfinished functionality
34

45
use crate::proto::{Quoted, ToArguments};

src/status.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ pub struct Status {
5050
pub audio: Option<AudioFormat>,
5151
/// current DB updating job number (if DB updating is in progress)
5252
pub updating_db: Option<u32>,
53-
/// last player error (if happened, can be reset with `clearerror()` method)
53+
/// last player error (if happened, can be reset with
54+
/// [`clearerror()`](crate::Client::clearerror) method)
5455
pub error: Option<String>,
5556
/// replay gain mode
5657
pub replaygain: Option<ReplayGain>,

0 commit comments

Comments
 (0)