umya_spreadsheet/structs/drawing/
shape_guide.rs

1// a:gd
2use crate::writer::driver::*;
3use quick_xml::Writer;
4use std::io::Cursor;
5
6#[derive(Clone, Default, Debug)]
7pub struct ShapeGuide {
8    name: Box<str>,
9    fmla: Box<str>,
10}
11impl ShapeGuide {
12    #[inline]
13    pub fn get_name(&self) -> &str {
14        &self.name
15    }
16
17    #[inline]
18    pub fn set_name<S: Into<String>>(&mut self, value: S) {
19        self.name = value.into().into_boxed_str();
20    }
21
22    #[inline]
23    pub fn get_fmla(&self) -> &str {
24        &self.fmla
25    }
26
27    #[inline]
28    pub fn set_fmla<S: Into<String>>(&mut self, value: S) {
29        self.fmla = value.into().into_boxed_str();
30    }
31
32    pub(crate) fn write_to(&self, writer: &mut Writer<Cursor<Vec<u8>>>) {
33        write_start_tag(
34            writer,
35            "a:gd",
36            vec![("name", &self.name), ("fmla", &self.fmla)],
37            true,
38        );
39    }
40}