@@ -41,9 +41,18 @@ impl<'a> Attribute<'a> {
41
41
///
42
42
/// See also [`unescape_value_with()`](Self::unescape_value_with)
43
43
///
44
- /// This method is available only if [`encoding`] feature is **not** enabled.
44
+ /// <div style="background:rgba(120,145,255,0.45);padding:0.75em;">
45
+ ///
46
+ /// NOTE: Because this method is available only if [`encoding`] feature is **not** enabled,
47
+ /// should only be used by applications.
48
+ /// Libs should use [`decode_and_unescape_value()`](Self::decode_and_unescape_value)
49
+ /// instead, because if lib will be used in a project which depends on quick_xml with
50
+ /// [`encoding`] feature enabled, the lib will fail to compile due to [feature unification].
51
+ ///
52
+ /// </div>
45
53
///
46
54
/// [`encoding`]: ../../index.html#encoding
55
+ /// [feature unification]: https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
47
56
#[ cfg( any( doc, not( feature = "encoding" ) ) ) ]
48
57
pub fn unescape_value ( & self ) -> XmlResult < Cow < ' a , str > > {
49
58
self . unescape_value_with ( resolve_predefined_entity)
@@ -60,9 +69,18 @@ impl<'a> Attribute<'a> {
60
69
///
61
70
/// See also [`unescape_value()`](Self::unescape_value)
62
71
///
63
- /// This method is available only if [`encoding`] feature is **not** enabled.
72
+ /// <div style="background:rgba(120,145,255,0.45);padding:0.75em;">
73
+ ///
74
+ /// NOTE: Because this method is available only if [`encoding`] feature is **not** enabled,
75
+ /// should only be used by applications.
76
+ /// Libs should use [`decode_and_unescape_value_with()`](Self::decode_and_unescape_value_with)
77
+ /// instead, because if lib will be used in a project which depends on quick_xml with
78
+ /// [`encoding`] feature enabled, the lib will fail to compile due to [feature unification].
79
+ ///
80
+ /// </div>
64
81
///
65
82
/// [`encoding`]: ../../index.html#encoding
83
+ /// [feature unification]: https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
66
84
#[ cfg( any( doc, not( feature = "encoding" ) ) ) ]
67
85
#[ inline]
68
86
pub fn unescape_value_with < ' entity > (
0 commit comments