Skip to main content
← Back to kicad-monkey Rust Docs kicad-monkey Rust Crate API Reference

kicad_monkey_contracts/generated/
symbol_library_read_request.rs

1/// Error types.
2pub mod error {
3    /// Error from a `TryFrom` or `FromStr` implementation.
4    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///Controls a typed symbol-library summary read; source bytes are out of band.
28///
29/// <details><summary>JSON schema</summary>
30///
31/// ```json
32///{
33///  "$id": "urn:wavenumber:schema:kicad_monkey.symbol_library_read.request:a0",
34///  "title": "Symbol library read request a0",
35///  "description": "Controls a typed symbol-library summary read; source bytes are out of band.",
36///  "type": "object",
37///  "required": [
38///    "type",
39///    "version"
40///  ],
41///  "properties": {
42///    "type": {
43///      "type": "string",
44///      "const": "kicad_monkey.symbol_library_read.request"
45///    },
46///    "version": {
47///      "type": "string",
48///      "const": "a0"
49///    }
50///  },
51///  "additionalProperties": false
52///}
53/// ```
54/// </details>
55#[derive(::serde::Deserialize, ::serde::Serialize, Clone, Debug)]
56#[serde(deny_unknown_fields)]
57pub struct SymbolLibraryReadRequestA0 {
58    #[serde(rename = "type")]
59    pub type_: ::std::string::String,
60    pub version: ::std::string::String,
61}