1pub mod error {
3 pub struct ConversionError(::std::borrow::Cow<'static, str>);
5 impl ::std::error::Error for ConversionError {}
6 impl ::std::fmt::Display for ConversionError {
7 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
8 ::std::fmt::Display::fmt(&self.0, f)
9 }
10 }
11 impl ::std::fmt::Debug for ConversionError {
12 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> Result<(), ::std::fmt::Error> {
13 ::std::fmt::Debug::fmt(&self.0, f)
14 }
15 }
16 impl From<&'static str> for ConversionError {
17 fn from(value: &'static str) -> Self {
18 Self(value.into())
19 }
20 }
21 impl From<String> for ConversionError {
22 fn from(value: String) -> Self {
23 Self(value.into())
24 }
25 }
26}
27#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
99#[serde(deny_unknown_fields)]
100pub struct ArcThreePointOperation {
101 pub end_x: crate::JavaScriptSafeInteger,
102 pub end_y: crate::JavaScriptSafeInteger,
103 pub fill: PlotterFill,
104 #[serde(
105 default,
106 deserialize_with = "crate::deserialize_present_nonnull",
107 skip_serializing_if = "::std::option::Option::is_none"
108 )]
109 pub fill_color: ::std::option::Option<::std::string::String>,
110 pub index: u32,
111 #[serde(deserialize_with = "crate::deserialize_arc_three_point_kind")]
112 pub kind: ::std::string::String,
113 #[serde(
114 default,
115 deserialize_with = "crate::deserialize_present_nonnull",
116 skip_serializing_if = "::std::option::Option::is_none"
117 )]
118 pub layer: ::std::option::Option<::std::string::String>,
119 #[serde(
120 default,
121 deserialize_with = "crate::deserialize_present_nonnull",
122 skip_serializing_if = "::std::option::Option::is_none"
123 )]
124 pub line_style: ::std::option::Option<PlotterLineStyle>,
125 pub mid_x: crate::JavaScriptSafeInteger,
126 pub mid_y: crate::JavaScriptSafeInteger,
127 pub start_x: crate::JavaScriptSafeInteger,
128 pub start_y: crate::JavaScriptSafeInteger,
129 #[serde(
130 default,
131 deserialize_with = "crate::deserialize_present_nonnull",
132 skip_serializing_if = "::std::option::Option::is_none"
133 )]
134 pub stroke_color: ::std::option::Option<::std::string::String>,
135 pub width_nm: crate::JavaScriptSafeInteger,
136}
137#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
214#[serde(deny_unknown_fields)]
215pub struct BezierCurveOperation {
216 pub ctrl1_x: crate::JavaScriptSafeInteger,
217 pub ctrl1_y: crate::JavaScriptSafeInteger,
218 pub ctrl2_x: crate::JavaScriptSafeInteger,
219 pub ctrl2_y: crate::JavaScriptSafeInteger,
220 pub end_x: crate::JavaScriptSafeInteger,
221 pub end_y: crate::JavaScriptSafeInteger,
222 pub index: u32,
223 #[serde(deserialize_with = "crate::deserialize_bezier_curve_kind")]
224 pub kind: ::std::string::String,
225 #[serde(
226 default,
227 deserialize_with = "crate::deserialize_present_nonnull",
228 skip_serializing_if = "::std::option::Option::is_none"
229 )]
230 pub layer: ::std::option::Option<::std::string::String>,
231 #[serde(
232 default,
233 deserialize_with = "crate::deserialize_present_nonnull",
234 skip_serializing_if = "::std::option::Option::is_none"
235 )]
236 pub line_style: ::std::option::Option<PlotterLineStyle>,
237 pub start_x: crate::JavaScriptSafeInteger,
238 pub start_y: crate::JavaScriptSafeInteger,
239 #[serde(
240 default,
241 deserialize_with = "crate::deserialize_present_nonnull",
242 skip_serializing_if = "::std::option::Option::is_none"
243 )]
244 pub stroke_color: ::std::option::Option<::std::string::String>,
245 pub tolerance_nm: crate::JavaScriptSafeInteger,
246 pub width_nm: crate::JavaScriptSafeInteger,
247}
248#[derive(
267 ::serde::Deserialize,
268 ::serde::Serialize,
269 Clone,
270 Copy,
271 Debug,
272 Eq,
273 Hash,
274 Ord,
275 PartialEq,
276 PartialOrd,
277)]
278pub enum BoardDimensionType {
279 #[serde(rename = "aligned")]
280 Aligned,
281 #[serde(rename = "orthogonal")]
282 Orthogonal,
283 #[serde(rename = "radial")]
284 Radial,
285 #[serde(rename = "leader")]
286 Leader,
287 #[serde(rename = "center")]
288 Center,
289}
290impl ::std::fmt::Display for BoardDimensionType {
291 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
292 match *self {
293 Self::Aligned => f.write_str("aligned"),
294 Self::Orthogonal => f.write_str("orthogonal"),
295 Self::Radial => f.write_str("radial"),
296 Self::Leader => f.write_str("leader"),
297 Self::Center => f.write_str("center"),
298 }
299 }
300}
301impl ::std::str::FromStr for BoardDimensionType {
302 type Err = self::error::ConversionError;
303 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
304 match value {
305 "aligned" => Ok(Self::Aligned),
306 "orthogonal" => Ok(Self::Orthogonal),
307 "radial" => Ok(Self::Radial),
308 "leader" => Ok(Self::Leader),
309 "center" => Ok(Self::Center),
310 _ => Err("invalid value".into()),
311 }
312 }
313}
314impl ::std::convert::TryFrom<&str> for BoardDimensionType {
315 type Error = self::error::ConversionError;
316 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
317 value.parse()
318 }
319}
320impl ::std::convert::TryFrom<&::std::string::String> for BoardDimensionType {
321 type Error = self::error::ConversionError;
322 fn try_from(
323 value: &::std::string::String,
324 ) -> ::std::result::Result<Self, self::error::ConversionError> {
325 value.parse()
326 }
327}
328impl ::std::convert::TryFrom<::std::string::String> for BoardDimensionType {
329 type Error = self::error::ConversionError;
330 fn try_from(
331 value: ::std::string::String,
332 ) -> ::std::result::Result<Self, self::error::ConversionError> {
333 value.parse()
334 }
335}
336#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
422#[serde(deny_unknown_fields)]
423pub struct BoardFootprintArcThreePointOperation {
424 #[serde(
425 default,
426 deserialize_with = "crate::deserialize_present_nonnull",
427 skip_serializing_if = "::std::option::Option::is_none"
428 )]
429 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
430 #[serde(
431 default,
432 deserialize_with = "crate::deserialize_present_nonnull",
433 skip_serializing_if = "::std::option::Option::is_none"
434 )]
435 pub data_uuid: ::std::option::Option<::std::string::String>,
436 pub end_x: crate::JavaScriptSafeInteger,
437 pub end_y: crate::JavaScriptSafeInteger,
438 #[serde(
439 default,
440 deserialize_with = "crate::deserialize_present_nonnull",
441 skip_serializing_if = "::std::option::Option::is_none"
442 )]
443 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
444 pub fill: PlotterFill,
445 #[serde(
446 default,
447 deserialize_with = "crate::deserialize_present_nonnull",
448 skip_serializing_if = "::std::option::Option::is_none"
449 )]
450 pub fill_color: ::std::option::Option<::std::string::String>,
451 pub index: u32,
452 #[serde(deserialize_with = "crate::deserialize_arc_three_point_kind")]
453 pub kind: ::std::string::String,
454 #[serde(
455 default,
456 deserialize_with = "crate::deserialize_present_nonnull",
457 skip_serializing_if = "::std::option::Option::is_none"
458 )]
459 pub label: ::std::option::Option<::std::string::String>,
460 #[serde(
461 default,
462 deserialize_with = "crate::deserialize_present_nonnull",
463 skip_serializing_if = "::std::option::Option::is_none"
464 )]
465 pub layer: ::std::option::Option<::std::string::String>,
466 #[serde(
467 default,
468 deserialize_with = "crate::deserialize_present_nonnull",
469 skip_serializing_if = "::std::option::Option::is_none"
470 )]
471 pub line_style: ::std::option::Option<PlotterLineStyle>,
472 pub mid_x: crate::JavaScriptSafeInteger,
473 pub mid_y: crate::JavaScriptSafeInteger,
474 #[serde(
475 default,
476 deserialize_with = "crate::deserialize_present_nonnull",
477 skip_serializing_if = "::std::option::Option::is_none"
478 )]
479 pub object_id: ::std::option::Option<::std::string::String>,
480 pub start_x: crate::JavaScriptSafeInteger,
481 pub start_y: crate::JavaScriptSafeInteger,
482 #[serde(
483 default,
484 deserialize_with = "crate::deserialize_present_nonnull",
485 skip_serializing_if = "::std::option::Option::is_none"
486 )]
487 pub stroke_color: ::std::option::Option<::std::string::String>,
488 pub width_nm: crate::JavaScriptSafeInteger,
489}
490#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
581#[serde(deny_unknown_fields)]
582pub struct BoardFootprintBezierCurveOperation {
583 pub ctrl1_x: crate::JavaScriptSafeInteger,
584 pub ctrl1_y: crate::JavaScriptSafeInteger,
585 pub ctrl2_x: crate::JavaScriptSafeInteger,
586 pub ctrl2_y: crate::JavaScriptSafeInteger,
587 #[serde(
588 default,
589 deserialize_with = "crate::deserialize_present_nonnull",
590 skip_serializing_if = "::std::option::Option::is_none"
591 )]
592 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
593 #[serde(
594 default,
595 deserialize_with = "crate::deserialize_present_nonnull",
596 skip_serializing_if = "::std::option::Option::is_none"
597 )]
598 pub data_uuid: ::std::option::Option<::std::string::String>,
599 pub end_x: crate::JavaScriptSafeInteger,
600 pub end_y: crate::JavaScriptSafeInteger,
601 #[serde(
602 default,
603 deserialize_with = "crate::deserialize_present_nonnull",
604 skip_serializing_if = "::std::option::Option::is_none"
605 )]
606 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
607 pub index: u32,
608 #[serde(deserialize_with = "crate::deserialize_bezier_curve_kind")]
609 pub kind: ::std::string::String,
610 #[serde(
611 default,
612 deserialize_with = "crate::deserialize_present_nonnull",
613 skip_serializing_if = "::std::option::Option::is_none"
614 )]
615 pub label: ::std::option::Option<::std::string::String>,
616 #[serde(
617 default,
618 deserialize_with = "crate::deserialize_present_nonnull",
619 skip_serializing_if = "::std::option::Option::is_none"
620 )]
621 pub layer: ::std::option::Option<::std::string::String>,
622 #[serde(
623 default,
624 deserialize_with = "crate::deserialize_present_nonnull",
625 skip_serializing_if = "::std::option::Option::is_none"
626 )]
627 pub line_style: ::std::option::Option<PlotterLineStyle>,
628 #[serde(
629 default,
630 deserialize_with = "crate::deserialize_present_nonnull",
631 skip_serializing_if = "::std::option::Option::is_none"
632 )]
633 pub object_id: ::std::option::Option<::std::string::String>,
634 pub start_x: crate::JavaScriptSafeInteger,
635 pub start_y: crate::JavaScriptSafeInteger,
636 #[serde(
637 default,
638 deserialize_with = "crate::deserialize_present_nonnull",
639 skip_serializing_if = "::std::option::Option::is_none"
640 )]
641 pub stroke_color: ::std::option::Option<::std::string::String>,
642 pub tolerance_nm: crate::JavaScriptSafeInteger,
643 pub width_nm: crate::JavaScriptSafeInteger,
644}
645#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
766#[serde(deny_unknown_fields)]
767pub struct BoardFootprintChildAttrs {
768 pub component: ::std::string::String,
769 pub component_uid: ::std::string::String,
770 pub component_uuid: ::std::string::String,
771 pub footprint: ::std::string::String,
772 #[serde(
773 default,
774 deserialize_with = "crate::deserialize_present_nonnull",
775 skip_serializing_if = "::std::option::Option::is_none"
776 )]
777 pub footprint_graphic_kind: ::std::option::Option<BoardFootprintChildAttrsFootprintGraphicKind>,
778 pub footprint_object_index: u32,
779 pub footprint_primitive: BoardFootprintChildRef,
780 #[serde(
781 default,
782 deserialize_with = "crate::deserialize_present_nonnull",
783 skip_serializing_if = "::std::option::Option::is_none"
784 )]
785 pub footprint_subop_index: ::std::option::Option<u32>,
786 #[serde(
787 default,
788 deserialize_with = "crate::deserialize_present_nonnull",
789 skip_serializing_if = "::std::option::Option::is_none"
790 )]
791 pub footprint_text_role: ::std::option::Option<BoardFootprintChildAttrsFootprintTextRole>,
792 #[serde(
793 default,
794 deserialize_with = "crate::deserialize_present_nonnull",
795 skip_serializing_if = "::std::option::Option::is_none"
796 )]
797 pub fp_text_type: ::std::option::Option<::std::string::String>,
798 #[serde(
799 default,
800 deserialize_with = "crate::deserialize_present_nonnull",
801 skip_serializing_if = "::std::option::Option::is_none"
802 )]
803 pub layer_name: ::std::option::Option<::std::string::String>,
804 #[serde(
805 default,
806 deserialize_with = "crate::deserialize_present_nonnull",
807 skip_serializing_if = "::std::option::Option::is_none"
808 )]
809 pub layer_role: ::std::option::Option<BoardFootprintLayerRole>,
810 pub primitive: BoardFootprintChildAttrsPrimitive,
811 #[serde(
812 default,
813 deserialize_with = "crate::deserialize_present_nonnull",
814 skip_serializing_if = "::std::option::Option::is_none"
815 )]
816 pub property_name: ::std::option::Option<::std::string::String>,
817}
818#[derive(
854 ::serde::Deserialize,
855 ::serde::Serialize,
856 Clone,
857 Copy,
858 Debug,
859 Eq,
860 Hash,
861 Ord,
862 PartialEq,
863 PartialOrd,
864)]
865pub enum BoardFootprintChildAttrsFootprintGraphicKind {
866 #[serde(rename = "text-box-border")]
867 TextBoxBorder,
868 #[serde(rename = "line")]
869 Line,
870 #[serde(rename = "arc")]
871 Arc,
872 #[serde(rename = "circle")]
873 Circle,
874 #[serde(rename = "rect")]
875 Rect,
876 #[serde(rename = "poly")]
877 Poly,
878}
879impl ::std::fmt::Display for BoardFootprintChildAttrsFootprintGraphicKind {
880 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
881 match *self {
882 Self::TextBoxBorder => f.write_str("text-box-border"),
883 Self::Line => f.write_str("line"),
884 Self::Arc => f.write_str("arc"),
885 Self::Circle => f.write_str("circle"),
886 Self::Rect => f.write_str("rect"),
887 Self::Poly => f.write_str("poly"),
888 }
889 }
890}
891impl ::std::str::FromStr for BoardFootprintChildAttrsFootprintGraphicKind {
892 type Err = self::error::ConversionError;
893 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
894 match value {
895 "text-box-border" => Ok(Self::TextBoxBorder),
896 "line" => Ok(Self::Line),
897 "arc" => Ok(Self::Arc),
898 "circle" => Ok(Self::Circle),
899 "rect" => Ok(Self::Rect),
900 "poly" => Ok(Self::Poly),
901 _ => Err("invalid value".into()),
902 }
903 }
904}
905impl ::std::convert::TryFrom<&str> for BoardFootprintChildAttrsFootprintGraphicKind {
906 type Error = self::error::ConversionError;
907 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
908 value.parse()
909 }
910}
911impl ::std::convert::TryFrom<&::std::string::String>
912 for BoardFootprintChildAttrsFootprintGraphicKind
913{
914 type Error = self::error::ConversionError;
915 fn try_from(
916 value: &::std::string::String,
917 ) -> ::std::result::Result<Self, self::error::ConversionError> {
918 value.parse()
919 }
920}
921impl ::std::convert::TryFrom<::std::string::String>
922 for BoardFootprintChildAttrsFootprintGraphicKind
923{
924 type Error = self::error::ConversionError;
925 fn try_from(
926 value: ::std::string::String,
927 ) -> ::std::result::Result<Self, self::error::ConversionError> {
928 value.parse()
929 }
930}
931#[derive(
959 ::serde::Deserialize,
960 ::serde::Serialize,
961 Clone,
962 Copy,
963 Debug,
964 Eq,
965 Hash,
966 Ord,
967 PartialEq,
968 PartialOrd,
969)]
970pub enum BoardFootprintChildAttrsFootprintTextRole {
971 #[serde(rename = "designator")]
972 Designator,
973 #[serde(rename = "value")]
974 Value,
975 #[serde(rename = "property")]
976 Property,
977 #[serde(rename = "user")]
978 User,
979}
980impl ::std::fmt::Display for BoardFootprintChildAttrsFootprintTextRole {
981 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
982 match *self {
983 Self::Designator => f.write_str("designator"),
984 Self::Value => f.write_str("value"),
985 Self::Property => f.write_str("property"),
986 Self::User => f.write_str("user"),
987 }
988 }
989}
990impl ::std::str::FromStr for BoardFootprintChildAttrsFootprintTextRole {
991 type Err = self::error::ConversionError;
992 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
993 match value {
994 "designator" => Ok(Self::Designator),
995 "value" => Ok(Self::Value),
996 "property" => Ok(Self::Property),
997 "user" => Ok(Self::User),
998 _ => Err("invalid value".into()),
999 }
1000 }
1001}
1002impl ::std::convert::TryFrom<&str> for BoardFootprintChildAttrsFootprintTextRole {
1003 type Error = self::error::ConversionError;
1004 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1005 value.parse()
1006 }
1007}
1008impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintChildAttrsFootprintTextRole {
1009 type Error = self::error::ConversionError;
1010 fn try_from(
1011 value: &::std::string::String,
1012 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1013 value.parse()
1014 }
1015}
1016impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintChildAttrsFootprintTextRole {
1017 type Error = self::error::ConversionError;
1018 fn try_from(
1019 value: ::std::string::String,
1020 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1021 value.parse()
1022 }
1023}
1024#[derive(
1044 ::serde::Deserialize,
1045 ::serde::Serialize,
1046 Clone,
1047 Copy,
1048 Debug,
1049 Eq,
1050 Hash,
1051 Ord,
1052 PartialEq,
1053 PartialOrd,
1054)]
1055pub enum BoardFootprintChildAttrsPrimitive {
1056 #[serde(rename = "footprint-text")]
1057 FootprintText,
1058 #[serde(rename = "footprint-graphic")]
1059 FootprintGraphic,
1060}
1061impl ::std::fmt::Display for BoardFootprintChildAttrsPrimitive {
1062 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1063 match *self {
1064 Self::FootprintText => f.write_str("footprint-text"),
1065 Self::FootprintGraphic => f.write_str("footprint-graphic"),
1066 }
1067 }
1068}
1069impl ::std::str::FromStr for BoardFootprintChildAttrsPrimitive {
1070 type Err = self::error::ConversionError;
1071 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1072 match value {
1073 "footprint-text" => Ok(Self::FootprintText),
1074 "footprint-graphic" => Ok(Self::FootprintGraphic),
1075 _ => Err("invalid value".into()),
1076 }
1077 }
1078}
1079impl ::std::convert::TryFrom<&str> for BoardFootprintChildAttrsPrimitive {
1080 type Error = self::error::ConversionError;
1081 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1082 value.parse()
1083 }
1084}
1085impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintChildAttrsPrimitive {
1086 type Error = self::error::ConversionError;
1087 fn try_from(
1088 value: &::std::string::String,
1089 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1090 value.parse()
1091 }
1092}
1093impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintChildAttrsPrimitive {
1094 type Error = self::error::ConversionError;
1095 fn try_from(
1096 value: ::std::string::String,
1097 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1098 value.parse()
1099 }
1100}
1101#[derive(
1123 ::serde::Deserialize,
1124 ::serde::Serialize,
1125 Clone,
1126 Copy,
1127 Debug,
1128 Eq,
1129 Hash,
1130 Ord,
1131 PartialEq,
1132 PartialOrd,
1133)]
1134pub enum BoardFootprintChildRef {
1135 #[serde(rename = "property")]
1136 Property,
1137 #[serde(rename = "fp_text")]
1138 FpText,
1139 #[serde(rename = "fp_text_box")]
1140 FpTextBox,
1141 #[serde(rename = "fp_line")]
1142 FpLine,
1143 #[serde(rename = "fp_arc")]
1144 FpArc,
1145 #[serde(rename = "fp_circle")]
1146 FpCircle,
1147 #[serde(rename = "fp_rect")]
1148 FpRect,
1149 #[serde(rename = "fp_poly")]
1150 FpPoly,
1151}
1152impl ::std::fmt::Display for BoardFootprintChildRef {
1153 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1154 match *self {
1155 Self::Property => f.write_str("property"),
1156 Self::FpText => f.write_str("fp_text"),
1157 Self::FpTextBox => f.write_str("fp_text_box"),
1158 Self::FpLine => f.write_str("fp_line"),
1159 Self::FpArc => f.write_str("fp_arc"),
1160 Self::FpCircle => f.write_str("fp_circle"),
1161 Self::FpRect => f.write_str("fp_rect"),
1162 Self::FpPoly => f.write_str("fp_poly"),
1163 }
1164 }
1165}
1166impl ::std::str::FromStr for BoardFootprintChildRef {
1167 type Err = self::error::ConversionError;
1168 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1169 match value {
1170 "property" => Ok(Self::Property),
1171 "fp_text" => Ok(Self::FpText),
1172 "fp_text_box" => Ok(Self::FpTextBox),
1173 "fp_line" => Ok(Self::FpLine),
1174 "fp_arc" => Ok(Self::FpArc),
1175 "fp_circle" => Ok(Self::FpCircle),
1176 "fp_rect" => Ok(Self::FpRect),
1177 "fp_poly" => Ok(Self::FpPoly),
1178 _ => Err("invalid value".into()),
1179 }
1180 }
1181}
1182impl ::std::convert::TryFrom<&str> for BoardFootprintChildRef {
1183 type Error = self::error::ConversionError;
1184 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1185 value.parse()
1186 }
1187}
1188impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintChildRef {
1189 type Error = self::error::ConversionError;
1190 fn try_from(
1191 value: &::std::string::String,
1192 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1193 value.parse()
1194 }
1195}
1196impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintChildRef {
1197 type Error = self::error::ConversionError;
1198 fn try_from(
1199 value: ::std::string::String,
1200 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1201 value.parse()
1202 }
1203}
1204#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1296#[serde(deny_unknown_fields)]
1297pub struct BoardFootprintCircleOperation {
1298 pub cx: crate::JavaScriptSafeInteger,
1299 pub cy: crate::JavaScriptSafeInteger,
1300 #[serde(
1301 default,
1302 deserialize_with = "crate::deserialize_present_nonnull",
1303 skip_serializing_if = "::std::option::Option::is_none"
1304 )]
1305 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
1306 #[serde(
1307 default,
1308 deserialize_with = "crate::deserialize_present_nonnull",
1309 skip_serializing_if = "::std::option::Option::is_none"
1310 )]
1311 pub data_uuid: ::std::option::Option<::std::string::String>,
1312 pub diameter_nm: crate::JavaScriptSafeInteger,
1313 #[serde(
1314 default,
1315 deserialize_with = "crate::deserialize_present_nonnull",
1316 skip_serializing_if = "::std::option::Option::is_none"
1317 )]
1318 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
1319 pub fill: PlotterFill,
1320 #[serde(
1321 default,
1322 deserialize_with = "crate::deserialize_present_nonnull",
1323 skip_serializing_if = "::std::option::Option::is_none"
1324 )]
1325 pub fill_color: ::std::option::Option<::std::string::String>,
1326 pub index: u32,
1327 #[serde(deserialize_with = "crate::deserialize_circle_kind")]
1328 pub kind: ::std::string::String,
1329 #[serde(
1330 default,
1331 deserialize_with = "crate::deserialize_present_nonnull",
1332 skip_serializing_if = "::std::option::Option::is_none"
1333 )]
1334 pub label: ::std::option::Option<::std::string::String>,
1335 #[serde(
1336 default,
1337 deserialize_with = "crate::deserialize_present_nonnull",
1338 skip_serializing_if = "::std::option::Option::is_none"
1339 )]
1340 pub layer: ::std::option::Option<::std::string::String>,
1341 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1342 pub layers: ::std::vec::Vec<::std::string::String>,
1343 #[serde(
1344 default,
1345 deserialize_with = "crate::deserialize_present_nonnull",
1346 skip_serializing_if = "::std::option::Option::is_none"
1347 )]
1348 pub line_style: ::std::option::Option<PlotterLineStyle>,
1349 #[serde(
1350 default,
1351 deserialize_with = "crate::deserialize_present_nonnull",
1352 skip_serializing_if = "::std::option::Option::is_none"
1353 )]
1354 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
1355 #[serde(
1356 default,
1357 deserialize_with = "crate::deserialize_present_nonnull",
1358 skip_serializing_if = "::std::option::Option::is_none"
1359 )]
1360 pub object_id: ::std::option::Option<::std::string::String>,
1361 #[serde(
1362 default,
1363 deserialize_with = "crate::deserialize_present_nonnull",
1364 skip_serializing_if = "::std::option::Option::is_none"
1365 )]
1366 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
1367 #[serde(
1368 default,
1369 deserialize_with = "crate::deserialize_present_nonnull",
1370 skip_serializing_if = "::std::option::Option::is_none"
1371 )]
1372 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
1373 #[serde(
1374 default,
1375 deserialize_with = "crate::deserialize_present_nonnull",
1376 skip_serializing_if = "::std::option::Option::is_none"
1377 )]
1378 pub role: ::std::option::Option<PlotterDrillRole>,
1379 #[serde(
1380 default,
1381 deserialize_with = "crate::deserialize_present_nonnull",
1382 skip_serializing_if = "::std::option::Option::is_none"
1383 )]
1384 pub stroke_color: ::std::option::Option<::std::string::String>,
1385 pub width_nm: crate::JavaScriptSafeInteger,
1386}
1387#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1415#[serde(deny_unknown_fields)]
1416pub struct BoardFootprintEndBlockOperation {
1417 pub index: u32,
1418 #[serde(deserialize_with = "crate::deserialize_end_block_kind")]
1419 pub kind: ::std::string::String,
1420}
1421#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1488#[serde(deny_unknown_fields)]
1489pub struct BoardFootprintFlashPadCircleOperation {
1490 #[serde(
1491 default,
1492 deserialize_with = "crate::deserialize_present_nonnull",
1493 skip_serializing_if = "::std::option::Option::is_none"
1494 )]
1495 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
1496 #[serde(
1497 default,
1498 deserialize_with = "crate::deserialize_present_nonnull",
1499 skip_serializing_if = "::std::option::Option::is_none"
1500 )]
1501 pub data_uuid: ::std::option::Option<::std::string::String>,
1502 pub diameter_nm: crate::JavaScriptSafeInteger,
1503 #[serde(
1504 default,
1505 deserialize_with = "crate::deserialize_present_nonnull",
1506 skip_serializing_if = "::std::option::Option::is_none"
1507 )]
1508 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
1509 pub index: u32,
1510 #[serde(deserialize_with = "crate::deserialize_flash_pad_circle_kind")]
1511 pub kind: ::std::string::String,
1512 #[serde(
1513 default,
1514 deserialize_with = "crate::deserialize_present_nonnull",
1515 skip_serializing_if = "::std::option::Option::is_none"
1516 )]
1517 pub label: ::std::option::Option<::std::string::String>,
1518 pub layers: ::std::vec::Vec<::std::string::String>,
1519 #[serde(
1520 default,
1521 deserialize_with = "crate::deserialize_present_nonnull",
1522 skip_serializing_if = "::std::option::Option::is_none"
1523 )]
1524 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
1525 #[serde(
1526 default,
1527 deserialize_with = "crate::deserialize_present_nonnull",
1528 skip_serializing_if = "::std::option::Option::is_none"
1529 )]
1530 pub object_id: ::std::option::Option<::std::string::String>,
1531 #[serde(
1532 default,
1533 deserialize_with = "crate::deserialize_present_nonnull",
1534 skip_serializing_if = "::std::option::Option::is_none"
1535 )]
1536 pub role: ::std::option::Option<PlotterViaFlashRole>,
1537 pub x: crate::JavaScriptSafeInteger,
1538 pub y: crate::JavaScriptSafeInteger,
1539}
1540#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1632#[serde(deny_unknown_fields)]
1633pub struct BoardFootprintFlashPadCustomOperation {
1634 #[serde(
1635 default,
1636 deserialize_with = "crate::deserialize_present_nonnull",
1637 skip_serializing_if = "::std::option::Option::is_none"
1638 )]
1639 pub anchor_shape: ::std::option::Option<::std::string::String>,
1640 #[serde(
1641 default,
1642 deserialize_with = "crate::deserialize_present_nonnull",
1643 skip_serializing_if = "::std::option::Option::is_none"
1644 )]
1645 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
1646 #[serde(
1647 default,
1648 deserialize_with = "crate::deserialize_present_nonnull",
1649 skip_serializing_if = "::std::option::Option::is_none"
1650 )]
1651 pub data_uuid: ::std::option::Option<::std::string::String>,
1652 #[serde(
1653 default,
1654 deserialize_with = "crate::deserialize_present_nonnull",
1655 skip_serializing_if = "::std::option::Option::is_none"
1656 )]
1657 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
1658 pub index: u32,
1659 #[serde(deserialize_with = "crate::deserialize_flash_pad_custom_kind")]
1660 pub kind: ::std::string::String,
1661 #[serde(
1662 default,
1663 deserialize_with = "crate::deserialize_present_nonnull",
1664 skip_serializing_if = "::std::option::Option::is_none"
1665 )]
1666 pub label: ::std::option::Option<::std::string::String>,
1667 pub layers: ::std::vec::Vec<::std::string::String>,
1668 pub mask_margin_nm: crate::JavaScriptSafeInteger,
1669 #[serde(
1670 default,
1671 deserialize_with = "crate::deserialize_present_nonnull",
1672 skip_serializing_if = "::std::option::Option::is_none"
1673 )]
1674 pub object_id: ::std::option::Option<::std::string::String>,
1675 pub orient_deg: f64,
1676 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
1677 pub polygon_widths_nm: ::std::vec::Vec<crate::JavaScriptSafeInteger>,
1678 pub polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
1679 pub size_x_nm: crate::JavaScriptSafeInteger,
1680 pub size_y_nm: crate::JavaScriptSafeInteger,
1681 pub x: crate::JavaScriptSafeInteger,
1682 pub y: crate::JavaScriptSafeInteger,
1683}
1684#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1757#[serde(deny_unknown_fields)]
1758pub struct BoardFootprintFlashPadOvalOperation {
1759 #[serde(
1760 default,
1761 deserialize_with = "crate::deserialize_present_nonnull",
1762 skip_serializing_if = "::std::option::Option::is_none"
1763 )]
1764 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
1765 #[serde(
1766 default,
1767 deserialize_with = "crate::deserialize_present_nonnull",
1768 skip_serializing_if = "::std::option::Option::is_none"
1769 )]
1770 pub data_uuid: ::std::option::Option<::std::string::String>,
1771 #[serde(
1772 default,
1773 deserialize_with = "crate::deserialize_present_nonnull",
1774 skip_serializing_if = "::std::option::Option::is_none"
1775 )]
1776 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
1777 pub index: u32,
1778 #[serde(deserialize_with = "crate::deserialize_flash_pad_oval_kind")]
1779 pub kind: ::std::string::String,
1780 #[serde(
1781 default,
1782 deserialize_with = "crate::deserialize_present_nonnull",
1783 skip_serializing_if = "::std::option::Option::is_none"
1784 )]
1785 pub label: ::std::option::Option<::std::string::String>,
1786 pub layers: ::std::vec::Vec<::std::string::String>,
1787 pub mask_margin_nm: crate::JavaScriptSafeInteger,
1788 #[serde(
1789 default,
1790 deserialize_with = "crate::deserialize_present_nonnull",
1791 skip_serializing_if = "::std::option::Option::is_none"
1792 )]
1793 pub object_id: ::std::option::Option<::std::string::String>,
1794 pub orient_deg: f64,
1795 pub size_x_nm: crate::JavaScriptSafeInteger,
1796 pub size_y_nm: crate::JavaScriptSafeInteger,
1797 pub x: crate::JavaScriptSafeInteger,
1798 pub y: crate::JavaScriptSafeInteger,
1799}
1800#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1873#[serde(deny_unknown_fields)]
1874pub struct BoardFootprintFlashPadRectOperation {
1875 #[serde(
1876 default,
1877 deserialize_with = "crate::deserialize_present_nonnull",
1878 skip_serializing_if = "::std::option::Option::is_none"
1879 )]
1880 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
1881 #[serde(
1882 default,
1883 deserialize_with = "crate::deserialize_present_nonnull",
1884 skip_serializing_if = "::std::option::Option::is_none"
1885 )]
1886 pub data_uuid: ::std::option::Option<::std::string::String>,
1887 #[serde(
1888 default,
1889 deserialize_with = "crate::deserialize_present_nonnull",
1890 skip_serializing_if = "::std::option::Option::is_none"
1891 )]
1892 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
1893 pub index: u32,
1894 #[serde(deserialize_with = "crate::deserialize_flash_pad_rect_kind")]
1895 pub kind: ::std::string::String,
1896 #[serde(
1897 default,
1898 deserialize_with = "crate::deserialize_present_nonnull",
1899 skip_serializing_if = "::std::option::Option::is_none"
1900 )]
1901 pub label: ::std::option::Option<::std::string::String>,
1902 pub layers: ::std::vec::Vec<::std::string::String>,
1903 pub mask_margin_nm: crate::JavaScriptSafeInteger,
1904 #[serde(
1905 default,
1906 deserialize_with = "crate::deserialize_present_nonnull",
1907 skip_serializing_if = "::std::option::Option::is_none"
1908 )]
1909 pub object_id: ::std::option::Option<::std::string::String>,
1910 pub orient_deg: f64,
1911 pub size_x_nm: crate::JavaScriptSafeInteger,
1912 pub size_y_nm: crate::JavaScriptSafeInteger,
1913 pub x: crate::JavaScriptSafeInteger,
1914 pub y: crate::JavaScriptSafeInteger,
1915}
1916#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1993#[serde(deny_unknown_fields)]
1994pub struct BoardFootprintFlashPadRoundRectOperation {
1995 pub corner_radius_nm: crate::JavaScriptSafeInteger,
1996 #[serde(
1997 default,
1998 deserialize_with = "crate::deserialize_present_nonnull",
1999 skip_serializing_if = "::std::option::Option::is_none"
2000 )]
2001 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
2002 #[serde(
2003 default,
2004 deserialize_with = "crate::deserialize_present_nonnull",
2005 skip_serializing_if = "::std::option::Option::is_none"
2006 )]
2007 pub data_uuid: ::std::option::Option<::std::string::String>,
2008 #[serde(
2009 default,
2010 deserialize_with = "crate::deserialize_present_nonnull",
2011 skip_serializing_if = "::std::option::Option::is_none"
2012 )]
2013 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
2014 pub index: u32,
2015 #[serde(deserialize_with = "crate::deserialize_flash_pad_round_rect_kind")]
2016 pub kind: ::std::string::String,
2017 #[serde(
2018 default,
2019 deserialize_with = "crate::deserialize_present_nonnull",
2020 skip_serializing_if = "::std::option::Option::is_none"
2021 )]
2022 pub label: ::std::option::Option<::std::string::String>,
2023 pub layers: ::std::vec::Vec<::std::string::String>,
2024 pub mask_margin_nm: crate::JavaScriptSafeInteger,
2025 #[serde(
2026 default,
2027 deserialize_with = "crate::deserialize_present_nonnull",
2028 skip_serializing_if = "::std::option::Option::is_none"
2029 )]
2030 pub object_id: ::std::option::Option<::std::string::String>,
2031 pub orient_deg: f64,
2032 pub size_x_nm: crate::JavaScriptSafeInteger,
2033 pub size_y_nm: crate::JavaScriptSafeInteger,
2034 pub x: crate::JavaScriptSafeInteger,
2035 pub y: crate::JavaScriptSafeInteger,
2036}
2037#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2106#[serde(deny_unknown_fields)]
2107pub struct BoardFootprintFlashPadTrapezOperation {
2108 pub corners: PlotterQuad,
2109 #[serde(
2110 default,
2111 deserialize_with = "crate::deserialize_present_nonnull",
2112 skip_serializing_if = "::std::option::Option::is_none"
2113 )]
2114 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
2115 #[serde(
2116 default,
2117 deserialize_with = "crate::deserialize_present_nonnull",
2118 skip_serializing_if = "::std::option::Option::is_none"
2119 )]
2120 pub data_uuid: ::std::option::Option<::std::string::String>,
2121 #[serde(
2122 default,
2123 deserialize_with = "crate::deserialize_present_nonnull",
2124 skip_serializing_if = "::std::option::Option::is_none"
2125 )]
2126 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
2127 pub index: u32,
2128 #[serde(deserialize_with = "crate::deserialize_flash_pad_trapez_kind")]
2129 pub kind: ::std::string::String,
2130 #[serde(
2131 default,
2132 deserialize_with = "crate::deserialize_present_nonnull",
2133 skip_serializing_if = "::std::option::Option::is_none"
2134 )]
2135 pub label: ::std::option::Option<::std::string::String>,
2136 pub layers: ::std::vec::Vec<::std::string::String>,
2137 pub mask_margin_nm: crate::JavaScriptSafeInteger,
2138 #[serde(
2139 default,
2140 deserialize_with = "crate::deserialize_present_nonnull",
2141 skip_serializing_if = "::std::option::Option::is_none"
2142 )]
2143 pub object_id: ::std::option::Option<::std::string::String>,
2144 pub orient_deg: f64,
2145 pub x: crate::JavaScriptSafeInteger,
2146 pub y: crate::JavaScriptSafeInteger,
2147}
2148#[derive(
2172 ::serde::Deserialize,
2173 ::serde::Serialize,
2174 Clone,
2175 Copy,
2176 Debug,
2177 Eq,
2178 Hash,
2179 Ord,
2180 PartialEq,
2181 PartialOrd,
2182)]
2183pub enum BoardFootprintLayerRole {
2184 #[serde(rename = "copper")]
2185 Copper,
2186 #[serde(rename = "silkscreen")]
2187 Silkscreen,
2188 #[serde(rename = "soldermask")]
2189 Soldermask,
2190 #[serde(rename = "paste")]
2191 Paste,
2192 #[serde(rename = "fab")]
2193 Fab,
2194 #[serde(rename = "courtyard")]
2195 Courtyard,
2196 #[serde(rename = "board-outline")]
2197 BoardOutline,
2198 #[serde(rename = "drill")]
2199 Drill,
2200 #[serde(rename = "user")]
2201 User,
2202 #[serde(rename = "other")]
2203 Other,
2204}
2205impl ::std::fmt::Display for BoardFootprintLayerRole {
2206 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2207 match *self {
2208 Self::Copper => f.write_str("copper"),
2209 Self::Silkscreen => f.write_str("silkscreen"),
2210 Self::Soldermask => f.write_str("soldermask"),
2211 Self::Paste => f.write_str("paste"),
2212 Self::Fab => f.write_str("fab"),
2213 Self::Courtyard => f.write_str("courtyard"),
2214 Self::BoardOutline => f.write_str("board-outline"),
2215 Self::Drill => f.write_str("drill"),
2216 Self::User => f.write_str("user"),
2217 Self::Other => f.write_str("other"),
2218 }
2219 }
2220}
2221impl ::std::str::FromStr for BoardFootprintLayerRole {
2222 type Err = self::error::ConversionError;
2223 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2224 match value {
2225 "copper" => Ok(Self::Copper),
2226 "silkscreen" => Ok(Self::Silkscreen),
2227 "soldermask" => Ok(Self::Soldermask),
2228 "paste" => Ok(Self::Paste),
2229 "fab" => Ok(Self::Fab),
2230 "courtyard" => Ok(Self::Courtyard),
2231 "board-outline" => Ok(Self::BoardOutline),
2232 "drill" => Ok(Self::Drill),
2233 "user" => Ok(Self::User),
2234 "other" => Ok(Self::Other),
2235 _ => Err("invalid value".into()),
2236 }
2237 }
2238}
2239impl ::std::convert::TryFrom<&str> for BoardFootprintLayerRole {
2240 type Error = self::error::ConversionError;
2241 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2242 value.parse()
2243 }
2244}
2245impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintLayerRole {
2246 type Error = self::error::ConversionError;
2247 fn try_from(
2248 value: &::std::string::String,
2249 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2250 value.parse()
2251 }
2252}
2253impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintLayerRole {
2254 type Error = self::error::ConversionError;
2255 fn try_from(
2256 value: ::std::string::String,
2257 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2258 value.parse()
2259 }
2260}
2261#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2319#[serde(untagged)]
2320pub enum BoardFootprintOperation {
2321 ThickSegmentOperation(BoardFootprintThickSegmentOperation),
2322 ArcThreePointOperation(BoardFootprintArcThreePointOperation),
2323 CircleOperation(BoardFootprintCircleOperation),
2324 RectOperation(BoardFootprintRectOperation),
2325 PlotPolyOperation(BoardFootprintPlotPolyOperation),
2326 BezierCurveOperation(BoardFootprintBezierCurveOperation),
2327 TextOperation(BoardFootprintTextOperation),
2328 FlashPadCircleOperation(BoardFootprintFlashPadCircleOperation),
2329 FlashPadOvalOperation(BoardFootprintFlashPadOvalOperation),
2330 FlashPadRectOperation(BoardFootprintFlashPadRectOperation),
2331 FlashPadRoundRectOperation(BoardFootprintFlashPadRoundRectOperation),
2332 FlashPadCustomOperation(BoardFootprintFlashPadCustomOperation),
2333 FlashPadTrapezOperation(BoardFootprintFlashPadTrapezOperation),
2334 StartBlockOperation(BoardFootprintStartBlockOperation),
2335 EndBlockOperation(BoardFootprintEndBlockOperation),
2336}
2337impl ::std::convert::From<BoardFootprintThickSegmentOperation> for BoardFootprintOperation {
2338 fn from(value: BoardFootprintThickSegmentOperation) -> Self {
2339 Self::ThickSegmentOperation(value)
2340 }
2341}
2342impl ::std::convert::From<BoardFootprintArcThreePointOperation> for BoardFootprintOperation {
2343 fn from(value: BoardFootprintArcThreePointOperation) -> Self {
2344 Self::ArcThreePointOperation(value)
2345 }
2346}
2347impl ::std::convert::From<BoardFootprintCircleOperation> for BoardFootprintOperation {
2348 fn from(value: BoardFootprintCircleOperation) -> Self {
2349 Self::CircleOperation(value)
2350 }
2351}
2352impl ::std::convert::From<BoardFootprintRectOperation> for BoardFootprintOperation {
2353 fn from(value: BoardFootprintRectOperation) -> Self {
2354 Self::RectOperation(value)
2355 }
2356}
2357impl ::std::convert::From<BoardFootprintPlotPolyOperation> for BoardFootprintOperation {
2358 fn from(value: BoardFootprintPlotPolyOperation) -> Self {
2359 Self::PlotPolyOperation(value)
2360 }
2361}
2362impl ::std::convert::From<BoardFootprintBezierCurveOperation> for BoardFootprintOperation {
2363 fn from(value: BoardFootprintBezierCurveOperation) -> Self {
2364 Self::BezierCurveOperation(value)
2365 }
2366}
2367impl ::std::convert::From<BoardFootprintTextOperation> for BoardFootprintOperation {
2368 fn from(value: BoardFootprintTextOperation) -> Self {
2369 Self::TextOperation(value)
2370 }
2371}
2372impl ::std::convert::From<BoardFootprintFlashPadCircleOperation> for BoardFootprintOperation {
2373 fn from(value: BoardFootprintFlashPadCircleOperation) -> Self {
2374 Self::FlashPadCircleOperation(value)
2375 }
2376}
2377impl ::std::convert::From<BoardFootprintFlashPadOvalOperation> for BoardFootprintOperation {
2378 fn from(value: BoardFootprintFlashPadOvalOperation) -> Self {
2379 Self::FlashPadOvalOperation(value)
2380 }
2381}
2382impl ::std::convert::From<BoardFootprintFlashPadRectOperation> for BoardFootprintOperation {
2383 fn from(value: BoardFootprintFlashPadRectOperation) -> Self {
2384 Self::FlashPadRectOperation(value)
2385 }
2386}
2387impl ::std::convert::From<BoardFootprintFlashPadRoundRectOperation> for BoardFootprintOperation {
2388 fn from(value: BoardFootprintFlashPadRoundRectOperation) -> Self {
2389 Self::FlashPadRoundRectOperation(value)
2390 }
2391}
2392impl ::std::convert::From<BoardFootprintFlashPadCustomOperation> for BoardFootprintOperation {
2393 fn from(value: BoardFootprintFlashPadCustomOperation) -> Self {
2394 Self::FlashPadCustomOperation(value)
2395 }
2396}
2397impl ::std::convert::From<BoardFootprintFlashPadTrapezOperation> for BoardFootprintOperation {
2398 fn from(value: BoardFootprintFlashPadTrapezOperation) -> Self {
2399 Self::FlashPadTrapezOperation(value)
2400 }
2401}
2402impl ::std::convert::From<BoardFootprintStartBlockOperation> for BoardFootprintOperation {
2403 fn from(value: BoardFootprintStartBlockOperation) -> Self {
2404 Self::StartBlockOperation(value)
2405 }
2406}
2407impl ::std::convert::From<BoardFootprintEndBlockOperation> for BoardFootprintOperation {
2408 fn from(value: BoardFootprintEndBlockOperation) -> Self {
2409 Self::EndBlockOperation(value)
2410 }
2411}
2412#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2524#[serde(deny_unknown_fields)]
2525pub struct BoardFootprintPadBlockAttrs {
2526 #[serde(
2527 default,
2528 deserialize_with = "crate::deserialize_present_nonnull",
2529 skip_serializing_if = "::std::option::Option::is_none"
2530 )]
2531 pub component: ::std::option::Option<::std::string::String>,
2532 #[serde(
2533 default,
2534 deserialize_with = "crate::deserialize_present_nonnull",
2535 skip_serializing_if = "::std::option::Option::is_none"
2536 )]
2537 pub component_uid: ::std::option::Option<::std::string::String>,
2538 #[serde(
2539 default,
2540 deserialize_with = "crate::deserialize_present_nonnull",
2541 skip_serializing_if = "::std::option::Option::is_none"
2542 )]
2543 pub component_uuid: ::std::option::Option<::std::string::String>,
2544 #[serde(
2545 default,
2546 deserialize_with = "crate::deserialize_present_nonnull",
2547 skip_serializing_if = "::std::option::Option::is_none"
2548 )]
2549 pub footprint: ::std::option::Option<::std::string::String>,
2550 #[serde(
2551 default,
2552 deserialize_with = "crate::deserialize_present_nonnull",
2553 skip_serializing_if = "::std::option::Option::is_none"
2554 )]
2555 pub hole_diameter_mm: ::std::option::Option<::std::string::String>,
2556 #[serde(
2557 default,
2558 deserialize_with = "crate::deserialize_present_nonnull",
2559 skip_serializing_if = "::std::option::Option::is_none"
2560 )]
2561 pub hole_height_mm: ::std::option::Option<::std::string::String>,
2562 #[serde(
2563 default,
2564 deserialize_with = "crate::deserialize_present_nonnull",
2565 skip_serializing_if = "::std::option::Option::is_none"
2566 )]
2567 pub hole_kind: ::std::option::Option<BoardFootprintPadBlockAttrsHoleKind>,
2568 #[serde(
2569 default,
2570 deserialize_with = "crate::deserialize_present_nonnull",
2571 skip_serializing_if = "::std::option::Option::is_none"
2572 )]
2573 pub hole_owner: ::std::option::Option<::std::string::String>,
2574 #[serde(
2575 default,
2576 deserialize_with = "crate::deserialize_present_nonnull",
2577 skip_serializing_if = "::std::option::Option::is_none"
2578 )]
2579 pub hole_plating: ::std::option::Option<BoardFootprintPadBlockAttrsHolePlating>,
2580 #[serde(
2581 default,
2582 deserialize_with = "crate::deserialize_present_nonnull",
2583 skip_serializing_if = "::std::option::Option::is_none"
2584 )]
2585 pub hole_render: ::std::option::Option<::std::string::String>,
2586 #[serde(
2587 default,
2588 deserialize_with = "crate::deserialize_present_nonnull",
2589 skip_serializing_if = "::std::option::Option::is_none"
2590 )]
2591 pub hole_width_mm: ::std::option::Option<::std::string::String>,
2592 #[serde(
2593 default,
2594 deserialize_with = "crate::deserialize_present_nonnull",
2595 skip_serializing_if = "::std::option::Option::is_none"
2596 )]
2597 pub layer_names: ::std::option::Option<::std::string::String>,
2598 #[serde(
2599 default,
2600 deserialize_with = "crate::deserialize_present_nonnull",
2601 skip_serializing_if = "::std::option::Option::is_none"
2602 )]
2603 pub net: ::std::option::Option<::std::string::String>,
2604 #[serde(
2605 default,
2606 deserialize_with = "crate::deserialize_present_nonnull",
2607 skip_serializing_if = "::std::option::Option::is_none"
2608 )]
2609 pub net_class: ::std::option::Option<::std::string::String>,
2610 #[serde(
2611 default,
2612 deserialize_with = "crate::deserialize_present_nonnull",
2613 skip_serializing_if = "::std::option::Option::is_none"
2614 )]
2615 pub net_classes: ::std::option::Option<::std::string::String>,
2616 #[serde(
2617 default,
2618 deserialize_with = "crate::deserialize_present_nonnull",
2619 skip_serializing_if = "::std::option::Option::is_none"
2620 )]
2621 pub net_id: ::std::option::Option<::std::string::String>,
2622 #[serde(
2623 default,
2624 deserialize_with = "crate::deserialize_present_nonnull",
2625 skip_serializing_if = "::std::option::Option::is_none"
2626 )]
2627 pub net_index: ::std::option::Option<::std::string::String>,
2628 #[serde(
2629 default,
2630 deserialize_with = "crate::deserialize_present_nonnull",
2631 skip_serializing_if = "::std::option::Option::is_none"
2632 )]
2633 pub pad_designator: ::std::option::Option<::std::string::String>,
2634 #[serde(
2635 default,
2636 deserialize_with = "crate::deserialize_present_nonnull",
2637 skip_serializing_if = "::std::option::Option::is_none"
2638 )]
2639 pub pad_number: ::std::option::Option<::std::string::String>,
2640 #[serde(
2641 default,
2642 deserialize_with = "crate::deserialize_present_nonnull",
2643 skip_serializing_if = "::std::option::Option::is_none"
2644 )]
2645 pub pad_shape: ::std::option::Option<::std::string::String>,
2646 #[serde(
2647 default,
2648 deserialize_with = "crate::deserialize_present_nonnull",
2649 skip_serializing_if = "::std::option::Option::is_none"
2650 )]
2651 pub pad_type: ::std::option::Option<::std::string::String>,
2652 pub primitive: BoardFootprintPadBlockAttrsPrimitive,
2653}
2654#[derive(
2674 ::serde::Deserialize,
2675 ::serde::Serialize,
2676 Clone,
2677 Copy,
2678 Debug,
2679 Eq,
2680 Hash,
2681 Ord,
2682 PartialEq,
2683 PartialOrd,
2684)]
2685pub enum BoardFootprintPadBlockAttrsHoleKind {
2686 #[serde(rename = "round")]
2687 Round,
2688 #[serde(rename = "slot")]
2689 Slot,
2690}
2691impl ::std::fmt::Display for BoardFootprintPadBlockAttrsHoleKind {
2692 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2693 match *self {
2694 Self::Round => f.write_str("round"),
2695 Self::Slot => f.write_str("slot"),
2696 }
2697 }
2698}
2699impl ::std::str::FromStr for BoardFootprintPadBlockAttrsHoleKind {
2700 type Err = self::error::ConversionError;
2701 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2702 match value {
2703 "round" => Ok(Self::Round),
2704 "slot" => Ok(Self::Slot),
2705 _ => Err("invalid value".into()),
2706 }
2707 }
2708}
2709impl ::std::convert::TryFrom<&str> for BoardFootprintPadBlockAttrsHoleKind {
2710 type Error = self::error::ConversionError;
2711 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2712 value.parse()
2713 }
2714}
2715impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintPadBlockAttrsHoleKind {
2716 type Error = self::error::ConversionError;
2717 fn try_from(
2718 value: &::std::string::String,
2719 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2720 value.parse()
2721 }
2722}
2723impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintPadBlockAttrsHoleKind {
2724 type Error = self::error::ConversionError;
2725 fn try_from(
2726 value: ::std::string::String,
2727 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2728 value.parse()
2729 }
2730}
2731#[derive(
2751 ::serde::Deserialize,
2752 ::serde::Serialize,
2753 Clone,
2754 Copy,
2755 Debug,
2756 Eq,
2757 Hash,
2758 Ord,
2759 PartialEq,
2760 PartialOrd,
2761)]
2762pub enum BoardFootprintPadBlockAttrsHolePlating {
2763 #[serde(rename = "plated")]
2764 Plated,
2765 #[serde(rename = "non_plated")]
2766 NonPlated,
2767}
2768impl ::std::fmt::Display for BoardFootprintPadBlockAttrsHolePlating {
2769 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2770 match *self {
2771 Self::Plated => f.write_str("plated"),
2772 Self::NonPlated => f.write_str("non_plated"),
2773 }
2774 }
2775}
2776impl ::std::str::FromStr for BoardFootprintPadBlockAttrsHolePlating {
2777 type Err = self::error::ConversionError;
2778 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2779 match value {
2780 "plated" => Ok(Self::Plated),
2781 "non_plated" => Ok(Self::NonPlated),
2782 _ => Err("invalid value".into()),
2783 }
2784 }
2785}
2786impl ::std::convert::TryFrom<&str> for BoardFootprintPadBlockAttrsHolePlating {
2787 type Error = self::error::ConversionError;
2788 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2789 value.parse()
2790 }
2791}
2792impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintPadBlockAttrsHolePlating {
2793 type Error = self::error::ConversionError;
2794 fn try_from(
2795 value: &::std::string::String,
2796 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2797 value.parse()
2798 }
2799}
2800impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintPadBlockAttrsHolePlating {
2801 type Error = self::error::ConversionError;
2802 fn try_from(
2803 value: ::std::string::String,
2804 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2805 value.parse()
2806 }
2807}
2808#[derive(
2828 ::serde::Deserialize,
2829 ::serde::Serialize,
2830 Clone,
2831 Copy,
2832 Debug,
2833 Eq,
2834 Hash,
2835 Ord,
2836 PartialEq,
2837 PartialOrd,
2838)]
2839pub enum BoardFootprintPadBlockAttrsPrimitive {
2840 #[serde(rename = "pad")]
2841 Pad,
2842 #[serde(rename = "pad-hole")]
2843 PadHole,
2844}
2845impl ::std::fmt::Display for BoardFootprintPadBlockAttrsPrimitive {
2846 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2847 match *self {
2848 Self::Pad => f.write_str("pad"),
2849 Self::PadHole => f.write_str("pad-hole"),
2850 }
2851 }
2852}
2853impl ::std::str::FromStr for BoardFootprintPadBlockAttrsPrimitive {
2854 type Err = self::error::ConversionError;
2855 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2856 match value {
2857 "pad" => Ok(Self::Pad),
2858 "pad-hole" => Ok(Self::PadHole),
2859 _ => Err("invalid value".into()),
2860 }
2861 }
2862}
2863impl ::std::convert::TryFrom<&str> for BoardFootprintPadBlockAttrsPrimitive {
2864 type Error = self::error::ConversionError;
2865 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2866 value.parse()
2867 }
2868}
2869impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintPadBlockAttrsPrimitive {
2870 type Error = self::error::ConversionError;
2871 fn try_from(
2872 value: &::std::string::String,
2873 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2874 value.parse()
2875 }
2876}
2877impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintPadBlockAttrsPrimitive {
2878 type Error = self::error::ConversionError;
2879 fn try_from(
2880 value: ::std::string::String,
2881 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2882 value.parse()
2883 }
2884}
2885#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2914#[serde(deny_unknown_fields)]
2915pub struct BoardFootprintPlacement {
2916 pub angle_deg: f64,
2917 pub x_nm: crate::JavaScriptSafeInteger,
2918 pub y_nm: crate::JavaScriptSafeInteger,
2919}
2920#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2989#[serde(deny_unknown_fields)]
2990pub struct BoardFootprintPlotPolyOperation {
2991 #[serde(
2992 default,
2993 deserialize_with = "crate::deserialize_present_nonnull",
2994 skip_serializing_if = "::std::option::Option::is_none"
2995 )]
2996 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
2997 #[serde(
2998 default,
2999 deserialize_with = "crate::deserialize_present_nonnull",
3000 skip_serializing_if = "::std::option::Option::is_none"
3001 )]
3002 pub data_uuid: ::std::option::Option<::std::string::String>,
3003 #[serde(
3004 default,
3005 deserialize_with = "crate::deserialize_present_nonnull",
3006 skip_serializing_if = "::std::option::Option::is_none"
3007 )]
3008 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
3009 pub fill: PlotterFill,
3010 #[serde(
3011 default,
3012 deserialize_with = "crate::deserialize_present_nonnull",
3013 skip_serializing_if = "::std::option::Option::is_none"
3014 )]
3015 pub fill_color: ::std::option::Option<::std::string::String>,
3016 pub index: u32,
3017 #[serde(deserialize_with = "crate::deserialize_plot_poly_kind")]
3018 pub kind: ::std::string::String,
3019 #[serde(
3020 default,
3021 deserialize_with = "crate::deserialize_present_nonnull",
3022 skip_serializing_if = "::std::option::Option::is_none"
3023 )]
3024 pub label: ::std::option::Option<::std::string::String>,
3025 #[serde(
3026 default,
3027 deserialize_with = "crate::deserialize_present_nonnull",
3028 skip_serializing_if = "::std::option::Option::is_none"
3029 )]
3030 pub layer: ::std::option::Option<::std::string::String>,
3031 #[serde(
3032 default,
3033 deserialize_with = "crate::deserialize_present_nonnull",
3034 skip_serializing_if = "::std::option::Option::is_none"
3035 )]
3036 pub line_style: ::std::option::Option<PlotterLineStyle>,
3037 #[serde(
3038 default,
3039 deserialize_with = "crate::deserialize_present_nonnull",
3040 skip_serializing_if = "::std::option::Option::is_none"
3041 )]
3042 pub object_id: ::std::option::Option<::std::string::String>,
3043 pub points: ::std::vec::Vec<PlotterPoint>,
3044 #[serde(
3045 default,
3046 deserialize_with = "crate::deserialize_present_nonnull",
3047 skip_serializing_if = "::std::option::Option::is_none"
3048 )]
3049 pub stroke_color: ::std::option::Option<::std::string::String>,
3050 pub width_nm: crate::JavaScriptSafeInteger,
3051}
3052#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3134#[serde(deny_unknown_fields)]
3135pub struct BoardFootprintPlotRecord {
3136 pub attr: ::std::vec::Vec<::std::string::String>,
3137 pub descr: ::std::string::String,
3138 pub kind: ::std::string::String,
3139 pub layer: ::std::string::String,
3140 pub library_link: ::std::string::String,
3141 pub locked: bool,
3142 pub object_id: ::std::string::String,
3143 pub operation_count: u32,
3144 pub operations: ::std::vec::Vec<BoardFootprintOperation>,
3145 pub placement: BoardFootprintPlacement,
3146 pub reference: ::std::string::String,
3147 pub tags: ::std::string::String,
3148 pub uuid: ::std::string::String,
3149 pub value: ::std::string::String,
3150}
3151#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3233#[serde(deny_unknown_fields)]
3234pub struct BoardFootprintRectOperation {
3235 pub corner_radius_nm: crate::JavaScriptSafeInteger,
3236 #[serde(
3237 default,
3238 deserialize_with = "crate::deserialize_present_nonnull",
3239 skip_serializing_if = "::std::option::Option::is_none"
3240 )]
3241 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
3242 #[serde(
3243 default,
3244 deserialize_with = "crate::deserialize_present_nonnull",
3245 skip_serializing_if = "::std::option::Option::is_none"
3246 )]
3247 pub data_uuid: ::std::option::Option<::std::string::String>,
3248 #[serde(
3249 default,
3250 deserialize_with = "crate::deserialize_present_nonnull",
3251 skip_serializing_if = "::std::option::Option::is_none"
3252 )]
3253 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
3254 pub fill: PlotterFill,
3255 #[serde(
3256 default,
3257 deserialize_with = "crate::deserialize_present_nonnull",
3258 skip_serializing_if = "::std::option::Option::is_none"
3259 )]
3260 pub fill_color: ::std::option::Option<::std::string::String>,
3261 pub index: u32,
3262 #[serde(deserialize_with = "crate::deserialize_rect_kind")]
3263 pub kind: ::std::string::String,
3264 #[serde(
3265 default,
3266 deserialize_with = "crate::deserialize_present_nonnull",
3267 skip_serializing_if = "::std::option::Option::is_none"
3268 )]
3269 pub label: ::std::option::Option<::std::string::String>,
3270 #[serde(
3271 default,
3272 deserialize_with = "crate::deserialize_present_nonnull",
3273 skip_serializing_if = "::std::option::Option::is_none"
3274 )]
3275 pub layer: ::std::option::Option<::std::string::String>,
3276 #[serde(
3277 default,
3278 deserialize_with = "crate::deserialize_present_nonnull",
3279 skip_serializing_if = "::std::option::Option::is_none"
3280 )]
3281 pub line_style: ::std::option::Option<PlotterLineStyle>,
3282 #[serde(
3283 default,
3284 deserialize_with = "crate::deserialize_present_nonnull",
3285 skip_serializing_if = "::std::option::Option::is_none"
3286 )]
3287 pub object_id: ::std::option::Option<::std::string::String>,
3288 #[serde(
3289 default,
3290 deserialize_with = "crate::deserialize_present_nonnull",
3291 skip_serializing_if = "::std::option::Option::is_none"
3292 )]
3293 pub stroke_color: ::std::option::Option<::std::string::String>,
3294 pub width_nm: crate::JavaScriptSafeInteger,
3295 pub x1: crate::JavaScriptSafeInteger,
3296 pub x2: crate::JavaScriptSafeInteger,
3297 pub y1: crate::JavaScriptSafeInteger,
3298 pub y2: crate::JavaScriptSafeInteger,
3299}
3300#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3363#[serde(deny_unknown_fields)]
3364pub struct BoardFootprintStartBlockOperation {
3365 pub data_ref: BoardFootprintStartBlockOperationDataRef,
3366 pub data_uuid: ::std::string::String,
3367 pub extra_attrs: BoardFootprintPadBlockAttrs,
3368 pub index: u32,
3369 #[serde(deserialize_with = "crate::deserialize_start_block_kind")]
3370 pub kind: ::std::string::String,
3371 pub label: ::std::string::String,
3372 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3373 pub layers: ::std::vec::Vec<::std::string::String>,
3374 pub object_id: ::std::string::String,
3375}
3376#[derive(
3396 ::serde::Deserialize,
3397 ::serde::Serialize,
3398 Clone,
3399 Copy,
3400 Debug,
3401 Eq,
3402 Hash,
3403 Ord,
3404 PartialEq,
3405 PartialOrd,
3406)]
3407pub enum BoardFootprintStartBlockOperationDataRef {
3408 #[serde(rename = "pad")]
3409 Pad,
3410 #[serde(rename = "pad_hole")]
3411 PadHole,
3412}
3413impl ::std::fmt::Display for BoardFootprintStartBlockOperationDataRef {
3414 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3415 match *self {
3416 Self::Pad => f.write_str("pad"),
3417 Self::PadHole => f.write_str("pad_hole"),
3418 }
3419 }
3420}
3421impl ::std::str::FromStr for BoardFootprintStartBlockOperationDataRef {
3422 type Err = self::error::ConversionError;
3423 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3424 match value {
3425 "pad" => Ok(Self::Pad),
3426 "pad_hole" => Ok(Self::PadHole),
3427 _ => Err("invalid value".into()),
3428 }
3429 }
3430}
3431impl ::std::convert::TryFrom<&str> for BoardFootprintStartBlockOperationDataRef {
3432 type Error = self::error::ConversionError;
3433 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3434 value.parse()
3435 }
3436}
3437impl ::std::convert::TryFrom<&::std::string::String> for BoardFootprintStartBlockOperationDataRef {
3438 type Error = self::error::ConversionError;
3439 fn try_from(
3440 value: &::std::string::String,
3441 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3442 value.parse()
3443 }
3444}
3445impl ::std::convert::TryFrom<::std::string::String> for BoardFootprintStartBlockOperationDataRef {
3446 type Error = self::error::ConversionError;
3447 fn try_from(
3448 value: ::std::string::String,
3449 ) -> ::std::result::Result<Self, self::error::ConversionError> {
3450 value.parse()
3451 }
3452}
3453#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3587#[serde(deny_unknown_fields)]
3588pub struct BoardFootprintTextOperation {
3589 pub bold: bool,
3590 pub color: ::std::string::String,
3591 #[serde(
3592 default,
3593 deserialize_with = "crate::deserialize_present_nonnull",
3594 skip_serializing_if = "::std::option::Option::is_none"
3595 )]
3596 pub context: ::std::option::Option<PlotterOperationContext>,
3597 #[serde(
3598 default,
3599 deserialize_with = "crate::deserialize_present_nonnull",
3600 skip_serializing_if = "::std::option::Option::is_none"
3601 )]
3602 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
3603 #[serde(
3604 default,
3605 deserialize_with = "crate::deserialize_present_nonnull",
3606 skip_serializing_if = "::std::option::Option::is_none"
3607 )]
3608 pub data_uuid: ::std::option::Option<::std::string::String>,
3609 #[serde(
3610 default,
3611 deserialize_with = "crate::deserialize_present_nonnull",
3612 skip_serializing_if = "::std::option::Option::is_none"
3613 )]
3614 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
3615 pub font_face: ::std::string::String,
3616 pub h_align: PlotterTextHAlign,
3617 pub index: u32,
3618 pub italic: bool,
3619 #[serde(deserialize_with = "crate::deserialize_text_kind")]
3620 pub kind: ::std::string::String,
3621 #[serde(
3622 default,
3623 deserialize_with = "crate::deserialize_present_nonnull",
3624 skip_serializing_if = "::std::option::Option::is_none"
3625 )]
3626 pub knockout: ::std::option::Option<bool>,
3627 #[serde(
3628 default,
3629 deserialize_with = "crate::deserialize_present_nonnull",
3630 skip_serializing_if = "::std::option::Option::is_none"
3631 )]
3632 pub label: ::std::option::Option<::std::string::String>,
3633 #[serde(
3634 default,
3635 deserialize_with = "crate::deserialize_present_nonnull",
3636 skip_serializing_if = "::std::option::Option::is_none"
3637 )]
3638 pub layer: ::std::option::Option<::std::string::String>,
3639 #[serde(
3640 default,
3641 deserialize_with = "crate::deserialize_present_nonnull",
3642 skip_serializing_if = "::std::option::Option::is_none"
3643 )]
3644 pub mirror: ::std::option::Option<bool>,
3645 pub multiline: bool,
3646 #[serde(
3647 default,
3648 deserialize_with = "crate::deserialize_present_nonnull",
3649 skip_serializing_if = "::std::option::Option::is_none"
3650 )]
3651 pub object_id: ::std::option::Option<::std::string::String>,
3652 pub orient_deg: f64,
3653 pub pen_width_nm: crate::JavaScriptSafeInteger,
3654 #[serde(
3655 default,
3656 deserialize_with = "crate::deserialize_present_nonnull",
3657 skip_serializing_if = "::std::option::Option::is_none"
3658 )]
3659 pub polyline_per_segment: ::std::option::Option<bool>,
3660 #[serde(
3661 default,
3662 deserialize_with = "crate::deserialize_present_nonnull",
3663 skip_serializing_if = "::std::option::Option::is_none"
3664 )]
3665 pub render_cache: ::std::option::Option<TextRenderCache>,
3666 #[serde(
3667 default,
3668 deserialize_with = "crate::deserialize_present_nonnull",
3669 skip_serializing_if = "::std::option::Option::is_none"
3670 )]
3671 pub render_cache_exact: ::std::option::Option<bool>,
3672 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3673 pub render_cache_polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
3674 #[serde(
3675 default,
3676 deserialize_with = "crate::deserialize_present_nonnull",
3677 skip_serializing_if = "::std::option::Option::is_none"
3678 )]
3679 pub render_cache_source: ::std::option::Option<PlotterTextRenderCacheSource>,
3680 pub size_x_nm: crate::JavaScriptSafeInteger,
3681 pub size_y_nm: crate::JavaScriptSafeInteger,
3682 pub text: ::std::string::String,
3683 #[serde(
3684 default,
3685 deserialize_with = "crate::deserialize_present_nonnull",
3686 skip_serializing_if = "::std::option::Option::is_none"
3687 )]
3688 pub text_as_polygons: ::std::option::Option<bool>,
3689 pub v_align: PlotterTextVAlign,
3690 pub x: crate::JavaScriptSafeInteger,
3691 pub y: crate::JavaScriptSafeInteger,
3692}
3693#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3779#[serde(deny_unknown_fields)]
3780pub struct BoardFootprintThickSegmentOperation {
3781 #[serde(
3782 default,
3783 deserialize_with = "crate::deserialize_present_nonnull",
3784 skip_serializing_if = "::std::option::Option::is_none"
3785 )]
3786 pub data_ref: ::std::option::Option<BoardFootprintChildRef>,
3787 #[serde(
3788 default,
3789 deserialize_with = "crate::deserialize_present_nonnull",
3790 skip_serializing_if = "::std::option::Option::is_none"
3791 )]
3792 pub data_uuid: ::std::option::Option<::std::string::String>,
3793 pub end_x: crate::JavaScriptSafeInteger,
3794 pub end_y: crate::JavaScriptSafeInteger,
3795 #[serde(
3796 default,
3797 deserialize_with = "crate::deserialize_present_nonnull",
3798 skip_serializing_if = "::std::option::Option::is_none"
3799 )]
3800 pub extra_attrs: ::std::option::Option<BoardFootprintChildAttrs>,
3801 pub index: u32,
3802 #[serde(deserialize_with = "crate::deserialize_thick_segment_kind")]
3803 pub kind: ::std::string::String,
3804 #[serde(
3805 default,
3806 deserialize_with = "crate::deserialize_present_nonnull",
3807 skip_serializing_if = "::std::option::Option::is_none"
3808 )]
3809 pub label: ::std::option::Option<::std::string::String>,
3810 #[serde(
3811 default,
3812 deserialize_with = "crate::deserialize_present_nonnull",
3813 skip_serializing_if = "::std::option::Option::is_none"
3814 )]
3815 pub layer: ::std::option::Option<::std::string::String>,
3816 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
3817 pub layers: ::std::vec::Vec<::std::string::String>,
3818 #[serde(
3819 default,
3820 deserialize_with = "crate::deserialize_present_nonnull",
3821 skip_serializing_if = "::std::option::Option::is_none"
3822 )]
3823 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
3824 #[serde(
3825 default,
3826 deserialize_with = "crate::deserialize_present_nonnull",
3827 skip_serializing_if = "::std::option::Option::is_none"
3828 )]
3829 pub object_id: ::std::option::Option<::std::string::String>,
3830 #[serde(
3831 default,
3832 deserialize_with = "crate::deserialize_present_nonnull",
3833 skip_serializing_if = "::std::option::Option::is_none"
3834 )]
3835 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
3836 #[serde(
3837 default,
3838 deserialize_with = "crate::deserialize_present_nonnull",
3839 skip_serializing_if = "::std::option::Option::is_none"
3840 )]
3841 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
3842 #[serde(
3843 default,
3844 deserialize_with = "crate::deserialize_present_nonnull",
3845 skip_serializing_if = "::std::option::Option::is_none"
3846 )]
3847 pub role: ::std::option::Option<PlotterDrillRole>,
3848 pub start_x: crate::JavaScriptSafeInteger,
3849 pub start_y: crate::JavaScriptSafeInteger,
3850 #[serde(
3851 default,
3852 deserialize_with = "crate::deserialize_present_nonnull",
3853 skip_serializing_if = "::std::option::Option::is_none"
3854 )]
3855 pub stroke_color: ::std::option::Option<::std::string::String>,
3856 pub width_nm: crate::JavaScriptSafeInteger,
3857}
3858#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
3912#[serde(deny_unknown_fields)]
3913pub struct BoardGraphicPlotRecord {
3914 pub kind: BoardGraphicRecordKind,
3915 #[serde(deserialize_with = "crate::deserialize_required_nullable")]
3916 pub layer: ::std::option::Option<::std::string::String>,
3917 pub object_id: ::std::string::String,
3918 pub operation_count: u32,
3919 pub operations: ::std::vec::Vec<PlotterOperation>,
3920 pub uuid: ::std::string::String,
3921}
3922#[derive(
3942 ::serde::Deserialize,
3943 ::serde::Serialize,
3944 Clone,
3945 Copy,
3946 Debug,
3947 Eq,
3948 Hash,
3949 Ord,
3950 PartialEq,
3951 PartialOrd,
3952)]
3953pub enum BoardGraphicRecordKind {
3954 #[serde(rename = "gr_line")]
3955 GrLine,
3956 #[serde(rename = "gr_arc")]
3957 GrArc,
3958 #[serde(rename = "gr_circle")]
3959 GrCircle,
3960 #[serde(rename = "gr_rect")]
3961 GrRect,
3962 #[serde(rename = "gr_poly")]
3963 GrPoly,
3964 #[serde(rename = "gr_curve")]
3965 GrCurve,
3966}
3967impl ::std::fmt::Display for BoardGraphicRecordKind {
3968 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
3969 match *self {
3970 Self::GrLine => f.write_str("gr_line"),
3971 Self::GrArc => f.write_str("gr_arc"),
3972 Self::GrCircle => f.write_str("gr_circle"),
3973 Self::GrRect => f.write_str("gr_rect"),
3974 Self::GrPoly => f.write_str("gr_poly"),
3975 Self::GrCurve => f.write_str("gr_curve"),
3976 }
3977 }
3978}
3979impl ::std::str::FromStr for BoardGraphicRecordKind {
3980 type Err = self::error::ConversionError;
3981 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3982 match value {
3983 "gr_line" => Ok(Self::GrLine),
3984 "gr_arc" => Ok(Self::GrArc),
3985 "gr_circle" => Ok(Self::GrCircle),
3986 "gr_rect" => Ok(Self::GrRect),
3987 "gr_poly" => Ok(Self::GrPoly),
3988 "gr_curve" => Ok(Self::GrCurve),
3989 _ => Err("invalid value".into()),
3990 }
3991 }
3992}
3993impl ::std::convert::TryFrom<&str> for BoardGraphicRecordKind {
3994 type Error = self::error::ConversionError;
3995 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
3996 value.parse()
3997 }
3998}
3999impl ::std::convert::TryFrom<&::std::string::String> for BoardGraphicRecordKind {
4000 type Error = self::error::ConversionError;
4001 fn try_from(
4002 value: &::std::string::String,
4003 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4004 value.parse()
4005 }
4006}
4007impl ::std::convert::TryFrom<::std::string::String> for BoardGraphicRecordKind {
4008 type Error = self::error::ConversionError;
4009 fn try_from(
4010 value: ::std::string::String,
4011 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4012 value.parse()
4013 }
4014}
4015#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4090#[serde(deny_unknown_fields)]
4091pub struct BoardPlotDocumentA0 {
4092 pub coordinate_space: PlotterCoordinateSpace,
4093 pub document_id: ::std::string::String,
4094 pub generator: ::std::string::String,
4095 pub generator_version: ::std::string::String,
4096 pub paper: ::std::string::String,
4097 pub records: ::std::vec::Vec<BoardPlotRecord>,
4098 pub schema: ::std::string::String,
4099 pub source_kind: ::std::string::String,
4100 #[serde(
4101 default,
4102 deserialize_with = "crate::deserialize_present_nonnull",
4103 skip_serializing_if = "::std::option::Option::is_none"
4104 )]
4105 pub source_path: ::std::option::Option<::std::string::String>,
4106 pub thickness_mm: f64,
4107 pub total_operations: u32,
4108 pub version: crate::JavaScriptSafeInteger,
4109}
4110#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4152#[serde(untagged)]
4153pub enum BoardPlotRecord {
4154 BoardGraphicPlotRecord(BoardGraphicPlotRecord),
4155 TrackSegmentPlotRecord(TrackSegmentPlotRecord),
4156 TrackArcPlotRecord(TrackArcPlotRecord),
4157 ViaPlotRecord(ViaPlotRecord),
4158 TablePlotRecord(TablePlotRecord),
4159 DimensionPlotRecord(DimensionPlotRecord),
4160 ZoneFillPlotRecord(ZoneFillPlotRecord),
4161 BoardTextPlotRecord(BoardTextPlotRecord),
4162 BoardTextBoxPlotRecord(BoardTextBoxPlotRecord),
4163 BoardFootprintPlotRecord(BoardFootprintPlotRecord),
4164}
4165impl ::std::convert::From<BoardGraphicPlotRecord> for BoardPlotRecord {
4166 fn from(value: BoardGraphicPlotRecord) -> Self {
4167 Self::BoardGraphicPlotRecord(value)
4168 }
4169}
4170impl ::std::convert::From<TrackSegmentPlotRecord> for BoardPlotRecord {
4171 fn from(value: TrackSegmentPlotRecord) -> Self {
4172 Self::TrackSegmentPlotRecord(value)
4173 }
4174}
4175impl ::std::convert::From<TrackArcPlotRecord> for BoardPlotRecord {
4176 fn from(value: TrackArcPlotRecord) -> Self {
4177 Self::TrackArcPlotRecord(value)
4178 }
4179}
4180impl ::std::convert::From<ViaPlotRecord> for BoardPlotRecord {
4181 fn from(value: ViaPlotRecord) -> Self {
4182 Self::ViaPlotRecord(value)
4183 }
4184}
4185impl ::std::convert::From<TablePlotRecord> for BoardPlotRecord {
4186 fn from(value: TablePlotRecord) -> Self {
4187 Self::TablePlotRecord(value)
4188 }
4189}
4190impl ::std::convert::From<DimensionPlotRecord> for BoardPlotRecord {
4191 fn from(value: DimensionPlotRecord) -> Self {
4192 Self::DimensionPlotRecord(value)
4193 }
4194}
4195impl ::std::convert::From<ZoneFillPlotRecord> for BoardPlotRecord {
4196 fn from(value: ZoneFillPlotRecord) -> Self {
4197 Self::ZoneFillPlotRecord(value)
4198 }
4199}
4200impl ::std::convert::From<BoardTextPlotRecord> for BoardPlotRecord {
4201 fn from(value: BoardTextPlotRecord) -> Self {
4202 Self::BoardTextPlotRecord(value)
4203 }
4204}
4205impl ::std::convert::From<BoardTextBoxPlotRecord> for BoardPlotRecord {
4206 fn from(value: BoardTextBoxPlotRecord) -> Self {
4207 Self::BoardTextBoxPlotRecord(value)
4208 }
4209}
4210impl ::std::convert::From<BoardFootprintPlotRecord> for BoardPlotRecord {
4211 fn from(value: BoardFootprintPlotRecord) -> Self {
4212 Self::BoardFootprintPlotRecord(value)
4213 }
4214}
4215#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4271#[serde(deny_unknown_fields)]
4272pub struct BoardTextBoxPlotRecord {
4273 pub border: bool,
4274 pub kind: ::std::string::String,
4275 pub layer: ::std::string::String,
4276 pub object_id: ::std::string::String,
4277 pub operation_count: u32,
4278 pub operations: ::std::vec::Vec<PlotterOperation>,
4279 pub text: ::std::string::String,
4280 pub uuid: ::std::string::String,
4281}
4282#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4338#[serde(deny_unknown_fields)]
4339pub struct BoardTextPlotRecord {
4340 pub hide: bool,
4341 pub kind: ::std::string::String,
4342 pub layer: ::std::string::String,
4343 pub object_id: ::std::string::String,
4344 pub operation_count: u32,
4345 pub operations: ::std::vec::Vec<PlotterOperation>,
4346 pub text: ::std::string::String,
4347 pub uuid: ::std::string::String,
4348}
4349#[derive(
4367 ::serde::Deserialize,
4368 ::serde::Serialize,
4369 Clone,
4370 Copy,
4371 Debug,
4372 Eq,
4373 Hash,
4374 Ord,
4375 PartialEq,
4376 PartialOrd,
4377)]
4378pub enum BoardViaType {
4379 #[serde(rename = "through")]
4380 Through,
4381 #[serde(rename = "blind")]
4382 Blind,
4383 #[serde(rename = "buried")]
4384 Buried,
4385 #[serde(rename = "micro")]
4386 Micro,
4387}
4388impl ::std::fmt::Display for BoardViaType {
4389 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
4390 match *self {
4391 Self::Through => f.write_str("through"),
4392 Self::Blind => f.write_str("blind"),
4393 Self::Buried => f.write_str("buried"),
4394 Self::Micro => f.write_str("micro"),
4395 }
4396 }
4397}
4398impl ::std::str::FromStr for BoardViaType {
4399 type Err = self::error::ConversionError;
4400 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4401 match value {
4402 "through" => Ok(Self::Through),
4403 "blind" => Ok(Self::Blind),
4404 "buried" => Ok(Self::Buried),
4405 "micro" => Ok(Self::Micro),
4406 _ => Err("invalid value".into()),
4407 }
4408 }
4409}
4410impl ::std::convert::TryFrom<&str> for BoardViaType {
4411 type Error = self::error::ConversionError;
4412 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
4413 value.parse()
4414 }
4415}
4416impl ::std::convert::TryFrom<&::std::string::String> for BoardViaType {
4417 type Error = self::error::ConversionError;
4418 fn try_from(
4419 value: &::std::string::String,
4420 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4421 value.parse()
4422 }
4423}
4424impl ::std::convert::TryFrom<::std::string::String> for BoardViaType {
4425 type Error = self::error::ConversionError;
4426 fn try_from(
4427 value: ::std::string::String,
4428 ) -> ::std::result::Result<Self, self::error::ConversionError> {
4429 value.parse()
4430 }
4431}
4432#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4516#[serde(deny_unknown_fields)]
4517pub struct CircleOperation {
4518 pub cx: crate::JavaScriptSafeInteger,
4519 pub cy: crate::JavaScriptSafeInteger,
4520 pub diameter_nm: crate::JavaScriptSafeInteger,
4521 pub fill: PlotterFill,
4522 #[serde(
4523 default,
4524 deserialize_with = "crate::deserialize_present_nonnull",
4525 skip_serializing_if = "::std::option::Option::is_none"
4526 )]
4527 pub fill_color: ::std::option::Option<::std::string::String>,
4528 pub index: u32,
4529 #[serde(deserialize_with = "crate::deserialize_circle_kind")]
4530 pub kind: ::std::string::String,
4531 #[serde(
4532 default,
4533 deserialize_with = "crate::deserialize_present_nonnull",
4534 skip_serializing_if = "::std::option::Option::is_none"
4535 )]
4536 pub layer: ::std::option::Option<::std::string::String>,
4537 #[serde(
4538 default,
4539 deserialize_with = "crate::deserialize_present_nonnull",
4540 skip_serializing_if = "::std::option::Option::is_none"
4541 )]
4542 pub layers: ::std::option::Option<::std::vec::Vec<::std::string::String>>,
4543 #[serde(
4544 default,
4545 deserialize_with = "crate::deserialize_present_nonnull",
4546 skip_serializing_if = "::std::option::Option::is_none"
4547 )]
4548 pub line_style: ::std::option::Option<PlotterLineStyle>,
4549 #[serde(
4550 default,
4551 deserialize_with = "crate::deserialize_present_nonnull",
4552 skip_serializing_if = "::std::option::Option::is_none"
4553 )]
4554 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
4555 #[serde(
4556 default,
4557 deserialize_with = "crate::deserialize_present_nonnull",
4558 skip_serializing_if = "::std::option::Option::is_none"
4559 )]
4560 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
4561 #[serde(
4562 default,
4563 deserialize_with = "crate::deserialize_present_nonnull",
4564 skip_serializing_if = "::std::option::Option::is_none"
4565 )]
4566 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
4567 #[serde(
4568 default,
4569 deserialize_with = "crate::deserialize_present_nonnull",
4570 skip_serializing_if = "::std::option::Option::is_none"
4571 )]
4572 pub role: ::std::option::Option<PlotterDrillRole>,
4573 #[serde(
4574 default,
4575 deserialize_with = "crate::deserialize_present_nonnull",
4576 skip_serializing_if = "::std::option::Option::is_none"
4577 )]
4578 pub stroke_color: ::std::option::Option<::std::string::String>,
4579 pub width_nm: crate::JavaScriptSafeInteger,
4580}
4581#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4639#[serde(deny_unknown_fields)]
4640pub struct DimensionPlotRecord {
4641 pub dimension_type: BoardDimensionType,
4642 pub kind: ::std::string::String,
4643 pub layers: ::std::vec::Vec<::std::string::String>,
4644 pub object_id: ::std::string::String,
4645 pub operation_count: u32,
4646 pub operations: ::std::vec::Vec<PlotterOperation>,
4647 #[serde(
4648 default,
4649 deserialize_with = "crate::deserialize_present_nonnull",
4650 skip_serializing_if = "::std::option::Option::is_none"
4651 )]
4652 pub text: ::std::option::Option<::std::string::String>,
4653 pub uuid: ::std::string::String,
4654}
4655#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4711#[serde(deny_unknown_fields)]
4712pub struct FlashPadCircleOperation {
4713 pub diameter_nm: crate::JavaScriptSafeInteger,
4714 pub index: u32,
4715 #[serde(deserialize_with = "crate::deserialize_flash_pad_circle_kind")]
4716 pub kind: ::std::string::String,
4717 pub layers: ::std::vec::Vec<::std::string::String>,
4718 #[serde(
4719 default,
4720 deserialize_with = "crate::deserialize_present_nonnull",
4721 skip_serializing_if = "::std::option::Option::is_none"
4722 )]
4723 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
4724 #[serde(
4725 default,
4726 deserialize_with = "crate::deserialize_present_nonnull",
4727 skip_serializing_if = "::std::option::Option::is_none"
4728 )]
4729 pub role: ::std::option::Option<PlotterViaFlashRole>,
4730 pub x: crate::JavaScriptSafeInteger,
4731 pub y: crate::JavaScriptSafeInteger,
4732}
4733#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4814#[serde(deny_unknown_fields)]
4815pub struct FlashPadCustomOperation {
4816 #[serde(
4817 default,
4818 deserialize_with = "crate::deserialize_present_nonnull",
4819 skip_serializing_if = "::std::option::Option::is_none"
4820 )]
4821 pub anchor_shape: ::std::option::Option<::std::string::String>,
4822 pub index: u32,
4823 #[serde(deserialize_with = "crate::deserialize_flash_pad_custom_kind")]
4824 pub kind: ::std::string::String,
4825 pub layers: ::std::vec::Vec<::std::string::String>,
4826 pub mask_margin_nm: crate::JavaScriptSafeInteger,
4827 pub orient_deg: f64,
4828 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
4829 pub polygon_widths_nm: ::std::vec::Vec<crate::JavaScriptSafeInteger>,
4830 pub polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
4831 pub size_x_nm: crate::JavaScriptSafeInteger,
4832 pub size_y_nm: crate::JavaScriptSafeInteger,
4833 pub x: crate::JavaScriptSafeInteger,
4834 pub y: crate::JavaScriptSafeInteger,
4835}
4836#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4895#[serde(deny_unknown_fields)]
4896pub struct FlashPadOvalOperation {
4897 pub index: u32,
4898 #[serde(deserialize_with = "crate::deserialize_flash_pad_oval_kind")]
4899 pub kind: ::std::string::String,
4900 pub layers: ::std::vec::Vec<::std::string::String>,
4901 pub mask_margin_nm: crate::JavaScriptSafeInteger,
4902 pub orient_deg: f64,
4903 pub size_x_nm: crate::JavaScriptSafeInteger,
4904 pub size_y_nm: crate::JavaScriptSafeInteger,
4905 pub x: crate::JavaScriptSafeInteger,
4906 pub y: crate::JavaScriptSafeInteger,
4907}
4908#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
4967#[serde(deny_unknown_fields)]
4968pub struct FlashPadRectOperation {
4969 pub index: u32,
4970 #[serde(deserialize_with = "crate::deserialize_flash_pad_rect_kind")]
4971 pub kind: ::std::string::String,
4972 pub layers: ::std::vec::Vec<::std::string::String>,
4973 pub mask_margin_nm: crate::JavaScriptSafeInteger,
4974 pub orient_deg: f64,
4975 pub size_x_nm: crate::JavaScriptSafeInteger,
4976 pub size_y_nm: crate::JavaScriptSafeInteger,
4977 pub x: crate::JavaScriptSafeInteger,
4978 pub y: crate::JavaScriptSafeInteger,
4979}
4980#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5043#[serde(deny_unknown_fields)]
5044pub struct FlashPadRoundRectOperation {
5045 pub corner_radius_nm: crate::JavaScriptSafeInteger,
5046 pub index: u32,
5047 #[serde(deserialize_with = "crate::deserialize_flash_pad_round_rect_kind")]
5048 pub kind: ::std::string::String,
5049 pub layers: ::std::vec::Vec<::std::string::String>,
5050 pub mask_margin_nm: crate::JavaScriptSafeInteger,
5051 pub orient_deg: f64,
5052 pub size_x_nm: crate::JavaScriptSafeInteger,
5053 pub size_y_nm: crate::JavaScriptSafeInteger,
5054 pub x: crate::JavaScriptSafeInteger,
5055 pub y: crate::JavaScriptSafeInteger,
5056}
5057#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5112#[serde(deny_unknown_fields)]
5113pub struct FlashPadTrapezOperation {
5114 pub corners: PlotterQuad,
5115 pub index: u32,
5116 #[serde(deserialize_with = "crate::deserialize_flash_pad_trapez_kind")]
5117 pub kind: ::std::string::String,
5118 pub layers: ::std::vec::Vec<::std::string::String>,
5119 pub mask_margin_nm: crate::JavaScriptSafeInteger,
5120 pub orient_deg: f64,
5121 pub x: crate::JavaScriptSafeInteger,
5122 pub y: crate::JavaScriptSafeInteger,
5123}
5124#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5183#[serde(deny_unknown_fields)]
5184pub struct PlotImageOperation {
5185 pub height_nm: crate::JavaScriptSafeInteger,
5186 pub image_data_b64: ::std::string::String,
5187 pub image_format: ::std::string::String,
5188 pub index: u32,
5189 #[serde(deserialize_with = "crate::deserialize_plot_image_kind")]
5190 pub kind: ::std::string::String,
5191 pub scale: f64,
5192 #[serde(
5193 default,
5194 deserialize_with = "crate::deserialize_present_nonnull",
5195 skip_serializing_if = "::std::option::Option::is_none"
5196 )]
5197 pub stroke_color: ::std::option::Option<::std::string::String>,
5198 pub width_nm: crate::JavaScriptSafeInteger,
5199 pub x: crate::JavaScriptSafeInteger,
5200 pub y: crate::JavaScriptSafeInteger,
5201}
5202#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5257#[serde(deny_unknown_fields)]
5258pub struct PlotPolyOperation {
5259 pub fill: PlotterFill,
5260 #[serde(
5261 default,
5262 deserialize_with = "crate::deserialize_present_nonnull",
5263 skip_serializing_if = "::std::option::Option::is_none"
5264 )]
5265 pub fill_color: ::std::option::Option<::std::string::String>,
5266 pub index: u32,
5267 #[serde(deserialize_with = "crate::deserialize_plot_poly_kind")]
5268 pub kind: ::std::string::String,
5269 #[serde(
5270 default,
5271 deserialize_with = "crate::deserialize_present_nonnull",
5272 skip_serializing_if = "::std::option::Option::is_none"
5273 )]
5274 pub layer: ::std::option::Option<::std::string::String>,
5275 #[serde(
5276 default,
5277 deserialize_with = "crate::deserialize_present_nonnull",
5278 skip_serializing_if = "::std::option::Option::is_none"
5279 )]
5280 pub line_style: ::std::option::Option<PlotterLineStyle>,
5281 pub points: ::std::vec::Vec<PlotterPoint>,
5282 #[serde(
5283 default,
5284 deserialize_with = "crate::deserialize_present_nonnull",
5285 skip_serializing_if = "::std::option::Option::is_none"
5286 )]
5287 pub stroke_color: ::std::option::Option<::std::string::String>,
5288 pub width_nm: crate::JavaScriptSafeInteger,
5289}
5290#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5317#[serde(deny_unknown_fields)]
5318pub struct PlotterCoordinateSpace {
5319 pub unit: ::std::string::String,
5320 pub y_axis: ::std::string::String,
5321}
5322#[derive(
5340 ::serde::Deserialize,
5341 ::serde::Serialize,
5342 Clone,
5343 Copy,
5344 Debug,
5345 Eq,
5346 Hash,
5347 Ord,
5348 PartialEq,
5349 PartialOrd,
5350)]
5351pub enum PlotterDrillRole {
5352 #[serde(rename = "pad_drill")]
5353 PadDrill,
5354 #[serde(rename = "npth_hole")]
5355 NpthHole,
5356 #[serde(rename = "via_drill")]
5357 ViaDrill,
5358 #[serde(rename = "via_mask_drill")]
5359 ViaMaskDrill,
5360}
5361impl ::std::fmt::Display for PlotterDrillRole {
5362 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5363 match *self {
5364 Self::PadDrill => f.write_str("pad_drill"),
5365 Self::NpthHole => f.write_str("npth_hole"),
5366 Self::ViaDrill => f.write_str("via_drill"),
5367 Self::ViaMaskDrill => f.write_str("via_mask_drill"),
5368 }
5369 }
5370}
5371impl ::std::str::FromStr for PlotterDrillRole {
5372 type Err = self::error::ConversionError;
5373 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5374 match value {
5375 "pad_drill" => Ok(Self::PadDrill),
5376 "npth_hole" => Ok(Self::NpthHole),
5377 "via_drill" => Ok(Self::ViaDrill),
5378 "via_mask_drill" => Ok(Self::ViaMaskDrill),
5379 _ => Err("invalid value".into()),
5380 }
5381 }
5382}
5383impl ::std::convert::TryFrom<&str> for PlotterDrillRole {
5384 type Error = self::error::ConversionError;
5385 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5386 value.parse()
5387 }
5388}
5389impl ::std::convert::TryFrom<&::std::string::String> for PlotterDrillRole {
5390 type Error = self::error::ConversionError;
5391 fn try_from(
5392 value: &::std::string::String,
5393 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5394 value.parse()
5395 }
5396}
5397impl ::std::convert::TryFrom<::std::string::String> for PlotterDrillRole {
5398 type Error = self::error::ConversionError;
5399 fn try_from(
5400 value: ::std::string::String,
5401 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5402 value.parse()
5403 }
5404}
5405#[derive(
5426 ::serde::Deserialize,
5427 ::serde::Serialize,
5428 Clone,
5429 Copy,
5430 Debug,
5431 Eq,
5432 Hash,
5433 Ord,
5434 PartialEq,
5435 PartialOrd,
5436)]
5437pub enum PlotterFill {
5438 #[serde(rename = "NO_FILL")]
5439 NoFill,
5440 #[serde(rename = "FILLED_SHAPE")]
5441 FilledShape,
5442 #[serde(rename = "FILLED_WITH_BG_BODYCOLOR")]
5443 FilledWithBgBodycolor,
5444 #[serde(rename = "FILLED_WITH_COLOR")]
5445 FilledWithColor,
5446 #[serde(rename = "HATCH")]
5447 Hatch,
5448 #[serde(rename = "REVERSE_HATCH")]
5449 ReverseHatch,
5450 #[serde(rename = "CROSS_HATCH")]
5451 CrossHatch,
5452}
5453impl ::std::fmt::Display for PlotterFill {
5454 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5455 match *self {
5456 Self::NoFill => f.write_str("NO_FILL"),
5457 Self::FilledShape => f.write_str("FILLED_SHAPE"),
5458 Self::FilledWithBgBodycolor => f.write_str("FILLED_WITH_BG_BODYCOLOR"),
5459 Self::FilledWithColor => f.write_str("FILLED_WITH_COLOR"),
5460 Self::Hatch => f.write_str("HATCH"),
5461 Self::ReverseHatch => f.write_str("REVERSE_HATCH"),
5462 Self::CrossHatch => f.write_str("CROSS_HATCH"),
5463 }
5464 }
5465}
5466impl ::std::str::FromStr for PlotterFill {
5467 type Err = self::error::ConversionError;
5468 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5469 match value {
5470 "NO_FILL" => Ok(Self::NoFill),
5471 "FILLED_SHAPE" => Ok(Self::FilledShape),
5472 "FILLED_WITH_BG_BODYCOLOR" => Ok(Self::FilledWithBgBodycolor),
5473 "FILLED_WITH_COLOR" => Ok(Self::FilledWithColor),
5474 "HATCH" => Ok(Self::Hatch),
5475 "REVERSE_HATCH" => Ok(Self::ReverseHatch),
5476 "CROSS_HATCH" => Ok(Self::CrossHatch),
5477 _ => Err("invalid value".into()),
5478 }
5479 }
5480}
5481impl ::std::convert::TryFrom<&str> for PlotterFill {
5482 type Error = self::error::ConversionError;
5483 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5484 value.parse()
5485 }
5486}
5487impl ::std::convert::TryFrom<&::std::string::String> for PlotterFill {
5488 type Error = self::error::ConversionError;
5489 fn try_from(
5490 value: &::std::string::String,
5491 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5492 value.parse()
5493 }
5494}
5495impl ::std::convert::TryFrom<::std::string::String> for PlotterFill {
5496 type Error = self::error::ConversionError;
5497 fn try_from(
5498 value: ::std::string::String,
5499 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5500 value.parse()
5501 }
5502}
5503#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5525#[serde(deny_unknown_fields)]
5526pub struct PlotterHyperlink {
5527 pub href: PlotterHyperlinkHref,
5528}
5529#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
5541#[serde(transparent)]
5542pub struct PlotterHyperlinkHref(::std::string::String);
5543impl ::std::ops::Deref for PlotterHyperlinkHref {
5544 type Target = ::std::string::String;
5545 fn deref(&self) -> &::std::string::String {
5546 &self.0
5547 }
5548}
5549impl ::std::convert::From<PlotterHyperlinkHref> for ::std::string::String {
5550 fn from(value: PlotterHyperlinkHref) -> Self {
5551 value.0
5552 }
5553}
5554impl ::std::str::FromStr for PlotterHyperlinkHref {
5555 type Err = self::error::ConversionError;
5556 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5557 if value.chars().count() < 1usize {
5558 return Err("shorter than 1 characters".into());
5559 }
5560 Ok(Self(value.to_string()))
5561 }
5562}
5563impl ::std::convert::TryFrom<&str> for PlotterHyperlinkHref {
5564 type Error = self::error::ConversionError;
5565 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5566 value.parse()
5567 }
5568}
5569impl ::std::convert::TryFrom<&::std::string::String> for PlotterHyperlinkHref {
5570 type Error = self::error::ConversionError;
5571 fn try_from(
5572 value: &::std::string::String,
5573 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5574 value.parse()
5575 }
5576}
5577impl ::std::convert::TryFrom<::std::string::String> for PlotterHyperlinkHref {
5578 type Error = self::error::ConversionError;
5579 fn try_from(
5580 value: ::std::string::String,
5581 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5582 value.parse()
5583 }
5584}
5585impl<'de> ::serde::Deserialize<'de> for PlotterHyperlinkHref {
5586 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
5587 where
5588 D: ::serde::Deserializer<'de>,
5589 {
5590 ::std::string::String::deserialize(deserializer)?
5591 .parse()
5592 .map_err(|e: self::error::ConversionError| {
5593 <D::Error as ::serde::de::Error>::custom(e.to_string())
5594 })
5595 }
5596}
5597#[derive(
5617 ::serde::Deserialize,
5618 ::serde::Serialize,
5619 Clone,
5620 Copy,
5621 Debug,
5622 Eq,
5623 Hash,
5624 Ord,
5625 PartialEq,
5626 PartialOrd,
5627)]
5628pub enum PlotterLineStyle {
5629 #[serde(rename = "DEFAULT")]
5630 Default,
5631 #[serde(rename = "SOLID")]
5632 Solid,
5633 #[serde(rename = "DASH")]
5634 Dash,
5635 #[serde(rename = "DOT")]
5636 Dot,
5637 #[serde(rename = "DASH_DOT")]
5638 DashDot,
5639 #[serde(rename = "DASH_DOT_DOT")]
5640 DashDotDot,
5641}
5642impl ::std::fmt::Display for PlotterLineStyle {
5643 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5644 match *self {
5645 Self::Default => f.write_str("DEFAULT"),
5646 Self::Solid => f.write_str("SOLID"),
5647 Self::Dash => f.write_str("DASH"),
5648 Self::Dot => f.write_str("DOT"),
5649 Self::DashDot => f.write_str("DASH_DOT"),
5650 Self::DashDotDot => f.write_str("DASH_DOT_DOT"),
5651 }
5652 }
5653}
5654impl ::std::str::FromStr for PlotterLineStyle {
5655 type Err = self::error::ConversionError;
5656 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5657 match value {
5658 "DEFAULT" => Ok(Self::Default),
5659 "SOLID" => Ok(Self::Solid),
5660 "DASH" => Ok(Self::Dash),
5661 "DOT" => Ok(Self::Dot),
5662 "DASH_DOT" => Ok(Self::DashDot),
5663 "DASH_DOT_DOT" => Ok(Self::DashDotDot),
5664 _ => Err("invalid value".into()),
5665 }
5666 }
5667}
5668impl ::std::convert::TryFrom<&str> for PlotterLineStyle {
5669 type Error = self::error::ConversionError;
5670 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5671 value.parse()
5672 }
5673}
5674impl ::std::convert::TryFrom<&::std::string::String> for PlotterLineStyle {
5675 type Error = self::error::ConversionError;
5676 fn try_from(
5677 value: &::std::string::String,
5678 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5679 value.parse()
5680 }
5681}
5682impl ::std::convert::TryFrom<::std::string::String> for PlotterLineStyle {
5683 type Error = self::error::ConversionError;
5684 fn try_from(
5685 value: ::std::string::String,
5686 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5687 value.parse()
5688 }
5689}
5690#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5745#[serde(untagged)]
5746pub enum PlotterOperation {
5747 ThickSegmentOperation(ThickSegmentOperation),
5748 ArcThreePointOperation(ArcThreePointOperation),
5749 CircleOperation(CircleOperation),
5750 RectOperation(RectOperation),
5751 PlotPolyOperation(PlotPolyOperation),
5752 BezierCurveOperation(BezierCurveOperation),
5753 TextOperation(TextOperation),
5754 PlotImageOperation(PlotImageOperation),
5755 FlashPadCircleOperation(FlashPadCircleOperation),
5756 FlashPadOvalOperation(FlashPadOvalOperation),
5757 FlashPadRectOperation(FlashPadRectOperation),
5758 FlashPadRoundRectOperation(FlashPadRoundRectOperation),
5759 FlashPadCustomOperation(FlashPadCustomOperation),
5760 FlashPadTrapezOperation(FlashPadTrapezOperation),
5761}
5762impl ::std::convert::From<ThickSegmentOperation> for PlotterOperation {
5763 fn from(value: ThickSegmentOperation) -> Self {
5764 Self::ThickSegmentOperation(value)
5765 }
5766}
5767impl ::std::convert::From<ArcThreePointOperation> for PlotterOperation {
5768 fn from(value: ArcThreePointOperation) -> Self {
5769 Self::ArcThreePointOperation(value)
5770 }
5771}
5772impl ::std::convert::From<CircleOperation> for PlotterOperation {
5773 fn from(value: CircleOperation) -> Self {
5774 Self::CircleOperation(value)
5775 }
5776}
5777impl ::std::convert::From<RectOperation> for PlotterOperation {
5778 fn from(value: RectOperation) -> Self {
5779 Self::RectOperation(value)
5780 }
5781}
5782impl ::std::convert::From<PlotPolyOperation> for PlotterOperation {
5783 fn from(value: PlotPolyOperation) -> Self {
5784 Self::PlotPolyOperation(value)
5785 }
5786}
5787impl ::std::convert::From<BezierCurveOperation> for PlotterOperation {
5788 fn from(value: BezierCurveOperation) -> Self {
5789 Self::BezierCurveOperation(value)
5790 }
5791}
5792impl ::std::convert::From<TextOperation> for PlotterOperation {
5793 fn from(value: TextOperation) -> Self {
5794 Self::TextOperation(value)
5795 }
5796}
5797impl ::std::convert::From<PlotImageOperation> for PlotterOperation {
5798 fn from(value: PlotImageOperation) -> Self {
5799 Self::PlotImageOperation(value)
5800 }
5801}
5802impl ::std::convert::From<FlashPadCircleOperation> for PlotterOperation {
5803 fn from(value: FlashPadCircleOperation) -> Self {
5804 Self::FlashPadCircleOperation(value)
5805 }
5806}
5807impl ::std::convert::From<FlashPadOvalOperation> for PlotterOperation {
5808 fn from(value: FlashPadOvalOperation) -> Self {
5809 Self::FlashPadOvalOperation(value)
5810 }
5811}
5812impl ::std::convert::From<FlashPadRectOperation> for PlotterOperation {
5813 fn from(value: FlashPadRectOperation) -> Self {
5814 Self::FlashPadRectOperation(value)
5815 }
5816}
5817impl ::std::convert::From<FlashPadRoundRectOperation> for PlotterOperation {
5818 fn from(value: FlashPadRoundRectOperation) -> Self {
5819 Self::FlashPadRoundRectOperation(value)
5820 }
5821}
5822impl ::std::convert::From<FlashPadCustomOperation> for PlotterOperation {
5823 fn from(value: FlashPadCustomOperation) -> Self {
5824 Self::FlashPadCustomOperation(value)
5825 }
5826}
5827impl ::std::convert::From<FlashPadTrapezOperation> for PlotterOperation {
5828 fn from(value: FlashPadTrapezOperation) -> Self {
5829 Self::FlashPadTrapezOperation(value)
5830 }
5831}
5832#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5853#[serde(deny_unknown_fields)]
5854pub struct PlotterOperationContext {
5855 pub hyperlink: PlotterHyperlink,
5856}
5857#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5874#[serde(transparent)]
5875pub struct PlotterPoint(pub [crate::JavaScriptSafeInteger; 2usize]);
5876impl ::std::ops::Deref for PlotterPoint {
5877 type Target = [crate::JavaScriptSafeInteger; 2usize];
5878 fn deref(&self) -> &[crate::JavaScriptSafeInteger; 2usize] {
5879 &self.0
5880 }
5881}
5882impl ::std::convert::From<PlotterPoint> for [crate::JavaScriptSafeInteger; 2usize] {
5883 fn from(value: PlotterPoint) -> Self {
5884 value.0
5885 }
5886}
5887impl ::std::convert::From<[crate::JavaScriptSafeInteger; 2usize]> for PlotterPoint {
5888 fn from(value: [crate::JavaScriptSafeInteger; 2usize]) -> Self {
5889 Self(value)
5890 }
5891}
5892#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
5909#[serde(transparent)]
5910pub struct PlotterQuad(pub [PlotterPoint; 4usize]);
5911impl ::std::ops::Deref for PlotterQuad {
5912 type Target = [PlotterPoint; 4usize];
5913 fn deref(&self) -> &[PlotterPoint; 4usize] {
5914 &self.0
5915 }
5916}
5917impl ::std::convert::From<PlotterQuad> for [PlotterPoint; 4usize] {
5918 fn from(value: PlotterQuad) -> Self {
5919 value.0
5920 }
5921}
5922impl ::std::convert::From<[PlotterPoint; 4usize]> for PlotterQuad {
5923 fn from(value: [PlotterPoint; 4usize]) -> Self {
5924 Self(value)
5925 }
5926}
5927#[derive(
5943 ::serde::Deserialize,
5944 ::serde::Serialize,
5945 Clone,
5946 Copy,
5947 Debug,
5948 Eq,
5949 Hash,
5950 Ord,
5951 PartialEq,
5952 PartialOrd,
5953)]
5954pub enum PlotterStringBool {
5955 #[serde(rename = "true")]
5956 True,
5957 #[serde(rename = "false")]
5958 False,
5959}
5960impl ::std::fmt::Display for PlotterStringBool {
5961 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
5962 match *self {
5963 Self::True => f.write_str("true"),
5964 Self::False => f.write_str("false"),
5965 }
5966 }
5967}
5968impl ::std::str::FromStr for PlotterStringBool {
5969 type Err = self::error::ConversionError;
5970 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5971 match value {
5972 "true" => Ok(Self::True),
5973 "false" => Ok(Self::False),
5974 _ => Err("invalid value".into()),
5975 }
5976 }
5977}
5978impl ::std::convert::TryFrom<&str> for PlotterStringBool {
5979 type Error = self::error::ConversionError;
5980 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
5981 value.parse()
5982 }
5983}
5984impl ::std::convert::TryFrom<&::std::string::String> for PlotterStringBool {
5985 type Error = self::error::ConversionError;
5986 fn try_from(
5987 value: &::std::string::String,
5988 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5989 value.parse()
5990 }
5991}
5992impl ::std::convert::TryFrom<::std::string::String> for PlotterStringBool {
5993 type Error = self::error::ConversionError;
5994 fn try_from(
5995 value: ::std::string::String,
5996 ) -> ::std::result::Result<Self, self::error::ConversionError> {
5997 value.parse()
5998 }
5999}
6000#[derive(
6017 ::serde::Deserialize,
6018 ::serde::Serialize,
6019 Clone,
6020 Copy,
6021 Debug,
6022 Eq,
6023 Hash,
6024 Ord,
6025 PartialEq,
6026 PartialOrd,
6027)]
6028pub enum PlotterTextHAlign {
6029 #[serde(rename = "GR_TEXT_H_ALIGN_LEFT")]
6030 GrTextHAlignLeft,
6031 #[serde(rename = "GR_TEXT_H_ALIGN_CENTER")]
6032 GrTextHAlignCenter,
6033 #[serde(rename = "GR_TEXT_H_ALIGN_RIGHT")]
6034 GrTextHAlignRight,
6035}
6036impl ::std::fmt::Display for PlotterTextHAlign {
6037 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6038 match *self {
6039 Self::GrTextHAlignLeft => f.write_str("GR_TEXT_H_ALIGN_LEFT"),
6040 Self::GrTextHAlignCenter => f.write_str("GR_TEXT_H_ALIGN_CENTER"),
6041 Self::GrTextHAlignRight => f.write_str("GR_TEXT_H_ALIGN_RIGHT"),
6042 }
6043 }
6044}
6045impl ::std::str::FromStr for PlotterTextHAlign {
6046 type Err = self::error::ConversionError;
6047 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6048 match value {
6049 "GR_TEXT_H_ALIGN_LEFT" => Ok(Self::GrTextHAlignLeft),
6050 "GR_TEXT_H_ALIGN_CENTER" => Ok(Self::GrTextHAlignCenter),
6051 "GR_TEXT_H_ALIGN_RIGHT" => Ok(Self::GrTextHAlignRight),
6052 _ => Err("invalid value".into()),
6053 }
6054 }
6055}
6056impl ::std::convert::TryFrom<&str> for PlotterTextHAlign {
6057 type Error = self::error::ConversionError;
6058 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6059 value.parse()
6060 }
6061}
6062impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextHAlign {
6063 type Error = self::error::ConversionError;
6064 fn try_from(
6065 value: &::std::string::String,
6066 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6067 value.parse()
6068 }
6069}
6070impl ::std::convert::TryFrom<::std::string::String> for PlotterTextHAlign {
6071 type Error = self::error::ConversionError;
6072 fn try_from(
6073 value: ::std::string::String,
6074 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6075 value.parse()
6076 }
6077}
6078#[derive(
6094 ::serde::Deserialize,
6095 ::serde::Serialize,
6096 Clone,
6097 Copy,
6098 Debug,
6099 Eq,
6100 Hash,
6101 Ord,
6102 PartialEq,
6103 PartialOrd,
6104)]
6105pub enum PlotterTextRenderCacheCoordinateSpace {
6106 #[serde(rename = "board")]
6107 Board,
6108 #[serde(rename = "footprint_local")]
6109 FootprintLocal,
6110}
6111impl ::std::fmt::Display for PlotterTextRenderCacheCoordinateSpace {
6112 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6113 match *self {
6114 Self::Board => f.write_str("board"),
6115 Self::FootprintLocal => f.write_str("footprint_local"),
6116 }
6117 }
6118}
6119impl ::std::str::FromStr for PlotterTextRenderCacheCoordinateSpace {
6120 type Err = self::error::ConversionError;
6121 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6122 match value {
6123 "board" => Ok(Self::Board),
6124 "footprint_local" => Ok(Self::FootprintLocal),
6125 _ => Err("invalid value".into()),
6126 }
6127 }
6128}
6129impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheCoordinateSpace {
6130 type Error = self::error::ConversionError;
6131 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6132 value.parse()
6133 }
6134}
6135impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
6136 type Error = self::error::ConversionError;
6137 fn try_from(
6138 value: &::std::string::String,
6139 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6140 value.parse()
6141 }
6142}
6143impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
6144 type Error = self::error::ConversionError;
6145 fn try_from(
6146 value: ::std::string::String,
6147 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6148 value.parse()
6149 }
6150}
6151#[derive(
6168 ::serde::Deserialize,
6169 ::serde::Serialize,
6170 Clone,
6171 Copy,
6172 Debug,
6173 Eq,
6174 Hash,
6175 Ord,
6176 PartialEq,
6177 PartialOrd,
6178)]
6179pub enum PlotterTextRenderCacheSource {
6180 #[serde(rename = "existing_file_cache")]
6181 ExistingFileCache,
6182 #[serde(rename = "python_generated_cache")]
6183 PythonGeneratedCache,
6184 #[serde(rename = "native_generated_cache")]
6185 NativeGeneratedCache,
6186}
6187impl ::std::fmt::Display for PlotterTextRenderCacheSource {
6188 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6189 match *self {
6190 Self::ExistingFileCache => f.write_str("existing_file_cache"),
6191 Self::PythonGeneratedCache => f.write_str("python_generated_cache"),
6192 Self::NativeGeneratedCache => f.write_str("native_generated_cache"),
6193 }
6194 }
6195}
6196impl ::std::str::FromStr for PlotterTextRenderCacheSource {
6197 type Err = self::error::ConversionError;
6198 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6199 match value {
6200 "existing_file_cache" => Ok(Self::ExistingFileCache),
6201 "python_generated_cache" => Ok(Self::PythonGeneratedCache),
6202 "native_generated_cache" => Ok(Self::NativeGeneratedCache),
6203 _ => Err("invalid value".into()),
6204 }
6205 }
6206}
6207impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheSource {
6208 type Error = self::error::ConversionError;
6209 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6210 value.parse()
6211 }
6212}
6213impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheSource {
6214 type Error = self::error::ConversionError;
6215 fn try_from(
6216 value: &::std::string::String,
6217 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6218 value.parse()
6219 }
6220}
6221impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheSource {
6222 type Error = self::error::ConversionError;
6223 fn try_from(
6224 value: ::std::string::String,
6225 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6226 value.parse()
6227 }
6228}
6229#[derive(
6246 ::serde::Deserialize,
6247 ::serde::Serialize,
6248 Clone,
6249 Copy,
6250 Debug,
6251 Eq,
6252 Hash,
6253 Ord,
6254 PartialEq,
6255 PartialOrd,
6256)]
6257pub enum PlotterTextVAlign {
6258 #[serde(rename = "GR_TEXT_V_ALIGN_TOP")]
6259 GrTextVAlignTop,
6260 #[serde(rename = "GR_TEXT_V_ALIGN_CENTER")]
6261 GrTextVAlignCenter,
6262 #[serde(rename = "GR_TEXT_V_ALIGN_BOTTOM")]
6263 GrTextVAlignBottom,
6264}
6265impl ::std::fmt::Display for PlotterTextVAlign {
6266 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6267 match *self {
6268 Self::GrTextVAlignTop => f.write_str("GR_TEXT_V_ALIGN_TOP"),
6269 Self::GrTextVAlignCenter => f.write_str("GR_TEXT_V_ALIGN_CENTER"),
6270 Self::GrTextVAlignBottom => f.write_str("GR_TEXT_V_ALIGN_BOTTOM"),
6271 }
6272 }
6273}
6274impl ::std::str::FromStr for PlotterTextVAlign {
6275 type Err = self::error::ConversionError;
6276 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6277 match value {
6278 "GR_TEXT_V_ALIGN_TOP" => Ok(Self::GrTextVAlignTop),
6279 "GR_TEXT_V_ALIGN_CENTER" => Ok(Self::GrTextVAlignCenter),
6280 "GR_TEXT_V_ALIGN_BOTTOM" => Ok(Self::GrTextVAlignBottom),
6281 _ => Err("invalid value".into()),
6282 }
6283 }
6284}
6285impl ::std::convert::TryFrom<&str> for PlotterTextVAlign {
6286 type Error = self::error::ConversionError;
6287 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6288 value.parse()
6289 }
6290}
6291impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextVAlign {
6292 type Error = self::error::ConversionError;
6293 fn try_from(
6294 value: &::std::string::String,
6295 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6296 value.parse()
6297 }
6298}
6299impl ::std::convert::TryFrom<::std::string::String> for PlotterTextVAlign {
6300 type Error = self::error::ConversionError;
6301 fn try_from(
6302 value: ::std::string::String,
6303 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6304 value.parse()
6305 }
6306}
6307#[derive(
6323 ::serde::Deserialize,
6324 ::serde::Serialize,
6325 Clone,
6326 Copy,
6327 Debug,
6328 Eq,
6329 Hash,
6330 Ord,
6331 PartialEq,
6332 PartialOrd,
6333)]
6334pub enum PlotterViaFlashRole {
6335 #[serde(rename = "via_aperture")]
6336 ViaAperture,
6337 #[serde(rename = "via_mask_opening")]
6338 ViaMaskOpening,
6339}
6340impl ::std::fmt::Display for PlotterViaFlashRole {
6341 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
6342 match *self {
6343 Self::ViaAperture => f.write_str("via_aperture"),
6344 Self::ViaMaskOpening => f.write_str("via_mask_opening"),
6345 }
6346 }
6347}
6348impl ::std::str::FromStr for PlotterViaFlashRole {
6349 type Err = self::error::ConversionError;
6350 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6351 match value {
6352 "via_aperture" => Ok(Self::ViaAperture),
6353 "via_mask_opening" => Ok(Self::ViaMaskOpening),
6354 _ => Err("invalid value".into()),
6355 }
6356 }
6357}
6358impl ::std::convert::TryFrom<&str> for PlotterViaFlashRole {
6359 type Error = self::error::ConversionError;
6360 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
6361 value.parse()
6362 }
6363}
6364impl ::std::convert::TryFrom<&::std::string::String> for PlotterViaFlashRole {
6365 type Error = self::error::ConversionError;
6366 fn try_from(
6367 value: &::std::string::String,
6368 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6369 value.parse()
6370 }
6371}
6372impl ::std::convert::TryFrom<::std::string::String> for PlotterViaFlashRole {
6373 type Error = self::error::ConversionError;
6374 fn try_from(
6375 value: ::std::string::String,
6376 ) -> ::std::result::Result<Self, self::error::ConversionError> {
6377 value.parse()
6378 }
6379}
6380#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6448#[serde(deny_unknown_fields)]
6449pub struct RectOperation {
6450 pub corner_radius_nm: crate::JavaScriptSafeInteger,
6451 pub fill: PlotterFill,
6452 #[serde(
6453 default,
6454 deserialize_with = "crate::deserialize_present_nonnull",
6455 skip_serializing_if = "::std::option::Option::is_none"
6456 )]
6457 pub fill_color: ::std::option::Option<::std::string::String>,
6458 pub index: u32,
6459 #[serde(deserialize_with = "crate::deserialize_rect_kind")]
6460 pub kind: ::std::string::String,
6461 #[serde(
6462 default,
6463 deserialize_with = "crate::deserialize_present_nonnull",
6464 skip_serializing_if = "::std::option::Option::is_none"
6465 )]
6466 pub layer: ::std::option::Option<::std::string::String>,
6467 #[serde(
6468 default,
6469 deserialize_with = "crate::deserialize_present_nonnull",
6470 skip_serializing_if = "::std::option::Option::is_none"
6471 )]
6472 pub line_style: ::std::option::Option<PlotterLineStyle>,
6473 #[serde(
6474 default,
6475 deserialize_with = "crate::deserialize_present_nonnull",
6476 skip_serializing_if = "::std::option::Option::is_none"
6477 )]
6478 pub stroke_color: ::std::option::Option<::std::string::String>,
6479 pub width_nm: crate::JavaScriptSafeInteger,
6480 pub x1: crate::JavaScriptSafeInteger,
6481 pub x2: crate::JavaScriptSafeInteger,
6482 pub y1: crate::JavaScriptSafeInteger,
6483 pub y2: crate::JavaScriptSafeInteger,
6484}
6485#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6542#[serde(deny_unknown_fields)]
6543pub struct TablePlotRecord {
6544 pub cell_count: u32,
6545 pub kind: ::std::string::String,
6546 pub layers: ::std::vec::Vec<::std::string::String>,
6547 pub object_id: ::std::string::String,
6548 pub operation_count: u32,
6549 pub operations: ::std::vec::Vec<PlotterOperation>,
6550 pub uuid: ::std::string::String,
6551}
6552#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6676#[serde(deny_unknown_fields)]
6677pub struct TextOperation {
6678 pub bold: bool,
6679 pub color: ::std::string::String,
6680 #[serde(
6681 default,
6682 deserialize_with = "crate::deserialize_present_nonnull",
6683 skip_serializing_if = "::std::option::Option::is_none"
6684 )]
6685 pub context: ::std::option::Option<PlotterOperationContext>,
6686 pub font_face: ::std::string::String,
6687 pub h_align: PlotterTextHAlign,
6688 pub index: u32,
6689 pub italic: bool,
6690 #[serde(deserialize_with = "crate::deserialize_text_kind")]
6691 pub kind: ::std::string::String,
6692 #[serde(
6693 default,
6694 deserialize_with = "crate::deserialize_present_nonnull",
6695 skip_serializing_if = "::std::option::Option::is_none"
6696 )]
6697 pub knockout: ::std::option::Option<bool>,
6698 #[serde(
6699 default,
6700 deserialize_with = "crate::deserialize_present_nonnull",
6701 skip_serializing_if = "::std::option::Option::is_none"
6702 )]
6703 pub layer: ::std::option::Option<::std::string::String>,
6704 #[serde(
6705 default,
6706 deserialize_with = "crate::deserialize_present_nonnull",
6707 skip_serializing_if = "::std::option::Option::is_none"
6708 )]
6709 pub mirror: ::std::option::Option<bool>,
6710 pub multiline: bool,
6711 pub orient_deg: f64,
6712 pub pen_width_nm: crate::JavaScriptSafeInteger,
6713 #[serde(
6714 default,
6715 deserialize_with = "crate::deserialize_present_nonnull",
6716 skip_serializing_if = "::std::option::Option::is_none"
6717 )]
6718 pub polyline_per_segment: ::std::option::Option<bool>,
6719 #[serde(
6720 default,
6721 deserialize_with = "crate::deserialize_present_nonnull",
6722 skip_serializing_if = "::std::option::Option::is_none"
6723 )]
6724 pub render_cache: ::std::option::Option<TextRenderCache>,
6725 #[serde(
6726 default,
6727 deserialize_with = "crate::deserialize_present_nonnull",
6728 skip_serializing_if = "::std::option::Option::is_none"
6729 )]
6730 pub render_cache_exact: ::std::option::Option<bool>,
6731 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6732 pub render_cache_polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
6733 #[serde(
6734 default,
6735 deserialize_with = "crate::deserialize_present_nonnull",
6736 skip_serializing_if = "::std::option::Option::is_none"
6737 )]
6738 pub render_cache_source: ::std::option::Option<PlotterTextRenderCacheSource>,
6739 pub size_x_nm: crate::JavaScriptSafeInteger,
6740 pub size_y_nm: crate::JavaScriptSafeInteger,
6741 pub text: ::std::string::String,
6742 #[serde(
6743 default,
6744 deserialize_with = "crate::deserialize_present_nonnull",
6745 skip_serializing_if = "::std::option::Option::is_none"
6746 )]
6747 pub text_as_polygons: ::std::option::Option<bool>,
6748 pub v_align: PlotterTextVAlign,
6749 pub x: crate::JavaScriptSafeInteger,
6750 pub y: crate::JavaScriptSafeInteger,
6751}
6752#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6811#[serde(deny_unknown_fields)]
6812pub struct TextRenderCache {
6813 pub angle: f64,
6814 pub coordinate_space: PlotterTextRenderCacheCoordinateSpace,
6815 pub exact: bool,
6816 #[serde(
6817 default,
6818 deserialize_with = "crate::deserialize_present_nonnull",
6819 skip_serializing_if = "::std::option::Option::is_none"
6820 )]
6821 pub knockout: ::std::option::Option<bool>,
6822 pub polygons: ::std::vec::Vec<TextRenderCachePolygon>,
6823 pub schema: ::std::string::String,
6824 pub source: PlotterTextRenderCacheSource,
6825 pub text: ::std::string::String,
6826 pub unit: ::std::string::String,
6827}
6828#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6855#[serde(deny_unknown_fields)]
6856pub struct TextRenderCachePolygon {
6857 pub contours: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
6858}
6859#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
6934#[serde(deny_unknown_fields)]
6935pub struct ThickSegmentOperation {
6936 pub end_x: crate::JavaScriptSafeInteger,
6937 pub end_y: crate::JavaScriptSafeInteger,
6938 pub index: u32,
6939 #[serde(deserialize_with = "crate::deserialize_thick_segment_kind")]
6940 pub kind: ::std::string::String,
6941 #[serde(
6942 default,
6943 deserialize_with = "crate::deserialize_present_nonnull",
6944 skip_serializing_if = "::std::option::Option::is_none"
6945 )]
6946 pub layer: ::std::option::Option<::std::string::String>,
6947 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
6948 pub layers: ::std::vec::Vec<::std::string::String>,
6949 #[serde(
6950 default,
6951 deserialize_with = "crate::deserialize_present_nonnull",
6952 skip_serializing_if = "::std::option::Option::is_none"
6953 )]
6954 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
6955 #[serde(
6956 default,
6957 deserialize_with = "crate::deserialize_present_nonnull",
6958 skip_serializing_if = "::std::option::Option::is_none"
6959 )]
6960 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
6961 #[serde(
6962 default,
6963 deserialize_with = "crate::deserialize_present_nonnull",
6964 skip_serializing_if = "::std::option::Option::is_none"
6965 )]
6966 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
6967 #[serde(
6968 default,
6969 deserialize_with = "crate::deserialize_present_nonnull",
6970 skip_serializing_if = "::std::option::Option::is_none"
6971 )]
6972 pub role: ::std::option::Option<PlotterDrillRole>,
6973 pub start_x: crate::JavaScriptSafeInteger,
6974 pub start_y: crate::JavaScriptSafeInteger,
6975 #[serde(
6976 default,
6977 deserialize_with = "crate::deserialize_present_nonnull",
6978 skip_serializing_if = "::std::option::Option::is_none"
6979 )]
6980 pub stroke_color: ::std::option::Option<::std::string::String>,
6981 pub width_nm: crate::JavaScriptSafeInteger,
6982}
6983#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7045#[serde(deny_unknown_fields)]
7046pub struct TrackArcPlotRecord {
7047 pub kind: ::std::string::String,
7048 pub layer: ::std::string::String,
7049 #[serde(
7050 default,
7051 deserialize_with = "crate::deserialize_present_nonnull",
7052 skip_serializing_if = "::std::option::Option::is_none"
7053 )]
7054 pub net_class: ::std::option::Option<::std::string::String>,
7055 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7056 pub net_classes: ::std::vec::Vec<::std::string::String>,
7057 #[serde(
7058 default,
7059 deserialize_with = "crate::deserialize_present_nonnull",
7060 skip_serializing_if = "::std::option::Option::is_none"
7061 )]
7062 pub net_id: ::std::option::Option<crate::JavaScriptSafeInteger>,
7063 #[serde(
7064 default,
7065 deserialize_with = "crate::deserialize_present_nonnull",
7066 skip_serializing_if = "::std::option::Option::is_none"
7067 )]
7068 pub net_name: ::std::option::Option<::std::string::String>,
7069 pub object_id: ::std::string::String,
7070 pub operation_count: u32,
7071 pub operations: ::std::vec::Vec<PlotterOperation>,
7072 pub uuid: ::std::string::String,
7073}
7074#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7140#[serde(deny_unknown_fields)]
7141pub struct TrackSegmentPlotRecord {
7142 pub kind: ::std::string::String,
7143 pub layer: ::std::string::String,
7144 pub locked: bool,
7145 #[serde(
7146 default,
7147 deserialize_with = "crate::deserialize_present_nonnull",
7148 skip_serializing_if = "::std::option::Option::is_none"
7149 )]
7150 pub net_class: ::std::option::Option<::std::string::String>,
7151 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7152 pub net_classes: ::std::vec::Vec<::std::string::String>,
7153 #[serde(
7154 default,
7155 deserialize_with = "crate::deserialize_present_nonnull",
7156 skip_serializing_if = "::std::option::Option::is_none"
7157 )]
7158 pub net_id: ::std::option::Option<crate::JavaScriptSafeInteger>,
7159 #[serde(
7160 default,
7161 deserialize_with = "crate::deserialize_present_nonnull",
7162 skip_serializing_if = "::std::option::Option::is_none"
7163 )]
7164 pub net_name: ::std::option::Option<::std::string::String>,
7165 pub object_id: ::std::string::String,
7166 pub operation_count: u32,
7167 pub operations: ::std::vec::Vec<PlotterOperation>,
7168 pub uuid: ::std::string::String,
7169}
7170#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7293#[serde(deny_unknown_fields)]
7294pub struct ViaPlotRecord {
7295 pub drill: f64,
7296 pub hole_kind: ::std::string::String,
7297 pub hole_plating: ::std::string::String,
7298 pub hole_render: ::std::string::String,
7299 #[serde(
7300 default,
7301 deserialize_with = "crate::deserialize_present_nonnull",
7302 skip_serializing_if = "::std::option::Option::is_none"
7303 )]
7304 pub ipc4761_capping: ::std::option::Option<PlotterStringBool>,
7305 #[serde(
7306 default,
7307 deserialize_with = "crate::deserialize_present_nonnull",
7308 skip_serializing_if = "::std::option::Option::is_none"
7309 )]
7310 pub ipc4761_covering_back: ::std::option::Option<PlotterStringBool>,
7311 #[serde(
7312 default,
7313 deserialize_with = "crate::deserialize_present_nonnull",
7314 skip_serializing_if = "::std::option::Option::is_none"
7315 )]
7316 pub ipc4761_covering_front: ::std::option::Option<PlotterStringBool>,
7317 #[serde(
7318 default,
7319 deserialize_with = "crate::deserialize_present_nonnull",
7320 skip_serializing_if = "::std::option::Option::is_none"
7321 )]
7322 pub ipc4761_filling: ::std::option::Option<PlotterStringBool>,
7323 #[serde(
7324 default,
7325 deserialize_with = "crate::deserialize_present_nonnull",
7326 skip_serializing_if = "::std::option::Option::is_none"
7327 )]
7328 pub ipc4761_metadata: ::std::option::Option<::std::string::String>,
7329 #[serde(
7330 default,
7331 deserialize_with = "crate::deserialize_present_nonnull",
7332 skip_serializing_if = "::std::option::Option::is_none"
7333 )]
7334 pub ipc4761_plugging_back: ::std::option::Option<PlotterStringBool>,
7335 #[serde(
7336 default,
7337 deserialize_with = "crate::deserialize_present_nonnull",
7338 skip_serializing_if = "::std::option::Option::is_none"
7339 )]
7340 pub ipc4761_plugging_front: ::std::option::Option<PlotterStringBool>,
7341 #[serde(
7342 default,
7343 deserialize_with = "crate::deserialize_present_nonnull",
7344 skip_serializing_if = "::std::option::Option::is_none"
7345 )]
7346 pub ipc4761_tenting_back: ::std::option::Option<PlotterStringBool>,
7347 #[serde(
7348 default,
7349 deserialize_with = "crate::deserialize_present_nonnull",
7350 skip_serializing_if = "::std::option::Option::is_none"
7351 )]
7352 pub ipc4761_tenting_front: ::std::option::Option<PlotterStringBool>,
7353 pub kind: ::std::string::String,
7354 pub layers: ::std::vec::Vec<::std::string::String>,
7355 #[serde(
7356 default,
7357 deserialize_with = "crate::deserialize_present_nonnull",
7358 skip_serializing_if = "::std::option::Option::is_none"
7359 )]
7360 pub net_class: ::std::option::Option<::std::string::String>,
7361 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7362 pub net_classes: ::std::vec::Vec<::std::string::String>,
7363 #[serde(
7364 default,
7365 deserialize_with = "crate::deserialize_present_nonnull",
7366 skip_serializing_if = "::std::option::Option::is_none"
7367 )]
7368 pub net_id: ::std::option::Option<crate::JavaScriptSafeInteger>,
7369 #[serde(
7370 default,
7371 deserialize_with = "crate::deserialize_present_nonnull",
7372 skip_serializing_if = "::std::option::Option::is_none"
7373 )]
7374 pub net_name: ::std::option::Option<::std::string::String>,
7375 pub object_id: ::std::string::String,
7376 pub operation_count: u32,
7377 pub operations: ::std::vec::Vec<PlotterOperation>,
7378 pub size: f64,
7379 pub uuid: ::std::string::String,
7380 pub via_type: BoardViaType,
7381}
7382#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
7463#[serde(deny_unknown_fields)]
7464pub struct ZoneFillPlotRecord {
7465 pub fill_island: ::std::vec::Vec<bool>,
7466 pub fill_layers: ::std::vec::Vec<::std::string::String>,
7467 pub kind: ::std::string::String,
7468 pub layers: ::std::vec::Vec<::std::string::String>,
7469 #[serde(
7470 default,
7471 deserialize_with = "crate::deserialize_present_nonnull",
7472 skip_serializing_if = "::std::option::Option::is_none"
7473 )]
7474 pub net_class: ::std::option::Option<::std::string::String>,
7475 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
7476 pub net_classes: ::std::vec::Vec<::std::string::String>,
7477 #[serde(
7478 default,
7479 deserialize_with = "crate::deserialize_present_nonnull",
7480 skip_serializing_if = "::std::option::Option::is_none"
7481 )]
7482 pub net_id: ::std::option::Option<crate::JavaScriptSafeInteger>,
7483 #[serde(
7484 default,
7485 deserialize_with = "crate::deserialize_present_nonnull",
7486 skip_serializing_if = "::std::option::Option::is_none"
7487 )]
7488 pub net_name: ::std::option::Option<::std::string::String>,
7489 pub object_id: ::std::string::String,
7490 pub operation_count: u32,
7491 pub operations: ::std::vec::Vec<PlotterOperation>,
7492 pub uuid: ::std::string::String,
7493}