From 60f7087b000d4a753d5d4c2a4bab61d75446be44 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 e25bf1c4..5516c1dd 100644 --- a/src/events/mod.rs +++ b/src/events/mod.rs @@ -683,7 +683,9 @@ impl<'a> From> 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]>, }