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(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
329#[serde(deny_unknown_fields)]
330pub struct CircleOperation {
331 pub cx: crate::JavaScriptSafeInteger,
332 pub cy: crate::JavaScriptSafeInteger,
333 pub diameter_nm: crate::JavaScriptSafeInteger,
334 pub fill: PlotterFill,
335 #[serde(
336 default,
337 deserialize_with = "crate::deserialize_present_nonnull",
338 skip_serializing_if = "::std::option::Option::is_none"
339 )]
340 pub fill_color: ::std::option::Option<::std::string::String>,
341 pub index: u32,
342 #[serde(deserialize_with = "crate::deserialize_circle_kind")]
343 pub kind: ::std::string::String,
344 #[serde(
345 default,
346 deserialize_with = "crate::deserialize_present_nonnull",
347 skip_serializing_if = "::std::option::Option::is_none"
348 )]
349 pub layer: ::std::option::Option<::std::string::String>,
350 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
351 pub layers: ::std::vec::Vec<::std::string::String>,
352 #[serde(
353 default,
354 deserialize_with = "crate::deserialize_present_nonnull",
355 skip_serializing_if = "::std::option::Option::is_none"
356 )]
357 pub line_style: ::std::option::Option<PlotterLineStyle>,
358 #[serde(
359 default,
360 deserialize_with = "crate::deserialize_present_nonnull",
361 skip_serializing_if = "::std::option::Option::is_none"
362 )]
363 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
364 #[serde(
365 default,
366 deserialize_with = "crate::deserialize_present_nonnull",
367 skip_serializing_if = "::std::option::Option::is_none"
368 )]
369 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
370 #[serde(
371 default,
372 deserialize_with = "crate::deserialize_present_nonnull",
373 skip_serializing_if = "::std::option::Option::is_none"
374 )]
375 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
376 #[serde(
377 default,
378 deserialize_with = "crate::deserialize_present_nonnull",
379 skip_serializing_if = "::std::option::Option::is_none"
380 )]
381 pub role: ::std::option::Option<PlotterDrillRole>,
382 #[serde(
383 default,
384 deserialize_with = "crate::deserialize_present_nonnull",
385 skip_serializing_if = "::std::option::Option::is_none"
386 )]
387 pub stroke_color: ::std::option::Option<::std::string::String>,
388 pub width_nm: crate::JavaScriptSafeInteger,
389}
390#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
446#[serde(deny_unknown_fields)]
447pub struct FlashPadCircleOperation {
448 pub diameter_nm: crate::JavaScriptSafeInteger,
449 pub index: u32,
450 #[serde(deserialize_with = "crate::deserialize_flash_pad_circle_kind")]
451 pub kind: ::std::string::String,
452 pub layers: ::std::vec::Vec<::std::string::String>,
453 #[serde(
454 default,
455 deserialize_with = "crate::deserialize_present_nonnull",
456 skip_serializing_if = "::std::option::Option::is_none"
457 )]
458 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
459 #[serde(
460 default,
461 deserialize_with = "crate::deserialize_present_nonnull",
462 skip_serializing_if = "::std::option::Option::is_none"
463 )]
464 pub role: ::std::option::Option<PlotterViaFlashRole>,
465 pub x: crate::JavaScriptSafeInteger,
466 pub y: crate::JavaScriptSafeInteger,
467}
468#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
549#[serde(deny_unknown_fields)]
550pub struct FlashPadCustomOperation {
551 #[serde(
552 default,
553 deserialize_with = "crate::deserialize_present_nonnull",
554 skip_serializing_if = "::std::option::Option::is_none"
555 )]
556 pub anchor_shape: ::std::option::Option<::std::string::String>,
557 pub index: u32,
558 #[serde(deserialize_with = "crate::deserialize_flash_pad_custom_kind")]
559 pub kind: ::std::string::String,
560 pub layers: ::std::vec::Vec<::std::string::String>,
561 pub mask_margin_nm: crate::JavaScriptSafeInteger,
562 pub orient_deg: f64,
563 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
564 pub polygon_widths_nm: ::std::vec::Vec<crate::JavaScriptSafeInteger>,
565 pub polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
566 pub size_x_nm: crate::JavaScriptSafeInteger,
567 pub size_y_nm: crate::JavaScriptSafeInteger,
568 pub x: crate::JavaScriptSafeInteger,
569 pub y: crate::JavaScriptSafeInteger,
570}
571#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
630#[serde(deny_unknown_fields)]
631pub struct FlashPadOvalOperation {
632 pub index: u32,
633 #[serde(deserialize_with = "crate::deserialize_flash_pad_oval_kind")]
634 pub kind: ::std::string::String,
635 pub layers: ::std::vec::Vec<::std::string::String>,
636 pub mask_margin_nm: crate::JavaScriptSafeInteger,
637 pub orient_deg: f64,
638 pub size_x_nm: crate::JavaScriptSafeInteger,
639 pub size_y_nm: crate::JavaScriptSafeInteger,
640 pub x: crate::JavaScriptSafeInteger,
641 pub y: crate::JavaScriptSafeInteger,
642}
643#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
702#[serde(deny_unknown_fields)]
703pub struct FlashPadRectOperation {
704 pub index: u32,
705 #[serde(deserialize_with = "crate::deserialize_flash_pad_rect_kind")]
706 pub kind: ::std::string::String,
707 pub layers: ::std::vec::Vec<::std::string::String>,
708 pub mask_margin_nm: crate::JavaScriptSafeInteger,
709 pub orient_deg: f64,
710 pub size_x_nm: crate::JavaScriptSafeInteger,
711 pub size_y_nm: crate::JavaScriptSafeInteger,
712 pub x: crate::JavaScriptSafeInteger,
713 pub y: crate::JavaScriptSafeInteger,
714}
715#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
778#[serde(deny_unknown_fields)]
779pub struct FlashPadRoundRectOperation {
780 pub corner_radius_nm: crate::JavaScriptSafeInteger,
781 pub index: u32,
782 #[serde(deserialize_with = "crate::deserialize_flash_pad_round_rect_kind")]
783 pub kind: ::std::string::String,
784 pub layers: ::std::vec::Vec<::std::string::String>,
785 pub mask_margin_nm: crate::JavaScriptSafeInteger,
786 pub orient_deg: f64,
787 pub size_x_nm: crate::JavaScriptSafeInteger,
788 pub size_y_nm: crate::JavaScriptSafeInteger,
789 pub x: crate::JavaScriptSafeInteger,
790 pub y: crate::JavaScriptSafeInteger,
791}
792#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
847#[serde(deny_unknown_fields)]
848pub struct FlashPadTrapezOperation {
849 pub corners: PlotterQuad,
850 pub index: u32,
851 #[serde(deserialize_with = "crate::deserialize_flash_pad_trapez_kind")]
852 pub kind: ::std::string::String,
853 pub layers: ::std::vec::Vec<::std::string::String>,
854 pub mask_margin_nm: crate::JavaScriptSafeInteger,
855 pub orient_deg: f64,
856 pub x: crate::JavaScriptSafeInteger,
857 pub y: crate::JavaScriptSafeInteger,
858}
859#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
925#[serde(deny_unknown_fields)]
926pub struct FootprintPlotDocumentA0 {
927 pub coordinate_space: PlotterCoordinateSpace,
928 pub document_id: ::std::string::String,
929 pub generator: ::std::string::String,
930 pub generator_version: ::std::string::String,
931 pub records: ::std::vec::Vec<FootprintPlotRecord>,
932 pub schema: ::std::string::String,
933 pub source_kind: ::std::string::String,
934 #[serde(
935 default,
936 deserialize_with = "crate::deserialize_present_nonnull",
937 skip_serializing_if = "::std::option::Option::is_none"
938 )]
939 pub source_path: ::std::option::Option<::std::string::String>,
940 pub total_operations: u32,
941 pub version: crate::JavaScriptSafeInteger,
942}
943#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1017#[serde(deny_unknown_fields)]
1018pub struct FootprintPlotRecord {
1019 pub attr: ::std::vec::Vec<::std::string::String>,
1020 pub descr: ::std::string::String,
1021 pub kind: ::std::string::String,
1022 pub layer: ::std::string::String,
1023 pub locked: bool,
1024 pub name: ::std::string::String,
1025 pub object_id: ::std::string::String,
1026 pub operation_count: u32,
1027 pub operations: ::std::vec::Vec<PlotterOperation>,
1028 pub placed: bool,
1029 pub tags: ::std::string::String,
1030 pub uuid: ::std::string::String,
1031}
1032#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1091#[serde(deny_unknown_fields)]
1092pub struct PlotImageOperation {
1093 pub height_nm: crate::JavaScriptSafeInteger,
1094 pub image_data_b64: ::std::string::String,
1095 pub image_format: ::std::string::String,
1096 pub index: u32,
1097 #[serde(deserialize_with = "crate::deserialize_plot_image_kind")]
1098 pub kind: ::std::string::String,
1099 pub scale: f64,
1100 #[serde(
1101 default,
1102 deserialize_with = "crate::deserialize_present_nonnull",
1103 skip_serializing_if = "::std::option::Option::is_none"
1104 )]
1105 pub stroke_color: ::std::option::Option<::std::string::String>,
1106 pub width_nm: crate::JavaScriptSafeInteger,
1107 pub x: crate::JavaScriptSafeInteger,
1108 pub y: crate::JavaScriptSafeInteger,
1109}
1110#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1165#[serde(deny_unknown_fields)]
1166pub struct PlotPolyOperation {
1167 pub fill: PlotterFill,
1168 #[serde(
1169 default,
1170 deserialize_with = "crate::deserialize_present_nonnull",
1171 skip_serializing_if = "::std::option::Option::is_none"
1172 )]
1173 pub fill_color: ::std::option::Option<::std::string::String>,
1174 pub index: u32,
1175 #[serde(deserialize_with = "crate::deserialize_plot_poly_kind")]
1176 pub kind: ::std::string::String,
1177 #[serde(
1178 default,
1179 deserialize_with = "crate::deserialize_present_nonnull",
1180 skip_serializing_if = "::std::option::Option::is_none"
1181 )]
1182 pub layer: ::std::option::Option<::std::string::String>,
1183 #[serde(
1184 default,
1185 deserialize_with = "crate::deserialize_present_nonnull",
1186 skip_serializing_if = "::std::option::Option::is_none"
1187 )]
1188 pub line_style: ::std::option::Option<PlotterLineStyle>,
1189 pub points: ::std::vec::Vec<PlotterPoint>,
1190 #[serde(
1191 default,
1192 deserialize_with = "crate::deserialize_present_nonnull",
1193 skip_serializing_if = "::std::option::Option::is_none"
1194 )]
1195 pub stroke_color: ::std::option::Option<::std::string::String>,
1196 pub width_nm: crate::JavaScriptSafeInteger,
1197}
1198#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1225#[serde(deny_unknown_fields)]
1226pub struct PlotterCoordinateSpace {
1227 pub unit: ::std::string::String,
1228 pub y_axis: ::std::string::String,
1229}
1230#[derive(
1248 ::serde::Deserialize,
1249 ::serde::Serialize,
1250 Clone,
1251 Copy,
1252 Debug,
1253 Eq,
1254 Hash,
1255 Ord,
1256 PartialEq,
1257 PartialOrd,
1258)]
1259pub enum PlotterDrillRole {
1260 #[serde(rename = "pad_drill")]
1261 PadDrill,
1262 #[serde(rename = "npth_hole")]
1263 NpthHole,
1264 #[serde(rename = "via_drill")]
1265 ViaDrill,
1266 #[serde(rename = "via_mask_drill")]
1267 ViaMaskDrill,
1268}
1269impl ::std::fmt::Display for PlotterDrillRole {
1270 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1271 match *self {
1272 Self::PadDrill => f.write_str("pad_drill"),
1273 Self::NpthHole => f.write_str("npth_hole"),
1274 Self::ViaDrill => f.write_str("via_drill"),
1275 Self::ViaMaskDrill => f.write_str("via_mask_drill"),
1276 }
1277 }
1278}
1279impl ::std::str::FromStr for PlotterDrillRole {
1280 type Err = self::error::ConversionError;
1281 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1282 match value {
1283 "pad_drill" => Ok(Self::PadDrill),
1284 "npth_hole" => Ok(Self::NpthHole),
1285 "via_drill" => Ok(Self::ViaDrill),
1286 "via_mask_drill" => Ok(Self::ViaMaskDrill),
1287 _ => Err("invalid value".into()),
1288 }
1289 }
1290}
1291impl ::std::convert::TryFrom<&str> for PlotterDrillRole {
1292 type Error = self::error::ConversionError;
1293 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1294 value.parse()
1295 }
1296}
1297impl ::std::convert::TryFrom<&::std::string::String> for PlotterDrillRole {
1298 type Error = self::error::ConversionError;
1299 fn try_from(
1300 value: &::std::string::String,
1301 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1302 value.parse()
1303 }
1304}
1305impl ::std::convert::TryFrom<::std::string::String> for PlotterDrillRole {
1306 type Error = self::error::ConversionError;
1307 fn try_from(
1308 value: ::std::string::String,
1309 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1310 value.parse()
1311 }
1312}
1313#[derive(
1334 ::serde::Deserialize,
1335 ::serde::Serialize,
1336 Clone,
1337 Copy,
1338 Debug,
1339 Eq,
1340 Hash,
1341 Ord,
1342 PartialEq,
1343 PartialOrd,
1344)]
1345pub enum PlotterFill {
1346 #[serde(rename = "NO_FILL")]
1347 NoFill,
1348 #[serde(rename = "FILLED_SHAPE")]
1349 FilledShape,
1350 #[serde(rename = "FILLED_WITH_BG_BODYCOLOR")]
1351 FilledWithBgBodycolor,
1352 #[serde(rename = "FILLED_WITH_COLOR")]
1353 FilledWithColor,
1354 #[serde(rename = "HATCH")]
1355 Hatch,
1356 #[serde(rename = "REVERSE_HATCH")]
1357 ReverseHatch,
1358 #[serde(rename = "CROSS_HATCH")]
1359 CrossHatch,
1360}
1361impl ::std::fmt::Display for PlotterFill {
1362 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1363 match *self {
1364 Self::NoFill => f.write_str("NO_FILL"),
1365 Self::FilledShape => f.write_str("FILLED_SHAPE"),
1366 Self::FilledWithBgBodycolor => f.write_str("FILLED_WITH_BG_BODYCOLOR"),
1367 Self::FilledWithColor => f.write_str("FILLED_WITH_COLOR"),
1368 Self::Hatch => f.write_str("HATCH"),
1369 Self::ReverseHatch => f.write_str("REVERSE_HATCH"),
1370 Self::CrossHatch => f.write_str("CROSS_HATCH"),
1371 }
1372 }
1373}
1374impl ::std::str::FromStr for PlotterFill {
1375 type Err = self::error::ConversionError;
1376 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1377 match value {
1378 "NO_FILL" => Ok(Self::NoFill),
1379 "FILLED_SHAPE" => Ok(Self::FilledShape),
1380 "FILLED_WITH_BG_BODYCOLOR" => Ok(Self::FilledWithBgBodycolor),
1381 "FILLED_WITH_COLOR" => Ok(Self::FilledWithColor),
1382 "HATCH" => Ok(Self::Hatch),
1383 "REVERSE_HATCH" => Ok(Self::ReverseHatch),
1384 "CROSS_HATCH" => Ok(Self::CrossHatch),
1385 _ => Err("invalid value".into()),
1386 }
1387 }
1388}
1389impl ::std::convert::TryFrom<&str> for PlotterFill {
1390 type Error = self::error::ConversionError;
1391 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1392 value.parse()
1393 }
1394}
1395impl ::std::convert::TryFrom<&::std::string::String> for PlotterFill {
1396 type Error = self::error::ConversionError;
1397 fn try_from(
1398 value: &::std::string::String,
1399 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1400 value.parse()
1401 }
1402}
1403impl ::std::convert::TryFrom<::std::string::String> for PlotterFill {
1404 type Error = self::error::ConversionError;
1405 fn try_from(
1406 value: ::std::string::String,
1407 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1408 value.parse()
1409 }
1410}
1411#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1433#[serde(deny_unknown_fields)]
1434pub struct PlotterHyperlink {
1435 pub href: PlotterHyperlinkHref,
1436}
1437#[derive(::serde::Serialize, Clone, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
1449#[serde(transparent)]
1450pub struct PlotterHyperlinkHref(::std::string::String);
1451impl ::std::ops::Deref for PlotterHyperlinkHref {
1452 type Target = ::std::string::String;
1453 fn deref(&self) -> &::std::string::String {
1454 &self.0
1455 }
1456}
1457impl ::std::convert::From<PlotterHyperlinkHref> for ::std::string::String {
1458 fn from(value: PlotterHyperlinkHref) -> Self {
1459 value.0
1460 }
1461}
1462impl ::std::str::FromStr for PlotterHyperlinkHref {
1463 type Err = self::error::ConversionError;
1464 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1465 if value.chars().count() < 1usize {
1466 return Err("shorter than 1 characters".into());
1467 }
1468 Ok(Self(value.to_string()))
1469 }
1470}
1471impl ::std::convert::TryFrom<&str> for PlotterHyperlinkHref {
1472 type Error = self::error::ConversionError;
1473 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1474 value.parse()
1475 }
1476}
1477impl ::std::convert::TryFrom<&::std::string::String> for PlotterHyperlinkHref {
1478 type Error = self::error::ConversionError;
1479 fn try_from(
1480 value: &::std::string::String,
1481 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1482 value.parse()
1483 }
1484}
1485impl ::std::convert::TryFrom<::std::string::String> for PlotterHyperlinkHref {
1486 type Error = self::error::ConversionError;
1487 fn try_from(
1488 value: ::std::string::String,
1489 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1490 value.parse()
1491 }
1492}
1493impl<'de> ::serde::Deserialize<'de> for PlotterHyperlinkHref {
1494 fn deserialize<D>(deserializer: D) -> ::std::result::Result<Self, D::Error>
1495 where
1496 D: ::serde::Deserializer<'de>,
1497 {
1498 ::std::string::String::deserialize(deserializer)?
1499 .parse()
1500 .map_err(|e: self::error::ConversionError| {
1501 <D::Error as ::serde::de::Error>::custom(e.to_string())
1502 })
1503 }
1504}
1505#[derive(
1525 ::serde::Deserialize,
1526 ::serde::Serialize,
1527 Clone,
1528 Copy,
1529 Debug,
1530 Eq,
1531 Hash,
1532 Ord,
1533 PartialEq,
1534 PartialOrd,
1535)]
1536pub enum PlotterLineStyle {
1537 #[serde(rename = "DEFAULT")]
1538 Default,
1539 #[serde(rename = "SOLID")]
1540 Solid,
1541 #[serde(rename = "DASH")]
1542 Dash,
1543 #[serde(rename = "DOT")]
1544 Dot,
1545 #[serde(rename = "DASH_DOT")]
1546 DashDot,
1547 #[serde(rename = "DASH_DOT_DOT")]
1548 DashDotDot,
1549}
1550impl ::std::fmt::Display for PlotterLineStyle {
1551 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1552 match *self {
1553 Self::Default => f.write_str("DEFAULT"),
1554 Self::Solid => f.write_str("SOLID"),
1555 Self::Dash => f.write_str("DASH"),
1556 Self::Dot => f.write_str("DOT"),
1557 Self::DashDot => f.write_str("DASH_DOT"),
1558 Self::DashDotDot => f.write_str("DASH_DOT_DOT"),
1559 }
1560 }
1561}
1562impl ::std::str::FromStr for PlotterLineStyle {
1563 type Err = self::error::ConversionError;
1564 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1565 match value {
1566 "DEFAULT" => Ok(Self::Default),
1567 "SOLID" => Ok(Self::Solid),
1568 "DASH" => Ok(Self::Dash),
1569 "DOT" => Ok(Self::Dot),
1570 "DASH_DOT" => Ok(Self::DashDot),
1571 "DASH_DOT_DOT" => Ok(Self::DashDotDot),
1572 _ => Err("invalid value".into()),
1573 }
1574 }
1575}
1576impl ::std::convert::TryFrom<&str> for PlotterLineStyle {
1577 type Error = self::error::ConversionError;
1578 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1579 value.parse()
1580 }
1581}
1582impl ::std::convert::TryFrom<&::std::string::String> for PlotterLineStyle {
1583 type Error = self::error::ConversionError;
1584 fn try_from(
1585 value: &::std::string::String,
1586 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1587 value.parse()
1588 }
1589}
1590impl ::std::convert::TryFrom<::std::string::String> for PlotterLineStyle {
1591 type Error = self::error::ConversionError;
1592 fn try_from(
1593 value: ::std::string::String,
1594 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1595 value.parse()
1596 }
1597}
1598#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1653#[serde(untagged)]
1654pub enum PlotterOperation {
1655 ThickSegmentOperation(ThickSegmentOperation),
1656 ArcThreePointOperation(ArcThreePointOperation),
1657 CircleOperation(CircleOperation),
1658 RectOperation(RectOperation),
1659 PlotPolyOperation(PlotPolyOperation),
1660 BezierCurveOperation(BezierCurveOperation),
1661 TextOperation(TextOperation),
1662 PlotImageOperation(PlotImageOperation),
1663 FlashPadCircleOperation(FlashPadCircleOperation),
1664 FlashPadOvalOperation(FlashPadOvalOperation),
1665 FlashPadRectOperation(FlashPadRectOperation),
1666 FlashPadRoundRectOperation(FlashPadRoundRectOperation),
1667 FlashPadCustomOperation(FlashPadCustomOperation),
1668 FlashPadTrapezOperation(FlashPadTrapezOperation),
1669}
1670impl ::std::convert::From<ThickSegmentOperation> for PlotterOperation {
1671 fn from(value: ThickSegmentOperation) -> Self {
1672 Self::ThickSegmentOperation(value)
1673 }
1674}
1675impl ::std::convert::From<ArcThreePointOperation> for PlotterOperation {
1676 fn from(value: ArcThreePointOperation) -> Self {
1677 Self::ArcThreePointOperation(value)
1678 }
1679}
1680impl ::std::convert::From<CircleOperation> for PlotterOperation {
1681 fn from(value: CircleOperation) -> Self {
1682 Self::CircleOperation(value)
1683 }
1684}
1685impl ::std::convert::From<RectOperation> for PlotterOperation {
1686 fn from(value: RectOperation) -> Self {
1687 Self::RectOperation(value)
1688 }
1689}
1690impl ::std::convert::From<PlotPolyOperation> for PlotterOperation {
1691 fn from(value: PlotPolyOperation) -> Self {
1692 Self::PlotPolyOperation(value)
1693 }
1694}
1695impl ::std::convert::From<BezierCurveOperation> for PlotterOperation {
1696 fn from(value: BezierCurveOperation) -> Self {
1697 Self::BezierCurveOperation(value)
1698 }
1699}
1700impl ::std::convert::From<TextOperation> for PlotterOperation {
1701 fn from(value: TextOperation) -> Self {
1702 Self::TextOperation(value)
1703 }
1704}
1705impl ::std::convert::From<PlotImageOperation> for PlotterOperation {
1706 fn from(value: PlotImageOperation) -> Self {
1707 Self::PlotImageOperation(value)
1708 }
1709}
1710impl ::std::convert::From<FlashPadCircleOperation> for PlotterOperation {
1711 fn from(value: FlashPadCircleOperation) -> Self {
1712 Self::FlashPadCircleOperation(value)
1713 }
1714}
1715impl ::std::convert::From<FlashPadOvalOperation> for PlotterOperation {
1716 fn from(value: FlashPadOvalOperation) -> Self {
1717 Self::FlashPadOvalOperation(value)
1718 }
1719}
1720impl ::std::convert::From<FlashPadRectOperation> for PlotterOperation {
1721 fn from(value: FlashPadRectOperation) -> Self {
1722 Self::FlashPadRectOperation(value)
1723 }
1724}
1725impl ::std::convert::From<FlashPadRoundRectOperation> for PlotterOperation {
1726 fn from(value: FlashPadRoundRectOperation) -> Self {
1727 Self::FlashPadRoundRectOperation(value)
1728 }
1729}
1730impl ::std::convert::From<FlashPadCustomOperation> for PlotterOperation {
1731 fn from(value: FlashPadCustomOperation) -> Self {
1732 Self::FlashPadCustomOperation(value)
1733 }
1734}
1735impl ::std::convert::From<FlashPadTrapezOperation> for PlotterOperation {
1736 fn from(value: FlashPadTrapezOperation) -> Self {
1737 Self::FlashPadTrapezOperation(value)
1738 }
1739}
1740#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1761#[serde(deny_unknown_fields)]
1762pub struct PlotterOperationContext {
1763 pub hyperlink: PlotterHyperlink,
1764}
1765#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1782#[serde(transparent)]
1783pub struct PlotterPoint(pub [crate::JavaScriptSafeInteger; 2usize]);
1784impl ::std::ops::Deref for PlotterPoint {
1785 type Target = [crate::JavaScriptSafeInteger; 2usize];
1786 fn deref(&self) -> &[crate::JavaScriptSafeInteger; 2usize] {
1787 &self.0
1788 }
1789}
1790impl ::std::convert::From<PlotterPoint> for [crate::JavaScriptSafeInteger; 2usize] {
1791 fn from(value: PlotterPoint) -> Self {
1792 value.0
1793 }
1794}
1795impl ::std::convert::From<[crate::JavaScriptSafeInteger; 2usize]> for PlotterPoint {
1796 fn from(value: [crate::JavaScriptSafeInteger; 2usize]) -> Self {
1797 Self(value)
1798 }
1799}
1800#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
1817#[serde(transparent)]
1818pub struct PlotterQuad(pub [PlotterPoint; 4usize]);
1819impl ::std::ops::Deref for PlotterQuad {
1820 type Target = [PlotterPoint; 4usize];
1821 fn deref(&self) -> &[PlotterPoint; 4usize] {
1822 &self.0
1823 }
1824}
1825impl ::std::convert::From<PlotterQuad> for [PlotterPoint; 4usize] {
1826 fn from(value: PlotterQuad) -> Self {
1827 value.0
1828 }
1829}
1830impl ::std::convert::From<[PlotterPoint; 4usize]> for PlotterQuad {
1831 fn from(value: [PlotterPoint; 4usize]) -> Self {
1832 Self(value)
1833 }
1834}
1835#[derive(
1852 ::serde::Deserialize,
1853 ::serde::Serialize,
1854 Clone,
1855 Copy,
1856 Debug,
1857 Eq,
1858 Hash,
1859 Ord,
1860 PartialEq,
1861 PartialOrd,
1862)]
1863pub enum PlotterTextHAlign {
1864 #[serde(rename = "GR_TEXT_H_ALIGN_LEFT")]
1865 GrTextHAlignLeft,
1866 #[serde(rename = "GR_TEXT_H_ALIGN_CENTER")]
1867 GrTextHAlignCenter,
1868 #[serde(rename = "GR_TEXT_H_ALIGN_RIGHT")]
1869 GrTextHAlignRight,
1870}
1871impl ::std::fmt::Display for PlotterTextHAlign {
1872 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1873 match *self {
1874 Self::GrTextHAlignLeft => f.write_str("GR_TEXT_H_ALIGN_LEFT"),
1875 Self::GrTextHAlignCenter => f.write_str("GR_TEXT_H_ALIGN_CENTER"),
1876 Self::GrTextHAlignRight => f.write_str("GR_TEXT_H_ALIGN_RIGHT"),
1877 }
1878 }
1879}
1880impl ::std::str::FromStr for PlotterTextHAlign {
1881 type Err = self::error::ConversionError;
1882 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1883 match value {
1884 "GR_TEXT_H_ALIGN_LEFT" => Ok(Self::GrTextHAlignLeft),
1885 "GR_TEXT_H_ALIGN_CENTER" => Ok(Self::GrTextHAlignCenter),
1886 "GR_TEXT_H_ALIGN_RIGHT" => Ok(Self::GrTextHAlignRight),
1887 _ => Err("invalid value".into()),
1888 }
1889 }
1890}
1891impl ::std::convert::TryFrom<&str> for PlotterTextHAlign {
1892 type Error = self::error::ConversionError;
1893 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1894 value.parse()
1895 }
1896}
1897impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextHAlign {
1898 type Error = self::error::ConversionError;
1899 fn try_from(
1900 value: &::std::string::String,
1901 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1902 value.parse()
1903 }
1904}
1905impl ::std::convert::TryFrom<::std::string::String> for PlotterTextHAlign {
1906 type Error = self::error::ConversionError;
1907 fn try_from(
1908 value: ::std::string::String,
1909 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1910 value.parse()
1911 }
1912}
1913#[derive(
1929 ::serde::Deserialize,
1930 ::serde::Serialize,
1931 Clone,
1932 Copy,
1933 Debug,
1934 Eq,
1935 Hash,
1936 Ord,
1937 PartialEq,
1938 PartialOrd,
1939)]
1940pub enum PlotterTextRenderCacheCoordinateSpace {
1941 #[serde(rename = "board")]
1942 Board,
1943 #[serde(rename = "footprint_local")]
1944 FootprintLocal,
1945}
1946impl ::std::fmt::Display for PlotterTextRenderCacheCoordinateSpace {
1947 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
1948 match *self {
1949 Self::Board => f.write_str("board"),
1950 Self::FootprintLocal => f.write_str("footprint_local"),
1951 }
1952 }
1953}
1954impl ::std::str::FromStr for PlotterTextRenderCacheCoordinateSpace {
1955 type Err = self::error::ConversionError;
1956 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1957 match value {
1958 "board" => Ok(Self::Board),
1959 "footprint_local" => Ok(Self::FootprintLocal),
1960 _ => Err("invalid value".into()),
1961 }
1962 }
1963}
1964impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheCoordinateSpace {
1965 type Error = self::error::ConversionError;
1966 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
1967 value.parse()
1968 }
1969}
1970impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1971 type Error = self::error::ConversionError;
1972 fn try_from(
1973 value: &::std::string::String,
1974 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1975 value.parse()
1976 }
1977}
1978impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheCoordinateSpace {
1979 type Error = self::error::ConversionError;
1980 fn try_from(
1981 value: ::std::string::String,
1982 ) -> ::std::result::Result<Self, self::error::ConversionError> {
1983 value.parse()
1984 }
1985}
1986#[derive(
2003 ::serde::Deserialize,
2004 ::serde::Serialize,
2005 Clone,
2006 Copy,
2007 Debug,
2008 Eq,
2009 Hash,
2010 Ord,
2011 PartialEq,
2012 PartialOrd,
2013)]
2014pub enum PlotterTextRenderCacheSource {
2015 #[serde(rename = "existing_file_cache")]
2016 ExistingFileCache,
2017 #[serde(rename = "python_generated_cache")]
2018 PythonGeneratedCache,
2019 #[serde(rename = "native_generated_cache")]
2020 NativeGeneratedCache,
2021}
2022impl ::std::fmt::Display for PlotterTextRenderCacheSource {
2023 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2024 match *self {
2025 Self::ExistingFileCache => f.write_str("existing_file_cache"),
2026 Self::PythonGeneratedCache => f.write_str("python_generated_cache"),
2027 Self::NativeGeneratedCache => f.write_str("native_generated_cache"),
2028 }
2029 }
2030}
2031impl ::std::str::FromStr for PlotterTextRenderCacheSource {
2032 type Err = self::error::ConversionError;
2033 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2034 match value {
2035 "existing_file_cache" => Ok(Self::ExistingFileCache),
2036 "python_generated_cache" => Ok(Self::PythonGeneratedCache),
2037 "native_generated_cache" => Ok(Self::NativeGeneratedCache),
2038 _ => Err("invalid value".into()),
2039 }
2040 }
2041}
2042impl ::std::convert::TryFrom<&str> for PlotterTextRenderCacheSource {
2043 type Error = self::error::ConversionError;
2044 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2045 value.parse()
2046 }
2047}
2048impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextRenderCacheSource {
2049 type Error = self::error::ConversionError;
2050 fn try_from(
2051 value: &::std::string::String,
2052 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2053 value.parse()
2054 }
2055}
2056impl ::std::convert::TryFrom<::std::string::String> for PlotterTextRenderCacheSource {
2057 type Error = self::error::ConversionError;
2058 fn try_from(
2059 value: ::std::string::String,
2060 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2061 value.parse()
2062 }
2063}
2064#[derive(
2081 ::serde::Deserialize,
2082 ::serde::Serialize,
2083 Clone,
2084 Copy,
2085 Debug,
2086 Eq,
2087 Hash,
2088 Ord,
2089 PartialEq,
2090 PartialOrd,
2091)]
2092pub enum PlotterTextVAlign {
2093 #[serde(rename = "GR_TEXT_V_ALIGN_TOP")]
2094 GrTextVAlignTop,
2095 #[serde(rename = "GR_TEXT_V_ALIGN_CENTER")]
2096 GrTextVAlignCenter,
2097 #[serde(rename = "GR_TEXT_V_ALIGN_BOTTOM")]
2098 GrTextVAlignBottom,
2099}
2100impl ::std::fmt::Display for PlotterTextVAlign {
2101 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2102 match *self {
2103 Self::GrTextVAlignTop => f.write_str("GR_TEXT_V_ALIGN_TOP"),
2104 Self::GrTextVAlignCenter => f.write_str("GR_TEXT_V_ALIGN_CENTER"),
2105 Self::GrTextVAlignBottom => f.write_str("GR_TEXT_V_ALIGN_BOTTOM"),
2106 }
2107 }
2108}
2109impl ::std::str::FromStr for PlotterTextVAlign {
2110 type Err = self::error::ConversionError;
2111 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2112 match value {
2113 "GR_TEXT_V_ALIGN_TOP" => Ok(Self::GrTextVAlignTop),
2114 "GR_TEXT_V_ALIGN_CENTER" => Ok(Self::GrTextVAlignCenter),
2115 "GR_TEXT_V_ALIGN_BOTTOM" => Ok(Self::GrTextVAlignBottom),
2116 _ => Err("invalid value".into()),
2117 }
2118 }
2119}
2120impl ::std::convert::TryFrom<&str> for PlotterTextVAlign {
2121 type Error = self::error::ConversionError;
2122 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2123 value.parse()
2124 }
2125}
2126impl ::std::convert::TryFrom<&::std::string::String> for PlotterTextVAlign {
2127 type Error = self::error::ConversionError;
2128 fn try_from(
2129 value: &::std::string::String,
2130 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2131 value.parse()
2132 }
2133}
2134impl ::std::convert::TryFrom<::std::string::String> for PlotterTextVAlign {
2135 type Error = self::error::ConversionError;
2136 fn try_from(
2137 value: ::std::string::String,
2138 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2139 value.parse()
2140 }
2141}
2142#[derive(
2158 ::serde::Deserialize,
2159 ::serde::Serialize,
2160 Clone,
2161 Copy,
2162 Debug,
2163 Eq,
2164 Hash,
2165 Ord,
2166 PartialEq,
2167 PartialOrd,
2168)]
2169pub enum PlotterViaFlashRole {
2170 #[serde(rename = "via_aperture")]
2171 ViaAperture,
2172 #[serde(rename = "via_mask_opening")]
2173 ViaMaskOpening,
2174}
2175impl ::std::fmt::Display for PlotterViaFlashRole {
2176 fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
2177 match *self {
2178 Self::ViaAperture => f.write_str("via_aperture"),
2179 Self::ViaMaskOpening => f.write_str("via_mask_opening"),
2180 }
2181 }
2182}
2183impl ::std::str::FromStr for PlotterViaFlashRole {
2184 type Err = self::error::ConversionError;
2185 fn from_str(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2186 match value {
2187 "via_aperture" => Ok(Self::ViaAperture),
2188 "via_mask_opening" => Ok(Self::ViaMaskOpening),
2189 _ => Err("invalid value".into()),
2190 }
2191 }
2192}
2193impl ::std::convert::TryFrom<&str> for PlotterViaFlashRole {
2194 type Error = self::error::ConversionError;
2195 fn try_from(value: &str) -> ::std::result::Result<Self, self::error::ConversionError> {
2196 value.parse()
2197 }
2198}
2199impl ::std::convert::TryFrom<&::std::string::String> for PlotterViaFlashRole {
2200 type Error = self::error::ConversionError;
2201 fn try_from(
2202 value: &::std::string::String,
2203 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2204 value.parse()
2205 }
2206}
2207impl ::std::convert::TryFrom<::std::string::String> for PlotterViaFlashRole {
2208 type Error = self::error::ConversionError;
2209 fn try_from(
2210 value: ::std::string::String,
2211 ) -> ::std::result::Result<Self, self::error::ConversionError> {
2212 value.parse()
2213 }
2214}
2215#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2283#[serde(deny_unknown_fields)]
2284pub struct RectOperation {
2285 pub corner_radius_nm: crate::JavaScriptSafeInteger,
2286 pub fill: PlotterFill,
2287 #[serde(
2288 default,
2289 deserialize_with = "crate::deserialize_present_nonnull",
2290 skip_serializing_if = "::std::option::Option::is_none"
2291 )]
2292 pub fill_color: ::std::option::Option<::std::string::String>,
2293 pub index: u32,
2294 #[serde(deserialize_with = "crate::deserialize_rect_kind")]
2295 pub kind: ::std::string::String,
2296 #[serde(
2297 default,
2298 deserialize_with = "crate::deserialize_present_nonnull",
2299 skip_serializing_if = "::std::option::Option::is_none"
2300 )]
2301 pub layer: ::std::option::Option<::std::string::String>,
2302 #[serde(
2303 default,
2304 deserialize_with = "crate::deserialize_present_nonnull",
2305 skip_serializing_if = "::std::option::Option::is_none"
2306 )]
2307 pub line_style: ::std::option::Option<PlotterLineStyle>,
2308 #[serde(
2309 default,
2310 deserialize_with = "crate::deserialize_present_nonnull",
2311 skip_serializing_if = "::std::option::Option::is_none"
2312 )]
2313 pub stroke_color: ::std::option::Option<::std::string::String>,
2314 pub width_nm: crate::JavaScriptSafeInteger,
2315 pub x1: crate::JavaScriptSafeInteger,
2316 pub x2: crate::JavaScriptSafeInteger,
2317 pub y1: crate::JavaScriptSafeInteger,
2318 pub y2: crate::JavaScriptSafeInteger,
2319}
2320#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2444#[serde(deny_unknown_fields)]
2445pub struct TextOperation {
2446 pub bold: bool,
2447 pub color: ::std::string::String,
2448 #[serde(
2449 default,
2450 deserialize_with = "crate::deserialize_present_nonnull",
2451 skip_serializing_if = "::std::option::Option::is_none"
2452 )]
2453 pub context: ::std::option::Option<PlotterOperationContext>,
2454 pub font_face: ::std::string::String,
2455 pub h_align: PlotterTextHAlign,
2456 pub index: u32,
2457 pub italic: bool,
2458 #[serde(deserialize_with = "crate::deserialize_text_kind")]
2459 pub kind: ::std::string::String,
2460 #[serde(
2461 default,
2462 deserialize_with = "crate::deserialize_present_nonnull",
2463 skip_serializing_if = "::std::option::Option::is_none"
2464 )]
2465 pub knockout: ::std::option::Option<bool>,
2466 #[serde(
2467 default,
2468 deserialize_with = "crate::deserialize_present_nonnull",
2469 skip_serializing_if = "::std::option::Option::is_none"
2470 )]
2471 pub layer: ::std::option::Option<::std::string::String>,
2472 #[serde(
2473 default,
2474 deserialize_with = "crate::deserialize_present_nonnull",
2475 skip_serializing_if = "::std::option::Option::is_none"
2476 )]
2477 pub mirror: ::std::option::Option<bool>,
2478 pub multiline: bool,
2479 pub orient_deg: f64,
2480 pub pen_width_nm: crate::JavaScriptSafeInteger,
2481 #[serde(
2482 default,
2483 deserialize_with = "crate::deserialize_present_nonnull",
2484 skip_serializing_if = "::std::option::Option::is_none"
2485 )]
2486 pub polyline_per_segment: ::std::option::Option<bool>,
2487 #[serde(
2488 default,
2489 deserialize_with = "crate::deserialize_present_nonnull",
2490 skip_serializing_if = "::std::option::Option::is_none"
2491 )]
2492 pub render_cache: ::std::option::Option<TextRenderCache>,
2493 #[serde(
2494 default,
2495 deserialize_with = "crate::deserialize_present_nonnull",
2496 skip_serializing_if = "::std::option::Option::is_none"
2497 )]
2498 pub render_cache_exact: ::std::option::Option<bool>,
2499 #[serde(
2500 default,
2501 deserialize_with = "crate::reject_present_render_cache_polygons",
2502 skip_serializing_if = "::std::vec::Vec::is_empty"
2503 )]
2504 pub render_cache_polygons: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
2505 #[serde(
2506 default,
2507 deserialize_with = "crate::deserialize_present_nonnull",
2508 skip_serializing_if = "::std::option::Option::is_none"
2509 )]
2510 pub render_cache_source: ::std::option::Option<PlotterTextRenderCacheSource>,
2511 pub size_x_nm: crate::JavaScriptSafeInteger,
2512 pub size_y_nm: crate::JavaScriptSafeInteger,
2513 pub text: ::std::string::String,
2514 #[serde(
2515 default,
2516 deserialize_with = "crate::deserialize_present_nonnull",
2517 skip_serializing_if = "::std::option::Option::is_none"
2518 )]
2519 pub text_as_polygons: ::std::option::Option<bool>,
2520 pub v_align: PlotterTextVAlign,
2521 pub x: crate::JavaScriptSafeInteger,
2522 pub y: crate::JavaScriptSafeInteger,
2523}
2524#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2583#[serde(deny_unknown_fields)]
2584pub struct TextRenderCache {
2585 pub angle: f64,
2586 pub coordinate_space: PlotterTextRenderCacheCoordinateSpace,
2587 pub exact: bool,
2588 #[serde(
2589 default,
2590 deserialize_with = "crate::deserialize_present_nonnull",
2591 skip_serializing_if = "::std::option::Option::is_none"
2592 )]
2593 pub knockout: ::std::option::Option<bool>,
2594 pub polygons: ::std::vec::Vec<TextRenderCachePolygon>,
2595 pub schema: ::std::string::String,
2596 pub source: PlotterTextRenderCacheSource,
2597 pub text: ::std::string::String,
2598 pub unit: ::std::string::String,
2599}
2600#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2627#[serde(deny_unknown_fields)]
2628pub struct TextRenderCachePolygon {
2629 pub contours: ::std::vec::Vec<::std::vec::Vec<PlotterPoint>>,
2630}
2631#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
2706#[serde(deny_unknown_fields)]
2707pub struct ThickSegmentOperation {
2708 pub end_x: crate::JavaScriptSafeInteger,
2709 pub end_y: crate::JavaScriptSafeInteger,
2710 pub index: u32,
2711 #[serde(deserialize_with = "crate::deserialize_thick_segment_kind")]
2712 pub kind: ::std::string::String,
2713 #[serde(
2714 default,
2715 deserialize_with = "crate::deserialize_present_nonnull",
2716 skip_serializing_if = "::std::option::Option::is_none"
2717 )]
2718 pub layer: ::std::option::Option<::std::string::String>,
2719 #[serde(default, skip_serializing_if = "::std::vec::Vec::is_empty")]
2720 pub layers: ::std::vec::Vec<::std::string::String>,
2721 #[serde(
2722 default,
2723 deserialize_with = "crate::deserialize_present_nonnull",
2724 skip_serializing_if = "::std::option::Option::is_none"
2725 )]
2726 pub mask_margin_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2727 #[serde(
2728 default,
2729 deserialize_with = "crate::deserialize_present_nonnull",
2730 skip_serializing_if = "::std::option::Option::is_none"
2731 )]
2732 pub pad_size_x_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2733 #[serde(
2734 default,
2735 deserialize_with = "crate::deserialize_present_nonnull",
2736 skip_serializing_if = "::std::option::Option::is_none"
2737 )]
2738 pub pad_size_y_nm: ::std::option::Option<crate::JavaScriptSafeInteger>,
2739 #[serde(
2740 default,
2741 deserialize_with = "crate::deserialize_present_nonnull",
2742 skip_serializing_if = "::std::option::Option::is_none"
2743 )]
2744 pub role: ::std::option::Option<PlotterDrillRole>,
2745 pub start_x: crate::JavaScriptSafeInteger,
2746 pub start_y: crate::JavaScriptSafeInteger,
2747 #[serde(
2748 default,
2749 deserialize_with = "crate::deserialize_present_nonnull",
2750 skip_serializing_if = "::std::option::Option::is_none"
2751 )]
2752 pub stroke_color: ::std::option::Option<::std::string::String>,
2753 pub width_nm: crate::JavaScriptSafeInteger,
2754}