File tree Expand file tree Collapse file tree 9 files changed +9
-25
lines changed Expand file tree Collapse file tree 9 files changed +9
-25
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,7 @@ use std::io::IoSlice;
25
25
/// assert_eq!(full[..], b"hello world"[..]);
26
26
/// ```
27
27
///
28
- /// [`Buf::chain`]: trait.Buf.html#method.chain
29
- /// [`Buf`]: trait.Buf.html
30
- /// [`BufMut`]: trait.BufMut.html
28
+ /// [`Buf::chain`]: Buf::chain
31
29
#[ derive( Debug ) ]
32
30
pub struct Chain < T , U > {
33
31
a : T ,
Original file line number Diff line number Diff line change @@ -17,9 +17,6 @@ use crate::Buf;
17
17
/// assert_eq!(iter.next(), Some(b'c'));
18
18
/// assert_eq!(iter.next(), None);
19
19
/// ```
20
- ///
21
- /// [`iter`]: trait.Buf.html#method.iter
22
- /// [`Buf`]: trait.Buf.html
23
20
#[ derive( Debug ) ]
24
21
pub struct IntoIter < T > {
25
22
inner : T ,
Original file line number Diff line number Diff line change 13
13
//! See [`Buf`] and [`BufMut`] for more details.
14
14
//!
15
15
//! [rope]: https://en.wikipedia.org/wiki/Rope_(data_structure)
16
- //! [`Buf`]: trait.Buf.html
17
- //! [`BufMut`]: trait.BufMut.html
18
16
19
17
mod buf_impl;
20
18
mod buf_mut;
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use std::{cmp, io};
5
5
/// A `Buf` adapter which implements `io::Read` for the inner value.
6
6
///
7
7
/// This struct is generally created by calling `reader()` on `Buf`. See
8
- /// documentation of [`reader()`](trait. Buf.html#method. reader) for more
8
+ /// documentation of [`reader()`](Buf:: reader) for more
9
9
/// details.
10
10
#[ derive( Debug ) ]
11
11
pub struct Reader < B > {
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use core::cmp;
5
5
/// A `Buf` adapter which limits the bytes read from an underlying buffer.
6
6
///
7
7
/// This struct is generally created by calling `take()` on `Buf`. See
8
- /// documentation of [`take()`](trait. Buf.html#method. take) for more details.
8
+ /// documentation of [`take()`](Buf:: take) for more details.
9
9
#[ derive( Debug ) ]
10
10
pub struct Take < T > {
11
11
inner : T ,
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ use std::{cmp, io};
5
5
/// A `BufMut` adapter which implements `io::Write` for the inner value.
6
6
///
7
7
/// This struct is generally created by calling `writer()` on `BufMut`. See
8
- /// documentation of [`writer()`](trait. BufMut.html#method. writer) for more
8
+ /// documentation of [`writer()`](BufMut:: writer) for more
9
9
/// details.
10
10
#[ derive( Debug ) ]
11
11
pub struct Writer < B > {
Original file line number Diff line number Diff line change @@ -438,7 +438,7 @@ impl Bytes {
438
438
/// If `len` is greater than the buffer's current length, this has no
439
439
/// effect.
440
440
///
441
- /// The [` split_off`] method can emulate `truncate`, but this causes the
441
+ /// The [split_off](`Self:: split_off()`) method can emulate `truncate`, but this causes the
442
442
/// excess bytes to be returned instead of dropped.
443
443
///
444
444
/// # Examples
@@ -450,8 +450,6 @@ impl Bytes {
450
450
/// buf.truncate(5);
451
451
/// assert_eq!(buf, b"hello"[..]);
452
452
/// ```
453
- ///
454
- /// [`split_off`]: #method.split_off
455
453
#[ inline]
456
454
pub fn truncate ( & mut self , len : usize ) {
457
455
if len < self . len {
Original file line number Diff line number Diff line change @@ -399,7 +399,7 @@ impl BytesMut {
399
399
///
400
400
/// Existing underlying capacity is preserved.
401
401
///
402
- /// The [` split_off`] method can emulate `truncate`, but this causes the
402
+ /// The [split_off](`Self:: split_off()`) method can emulate `truncate`, but this causes the
403
403
/// excess bytes to be returned instead of dropped.
404
404
///
405
405
/// # Examples
@@ -411,8 +411,6 @@ impl BytesMut {
411
411
/// buf.truncate(5);
412
412
/// assert_eq!(buf, b"hello"[..]);
413
413
/// ```
414
- ///
415
- /// [`split_off`]: #method.split_off
416
414
pub fn truncate ( & mut self , len : usize ) {
417
415
if len <= self . len ( ) {
418
416
unsafe {
Original file line number Diff line number Diff line change 9
9
//! Provides abstractions for working with bytes.
10
10
//!
11
11
//! The `bytes` crate provides an efficient byte buffer structure
12
- //! ([`Bytes`](struct.Bytes.html) ) and traits for working with buffer
12
+ //! ([`Bytes`]) and traits for working with buffer
13
13
//! implementations ([`Buf`], [`BufMut`]).
14
14
//!
15
- //! [`Buf`]: trait.Buf.html
16
- //! [`BufMut`]: trait.BufMut.html
17
- //!
18
15
//! # `Bytes`
19
16
//!
20
17
//! `Bytes` is an efficient container for storing and operating on contiguous
52
49
//! `a` and `b` will share the underlying buffer and maintain indices tracking
53
50
//! the view into the buffer represented by the handle.
54
51
//!
55
- //! See the [struct docs] for more details.
56
- //!
57
- //! [struct docs]: struct.Bytes.html
52
+ //! See the [struct docs](`Bytes`) for more details.
58
53
//!
59
54
//! # `Buf`, `BufMut`
60
55
//!
70
65
//! ## Relation with `Read` and `Write`
71
66
//!
72
67
//! At first glance, it may seem that `Buf` and `BufMut` overlap in
73
- //! functionality with `std::io::Read` and `std::io::Write`. However, they
68
+ //! functionality with [ `std::io::Read`] and [ `std::io::Write`] . However, they
74
69
//! serve different purposes. A buffer is the value that is provided as an
75
70
//! argument to `Read::read` and `Write::write`. `Read` and `Write` may then
76
71
//! perform a syscall, which has the potential of failing. Operations on `Buf`
You can’t perform that action at this time.
0 commit comments