├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── config └── app.yaml ├── docs └── db.sql └── src ├── main.rs ├── server ├── code.rs ├── mod.rs ├── route.rs └── user.rs └── store ├── mod.rs └── user.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | 3 | 4 | # Added by cargo 5 | # 6 | # already existing elements were commented out 7 | 8 | #/target 9 | -------------------------------------------------------------------------------- /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 = "ahash" 7 | version = "0.7.6" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" 10 | dependencies = [ 11 | "getrandom", 12 | "once_cell", 13 | "version_check", 14 | ] 15 | 16 | [[package]] 17 | name = "aho-corasick" 18 | version = "0.7.18" 19 | source = "registry+https://github.com/rust-lang/crates.io-index" 20 | checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" 21 | dependencies = [ 22 | "memchr", 23 | ] 24 | 25 | [[package]] 26 | name = "ansi_term" 27 | version = "0.12.1" 28 | source = "registry+https://github.com/rust-lang/crates.io-index" 29 | checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" 30 | dependencies = [ 31 | "winapi", 32 | ] 33 | 34 | [[package]] 35 | name = "arrayvec" 36 | version = "0.5.2" 37 | source = "registry+https://github.com/rust-lang/crates.io-index" 38 | checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" 39 | 40 | [[package]] 41 | name = "arrayvec" 42 | version = "0.7.2" 43 | source = "registry+https://github.com/rust-lang/crates.io-index" 44 | checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" 45 | 46 | [[package]] 47 | name = "async-channel" 48 | version = "1.6.1" 49 | source = "registry+https://github.com/rust-lang/crates.io-index" 50 | checksum = "2114d64672151c0c5eaa5e131ec84a74f06e1e559830dabba01ca30605d66319" 51 | dependencies = [ 52 | "concurrent-queue", 53 | "event-listener", 54 | "futures-core", 55 | ] 56 | 57 | [[package]] 58 | name = "async-executor" 59 | version = "1.4.1" 60 | source = "registry+https://github.com/rust-lang/crates.io-index" 61 | checksum = "871f9bb5e0a22eeb7e8cf16641feb87c9dc67032ccf8ff49e772eb9941d3a965" 62 | dependencies = [ 63 | "async-task", 64 | "concurrent-queue", 65 | "fastrand", 66 | "futures-lite", 67 | "once_cell", 68 | "slab", 69 | ] 70 | 71 | [[package]] 72 | name = "async-global-executor" 73 | version = "2.0.2" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "9586ec52317f36de58453159d48351bc244bc24ced3effc1fce22f3d48664af6" 76 | dependencies = [ 77 | "async-channel", 78 | "async-executor", 79 | "async-io", 80 | "async-mutex", 81 | "blocking", 82 | "futures-lite", 83 | "num_cpus", 84 | "once_cell", 85 | ] 86 | 87 | [[package]] 88 | name = "async-io" 89 | version = "1.6.0" 90 | source = "registry+https://github.com/rust-lang/crates.io-index" 91 | checksum = "a811e6a479f2439f0c04038796b5cfb3d2ad56c230e0f2d3f7b04d68cfee607b" 92 | dependencies = [ 93 | "concurrent-queue", 94 | "futures-lite", 95 | "libc", 96 | "log", 97 | "once_cell", 98 | "parking", 99 | "polling", 100 | "slab", 101 | "socket2", 102 | "waker-fn", 103 | "winapi", 104 | ] 105 | 106 | [[package]] 107 | name = "async-lock" 108 | version = "2.4.0" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "e6a8ea61bf9947a1007c5cada31e647dbc77b103c679858150003ba697ea798b" 111 | dependencies = [ 112 | "event-listener", 113 | ] 114 | 115 | [[package]] 116 | name = "async-mutex" 117 | version = "1.4.0" 118 | source = "registry+https://github.com/rust-lang/crates.io-index" 119 | checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" 120 | dependencies = [ 121 | "event-listener", 122 | ] 123 | 124 | [[package]] 125 | name = "async-process" 126 | version = "1.3.0" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "83137067e3a2a6a06d67168e49e68a0957d215410473a740cea95a2425c0b7c6" 129 | dependencies = [ 130 | "async-io", 131 | "blocking", 132 | "cfg-if", 133 | "event-listener", 134 | "futures-lite", 135 | "libc", 136 | "once_cell", 137 | "signal-hook", 138 | "winapi", 139 | ] 140 | 141 | [[package]] 142 | name = "async-rustls" 143 | version = "0.2.0" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "9c86f33abd5a4f3e2d6d9251a9e0c6a7e52eb1113caf893dae8429bf4a53f378" 146 | dependencies = [ 147 | "futures-lite", 148 | "rustls", 149 | "webpki", 150 | ] 151 | 152 | [[package]] 153 | name = "async-std" 154 | version = "1.10.0" 155 | source = "registry+https://github.com/rust-lang/crates.io-index" 156 | checksum = "f8056f1455169ab86dd47b47391e4ab0cbd25410a70e9fe675544f49bafaf952" 157 | dependencies = [ 158 | "async-channel", 159 | "async-global-executor", 160 | "async-io", 161 | "async-lock", 162 | "async-process", 163 | "crossbeam-utils", 164 | "futures-channel", 165 | "futures-core", 166 | "futures-io", 167 | "futures-lite", 168 | "gloo-timers", 169 | "kv-log-macro", 170 | "log", 171 | "memchr", 172 | "num_cpus", 173 | "once_cell", 174 | "pin-project-lite", 175 | "pin-utils", 176 | "slab", 177 | "wasm-bindgen-futures", 178 | ] 179 | 180 | [[package]] 181 | name = "async-task" 182 | version = "4.1.0" 183 | source = "registry+https://github.com/rust-lang/crates.io-index" 184 | checksum = "677d306121baf53310a3fd342d88dc0824f6bbeace68347593658525565abee8" 185 | 186 | [[package]] 187 | name = "async-trait" 188 | version = "0.1.51" 189 | source = "registry+https://github.com/rust-lang/crates.io-index" 190 | checksum = "44318e776df68115a881de9a8fd1b9e53368d7a4a5ce4cc48517da3393233a5e" 191 | dependencies = [ 192 | "proc-macro2", 193 | "quote", 194 | "syn", 195 | ] 196 | 197 | [[package]] 198 | name = "atoi" 199 | version = "0.4.0" 200 | source = "registry+https://github.com/rust-lang/crates.io-index" 201 | checksum = "616896e05fc0e2649463a93a15183c6a16bf03413a7af88ef1285ddedfa9cda5" 202 | dependencies = [ 203 | "num-traits 0.2.14", 204 | ] 205 | 206 | [[package]] 207 | name = "atomic-waker" 208 | version = "1.0.0" 209 | source = "registry+https://github.com/rust-lang/crates.io-index" 210 | checksum = "065374052e7df7ee4047b1160cca5e1467a12351a40b3da123c870ba0b8eda2a" 211 | 212 | [[package]] 213 | name = "atty" 214 | version = "0.2.14" 215 | source = "registry+https://github.com/rust-lang/crates.io-index" 216 | checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" 217 | dependencies = [ 218 | "hermit-abi", 219 | "libc", 220 | "winapi", 221 | ] 222 | 223 | [[package]] 224 | name = "autocfg" 225 | version = "0.1.7" 226 | source = "registry+https://github.com/rust-lang/crates.io-index" 227 | checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" 228 | 229 | [[package]] 230 | name = "autocfg" 231 | version = "1.0.1" 232 | source = "registry+https://github.com/rust-lang/crates.io-index" 233 | checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" 234 | 235 | [[package]] 236 | name = "axum" 237 | version = "0.4.4" 238 | source = "registry+https://github.com/rust-lang/crates.io-index" 239 | checksum = "310a147401c66e79fc78636e4db63ac68cd6acb9ece056de806ea173a15bce32" 240 | dependencies = [ 241 | "async-trait", 242 | "axum-core", 243 | "bitflags", 244 | "bytes", 245 | "futures-util", 246 | "http", 247 | "http-body", 248 | "hyper", 249 | "matchit", 250 | "memchr", 251 | "mime", 252 | "percent-encoding", 253 | "pin-project-lite", 254 | "serde 1.0.136", 255 | "serde_json", 256 | "serde_urlencoded", 257 | "sync_wrapper", 258 | "tokio", 259 | "tokio-util", 260 | "tower", 261 | "tower-http", 262 | "tower-layer", 263 | "tower-service", 264 | ] 265 | 266 | [[package]] 267 | name = "axum-core" 268 | version = "0.1.1" 269 | source = "registry+https://github.com/rust-lang/crates.io-index" 270 | checksum = "1ca6c0b218388a7ed6a8d25e94f7dea5498daaa4fd8c711fb3ff166041b06fda" 271 | dependencies = [ 272 | "async-trait", 273 | "bytes", 274 | "futures-util", 275 | "http", 276 | "http-body", 277 | "mime", 278 | ] 279 | 280 | [[package]] 281 | name = "base-x" 282 | version = "0.2.8" 283 | source = "registry+https://github.com/rust-lang/crates.io-index" 284 | checksum = "a4521f3e3d031370679b3b140beb36dfe4801b09ac77e30c61941f97df3ef28b" 285 | 286 | [[package]] 287 | name = "base64" 288 | version = "0.13.0" 289 | source = "registry+https://github.com/rust-lang/crates.io-index" 290 | checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" 291 | 292 | [[package]] 293 | name = "bigdecimal" 294 | version = "0.2.2" 295 | source = "registry+https://github.com/rust-lang/crates.io-index" 296 | checksum = "d1e50562e37200edf7c6c43e54a08e64a5553bfb59d9c297d5572512aa517256" 297 | dependencies = [ 298 | "num-bigint 0.3.3", 299 | "num-integer", 300 | "num-traits 0.2.14", 301 | "serde 1.0.136", 302 | ] 303 | 304 | [[package]] 305 | name = "bit-vec" 306 | version = "0.6.3" 307 | source = "registry+https://github.com/rust-lang/crates.io-index" 308 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 309 | dependencies = [ 310 | "serde 1.0.136", 311 | ] 312 | 313 | [[package]] 314 | name = "bitflags" 315 | version = "1.3.2" 316 | source = "registry+https://github.com/rust-lang/crates.io-index" 317 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 318 | 319 | [[package]] 320 | name = "block-buffer" 321 | version = "0.7.3" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" 324 | dependencies = [ 325 | "block-padding", 326 | "byte-tools", 327 | "byteorder", 328 | "generic-array 0.12.4", 329 | ] 330 | 331 | [[package]] 332 | name = "block-buffer" 333 | version = "0.9.0" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" 336 | dependencies = [ 337 | "generic-array 0.14.5", 338 | ] 339 | 340 | [[package]] 341 | name = "block-padding" 342 | version = "0.1.5" 343 | source = "registry+https://github.com/rust-lang/crates.io-index" 344 | checksum = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5" 345 | dependencies = [ 346 | "byte-tools", 347 | ] 348 | 349 | [[package]] 350 | name = "blocking" 351 | version = "1.1.0" 352 | source = "registry+https://github.com/rust-lang/crates.io-index" 353 | checksum = "046e47d4b2d391b1f6f8b407b1deb8dee56c1852ccd868becf2710f601b5f427" 354 | dependencies = [ 355 | "async-channel", 356 | "async-task", 357 | "atomic-waker", 358 | "fastrand", 359 | "futures-lite", 360 | "once_cell", 361 | ] 362 | 363 | [[package]] 364 | name = "bumpalo" 365 | version = "3.9.1" 366 | source = "registry+https://github.com/rust-lang/crates.io-index" 367 | checksum = "a4a45a46ab1f2412e53d3a0ade76ffad2025804294569aae387231a0cd6e0899" 368 | 369 | [[package]] 370 | name = "byte-tools" 371 | version = "0.3.1" 372 | source = "registry+https://github.com/rust-lang/crates.io-index" 373 | checksum = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7" 374 | 375 | [[package]] 376 | name = "byteorder" 377 | version = "1.4.3" 378 | source = "registry+https://github.com/rust-lang/crates.io-index" 379 | checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" 380 | 381 | [[package]] 382 | name = "bytes" 383 | version = "1.1.0" 384 | source = "registry+https://github.com/rust-lang/crates.io-index" 385 | checksum = "c4872d67bab6358e59559027aa3b9157c53d9358c51423c17554809a8858e0f8" 386 | 387 | [[package]] 388 | name = "cache-padded" 389 | version = "1.2.0" 390 | source = "registry+https://github.com/rust-lang/crates.io-index" 391 | checksum = "c1db59621ec70f09c5e9b597b220c7a2b43611f4710dc03ceb8748637775692c" 392 | 393 | [[package]] 394 | name = "cc" 395 | version = "1.0.72" 396 | source = "registry+https://github.com/rust-lang/crates.io-index" 397 | checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" 398 | 399 | [[package]] 400 | name = "cfg-if" 401 | version = "1.0.0" 402 | source = "registry+https://github.com/rust-lang/crates.io-index" 403 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 404 | 405 | [[package]] 406 | name = "chrono" 407 | version = "0.4.19" 408 | source = "registry+https://github.com/rust-lang/crates.io-index" 409 | checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" 410 | dependencies = [ 411 | "libc", 412 | "num-integer", 413 | "num-traits 0.2.14", 414 | "serde 1.0.136", 415 | "time 0.1.43", 416 | "winapi", 417 | ] 418 | 419 | [[package]] 420 | name = "clap" 421 | version = "2.34.0" 422 | source = "registry+https://github.com/rust-lang/crates.io-index" 423 | checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" 424 | dependencies = [ 425 | "ansi_term", 426 | "atty", 427 | "bitflags", 428 | "strsim", 429 | "textwrap", 430 | "unicode-width", 431 | "vec_map", 432 | ] 433 | 434 | [[package]] 435 | name = "concurrent-queue" 436 | version = "1.2.2" 437 | source = "registry+https://github.com/rust-lang/crates.io-index" 438 | checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" 439 | dependencies = [ 440 | "cache-padded", 441 | ] 442 | 443 | [[package]] 444 | name = "config" 445 | version = "0.11.0" 446 | source = "registry+https://github.com/rust-lang/crates.io-index" 447 | checksum = "1b1b9d958c2b1368a663f05538fc1b5975adce1e19f435acceae987aceeeb369" 448 | dependencies = [ 449 | "lazy_static", 450 | "nom 5.1.2", 451 | "rust-ini", 452 | "serde 1.0.136", 453 | "serde-hjson", 454 | "serde_json", 455 | "toml", 456 | "yaml-rust", 457 | ] 458 | 459 | [[package]] 460 | name = "const_fn" 461 | version = "0.4.9" 462 | source = "registry+https://github.com/rust-lang/crates.io-index" 463 | checksum = "fbdcdcb6d86f71c5e97409ad45898af11cbc995b4ee8112d59095a28d376c935" 464 | 465 | [[package]] 466 | name = "cpufeatures" 467 | version = "0.2.1" 468 | source = "registry+https://github.com/rust-lang/crates.io-index" 469 | checksum = "95059428f66df56b63431fdb4e1947ed2190586af5c5a8a8b71122bdf5a7f469" 470 | dependencies = [ 471 | "libc", 472 | ] 473 | 474 | [[package]] 475 | name = "crc" 476 | version = "2.1.0" 477 | source = "registry+https://github.com/rust-lang/crates.io-index" 478 | checksum = "49fc9a695bca7f35f5f4c15cddc84415f66a74ea78eef08e90c5024f2b540e23" 479 | dependencies = [ 480 | "crc-catalog", 481 | ] 482 | 483 | [[package]] 484 | name = "crc-catalog" 485 | version = "1.1.1" 486 | source = "registry+https://github.com/rust-lang/crates.io-index" 487 | checksum = "ccaeedb56da03b09f598226e25e80088cb4cd25f316e6e4df7d695f0feeb1403" 488 | 489 | [[package]] 490 | name = "crossbeam-channel" 491 | version = "0.5.2" 492 | source = "registry+https://github.com/rust-lang/crates.io-index" 493 | checksum = "e54ea8bc3fb1ee042f5aace6e3c6e025d3874866da222930f70ce62aceba0bfa" 494 | dependencies = [ 495 | "cfg-if", 496 | "crossbeam-utils", 497 | ] 498 | 499 | [[package]] 500 | name = "crossbeam-queue" 501 | version = "0.3.3" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "b979d76c9fcb84dffc80a73f7290da0f83e4c95773494674cb44b76d13a7a110" 504 | dependencies = [ 505 | "cfg-if", 506 | "crossbeam-utils", 507 | ] 508 | 509 | [[package]] 510 | name = "crossbeam-utils" 511 | version = "0.8.6" 512 | source = "registry+https://github.com/rust-lang/crates.io-index" 513 | checksum = "cfcae03edb34f947e64acdb1c33ec169824e20657e9ecb61cef6c8c74dcb8120" 514 | dependencies = [ 515 | "cfg-if", 516 | "lazy_static", 517 | ] 518 | 519 | [[package]] 520 | name = "crypto-mac" 521 | version = "0.11.1" 522 | source = "registry+https://github.com/rust-lang/crates.io-index" 523 | checksum = "b1d1a86f49236c215f271d40892d5fc950490551400b02ef360692c29815c714" 524 | dependencies = [ 525 | "generic-array 0.14.5", 526 | "subtle", 527 | ] 528 | 529 | [[package]] 530 | name = "ctor" 531 | version = "0.1.21" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "ccc0a48a9b826acdf4028595adc9db92caea352f7af011a3034acd172a52a0aa" 534 | dependencies = [ 535 | "quote", 536 | "syn", 537 | ] 538 | 539 | [[package]] 540 | name = "dashmap" 541 | version = "4.0.2" 542 | source = "registry+https://github.com/rust-lang/crates.io-index" 543 | checksum = "e77a43b28d0668df09411cb0bc9a8c2adc40f9a048afe863e05fd43251e8e39c" 544 | dependencies = [ 545 | "cfg-if", 546 | "num_cpus", 547 | ] 548 | 549 | [[package]] 550 | name = "digest" 551 | version = "0.8.1" 552 | source = "registry+https://github.com/rust-lang/crates.io-index" 553 | checksum = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" 554 | dependencies = [ 555 | "generic-array 0.12.4", 556 | ] 557 | 558 | [[package]] 559 | name = "digest" 560 | version = "0.9.0" 561 | source = "registry+https://github.com/rust-lang/crates.io-index" 562 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 563 | dependencies = [ 564 | "generic-array 0.14.5", 565 | ] 566 | 567 | [[package]] 568 | name = "dirs" 569 | version = "3.0.2" 570 | source = "registry+https://github.com/rust-lang/crates.io-index" 571 | checksum = "30baa043103c9d0c2a57cf537cc2f35623889dc0d405e6c3cccfadbc81c71309" 572 | dependencies = [ 573 | "dirs-sys", 574 | ] 575 | 576 | [[package]] 577 | name = "dirs-sys" 578 | version = "0.3.6" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "03d86534ed367a67548dc68113a0f5db55432fdfbb6e6f9d77704397d95d5780" 581 | dependencies = [ 582 | "libc", 583 | "redox_users", 584 | "winapi", 585 | ] 586 | 587 | [[package]] 588 | name = "discard" 589 | version = "1.0.4" 590 | source = "registry+https://github.com/rust-lang/crates.io-index" 591 | checksum = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" 592 | 593 | [[package]] 594 | name = "either" 595 | version = "1.6.1" 596 | source = "registry+https://github.com/rust-lang/crates.io-index" 597 | checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" 598 | dependencies = [ 599 | "serde 1.0.136", 600 | ] 601 | 602 | [[package]] 603 | name = "encoding_rs" 604 | version = "0.8.30" 605 | source = "registry+https://github.com/rust-lang/crates.io-index" 606 | checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" 607 | dependencies = [ 608 | "cfg-if", 609 | ] 610 | 611 | [[package]] 612 | name = "env_logger" 613 | version = "0.8.4" 614 | source = "registry+https://github.com/rust-lang/crates.io-index" 615 | checksum = "a19187fea3ac7e84da7dacf48de0c45d63c6a76f9490dae389aead16c243fce3" 616 | dependencies = [ 617 | "atty", 618 | "humantime", 619 | "log", 620 | "regex", 621 | "termcolor", 622 | ] 623 | 624 | [[package]] 625 | name = "event-listener" 626 | version = "2.5.2" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "77f3309417938f28bf8228fcff79a4a37103981e3e186d2ccd19c74b38f4eb71" 629 | 630 | [[package]] 631 | name = "fake-simd" 632 | version = "0.1.2" 633 | source = "registry+https://github.com/rust-lang/crates.io-index" 634 | checksum = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" 635 | 636 | [[package]] 637 | name = "fastrand" 638 | version = "1.7.0" 639 | source = "registry+https://github.com/rust-lang/crates.io-index" 640 | checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" 641 | dependencies = [ 642 | "instant", 643 | ] 644 | 645 | [[package]] 646 | name = "fnv" 647 | version = "1.0.7" 648 | source = "registry+https://github.com/rust-lang/crates.io-index" 649 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 650 | 651 | [[package]] 652 | name = "form_urlencoded" 653 | version = "1.0.1" 654 | source = "registry+https://github.com/rust-lang/crates.io-index" 655 | checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" 656 | dependencies = [ 657 | "matches", 658 | "percent-encoding", 659 | ] 660 | 661 | [[package]] 662 | name = "futures" 663 | version = "0.3.17" 664 | source = "registry+https://github.com/rust-lang/crates.io-index" 665 | checksum = "a12aa0eb539080d55c3f2d45a67c3b58b6b0773c1a3ca2dfec66d58c97fd66ca" 666 | dependencies = [ 667 | "futures-channel", 668 | "futures-core", 669 | "futures-executor", 670 | "futures-io", 671 | "futures-sink", 672 | "futures-task", 673 | "futures-util", 674 | ] 675 | 676 | [[package]] 677 | name = "futures-channel" 678 | version = "0.3.18" 679 | source = "registry+https://github.com/rust-lang/crates.io-index" 680 | checksum = "7fc8cd39e3dbf865f7340dce6a2d401d24fd37c6fe6c4f0ee0de8bfca2252d27" 681 | dependencies = [ 682 | "futures-core", 683 | "futures-sink", 684 | ] 685 | 686 | [[package]] 687 | name = "futures-core" 688 | version = "0.3.18" 689 | source = "registry+https://github.com/rust-lang/crates.io-index" 690 | checksum = "629316e42fe7c2a0b9a65b47d159ceaa5453ab14e8f0a3c5eedbb8cd55b4a445" 691 | 692 | [[package]] 693 | name = "futures-executor" 694 | version = "0.3.17" 695 | source = "registry+https://github.com/rust-lang/crates.io-index" 696 | checksum = "45025be030969d763025784f7f355043dc6bc74093e4ecc5000ca4dc50d8745c" 697 | dependencies = [ 698 | "futures-core", 699 | "futures-task", 700 | "futures-util", 701 | ] 702 | 703 | [[package]] 704 | name = "futures-intrusive" 705 | version = "0.4.0" 706 | source = "registry+https://github.com/rust-lang/crates.io-index" 707 | checksum = "62007592ac46aa7c2b6416f7deb9a8a8f63a01e0f1d6e1787d5630170db2b63e" 708 | dependencies = [ 709 | "futures-core", 710 | "lock_api", 711 | "parking_lot", 712 | ] 713 | 714 | [[package]] 715 | name = "futures-io" 716 | version = "0.3.19" 717 | source = "registry+https://github.com/rust-lang/crates.io-index" 718 | checksum = "b1f9d34af5a1aac6fb380f735fe510746c38067c5bf16c7fd250280503c971b2" 719 | 720 | [[package]] 721 | name = "futures-lite" 722 | version = "1.12.0" 723 | source = "registry+https://github.com/rust-lang/crates.io-index" 724 | checksum = "7694489acd39452c77daa48516b894c153f192c3578d5a839b62c58099fcbf48" 725 | dependencies = [ 726 | "fastrand", 727 | "futures-core", 728 | "futures-io", 729 | "memchr", 730 | "parking", 731 | "pin-project-lite", 732 | "waker-fn", 733 | ] 734 | 735 | [[package]] 736 | name = "futures-macro" 737 | version = "0.3.18" 738 | source = "registry+https://github.com/rust-lang/crates.io-index" 739 | checksum = "a89f17b21645bc4ed773c69af9c9a0effd4a3f1a3876eadd453469f8854e7fdd" 740 | dependencies = [ 741 | "proc-macro2", 742 | "quote", 743 | "syn", 744 | ] 745 | 746 | [[package]] 747 | name = "futures-sink" 748 | version = "0.3.18" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "996c6442437b62d21a32cd9906f9c41e7dc1e19a9579843fad948696769305af" 751 | 752 | [[package]] 753 | name = "futures-task" 754 | version = "0.3.18" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "dabf1872aaab32c886832f2276d2f5399887e2bd613698a02359e4ea83f8de12" 757 | 758 | [[package]] 759 | name = "futures-util" 760 | version = "0.3.18" 761 | source = "registry+https://github.com/rust-lang/crates.io-index" 762 | checksum = "41d22213122356472061ac0f1ab2cee28d2bac8491410fd68c2af53d1cedb83e" 763 | dependencies = [ 764 | "futures-channel", 765 | "futures-core", 766 | "futures-io", 767 | "futures-macro", 768 | "futures-sink", 769 | "futures-task", 770 | "memchr", 771 | "pin-project-lite", 772 | "pin-utils", 773 | "slab", 774 | ] 775 | 776 | [[package]] 777 | name = "generic-array" 778 | version = "0.12.4" 779 | source = "registry+https://github.com/rust-lang/crates.io-index" 780 | checksum = "ffdf9f34f1447443d37393cc6c2b8313aebddcd96906caf34e54c68d8e57d7bd" 781 | dependencies = [ 782 | "typenum", 783 | ] 784 | 785 | [[package]] 786 | name = "generic-array" 787 | version = "0.14.5" 788 | source = "registry+https://github.com/rust-lang/crates.io-index" 789 | checksum = "fd48d33ec7f05fbfa152300fdad764757cbded343c1aa1cff2fbaf4134851803" 790 | dependencies = [ 791 | "typenum", 792 | "version_check", 793 | ] 794 | 795 | [[package]] 796 | name = "getrandom" 797 | version = "0.2.4" 798 | source = "registry+https://github.com/rust-lang/crates.io-index" 799 | checksum = "418d37c8b1d42553c93648be529cb70f920d3baf8ef469b74b9638df426e0b4c" 800 | dependencies = [ 801 | "cfg-if", 802 | "libc", 803 | "wasi", 804 | ] 805 | 806 | [[package]] 807 | name = "gloo-timers" 808 | version = "0.2.2" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "6f16c88aa13d2656ef20d1c042086b8767bbe2bdb62526894275a1b062161b2e" 811 | dependencies = [ 812 | "futures-channel", 813 | "futures-core", 814 | "js-sys", 815 | "wasm-bindgen", 816 | "web-sys", 817 | ] 818 | 819 | [[package]] 820 | name = "hashbrown" 821 | version = "0.11.2" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" 824 | dependencies = [ 825 | "ahash", 826 | ] 827 | 828 | [[package]] 829 | name = "hashlink" 830 | version = "0.7.0" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "7249a3129cbc1ffccd74857f81464a323a152173cdb134e0fd81bc803b29facf" 833 | dependencies = [ 834 | "hashbrown", 835 | ] 836 | 837 | [[package]] 838 | name = "heck" 839 | version = "0.3.3" 840 | source = "registry+https://github.com/rust-lang/crates.io-index" 841 | checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" 842 | dependencies = [ 843 | "unicode-segmentation", 844 | ] 845 | 846 | [[package]] 847 | name = "hermit-abi" 848 | version = "0.1.19" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" 851 | dependencies = [ 852 | "libc", 853 | ] 854 | 855 | [[package]] 856 | name = "hex" 857 | version = "0.4.3" 858 | source = "registry+https://github.com/rust-lang/crates.io-index" 859 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 860 | 861 | [[package]] 862 | name = "hmac" 863 | version = "0.11.0" 864 | source = "registry+https://github.com/rust-lang/crates.io-index" 865 | checksum = "2a2a2320eb7ec0ebe8da8f744d7812d9fc4cb4d09344ac01898dbcb6a20ae69b" 866 | dependencies = [ 867 | "crypto-mac", 868 | "digest 0.9.0", 869 | ] 870 | 871 | [[package]] 872 | name = "html_parser" 873 | version = "0.6.2" 874 | source = "registry+https://github.com/rust-lang/crates.io-index" 875 | checksum = "58112d7b68ff61447bd22a489d7877a79ee688f6f34d57d3857842776d42dd0c" 876 | dependencies = [ 877 | "pest", 878 | "pest_derive", 879 | "serde 1.0.136", 880 | "serde_derive", 881 | "serde_json", 882 | "structopt", 883 | "thiserror", 884 | ] 885 | 886 | [[package]] 887 | name = "http" 888 | version = "0.2.5" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "1323096b05d41827dadeaee54c9981958c0f94e670bc94ed80037d1a7b8b186b" 891 | dependencies = [ 892 | "bytes", 893 | "fnv", 894 | "itoa 0.4.8", 895 | ] 896 | 897 | [[package]] 898 | name = "http-body" 899 | version = "0.4.4" 900 | source = "registry+https://github.com/rust-lang/crates.io-index" 901 | checksum = "1ff4f84919677303da5f147645dbea6b1881f368d03ac84e1dc09031ebd7b2c6" 902 | dependencies = [ 903 | "bytes", 904 | "http", 905 | "pin-project-lite", 906 | ] 907 | 908 | [[package]] 909 | name = "http-range-header" 910 | version = "0.3.0" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "0bfe8eed0a9285ef776bb792479ea3834e8b94e13d615c2f66d03dd50a435a29" 913 | 914 | [[package]] 915 | name = "httparse" 916 | version = "1.5.1" 917 | source = "registry+https://github.com/rust-lang/crates.io-index" 918 | checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" 919 | 920 | [[package]] 921 | name = "httpdate" 922 | version = "1.0.2" 923 | source = "registry+https://github.com/rust-lang/crates.io-index" 924 | checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" 925 | 926 | [[package]] 927 | name = "humantime" 928 | version = "2.1.0" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 931 | 932 | [[package]] 933 | name = "hyper" 934 | version = "0.14.15" 935 | source = "registry+https://github.com/rust-lang/crates.io-index" 936 | checksum = "436ec0091e4f20e655156a30a0df3770fe2900aa301e548e08446ec794b6953c" 937 | dependencies = [ 938 | "bytes", 939 | "futures-channel", 940 | "futures-core", 941 | "futures-util", 942 | "http", 943 | "http-body", 944 | "httparse", 945 | "httpdate", 946 | "itoa 0.4.8", 947 | "pin-project-lite", 948 | "socket2", 949 | "tokio", 950 | "tower-service", 951 | "tracing", 952 | "want", 953 | ] 954 | 955 | [[package]] 956 | name = "idna" 957 | version = "0.2.3" 958 | source = "registry+https://github.com/rust-lang/crates.io-index" 959 | checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" 960 | dependencies = [ 961 | "matches", 962 | "unicode-bidi", 963 | "unicode-normalization", 964 | ] 965 | 966 | [[package]] 967 | name = "indexmap" 968 | version = "1.8.0" 969 | source = "registry+https://github.com/rust-lang/crates.io-index" 970 | checksum = "282a6247722caba404c065016bbfa522806e51714c34f5dfc3e4a3a46fcb4223" 971 | dependencies = [ 972 | "autocfg 1.0.1", 973 | "hashbrown", 974 | ] 975 | 976 | [[package]] 977 | name = "instant" 978 | version = "0.1.12" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" 981 | dependencies = [ 982 | "cfg-if", 983 | ] 984 | 985 | [[package]] 986 | name = "ipnetwork" 987 | version = "0.17.0" 988 | source = "registry+https://github.com/rust-lang/crates.io-index" 989 | checksum = "02c3eaab3ac0ede60ffa41add21970a7df7d91772c03383aac6c2c3d53cc716b" 990 | dependencies = [ 991 | "serde 1.0.136", 992 | ] 993 | 994 | [[package]] 995 | name = "itertools" 996 | version = "0.10.3" 997 | source = "registry+https://github.com/rust-lang/crates.io-index" 998 | checksum = "a9a9d19fa1e79b6215ff29b9d6880b706147f16e9b1dbb1e4e5947b5b02bc5e3" 999 | dependencies = [ 1000 | "either", 1001 | ] 1002 | 1003 | [[package]] 1004 | name = "itoa" 1005 | version = "0.4.8" 1006 | source = "registry+https://github.com/rust-lang/crates.io-index" 1007 | checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" 1008 | 1009 | [[package]] 1010 | name = "itoa" 1011 | version = "1.0.1" 1012 | source = "registry+https://github.com/rust-lang/crates.io-index" 1013 | checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" 1014 | 1015 | [[package]] 1016 | name = "js-sys" 1017 | version = "0.3.56" 1018 | source = "registry+https://github.com/rust-lang/crates.io-index" 1019 | checksum = "a38fc24e30fd564ce974c02bf1d337caddff65be6cc4735a1f7eab22a7440f04" 1020 | dependencies = [ 1021 | "wasm-bindgen", 1022 | ] 1023 | 1024 | [[package]] 1025 | name = "kv-log-macro" 1026 | version = "1.0.7" 1027 | source = "registry+https://github.com/rust-lang/crates.io-index" 1028 | checksum = "0de8b303297635ad57c9f5059fd9cee7a47f8e8daa09df0fcd07dd39fb22977f" 1029 | dependencies = [ 1030 | "log", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "lazy_static" 1035 | version = "1.4.0" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1038 | dependencies = [ 1039 | "spin", 1040 | ] 1041 | 1042 | [[package]] 1043 | name = "lexical-core" 1044 | version = "0.7.6" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "6607c62aa161d23d17a9072cc5da0be67cdfc89d3afb1e8d9c842bebc2525ffe" 1047 | dependencies = [ 1048 | "arrayvec 0.5.2", 1049 | "bitflags", 1050 | "cfg-if", 1051 | "ryu", 1052 | "static_assertions", 1053 | ] 1054 | 1055 | [[package]] 1056 | name = "libc" 1057 | version = "0.2.109" 1058 | source = "registry+https://github.com/rust-lang/crates.io-index" 1059 | checksum = "f98a04dce437184842841303488f70d0188c5f51437d2a834dc097eafa909a01" 1060 | 1061 | [[package]] 1062 | name = "libm" 1063 | version = "0.2.1" 1064 | source = "registry+https://github.com/rust-lang/crates.io-index" 1065 | checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" 1066 | 1067 | [[package]] 1068 | name = "libsqlite3-sys" 1069 | version = "0.22.2" 1070 | source = "registry+https://github.com/rust-lang/crates.io-index" 1071 | checksum = "290b64917f8b0cb885d9de0f9959fe1f775d7fa12f1da2db9001c1c8ab60f89d" 1072 | dependencies = [ 1073 | "cc", 1074 | "pkg-config", 1075 | "vcpkg", 1076 | ] 1077 | 1078 | [[package]] 1079 | name = "linked-hash-map" 1080 | version = "0.5.4" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3" 1083 | 1084 | [[package]] 1085 | name = "lock_api" 1086 | version = "0.4.5" 1087 | source = "registry+https://github.com/rust-lang/crates.io-index" 1088 | checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" 1089 | dependencies = [ 1090 | "scopeguard", 1091 | ] 1092 | 1093 | [[package]] 1094 | name = "log" 1095 | version = "0.4.14" 1096 | source = "registry+https://github.com/rust-lang/crates.io-index" 1097 | checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" 1098 | dependencies = [ 1099 | "cfg-if", 1100 | "value-bag", 1101 | ] 1102 | 1103 | [[package]] 1104 | name = "maplit" 1105 | version = "1.0.2" 1106 | source = "registry+https://github.com/rust-lang/crates.io-index" 1107 | checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" 1108 | 1109 | [[package]] 1110 | name = "matches" 1111 | version = "0.1.9" 1112 | source = "registry+https://github.com/rust-lang/crates.io-index" 1113 | checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" 1114 | 1115 | [[package]] 1116 | name = "matchit" 1117 | version = "0.4.4" 1118 | source = "registry+https://github.com/rust-lang/crates.io-index" 1119 | checksum = "58b6f41fdfbec185dd3dff58b51e323f5bc61692c0de38419a957b0dcfccca3c" 1120 | 1121 | [[package]] 1122 | name = "md-5" 1123 | version = "0.9.1" 1124 | source = "registry+https://github.com/rust-lang/crates.io-index" 1125 | checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" 1126 | dependencies = [ 1127 | "block-buffer 0.9.0", 1128 | "digest 0.9.0", 1129 | "opaque-debug 0.3.0", 1130 | ] 1131 | 1132 | [[package]] 1133 | name = "memchr" 1134 | version = "2.4.1" 1135 | source = "registry+https://github.com/rust-lang/crates.io-index" 1136 | checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" 1137 | 1138 | [[package]] 1139 | name = "mime" 1140 | version = "0.3.16" 1141 | source = "registry+https://github.com/rust-lang/crates.io-index" 1142 | checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" 1143 | 1144 | [[package]] 1145 | name = "minimal-lexical" 1146 | version = "0.2.1" 1147 | source = "registry+https://github.com/rust-lang/crates.io-index" 1148 | checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" 1149 | 1150 | [[package]] 1151 | name = "mio" 1152 | version = "0.7.14" 1153 | source = "registry+https://github.com/rust-lang/crates.io-index" 1154 | checksum = "8067b404fe97c70829f082dec8bcf4f71225d7eaea1d8645349cb76fa06205cc" 1155 | dependencies = [ 1156 | "libc", 1157 | "log", 1158 | "miow", 1159 | "ntapi", 1160 | "winapi", 1161 | ] 1162 | 1163 | [[package]] 1164 | name = "miow" 1165 | version = "0.3.7" 1166 | source = "registry+https://github.com/rust-lang/crates.io-index" 1167 | checksum = "b9f1c5b025cda876f66ef43a113f91ebc9f4ccef34843000e0adf6ebbab84e21" 1168 | dependencies = [ 1169 | "winapi", 1170 | ] 1171 | 1172 | [[package]] 1173 | name = "nom" 1174 | version = "5.1.2" 1175 | source = "registry+https://github.com/rust-lang/crates.io-index" 1176 | checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" 1177 | dependencies = [ 1178 | "lexical-core", 1179 | "memchr", 1180 | "version_check", 1181 | ] 1182 | 1183 | [[package]] 1184 | name = "nom" 1185 | version = "7.1.0" 1186 | source = "registry+https://github.com/rust-lang/crates.io-index" 1187 | checksum = "1b1d11e1ef389c76fe5b81bcaf2ea32cf88b62bc494e19f493d0b30e7a930109" 1188 | dependencies = [ 1189 | "memchr", 1190 | "minimal-lexical", 1191 | "version_check", 1192 | ] 1193 | 1194 | [[package]] 1195 | name = "ntapi" 1196 | version = "0.3.6" 1197 | source = "registry+https://github.com/rust-lang/crates.io-index" 1198 | checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" 1199 | dependencies = [ 1200 | "winapi", 1201 | ] 1202 | 1203 | [[package]] 1204 | name = "num-bigint" 1205 | version = "0.3.3" 1206 | source = "registry+https://github.com/rust-lang/crates.io-index" 1207 | checksum = "5f6f7833f2cbf2360a6cfd58cd41a53aa7a90bd4c202f5b1c7dd2ed73c57b2c3" 1208 | dependencies = [ 1209 | "autocfg 1.0.1", 1210 | "num-integer", 1211 | "num-traits 0.2.14", 1212 | ] 1213 | 1214 | [[package]] 1215 | name = "num-bigint" 1216 | version = "0.4.3" 1217 | source = "registry+https://github.com/rust-lang/crates.io-index" 1218 | checksum = "f93ab6289c7b344a8a9f60f88d80aa20032336fe78da341afc91c8a2341fc75f" 1219 | dependencies = [ 1220 | "autocfg 1.0.1", 1221 | "num-integer", 1222 | "num-traits 0.2.14", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "num-bigint-dig" 1227 | version = "0.7.0" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "4547ee5541c18742396ae2c895d0717d0f886d8823b8399cdaf7b07d63ad0480" 1230 | dependencies = [ 1231 | "autocfg 0.1.7", 1232 | "byteorder", 1233 | "lazy_static", 1234 | "libm", 1235 | "num-integer", 1236 | "num-iter", 1237 | "num-traits 0.2.14", 1238 | "rand", 1239 | "smallvec", 1240 | "zeroize", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "num-integer" 1245 | version = "0.1.44" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" 1248 | dependencies = [ 1249 | "autocfg 1.0.1", 1250 | "num-traits 0.2.14", 1251 | ] 1252 | 1253 | [[package]] 1254 | name = "num-iter" 1255 | version = "0.1.42" 1256 | source = "registry+https://github.com/rust-lang/crates.io-index" 1257 | checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" 1258 | dependencies = [ 1259 | "autocfg 1.0.1", 1260 | "num-integer", 1261 | "num-traits 0.2.14", 1262 | ] 1263 | 1264 | [[package]] 1265 | name = "num-traits" 1266 | version = "0.1.43" 1267 | source = "registry+https://github.com/rust-lang/crates.io-index" 1268 | checksum = "92e5113e9fd4cc14ded8e499429f396a20f98c772a47cc8622a736e1ec843c31" 1269 | dependencies = [ 1270 | "num-traits 0.2.14", 1271 | ] 1272 | 1273 | [[package]] 1274 | name = "num-traits" 1275 | version = "0.2.14" 1276 | source = "registry+https://github.com/rust-lang/crates.io-index" 1277 | checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" 1278 | dependencies = [ 1279 | "autocfg 1.0.1", 1280 | "libm", 1281 | ] 1282 | 1283 | [[package]] 1284 | name = "num_cpus" 1285 | version = "1.13.0" 1286 | source = "registry+https://github.com/rust-lang/crates.io-index" 1287 | checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" 1288 | dependencies = [ 1289 | "hermit-abi", 1290 | "libc", 1291 | ] 1292 | 1293 | [[package]] 1294 | name = "once_cell" 1295 | version = "1.8.0" 1296 | source = "registry+https://github.com/rust-lang/crates.io-index" 1297 | checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" 1298 | 1299 | [[package]] 1300 | name = "opaque-debug" 1301 | version = "0.2.3" 1302 | source = "registry+https://github.com/rust-lang/crates.io-index" 1303 | checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" 1304 | 1305 | [[package]] 1306 | name = "opaque-debug" 1307 | version = "0.3.0" 1308 | source = "registry+https://github.com/rust-lang/crates.io-index" 1309 | checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" 1310 | 1311 | [[package]] 1312 | name = "parking" 1313 | version = "2.0.0" 1314 | source = "registry+https://github.com/rust-lang/crates.io-index" 1315 | checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" 1316 | 1317 | [[package]] 1318 | name = "parking_lot" 1319 | version = "0.11.2" 1320 | source = "registry+https://github.com/rust-lang/crates.io-index" 1321 | checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" 1322 | dependencies = [ 1323 | "instant", 1324 | "lock_api", 1325 | "parking_lot_core", 1326 | ] 1327 | 1328 | [[package]] 1329 | name = "parking_lot_core" 1330 | version = "0.8.5" 1331 | source = "registry+https://github.com/rust-lang/crates.io-index" 1332 | checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" 1333 | dependencies = [ 1334 | "cfg-if", 1335 | "instant", 1336 | "libc", 1337 | "redox_syscall", 1338 | "smallvec", 1339 | "winapi", 1340 | ] 1341 | 1342 | [[package]] 1343 | name = "pem" 1344 | version = "0.8.3" 1345 | source = "registry+https://github.com/rust-lang/crates.io-index" 1346 | checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" 1347 | dependencies = [ 1348 | "base64", 1349 | "once_cell", 1350 | "regex", 1351 | ] 1352 | 1353 | [[package]] 1354 | name = "percent-encoding" 1355 | version = "2.1.0" 1356 | source = "registry+https://github.com/rust-lang/crates.io-index" 1357 | checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" 1358 | 1359 | [[package]] 1360 | name = "pest" 1361 | version = "2.1.3" 1362 | source = "registry+https://github.com/rust-lang/crates.io-index" 1363 | checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" 1364 | dependencies = [ 1365 | "ucd-trie", 1366 | ] 1367 | 1368 | [[package]] 1369 | name = "pest_derive" 1370 | version = "2.1.0" 1371 | source = "registry+https://github.com/rust-lang/crates.io-index" 1372 | checksum = "833d1ae558dc601e9a60366421196a8d94bc0ac980476d0b67e1d0988d72b2d0" 1373 | dependencies = [ 1374 | "pest", 1375 | "pest_generator", 1376 | ] 1377 | 1378 | [[package]] 1379 | name = "pest_generator" 1380 | version = "2.1.3" 1381 | source = "registry+https://github.com/rust-lang/crates.io-index" 1382 | checksum = "99b8db626e31e5b81787b9783425769681b347011cc59471e33ea46d2ea0cf55" 1383 | dependencies = [ 1384 | "pest", 1385 | "pest_meta", 1386 | "proc-macro2", 1387 | "quote", 1388 | "syn", 1389 | ] 1390 | 1391 | [[package]] 1392 | name = "pest_meta" 1393 | version = "2.1.3" 1394 | source = "registry+https://github.com/rust-lang/crates.io-index" 1395 | checksum = "54be6e404f5317079812fc8f9f5279de376d8856929e21c184ecf6bbd692a11d" 1396 | dependencies = [ 1397 | "maplit", 1398 | "pest", 1399 | "sha-1 0.8.2", 1400 | ] 1401 | 1402 | [[package]] 1403 | name = "pin-project" 1404 | version = "1.0.10" 1405 | source = "registry+https://github.com/rust-lang/crates.io-index" 1406 | checksum = "58ad3879ad3baf4e44784bc6a718a8698867bb991f8ce24d1bcbe2cfb4c3a75e" 1407 | dependencies = [ 1408 | "pin-project-internal", 1409 | ] 1410 | 1411 | [[package]] 1412 | name = "pin-project-internal" 1413 | version = "1.0.10" 1414 | source = "registry+https://github.com/rust-lang/crates.io-index" 1415 | checksum = "744b6f092ba29c3650faf274db506afd39944f48420f6c86b17cfe0ee1cb36bb" 1416 | dependencies = [ 1417 | "proc-macro2", 1418 | "quote", 1419 | "syn", 1420 | ] 1421 | 1422 | [[package]] 1423 | name = "pin-project-lite" 1424 | version = "0.2.7" 1425 | source = "registry+https://github.com/rust-lang/crates.io-index" 1426 | checksum = "8d31d11c69a6b52a174b42bdc0c30e5e11670f90788b2c471c31c1d17d449443" 1427 | 1428 | [[package]] 1429 | name = "pin-utils" 1430 | version = "0.1.0" 1431 | source = "registry+https://github.com/rust-lang/crates.io-index" 1432 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1433 | 1434 | [[package]] 1435 | name = "pkg-config" 1436 | version = "0.3.24" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" 1439 | 1440 | [[package]] 1441 | name = "polling" 1442 | version = "2.2.0" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "685404d509889fade3e86fe3a5803bca2ec09b0c0778d5ada6ec8bf7a8de5259" 1445 | dependencies = [ 1446 | "cfg-if", 1447 | "libc", 1448 | "log", 1449 | "wepoll-ffi", 1450 | "winapi", 1451 | ] 1452 | 1453 | [[package]] 1454 | name = "ppv-lite86" 1455 | version = "0.2.16" 1456 | source = "registry+https://github.com/rust-lang/crates.io-index" 1457 | checksum = "eb9f9e6e233e5c4a35559a617bf40a4ec447db2e84c20b55a6f83167b7e57872" 1458 | 1459 | [[package]] 1460 | name = "proc-macro-error" 1461 | version = "1.0.4" 1462 | source = "registry+https://github.com/rust-lang/crates.io-index" 1463 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1464 | dependencies = [ 1465 | "proc-macro-error-attr", 1466 | "proc-macro2", 1467 | "quote", 1468 | "syn", 1469 | "version_check", 1470 | ] 1471 | 1472 | [[package]] 1473 | name = "proc-macro-error-attr" 1474 | version = "1.0.4" 1475 | source = "registry+https://github.com/rust-lang/crates.io-index" 1476 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1477 | dependencies = [ 1478 | "proc-macro2", 1479 | "quote", 1480 | "version_check", 1481 | ] 1482 | 1483 | [[package]] 1484 | name = "proc-macro-hack" 1485 | version = "0.5.19" 1486 | source = "registry+https://github.com/rust-lang/crates.io-index" 1487 | checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" 1488 | 1489 | [[package]] 1490 | name = "proc-macro2" 1491 | version = "1.0.33" 1492 | source = "registry+https://github.com/rust-lang/crates.io-index" 1493 | checksum = "fb37d2df5df740e582f28f8560cf425f52bb267d872fe58358eadb554909f07a" 1494 | dependencies = [ 1495 | "unicode-xid", 1496 | ] 1497 | 1498 | [[package]] 1499 | name = "py_sql" 1500 | version = "1.0.1" 1501 | source = "registry+https://github.com/rust-lang/crates.io-index" 1502 | checksum = "406b706c360fcde6e93391e83ef16aed0798a96f08e8f0e174de0681ec0a6060" 1503 | dependencies = [ 1504 | "dashmap", 1505 | "rexpr", 1506 | "serde 1.0.136", 1507 | "serde_json", 1508 | ] 1509 | 1510 | [[package]] 1511 | name = "quote" 1512 | version = "1.0.10" 1513 | source = "registry+https://github.com/rust-lang/crates.io-index" 1514 | checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" 1515 | dependencies = [ 1516 | "proc-macro2", 1517 | ] 1518 | 1519 | [[package]] 1520 | name = "rand" 1521 | version = "0.8.4" 1522 | source = "registry+https://github.com/rust-lang/crates.io-index" 1523 | checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" 1524 | dependencies = [ 1525 | "libc", 1526 | "rand_chacha", 1527 | "rand_core", 1528 | "rand_hc", 1529 | ] 1530 | 1531 | [[package]] 1532 | name = "rand_chacha" 1533 | version = "0.3.1" 1534 | source = "registry+https://github.com/rust-lang/crates.io-index" 1535 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1536 | dependencies = [ 1537 | "ppv-lite86", 1538 | "rand_core", 1539 | ] 1540 | 1541 | [[package]] 1542 | name = "rand_core" 1543 | version = "0.6.3" 1544 | source = "registry+https://github.com/rust-lang/crates.io-index" 1545 | checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" 1546 | dependencies = [ 1547 | "getrandom", 1548 | ] 1549 | 1550 | [[package]] 1551 | name = "rand_hc" 1552 | version = "0.3.1" 1553 | source = "registry+https://github.com/rust-lang/crates.io-index" 1554 | checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" 1555 | dependencies = [ 1556 | "rand_core", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "rbatis" 1561 | version = "3.0.30" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "1b8c968bd15606738295d8b71dca35cfef3bb1a124af89dab45a18ed83b19975" 1564 | dependencies = [ 1565 | "async-trait", 1566 | "chrono", 1567 | "futures", 1568 | "futures-core", 1569 | "hex", 1570 | "log", 1571 | "once_cell", 1572 | "rand", 1573 | "rbatis-core", 1574 | "rbatis-macro-driver", 1575 | "rbatis_sql", 1576 | "rbson", 1577 | "serde 1.0.136", 1578 | "uuid", 1579 | ] 1580 | 1581 | [[package]] 1582 | name = "rbatis-core" 1583 | version = "3.0.20" 1584 | source = "registry+https://github.com/rust-lang/crates.io-index" 1585 | checksum = "2cd0da1efe628da94506a15dc8e628a6c25b6d8de77fb2d51149ac9c7893153d" 1586 | dependencies = [ 1587 | "base64", 1588 | "bigdecimal", 1589 | "bit-vec", 1590 | "chrono", 1591 | "hex", 1592 | "ipnetwork", 1593 | "lazy_static", 1594 | "log", 1595 | "py_sql", 1596 | "rbson", 1597 | "rexpr", 1598 | "serde 1.0.136", 1599 | "serde_json", 1600 | "sqlx-core", 1601 | "time 0.2.27", 1602 | "uuid", 1603 | ] 1604 | 1605 | [[package]] 1606 | name = "rbatis-macro-driver" 1607 | version = "3.0.5" 1608 | source = "registry+https://github.com/rust-lang/crates.io-index" 1609 | checksum = "82273c716eca70f4945cd0485dbc3a525726242ea7fee713ca490f081ca47f86" 1610 | dependencies = [ 1611 | "html_parser", 1612 | "proc-macro2", 1613 | "quote", 1614 | "syn", 1615 | ] 1616 | 1617 | [[package]] 1618 | name = "rbatis_sql" 1619 | version = "3.0.13" 1620 | source = "registry+https://github.com/rust-lang/crates.io-index" 1621 | checksum = "3852b627d81d1e2d8313b024d899190baaf8e75429f5d49e842a0bdac77474c4" 1622 | dependencies = [ 1623 | "async-trait", 1624 | "base64", 1625 | "dashmap", 1626 | "rbatis_sql_macro", 1627 | "rbson", 1628 | "serde 1.0.136", 1629 | ] 1630 | 1631 | [[package]] 1632 | name = "rbatis_sql_macro" 1633 | version = "3.0.7" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "5050d3450a18cb42f377c8881df476fd33e6a65df28309bf8be08995ac8e4935" 1636 | dependencies = [ 1637 | "async-trait", 1638 | "base64", 1639 | "html_parser", 1640 | "proc-macro2", 1641 | "quote", 1642 | "syn", 1643 | "url", 1644 | "xml-rs", 1645 | ] 1646 | 1647 | [[package]] 1648 | name = "rbson" 1649 | version = "2.0.3" 1650 | source = "registry+https://github.com/rust-lang/crates.io-index" 1651 | checksum = "88f7c79c3b796113c856d3f1b7ca27c453e1efea1096e9d4fac6dba84d641dbc" 1652 | dependencies = [ 1653 | "ahash", 1654 | "base64", 1655 | "chrono", 1656 | "hex", 1657 | "indexmap", 1658 | "lazy_static", 1659 | "rand", 1660 | "serde 1.0.136", 1661 | "serde_bytes", 1662 | "serde_json", 1663 | "uuid", 1664 | ] 1665 | 1666 | [[package]] 1667 | name = "redox_syscall" 1668 | version = "0.2.10" 1669 | source = "registry+https://github.com/rust-lang/crates.io-index" 1670 | checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" 1671 | dependencies = [ 1672 | "bitflags", 1673 | ] 1674 | 1675 | [[package]] 1676 | name = "redox_users" 1677 | version = "0.4.0" 1678 | source = "registry+https://github.com/rust-lang/crates.io-index" 1679 | checksum = "528532f3d801c87aec9def2add9ca802fe569e44a544afe633765267840abe64" 1680 | dependencies = [ 1681 | "getrandom", 1682 | "redox_syscall", 1683 | ] 1684 | 1685 | [[package]] 1686 | name = "regex" 1687 | version = "1.5.4" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" 1690 | dependencies = [ 1691 | "aho-corasick", 1692 | "memchr", 1693 | "regex-syntax", 1694 | ] 1695 | 1696 | [[package]] 1697 | name = "regex-syntax" 1698 | version = "0.6.25" 1699 | source = "registry+https://github.com/rust-lang/crates.io-index" 1700 | checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" 1701 | 1702 | [[package]] 1703 | name = "rexpr" 1704 | version = "1.0.7" 1705 | source = "registry+https://github.com/rust-lang/crates.io-index" 1706 | checksum = "4753cc5e42400348f62002a279dd25e135fa46b95d0cac6935c6380deb31feda" 1707 | dependencies = [ 1708 | "dashmap", 1709 | "serde 1.0.136", 1710 | "serde_json", 1711 | ] 1712 | 1713 | [[package]] 1714 | name = "ring" 1715 | version = "0.16.20" 1716 | source = "registry+https://github.com/rust-lang/crates.io-index" 1717 | checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" 1718 | dependencies = [ 1719 | "cc", 1720 | "libc", 1721 | "once_cell", 1722 | "spin", 1723 | "untrusted", 1724 | "web-sys", 1725 | "winapi", 1726 | ] 1727 | 1728 | [[package]] 1729 | name = "rsa" 1730 | version = "0.4.1" 1731 | source = "registry+https://github.com/rust-lang/crates.io-index" 1732 | checksum = "7b0aeddcca1082112a6eeb43bf25fd7820b066aaf6eaef776e19d0a1febe38fe" 1733 | dependencies = [ 1734 | "byteorder", 1735 | "digest 0.9.0", 1736 | "lazy_static", 1737 | "num-bigint-dig", 1738 | "num-integer", 1739 | "num-iter", 1740 | "num-traits 0.2.14", 1741 | "pem", 1742 | "rand", 1743 | "simple_asn1", 1744 | "subtle", 1745 | "zeroize", 1746 | ] 1747 | 1748 | [[package]] 1749 | name = "rust-ini" 1750 | version = "0.13.0" 1751 | source = "registry+https://github.com/rust-lang/crates.io-index" 1752 | checksum = "3e52c148ef37f8c375d49d5a73aa70713125b7f19095948a923f80afdeb22ec2" 1753 | 1754 | [[package]] 1755 | name = "rust_decimal" 1756 | version = "1.20.0" 1757 | source = "registry+https://github.com/rust-lang/crates.io-index" 1758 | checksum = "e0593ce4677e3800ddafb3de917e8397b1348e06e688128ade722d88fbe11ebf" 1759 | dependencies = [ 1760 | "arrayvec 0.7.2", 1761 | "num-traits 0.2.14", 1762 | "serde 1.0.136", 1763 | ] 1764 | 1765 | [[package]] 1766 | name = "rust_rest_demo" 1767 | version = "0.1.0" 1768 | dependencies = [ 1769 | "axum", 1770 | "clap", 1771 | "config", 1772 | "env_logger", 1773 | "futures", 1774 | "lazy_static", 1775 | "log", 1776 | "rbatis", 1777 | "rbson", 1778 | "serde 1.0.136", 1779 | "serde_derive", 1780 | "serde_json", 1781 | "serde_repr", 1782 | "tokio", 1783 | ] 1784 | 1785 | [[package]] 1786 | name = "rustc_version" 1787 | version = "0.2.3" 1788 | source = "registry+https://github.com/rust-lang/crates.io-index" 1789 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 1790 | dependencies = [ 1791 | "semver", 1792 | ] 1793 | 1794 | [[package]] 1795 | name = "rustls" 1796 | version = "0.19.1" 1797 | source = "registry+https://github.com/rust-lang/crates.io-index" 1798 | checksum = "35edb675feee39aec9c99fa5ff985081995a06d594114ae14cbe797ad7b7a6d7" 1799 | dependencies = [ 1800 | "base64", 1801 | "log", 1802 | "ring", 1803 | "sct", 1804 | "webpki", 1805 | ] 1806 | 1807 | [[package]] 1808 | name = "ryu" 1809 | version = "1.0.6" 1810 | source = "registry+https://github.com/rust-lang/crates.io-index" 1811 | checksum = "3c9613b5a66ab9ba26415184cfc41156594925a9cf3a2057e57f31ff145f6568" 1812 | 1813 | [[package]] 1814 | name = "scopeguard" 1815 | version = "1.1.0" 1816 | source = "registry+https://github.com/rust-lang/crates.io-index" 1817 | checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" 1818 | 1819 | [[package]] 1820 | name = "sct" 1821 | version = "0.6.1" 1822 | source = "registry+https://github.com/rust-lang/crates.io-index" 1823 | checksum = "b362b83898e0e69f38515b82ee15aa80636befe47c3b6d3d89a911e78fc228ce" 1824 | dependencies = [ 1825 | "ring", 1826 | "untrusted", 1827 | ] 1828 | 1829 | [[package]] 1830 | name = "semver" 1831 | version = "0.9.0" 1832 | source = "registry+https://github.com/rust-lang/crates.io-index" 1833 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 1834 | dependencies = [ 1835 | "semver-parser", 1836 | ] 1837 | 1838 | [[package]] 1839 | name = "semver-parser" 1840 | version = "0.7.0" 1841 | source = "registry+https://github.com/rust-lang/crates.io-index" 1842 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 1843 | 1844 | [[package]] 1845 | name = "serde" 1846 | version = "0.8.23" 1847 | source = "registry+https://github.com/rust-lang/crates.io-index" 1848 | checksum = "9dad3f759919b92c3068c696c15c3d17238234498bbdcc80f2c469606f948ac8" 1849 | 1850 | [[package]] 1851 | name = "serde" 1852 | version = "1.0.136" 1853 | source = "registry+https://github.com/rust-lang/crates.io-index" 1854 | checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" 1855 | dependencies = [ 1856 | "serde_derive", 1857 | ] 1858 | 1859 | [[package]] 1860 | name = "serde-hjson" 1861 | version = "0.9.1" 1862 | source = "registry+https://github.com/rust-lang/crates.io-index" 1863 | checksum = "6a3a4e0ea8a88553209f6cc6cfe8724ecad22e1acf372793c27d995290fe74f8" 1864 | dependencies = [ 1865 | "lazy_static", 1866 | "num-traits 0.1.43", 1867 | "regex", 1868 | "serde 0.8.23", 1869 | ] 1870 | 1871 | [[package]] 1872 | name = "serde_bytes" 1873 | version = "0.11.5" 1874 | source = "registry+https://github.com/rust-lang/crates.io-index" 1875 | checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" 1876 | dependencies = [ 1877 | "serde 1.0.136", 1878 | ] 1879 | 1880 | [[package]] 1881 | name = "serde_derive" 1882 | version = "1.0.136" 1883 | source = "registry+https://github.com/rust-lang/crates.io-index" 1884 | checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" 1885 | dependencies = [ 1886 | "proc-macro2", 1887 | "quote", 1888 | "syn", 1889 | ] 1890 | 1891 | [[package]] 1892 | name = "serde_json" 1893 | version = "1.0.72" 1894 | source = "registry+https://github.com/rust-lang/crates.io-index" 1895 | checksum = "d0ffa0837f2dfa6fb90868c2b5468cad482e175f7dad97e7421951e663f2b527" 1896 | dependencies = [ 1897 | "indexmap", 1898 | "itoa 0.4.8", 1899 | "ryu", 1900 | "serde 1.0.136", 1901 | ] 1902 | 1903 | [[package]] 1904 | name = "serde_repr" 1905 | version = "0.1.7" 1906 | source = "registry+https://github.com/rust-lang/crates.io-index" 1907 | checksum = "98d0516900518c29efa217c298fa1f4e6c6ffc85ae29fd7f4ee48f176e1a9ed5" 1908 | dependencies = [ 1909 | "proc-macro2", 1910 | "quote", 1911 | "syn", 1912 | ] 1913 | 1914 | [[package]] 1915 | name = "serde_urlencoded" 1916 | version = "0.7.1" 1917 | source = "registry+https://github.com/rust-lang/crates.io-index" 1918 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 1919 | dependencies = [ 1920 | "form_urlencoded", 1921 | "itoa 1.0.1", 1922 | "ryu", 1923 | "serde 1.0.136", 1924 | ] 1925 | 1926 | [[package]] 1927 | name = "sha-1" 1928 | version = "0.8.2" 1929 | source = "registry+https://github.com/rust-lang/crates.io-index" 1930 | checksum = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" 1931 | dependencies = [ 1932 | "block-buffer 0.7.3", 1933 | "digest 0.8.1", 1934 | "fake-simd", 1935 | "opaque-debug 0.2.3", 1936 | ] 1937 | 1938 | [[package]] 1939 | name = "sha-1" 1940 | version = "0.9.8" 1941 | source = "registry+https://github.com/rust-lang/crates.io-index" 1942 | checksum = "99cd6713db3cf16b6c84e06321e049a9b9f699826e16096d23bbcc44d15d51a6" 1943 | dependencies = [ 1944 | "block-buffer 0.9.0", 1945 | "cfg-if", 1946 | "cpufeatures", 1947 | "digest 0.9.0", 1948 | "opaque-debug 0.3.0", 1949 | ] 1950 | 1951 | [[package]] 1952 | name = "sha1" 1953 | version = "0.6.1" 1954 | source = "registry+https://github.com/rust-lang/crates.io-index" 1955 | checksum = "c1da05c97445caa12d05e848c4a4fcbbea29e748ac28f7e80e9b010392063770" 1956 | dependencies = [ 1957 | "sha1_smol", 1958 | ] 1959 | 1960 | [[package]] 1961 | name = "sha1_smol" 1962 | version = "1.0.0" 1963 | source = "registry+https://github.com/rust-lang/crates.io-index" 1964 | checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012" 1965 | 1966 | [[package]] 1967 | name = "sha2" 1968 | version = "0.9.9" 1969 | source = "registry+https://github.com/rust-lang/crates.io-index" 1970 | checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" 1971 | dependencies = [ 1972 | "block-buffer 0.9.0", 1973 | "cfg-if", 1974 | "cpufeatures", 1975 | "digest 0.9.0", 1976 | "opaque-debug 0.3.0", 1977 | ] 1978 | 1979 | [[package]] 1980 | name = "signal-hook" 1981 | version = "0.3.13" 1982 | source = "registry+https://github.com/rust-lang/crates.io-index" 1983 | checksum = "647c97df271007dcea485bb74ffdb57f2e683f1306c854f468a0c244badabf2d" 1984 | dependencies = [ 1985 | "libc", 1986 | "signal-hook-registry", 1987 | ] 1988 | 1989 | [[package]] 1990 | name = "signal-hook-registry" 1991 | version = "1.4.0" 1992 | source = "registry+https://github.com/rust-lang/crates.io-index" 1993 | checksum = "e51e73328dc4ac0c7ccbda3a494dfa03df1de2f46018127f60c693f2648455b0" 1994 | dependencies = [ 1995 | "libc", 1996 | ] 1997 | 1998 | [[package]] 1999 | name = "simple_asn1" 2000 | version = "0.5.4" 2001 | source = "registry+https://github.com/rust-lang/crates.io-index" 2002 | checksum = "8eb4ea60fb301dc81dfc113df680571045d375ab7345d171c5dc7d7e13107a80" 2003 | dependencies = [ 2004 | "chrono", 2005 | "num-bigint 0.4.3", 2006 | "num-traits 0.2.14", 2007 | "thiserror", 2008 | ] 2009 | 2010 | [[package]] 2011 | name = "slab" 2012 | version = "0.4.5" 2013 | source = "registry+https://github.com/rust-lang/crates.io-index" 2014 | checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" 2015 | 2016 | [[package]] 2017 | name = "smallvec" 2018 | version = "1.7.0" 2019 | source = "registry+https://github.com/rust-lang/crates.io-index" 2020 | checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" 2021 | 2022 | [[package]] 2023 | name = "socket2" 2024 | version = "0.4.2" 2025 | source = "registry+https://github.com/rust-lang/crates.io-index" 2026 | checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" 2027 | dependencies = [ 2028 | "libc", 2029 | "winapi", 2030 | ] 2031 | 2032 | [[package]] 2033 | name = "spin" 2034 | version = "0.5.2" 2035 | source = "registry+https://github.com/rust-lang/crates.io-index" 2036 | checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" 2037 | 2038 | [[package]] 2039 | name = "sqlformat" 2040 | version = "0.1.8" 2041 | source = "registry+https://github.com/rust-lang/crates.io-index" 2042 | checksum = "b4b7922be017ee70900be125523f38bdd644f4f06a1b16e8fa5a8ee8c34bffd4" 2043 | dependencies = [ 2044 | "itertools", 2045 | "nom 7.1.0", 2046 | "unicode_categories", 2047 | ] 2048 | 2049 | [[package]] 2050 | name = "sqlx-core" 2051 | version = "0.5.9" 2052 | source = "registry+https://github.com/rust-lang/crates.io-index" 2053 | checksum = "aec89bfaca8f7737439bad16d52b07f1ccd0730520d3bf6ae9d069fe4b641fb1" 2054 | dependencies = [ 2055 | "ahash", 2056 | "atoi", 2057 | "base64", 2058 | "bigdecimal", 2059 | "bit-vec", 2060 | "bitflags", 2061 | "byteorder", 2062 | "bytes", 2063 | "chrono", 2064 | "crc", 2065 | "crossbeam-channel", 2066 | "crossbeam-queue", 2067 | "crossbeam-utils", 2068 | "digest 0.9.0", 2069 | "dirs", 2070 | "either", 2071 | "encoding_rs", 2072 | "futures-channel", 2073 | "futures-core", 2074 | "futures-intrusive", 2075 | "futures-util", 2076 | "generic-array 0.14.5", 2077 | "hashlink", 2078 | "hex", 2079 | "hmac", 2080 | "indexmap", 2081 | "itoa 0.4.8", 2082 | "libc", 2083 | "libsqlite3-sys", 2084 | "log", 2085 | "md-5", 2086 | "memchr", 2087 | "num-bigint 0.3.3", 2088 | "once_cell", 2089 | "parking_lot", 2090 | "percent-encoding", 2091 | "rand", 2092 | "regex", 2093 | "rsa", 2094 | "rust_decimal", 2095 | "rustls", 2096 | "serde 1.0.136", 2097 | "serde_json", 2098 | "sha-1 0.9.8", 2099 | "sha2", 2100 | "smallvec", 2101 | "sqlformat", 2102 | "sqlx-rt", 2103 | "stringprep", 2104 | "thiserror", 2105 | "time 0.2.27", 2106 | "url", 2107 | "uuid", 2108 | "webpki", 2109 | "webpki-roots", 2110 | "whoami", 2111 | ] 2112 | 2113 | [[package]] 2114 | name = "sqlx-rt" 2115 | version = "0.5.10" 2116 | source = "registry+https://github.com/rust-lang/crates.io-index" 2117 | checksum = "8061cbaa91ee75041514f67a09398c65a64efed72c90151ecd47593bad53da99" 2118 | dependencies = [ 2119 | "async-rustls", 2120 | "async-std", 2121 | ] 2122 | 2123 | [[package]] 2124 | name = "standback" 2125 | version = "0.2.17" 2126 | source = "registry+https://github.com/rust-lang/crates.io-index" 2127 | checksum = "e113fb6f3de07a243d434a56ec6f186dfd51cb08448239fe7bcae73f87ff28ff" 2128 | dependencies = [ 2129 | "version_check", 2130 | ] 2131 | 2132 | [[package]] 2133 | name = "static_assertions" 2134 | version = "1.1.0" 2135 | source = "registry+https://github.com/rust-lang/crates.io-index" 2136 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2137 | 2138 | [[package]] 2139 | name = "stdweb" 2140 | version = "0.4.20" 2141 | source = "registry+https://github.com/rust-lang/crates.io-index" 2142 | checksum = "d022496b16281348b52d0e30ae99e01a73d737b2f45d38fed4edf79f9325a1d5" 2143 | dependencies = [ 2144 | "discard", 2145 | "rustc_version", 2146 | "stdweb-derive", 2147 | "stdweb-internal-macros", 2148 | "stdweb-internal-runtime", 2149 | "wasm-bindgen", 2150 | ] 2151 | 2152 | [[package]] 2153 | name = "stdweb-derive" 2154 | version = "0.5.3" 2155 | source = "registry+https://github.com/rust-lang/crates.io-index" 2156 | checksum = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" 2157 | dependencies = [ 2158 | "proc-macro2", 2159 | "quote", 2160 | "serde 1.0.136", 2161 | "serde_derive", 2162 | "syn", 2163 | ] 2164 | 2165 | [[package]] 2166 | name = "stdweb-internal-macros" 2167 | version = "0.2.9" 2168 | source = "registry+https://github.com/rust-lang/crates.io-index" 2169 | checksum = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" 2170 | dependencies = [ 2171 | "base-x", 2172 | "proc-macro2", 2173 | "quote", 2174 | "serde 1.0.136", 2175 | "serde_derive", 2176 | "serde_json", 2177 | "sha1", 2178 | "syn", 2179 | ] 2180 | 2181 | [[package]] 2182 | name = "stdweb-internal-runtime" 2183 | version = "0.1.5" 2184 | source = "registry+https://github.com/rust-lang/crates.io-index" 2185 | checksum = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" 2186 | 2187 | [[package]] 2188 | name = "stringprep" 2189 | version = "0.1.2" 2190 | source = "registry+https://github.com/rust-lang/crates.io-index" 2191 | checksum = "8ee348cb74b87454fff4b551cbf727025810a004f88aeacae7f85b87f4e9a1c1" 2192 | dependencies = [ 2193 | "unicode-bidi", 2194 | "unicode-normalization", 2195 | ] 2196 | 2197 | [[package]] 2198 | name = "strsim" 2199 | version = "0.8.0" 2200 | source = "registry+https://github.com/rust-lang/crates.io-index" 2201 | checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" 2202 | 2203 | [[package]] 2204 | name = "structopt" 2205 | version = "0.3.26" 2206 | source = "registry+https://github.com/rust-lang/crates.io-index" 2207 | checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" 2208 | dependencies = [ 2209 | "clap", 2210 | "lazy_static", 2211 | "structopt-derive", 2212 | ] 2213 | 2214 | [[package]] 2215 | name = "structopt-derive" 2216 | version = "0.4.18" 2217 | source = "registry+https://github.com/rust-lang/crates.io-index" 2218 | checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" 2219 | dependencies = [ 2220 | "heck", 2221 | "proc-macro-error", 2222 | "proc-macro2", 2223 | "quote", 2224 | "syn", 2225 | ] 2226 | 2227 | [[package]] 2228 | name = "subtle" 2229 | version = "2.4.1" 2230 | source = "registry+https://github.com/rust-lang/crates.io-index" 2231 | checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" 2232 | 2233 | [[package]] 2234 | name = "syn" 2235 | version = "1.0.82" 2236 | source = "registry+https://github.com/rust-lang/crates.io-index" 2237 | checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" 2238 | dependencies = [ 2239 | "proc-macro2", 2240 | "quote", 2241 | "unicode-xid", 2242 | ] 2243 | 2244 | [[package]] 2245 | name = "sync_wrapper" 2246 | version = "0.1.1" 2247 | source = "registry+https://github.com/rust-lang/crates.io-index" 2248 | checksum = "20518fe4a4c9acf048008599e464deb21beeae3d3578418951a189c235a7a9a8" 2249 | 2250 | [[package]] 2251 | name = "synstructure" 2252 | version = "0.12.6" 2253 | source = "registry+https://github.com/rust-lang/crates.io-index" 2254 | checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" 2255 | dependencies = [ 2256 | "proc-macro2", 2257 | "quote", 2258 | "syn", 2259 | "unicode-xid", 2260 | ] 2261 | 2262 | [[package]] 2263 | name = "termcolor" 2264 | version = "1.1.2" 2265 | source = "registry+https://github.com/rust-lang/crates.io-index" 2266 | checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" 2267 | dependencies = [ 2268 | "winapi-util", 2269 | ] 2270 | 2271 | [[package]] 2272 | name = "textwrap" 2273 | version = "0.11.0" 2274 | source = "registry+https://github.com/rust-lang/crates.io-index" 2275 | checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" 2276 | dependencies = [ 2277 | "unicode-width", 2278 | ] 2279 | 2280 | [[package]] 2281 | name = "thiserror" 2282 | version = "1.0.30" 2283 | source = "registry+https://github.com/rust-lang/crates.io-index" 2284 | checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" 2285 | dependencies = [ 2286 | "thiserror-impl", 2287 | ] 2288 | 2289 | [[package]] 2290 | name = "thiserror-impl" 2291 | version = "1.0.30" 2292 | source = "registry+https://github.com/rust-lang/crates.io-index" 2293 | checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" 2294 | dependencies = [ 2295 | "proc-macro2", 2296 | "quote", 2297 | "syn", 2298 | ] 2299 | 2300 | [[package]] 2301 | name = "time" 2302 | version = "0.1.43" 2303 | source = "registry+https://github.com/rust-lang/crates.io-index" 2304 | checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" 2305 | dependencies = [ 2306 | "libc", 2307 | "winapi", 2308 | ] 2309 | 2310 | [[package]] 2311 | name = "time" 2312 | version = "0.2.27" 2313 | source = "registry+https://github.com/rust-lang/crates.io-index" 2314 | checksum = "4752a97f8eebd6854ff91f1c1824cd6160626ac4bd44287f7f4ea2035a02a242" 2315 | dependencies = [ 2316 | "const_fn", 2317 | "libc", 2318 | "serde 1.0.136", 2319 | "standback", 2320 | "stdweb", 2321 | "time-macros", 2322 | "version_check", 2323 | "winapi", 2324 | ] 2325 | 2326 | [[package]] 2327 | name = "time-macros" 2328 | version = "0.1.1" 2329 | source = "registry+https://github.com/rust-lang/crates.io-index" 2330 | checksum = "957e9c6e26f12cb6d0dd7fc776bb67a706312e7299aed74c8dd5b17ebb27e2f1" 2331 | dependencies = [ 2332 | "proc-macro-hack", 2333 | "time-macros-impl", 2334 | ] 2335 | 2336 | [[package]] 2337 | name = "time-macros-impl" 2338 | version = "0.1.2" 2339 | source = "registry+https://github.com/rust-lang/crates.io-index" 2340 | checksum = "fd3c141a1b43194f3f56a1411225df8646c55781d5f26db825b3d98507eb482f" 2341 | dependencies = [ 2342 | "proc-macro-hack", 2343 | "proc-macro2", 2344 | "quote", 2345 | "standback", 2346 | "syn", 2347 | ] 2348 | 2349 | [[package]] 2350 | name = "tinyvec" 2351 | version = "1.5.1" 2352 | source = "registry+https://github.com/rust-lang/crates.io-index" 2353 | checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" 2354 | dependencies = [ 2355 | "tinyvec_macros", 2356 | ] 2357 | 2358 | [[package]] 2359 | name = "tinyvec_macros" 2360 | version = "0.1.0" 2361 | source = "registry+https://github.com/rust-lang/crates.io-index" 2362 | checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" 2363 | 2364 | [[package]] 2365 | name = "tokio" 2366 | version = "1.14.0" 2367 | source = "registry+https://github.com/rust-lang/crates.io-index" 2368 | checksum = "70e992e41e0d2fb9f755b37446f20900f64446ef54874f40a60c78f021ac6144" 2369 | dependencies = [ 2370 | "autocfg 1.0.1", 2371 | "bytes", 2372 | "libc", 2373 | "memchr", 2374 | "mio", 2375 | "num_cpus", 2376 | "once_cell", 2377 | "parking_lot", 2378 | "pin-project-lite", 2379 | "signal-hook-registry", 2380 | "tokio-macros", 2381 | "winapi", 2382 | ] 2383 | 2384 | [[package]] 2385 | name = "tokio-macros" 2386 | version = "1.6.0" 2387 | source = "registry+https://github.com/rust-lang/crates.io-index" 2388 | checksum = "c9efc1aba077437943f7515666aa2b882dfabfbfdf89c819ea75a8d6e9eaba5e" 2389 | dependencies = [ 2390 | "proc-macro2", 2391 | "quote", 2392 | "syn", 2393 | ] 2394 | 2395 | [[package]] 2396 | name = "tokio-util" 2397 | version = "0.6.9" 2398 | source = "registry+https://github.com/rust-lang/crates.io-index" 2399 | checksum = "9e99e1983e5d376cd8eb4b66604d2e99e79f5bd988c3055891dcd8c9e2604cc0" 2400 | dependencies = [ 2401 | "bytes", 2402 | "futures-core", 2403 | "futures-sink", 2404 | "log", 2405 | "pin-project-lite", 2406 | "tokio", 2407 | ] 2408 | 2409 | [[package]] 2410 | name = "toml" 2411 | version = "0.5.8" 2412 | source = "registry+https://github.com/rust-lang/crates.io-index" 2413 | checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" 2414 | dependencies = [ 2415 | "serde 1.0.136", 2416 | ] 2417 | 2418 | [[package]] 2419 | name = "tower" 2420 | version = "0.4.11" 2421 | source = "registry+https://github.com/rust-lang/crates.io-index" 2422 | checksum = "5651b5f6860a99bd1adb59dbfe1db8beb433e73709d9032b413a77e2fb7c066a" 2423 | dependencies = [ 2424 | "futures-core", 2425 | "futures-util", 2426 | "pin-project", 2427 | "pin-project-lite", 2428 | "tokio", 2429 | "tokio-util", 2430 | "tower-layer", 2431 | "tower-service", 2432 | "tracing", 2433 | ] 2434 | 2435 | [[package]] 2436 | name = "tower-http" 2437 | version = "0.2.1" 2438 | source = "registry+https://github.com/rust-lang/crates.io-index" 2439 | checksum = "03650267ad175b51c47d02ed9547fc7d4ba2c7e5cb76df0bed67edd1825ae297" 2440 | dependencies = [ 2441 | "bitflags", 2442 | "bytes", 2443 | "futures-core", 2444 | "futures-util", 2445 | "http", 2446 | "http-body", 2447 | "http-range-header", 2448 | "pin-project-lite", 2449 | "tower-layer", 2450 | "tower-service", 2451 | ] 2452 | 2453 | [[package]] 2454 | name = "tower-layer" 2455 | version = "0.3.1" 2456 | source = "registry+https://github.com/rust-lang/crates.io-index" 2457 | checksum = "343bc9466d3fe6b0f960ef45960509f84480bf4fd96f92901afe7ff3df9d3a62" 2458 | 2459 | [[package]] 2460 | name = "tower-service" 2461 | version = "0.3.1" 2462 | source = "registry+https://github.com/rust-lang/crates.io-index" 2463 | checksum = "360dfd1d6d30e05fda32ace2c8c70e9c0a9da713275777f5a4dbb8a1893930c6" 2464 | 2465 | [[package]] 2466 | name = "tracing" 2467 | version = "0.1.29" 2468 | source = "registry+https://github.com/rust-lang/crates.io-index" 2469 | checksum = "375a639232caf30edfc78e8d89b2d4c375515393e7af7e16f01cd96917fb2105" 2470 | dependencies = [ 2471 | "cfg-if", 2472 | "log", 2473 | "pin-project-lite", 2474 | "tracing-attributes", 2475 | "tracing-core", 2476 | ] 2477 | 2478 | [[package]] 2479 | name = "tracing-attributes" 2480 | version = "0.1.18" 2481 | source = "registry+https://github.com/rust-lang/crates.io-index" 2482 | checksum = "f4f480b8f81512e825f337ad51e94c1eb5d3bbdf2b363dcd01e2b19a9ffe3f8e" 2483 | dependencies = [ 2484 | "proc-macro2", 2485 | "quote", 2486 | "syn", 2487 | ] 2488 | 2489 | [[package]] 2490 | name = "tracing-core" 2491 | version = "0.1.21" 2492 | source = "registry+https://github.com/rust-lang/crates.io-index" 2493 | checksum = "1f4ed65637b8390770814083d20756f87bfa2c21bf2f110babdc5438351746e4" 2494 | dependencies = [ 2495 | "lazy_static", 2496 | ] 2497 | 2498 | [[package]] 2499 | name = "try-lock" 2500 | version = "0.2.3" 2501 | source = "registry+https://github.com/rust-lang/crates.io-index" 2502 | checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" 2503 | 2504 | [[package]] 2505 | name = "typenum" 2506 | version = "1.15.0" 2507 | source = "registry+https://github.com/rust-lang/crates.io-index" 2508 | checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" 2509 | 2510 | [[package]] 2511 | name = "ucd-trie" 2512 | version = "0.1.3" 2513 | source = "registry+https://github.com/rust-lang/crates.io-index" 2514 | checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" 2515 | 2516 | [[package]] 2517 | name = "unicode-bidi" 2518 | version = "0.3.7" 2519 | source = "registry+https://github.com/rust-lang/crates.io-index" 2520 | checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" 2521 | 2522 | [[package]] 2523 | name = "unicode-normalization" 2524 | version = "0.1.19" 2525 | source = "registry+https://github.com/rust-lang/crates.io-index" 2526 | checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" 2527 | dependencies = [ 2528 | "tinyvec", 2529 | ] 2530 | 2531 | [[package]] 2532 | name = "unicode-segmentation" 2533 | version = "1.8.0" 2534 | source = "registry+https://github.com/rust-lang/crates.io-index" 2535 | checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" 2536 | 2537 | [[package]] 2538 | name = "unicode-width" 2539 | version = "0.1.9" 2540 | source = "registry+https://github.com/rust-lang/crates.io-index" 2541 | checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" 2542 | 2543 | [[package]] 2544 | name = "unicode-xid" 2545 | version = "0.2.2" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" 2548 | 2549 | [[package]] 2550 | name = "unicode_categories" 2551 | version = "0.1.1" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" 2554 | 2555 | [[package]] 2556 | name = "untrusted" 2557 | version = "0.7.1" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" 2560 | 2561 | [[package]] 2562 | name = "url" 2563 | version = "2.2.2" 2564 | source = "registry+https://github.com/rust-lang/crates.io-index" 2565 | checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" 2566 | dependencies = [ 2567 | "form_urlencoded", 2568 | "idna", 2569 | "matches", 2570 | "percent-encoding", 2571 | ] 2572 | 2573 | [[package]] 2574 | name = "uuid" 2575 | version = "0.8.2" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" 2578 | dependencies = [ 2579 | "getrandom", 2580 | "serde 1.0.136", 2581 | ] 2582 | 2583 | [[package]] 2584 | name = "value-bag" 2585 | version = "1.0.0-alpha.8" 2586 | source = "registry+https://github.com/rust-lang/crates.io-index" 2587 | checksum = "79923f7731dc61ebfba3633098bf3ac533bbd35ccd8c57e7088d9a5eebe0263f" 2588 | dependencies = [ 2589 | "ctor", 2590 | "version_check", 2591 | ] 2592 | 2593 | [[package]] 2594 | name = "vcpkg" 2595 | version = "0.2.15" 2596 | source = "registry+https://github.com/rust-lang/crates.io-index" 2597 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 2598 | 2599 | [[package]] 2600 | name = "vec_map" 2601 | version = "0.8.2" 2602 | source = "registry+https://github.com/rust-lang/crates.io-index" 2603 | checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" 2604 | 2605 | [[package]] 2606 | name = "version_check" 2607 | version = "0.9.4" 2608 | source = "registry+https://github.com/rust-lang/crates.io-index" 2609 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2610 | 2611 | [[package]] 2612 | name = "waker-fn" 2613 | version = "1.1.0" 2614 | source = "registry+https://github.com/rust-lang/crates.io-index" 2615 | checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" 2616 | 2617 | [[package]] 2618 | name = "want" 2619 | version = "0.3.0" 2620 | source = "registry+https://github.com/rust-lang/crates.io-index" 2621 | checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" 2622 | dependencies = [ 2623 | "log", 2624 | "try-lock", 2625 | ] 2626 | 2627 | [[package]] 2628 | name = "wasi" 2629 | version = "0.10.2+wasi-snapshot-preview1" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" 2632 | 2633 | [[package]] 2634 | name = "wasm-bindgen" 2635 | version = "0.2.79" 2636 | source = "registry+https://github.com/rust-lang/crates.io-index" 2637 | checksum = "25f1af7423d8588a3d840681122e72e6a24ddbcb3f0ec385cac0d12d24256c06" 2638 | dependencies = [ 2639 | "cfg-if", 2640 | "wasm-bindgen-macro", 2641 | ] 2642 | 2643 | [[package]] 2644 | name = "wasm-bindgen-backend" 2645 | version = "0.2.79" 2646 | source = "registry+https://github.com/rust-lang/crates.io-index" 2647 | checksum = "8b21c0df030f5a177f3cba22e9bc4322695ec43e7257d865302900290bcdedca" 2648 | dependencies = [ 2649 | "bumpalo", 2650 | "lazy_static", 2651 | "log", 2652 | "proc-macro2", 2653 | "quote", 2654 | "syn", 2655 | "wasm-bindgen-shared", 2656 | ] 2657 | 2658 | [[package]] 2659 | name = "wasm-bindgen-futures" 2660 | version = "0.4.29" 2661 | source = "registry+https://github.com/rust-lang/crates.io-index" 2662 | checksum = "2eb6ec270a31b1d3c7e266b999739109abce8b6c87e4b31fcfcd788b65267395" 2663 | dependencies = [ 2664 | "cfg-if", 2665 | "js-sys", 2666 | "wasm-bindgen", 2667 | "web-sys", 2668 | ] 2669 | 2670 | [[package]] 2671 | name = "wasm-bindgen-macro" 2672 | version = "0.2.79" 2673 | source = "registry+https://github.com/rust-lang/crates.io-index" 2674 | checksum = "2f4203d69e40a52ee523b2529a773d5ffc1dc0071801c87b3d270b471b80ed01" 2675 | dependencies = [ 2676 | "quote", 2677 | "wasm-bindgen-macro-support", 2678 | ] 2679 | 2680 | [[package]] 2681 | name = "wasm-bindgen-macro-support" 2682 | version = "0.2.79" 2683 | source = "registry+https://github.com/rust-lang/crates.io-index" 2684 | checksum = "bfa8a30d46208db204854cadbb5d4baf5fcf8071ba5bf48190c3e59937962ebc" 2685 | dependencies = [ 2686 | "proc-macro2", 2687 | "quote", 2688 | "syn", 2689 | "wasm-bindgen-backend", 2690 | "wasm-bindgen-shared", 2691 | ] 2692 | 2693 | [[package]] 2694 | name = "wasm-bindgen-shared" 2695 | version = "0.2.79" 2696 | source = "registry+https://github.com/rust-lang/crates.io-index" 2697 | checksum = "3d958d035c4438e28c70e4321a2911302f10135ce78a9c7834c0cab4123d06a2" 2698 | 2699 | [[package]] 2700 | name = "web-sys" 2701 | version = "0.3.56" 2702 | source = "registry+https://github.com/rust-lang/crates.io-index" 2703 | checksum = "c060b319f29dd25724f09a2ba1418f142f539b2be99fbf4d2d5a8f7330afb8eb" 2704 | dependencies = [ 2705 | "js-sys", 2706 | "wasm-bindgen", 2707 | ] 2708 | 2709 | [[package]] 2710 | name = "webpki" 2711 | version = "0.21.4" 2712 | source = "registry+https://github.com/rust-lang/crates.io-index" 2713 | checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" 2714 | dependencies = [ 2715 | "ring", 2716 | "untrusted", 2717 | ] 2718 | 2719 | [[package]] 2720 | name = "webpki-roots" 2721 | version = "0.21.1" 2722 | source = "registry+https://github.com/rust-lang/crates.io-index" 2723 | checksum = "aabe153544e473b775453675851ecc86863d2a81d786d741f6b76778f2a48940" 2724 | dependencies = [ 2725 | "webpki", 2726 | ] 2727 | 2728 | [[package]] 2729 | name = "wepoll-ffi" 2730 | version = "0.1.2" 2731 | source = "registry+https://github.com/rust-lang/crates.io-index" 2732 | checksum = "d743fdedc5c64377b5fc2bc036b01c7fd642205a0d96356034ae3404d49eb7fb" 2733 | dependencies = [ 2734 | "cc", 2735 | ] 2736 | 2737 | [[package]] 2738 | name = "whoami" 2739 | version = "1.2.1" 2740 | source = "registry+https://github.com/rust-lang/crates.io-index" 2741 | checksum = "524b58fa5a20a2fb3014dd6358b70e6579692a56ef6fce928834e488f42f65e8" 2742 | dependencies = [ 2743 | "wasm-bindgen", 2744 | "web-sys", 2745 | ] 2746 | 2747 | [[package]] 2748 | name = "winapi" 2749 | version = "0.3.9" 2750 | source = "registry+https://github.com/rust-lang/crates.io-index" 2751 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 2752 | dependencies = [ 2753 | "winapi-i686-pc-windows-gnu", 2754 | "winapi-x86_64-pc-windows-gnu", 2755 | ] 2756 | 2757 | [[package]] 2758 | name = "winapi-i686-pc-windows-gnu" 2759 | version = "0.4.0" 2760 | source = "registry+https://github.com/rust-lang/crates.io-index" 2761 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 2762 | 2763 | [[package]] 2764 | name = "winapi-util" 2765 | version = "0.1.5" 2766 | source = "registry+https://github.com/rust-lang/crates.io-index" 2767 | checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" 2768 | dependencies = [ 2769 | "winapi", 2770 | ] 2771 | 2772 | [[package]] 2773 | name = "winapi-x86_64-pc-windows-gnu" 2774 | version = "0.4.0" 2775 | source = "registry+https://github.com/rust-lang/crates.io-index" 2776 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 2777 | 2778 | [[package]] 2779 | name = "xml-rs" 2780 | version = "0.8.4" 2781 | source = "registry+https://github.com/rust-lang/crates.io-index" 2782 | checksum = "d2d7d3948613f75c98fd9328cfdcc45acc4d360655289d0a7d4ec931392200a3" 2783 | 2784 | [[package]] 2785 | name = "yaml-rust" 2786 | version = "0.4.5" 2787 | source = "registry+https://github.com/rust-lang/crates.io-index" 2788 | checksum = "56c1936c4cc7a1c9ab21a1ebb602eb942ba868cbd44a99cb7cdc5892335e1c85" 2789 | dependencies = [ 2790 | "linked-hash-map", 2791 | ] 2792 | 2793 | [[package]] 2794 | name = "zeroize" 2795 | version = "1.3.0" 2796 | source = "registry+https://github.com/rust-lang/crates.io-index" 2797 | checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" 2798 | dependencies = [ 2799 | "zeroize_derive", 2800 | ] 2801 | 2802 | [[package]] 2803 | name = "zeroize_derive" 2804 | version = "1.3.1" 2805 | source = "registry+https://github.com/rust-lang/crates.io-index" 2806 | checksum = "81e8f13fef10b63c06356d65d416b070798ddabcadc10d3ece0c5be9b3c7eddb" 2807 | dependencies = [ 2808 | "proc-macro2", 2809 | "quote", 2810 | "syn", 2811 | "synstructure", 2812 | ] 2813 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "rust_rest_demo" 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 | tokio = { version = "1.0", features = ["full"] } 10 | axum = "0.4.4" 11 | log = "0.4.0" 12 | env_logger = "0.8.4" 13 | futures = "0.3" 14 | serde = { version = "1.0", features = ["derive"] } 15 | serde_repr = "0.1" 16 | serde_json = "1.0" 17 | serde_derive = "1.0.126" 18 | lazy_static = "1.4" 19 | rbson = "2.0" 20 | # rbatis (required) default is all-database+runtime-async-std-rustls 21 | rbatis = { version = "3.0.20" } 22 | config = "0.11.0" 23 | clap = "2.33.3" 24 | 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # rust-rest-demo 2 | A demo for rest api server in rust 3 | -------------------------------------------------------------------------------- /config/app.yaml: -------------------------------------------------------------------------------- 1 | listen_http: 0.0.0.0:3000 2 | mysql_url: mysql://fortest:Ky6XRHMFWScBPpbC@122.9.61.5:3306/fortest 3 | 4 | 5 | -------------------------------------------------------------------------------- /docs/db.sql: -------------------------------------------------------------------------------- 1 | 2 | create table user 3 | ( 4 | id int auto_increment primary key, 5 | username varchar(20) null, 6 | password varchar(50) null, 7 | constraint user_username_uindex unique (username) 8 | ); 9 | -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- 1 | #![allow(dead_code)] 2 | #[macro_use] 3 | extern crate log; 4 | #[macro_use] 5 | extern crate rbatis; 6 | 7 | use std::sync::Arc; 8 | 9 | use clap::{app_from_crate, crate_authors, crate_description, crate_name, crate_version}; 10 | use futures::executor::block_on; 11 | use rbatis::rbatis::Rbatis; 12 | use serde_derive::Deserialize; 13 | 14 | mod server; 15 | mod store; 16 | 17 | #[derive(Debug, Deserialize)] 18 | struct Config { 19 | listen_http: String, 20 | mysql_url: String, 21 | } 22 | 23 | impl Config { 24 | fn new(file: &str) -> Result> { 25 | let mut c = config::Config::new(); 26 | c.set_default("listen_http", "127.0.0.1:8080")?; 27 | c.set_default("mysql_url", "mysql://root:123456@127.0.0.1:3306/test")?; 28 | c.merge(config::File::with_name(file))?; 29 | c.merge(config::Environment::with_prefix("REST_API_SERVER"))?; 30 | Ok(c.try_into()?) 31 | } 32 | } 33 | 34 | async fn async_main(c: Config) { 35 | let rb = Rbatis::new(); 36 | rb.link(c.mysql_url.as_str()).await.expect("rbatis link database fail"); 37 | let store = Arc::new(store::Store::new(rb)); 38 | 39 | let f1 = server::run(store.clone(), c.listen_http.as_str()); 40 | let f2 = server::run(store.clone(), "127.0.0.1:8999"); 41 | futures::join!(f1,f2); 42 | } 43 | 44 | #[tokio::main] 45 | async fn main() -> Result<(), Box> { 46 | env_logger::init(); 47 | info!("starting up"); 48 | let opts = app_from_crate!() 49 | .arg( 50 | clap::Arg::with_name("config") 51 | .short("c") 52 | .long("config") 53 | .help("Configuration file path") 54 | .takes_value(true) 55 | .default_value("./config/app.yaml"), 56 | ) 57 | .get_matches(); 58 | let cfg = Config::new(opts.value_of("config").unwrap())?; 59 | 60 | block_on(async_main(cfg)); 61 | Ok(()) 62 | } 63 | -------------------------------------------------------------------------------- /src/server/code.rs: -------------------------------------------------------------------------------- 1 | use std::collections::HashMap; 2 | 3 | use axum::http::StatusCode; 4 | use axum::Json; 5 | use axum::response::{IntoResponse, Response}; 6 | use lazy_static::lazy_static; 7 | use serde::Serialize; 8 | use serde_json::json; 9 | use serde_repr::Serialize_repr; 10 | 11 | #[derive(Clone, Copy, PartialEq, Eq, Debug, Hash, Serialize_repr)] 12 | #[repr(u8)] 13 | pub enum TCode { 14 | Ok = 0, 15 | UnknownError = 1, 16 | UsernameNotExist = 2, 17 | PasswordError = 3, 18 | DbError = 4, 19 | } 20 | 21 | lazy_static! { 22 | pub static ref TCODE_MESSAGE: HashMap = { 23 | let mut m = HashMap::new(); 24 | m.insert(TCode::Ok, "Ok"); 25 | m.insert(TCode::UnknownError, "Unknown error"); 26 | m.insert(TCode::UsernameNotExist, "Username not exist"); 27 | m.insert(TCode::PasswordError, "Password error"); 28 | m.insert(TCode::DbError, "Db error"); 29 | m 30 | }; 31 | } 32 | 33 | #[derive(Serialize)] 34 | pub struct ComResponse { 35 | pub code: TCode, 36 | pub msg: Option, 37 | pub data: Option, 38 | } 39 | 40 | #[derive(Debug)] 41 | pub struct TSuccess { 42 | pub data: T, 43 | } 44 | 45 | impl IntoResponse for TSuccess 46 | { 47 | fn into_response(self) -> Response { 48 | let resp = ComResponse { 49 | code: TCode::Ok, 50 | msg: Some(TCODE_MESSAGE.get(&TCode::Ok).unwrap().to_string()), 51 | data: Some(self.data), 52 | }; 53 | let body = Json(json!(resp)); 54 | (StatusCode::from_u16(200).unwrap(), body).into_response() 55 | } 56 | } 57 | 58 | #[derive(Debug)] 59 | pub struct TError { 60 | pub code: TCode, 61 | pub msg: Option, 62 | } 63 | 64 | impl IntoResponse for TError 65 | { 66 | fn into_response(self) -> Response { 67 | let resp: ComResponse = { 68 | ComResponse { 69 | code: self.code, 70 | msg: self.msg, 71 | data: None, 72 | } 73 | }; 74 | let body = Json(json!(resp)); 75 | (StatusCode::from_u16(200).unwrap(), body).into_response() 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /src/server/mod.rs: -------------------------------------------------------------------------------- 1 | use std::net::{SocketAddr}; 2 | use std::sync::Arc; 3 | 4 | use axum::AddExtensionLayer; 5 | use tokio::signal; 6 | use crate::store::Store; 7 | 8 | mod user; 9 | mod route; 10 | mod code; 11 | 12 | pub async fn run(store: Arc, listen_http: &str) { 13 | let app = route::setup_router(); 14 | let app = app.layer(AddExtensionLayer::new(store)); 15 | 16 | let addr: SocketAddr = listen_http.parse().unwrap(); 17 | info!("listening on {}", addr); 18 | 19 | axum::Server::bind(&addr) 20 | .serve(app.into_make_service()) 21 | .with_graceful_shutdown(shutdown_signal()) 22 | .await 23 | .unwrap() 24 | } 25 | 26 | async fn shutdown_signal() { 27 | let ctrl_c = async { 28 | signal::ctrl_c() 29 | .await 30 | .expect("failed to install Ctrl+C handler"); 31 | }; 32 | 33 | #[cfg(unix)] 34 | let terminate = async { 35 | signal::unix::signal(signal::unix::SignalKind::terminate()) 36 | .expect("failed to install signal handler") 37 | .recv() 38 | .await; 39 | }; 40 | 41 | #[cfg(not(unix))] 42 | let terminate = std::future::pending::<()>(); 43 | 44 | tokio::select! { 45 | _ = ctrl_c => {}, 46 | _ = terminate => {}, 47 | } 48 | 49 | println!("signal received, starting graceful shutdown"); 50 | } 51 | -------------------------------------------------------------------------------- /src/server/route.rs: -------------------------------------------------------------------------------- 1 | use axum::{ 2 | Router, 3 | routing::{get, post}, 4 | }; 5 | 6 | use super::user::{login, register}; 7 | 8 | pub fn setup_router() -> Router { 9 | Router::new() 10 | .route("/v1/register", post(register)) 11 | .route("/v1/login", post(login)) 12 | } -------------------------------------------------------------------------------- /src/server/user.rs: -------------------------------------------------------------------------------- 1 | use std::sync::Arc; 2 | 3 | use axum::extract::Extension; 4 | use axum::Json; 5 | use axum::response::IntoResponse; 6 | use serde::{Deserialize, Serialize}; 7 | 8 | use super::code::*; 9 | use crate::store::Store; 10 | use crate::store::user::User; 11 | 12 | #[derive(Debug, Serialize)] 13 | pub struct UserData { 14 | id: i64, 15 | username: String, 16 | } 17 | 18 | #[derive(Debug, Deserialize)] 19 | pub struct RegisterReq { 20 | username: String, 21 | password: String, 22 | } 23 | 24 | #[derive(Debug, Deserialize)] 25 | pub struct LoginReq { 26 | username: String, 27 | password: String, 28 | } 29 | 30 | pub async fn register(store: Extension>, Json(req): Json) -> impl IntoResponse { 31 | info!("register req{:?}", req); 32 | let user = User { 33 | id: 0, 34 | username: Some(req.username), 35 | password: Some(req.password), 36 | }; 37 | 38 | let r = store.create_user(user).await; 39 | 40 | r.map(|u| { 41 | TSuccess { 42 | data: UserData { 43 | id: u.id, 44 | username: u.username.unwrap().clone(), 45 | } 46 | } 47 | }).map_err(|err| { 48 | error!("failed to create user:{}", err); 49 | TError { code: TCode::DbError, msg: Some("db error".to_owned()) } 50 | }) 51 | } 52 | 53 | pub async fn login(store: Extension>, Json(req): Json) -> impl IntoResponse { 54 | info!("login req{:?}", req); 55 | 56 | let r = store.fetch_user_by_name(req.username.as_str()).await; 57 | 58 | r.map(|res| { 59 | res.map(|u| { 60 | TSuccess { 61 | data: UserData { 62 | id: u.id, 63 | username: u.username.unwrap().clone(), 64 | } 65 | } 66 | }).ok_or(TError { 67 | code: TCode::UsernameNotExist, 68 | msg: Some(TCODE_MESSAGE.get(&TCode::UsernameNotExist).unwrap().to_string()), 69 | }) 70 | }).map_err(|err| { 71 | error!("failed to get user:{}", err); 72 | TError { code: TCode::DbError, msg: Some("db error".to_owned()) } 73 | }) 74 | } 75 | 76 | -------------------------------------------------------------------------------- /src/store/mod.rs: -------------------------------------------------------------------------------- 1 | pub(crate) mod user; 2 | 3 | use rbatis::rbatis::Rbatis; 4 | 5 | pub struct Store { 6 | rb: Rbatis, 7 | } 8 | 9 | impl Store { 10 | pub fn new(rb: Rbatis) -> Self { 11 | Store { 12 | rb 13 | } 14 | } 15 | } 16 | 17 | -------------------------------------------------------------------------------- /src/store/user.rs: -------------------------------------------------------------------------------- 1 | use rbatis::crud::CRUD; 2 | use rbatis::Error; 3 | 4 | use super::Store; 5 | 6 | #[crud_table] 7 | #[derive(Clone, Debug)] 8 | pub struct User { 9 | pub id: i64, 10 | pub username: Option, 11 | pub password: Option, 12 | } 13 | 14 | impl Store { 15 | pub async fn create_user(&self, user: User) -> Result { 16 | let r = self.rb.save(&user, &[]).await?; 17 | let mut u = user.clone(); 18 | u.id = r.last_insert_id.unwrap(); 19 | Ok(u) 20 | } 21 | 22 | pub async fn fetch_user_by_name(&self, username: &str) -> Result, Error> { 23 | return self.rb.fetch_by_column::, _>("username", username).await; 24 | } 25 | 26 | pub async fn fetch_user_by_id(&self, id: i32) -> Result, Error> { 27 | return self.rb.fetch_by_column::, _>("id", id).await; 28 | } 29 | } 30 | --------------------------------------------------------------------------------