diff --git a/petclinic/actors/visits/Cargo.lock b/petclinic/actors/visits/Cargo.lock index 203d7f04..2a0bec7e 100644 --- a/petclinic/actors/visits/Cargo.lock +++ b/petclinic/actors/visits/Cargo.lock @@ -51,12 +51,6 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70033777eb8b5124a81a1889416543dddef2de240019b674c81285a2635a7e1e" -[[package]] -name = "anyhow" -version = "1.0.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61604a8f862e1d5c3229fdd78f8b02c68dcf73a4c4b05fd636d12240aaa242c1" - [[package]] name = "ascii_tree" version = "0.1.1" @@ -74,6 +68,27 @@ dependencies = [ "futures-core", ] +[[package]] +name = "async-stream" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "171374e7e3b2504e0e5236e3b59260560f9fe94bfe9ac39ba5e4e929c5590625" +dependencies = [ + "async-stream-impl", + "futures-core", +] + +[[package]] +name = "async-stream-impl" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "648ed8c8d2ce5409ccd57453d9d1b214b342a0d69376a6feda1fd6cae3299308" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "async-task" version = "4.0.3" @@ -86,9 +101,9 @@ version = "0.1.51" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -151,12 +166,6 @@ dependencies = [ "pretty_assertions", ] -[[package]] -name = "atomic-counter" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f447d68cfa5a9ab0c1c862a703da2a65b5ed1b7ce1153c9eb0169506d56019" - [[package]] name = "atomic-waker" version = "1.0.0" @@ -174,12 +183,6 @@ dependencies = [ "winapi", ] -[[package]] -name = "autocfg" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" - [[package]] name = "autocfg" version = "1.0.1" @@ -216,6 +219,12 @@ dependencies = [ "base64", ] +[[package]] +name = "base64ct" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6b4d9b1225d28d360ec6a231d65af1fd99a2a095154c8040689617290569c5c" + [[package]] name = "bitflags" version = "1.3.2" @@ -254,9 +263,9 @@ dependencies = [ [[package]] name = "blocking" -version = "1.0.2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5e170dbede1f740736619b776d7251cb1b9095c435c34d8ca9f57fcd2f335e9" +checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" dependencies = [ "async-channel", "async-task", @@ -324,28 +333,10 @@ dependencies = [ "num-integer", "num-traits", "serde", - "time", + "time 0.1.44", "winapi", ] -[[package]] -name = "chrono-humanize" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eddc119501d583fd930cb92144e605f44e0252c38dd89d9247fffa1993375cb" -dependencies = [ - "chrono", -] - -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "concurrent-queue" version = "1.2.2" @@ -355,6 +346,12 @@ dependencies = [ "cache-padded", ] +[[package]] +name = "const-oid" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d6f2aa4d0537bcc1c74df8755072bd31c1ef1a3a1b85a68e8404a8c353b7b8b" + [[package]] name = "core-foundation" version = "0.9.1" @@ -444,7 +441,7 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg", "cfg-if 0.1.10", "lazy_static", ] @@ -465,8 +462,8 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" dependencies = [ - "quote 1.0.9", - "syn 1.0.76", + "quote", + "syn", ] [[package]] @@ -482,41 +479,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "darling" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcfbcb0c5961907597a7d1148e3af036268f2b773886b8bb3eeb1e1281d3d3d6" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afc018370c3bff3eb51f89256a6bdb18b4fdcda72d577982a14954a7a0b402c" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2 0.4.30", - "quote 0.6.13", - "strsim", - "syn 0.15.44", -] - -[[package]] -name = "darling_macro" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6d8dac1c6f1d29a41c4712b4400f878cb4fcc4c7628f298dd75038e024998d1" -dependencies = [ - "darling_core", - "quote 0.6.13", - "syn 0.15.44", -] - [[package]] name = "data-encoding" version = "2.3.2" @@ -524,28 +486,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ee2393c4a91429dffb4bedf19f4d6abf27d8a732c8ce4980305d782e5426d57" [[package]] -name = "derive_builder" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ac53fa6a3cda160df823a9346442525dcaf1e171999a1cf23e67067e4fd64d4" -dependencies = [ - "darling", - "derive_builder_core", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] - -[[package]] -name = "derive_builder_core" -version = "0.5.0" +name = "der" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0288a23da9333c246bb18c143426074a6ae96747995c5819d2947b64cd942b37" +checksum = "79b71cca7d95d7681a4b3b9cdf63c8dbc3730d0584c2c74e31416d64a90493f4" dependencies = [ - "darling", - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", + "const-oid", ] [[package]] @@ -626,12 +572,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "either" -version = "1.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" - [[package]] name = "encoding_rs" version = "0.8.28" @@ -641,19 +581,6 @@ dependencies = [ "cfg-if 1.0.0", ] -[[package]] -name = "env_logger" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36" -dependencies = [ - "atty", - "humantime 1.3.0", - "log", - "regex", - "termcolor", -] - [[package]] name = "env_logger" version = "0.8.4" @@ -661,7 +588,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" dependencies = [ "atty", - "humantime 2.1.0", + "humantime", "log", "regex", "termcolor", @@ -674,7 +601,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d2f06b9cac1506ece98fe3231e3cc9c4410ec3d5b1f24ae1c8946f0742cdefc" dependencies = [ "backtrace", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -704,33 +631,12 @@ dependencies = [ "instant", ] -[[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - [[package]] name = "fnv" version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" -[[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - [[package]] name = "form_urlencoded" version = "1.0.1" @@ -741,12 +647,6 @@ dependencies = [ "percent-encoding", ] -[[package]] -name = "fuchsia-cprng" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" - [[package]] name = "futures" version = "0.1.31" @@ -822,11 +722,11 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "18e4a4b95cea4b4ccbcf1c5675ca7c4ee4e9e75eb79944d07defde18068f79bb" dependencies = [ - "autocfg 1.0.1", + "autocfg", "proc-macro-hack", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -841,19 +741,13 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d3d00f4eddb73e498a54394f228cd55853bdf059259e8e7bc6e69d408892e99" -[[package]] -name = "futures-timer" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1de7508b218029b0f01662ed8f61b1c964b3ae99d6f25462d0f55a595109df6" - [[package]] name = "futures-util" version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36568465210a3a6ee45e1f165136d68671471a501e632e9a98d96872222b5481" dependencies = [ - "autocfg 1.0.1", + "autocfg", "futures-channel", "futures-core", "futures-io", @@ -884,7 +778,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", - "version_check 0.9.3", + "version_check", ] [[package]] @@ -949,7 +843,7 @@ dependencies = [ "log", "pest", "pest_derive", - "quick-error 2.0.1", + "quick-error", "serde", "serde_json", ] @@ -986,7 +880,7 @@ checksum = "527e8c9ac747e28542699a951517aa9a6945af506cd1f2e1b53a576c17b6cc11" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 0.4.8", ] [[package]] @@ -1012,15 +906,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6456b8a6c8f33fee7d958fcd1b60d55b11940a79e63ae87013e6d22e26034440" -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error 1.2.3", -] - [[package]] name = "humantime" version = "2.1.0" @@ -1042,7 +927,7 @@ dependencies = [ "http-body", "httparse", "httpdate", - "itoa", + "itoa 0.4.8", "pin-project-lite", "socket2", "tokio", @@ -1052,24 +937,20 @@ dependencies = [ ] [[package]] -name = "hyper-tls" -version = "0.5.0" +name = "hyper-rustls" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +checksum = "5f9f7a97316d44c0af9b0301e65010573a853a9fc97046d7331d7f6bc0fd5a64" dependencies = [ - "bytes", + "futures-util", "hyper", - "native-tls", + "log", + "rustls 0.19.1", "tokio", - "tokio-native-tls", + "tokio-rustls 0.22.0", + "webpki 0.21.4", ] -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - [[package]] name = "idna" version = "0.2.3" @@ -1087,7 +968,7 @@ version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" dependencies = [ - "autocfg 1.0.1", + "autocfg", "hashbrown", ] @@ -1107,19 +988,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "68f2d64f2edebec4ce84ad108148e67e1064789bee435edc5b60ad398714a3a9" [[package]] -name = "itertools" -version = "0.10.1" +name = "itoa" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69ddb889f9d0d08a67338271fa9b62996bc788c7796a5c18cf057420aaed5eaf" -dependencies = [ - "either", -] +checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "0.4.8" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" [[package]] name = "js-sys" @@ -1153,15 +1031,15 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.102" +version = "0.2.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2a5ac8f984bfcf3a823267e5fde638acc3325f6496633a5da6bb6eb2171e103" +checksum = "1bf2e165bb3457c8e098ea76f3e3bc9db55f87aa90d52d0e6be741470916aaa4" [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "88943dd7ef4a2e5a4bfa2753aaab3013e34ce2533d1996fb18ef591e315e2b3b" dependencies = [ "scopeguard", ] @@ -1199,7 +1077,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59accc507f1338036a0477ef61afdae33cde60840f4dfe481319ce3ad116ddf9" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -1215,7 +1093,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9761df552087b47d7651dd4d14717c35ef43d47c01e04e399530faaa427ca541" dependencies = [ "half", - "minicbor-derive", + "minicbor-derive 0.7.1", +] + +[[package]] +name = "minicbor" +version = "0.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "124d887cb82f0b1469bdac3d1b65764a381eed1a54fdab0070e5772b13114521" +dependencies = [ + "half", + "minicbor-derive 0.8.0", ] [[package]] @@ -1224,9 +1112,30 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "355264ec26c23aae1d8d4599356cbd7e84134182b8feb9573acbd6d68c09c73e" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "minicbor-derive" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f79d5d3fb4f93c77ef7b97065fb65efe6abe670795ad8bc5be9c0e12005290" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "minicbor-ser" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4377ac4fab63e0c3821e7bfff783599292fde1c88d50887131e13d7f7eac70e9" +dependencies = [ + "minicbor 0.11.3", + "serde", ] [[package]] @@ -1236,7 +1145,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ "adler", - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -1262,57 +1171,78 @@ dependencies = [ ] [[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "native-tls" -version = "0.2.8" +name = "nats" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "c3054a42edc75a723c9e4bafc23f54bd666d51f54ed37e9f56b04cdc92785e50" dependencies = [ + "base64", + "base64-url", + "blocking", + "chrono", + "crossbeam-channel", + "fastrand", + "itoa 0.4.8", + "json", "lazy_static", "libc", "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "memchr", + "nkeys 0.1.0", + "nuid", + "once_cell", + "parking_lot 0.11.2", + "regex", + "rustls 0.19.1", + "rustls-native-certs 0.5.0", + "rustls-pemfile 0.2.1", + "serde", + "serde_json", + "serde_nanos", + "serde_repr", + "url", + "webpki 0.21.4", + "winapi", ] [[package]] -name = "nats" -version = "0.16.0" +name = "nats-aflowt" +version = "0.16.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d777a1844c3c5f4148df755a978fd99bb27c898d9bf016de723cf3ffcea5f5d" +checksum = "5555762b3f169e3ea1d059de1cac345808036dce5c9a986613d5ae0b60b49d7c" dependencies = [ + "async-stream", + "async-trait", "base64", "base64-url", "blocking", - "chrono", - "crossbeam-channel", "fastrand", - "itoa", + "futures 0.3.17", + "itoa 1.0.1", "json", + "lazy_static", "libc", "log", "memchr", - "nkeys", + "nkeys 0.2.0", "nuid", "once_cell", - "parking_lot", + "parking_lot 0.12.0", + "pin-project", + "pin-utils", "regex", - "rustls", - "rustls-native-certs", + "rustls-native-certs 0.6.1", + "rustls-pemfile 0.3.0", "serde", "serde_json", + "serde_nanos", + "serde_repr", + "time 0.3.7", + "tokio", + "tokio-rustls 0.23.2", + "tokio-stream", "url", - "webpki", + "webpki 0.22.0", "winapi", ] @@ -1327,18 +1257,22 @@ dependencies = [ "ed25519-dalek", "log", "rand 0.7.3", - "signatory", + "signatory 0.21.0", ] [[package]] -name = "nom" -version = "4.2.3" +name = "nkeys" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ad2a91a8e869eeb30b9cb3119ae87773a8f4ae617f41b1eb9c154b2905f7bd6" +checksum = "0e66a7cd1358277b2a6f77078e70aea7315ff2f20db969cc61153103ec162594" dependencies = [ - "memchr", - "regex", - "version_check 0.1.5", + "byteorder", + "data-encoding", + "ed25519-dalek", + "getrandom 0.2.3", + "log", + "rand 0.8.4", + "signatory 0.23.2", ] [[package]] @@ -1366,7 +1300,7 @@ version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.1", + "autocfg", "num-traits", ] @@ -1376,7 +1310,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.1", + "autocfg", ] [[package]] @@ -1389,6 +1323,15 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97ba99ba6393e2c3734791401b66902d981cb03bf190af674ca69949b6d5fb15" +dependencies = [ + "libc", +] + [[package]] name = "object" version = "0.26.2" @@ -1416,39 +1359,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" -[[package]] -name = "openssl" -version = "0.10.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" -dependencies = [ - "bitflags", - "cfg-if 1.0.0", - "foreign-types", - "libc", - "once_cell", - "openssl-sys", -] - [[package]] name = "openssl-probe" version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" -[[package]] -name = "openssl-sys" -version = "0.9.66" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" -dependencies = [ - "autocfg 1.0.1", - "cc", - "libc", - "pkg-config", - "vcpkg", -] - [[package]] name = "output_vt100" version = "0.1.2" @@ -1478,7 +1394,17 @@ checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" dependencies = [ "instant", "lock_api", - "parking_lot_core", + "parking_lot_core 0.8.5", +] + +[[package]] +name = "parking_lot" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "87f5ec2493a61ac0506c0f4199f99070cbe83857b0337006a30f3e6719b8ef58" +dependencies = [ + "lock_api", + "parking_lot_core 0.9.1", ] [[package]] @@ -1495,12 +1421,34 @@ dependencies = [ "winapi", ] +[[package]] +name = "parking_lot_core" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28141e0cc4143da2443301914478dc976a61ffdb3f043058310c70df2fed8954" +dependencies = [ + "cfg-if 1.0.0", + "libc", + "redox_syscall", + "smallvec", + "windows-sys", +] + [[package]] name = "paste" version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "acbf547ad0c65e31259204bd90935776d1c693cec2f4ff7abb7a1bbbd40dfe58" +[[package]] +name = "pem-rfc7468" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84e93a3b1cc0510b03020f33f21e62acdde3dcaef432edc95bea377fbd4c2cd4" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.1.0" @@ -1546,9 +1494,9 @@ checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" dependencies = [ "pest", "pest_meta", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1564,7 +1512,7 @@ dependencies = [ [[package]] name = "petclinic-interface" -version = "0.2.1" +version = "0.3.0" dependencies = [ "async-trait", "futures 0.3.17", @@ -1575,16 +1523,6 @@ dependencies = [ "weld-codegen", ] -[[package]] -name = "petgraph" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" -dependencies = [ - "fixedbitset", - "indexmap", -] - [[package]] name = "pin-project" version = "1.0.8" @@ -1600,9 +1538,9 @@ version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e8fe8163d14ce7f0cdac2e040116f22eac817edabff0be91e8aff7e9accf389" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1618,10 +1556,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] -name = "pkg-config" -version = "0.3.19" +name = "pkcs8" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "ee3ef9b64d26bad0536099c816c6734379e45bbd5f14798def6809e5cc350447" +dependencies = [ + "der", + "pem-rfc7468", + "spki", + "zeroize", +] [[package]] name = "ppv-lite86" @@ -1648,10 +1592,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", - "version_check 0.9.3", + "proc-macro2", + "quote", + "syn", + "version_check", ] [[package]] @@ -1660,9 +1604,9 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "version_check 0.9.3", + "proc-macro2", + "quote", + "version_check", ] [[package]] @@ -1677,122 +1621,28 @@ version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc881b2c22681370c6a780e47af9840ef841837bc98118431d4e1868bd0c1086" -[[package]] -name = "proc-macro2" -version = "0.4.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" -dependencies = [ - "unicode-xid 0.1.0", -] - [[package]] name = "proc-macro2" version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" dependencies = [ - "unicode-xid 0.2.2", -] - -[[package]] -name = "prost" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" -dependencies = [ - "bytes", - "prost-derive", -] - -[[package]] -name = "prost-build" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355f634b43cdd80724ee7848f95770e7e70eefa6dcf14fea676216573b8fd603" -dependencies = [ - "bytes", - "heck", - "itertools", - "log", - "multimap", - "petgraph", - "prost", - "prost-types", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" -dependencies = [ - "anyhow", - "itertools", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", -] - -[[package]] -name = "prost-types" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" -dependencies = [ - "bytes", - "prost", + "unicode-xid", ] -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - [[package]] name = "quick-error" version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" -[[package]] -name = "quote" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" -dependencies = [ - "proc-macro2 0.4.30", -] - [[package]] name = "quote" version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 1.0.29", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.7", - "libc", - "rand_chacha 0.1.1", - "rand_core 0.4.2", - "rand_hc 0.1.0", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi", + "proc-macro2", ] [[package]] @@ -1820,16 +1670,6 @@ dependencies = [ "rand_hc 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.3.1", -] - [[package]] name = "rand_chacha" version = "0.2.2" @@ -1850,21 +1690,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - [[package]] name = "rand_core" version = "0.5.1" @@ -1883,15 +1708,6 @@ dependencies = [ "getrandom 0.2.3", ] -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "rand_hc" version = "0.2.0" @@ -1910,99 +1726,6 @@ dependencies = [ "rand_core 0.6.3", ] -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi", -] - -[[package]] -name = "rand_os" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi", -] - -[[package]] -name = "rand_pcg" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" -dependencies = [ - "autocfg 0.1.7", - "rand_core 0.4.2", -] - -[[package]] -name = "rand_xorshift" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "ratsio_fork_040" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589b818c8b8997d2813bdc3e61ca7405c501d9f51c6a85be70b088b18bae6ed8" -dependencies = [ - "atomic-counter", - "bytes", - "cfg-if 0.1.10", - "data-encoding", - "derive_builder", - "env_logger 0.7.1", - "futures 0.3.17", - "futures-core", - "futures-timer", - "lazy_static", - "log", - "native-tls", - "nom", - "pin-project", - "prost", - "prost-build", - "rand 0.6.5", - "regex", - "sha2", - "thiserror", - "tokio", - "tokio-native-tls", - "tokio-util", -] - -[[package]] -name = "rdrand" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" -dependencies = [ - "rand_core 0.3.1", -] - [[package]] name = "redox_syscall" version = "0.2.10" @@ -2062,23 +1785,24 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-tls", + "hyper-rustls", "ipnet", "js-sys", "lazy_static", "log", "mime", - "native-tls", "percent-encoding", "pin-project-lite", + "rustls 0.19.1", "serde", "serde_urlencoded", "tokio", - "tokio-native-tls", + "tokio-rustls 0.22.0", "url", "wasm-bindgen", "wasm-bindgen-futures", "web-sys", + "webpki-roots", "winreg", ] @@ -2139,8 +1863,20 @@ dependencies = [ "base64", "log", "ring", - "sct", - "webpki", + "sct 0.6.1", + "webpki 0.21.4", +] + +[[package]] +name = "rustls" +version = "0.20.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fbfeb8d0ddb84706bc597a5574ab8912817c52a397f819e5b614e2265206921" +dependencies = [ + "log", + "ring", + "sct 0.7.0", + "webpki 0.22.0", ] [[package]] @@ -2150,11 +1886,41 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a07b7c1885bd8ed3831c289b7870b13ef46fe0e856d288c30d9cc17d75a2092" dependencies = [ "openssl-probe", - "rustls", + "rustls 0.19.1", "schannel", "security-framework", ] +[[package]] +name = "rustls-native-certs" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ca9ebdfa27d3fc180e42879037b5338ab1c040c06affd00d8338598e7800943" +dependencies = [ + "openssl-probe", + "rustls-pemfile 0.2.1", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5eebeaeb360c87bfb72e84abdb3447159c0eaececf1bef2aecd65a8be949d1c9" +dependencies = [ + "base64", +] + +[[package]] +name = "rustls-pemfile" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee86d63972a7c661d1536fefe8c3c8407321c3df668891286de28abcd087360" +dependencies = [ + "base64", +] + [[package]] name = "ryu" version = "1.0.5" @@ -2187,6 +1953,16 @@ dependencies = [ "untrusted", ] +[[package]] +name = "sct" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d53dcdb7c9f8158937a7981b48accfd39a43af418591a5d008c7b22b5e1b7ca4" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "security-framework" version = "2.4.2" @@ -2210,6 +1986,12 @@ dependencies = [ "libc", ] +[[package]] +name = "semver" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4a3381e03edd24287172047536f20cabde766e2cd3e65e6b00fb3af51c4f38d" + [[package]] name = "serde" version = "1.0.130" @@ -2234,9 +2016,9 @@ version = "1.0.130" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2245,11 +2027,31 @@ version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0f690853975602e1bfe1ccbf50504d67174e3bcf340f23b5ea9992e0587a52d8" dependencies = [ - "itoa", + "itoa 0.4.8", "ryu", "serde", ] +[[package]] +name = "serde_nanos" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e44969a61f5d316be20a42ff97816efb3b407a924d06824c3d8a49fa8450de0e" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_repr" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "serde_urlencoded" version = "0.7.0" @@ -2257,7 +2059,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edfa57a7f8d9c1d260a549e7224100f6c43d43f9103e06dd8b4095a9b2b43ce9" dependencies = [ "form_urlencoded", - "itoa", + "itoa 0.4.8", "ryu", "serde", ] @@ -2308,6 +2110,18 @@ dependencies = [ "zeroize", ] +[[package]] +name = "signatory" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfecc059e81632eef1dd9b79e22fc28b8fe69b30d3357512a77a0ad8ee3c782" +dependencies = [ + "pkcs8", + "rand_core 0.6.3", + "signature", + "zeroize", +] + [[package]] name = "signature" version = "1.3.1" @@ -2343,10 +2157,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "strsim" -version = "0.7.0" +name = "spki" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550" +checksum = "5c01a0c15da1b0b0e1494112e7af814a678fec9bd157881b49beac661e9b6f32" +dependencies = [ + "der", +] [[package]] name = "subtle" @@ -2363,26 +2180,15 @@ dependencies = [ "zeroize", ] -[[package]] -name = "syn" -version = "0.15.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", -] - [[package]] name = "syn" version = "1.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "unicode-xid 0.2.2", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] @@ -2391,10 +2197,10 @@ version = "0.12.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", - "unicode-xid 0.2.2", + "proc-macro2", + "quote", + "syn", + "unicode-xid", ] [[package]] @@ -2435,9 +2241,9 @@ version = "1.0.29" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -2451,6 +2257,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "time" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "004cbc98f30fa233c61a38bc77e96a9106e65c88f2d3bef182ae952027e5753d" +dependencies = [ + "itoa 1.0.1", + "libc", + "num_threads", + "serde", +] + [[package]] name = "tinyvec" version = "1.4.0" @@ -2472,14 +2290,14 @@ version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4efe6fc2395938c8155973d7be49fe8d03a843726e285e100a8a383cc0154ce" dependencies = [ - "autocfg 1.0.1", + "autocfg", "bytes", "libc", "memchr", "mio", "num_cpus", "once_cell", - "parking_lot", + "parking_lot 0.11.2", "pin-project-lite", "signal-hook-registry", "tokio-macros", @@ -2502,18 +2320,41 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "54473be61f4ebe4efd09cec9bd5d16fa51d70ea0192213d754d2d500457db110" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "tokio-native-tls" -version = "0.3.0" +name = "tokio-rustls" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc6844de72e57df1980054b38be3a9f4702aba4858be64dd700181a8a6d0e1b6" +dependencies = [ + "rustls 0.19.1", + "tokio", + "webpki 0.21.4", +] + +[[package]] +name = "tokio-rustls" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a27d5f2b839802bd8267fa19b0530f5a08b9c08cd417976be2a65d130fe1c11b" +dependencies = [ + "rustls 0.20.4", + "tokio", + "webpki 0.22.0", +] + +[[package]] +name = "tokio-stream" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" +checksum = "50145484efff8818b5ccd256697f36863f587da82cf8b409c53adf1e840798e3" dependencies = [ - "native-tls", + "futures-core", + "pin-project-lite", "tokio", ] @@ -2617,12 +2458,6 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" -[[package]] -name = "unicode-xid" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" - [[package]] name = "unicode-xid" version = "0.2.2" @@ -2657,18 +2492,6 @@ dependencies = [ "serde", ] -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "version_check" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "914b1a6776c4c929a602fafd8bc742e06365d4bcbe48c30f9cca5824f70dc9dd" - [[package]] name = "version_check" version = "0.9.3" @@ -2677,7 +2500,7 @@ checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" [[package]] name = "visits" -version = "0.2.1" +version = "0.2.2" dependencies = [ "async-trait", "futures 0.3.17", @@ -2709,18 +2532,17 @@ dependencies = [ [[package]] name = "wascap" -version = "0.6.1" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b04f77b61daedf35569bcd11057dcf458de3a11d706e2b1e368c2f81313ca0c" +checksum = "32d1cfad67501627ac9344cbd89be80d2d5ebc98ef3b86862041cb26a280081f" dependencies = [ "base64", - "chrono", - "chrono-humanize", "data-encoding", - "env_logger 0.8.4", + "env_logger", + "humantime", "lazy_static", "log", - "nkeys", + "nkeys 0.2.0", "nuid", "parity-wasm", "ring", @@ -2762,9 +2584,9 @@ dependencies = [ "bumpalo", "lazy_static", "log", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-shared", ] @@ -2786,7 +2608,7 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d56146e7c495528bf6587663bea13a8eb588d39b36b679d83972e1a2dbbdacf9" dependencies = [ - "quote 1.0.9", + "quote", "wasm-bindgen-macro-support", ] @@ -2796,9 +2618,9 @@ version = "0.2.78" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7803e0eea25835f8abdc585cd3021b3deb11543c6fe226dcd30b228857c5c5ab" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2811,41 +2633,43 @@ checksum = "0237232789cf037d5480773fe568aac745bfe2afbc11a863e97901780a6b47cc" [[package]] name = "wasmbus-macros" -version = "0.1.6" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e671adea13b924e8bd56f55edeea2538be518aae864731e8883668119213ea3d" +checksum = "ac4546364f1055f1dd0bcff8f3de216df725e3ad8876a67c4aadbf731d9dfc14" dependencies = [ "proc-macro-error", - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "wasmbus-rpc" -version = "0.5.5" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cbed14115ac35e0d42cfba16fd85c93d96e0915396e35802f310026af0ac46c" +checksum = "dcb392a9edfc22cfd75a97bdf05c697a950529dd5ea06165d5d445660af7f444" dependencies = [ "async-trait", "base64", "cfg-if 1.0.0", - "chrono", "crossbeam", "data-encoding", "futures 0.3.17", "log", - "minicbor", + "minicbor 0.13.2", + "minicbor-ser", "nats", + "nats-aflowt", + "nkeys 0.2.0", "once_cell", "pin-utils", - "ratsio_fork_040", "ring", "rmp-serde", "serde", "serde_bytes", "serde_json", "thiserror", + "time 0.3.7", "tokio", "tokio-timer", "toml", @@ -2857,9 +2681,9 @@ dependencies = [ [[package]] name = "wasmcloud-interface-logging" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da3f46d0563f6a9a5d7bfaa03eab1359760696f6737d2587d9da4ce405f8acc8" +checksum = "e8e006f612a69ff5de663dd3e06a55fe3a3e85cc656ab61e88c78bc0ea7740fe" dependencies = [ "async-trait", "cfg-if 1.0.0", @@ -2873,13 +2697,13 @@ dependencies = [ [[package]] name = "wasmcloud-interface-sqldb" -version = "0.2.0" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fc4740cb22c411aa63b7a90e6e2d49e90ee13b4bcd39254ca04cc95fec7f240" +checksum = "78ce34250749f060505ec1089018cf247feb06214295048b42209e8758d048f7" dependencies = [ "async-trait", "futures 0.3.17", - "minicbor", + "minicbor 0.11.3", "serde", "serde_bytes", "serde_json", @@ -2907,11 +2731,30 @@ dependencies = [ "untrusted", ] +[[package]] +name = "webpki" +version = "0.22.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +dependencies = [ + "ring", + "untrusted", +] + +[[package]] +name = "webpki-roots" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" +dependencies = [ + "webpki 0.21.4", +] + [[package]] name = "weld-codegen" -version = "0.2.3" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad4b02d834c2a2d6a8c045d1325269942850309fa3af8037935e37db9d49f7bc" +checksum = "f68b7a284cc679b46f51e7efa156910452ca087e9518fa6cf614a9b765203db0" dependencies = [ "Inflector", "atelier_assembler", @@ -2925,9 +2768,10 @@ dependencies = [ "handlebars", "lazy_static", "lexical-sort", - "minicbor", + "minicbor 0.13.2", "reqwest", "rustc-hash", + "semver", "serde", "serde_json", "tempfile", @@ -2935,17 +2779,6 @@ dependencies = [ "toml", ] -[[package]] -name = "which" -version = "4.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea187a8ef279bc014ec368c27a920da2024d2a711109bfbe3440585d5cf27ad9" -dependencies = [ - "either", - "lazy_static", - "libc", -] - [[package]] name = "winapi" version = "0.3.9" @@ -2977,6 +2810,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3df6e476185f92a12c072be4a189a0210dcdcf512a1891d6dff9edb874deadc6" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8e92753b1c443191654ec532f14c199742964a061be25d77d7a96f09db20bf5" + +[[package]] +name = "windows_i686_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a711c68811799e017b6038e0922cb27a5e2f43a2ddb609fe0b6f3eeda9de615" + +[[package]] +name = "windows_i686_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "146c11bb1a02615db74680b32a68e2d61f553cc24c4eb5b4ca10311740e44172" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c912b12f7454c6620635bbff3450962753834be2a594819bd5e945af18ec64bc" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.32.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504a2476202769977a040c6364301a3f65d0cc9e3fb08600b2bda150a0488316" + [[package]] name = "winreg" version = "0.7.0" @@ -3001,8 +2877,8 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2c1e130bebaeab2f23886bf9acbaca14b092408c452543c857f66399cd6dab1" dependencies = [ - "proc-macro2 1.0.29", - "quote 1.0.9", - "syn 1.0.76", + "proc-macro2", + "quote", + "syn", "synstructure", ] diff --git a/petclinic/create_data.sql b/petclinic/create_data.sql new file mode 100644 index 00000000..cb477b24 --- /dev/null +++ b/petclinic/create_data.sql @@ -0,0 +1,6 @@ +insert into vets values (1, 'Doggy Days', 'Vet', 'Dogs'); +insert into vets values (2, 'Meow', 'Mixers', 'Cats'); +insert into vets values (3, 'Pear', 'It', 'Birds'); +insert into pettypes values (1, 'Dog'); +insert into pettypes values (2, 'Cat'); +insert into pettypes values (3, 'Bird'); diff --git a/petclinic/petclinic-interface/rust/src/petclinic.rs b/petclinic/petclinic-interface/rust/src/petclinic.rs index 5f835f52..68d163db 100644 --- a/petclinic/petclinic-interface/rust/src/petclinic.rs +++ b/petclinic/petclinic-interface/rust/src/petclinic.rs @@ -1,13 +1,20 @@ -// This file is generated automatically using wasmcloud/weld-codegen and smithy model definitions -// +// This file is generated automatically using wasmcloud/weld-codegen 0.4.2 -#![allow(unused_imports, clippy::ptr_arg, clippy::needless_lifetimes)] +#[allow(unused_imports)] use async_trait::async_trait; +#[allow(unused_imports)] use serde::{Deserialize, Serialize}; -use std::{borrow::Cow, io::Write, string::ToString}; +#[allow(unused_imports)] +use std::{borrow::Borrow, borrow::Cow, io::Write, string::ToString}; +#[allow(unused_imports)] use wasmbus_rpc::{ - deserialize, serialize, Context, Message, MessageDispatch, RpcError, RpcResult, SendOpts, - Timestamp, Transport, + cbor::*, + common::{ + deserialize, message_format, serialize, Context, Message, MessageDispatch, MessageFormat, + SendOpts, Transport, + }, + error::{RpcError, RpcResult}, + Timestamp, }; pub const SMITHY_VERSION: &str = "1.0"; @@ -15,46 +22,553 @@ pub const SMITHY_VERSION: &str = "1.0"; #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct AddPetRequest { #[serde(rename = "ownerId")] + #[serde(default)] pub owner_id: u64, pub pet: Pet, } +// Encode AddPetRequest as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_add_pet_request( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &AddPetRequest, +) -> RpcResult<()> { + e.map(2)?; + e.str("ownerId")?; + e.u64(val.owner_id)?; + e.str("pet")?; + encode_pet(e, &val.pet)?; + Ok(()) +} + +// Decode AddPetRequest from cbor input stream +#[doc(hidden)] +pub fn decode_add_pet_request( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut owner_id: Option = None; + let mut pet: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct AddPetRequest, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct AddPetRequest: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => owner_id = Some(d.u64()?), + 1 => pet = Some(decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct AddPetRequest: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "ownerId" => owner_id = Some(d.u64()?), + "pet" => { + pet = Some(decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?) + } + _ => d.skip()?, + } + } + } + AddPetRequest { + owner_id: if let Some(__x) = owner_id { + __x + } else { + return Err(RpcError::Deser( + "missing field AddPetRequest.owner_id (#0)".to_string(), + )); + }, + + pet: if let Some(__x) = pet { + __x + } else { + return Err(RpcError::Deser( + "missing field AddPetRequest.pet (#1)".to_string(), + )); + }, + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct CreateOwnerReply { + #[serde(default)] pub id: u64, #[serde(default)] pub success: bool, } +// Encode CreateOwnerReply as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_create_owner_reply( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &CreateOwnerReply, +) -> RpcResult<()> { + e.map(2)?; + e.str("id")?; + e.u64(val.id)?; + e.str("success")?; + e.bool(val.success)?; + Ok(()) +} + +// Decode CreateOwnerReply from cbor input stream +#[doc(hidden)] +pub fn decode_create_owner_reply( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut id: Option = None; + let mut success: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct CreateOwnerReply, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct CreateOwnerReply: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => id = Some(d.u64()?), + 1 => success = Some(d.bool()?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct CreateOwnerReply: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "id" => id = Some(d.u64()?), + "success" => success = Some(d.bool()?), + _ => d.skip()?, + } + } + } + CreateOwnerReply { + id: if let Some(__x) = id { + __x + } else { + return Err(RpcError::Deser( + "missing field CreateOwnerReply.id (#0)".to_string(), + )); + }, + + success: if let Some(__x) = success { + __x + } else { + return Err(RpcError::Deser( + "missing field CreateOwnerReply.success (#1)".to_string(), + )); + }, + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Date { + #[serde(default)] pub day: u8, + #[serde(default)] pub month: u8, + #[serde(default)] pub year: u16, } +// Encode Date as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_date( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Date, +) -> RpcResult<()> { + e.map(3)?; + e.str("day")?; + e.u8(val.day)?; + e.str("month")?; + e.u8(val.month)?; + e.str("year")?; + e.u16(val.year)?; + Ok(()) +} + +// Decode Date from cbor input stream +#[doc(hidden)] +pub fn decode_date(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut day: Option = None; + let mut month: Option = None; + let mut year: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct Date, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser("decoding struct Date: indefinite array not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => day = Some(d.u8()?), + 1 => month = Some(d.u8()?), + 2 => year = Some(d.u16()?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct Date: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "day" => day = Some(d.u8()?), + "month" => month = Some(d.u8()?), + "year" => year = Some(d.u16()?), + _ => d.skip()?, + } + } + } + Date { + day: if let Some(__x) = day { + __x + } else { + return Err(RpcError::Deser("missing field Date.day (#0)".to_string())); + }, + + month: if let Some(__x) = month { + __x + } else { + return Err(RpcError::Deser("missing field Date.month (#1)".to_string())); + }, + + year: if let Some(__x) = year { + __x + } else { + return Err(RpcError::Deser("missing field Date.year (#2)".to_string())); + }, + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct FindOwnerReply { #[serde(default, skip_serializing_if = "Option::is_none")] pub owner: Option, } +// Encode FindOwnerReply as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_find_owner_reply( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &FindOwnerReply, +) -> RpcResult<()> { + e.map(1)?; + if let Some(val) = val.owner.as_ref() { + e.str("owner")?; + encode_owner(e, val)?; + } else { + e.null()?; + } + Ok(()) +} + +// Decode FindOwnerReply from cbor input stream +#[doc(hidden)] +pub fn decode_find_owner_reply( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut owner: Option> = Some(None); + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct FindOwnerReply, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct FindOwnerReply: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => { + owner = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_owner(d).map_err(|e| format!("decoding 'Owner': {}", e))?, + )) + } + } + + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct FindOwnerReply: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "owner" => { + owner = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_owner(d).map_err(|e| format!("decoding 'Owner': {}", e))?, + )) + } + } + _ => d.skip()?, + } + } + } + FindOwnerReply { + owner: owner.unwrap(), + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct FindPetReply { #[serde(default, skip_serializing_if = "Option::is_none")] pub pet: Option, } +// Encode FindPetReply as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_find_pet_reply( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &FindPetReply, +) -> RpcResult<()> { + e.map(1)?; + if let Some(val) = val.pet.as_ref() { + e.str("pet")?; + encode_pet(e, val)?; + } else { + e.null()?; + } + Ok(()) +} + +// Decode FindPetReply from cbor input stream +#[doc(hidden)] +pub fn decode_find_pet_reply( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut pet: Option> = Some(None); + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct FindPetReply, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct FindPetReply: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => { + pet = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?, + )) + } + } + + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct FindPetReply: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "pet" => { + pet = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?, + )) + } + } + _ => d.skip()?, + } + } + } + FindPetReply { pet: pet.unwrap() } + }; + Ok(__result) +} /// Request to list visits #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct ListVisitsRequest { #[serde(rename = "ownerId")] + #[serde(default)] pub owner_id: u64, #[serde(rename = "petIds")] #[serde(default, skip_serializing_if = "Option::is_none")] pub pet_ids: Option, } +// Encode ListVisitsRequest as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_list_visits_request( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &ListVisitsRequest, +) -> RpcResult<()> { + e.map(2)?; + e.str("ownerId")?; + e.u64(val.owner_id)?; + if let Some(val) = val.pet_ids.as_ref() { + e.str("petIds")?; + encode_pet_id_list(e, val)?; + } else { + e.null()?; + } + Ok(()) +} + +// Decode ListVisitsRequest from cbor input stream +#[doc(hidden)] +pub fn decode_list_visits_request( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut owner_id: Option = None; + let mut pet_ids: Option> = Some(None); + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct ListVisitsRequest, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct ListVisitsRequest: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => owner_id = Some(d.u64()?), + 1 => { + pet_ids = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_pet_id_list(d) + .map_err(|e| format!("decoding 'PetIdList': {}", e))?, + )) + } + } + + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct ListVisitsRequest: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "ownerId" => owner_id = Some(d.u64()?), + "petIds" => { + pet_ids = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some( + decode_pet_id_list(d) + .map_err(|e| format!("decoding 'PetIdList': {}", e))?, + )) + } + } + _ => d.skip()?, + } + } + } + ListVisitsRequest { + owner_id: if let Some(__x) = owner_id { + __x + } else { + return Err(RpcError::Deser( + "missing field ListVisitsRequest.owner_id (#0)".to_string(), + )); + }, + pet_ids: pet_ids.unwrap(), + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Owner { #[serde(default, skip_serializing_if = "Option::is_none")] @@ -66,6 +580,7 @@ pub struct Owner { #[serde(rename = "firstName")] #[serde(default)] pub first_name: String, + #[serde(default)] pub id: u64, #[serde(rename = "lastName")] #[serde(default, skip_serializing_if = "Option::is_none")] @@ -74,58 +589,842 @@ pub struct Owner { pub telephone: Option, } +// Encode Owner as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_owner( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Owner, +) -> RpcResult<()> { + e.map(7)?; + if let Some(val) = val.address.as_ref() { + e.str("address")?; + e.str(val)?; + } else { + e.null()?; + } + if let Some(val) = val.city.as_ref() { + e.str("city")?; + e.str(val)?; + } else { + e.null()?; + } + e.str("email")?; + e.str(&val.email)?; + e.str("firstName")?; + e.str(&val.first_name)?; + e.str("id")?; + e.u64(val.id)?; + if let Some(val) = val.last_name.as_ref() { + e.str("lastName")?; + e.str(val)?; + } else { + e.null()?; + } + if let Some(val) = val.telephone.as_ref() { + e.str("telephone")?; + e.str(val)?; + } else { + e.null()?; + } + Ok(()) +} + +// Decode Owner from cbor input stream +#[doc(hidden)] +pub fn decode_owner(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut address: Option> = Some(None); + let mut city: Option> = Some(None); + let mut email: Option = None; + let mut first_name: Option = None; + let mut id: Option = None; + let mut last_name: Option> = Some(None); + let mut telephone: Option> = Some(None); + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct Owner, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser("decoding struct Owner: indefinite array not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => { + address = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + 1 => { + city = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + 2 => email = Some(d.str()?.to_string()), + 3 => first_name = Some(d.str()?.to_string()), + 4 => id = Some(d.u64()?), + 5 => { + last_name = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + 6 => { + telephone = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct Owner: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "address" => { + address = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + "city" => { + city = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + "email" => email = Some(d.str()?.to_string()), + "firstName" => first_name = Some(d.str()?.to_string()), + "id" => id = Some(d.u64()?), + "lastName" => { + last_name = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + "telephone" => { + telephone = if wasmbus_rpc::cbor::Type::Null == d.datatype()? { + d.skip()?; + Some(None) + } else { + Some(Some(d.str()?.to_string())) + } + } + _ => d.skip()?, + } + } + } + Owner { + address: address.unwrap(), + city: city.unwrap(), + + email: if let Some(__x) = email { + __x + } else { + return Err(RpcError::Deser( + "missing field Owner.email (#2)".to_string(), + )); + }, + + first_name: if let Some(__x) = first_name { + __x + } else { + return Err(RpcError::Deser( + "missing field Owner.first_name (#3)".to_string(), + )); + }, + + id: if let Some(__x) = id { + __x + } else { + return Err(RpcError::Deser("missing field Owner.id (#4)".to_string())); + }, + last_name: last_name.unwrap(), + telephone: telephone.unwrap(), + } + }; + Ok(__result) +} pub type OwnersList = Vec; +// Encode OwnersList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_owners_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &OwnersList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + encode_owner(e, item)?; + } + Ok(()) +} + +// Decode OwnersList from cbor input stream +#[doc(hidden)] +pub fn decode_owners_list(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(decode_owner(d).map_err(|e| format!("decoding 'Owner': {}", e))?) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => { + arr.push(decode_owner(d).map_err(|e| format!("decoding 'Owner': {}", e))?) + } + } + } + arr + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Pet { pub birthdate: Date, + #[serde(default)] pub id: u64, #[serde(default)] pub name: String, #[serde(rename = "petType")] + #[serde(default)] pub pet_type: u64, } +// Encode Pet as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_pet( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Pet, +) -> RpcResult<()> { + e.map(4)?; + e.str("birthdate")?; + encode_date(e, &val.birthdate)?; + e.str("id")?; + e.u64(val.id)?; + e.str("name")?; + e.str(&val.name)?; + e.str("petType")?; + e.u64(val.pet_type)?; + Ok(()) +} + +// Decode Pet from cbor input stream +#[doc(hidden)] +pub fn decode_pet(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut birthdate: Option = None; + let mut id: Option = None; + let mut name: Option = None; + let mut pet_type: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct Pet, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser("decoding struct Pet: indefinite array not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => { + birthdate = + Some(decode_date(d).map_err(|e| format!("decoding 'Date': {}", e))?) + } + 1 => id = Some(d.u64()?), + 2 => name = Some(d.str()?.to_string()), + 3 => pet_type = Some(d.u64()?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct Pet: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "birthdate" => { + birthdate = + Some(decode_date(d).map_err(|e| format!("decoding 'Date': {}", e))?) + } + "id" => id = Some(d.u64()?), + "name" => name = Some(d.str()?.to_string()), + "petType" => pet_type = Some(d.u64()?), + _ => d.skip()?, + } + } + } + Pet { + birthdate: if let Some(__x) = birthdate { + __x + } else { + return Err(RpcError::Deser( + "missing field Pet.birthdate (#0)".to_string(), + )); + }, + + id: if let Some(__x) = id { + __x + } else { + return Err(RpcError::Deser("missing field Pet.id (#1)".to_string())); + }, + + name: if let Some(__x) = name { + __x + } else { + return Err(RpcError::Deser("missing field Pet.name (#2)".to_string())); + }, + + pet_type: if let Some(__x) = pet_type { + __x + } else { + return Err(RpcError::Deser( + "missing field Pet.pet_type (#3)".to_string(), + )); + }, + } + }; + Ok(__result) +} pub type PetIdList = Vec; +// Encode PetIdList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_pet_id_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &PetIdList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + e.u64(*item)?; + } + Ok(()) +} + +// Decode PetIdList from cbor input stream +#[doc(hidden)] +pub fn decode_pet_id_list(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(d.u64()?) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => arr.push(d.u64()?), + } + } + arr + } + }; + Ok(__result) +} pub type PetList = Vec; +// Encode PetList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_pet_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &PetList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + encode_pet(e, item)?; + } + Ok(()) +} + +// Decode PetList from cbor input stream +#[doc(hidden)] +pub fn decode_pet_list(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => arr.push(decode_pet(d).map_err(|e| format!("decoding 'Pet': {}", e))?), + } + } + arr + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct PetType { + #[serde(default)] pub id: u64, #[serde(default)] pub name: String, } +// Encode PetType as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_pet_type( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &PetType, +) -> RpcResult<()> { + e.map(2)?; + e.str("id")?; + e.u64(val.id)?; + e.str("name")?; + e.str(&val.name)?; + Ok(()) +} + +// Decode PetType from cbor input stream +#[doc(hidden)] +pub fn decode_pet_type(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut id: Option = None; + let mut name: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct PetType, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct PetType: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => id = Some(d.u64()?), + 1 => name = Some(d.str()?.to_string()), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct PetType: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "id" => id = Some(d.u64()?), + "name" => name = Some(d.str()?.to_string()), + _ => d.skip()?, + } + } + } + PetType { + id: if let Some(__x) = id { + __x + } else { + return Err(RpcError::Deser("missing field PetType.id (#0)".to_string())); + }, + + name: if let Some(__x) = name { + __x + } else { + return Err(RpcError::Deser( + "missing field PetType.name (#1)".to_string(), + )); + }, + } + }; + Ok(__result) +} pub type PetTypeList = Vec; +// Encode PetTypeList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_pet_type_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &PetTypeList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + encode_pet_type(e, item)?; + } + Ok(()) +} + +// Decode PetTypeList from cbor input stream +#[doc(hidden)] +pub fn decode_pet_type_list( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(decode_pet_type(d).map_err(|e| format!("decoding 'PetType': {}", e))?) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => arr.push( + decode_pet_type(d).map_err(|e| format!("decoding 'PetType': {}", e))?, + ), + } + } + arr + } + }; + Ok(__result) +} /// Request to record a visit #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct RecordVisitRequest { #[serde(rename = "ownerId")] + #[serde(default)] pub owner_id: u64, pub visit: Visit, } +// Encode RecordVisitRequest as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_record_visit_request( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &RecordVisitRequest, +) -> RpcResult<()> { + e.map(2)?; + e.str("ownerId")?; + e.u64(val.owner_id)?; + e.str("visit")?; + encode_visit(e, &val.visit)?; + Ok(()) +} + +// Decode RecordVisitRequest from cbor input stream +#[doc(hidden)] +pub fn decode_record_visit_request( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut owner_id: Option = None; + let mut visit: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct RecordVisitRequest, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct RecordVisitRequest: indefinite array not supported" + .to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => owner_id = Some(d.u64()?), + 1 => { + visit = + Some(decode_visit(d).map_err(|e| format!("decoding 'Visit': {}", e))?) + } + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct RecordVisitRequest: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "ownerId" => owner_id = Some(d.u64()?), + "visit" => { + visit = + Some(decode_visit(d).map_err(|e| format!("decoding 'Visit': {}", e))?) + } + _ => d.skip()?, + } + } + } + RecordVisitRequest { + owner_id: if let Some(__x) = owner_id { + __x + } else { + return Err(RpcError::Deser( + "missing field RecordVisitRequest.owner_id (#0)".to_string(), + )); + }, + + visit: if let Some(__x) = visit { + __x + } else { + return Err(RpcError::Deser( + "missing field RecordVisitRequest.visit (#1)".to_string(), + )); + }, + } + }; + Ok(__result) +} pub type SpecialtyList = Vec; +// Encode SpecialtyList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_specialty_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &SpecialtyList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + e.str(item)?; + } + Ok(()) +} + +// Decode SpecialtyList from cbor input stream +#[doc(hidden)] +pub fn decode_specialty_list( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(d.str()?.to_string()) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => arr.push(d.str()?.to_string()), + } + } + arr + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Time { + #[serde(default)] pub hour: u8, + #[serde(default)] pub minute: u8, } +// Encode Time as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_time( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Time, +) -> RpcResult<()> { + e.map(2)?; + e.str("hour")?; + e.u8(val.hour)?; + e.str("minute")?; + e.u8(val.minute)?; + Ok(()) +} + +// Decode Time from cbor input stream +#[doc(hidden)] +pub fn decode_time(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut hour: Option = None; + let mut minute: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct Time, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser("decoding struct Time: indefinite array not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => hour = Some(d.u8()?), + 1 => minute = Some(d.u8()?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct Time: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "hour" => hour = Some(d.u8()?), + "minute" => minute = Some(d.u8()?), + _ => d.skip()?, + } + } + } + Time { + hour: if let Some(__x) = hour { + __x + } else { + return Err(RpcError::Deser("missing field Time.hour (#0)".to_string())); + }, + + minute: if let Some(__x) = minute { + __x + } else { + return Err(RpcError::Deser( + "missing field Time.minute (#1)".to_string(), + )); + }, + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct UpdateOwnerReply { #[serde(default)] pub success: bool, } +// Encode UpdateOwnerReply as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_update_owner_reply( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &UpdateOwnerReply, +) -> RpcResult<()> { + e.map(1)?; + e.str("success")?; + e.bool(val.success)?; + Ok(()) +} + +// Decode UpdateOwnerReply from cbor input stream +#[doc(hidden)] +pub fn decode_update_owner_reply( + d: &mut wasmbus_rpc::cbor::Decoder<'_>, +) -> Result { + let __result = { + let mut success: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct UpdateOwnerReply, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct UpdateOwnerReply: indefinite array not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => success = Some(d.bool()?), + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser( + "decoding struct UpdateOwnerReply: indefinite map not supported".to_string(), + ) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "success" => success = Some(d.bool()?), + _ => d.skip()?, + } + } + } + UpdateOwnerReply { + success: if let Some(__x) = success { + __x + } else { + return Err(RpcError::Deser( + "missing field UpdateOwnerReply.success (#0)".to_string(), + )); + }, + } + }; + Ok(__result) +} #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Vet { #[serde(rename = "firstName")] #[serde(default)] pub first_name: String, + #[serde(default)] pub id: u64, #[serde(rename = "lastName")] #[serde(default)] @@ -133,8 +1432,153 @@ pub struct Vet { pub specialties: SpecialtyList, } +// Encode Vet as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_vet( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Vet, +) -> RpcResult<()> { + e.map(4)?; + e.str("firstName")?; + e.str(&val.first_name)?; + e.str("id")?; + e.u64(val.id)?; + e.str("lastName")?; + e.str(&val.last_name)?; + e.str("specialties")?; + encode_specialty_list(e, &val.specialties)?; + Ok(()) +} + +// Decode Vet from cbor input stream +#[doc(hidden)] +pub fn decode_vet(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut first_name: Option = None; + let mut id: Option = None; + let mut last_name: Option = None; + let mut specialties: Option = None; + + let is_array = match d.datatype()? { + wasmbus_rpc::cbor::Type::Array => true, + wasmbus_rpc::cbor::Type::Map => false, + _ => { + return Err(RpcError::Deser( + "decoding struct Vet, expected array or map".to_string(), + )) + } + }; + if is_array { + let len = d.array()?.ok_or_else(|| { + RpcError::Deser("decoding struct Vet: indefinite array not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match __i { + 0 => first_name = Some(d.str()?.to_string()), + 1 => id = Some(d.u64()?), + 2 => last_name = Some(d.str()?.to_string()), + 3 => { + specialties = Some( + decode_specialty_list(d) + .map_err(|e| format!("decoding 'SpecialtyList': {}", e))?, + ) + } + _ => d.skip()?, + } + } + } else { + let len = d.map()?.ok_or_else(|| { + RpcError::Deser("decoding struct Vet: indefinite map not supported".to_string()) + })?; + for __i in 0..(len as usize) { + match d.str()? { + "firstName" => first_name = Some(d.str()?.to_string()), + "id" => id = Some(d.u64()?), + "lastName" => last_name = Some(d.str()?.to_string()), + "specialties" => { + specialties = Some( + decode_specialty_list(d) + .map_err(|e| format!("decoding 'SpecialtyList': {}", e))?, + ) + } + _ => d.skip()?, + } + } + } + Vet { + first_name: if let Some(__x) = first_name { + __x + } else { + return Err(RpcError::Deser( + "missing field Vet.first_name (#0)".to_string(), + )); + }, + + id: if let Some(__x) = id { + __x + } else { + return Err(RpcError::Deser("missing field Vet.id (#1)".to_string())); + }, + + last_name: if let Some(__x) = last_name { + __x + } else { + return Err(RpcError::Deser( + "missing field Vet.last_name (#2)".to_string(), + )); + }, + + specialties: if let Some(__x) = specialties { + __x + } else { + return Err(RpcError::Deser( + "missing field Vet.specialties (#3)".to_string(), + )); + }, + } + }; + Ok(__result) +} pub type VetList = Vec; +// Encode VetList as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_vet_list( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &VetList, +) -> RpcResult<()> { + e.array(val.len() as u64)?; + for item in val.iter() { + encode_vet(e, item)?; + } + Ok(()) +} + +// Decode VetList from cbor input stream +#[doc(hidden)] +pub fn decode_vet_list(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + if let Some(n) = d.array()? { + let mut arr: Vec = Vec::with_capacity(n as usize); + for _ in 0..(n as usize) { + arr.push(decode_vet(d).map_err(|e| format!("decoding 'Vet': {}", e))?) + } + arr + } else { + // indefinite array + let mut arr: Vec = Vec::new(); + loop { + match d.datatype() { + Err(_) => break, + Ok(wasmbus_rpc::cbor::Type::Break) => break, + Ok(_) => arr.push(decode_vet(d).map_err(|e| format!("decoding 'Vet': {}", e))?), + } + } + arr + } + }; + Ok(__result) +} /// The core metadata for a veterinarian visit #[derive(Clone, Debug, Default, Deserialize, Eq, PartialEq, Serialize)] pub struct Visit { @@ -145,229 +1589,174 @@ pub struct Visit { pub description: String, /// The ID of the pet involved in the visit #[serde(rename = "petId")] + #[serde(default)] pub pet_id: u64, /// The time the visit occurred pub time: Time, /// ID of the veterinarian who saw the given pet on this visit #[serde(rename = "vetId")] + #[serde(default)] pub vet_id: u64, } -pub type VisitList = Vec; - -/// wasmbus.actorReceive -#[async_trait] -pub trait Visits { - /// Retrieve a list of visits for a given owner and an optional - /// list of pet IDs - async fn list_visits(&self, ctx: &Context, arg: &ListVisitsRequest) -> RpcResult; - /// Records a new visit - async fn record_visit(&self, ctx: &Context, arg: &RecordVisitRequest) -> RpcResult; +// Encode Visit as CBOR and append to output stream +#[doc(hidden)] +pub fn encode_visit( + e: &mut wasmbus_rpc::cbor::Encoder, + val: &Visit, +) -> RpcResult<()> { + e.map(5)?; + e.str("date")?; + encode_date(e, &val.date)?; + e.str("description")?; + e.str(&val.description)?; + e.str("petId")?; + e.u64(val.pet_id)?; + e.str("time")?; + encode_time(e, &val.time)?; + e.str("vetId")?; + e.u64(val.vet_id)?; + Ok(()) } -/// VisitsReceiver receives messages defined in the Visits service trait +// Decode Visit from cbor input stream #[doc(hidden)] -#[async_trait] -pub trait VisitsReceiver: MessageDispatch + Visits { - async fn dispatch(&self, ctx: &Context, message: &Message<'_>) -> RpcResult> { - match message.method { - "ListVisits" => { - let value: ListVisitsRequest = deserialize(message.arg.as_ref()) - .map_err(|e| RpcError::Deser(format!("message '{}': {}", message.method, e)))?; - let resp = Visits::list_visits(self, ctx, &value).await?; - let buf = serialize(&resp)?; - Ok(Message { - method: "Visits.ListVisits", - arg: Cow::Owned(buf), - }) +pub fn decode_visit(d: &mut wasmbus_rpc::cbor::Decoder<'_>) -> Result { + let __result = { + let mut date: Option = None; + let mut description: Option = None; + let mut pet_id: Option = None; + let mut time: Option