docx_reader/documents/elements/
run_fonts.rsuse serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Default)]
#[serde(rename_all = "camelCase")]
pub struct RunFonts {
#[serde(skip_serializing_if = "Option::is_none")]
ascii: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
hi_ansi: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
east_asia: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
cs: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
ascii_theme: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
hi_ansi_theme: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
east_asia_theme: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
cs_theme: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
hint: Option<String>,
}
impl RunFonts {
pub fn new() -> RunFonts {
Default::default()
}
pub fn ascii(mut self, f: impl Into<String>) -> Self {
self.ascii = Some(f.into());
self
}
pub fn hi_ansi(mut self, f: impl Into<String>) -> Self {
self.hi_ansi = Some(f.into());
self
}
pub fn east_asia(mut self, f: impl Into<String>) -> Self {
self.east_asia = Some(f.into());
self
}
pub fn cs(mut self, f: impl Into<String>) -> Self {
self.cs = Some(f.into());
self
}
pub fn ascii_theme(mut self, f: impl Into<String>) -> Self {
self.ascii_theme = Some(f.into());
self
}
pub fn hi_ansi_theme(mut self, f: impl Into<String>) -> Self {
self.hi_ansi_theme = Some(f.into());
self
}
pub fn east_asia_theme(mut self, f: impl Into<String>) -> Self {
self.east_asia_theme = Some(f.into());
self
}
pub fn cs_theme(mut self, f: impl Into<String>) -> Self {
self.cs_theme = Some(f.into());
self
}
pub fn hint(mut self, f: impl Into<String>) -> Self {
self.hint = Some(f.into());
self
}
}