charming_fork_zephyr/component/axis3d.rs
1use serde::Serialize;
2
3use crate::element::AxisType;
4
5#[derive(Serialize)]
6#[serde(rename_all = "camelCase")]
7pub struct Axis3D {
8 #[serde(skip_serializing_if = "Option::is_none")]
9 type_: Option<AxisType>,
10}
11
12impl Axis3D {
13 pub fn new() -> Self {
14 Self { type_: None }
15 }
16
17 pub fn type_<A: Into<AxisType>>(mut self, type_: A) -> Self {
18 self.type_ = Some(type_.into());
19 self
20 }
21}