docx_reader/documents/elements/delete_text.rs
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq)]
#[serde(rename_all = "camelCase")]
pub struct DeleteText {
text: String,
preserve_space: bool,
}
impl DeleteText {
pub fn new(text: impl Into<String>) -> DeleteText {
DeleteText {
text: text.into(),
preserve_space: true,
}
}
pub(crate) fn without_escape(text: impl Into<String>) -> DeleteText {
DeleteText {
text: text.into(),
preserve_space: true,
}
}
}