From 8c6c46a26e236c1f4596e73bc08d79b5dcadd731 Mon Sep 17 00:00:00 2001 From: _ <_@_> Date: Wed, 15 Jan 2025 01:40:24 +0000 Subject: [PATCH] initial commit --- .gitignore | 2 + Cargo.lock | 1513 ++++++++++++++++++++++++++++++++++++++++++ Cargo.toml | 13 + data/empire_city.xml | 169 +++++ data/sunset_city.xml | 169 +++++ data/windy_city.xml | 186 ++++++ examples/reqwest.rs | 31 + src/lib.rs | 193 ++++++ 8 files changed, 2276 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 data/empire_city.xml create mode 100644 data/sunset_city.xml create mode 100644 data/windy_city.xml create mode 100644 examples/reqwest.rs create mode 100644 src/lib.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..350f73e --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +/untracked diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..0c3fad8 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,1513 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 4 + +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + +[[package]] +name = "anyhow" +version = "1.0.95" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" + +[[package]] +name = "atomic-waker" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" + +[[package]] +name = "autocfg" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" + +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets", +] + +[[package]] +name = "base64" +version = "0.22.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "bitflags" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be3f42a67d6d345ecd59f675f3f012d6974981560836e938c22b424b85ce1be" + +[[package]] +name = "bumpalo" +version = "3.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" + +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" + +[[package]] +name = "cc" +version = "1.2.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8293772165d9345bdaaa39b45b2109591e63fe5e6fbc23c6ff930a048aa310b" +dependencies = [ + "shlex", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + +[[package]] +name = "fastrand" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" + +[[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.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-task", + "pin-project-lite", + "pin-utils", +] + +[[package]] +name = "getrandom" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "h2" +version = "0.4.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ccae279728d634d083c00f6099cb58f01cc99c145b84b8be2f6c74618d79922e" +dependencies = [ + "atomic-waker", + "bytes", + "fnv", + "futures-core", + "futures-sink", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hashbrown" +version = "0.15.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" + +[[package]] +name = "http" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f16ca2af56261c99fba8bac40a10251ce8188205a4c448fbb745a2e4daa76fea" +dependencies = [ + "bytes", + "fnv", + "itoa", +] + +[[package]] +name = "http-body" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +dependencies = [ + "bytes", + "http", +] + +[[package]] +name = "http-body-util" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793429d76616a256bcb62c2a2ec2bed781c8307e797e2598c50010f2bee2544f" +dependencies = [ + "bytes", + "futures-util", + "http", + "http-body", + "pin-project-lite", +] + +[[package]] +name = "httparse" +version = "1.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d71d3574edd2771538b901e6549113b4006ece66150fb69c0fb6d9a2adae946" + +[[package]] +name = "hyper" +version = "1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "256fb8d4bd6413123cc9d91832d78325c48ff41677595be797d90f42969beae0" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "itoa", + "pin-project-lite", + "smallvec", + "tokio", + "want", +] + +[[package]] +name = "hyper-rustls" +version = "0.27.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d191583f3da1305256f22463b9bb0471acad48a4e534a5218b9963e9c1f59b2" +dependencies = [ + "futures-util", + "http", + "hyper", + "hyper-util", + "rustls", + "rustls-pki-types", + "tokio", + "tokio-rustls", + "tower-service", +] + +[[package]] +name = "hyper-tls" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70206fc6890eaca9fde8a0bf71caa2ddfc9fe045ac9e5c70df101a7dbde866e0" +dependencies = [ + "bytes", + "http-body-util", + "hyper", + "hyper-util", + "native-tls", + "tokio", + "tokio-native-tls", + "tower-service", +] + +[[package]] +name = "hyper-util" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df2dcfbe0677734ab2f3ffa7fa7bfd4706bfdc1ef393f2ee30184aed67e631b4" +dependencies = [ + "bytes", + "futures-channel", + "futures-util", + "http", + "http-body", + "hyper", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", +] + +[[package]] +name = "icu_collections" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62f822373a4fe84d4bb149bf54e584a7f4abec90e072ed49cda0edea5b95471f" +dependencies = [ + "equivalent", + "hashbrown", +] + +[[package]] +name = "ipnet" +version = "2.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ddc24109865250148c2e0f3d25d4f0f479571723792d3802153c60922a4fb708" + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "libc" +version = "0.2.169" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" + +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + +[[package]] +name = "log" +version = "0.4.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" + +[[package]] +name = "memchr" +version = "2.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" + +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi", + "windows-sys 0.52.0", +] + +[[package]] +name = "native-tls" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" +dependencies = [ + "libc", + "log", + "openssl", + "openssl-probe", + "openssl-sys", + "schannel", + "security-framework", + "security-framework-sys", + "tempfile", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "once_cell" +version = "1.20.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" + +[[package]] +name = "openssl" +version = "0.10.68" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +dependencies = [ + "bitflags", + "cfg-if", + "foreign-types", + "libc", + "once_cell", + "openssl-macros", + "openssl-sys", +] + +[[package]] +name = "openssl-macros" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "openssl-probe" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" + +[[package]] +name = "openssl-sys" +version = "0.9.104" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +dependencies = [ + "cc", + "libc", + "pkg-config", + "vcpkg", +] + +[[package]] +name = "percent-encoding" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + +[[package]] +name = "pkg-config" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" + +[[package]] +name = "proc-macro2" +version = "1.0.93" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "quick-xml" +version = "0.37.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "165859e9e55f79d67b96c5d96f4e88b6f2695a1972849c15a6a3f5c59fc2c003" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "quote" +version = "1.0.38" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "reqwest" +version = "0.12.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da" +dependencies = [ + "base64", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "http-body-util", + "hyper", + "hyper-rustls", + "hyper-tls", + "hyper-util", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-native-tls", + "tower", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "windows-registry", +] + +[[package]] +name = "ring" +version = "0.17.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" +dependencies = [ + "cc", + "cfg-if", + "getrandom", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", +] + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustix" +version = "0.38.43" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a78891ee6bf2340288408954ac787aa063d8e8817e9f53abb37c695c6d834ef6" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.23.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f287924602bf649d949c63dc8ac8b235fa5387d394020705b80c4eb597ce5b8" +dependencies = [ + "once_cell", + "rustls-pki-types", + "rustls-webpki", + "subtle", + "zeroize", +] + +[[package]] +name = "rustls-pemfile" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" +dependencies = [ + "rustls-pki-types", +] + +[[package]] +name = "rustls-pki-types" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d2bf47e6ff922db3825eb750c4e2ff784c6ff8fb9e13046ef6a1d1c5401b0b37" + +[[package]] +name = "rustls-webpki" +version = "0.102.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64ca1bc8749bd4cf37b5ce386cc146580777b4e8572c7b97baf22c83f444bee9" +dependencies = [ + "ring", + "rustls-pki-types", + "untrusted", +] + +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + +[[package]] +name = "ryu" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "security-framework" +version = "2.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" +dependencies = [ + "bitflags", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "serde" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_derive" +version = "1.0.217" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "serde_json" +version = "1.0.135" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b0d7ba2887406110130a978386c4e1befb98c674b4fba677954e4db976630d9" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + +[[package]] +name = "smallvec" +version = "1.13.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" + +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + +[[package]] +name = "spin" +version = "0.9.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "subtle" +version = "2.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" + +[[package]] +name = "syn" +version = "2.0.96" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "sync_wrapper" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" +dependencies = [ + "futures-core", +] + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "system-configuration" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c879d448e9d986b661742763247d3693ed13609438cf3d006f51f5368a5ba6b" +dependencies = [ + "bitflags", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e1d1b10ced5ca923a1fcb8d03e96b8d3268065d724548c0211415ff6ac6bac4" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "tempfile" +version = "3.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704" +dependencies = [ + "cfg-if", + "fastrand", + "getrandom", + "once_cell", + "rustix", + "windows-sys 0.59.0", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + +[[package]] +name = "tokio" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-rustls" +version = "0.26.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tower" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" +dependencies = [ + "futures-core", + "futures-util", + "pin-project-lite", + "sync_wrapper", + "tokio", + "tower-layer", + "tower-service", +] + +[[package]] +name = "tower-layer" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" + +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "unicode-ident" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adb9e6ca4f869e1180728b7950e35922a7fc6397f7b641499e8f3ef06e50dc83" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + +[[package]] +name = "vcpkg" +version = "0.2.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +dependencies = [ + "cfg-if", + "once_cell", + "rustversion", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +dependencies = [ + "bumpalo", + "log", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "weather_dot_gov_rs" +version = "0.1.0" +dependencies = [ + "anyhow", + "quick-xml", + "reqwest", + "serde", + "tokio", +] + +[[package]] +name = "web-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "windows-registry" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e400001bb720a623c1c69032f8e3e4cf09984deec740f007dd2b03ec864804b0" +dependencies = [ + "windows-result", + "windows-strings", + "windows-targets", +] + +[[package]] +name = "windows-result" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-strings" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" +dependencies = [ + "windows-result", + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_gnullvm", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" + +[[package]] +name = "windows_i686_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" + +[[package]] +name = "windows_i686_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] + +[[package]] +name = "zeroize" +version = "1.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..4511a59 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "weather_dot_gov_rs" +version = "0.1.0" +edition = "2021" + +[dependencies] +quick-xml = { version = "0.37.2", features = ["overlapped-lists", "serialize"] } +serde = { version = "1.0.217", features = ["derive"] } + +[dev-dependencies] +anyhow = "1.0.95" +reqwest = "0.12.12" +tokio = { version = "1.43.0", features = ["macros", "rt-multi-thread"] } diff --git a/data/empire_city.xml b/data/empire_city.xml new file mode 100644 index 0000000..ba191ec --- /dev/null +++ b/data/empire_city.xml @@ -0,0 +1,169 @@ + + + + + 2025-01-14T18:08:11-05:00 + current observations and forecast + + + New York, NY + https://www.weather.gov/okx/ + https://www.nws.noaa.gov/forecasts/xml/ + + + + + + point1 + New York, NY + + New York + 7 + +https://forecast.weather.gov/MapClick.php?lat=40.71&lon=-74.01 + + k-p12h-n14-1 + 2025-01-14T19:00:00-05:00 + 2025-01-15T06:00:00-05:00 + 2025-01-15T18:00:00-05:00 + 2025-01-16T06:00:00-05:00 + 2025-01-16T18:00:00-05:00 + 2025-01-17T06:00:00-05:00 + 2025-01-17T18:00:00-05:00 + 2025-01-18T06:00:00-05:00 + 2025-01-18T18:00:00-05:00 + 2025-01-19T06:00:00-05:00 + 2025-01-19T18:00:00-05:00 + 2025-01-20T06:00:00-05:00 + 2025-01-20T18:00:00-05:00 + 2025-01-21T06:00:00-05:00 + + + + k-p24h-n7-1 + 2025-01-14T19:00:00-05:00 + 2025-01-15T18:00:00-05:00 + 2025-01-16T18:00:00-05:00 + 2025-01-17T18:00:00-05:00 + 2025-01-18T18:00:00-05:00 + 2025-01-19T18:00:00-05:00 + 2025-01-20T18:00:00-05:00 + + + + k-p24h-n7-2 + 2025-01-15T06:00:00-05:00 + 2025-01-16T06:00:00-05:00 + 2025-01-17T06:00:00-05:00 + 2025-01-18T06:00:00-05:00 + 2025-01-19T06:00:00-05:00 + 2025-01-20T06:00:00-05:00 + 2025-01-21T06:00:00-05:00 + + + + + + + Daily Minimum Temperature + 26 + 24 + 27 + 34 + 34 + 24 + 17 + + + + Daily Maximum Temperature + 33 + 32 + 39 + 43 + 39 + 30 + 24 + + + + 12 Hourly Probability of Precipitation + + + + + 20 + + + 60 + 40 + + 30 + 30 + + + + + + Weather Type, Coverage, Intensity + + + + + + + + + + + + + + + + + + Conditions Icon https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/few.png + https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/bkn.png + https://forecast.weather.gov/newimages/medium/nsn20.png + https://forecast.weather.gov/newimages/medium/few.png + https://forecast.weather.gov/newimages/medium/nsct.png + https://forecast.weather.gov/DualImage.php?i=bkn&j=ra&jp=60 + https://forecast.weather.gov/newimages/medium/nra40.png + https://forecast.weather.gov/newimages/medium/sct.png + https://forecast.weather.gov/newimages/medium/nsn30.png + https://forecast.weather.gov/newimages/medium/sn30.png + https://forecast.weather.gov/newimages/medium/nsct.png + https://forecast.weather.gov/newimages/medium/sct.png + + + + Text Forecast + Mostly clear, with a low around 26. Wind chill values between 15 and 20. West wind around 14 mph. + Sunny, with a high near 33. Wind chill values between 15 and 25. Northwest wind 13 to 16 mph, with gusts as high as 28 mph. + Mostly clear, with a low around 24. Wind chill values between 15 and 20. West wind 7 to 10 mph. + Partly sunny, with a high near 32. Wind chill values between 15 and 25. Southwest wind 9 to 13 mph. + A 20 percent chance of snow showers before 1am. Mostly cloudy, with a low around 27. West wind 8 to 10 mph. + Sunny, with a high near 39. + Partly cloudy, with a low around 34. + Rain likely after 1pm. Mostly cloudy, with a high near 43. Chance of precipitation is 60%. + A 40 percent chance of rain before 1am. Mostly cloudy, with a low around 34. + Mostly sunny, with a high near 39. + A 30 percent chance of snow. Mostly cloudy, with a low around 24. + A 30 percent chance of snow. Partly sunny, with a high near 30. + Partly cloudy, with a low around 17. + Mostly sunny, with a high near 24. + + + + + + + point1 + + New York City, Central Park, NY + 154 + + https://www.nws.noaa.gov/data/obhistory/KNYC.html k-p1h-n1-1 2025-01-14T18:51:00-05:00 30 6 36 Weather Type, Coverage, Intensity 10.00 Conditions Icon https://forecast.weather.gov/newimages/medium/nbkn.png 270 17 9 30.01 \ No newline at end of file diff --git a/data/sunset_city.xml b/data/sunset_city.xml new file mode 100644 index 0000000..2a3de9f --- /dev/null +++ b/data/sunset_city.xml @@ -0,0 +1,169 @@ + + + + + 2025-01-14T12:27:51-08:00 + current observations and forecast + + + San Francisco Bay Area/Monterey, CA + https://www.weather.gov/mtr + https://www.nws.noaa.gov/forecasts/xml/ + + + + + + point1 + San Francisco, CA + + San Francisco + 131 + +https://forecast.weather.gov/MapClick.php?lat=37.77&lon=-122.41 + + k-p12h-n14-1 + 2025-01-14T18:00:00-08:00 + 2025-01-15T06:00:00-08:00 + 2025-01-15T18:00:00-08:00 + 2025-01-16T06:00:00-08:00 + 2025-01-16T18:00:00-08:00 + 2025-01-17T06:00:00-08:00 + 2025-01-17T18:00:00-08:00 + 2025-01-18T06:00:00-08:00 + 2025-01-18T18:00:00-08:00 + 2025-01-19T06:00:00-08:00 + 2025-01-19T18:00:00-08:00 + 2025-01-20T06:00:00-08:00 + 2025-01-20T18:00:00-08:00 + 2025-01-21T06:00:00-08:00 + + + + k-p24h-n7-1 + 2025-01-14T18:00:00-08:00 + 2025-01-15T18:00:00-08:00 + 2025-01-16T18:00:00-08:00 + 2025-01-17T18:00:00-08:00 + 2025-01-18T18:00:00-08:00 + 2025-01-19T18:00:00-08:00 + 2025-01-20T18:00:00-08:00 + + + + k-p24h-n7-2 + 2025-01-15T06:00:00-08:00 + 2025-01-16T06:00:00-08:00 + 2025-01-17T06:00:00-08:00 + 2025-01-18T06:00:00-08:00 + 2025-01-19T06:00:00-08:00 + 2025-01-20T06:00:00-08:00 + 2025-01-21T06:00:00-08:00 + + + + + + + Daily Minimum Temperature + 44 + 44 + 46 + 45 + 43 + 43 + 43 + + + + Daily Maximum Temperature + 62 + 61 + 58 + 57 + 56 + 58 + 59 + + + + 12 Hourly Probability of Precipitation + + + + + + + + + + + + + + + + + + Weather Type, Coverage, Intensity + + + + + + + + + + + + + + + + + + Conditions Icon https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/skc.png + https://forecast.weather.gov/newimages/medium/nskc.png + https://forecast.weather.gov/newimages/medium/skc.png + https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/sct.png + https://forecast.weather.gov/newimages/medium/nsct.png + https://forecast.weather.gov/newimages/medium/sct.png + https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/few.png + https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/few.png + https://forecast.weather.gov/newimages/medium/nfew.png + https://forecast.weather.gov/newimages/medium/sct.png + + + + Text Forecast + Mostly clear, with a low around 44. West wind 5 to 8 mph becoming calm after midnight. + Sunny, with a high near 62. East northeast wind 3 to 5 mph. + Clear, with a low around 44. Light east northeast wind. + Sunny, with a high near 61. Light north northeast wind. + Mostly clear, with a low around 46. Light west southwest wind. + Mostly sunny, with a high near 58. + Partly cloudy, with a low around 45. + Mostly sunny, with a high near 57. + Mostly clear, with a low around 43. + Sunny, with a high near 56. + Mostly clear, with a low around 43. + Sunny, with a high near 58. + Mostly clear, with a low around 43. + Mostly sunny, with a high near 59. + + + + + + + point1 + + SAN FRANCISCO DOWNTOWN, CA + 150.0 + + https://www.weather.gov/wrh/LocalWeather?wfo=mtr&zone=CAZ006 k-p1h-n1-1 2025-01-14T16:00:00 60 28 29 Weather Type, Coverage, Intensity NA Conditions Icon NULL NA NA NA NA \ No newline at end of file diff --git a/data/windy_city.xml b/data/windy_city.xml new file mode 100644 index 0000000..a25e478 --- /dev/null +++ b/data/windy_city.xml @@ -0,0 +1,186 @@ + + + + + 2025-01-14T16:27:37-06:00 + current observations and forecast + + + Chicago, IL + https://www.weather.gov/lot + https://www.nws.noaa.gov/forecasts/xml/ + + + + + + point1 + + 4 Miles NE Chicago IL + 594 + +https://forecast.weather.gov/MapClick.php?lat=41.88&lon=-87.65 + + k-p12h-n14-1 + 2025-01-14T18:00:00-06:00 + 2025-01-15T06:00:00-06:00 + 2025-01-15T18:00:00-06:00 + 2025-01-16T06:00:00-06:00 + 2025-01-16T18:00:00-06:00 + 2025-01-17T06:00:00-06:00 + 2025-01-17T18:00:00-06:00 + 2025-01-18T06:00:00-06:00 + 2025-01-18T18:00:00-06:00 + 2025-01-19T06:00:00-06:00 + 2025-01-19T18:00:00-06:00 + 2025-01-20T06:00:00-06:00 + 2025-01-20T18:00:00-06:00 + 2025-01-21T06:00:00-06:00 + + + + k-p24h-n7-1 + 2025-01-14T18:00:00-06:00 + 2025-01-15T18:00:00-06:00 + 2025-01-16T18:00:00-06:00 + 2025-01-17T18:00:00-06:00 + 2025-01-18T18:00:00-06:00 + 2025-01-19T18:00:00-06:00 + 2025-01-20T18:00:00-06:00 + + + + k-p24h-n7-2 + 2025-01-15T06:00:00-06:00 + 2025-01-16T06:00:00-06:00 + 2025-01-17T06:00:00-06:00 + 2025-01-18T06:00:00-06:00 + 2025-01-19T06:00:00-06:00 + 2025-01-20T06:00:00-06:00 + 2025-01-21T06:00:00-06:00 + + + + + + + Daily Minimum Temperature + 3 + 17 + 25 + 28 + 10 + -1 + -1 + + + + Daily Maximum Temperature + 21 + 35 + 38 + 31 + 13 + 8 + 13 + + + + 12 Hourly Probability of Precipitation + + + 40 + 20 + + + 40 + + + + + + + + + + + Weather Type, Coverage, Intensity + + + + + + + + + + + + + + + + + + Conditions Icon https://forecast.weather.gov/newimages/medium/nskc.png + https://forecast.weather.gov/newimages/medium/few.png + https://forecast.weather.gov/newimages/medium/nsn40.png + https://forecast.weather.gov/DualImage.php?i=sn&j=bkn&ip=20 + https://forecast.weather.gov/newimages/medium/nbkn.png + https://forecast.weather.gov/newimages/medium/sct.png + https://forecast.weather.gov/DualImage.php?i=nra&j=nrasn&ip=40&jp=30 + https://forecast.weather.gov/newimages/medium/bkn.png + https://forecast.weather.gov/newimages/medium/nbkn.png + https://forecast.weather.gov/newimages/medium/bkn.png + https://forecast.weather.gov/newimages/medium/nsct.png + https://forecast.weather.gov/newimages/medium/cold.png + https://forecast.weather.gov/newimages/medium/nsct.png + https://forecast.weather.gov/newimages/medium/sct.png + + + + Watches, Warnings, and Advisories + + + https://forecast.weather.gov/showsigwx.php?warnzone=ILZ104&warncounty=ILC031&firewxzone=ILZ014&local_place1=4+Miles+NE+Chicago+IL&product1=Hazardous+Weather+Outlook + + + + + + Watches, Warnings, and Advisories + + + https://forecast.weather.gov/showsigwx.php?warnzone=ILZ104&warncounty=ILC031&firewxzone=ILZ014&local_place1=4+Miles+NE+Chicago+IL&product1=Hydrologic+Outlook + + + + + + Text Forecast + Clear, with a low around 3. Wind chill values as low as -7. West northwest wind 5 to 10 mph, with gusts as high as 15 mph. + Sunny, with a high near 21. Wind chill values as low as -8. Southwest wind 5 to 15 mph, with gusts as high as 25 mph. + A 40 percent chance of snow, mainly after midnight. Increasing clouds, with a temperature rising to around 23 by 5am. Southwest wind around 15 mph, with gusts as high as 25 mph. + A 20 percent chance of snow before noon. Mostly cloudy, with a high near 35. West northwest wind 10 to 15 mph, with gusts as high as 25 mph. + Mostly cloudy, with a low around 25. West wind 5 to 10 mph becoming south southwest after midnight. Winds could gust as high as 15 mph. + Mostly sunny, with a high near 38. + A chance of rain before midnight, then a chance of rain and snow. Mostly cloudy, with a low around 28. Chance of precipitation is 40%. + Mostly cloudy, with a high near 31. + Mostly cloudy, with a low around 10. + Partly sunny, with a high near 13. + Partly cloudy, with a low around -1. + Mostly sunny and cold, with a high near 8. + Partly cloudy, with a low around -1. + Mostly sunny, with a high near 13. + + + + + + + point1 + + Chicago, Chicago Midway Airport, IL + 617 + + https://www.nws.noaa.gov/data/obhistory/KMDW.html k-p1h-n1-1 2025-01-14T17:53:00-06:00 15 1 53 Weather Type, Coverage, Intensity 10.00 Conditions Icon https://forecast.weather.gov/newimages/medium/nsct.png 290 NA 7 30.42 \ No newline at end of file diff --git a/examples/reqwest.rs b/examples/reqwest.rs new file mode 100644 index 0000000..cd63f04 --- /dev/null +++ b/examples/reqwest.rs @@ -0,0 +1,31 @@ +use anyhow::{Context as _, Result}; +use std::str::FromStr as _; + +#[tokio::main] +async fn main() -> Result<()> { + let mut args = std::env::args(); + args.next().context("Expected app name as arg0")?; + + let lat = args.next().context("Usage: weather_dot_gov $LAT $LON")?; + let lon = args.next().context("Usage: weather_dot_gov $LAT $LON")?; + + let client = reqwest::Client::new(); + let req = client + .get("https://forecast.weather.gov/MapClick.php") + .query(&[ + ("lat", lat.as_str()), + ("lon", lon.as_str()), + ("unit", "0"), + ("lg", "english"), + ("FcstType", "dwml"), + ]) + .header("user-agent", "weather_dot_gov_rs") + .build()?; + let res = client.execute(req).await?; + let body = res.text().await?; + let dwml = weather_dot_gov_rs::Dwml::from_str(&body)?; + + println!("{dwml:#?}"); + + Ok(()) +} diff --git a/src/lib.rs b/src/lib.rs new file mode 100644 index 0000000..1e1eeac --- /dev/null +++ b/src/lib.rs @@ -0,0 +1,193 @@ +use serde::Deserialize; + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Dwml { + pub head: Head, + pub data: (Forecast, CurrentObservations), +} + +impl std::str::FromStr for Dwml { + type Err = quick_xml::DeError; + + fn from_str(s: &str) -> Result { + quick_xml::de::from_str(s) + } +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Head { + pub product: Product, + pub source: Source, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Forecast { + pub location: Location, + #[serde(rename = "time-layout")] + pub time_layout: (TimeLayout, TimeLayout, TimeLayout), + pub parameters: Parameters, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Location { + #[serde(rename = "area-description")] + pub area_description: Option, + pub description: Option, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct TimeLayout { + #[serde(rename = "@time-coordinate")] + pub time_coordinate: TimeCoordinate, + + #[serde(rename = "layout-key")] + pub layout_key: LayoutKey, + + #[serde(rename = "start-valid-time")] + pub start_valid_time: Vec, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub enum TimeCoordinate { + #[serde(rename = "local")] + Local, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub enum LayoutKey { + #[serde(rename = "k-p12h-n14-1")] + K12Hourly, + #[serde(rename = "k-p24h-n7-1")] + K24Hourly1, + #[serde(rename = "k-p24h-n7-2")] + K24Hourly2, + #[serde(rename = "k-p1h-n1-1")] + K1Hour, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct StartValidTime { + #[serde(rename = "@period-name")] + pub period_name: String, + + #[serde(rename = "$value")] + pub value: String, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct CurrentObservations { + pub location: Location, + #[serde(rename = "time-layout")] + pub time_layout: TimeLayout, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Product { + #[serde(rename = "creation-date")] + pub creation_date: CreationDate, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct CreationDate { + #[serde(rename = "@refresh-frequency")] + pub refresh_frequency: String, + + #[serde(rename = "$value")] + pub value: String, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Source { + #[serde(rename = "production-center")] + pub production_center: String, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Parameters { + pub temperature: (Temperature, Temperature), + + #[serde(rename = "probability-of-precipitation")] + pub probability_of_precipitation: ProbabilityOfPrecipitation, + + pub weather: Weather, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Temperature { + #[serde(rename = "@type")] + pub temp_type: TempType, + + #[serde(rename = "@units")] + pub units: TempUnits, + + #[serde(rename = "@time-layout")] + pub time_layout: LayoutKey, + + pub value: Vec, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct ProbabilityOfPrecipitation { + #[serde(rename = "@time-layout")] + pub time_layout: LayoutKey, + + pub value: Vec, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct Weather { + #[serde(rename = "@time-layout")] + pub time_layout: LayoutKey, + + #[serde(rename = "weather-conditions")] + pub weather_conditions: Vec, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub struct WeatherCondition { + #[serde(rename = "@weather-summary")] + pub weather_summary: String, +} + +// If only there was a percentage that could convey the concept of +// no precipitation. +#[derive(Debug, Deserialize, PartialEq)] +pub struct PrecipitationValue { + #[serde(rename = "$text")] + pub value: Option, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub enum TempType { + #[serde(rename = "apparent")] + Apparent, + #[serde(rename = "dew point")] + DewPoint, + #[serde(rename = "minimum")] + Minimum, + #[serde(rename = "maximum")] + Maximum, +} + +#[derive(Debug, Deserialize, PartialEq)] +pub enum TempUnits { + Celsius, + Fahrenheit, +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse() { + let s = include_str!("../data/empire_city.xml"); + let _: Dwml = quick_xml::de::from_str(s).unwrap(); + + let s = include_str!("../data/sunset_city.xml"); + let _: Dwml = quick_xml::de::from_str(s).unwrap(); + + let s = include_str!("../data/windy_city.xml"); + let _: Dwml = quick_xml::de::from_str(s).unwrap(); + } +}