From 15be5c4a771cb78e3bf6d44a8af003d400a83e45 Mon Sep 17 00:00:00 2001 From: Mingun Date: Sat, 9 Jul 2022 22:12:09 +0500 Subject: [PATCH] Document `content` field of the `BytesText` --- src/events/mod.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/events/mod.rs b/src/events/mod.rs index 5f886893..24d9f6f1 100644 --- a/src/events/mod.rs +++ b/src/events/mod.rs @@ -670,7 +670,9 @@ impl<'a> Deref for BytesEnd<'a> { /// in escaped form. Internally data is stored in escaped form #[derive(Clone, Eq, PartialEq)] pub struct BytesText<'a> { - // Invariant: The content is always escaped. + /// Escaped then encoded content of the event. Content is encoded in the XML + /// document encoding when event comes from the reader and should be in the + /// document encoding when event passed to the writer content: Cow<'a, [u8]>, }