@@ -14,10 +14,10 @@ use std::{borrow::Cow, ops::Range};
14
14
/// A struct representing a key/value XML attribute.
15
15
///
16
16
/// Field `value` stores raw bytes, possibly containing escape-sequences. Most users will likely
17
- /// want to access the value using one of the [`unescaped_value `] and [`decode_and_unescape_value`]
17
+ /// want to access the value using one of the [`unescape_value `] and [`decode_and_unescape_value`]
18
18
/// functions.
19
19
///
20
- /// [`unescaped_value `]: Self::unescaped_value
20
+ /// [`unescape_value `]: Self::unescape_value
21
21
/// [`decode_and_unescape_value`]: Self::decode_and_unescape_value
22
22
#[ derive( Clone , PartialEq ) ]
23
23
pub struct Attribute < ' a > {
@@ -37,9 +37,9 @@ impl<'a> Attribute<'a> {
37
37
///
38
38
/// This will allocate if the value contains any escape sequences.
39
39
///
40
- /// See also [`unescaped_value_with ()`](Self::unescaped_value_with )
41
- pub fn unescaped_value ( & self ) -> XmlResult < Cow < [ u8 ] > > {
42
- self . unescaped_value_with ( |_| None )
40
+ /// See also [`unescape_value_with ()`](Self::unescape_value_with )
41
+ pub fn unescape_value ( & self ) -> XmlResult < Cow < [ u8 ] > > {
42
+ self . unescape_value_with ( |_| None )
43
43
}
44
44
45
45
/// Returns the unescaped value, using custom entities.
@@ -51,12 +51,12 @@ impl<'a> Attribute<'a> {
51
51
///
52
52
/// This will allocate if the value contains any escape sequences.
53
53
///
54
- /// See also [`unescaped_value ()`](Self::unescaped_value )
54
+ /// See also [`unescape_value ()`](Self::unescape_value )
55
55
///
56
56
/// # Pre-condition
57
57
///
58
58
/// The implementation of `resolve_entity` is expected to operate over UTF-8 inputs.
59
- pub fn unescaped_value_with < ' s , ' entity > (
59
+ pub fn unescape_value_with < ' s , ' entity > (
60
60
& ' s self ,
61
61
resolve_entity : impl Fn ( & [ u8 ] ) -> Option < & ' entity str > ,
62
62
) -> XmlResult < Cow < ' s , [ u8 ] > > {
@@ -69,9 +69,9 @@ impl<'a> Attribute<'a> {
69
69
/// instead use one of:
70
70
///
71
71
/// * [`Reader::decoder().decode()`], as it only allocates when the decoding can't be performed otherwise.
72
- /// * [`unescaped_value ()`], as it doesn't allocate when no escape sequences are used.
72
+ /// * [`unescape_value ()`], as it doesn't allocate when no escape sequences are used.
73
73
///
74
- /// [`unescaped_value ()`]: Self::unescaped_value
74
+ /// [`unescape_value ()`]: Self::unescape_value
75
75
/// [`Reader::decoder().decode()`]: crate::reader::Decoder::decode
76
76
pub fn decode_and_unescape_value < B > ( & self , reader : & Reader < B > ) -> XmlResult < String > {
77
77
self . decode_and_unescape_value_with ( reader, |_| None )
@@ -83,9 +83,9 @@ impl<'a> Attribute<'a> {
83
83
/// instead use one of:
84
84
///
85
85
/// * [`Reader::decoder().decode()`], as it only allocates when the decoding can't be performed otherwise.
86
- /// * [`unescaped_value_with ()`], as it doesn't allocate when no escape sequences are used.
86
+ /// * [`unescape_value_with ()`], as it doesn't allocate when no escape sequences are used.
87
87
///
88
- /// [`unescaped_value_with ()`]: Self::unescaped_value_with
88
+ /// [`unescape_value_with ()`]: Self::unescape_value_with
89
89
/// [`Reader::decoder().decode()`]: crate::reader::Decoder::decode
90
90
///
91
91
/// # Pre-condition
0 commit comments