├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── curl_commands.txt └── src ├── api ├── api.rs └── mod.rs ├── main.rs ├── models ├── mod.rs └── todo.rs └── repository ├── database.rs └── mod.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "actix-codec" 7 | version = "0.5.1" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "617a8268e3537fe1d8c9ead925fca49ef6400927ee7bc26750e90ecee14ce4b8" 10 | dependencies = [ 11 | "bitflags 1.3.2", 12 | "bytes", 13 | "futures-core", 14 | "futures-sink", 15 | "memchr", 16 | "pin-project-lite", 17 | "tokio", 18 | "tokio-util", 19 | "tracing", 20 | ] 21 | 22 | [[package]] 23 | name = "actix-http" 24 | version = "3.4.0" 25 | source = "registry+https://github.com/rust-lang/crates.io-index" 26 | checksum = "a92ef85799cba03f76e4f7c10f533e66d87c9a7e7055f3391f09000ad8351bc9" 27 | dependencies = [ 28 | "actix-codec", 29 | "actix-rt", 30 | "actix-service", 31 | "actix-utils", 32 | "ahash", 33 | "base64", 34 | "bitflags 2.4.1", 35 | "brotli", 36 | "bytes", 37 | "bytestring", 38 | "derive_more", 39 | "encoding_rs", 40 | "flate2", 41 | "futures-core", 42 | "h2", 43 | "http", 44 | "httparse", 45 | "httpdate", 46 | "itoa", 47 | "language-tags", 48 | "local-channel", 49 | "mime", 50 | "percent-encoding", 51 | "pin-project-lite", 52 | "rand", 53 | "sha1", 54 | "smallvec", 55 | "tokio", 56 | "tokio-util", 57 | "tracing", 58 | "zstd", 59 | ] 60 | 61 | [[package]] 62 | name = "actix-macros" 63 | version = "0.2.4" 64 | source = "registry+https://github.com/rust-lang/crates.io-index" 65 | checksum = "e01ed3140b2f8d422c68afa1ed2e85d996ea619c988ac834d255db32138655cb" 66 | dependencies = [ 67 | "quote", 68 | "syn 2.0.41", 69 | ] 70 | 71 | [[package]] 72 | name = "actix-router" 73 | version = "0.5.1" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "d66ff4d247d2b160861fa2866457e85706833527840e4133f8f49aa423a38799" 76 | dependencies = [ 77 | "bytestring", 78 | "http", 79 | "regex", 80 | "serde", 81 | "tracing", 82 | ] 83 | 84 | [[package]] 85 | name = "actix-rt" 86 | version = "2.9.0" 87 | source = "registry+https://github.com/rust-lang/crates.io-index" 88 | checksum = "28f32d40287d3f402ae0028a9d54bef51af15c8769492826a69d28f81893151d" 89 | dependencies = [ 90 | "futures-core", 91 | "tokio", 92 | ] 93 | 94 | [[package]] 95 | name = "actix-server" 96 | version = "2.3.0" 97 | source = "registry+https://github.com/rust-lang/crates.io-index" 98 | checksum = "3eb13e7eef0423ea6eab0e59f6c72e7cb46d33691ad56a726b3cd07ddec2c2d4" 99 | dependencies = [ 100 | "actix-rt", 101 | "actix-service", 102 | "actix-utils", 103 | "futures-core", 104 | "futures-util", 105 | "mio", 106 | "socket2", 107 | "tokio", 108 | "tracing", 109 | ] 110 | 111 | [[package]] 112 | name = "actix-service" 113 | version = "2.0.2" 114 | source = "registry+https://github.com/rust-lang/crates.io-index" 115 | checksum = "3b894941f818cfdc7ccc4b9e60fa7e53b5042a2e8567270f9147d5591893373a" 116 | dependencies = [ 117 | "futures-core", 118 | "paste", 119 | "pin-project-lite", 120 | ] 121 | 122 | [[package]] 123 | name = "actix-utils" 124 | version = "3.0.1" 125 | source = "registry+https://github.com/rust-lang/crates.io-index" 126 | checksum = "88a1dcdff1466e3c2488e1cb5c36a71822750ad43839937f85d2f4d9f8b705d8" 127 | dependencies = [ 128 | "local-waker", 129 | "pin-project-lite", 130 | ] 131 | 132 | [[package]] 133 | name = "actix-web" 134 | version = "4.4.0" 135 | source = "registry+https://github.com/rust-lang/crates.io-index" 136 | checksum = "0e4a5b5e29603ca8c94a77c65cf874718ceb60292c5a5c3e5f4ace041af462b9" 137 | dependencies = [ 138 | "actix-codec", 139 | "actix-http", 140 | "actix-macros", 141 | "actix-router", 142 | "actix-rt", 143 | "actix-server", 144 | "actix-service", 145 | "actix-utils", 146 | "actix-web-codegen", 147 | "ahash", 148 | "bytes", 149 | "bytestring", 150 | "cfg-if", 151 | "cookie", 152 | "derive_more", 153 | "encoding_rs", 154 | "futures-core", 155 | "futures-util", 156 | "itoa", 157 | "language-tags", 158 | "log", 159 | "mime", 160 | "once_cell", 161 | "pin-project-lite", 162 | "regex", 163 | "serde", 164 | "serde_json", 165 | "serde_urlencoded", 166 | "smallvec", 167 | "socket2", 168 | "time", 169 | "url", 170 | ] 171 | 172 | [[package]] 173 | name = "actix-web-codegen" 174 | version = "4.2.2" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "eb1f50ebbb30eca122b188319a4398b3f7bb4a8cdf50ecfb73bfc6a3c3ce54f5" 177 | dependencies = [ 178 | "actix-router", 179 | "proc-macro2", 180 | "quote", 181 | "syn 2.0.41", 182 | ] 183 | 184 | [[package]] 185 | name = "actix_server_0" 186 | version = "0.1.0" 187 | dependencies = [ 188 | "actix-web", 189 | "chrono", 190 | "serde", 191 | "uuid", 192 | ] 193 | 194 | [[package]] 195 | name = "addr2line" 196 | version = "0.21.0" 197 | source = "registry+https://github.com/rust-lang/crates.io-index" 198 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 199 | dependencies = [ 200 | "gimli", 201 | ] 202 | 203 | [[package]] 204 | name = "adler" 205 | version = "1.0.2" 206 | source = "registry+https://github.com/rust-lang/crates.io-index" 207 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 208 | 209 | [[package]] 210 | name = "ahash" 211 | version = "0.8.6" 212 | source = "registry+https://github.com/rust-lang/crates.io-index" 213 | checksum = "91429305e9f0a25f6205c5b8e0d2db09e0708a7a6df0f42212bb56c32c8ac97a" 214 | dependencies = [ 215 | "cfg-if", 216 | "getrandom", 217 | "once_cell", 218 | "version_check", 219 | "zerocopy", 220 | ] 221 | 222 | [[package]] 223 | name = "aho-corasick" 224 | version = "1.1.2" 225 | source = "registry+https://github.com/rust-lang/crates.io-index" 226 | checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" 227 | dependencies = [ 228 | "memchr", 229 | ] 230 | 231 | [[package]] 232 | name = "alloc-no-stdlib" 233 | version = "2.0.4" 234 | source = "registry+https://github.com/rust-lang/crates.io-index" 235 | checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" 236 | 237 | [[package]] 238 | name = "alloc-stdlib" 239 | version = "0.2.2" 240 | source = "registry+https://github.com/rust-lang/crates.io-index" 241 | checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" 242 | dependencies = [ 243 | "alloc-no-stdlib", 244 | ] 245 | 246 | [[package]] 247 | name = "android-tzdata" 248 | version = "0.1.1" 249 | source = "registry+https://github.com/rust-lang/crates.io-index" 250 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 251 | 252 | [[package]] 253 | name = "android_system_properties" 254 | version = "0.1.5" 255 | source = "registry+https://github.com/rust-lang/crates.io-index" 256 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 257 | dependencies = [ 258 | "libc", 259 | ] 260 | 261 | [[package]] 262 | name = "autocfg" 263 | version = "1.1.0" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" 266 | 267 | [[package]] 268 | name = "backtrace" 269 | version = "0.3.69" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" 272 | dependencies = [ 273 | "addr2line", 274 | "cc", 275 | "cfg-if", 276 | "libc", 277 | "miniz_oxide", 278 | "object", 279 | "rustc-demangle", 280 | ] 281 | 282 | [[package]] 283 | name = "base64" 284 | version = "0.21.5" 285 | source = "registry+https://github.com/rust-lang/crates.io-index" 286 | checksum = "35636a1494ede3b646cc98f74f8e62c773a38a659ebc777a2cf26b9b74171df9" 287 | 288 | [[package]] 289 | name = "bitflags" 290 | version = "1.3.2" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 293 | 294 | [[package]] 295 | name = "bitflags" 296 | version = "2.4.1" 297 | source = "registry+https://github.com/rust-lang/crates.io-index" 298 | checksum = "327762f6e5a765692301e5bb513e0d9fef63be86bbc14528052b1cd3e6f03e07" 299 | 300 | [[package]] 301 | name = "block-buffer" 302 | version = "0.10.4" 303 | source = "registry+https://github.com/rust-lang/crates.io-index" 304 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 305 | dependencies = [ 306 | "generic-array", 307 | ] 308 | 309 | [[package]] 310 | name = "brotli" 311 | version = "3.4.0" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" 314 | dependencies = [ 315 | "alloc-no-stdlib", 316 | "alloc-stdlib", 317 | "brotli-decompressor", 318 | ] 319 | 320 | [[package]] 321 | name = "brotli-decompressor" 322 | version = "2.5.1" 323 | source = "registry+https://github.com/rust-lang/crates.io-index" 324 | checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" 325 | dependencies = [ 326 | "alloc-no-stdlib", 327 | "alloc-stdlib", 328 | ] 329 | 330 | [[package]] 331 | name = "bumpalo" 332 | version = "3.14.0" 333 | source = "registry+https://github.com/rust-lang/crates.io-index" 334 | checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" 335 | 336 | [[package]] 337 | name = "bytes" 338 | version = "1.5.0" 339 | source = "registry+https://github.com/rust-lang/crates.io-index" 340 | checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" 341 | 342 | [[package]] 343 | name = "bytestring" 344 | version = "1.3.1" 345 | source = "registry+https://github.com/rust-lang/crates.io-index" 346 | checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" 347 | dependencies = [ 348 | "bytes", 349 | ] 350 | 351 | [[package]] 352 | name = "cc" 353 | version = "1.0.83" 354 | source = "registry+https://github.com/rust-lang/crates.io-index" 355 | checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" 356 | dependencies = [ 357 | "jobserver", 358 | "libc", 359 | ] 360 | 361 | [[package]] 362 | name = "cfg-if" 363 | version = "1.0.0" 364 | source = "registry+https://github.com/rust-lang/crates.io-index" 365 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 366 | 367 | [[package]] 368 | name = "chrono" 369 | version = "0.4.31" 370 | source = "registry+https://github.com/rust-lang/crates.io-index" 371 | checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" 372 | dependencies = [ 373 | "android-tzdata", 374 | "iana-time-zone", 375 | "js-sys", 376 | "num-traits", 377 | "serde", 378 | "wasm-bindgen", 379 | "windows-targets", 380 | ] 381 | 382 | [[package]] 383 | name = "convert_case" 384 | version = "0.4.0" 385 | source = "registry+https://github.com/rust-lang/crates.io-index" 386 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 387 | 388 | [[package]] 389 | name = "cookie" 390 | version = "0.16.2" 391 | source = "registry+https://github.com/rust-lang/crates.io-index" 392 | checksum = "e859cd57d0710d9e06c381b550c06e76992472a8c6d527aecd2fc673dcc231fb" 393 | dependencies = [ 394 | "percent-encoding", 395 | "time", 396 | "version_check", 397 | ] 398 | 399 | [[package]] 400 | name = "core-foundation-sys" 401 | version = "0.8.6" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 404 | 405 | [[package]] 406 | name = "cpufeatures" 407 | version = "0.2.11" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "ce420fe07aecd3e67c5f910618fe65e94158f6dcc0adf44e00d69ce2bdfe0fd0" 410 | dependencies = [ 411 | "libc", 412 | ] 413 | 414 | [[package]] 415 | name = "crc32fast" 416 | version = "1.3.2" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" 419 | dependencies = [ 420 | "cfg-if", 421 | ] 422 | 423 | [[package]] 424 | name = "crypto-common" 425 | version = "0.1.6" 426 | source = "registry+https://github.com/rust-lang/crates.io-index" 427 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 428 | dependencies = [ 429 | "generic-array", 430 | "typenum", 431 | ] 432 | 433 | [[package]] 434 | name = "deranged" 435 | version = "0.3.10" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "8eb30d70a07a3b04884d2677f06bec33509dc67ca60d92949e5535352d3191dc" 438 | dependencies = [ 439 | "powerfmt", 440 | ] 441 | 442 | [[package]] 443 | name = "derive_more" 444 | version = "0.99.17" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 447 | dependencies = [ 448 | "convert_case", 449 | "proc-macro2", 450 | "quote", 451 | "rustc_version", 452 | "syn 1.0.109", 453 | ] 454 | 455 | [[package]] 456 | name = "digest" 457 | version = "0.10.7" 458 | source = "registry+https://github.com/rust-lang/crates.io-index" 459 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 460 | dependencies = [ 461 | "block-buffer", 462 | "crypto-common", 463 | ] 464 | 465 | [[package]] 466 | name = "encoding_rs" 467 | version = "0.8.33" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" 470 | dependencies = [ 471 | "cfg-if", 472 | ] 473 | 474 | [[package]] 475 | name = "equivalent" 476 | version = "1.0.1" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 479 | 480 | [[package]] 481 | name = "flate2" 482 | version = "1.0.28" 483 | source = "registry+https://github.com/rust-lang/crates.io-index" 484 | checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" 485 | dependencies = [ 486 | "crc32fast", 487 | "miniz_oxide", 488 | ] 489 | 490 | [[package]] 491 | name = "fnv" 492 | version = "1.0.7" 493 | source = "registry+https://github.com/rust-lang/crates.io-index" 494 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 495 | 496 | [[package]] 497 | name = "form_urlencoded" 498 | version = "1.2.1" 499 | source = "registry+https://github.com/rust-lang/crates.io-index" 500 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 501 | dependencies = [ 502 | "percent-encoding", 503 | ] 504 | 505 | [[package]] 506 | name = "futures-core" 507 | version = "0.3.29" 508 | source = "registry+https://github.com/rust-lang/crates.io-index" 509 | checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c" 510 | 511 | [[package]] 512 | name = "futures-sink" 513 | version = "0.3.29" 514 | source = "registry+https://github.com/rust-lang/crates.io-index" 515 | checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817" 516 | 517 | [[package]] 518 | name = "futures-task" 519 | version = "0.3.29" 520 | source = "registry+https://github.com/rust-lang/crates.io-index" 521 | checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2" 522 | 523 | [[package]] 524 | name = "futures-util" 525 | version = "0.3.29" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104" 528 | dependencies = [ 529 | "futures-core", 530 | "futures-task", 531 | "pin-project-lite", 532 | "pin-utils", 533 | ] 534 | 535 | [[package]] 536 | name = "generic-array" 537 | version = "0.14.7" 538 | source = "registry+https://github.com/rust-lang/crates.io-index" 539 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 540 | dependencies = [ 541 | "typenum", 542 | "version_check", 543 | ] 544 | 545 | [[package]] 546 | name = "getrandom" 547 | version = "0.2.11" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" 550 | dependencies = [ 551 | "cfg-if", 552 | "libc", 553 | "wasi", 554 | ] 555 | 556 | [[package]] 557 | name = "gimli" 558 | version = "0.28.1" 559 | source = "registry+https://github.com/rust-lang/crates.io-index" 560 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 561 | 562 | [[package]] 563 | name = "h2" 564 | version = "0.3.22" 565 | source = "registry+https://github.com/rust-lang/crates.io-index" 566 | checksum = "4d6250322ef6e60f93f9a2162799302cd6f68f79f6e5d85c8c16f14d1d958178" 567 | dependencies = [ 568 | "bytes", 569 | "fnv", 570 | "futures-core", 571 | "futures-sink", 572 | "futures-util", 573 | "http", 574 | "indexmap", 575 | "slab", 576 | "tokio", 577 | "tokio-util", 578 | "tracing", 579 | ] 580 | 581 | [[package]] 582 | name = "hashbrown" 583 | version = "0.14.3" 584 | source = "registry+https://github.com/rust-lang/crates.io-index" 585 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 586 | 587 | [[package]] 588 | name = "http" 589 | version = "0.2.11" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "8947b1a6fad4393052c7ba1f4cd97bed3e953a95c79c92ad9b051a04611d9fbb" 592 | dependencies = [ 593 | "bytes", 594 | "fnv", 595 | "itoa", 596 | ] 597 | 598 | [[package]] 599 | name = "httparse" 600 | version = "1.8.0" 601 | source = "registry+https://github.com/rust-lang/crates.io-index" 602 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 603 | 604 | [[package]] 605 | name = "httpdate" 606 | version = "1.0.3" 607 | source = "registry+https://github.com/rust-lang/crates.io-index" 608 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 609 | 610 | [[package]] 611 | name = "iana-time-zone" 612 | version = "0.1.58" 613 | source = "registry+https://github.com/rust-lang/crates.io-index" 614 | checksum = "8326b86b6cff230b97d0d312a6c40a60726df3332e721f72a1b035f451663b20" 615 | dependencies = [ 616 | "android_system_properties", 617 | "core-foundation-sys", 618 | "iana-time-zone-haiku", 619 | "js-sys", 620 | "wasm-bindgen", 621 | "windows-core", 622 | ] 623 | 624 | [[package]] 625 | name = "iana-time-zone-haiku" 626 | version = "0.1.2" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 629 | dependencies = [ 630 | "cc", 631 | ] 632 | 633 | [[package]] 634 | name = "idna" 635 | version = "0.5.0" 636 | source = "registry+https://github.com/rust-lang/crates.io-index" 637 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 638 | dependencies = [ 639 | "unicode-bidi", 640 | "unicode-normalization", 641 | ] 642 | 643 | [[package]] 644 | name = "indexmap" 645 | version = "2.1.0" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" 648 | dependencies = [ 649 | "equivalent", 650 | "hashbrown", 651 | ] 652 | 653 | [[package]] 654 | name = "itoa" 655 | version = "1.0.10" 656 | source = "registry+https://github.com/rust-lang/crates.io-index" 657 | checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" 658 | 659 | [[package]] 660 | name = "jobserver" 661 | version = "0.1.27" 662 | source = "registry+https://github.com/rust-lang/crates.io-index" 663 | checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" 664 | dependencies = [ 665 | "libc", 666 | ] 667 | 668 | [[package]] 669 | name = "js-sys" 670 | version = "0.3.66" 671 | source = "registry+https://github.com/rust-lang/crates.io-index" 672 | checksum = "cee9c64da59eae3b50095c18d3e74f8b73c0b86d2792824ff01bbce68ba229ca" 673 | dependencies = [ 674 | "wasm-bindgen", 675 | ] 676 | 677 | [[package]] 678 | name = "language-tags" 679 | version = "0.3.2" 680 | source = "registry+https://github.com/rust-lang/crates.io-index" 681 | checksum = "d4345964bb142484797b161f473a503a434de77149dd8c7427788c6e13379388" 682 | 683 | [[package]] 684 | name = "libc" 685 | version = "0.2.151" 686 | source = "registry+https://github.com/rust-lang/crates.io-index" 687 | checksum = "302d7ab3130588088d277783b1e2d2e10c9e9e4a16dd9050e6ec93fb3e7048f4" 688 | 689 | [[package]] 690 | name = "local-channel" 691 | version = "0.1.5" 692 | source = "registry+https://github.com/rust-lang/crates.io-index" 693 | checksum = "b6cbc85e69b8df4b8bb8b89ec634e7189099cea8927a276b7384ce5488e53ec8" 694 | dependencies = [ 695 | "futures-core", 696 | "futures-sink", 697 | "local-waker", 698 | ] 699 | 700 | [[package]] 701 | name = "local-waker" 702 | version = "0.1.4" 703 | source = "registry+https://github.com/rust-lang/crates.io-index" 704 | checksum = "4d873d7c67ce09b42110d801813efbc9364414e356be9935700d368351657487" 705 | 706 | [[package]] 707 | name = "lock_api" 708 | version = "0.4.11" 709 | source = "registry+https://github.com/rust-lang/crates.io-index" 710 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 711 | dependencies = [ 712 | "autocfg", 713 | "scopeguard", 714 | ] 715 | 716 | [[package]] 717 | name = "log" 718 | version = "0.4.20" 719 | source = "registry+https://github.com/rust-lang/crates.io-index" 720 | checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" 721 | 722 | [[package]] 723 | name = "memchr" 724 | version = "2.6.4" 725 | source = "registry+https://github.com/rust-lang/crates.io-index" 726 | checksum = "f665ee40bc4a3c5590afb1e9677db74a508659dfd71e126420da8274909a0167" 727 | 728 | [[package]] 729 | name = "mime" 730 | version = "0.3.17" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 733 | 734 | [[package]] 735 | name = "miniz_oxide" 736 | version = "0.7.1" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "e7810e0be55b428ada41041c41f32c9f1a42817901b4ccf45fa3d4b6561e74c7" 739 | dependencies = [ 740 | "adler", 741 | ] 742 | 743 | [[package]] 744 | name = "mio" 745 | version = "0.8.10" 746 | source = "registry+https://github.com/rust-lang/crates.io-index" 747 | checksum = "8f3d0b296e374a4e6f3c7b0a1f5a51d748a0d34c85e7dc48fc3fa9a87657fe09" 748 | dependencies = [ 749 | "libc", 750 | "log", 751 | "wasi", 752 | "windows-sys", 753 | ] 754 | 755 | [[package]] 756 | name = "num-traits" 757 | version = "0.2.17" 758 | source = "registry+https://github.com/rust-lang/crates.io-index" 759 | checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" 760 | dependencies = [ 761 | "autocfg", 762 | ] 763 | 764 | [[package]] 765 | name = "object" 766 | version = "0.32.1" 767 | source = "registry+https://github.com/rust-lang/crates.io-index" 768 | checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" 769 | dependencies = [ 770 | "memchr", 771 | ] 772 | 773 | [[package]] 774 | name = "once_cell" 775 | version = "1.19.0" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 778 | 779 | [[package]] 780 | name = "parking_lot" 781 | version = "0.12.1" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 784 | dependencies = [ 785 | "lock_api", 786 | "parking_lot_core", 787 | ] 788 | 789 | [[package]] 790 | name = "parking_lot_core" 791 | version = "0.9.9" 792 | source = "registry+https://github.com/rust-lang/crates.io-index" 793 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 794 | dependencies = [ 795 | "cfg-if", 796 | "libc", 797 | "redox_syscall", 798 | "smallvec", 799 | "windows-targets", 800 | ] 801 | 802 | [[package]] 803 | name = "paste" 804 | version = "1.0.14" 805 | source = "registry+https://github.com/rust-lang/crates.io-index" 806 | checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" 807 | 808 | [[package]] 809 | name = "percent-encoding" 810 | version = "2.3.1" 811 | source = "registry+https://github.com/rust-lang/crates.io-index" 812 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 813 | 814 | [[package]] 815 | name = "pin-project-lite" 816 | version = "0.2.13" 817 | source = "registry+https://github.com/rust-lang/crates.io-index" 818 | checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" 819 | 820 | [[package]] 821 | name = "pin-utils" 822 | version = "0.1.0" 823 | source = "registry+https://github.com/rust-lang/crates.io-index" 824 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 825 | 826 | [[package]] 827 | name = "pkg-config" 828 | version = "0.3.27" 829 | source = "registry+https://github.com/rust-lang/crates.io-index" 830 | checksum = "26072860ba924cbfa98ea39c8c19b4dd6a4a25423dbdf219c1eca91aa0cf6964" 831 | 832 | [[package]] 833 | name = "powerfmt" 834 | version = "0.2.0" 835 | source = "registry+https://github.com/rust-lang/crates.io-index" 836 | checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" 837 | 838 | [[package]] 839 | name = "ppv-lite86" 840 | version = "0.2.17" 841 | source = "registry+https://github.com/rust-lang/crates.io-index" 842 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 843 | 844 | [[package]] 845 | name = "proc-macro2" 846 | version = "1.0.70" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "39278fbbf5fb4f646ce651690877f89d1c5811a3d4acb27700c1cb3cdb78fd3b" 849 | dependencies = [ 850 | "unicode-ident", 851 | ] 852 | 853 | [[package]] 854 | name = "quote" 855 | version = "1.0.33" 856 | source = "registry+https://github.com/rust-lang/crates.io-index" 857 | checksum = "5267fca4496028628a95160fc423a33e8b2e6af8a5302579e322e4b520293cae" 858 | dependencies = [ 859 | "proc-macro2", 860 | ] 861 | 862 | [[package]] 863 | name = "rand" 864 | version = "0.8.5" 865 | source = "registry+https://github.com/rust-lang/crates.io-index" 866 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 867 | dependencies = [ 868 | "libc", 869 | "rand_chacha", 870 | "rand_core", 871 | ] 872 | 873 | [[package]] 874 | name = "rand_chacha" 875 | version = "0.3.1" 876 | source = "registry+https://github.com/rust-lang/crates.io-index" 877 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 878 | dependencies = [ 879 | "ppv-lite86", 880 | "rand_core", 881 | ] 882 | 883 | [[package]] 884 | name = "rand_core" 885 | version = "0.6.4" 886 | source = "registry+https://github.com/rust-lang/crates.io-index" 887 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 888 | dependencies = [ 889 | "getrandom", 890 | ] 891 | 892 | [[package]] 893 | name = "redox_syscall" 894 | version = "0.4.1" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 897 | dependencies = [ 898 | "bitflags 1.3.2", 899 | ] 900 | 901 | [[package]] 902 | name = "regex" 903 | version = "1.10.2" 904 | source = "registry+https://github.com/rust-lang/crates.io-index" 905 | checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" 906 | dependencies = [ 907 | "aho-corasick", 908 | "memchr", 909 | "regex-automata", 910 | "regex-syntax", 911 | ] 912 | 913 | [[package]] 914 | name = "regex-automata" 915 | version = "0.4.3" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" 918 | dependencies = [ 919 | "aho-corasick", 920 | "memchr", 921 | "regex-syntax", 922 | ] 923 | 924 | [[package]] 925 | name = "regex-syntax" 926 | version = "0.8.2" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" 929 | 930 | [[package]] 931 | name = "rustc-demangle" 932 | version = "0.1.23" 933 | source = "registry+https://github.com/rust-lang/crates.io-index" 934 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 935 | 936 | [[package]] 937 | name = "rustc_version" 938 | version = "0.4.0" 939 | source = "registry+https://github.com/rust-lang/crates.io-index" 940 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 941 | dependencies = [ 942 | "semver", 943 | ] 944 | 945 | [[package]] 946 | name = "ryu" 947 | version = "1.0.16" 948 | source = "registry+https://github.com/rust-lang/crates.io-index" 949 | checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" 950 | 951 | [[package]] 952 | name = "scopeguard" 953 | version = "1.2.0" 954 | source = "registry+https://github.com/rust-lang/crates.io-index" 955 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 956 | 957 | [[package]] 958 | name = "semver" 959 | version = "1.0.20" 960 | source = "registry+https://github.com/rust-lang/crates.io-index" 961 | checksum = "836fa6a3e1e547f9a2c4040802ec865b5d85f4014efe00555d7090a3dcaa1090" 962 | 963 | [[package]] 964 | name = "serde" 965 | version = "1.0.193" 966 | source = "registry+https://github.com/rust-lang/crates.io-index" 967 | checksum = "25dd9975e68d0cb5aa1120c288333fc98731bd1dd12f561e468ea4728c042b89" 968 | dependencies = [ 969 | "serde_derive", 970 | ] 971 | 972 | [[package]] 973 | name = "serde_derive" 974 | version = "1.0.193" 975 | source = "registry+https://github.com/rust-lang/crates.io-index" 976 | checksum = "43576ca501357b9b071ac53cdc7da8ef0cbd9493d8df094cd821777ea6e894d3" 977 | dependencies = [ 978 | "proc-macro2", 979 | "quote", 980 | "syn 2.0.41", 981 | ] 982 | 983 | [[package]] 984 | name = "serde_json" 985 | version = "1.0.108" 986 | source = "registry+https://github.com/rust-lang/crates.io-index" 987 | checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b" 988 | dependencies = [ 989 | "itoa", 990 | "ryu", 991 | "serde", 992 | ] 993 | 994 | [[package]] 995 | name = "serde_urlencoded" 996 | version = "0.7.1" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 999 | dependencies = [ 1000 | "form_urlencoded", 1001 | "itoa", 1002 | "ryu", 1003 | "serde", 1004 | ] 1005 | 1006 | [[package]] 1007 | name = "sha1" 1008 | version = "0.10.6" 1009 | source = "registry+https://github.com/rust-lang/crates.io-index" 1010 | checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" 1011 | dependencies = [ 1012 | "cfg-if", 1013 | "cpufeatures", 1014 | "digest", 1015 | ] 1016 | 1017 | [[package]] 1018 | name = "signal-hook-registry" 1019 | version = "1.4.1" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" 1022 | dependencies = [ 1023 | "libc", 1024 | ] 1025 | 1026 | [[package]] 1027 | name = "slab" 1028 | version = "0.4.9" 1029 | source = "registry+https://github.com/rust-lang/crates.io-index" 1030 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 1031 | dependencies = [ 1032 | "autocfg", 1033 | ] 1034 | 1035 | [[package]] 1036 | name = "smallvec" 1037 | version = "1.11.2" 1038 | source = "registry+https://github.com/rust-lang/crates.io-index" 1039 | checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" 1040 | 1041 | [[package]] 1042 | name = "socket2" 1043 | version = "0.5.5" 1044 | source = "registry+https://github.com/rust-lang/crates.io-index" 1045 | checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9" 1046 | dependencies = [ 1047 | "libc", 1048 | "windows-sys", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "syn" 1053 | version = "1.0.109" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 1056 | dependencies = [ 1057 | "proc-macro2", 1058 | "quote", 1059 | "unicode-ident", 1060 | ] 1061 | 1062 | [[package]] 1063 | name = "syn" 1064 | version = "2.0.41" 1065 | source = "registry+https://github.com/rust-lang/crates.io-index" 1066 | checksum = "44c8b28c477cc3bf0e7966561e3460130e1255f7a1cf71931075f1c5e7a7e269" 1067 | dependencies = [ 1068 | "proc-macro2", 1069 | "quote", 1070 | "unicode-ident", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "time" 1075 | version = "0.3.30" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "c4a34ab300f2dee6e562c10a046fc05e358b29f9bf92277f30c3c8d82275f6f5" 1078 | dependencies = [ 1079 | "deranged", 1080 | "itoa", 1081 | "powerfmt", 1082 | "serde", 1083 | "time-core", 1084 | "time-macros", 1085 | ] 1086 | 1087 | [[package]] 1088 | name = "time-core" 1089 | version = "0.1.2" 1090 | source = "registry+https://github.com/rust-lang/crates.io-index" 1091 | checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" 1092 | 1093 | [[package]] 1094 | name = "time-macros" 1095 | version = "0.2.15" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "4ad70d68dba9e1f8aceda7aa6711965dfec1cac869f311a51bd08b3a2ccbce20" 1098 | dependencies = [ 1099 | "time-core", 1100 | ] 1101 | 1102 | [[package]] 1103 | name = "tinyvec" 1104 | version = "1.6.0" 1105 | source = "registry+https://github.com/rust-lang/crates.io-index" 1106 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 1107 | dependencies = [ 1108 | "tinyvec_macros", 1109 | ] 1110 | 1111 | [[package]] 1112 | name = "tinyvec_macros" 1113 | version = "0.1.1" 1114 | source = "registry+https://github.com/rust-lang/crates.io-index" 1115 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 1116 | 1117 | [[package]] 1118 | name = "tokio" 1119 | version = "1.35.0" 1120 | source = "registry+https://github.com/rust-lang/crates.io-index" 1121 | checksum = "841d45b238a16291a4e1584e61820b8ae57d696cc5015c459c229ccc6990cc1c" 1122 | dependencies = [ 1123 | "backtrace", 1124 | "bytes", 1125 | "libc", 1126 | "mio", 1127 | "parking_lot", 1128 | "pin-project-lite", 1129 | "signal-hook-registry", 1130 | "socket2", 1131 | "windows-sys", 1132 | ] 1133 | 1134 | [[package]] 1135 | name = "tokio-util" 1136 | version = "0.7.10" 1137 | source = "registry+https://github.com/rust-lang/crates.io-index" 1138 | checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" 1139 | dependencies = [ 1140 | "bytes", 1141 | "futures-core", 1142 | "futures-sink", 1143 | "pin-project-lite", 1144 | "tokio", 1145 | "tracing", 1146 | ] 1147 | 1148 | [[package]] 1149 | name = "tracing" 1150 | version = "0.1.40" 1151 | source = "registry+https://github.com/rust-lang/crates.io-index" 1152 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 1153 | dependencies = [ 1154 | "log", 1155 | "pin-project-lite", 1156 | "tracing-core", 1157 | ] 1158 | 1159 | [[package]] 1160 | name = "tracing-core" 1161 | version = "0.1.32" 1162 | source = "registry+https://github.com/rust-lang/crates.io-index" 1163 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 1164 | dependencies = [ 1165 | "once_cell", 1166 | ] 1167 | 1168 | [[package]] 1169 | name = "typenum" 1170 | version = "1.17.0" 1171 | source = "registry+https://github.com/rust-lang/crates.io-index" 1172 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 1173 | 1174 | [[package]] 1175 | name = "unicode-bidi" 1176 | version = "0.3.14" 1177 | source = "registry+https://github.com/rust-lang/crates.io-index" 1178 | checksum = "6f2528f27a9eb2b21e69c95319b30bd0efd85d09c379741b0f78ea1d86be2416" 1179 | 1180 | [[package]] 1181 | name = "unicode-ident" 1182 | version = "1.0.12" 1183 | source = "registry+https://github.com/rust-lang/crates.io-index" 1184 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 1185 | 1186 | [[package]] 1187 | name = "unicode-normalization" 1188 | version = "0.1.22" 1189 | source = "registry+https://github.com/rust-lang/crates.io-index" 1190 | checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" 1191 | dependencies = [ 1192 | "tinyvec", 1193 | ] 1194 | 1195 | [[package]] 1196 | name = "url" 1197 | version = "2.5.0" 1198 | source = "registry+https://github.com/rust-lang/crates.io-index" 1199 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 1200 | dependencies = [ 1201 | "form_urlencoded", 1202 | "idna", 1203 | "percent-encoding", 1204 | ] 1205 | 1206 | [[package]] 1207 | name = "uuid" 1208 | version = "1.6.1" 1209 | source = "registry+https://github.com/rust-lang/crates.io-index" 1210 | checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" 1211 | dependencies = [ 1212 | "getrandom", 1213 | ] 1214 | 1215 | [[package]] 1216 | name = "version_check" 1217 | version = "0.9.4" 1218 | source = "registry+https://github.com/rust-lang/crates.io-index" 1219 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 1220 | 1221 | [[package]] 1222 | name = "wasi" 1223 | version = "0.11.0+wasi-snapshot-preview1" 1224 | source = "registry+https://github.com/rust-lang/crates.io-index" 1225 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 1226 | 1227 | [[package]] 1228 | name = "wasm-bindgen" 1229 | version = "0.2.89" 1230 | source = "registry+https://github.com/rust-lang/crates.io-index" 1231 | checksum = "0ed0d4f68a3015cc185aff4db9506a015f4b96f95303897bfa23f846db54064e" 1232 | dependencies = [ 1233 | "cfg-if", 1234 | "wasm-bindgen-macro", 1235 | ] 1236 | 1237 | [[package]] 1238 | name = "wasm-bindgen-backend" 1239 | version = "0.2.89" 1240 | source = "registry+https://github.com/rust-lang/crates.io-index" 1241 | checksum = "1b56f625e64f3a1084ded111c4d5f477df9f8c92df113852fa5a374dbda78826" 1242 | dependencies = [ 1243 | "bumpalo", 1244 | "log", 1245 | "once_cell", 1246 | "proc-macro2", 1247 | "quote", 1248 | "syn 2.0.41", 1249 | "wasm-bindgen-shared", 1250 | ] 1251 | 1252 | [[package]] 1253 | name = "wasm-bindgen-macro" 1254 | version = "0.2.89" 1255 | source = "registry+https://github.com/rust-lang/crates.io-index" 1256 | checksum = "0162dbf37223cd2afce98f3d0785506dcb8d266223983e4b5b525859e6e182b2" 1257 | dependencies = [ 1258 | "quote", 1259 | "wasm-bindgen-macro-support", 1260 | ] 1261 | 1262 | [[package]] 1263 | name = "wasm-bindgen-macro-support" 1264 | version = "0.2.89" 1265 | source = "registry+https://github.com/rust-lang/crates.io-index" 1266 | checksum = "f0eb82fcb7930ae6219a7ecfd55b217f5f0893484b7a13022ebb2b2bf20b5283" 1267 | dependencies = [ 1268 | "proc-macro2", 1269 | "quote", 1270 | "syn 2.0.41", 1271 | "wasm-bindgen-backend", 1272 | "wasm-bindgen-shared", 1273 | ] 1274 | 1275 | [[package]] 1276 | name = "wasm-bindgen-shared" 1277 | version = "0.2.89" 1278 | source = "registry+https://github.com/rust-lang/crates.io-index" 1279 | checksum = "7ab9b36309365056cd639da3134bf87fa8f3d86008abf99e612384a6eecd459f" 1280 | 1281 | [[package]] 1282 | name = "windows-core" 1283 | version = "0.51.1" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "f1f8cf84f35d2db49a46868f947758c7a1138116f7fac3bc844f43ade1292e64" 1286 | dependencies = [ 1287 | "windows-targets", 1288 | ] 1289 | 1290 | [[package]] 1291 | name = "windows-sys" 1292 | version = "0.48.0" 1293 | source = "registry+https://github.com/rust-lang/crates.io-index" 1294 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 1295 | dependencies = [ 1296 | "windows-targets", 1297 | ] 1298 | 1299 | [[package]] 1300 | name = "windows-targets" 1301 | version = "0.48.5" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 1304 | dependencies = [ 1305 | "windows_aarch64_gnullvm", 1306 | "windows_aarch64_msvc", 1307 | "windows_i686_gnu", 1308 | "windows_i686_msvc", 1309 | "windows_x86_64_gnu", 1310 | "windows_x86_64_gnullvm", 1311 | "windows_x86_64_msvc", 1312 | ] 1313 | 1314 | [[package]] 1315 | name = "windows_aarch64_gnullvm" 1316 | version = "0.48.5" 1317 | source = "registry+https://github.com/rust-lang/crates.io-index" 1318 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 1319 | 1320 | [[package]] 1321 | name = "windows_aarch64_msvc" 1322 | version = "0.48.5" 1323 | source = "registry+https://github.com/rust-lang/crates.io-index" 1324 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 1325 | 1326 | [[package]] 1327 | name = "windows_i686_gnu" 1328 | version = "0.48.5" 1329 | source = "registry+https://github.com/rust-lang/crates.io-index" 1330 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 1331 | 1332 | [[package]] 1333 | name = "windows_i686_msvc" 1334 | version = "0.48.5" 1335 | source = "registry+https://github.com/rust-lang/crates.io-index" 1336 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 1337 | 1338 | [[package]] 1339 | name = "windows_x86_64_gnu" 1340 | version = "0.48.5" 1341 | source = "registry+https://github.com/rust-lang/crates.io-index" 1342 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 1343 | 1344 | [[package]] 1345 | name = "windows_x86_64_gnullvm" 1346 | version = "0.48.5" 1347 | source = "registry+https://github.com/rust-lang/crates.io-index" 1348 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 1349 | 1350 | [[package]] 1351 | name = "windows_x86_64_msvc" 1352 | version = "0.48.5" 1353 | source = "registry+https://github.com/rust-lang/crates.io-index" 1354 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 1355 | 1356 | [[package]] 1357 | name = "zerocopy" 1358 | version = "0.7.31" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | checksum = "1c4061bedbb353041c12f413700357bec76df2c7e2ca8e4df8bac24c6bf68e3d" 1361 | dependencies = [ 1362 | "zerocopy-derive", 1363 | ] 1364 | 1365 | [[package]] 1366 | name = "zerocopy-derive" 1367 | version = "0.7.31" 1368 | source = "registry+https://github.com/rust-lang/crates.io-index" 1369 | checksum = "b3c129550b3e6de3fd0ba67ba5c81818f9805e58b8d7fee80a3a59d2c9fc601a" 1370 | dependencies = [ 1371 | "proc-macro2", 1372 | "quote", 1373 | "syn 2.0.41", 1374 | ] 1375 | 1376 | [[package]] 1377 | name = "zstd" 1378 | version = "0.12.4" 1379 | source = "registry+https://github.com/rust-lang/crates.io-index" 1380 | checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" 1381 | dependencies = [ 1382 | "zstd-safe", 1383 | ] 1384 | 1385 | [[package]] 1386 | name = "zstd-safe" 1387 | version = "6.0.6" 1388 | source = "registry+https://github.com/rust-lang/crates.io-index" 1389 | checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" 1390 | dependencies = [ 1391 | "libc", 1392 | "zstd-sys", 1393 | ] 1394 | 1395 | [[package]] 1396 | name = "zstd-sys" 1397 | version = "2.0.9+zstd.1.5.5" 1398 | source = "registry+https://github.com/rust-lang/crates.io-index" 1399 | checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" 1400 | dependencies = [ 1401 | "cc", 1402 | "pkg-config", 1403 | ] 1404 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "actix_server_0" 3 | version = "0.1.0" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | 8 | [dependencies] 9 | actix-web = "4" 10 | chrono = { version = "0.4.31", features = ["serde"] } 11 | serde = { version = "1.0.193", features = ["derive"] } 12 | uuid = { version = "1.6.1", features = ["v4"] } 13 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Rust actix server 2 | 3 | A brief description of what this project does and who it's for. 4 | 5 | ## Installation 6 | 7 | Install my-project with npm 8 | 9 | ```bash 10 | cargo build 11 | ``` 12 | 13 | ## Usage/Examples 14 | 15 | ```bash 16 | cargo run 17 | ``` 18 | 19 | ## API Reference 20 | 21 | #### Get all items 22 | 23 | ```http 24 | GET /api/todos 25 | ``` 26 | 27 | | Parameter | Type | Description | 28 | | :-------- | :------- | :------------------------- | 29 | | `api_key` | `string` | **Required**. Your API key | 30 | 31 | #### Get item 32 | 33 | ```http 34 | GET /api/items/${id} 35 | ``` 36 | 37 | | Parameter | Type | Description | 38 | | :-------- | :------- | :-------------------------------- | 39 | | `id` | `string` | **Required**. Id of item to fetch | 40 | 41 | #### Add item 42 | 43 | ```http 44 | POST /api/items 45 | ``` 46 | 47 | | Parameter | Type | Description | 48 | | :-------- | :------- | :-------------------------------- | 49 | | `api_key` | `string` | **Required**. Your API key | 50 | | `name` | `string` | **Required**. Item name | 51 | | `desc` | `string` | **Required**. Item description | 52 | 53 | ## Contributing 54 | 55 | Contributions are always welcome! 56 | 57 | See `contributing.md` for ways to get started. 58 | 59 | Please adhere to this project's `code of conduct`. 60 | -------------------------------------------------------------------------------- /curl_commands.txt: -------------------------------------------------------------------------------- 1 | # Create a new Todo items 2 | curl -X POST -H "Content-Type: application/json" -d '{"title": "Buy milk", "description": "Buy 2 liters of milk"}' http://localhost:8000/api/todos 3 | curl -X POST -H "Content-Type: application/json" -d '{"title": "Buy eggs", "description": "Buy 12 eggs"}' http://localhost:8000/api/todos 4 | curl -X POST -H "Content-Type: application/json" -d '{"title": "Buy bread", "description": "Buy 1 loaf of bread"}' http://localhost:8000/api/todos 5 | 6 | # Get all Todo items 7 | curl -s http://localhost:8000/api/todos | jq 8 | 9 | # Get a Todo item by id 10 | curl -s http://localhost:8000/api/todos/590538de-56c4-4057-b4e6-c91021fc04be | jq 11 | 12 | # Update a Todo item by id 13 | curl -s -X PUT -H "Content-Type: application/json" -d '{"title": "Buy 2 liters of milk", "description": "Buy 2 liters of milk"}' http://localhost:8000/api/todos/590538de-56c4-4057-b4e6-c91021fc04be | jq 14 | 15 | # Delete a Todo item by id 16 | curl -s -X DELETE http://localhost:8000/api/todos/590538de-56c4-4057-b4e6-c91021fc04be | jq 17 | 18 | # Get all Todo items 19 | curl -s http://localhost:8000/api/todos | jq 20 | -------------------------------------------------------------------------------- /src/api/api.rs: -------------------------------------------------------------------------------- 1 | use actix_web::web::{self, scope}; 2 | use actix_web::{web::{ 3 | Data, 4 | Json, 5 | 6 | }, post, get, put, delete, HttpResponse } ; 7 | 8 | use crate::{models::todo::Todo, repository::database::Database}; 9 | 10 | #[post("/todos")] 11 | pub async fn create_todo(db: Data, new_todo: Json) -> HttpResponse { 12 | let todo = db.create_todo(new_todo.into_inner()); 13 | match todo { 14 | Ok(todo) => HttpResponse::Ok().json(todo), 15 | Err(err) => HttpResponse::InternalServerError().body(err.to_string()), 16 | } 17 | } 18 | 19 | #[get("/todos")] 20 | pub async fn get_todos(db: Data) -> HttpResponse { 21 | let todos = db.get_todos(); 22 | HttpResponse::Ok().json(todos) 23 | } 24 | 25 | #[get("/todos/{id}")] 26 | pub async fn get_todo_by_id(db: Data, id: web::Path) -> HttpResponse { 27 | let todo = db.get_todo_by_id(&id); 28 | match todo { 29 | Some(todo)=>HttpResponse::Ok().json(todo), 30 | None => HttpResponse::NotFound().body("Requested data not found"), 31 | } 32 | } 33 | 34 | #[put("/todos/{id}")] 35 | pub async fn update_todo_by_id (db: Data, id: web::Path, updateed_todo: Json) -> HttpResponse { 36 | let todo = db.update_todo_by_id(&id, updateed_todo.clone()); 37 | match todo { 38 | Some(todo) => HttpResponse::Ok().json(todo), 39 | None => HttpResponse::NotFound().body("The ID doesnot exist"), 40 | } 41 | } 42 | 43 | #[delete("/todos/{id}")] 44 | pub async fn delete_todo_by_id(db: Data, id: web::Path) -> HttpResponse { 45 | let todo = db.delete_todo_by_id(&id); 46 | match todo { 47 | Some(todo) => HttpResponse::Ok().json(todo), 48 | None => HttpResponse::NotFound().body(format!("The id {} not found", id)), 49 | } 50 | } 51 | 52 | pub fn config(cfg: &mut web::ServiceConfig) { 53 | cfg.service( 54 | scope("/api") 55 | .service(create_todo) 56 | .service(get_todos) 57 | .service(get_todo_by_id) 58 | .service(update_todo_by_id) 59 | .service(delete_todo_by_id) 60 | ); 61 | } -------------------------------------------------------------------------------- /src/api/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod api; -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | use actix_web:: {get, web, HttpResponse, HttpServer, Responder, App}; 2 | use serde::Serialize; 3 | 4 | mod api; 5 | mod models; 6 | mod repository; 7 | 8 | #[derive(Debug, Serialize)] 9 | pub struct Response { 10 | pub status: String, 11 | pub message: String, 12 | } 13 | 14 | #[get("/health")] 15 | async fn healthcheck() -> impl Responder { 16 | let response = Response{ 17 | status: "200".to_string(), 18 | message : String::from("Server is running fine"), 19 | }; 20 | HttpResponse::Ok().json(response) 21 | } 22 | 23 | async fn not_found() ->impl Responder { 24 | let response = Response { 25 | status: "404".to_string(), 26 | message: String::from("The requested resource is not available."), 27 | }; 28 | HttpResponse::Ok().json(response) 29 | } 30 | 31 | 32 | #[actix_web::main] 33 | pub async fn main() -> std::io::Result<()> { 34 | let url = "127.0.0.1:8000".to_string(); 35 | println!("Server is running on {url}"); 36 | 37 | let todo_db = repository::database::Database::new(); 38 | let app_data = web::Data::new(todo_db); 39 | 40 | HttpServer::new( move ||{ 41 | App::new() 42 | .app_data(app_data.clone()) 43 | .configure(api::api::config) 44 | .service(healthcheck) 45 | .default_service( 46 | web::route().to(not_found) 47 | ) 48 | .wrap(actix_web::middleware::Logger::default()) 49 | }) 50 | .bind(url)? 51 | .run() 52 | .await 53 | } -------------------------------------------------------------------------------- /src/models/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod todo; -------------------------------------------------------------------------------- /src/models/todo.rs: -------------------------------------------------------------------------------- 1 | use chrono::prelude::{DateTime, Utc}; 2 | use serde::{Serialize, Deserialize}; 3 | 4 | #[derive(Serialize, Deserialize, Debug, Clone)] 5 | pub struct Todo { 6 | pub id: Option, 7 | pub title: String, 8 | pub description: Option, 9 | pub created_at: Option>, 10 | pub updated_at: Option>, 11 | } -------------------------------------------------------------------------------- /src/repository/database.rs: -------------------------------------------------------------------------------- 1 | use std::fmt::Error; 2 | use chrono::prelude::*; 3 | use std::sync::{Arc, Mutex}; 4 | 5 | 6 | use crate::models::todo::Todo; 7 | 8 | pub struct Database { 9 | pub todos: Arc>>, 10 | } 11 | 12 | impl Database { 13 | pub fn new() ->Self { 14 | let todos = Arc::new(Mutex::new(vec![])); 15 | Database {todos} 16 | } 17 | 18 | pub fn create_todo (&self, todo: Todo) -> Result { 19 | let mut todos = self.todos.lock().unwrap(); 20 | let id = uuid::Uuid::new_v4().to_string(); 21 | let created_at = Utc::now(); 22 | let updated_at = Utc::now(); 23 | let todo = Todo { 24 | id: Some(id), 25 | created_at: Some(created_at), 26 | updated_at: Some(updated_at), 27 | ..todo 28 | }; 29 | todos.push(todo.clone()); 30 | Ok(todo) 31 | } 32 | 33 | pub fn get_todos(&self) -> Vec { 34 | let todos = self.todos.lock().unwrap(); 35 | todos.clone() 36 | } 37 | 38 | pub fn get_todo_by_id(&self, id: &str) -> Option { 39 | let todos = self.todos.lock().unwrap(); 40 | todos.iter().find(|todo| todo.id == Some(id.to_string())).cloned() 41 | } 42 | 43 | pub fn update_todo_by_id(&self, id: &str, todo: Todo) -> Option { 44 | let mut todos = self.todos.lock().unwrap(); 45 | let updated_at = Utc::now(); 46 | let todo = Todo { 47 | id : Some(id.to_string()), 48 | updated_at: Some(updated_at), 49 | ..todo 50 | }; 51 | 52 | let index = todos.iter().position(|todo| todo.id == Some(id.to_string()))?; 53 | todos[index] = todo.clone(); 54 | Some(todo) 55 | } 56 | 57 | pub fn delete_todo_by_id(&self, id: &str) -> Option { 58 | let mut todos = self.todos.lock().unwrap(); 59 | let index = todos.iter().position(|todo| todo.id == Some(id.to_string()))? ; 60 | Some(todos.remove(index)) 61 | } 62 | } -------------------------------------------------------------------------------- /src/repository/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod database; --------------------------------------------------------------------------------