@@ -14,10 +14,10 @@ use std::{borrow::Cow, ops::Range};
1414/// A struct representing a key/value XML attribute.
1515///
1616/// 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`]
1818/// functions.
1919///
20- /// [`unescaped_value `]: Self::unescaped_value
20+ /// [`unescape_value `]: Self::unescape_value
2121/// [`decode_and_unescape_value`]: Self::decode_and_unescape_value
2222#[ derive( Clone , PartialEq ) ]
2323pub struct Attribute < ' a > {
@@ -37,9 +37,9 @@ impl<'a> Attribute<'a> {
3737 ///
3838 /// This will allocate if the value contains any escape sequences.
3939 ///
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 )
4343 }
4444
4545 /// Returns the unescaped value, using custom entities.
@@ -51,12 +51,12 @@ impl<'a> Attribute<'a> {
5151 ///
5252 /// This will allocate if the value contains any escape sequences.
5353 ///
54- /// See also [`unescaped_value ()`](Self::unescaped_value )
54+ /// See also [`unescape_value ()`](Self::unescape_value )
5555 ///
5656 /// # Pre-condition
5757 ///
5858 /// 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 > (
6060 & ' s self ,
6161 resolve_entity : impl Fn ( & [ u8 ] ) -> Option < & ' entity str > ,
6262 ) -> XmlResult < Cow < ' s , [ u8 ] > > {
@@ -69,9 +69,9 @@ impl<'a> Attribute<'a> {
6969 /// instead use one of:
7070 ///
7171 /// * [`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.
7373 ///
74- /// [`unescaped_value ()`]: Self::unescaped_value
74+ /// [`unescape_value ()`]: Self::unescape_value
7575 /// [`Reader::decoder().decode()`]: crate::reader::Decoder::decode
7676 pub fn decode_and_unescape_value < B > ( & self , reader : & Reader < B > ) -> XmlResult < String > {
7777 self . decode_and_unescape_value_with ( reader, |_| None )
@@ -83,9 +83,9 @@ impl<'a> Attribute<'a> {
8383 /// instead use one of:
8484 ///
8585 /// * [`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.
8787 ///
88- /// [`unescaped_value_with ()`]: Self::unescaped_value_with
88+ /// [`unescape_value_with ()`]: Self::unescape_value_with
8989 /// [`Reader::decoder().decode()`]: crate::reader::Decoder::decode
9090 ///
9191 /// # Pre-condition
0 commit comments