docx_rust/font_table/charset.rs
1use hard_xml::{XmlRead, XmlWrite};
2use std::borrow::Cow;
3
4#[derive(Debug, Default, XmlRead, XmlWrite, Clone)]
5#[cfg_attr(test, derive(PartialEq))]
6#[xml(tag = "w:charset")]
7pub struct Charset<'a> {
8 #[xml(attr = "w:val")]
9 pub value: Cow<'a, str>,
10}
11
12impl<'a, S: Into<Cow<'a, str>>> From<S> for Charset<'a> {
13 fn from(s: S) -> Self {
14 Charset { value: s.into() }
15 }
16}