docx_rust/document/
comment_range.rs

1use hard_xml::{XmlRead, XmlWrite};
2use std::borrow::Cow;
3
4use crate::__setter;
5
6/// Start of comment
7#[derive(Debug, Default, XmlRead, XmlWrite, Clone)]
8#[cfg_attr(test, derive(PartialEq))]
9#[xml(tag = "w:commentRangeStart")]
10pub struct CommentRangeStart<'a> {
11    /// Specifies a unique identifier for the comment.
12    #[xml(attr = "w:id")]
13    pub id: Cow<'a, str>,
14}
15
16impl<'a> CommentRangeStart<'a> {
17    __setter!(id: Cow<'a, str>);
18}
19
20/// End of comment
21#[derive(Debug, Default, XmlRead, XmlWrite, Clone)]
22#[cfg_attr(test, derive(PartialEq))]
23#[xml(tag = "w:commentRangeEnd")]
24pub struct CommentRangeEnd<'a> {
25    /// Specifies a unique identifier for the comment.
26    #[xml(attr = "w:id")]
27    pub id: Cow<'a, str>,
28}
29
30impl<'a> CommentRangeEnd<'a> {
31    __setter!(id: Cow<'a, str>);
32}
33
34// __xml_test_suites!(
35//     BookmarkEnd,
36//     BookmarkEnd::default(),
37//     r#"<w:bookmarkEnd/>"#,
38//     BookmarkEnd::default().id("id"),
39//     r#"<w:bookmarkEnd w:id="id"/>"#,
40// );