@@ -17,15 +17,13 @@ use std::{borrow::Cow, collections::HashMap, ops::Range};
17
17
/// want to access the value using one of the [`unescaped_value`] and [`unescape_and_decode_value`]
18
18
/// functions.
19
19
///
20
- /// [`unescaped_value`]: #method. unescaped_value
21
- /// [`unescape_and_decode_value`]: #method. unescape_and_decode_value
20
+ /// [`unescaped_value`]: Self:: unescaped_value
21
+ /// [`unescape_and_decode_value`]: Self:: unescape_and_decode_value
22
22
#[ derive( Clone , PartialEq ) ]
23
23
pub struct Attribute < ' a > {
24
24
/// The key to uniquely define the attribute.
25
25
///
26
26
/// If [`Attributes::with_checks`] is turned off, the key might not be unique.
27
- ///
28
- /// [`Attributes::with_checks`]: struct.Attributes.html#method.with_checks
29
27
pub key : QName < ' a > ,
30
28
/// The raw value of the attribute.
31
29
pub value : Cow < ' a , [ u8 ] > ,
@@ -39,7 +37,7 @@ impl<'a> Attribute<'a> {
39
37
///
40
38
/// This will allocate if the value contains any escape sequences.
41
39
///
42
- /// See also [`unescaped_value_with_custom_entities()`](#method. unescaped_value_with_custom_entities)
40
+ /// See also [`unescaped_value_with_custom_entities()`](Self:: unescaped_value_with_custom_entities)
43
41
pub fn unescaped_value ( & self ) -> XmlResult < Cow < [ u8 ] > > {
44
42
self . make_unescaped_value ( None )
45
43
}
@@ -52,7 +50,7 @@ impl<'a> Attribute<'a> {
52
50
///
53
51
/// This will allocate if the value contains any escape sequences.
54
52
///
55
- /// See also [`unescaped_value()`](#method. unescaped_value)
53
+ /// See also [`unescaped_value()`](Self:: unescaped_value)
56
54
///
57
55
/// # Pre-condition
58
56
///
@@ -76,11 +74,11 @@ impl<'a> Attribute<'a> {
76
74
/// This allocates a `String` in all cases. For performance reasons it might be a better idea to
77
75
/// instead use one of:
78
76
///
79
- /// * [`Reader::decode()`], as it only allocates when the decoding can't be performed otherwise.
77
+ /// * [`Reader::decoder(). decode()`], as it only allocates when the decoding can't be performed otherwise.
80
78
/// * [`unescaped_value()`], as it doesn't allocate when no escape sequences are used.
81
79
///
82
- /// [`unescaped_value()`]: #method. unescaped_value
83
- /// [`Reader::decode()`]: ../../ reader/struct.Reader.html#method. decode
80
+ /// [`unescaped_value()`]: Self:: unescaped_value
81
+ /// [`Reader::decoder(). decode()`]: crate:: reader::Decoder:: decode
84
82
pub fn unescape_and_decode_value < B > ( & self , reader : & Reader < B > ) -> XmlResult < String > {
85
83
self . do_unescape_and_decode_value ( reader, None )
86
84
}
@@ -90,11 +88,11 @@ impl<'a> Attribute<'a> {
90
88
/// This allocates a `String` in all cases. For performance reasons it might be a better idea to
91
89
/// instead use one of:
92
90
///
93
- /// * [`Reader::decode()`], as it only allocates when the decoding can't be performed otherwise.
91
+ /// * [`Reader::decoder(). decode()`], as it only allocates when the decoding can't be performed otherwise.
94
92
/// * [`unescaped_value_with_custom_entities()`], as it doesn't allocate when no escape sequences are used.
95
93
///
96
- /// [`unescaped_value_with_custom_entities()`]: #method. unescaped_value_with_custom_entities
97
- /// [`Reader::decode()`]: ../../ reader/struct.Reader.html#method. decode
94
+ /// [`unescaped_value_with_custom_entities()`]: Self:: unescaped_value_with_custom_entities
95
+ /// [`Reader::decoder(). decode()`]: crate:: reader::Decoder:: decode
98
96
///
99
97
/// # Pre-condition
100
98
///
@@ -189,7 +187,7 @@ impl<'a> From<Attr<&'a [u8]>> for Attribute<'a> {
189
187
/// Yields `Result<Attribute>`. An `Err` will be yielded if an attribute is malformed or duplicated.
190
188
/// The duplicate check can be turned off by calling [`with_checks(false)`].
191
189
///
192
- /// [`with_checks(false)`]: #method. with_checks
190
+ /// [`with_checks(false)`]: Self:: with_checks
193
191
#[ derive( Clone , Debug ) ]
194
192
pub struct Attributes < ' a > {
195
193
/// slice of `Element` corresponding to attributes
0 commit comments