13.diff (159695B)
1 diff --git a/.gitignore b/.gitignore 2 index 408b8a5..ff910e0 100644 3 --- a/.gitignore 4 +++ b/.gitignore 5 @@ -1,3 +1,4 @@ 6 /target 7 -Cargo.lock 8 -.idea 9 \ No newline at end of file 10 +.idea 11 +/example-bot/config.yml 12 +/example-bot/store 13 \ No newline at end of file 14 diff --git a/Cargo.lock b/Cargo.lock 15 new file mode 100644 16 index 0000000..44aafa0 17 --- /dev/null 18 +++ b/Cargo.lock 19 @@ -0,0 +1,3788 @@ 20 +# This file is automatically @generated by Cargo. 21 +# It is not intended for manual editing. 22 +version = 3 23 + 24 +[[package]] 25 +name = "accessory" 26 +version = "1.3.1" 27 +source = "registry+https://github.com/rust-lang/crates.io-index" 28 +checksum = "87537f9ae7cfa78d5b8ebd1a1db25959f5e737126be4d8eb44a5452fc4b63cde" 29 +dependencies = [ 30 + "macroific", 31 + "proc-macro2", 32 + "quote", 33 + "syn 2.0.66", 34 +] 35 + 36 +[[package]] 37 +name = "addr2line" 38 +version = "0.21.0" 39 +source = "registry+https://github.com/rust-lang/crates.io-index" 40 +checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 41 +dependencies = [ 42 + "gimli", 43 +] 44 + 45 +[[package]] 46 +name = "adler" 47 +version = "1.0.2" 48 +source = "registry+https://github.com/rust-lang/crates.io-index" 49 +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 50 + 51 +[[package]] 52 +name = "aead" 53 +version = "0.5.2" 54 +source = "registry+https://github.com/rust-lang/crates.io-index" 55 +checksum = "d122413f284cf2d62fb1b7db97e02edb8cda96d769b16e443a4f6195e35662b0" 56 +dependencies = [ 57 + "crypto-common", 58 + "generic-array", 59 +] 60 + 61 +[[package]] 62 +name = "aes" 63 +version = "0.8.4" 64 +source = "registry+https://github.com/rust-lang/crates.io-index" 65 +checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" 66 +dependencies = [ 67 + "cfg-if", 68 + "cipher", 69 + "cpufeatures", 70 +] 71 + 72 +[[package]] 73 +name = "ahash" 74 +version = "0.8.11" 75 +source = "registry+https://github.com/rust-lang/crates.io-index" 76 +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 77 +dependencies = [ 78 + "cfg-if", 79 + "once_cell", 80 + "version_check", 81 + "zerocopy", 82 +] 83 + 84 +[[package]] 85 +name = "aho-corasick" 86 +version = "1.1.3" 87 +source = "registry+https://github.com/rust-lang/crates.io-index" 88 +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 89 +dependencies = [ 90 + "memchr", 91 +] 92 + 93 +[[package]] 94 +name = "allocator-api2" 95 +version = "0.2.18" 96 +source = "registry+https://github.com/rust-lang/crates.io-index" 97 +checksum = "5c6cb57a04249c6480766f7f7cef5467412af1490f8d1e243141daddada3264f" 98 + 99 +[[package]] 100 +name = "anstream" 101 +version = "0.6.14" 102 +source = "registry+https://github.com/rust-lang/crates.io-index" 103 +checksum = "418c75fa768af9c03be99d17643f93f79bbba589895012a80e3452a19ddda15b" 104 +dependencies = [ 105 + "anstyle", 106 + "anstyle-parse", 107 + "anstyle-query", 108 + "anstyle-wincon", 109 + "colorchoice", 110 + "is_terminal_polyfill", 111 + "utf8parse", 112 +] 113 + 114 +[[package]] 115 +name = "anstyle" 116 +version = "1.0.7" 117 +source = "registry+https://github.com/rust-lang/crates.io-index" 118 +checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" 119 + 120 +[[package]] 121 +name = "anstyle-parse" 122 +version = "0.2.4" 123 +source = "registry+https://github.com/rust-lang/crates.io-index" 124 +checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" 125 +dependencies = [ 126 + "utf8parse", 127 +] 128 + 129 +[[package]] 130 +name = "anstyle-query" 131 +version = "1.1.0" 132 +source = "registry+https://github.com/rust-lang/crates.io-index" 133 +checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" 134 +dependencies = [ 135 + "windows-sys 0.52.0", 136 +] 137 + 138 +[[package]] 139 +name = "anstyle-wincon" 140 +version = "3.0.3" 141 +source = "registry+https://github.com/rust-lang/crates.io-index" 142 +checksum = "61a38449feb7068f52bb06c12759005cf459ee52bb4adc1d5a7c4322d716fb19" 143 +dependencies = [ 144 + "anstyle", 145 + "windows-sys 0.52.0", 146 +] 147 + 148 +[[package]] 149 +name = "anyhow" 150 +version = "1.0.86" 151 +source = "registry+https://github.com/rust-lang/crates.io-index" 152 +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" 153 + 154 +[[package]] 155 +name = "anymap2" 156 +version = "0.13.0" 157 +source = "registry+https://github.com/rust-lang/crates.io-index" 158 +checksum = "d301b3b94cb4b2f23d7917810addbbaff90738e0ca2be692bd027e70d7e0330c" 159 + 160 +[[package]] 161 +name = "aquamarine" 162 +version = "0.5.0" 163 +source = "registry+https://github.com/rust-lang/crates.io-index" 164 +checksum = "21cc1548309245035eb18aa7f0967da6bc65587005170c56e6ef2788a4cf3f4e" 165 +dependencies = [ 166 + "include_dir", 167 + "itertools 0.10.5", 168 + "proc-macro-error", 169 + "proc-macro2", 170 + "quote", 171 + "syn 2.0.66", 172 +] 173 + 174 +[[package]] 175 +name = "arrayref" 176 +version = "0.3.7" 177 +source = "registry+https://github.com/rust-lang/crates.io-index" 178 +checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" 179 + 180 +[[package]] 181 +name = "arrayvec" 182 +version = "0.7.4" 183 +source = "registry+https://github.com/rust-lang/crates.io-index" 184 +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 185 +dependencies = [ 186 + "serde", 187 +] 188 + 189 +[[package]] 190 +name = "as_variant" 191 +version = "1.2.0" 192 +source = "registry+https://github.com/rust-lang/crates.io-index" 193 +checksum = "f38fa22307249f86fb7fad906fcae77f2564caeb56d7209103c551cd1cf4798f" 194 + 195 +[[package]] 196 +name = "assign" 197 +version = "1.1.1" 198 +source = "registry+https://github.com/rust-lang/crates.io-index" 199 +checksum = "5f093eed78becd229346bf859eec0aa4dd7ddde0757287b2b4107a1f09c80002" 200 + 201 +[[package]] 202 +name = "async-channel" 203 +version = "2.3.1" 204 +source = "registry+https://github.com/rust-lang/crates.io-index" 205 +checksum = "89b47800b0be77592da0afd425cc03468052844aff33b84e33cc696f64e77b6a" 206 +dependencies = [ 207 + "concurrent-queue", 208 + "event-listener-strategy", 209 + "futures-core", 210 + "pin-project-lite", 211 +] 212 + 213 +[[package]] 214 +name = "async-stream" 215 +version = "0.3.5" 216 +source = "registry+https://github.com/rust-lang/crates.io-index" 217 +checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" 218 +dependencies = [ 219 + "async-stream-impl", 220 + "futures-core", 221 + "pin-project-lite", 222 +] 223 + 224 +[[package]] 225 +name = "async-stream-impl" 226 +version = "0.3.5" 227 +source = "registry+https://github.com/rust-lang/crates.io-index" 228 +checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" 229 +dependencies = [ 230 + "proc-macro2", 231 + "quote", 232 + "syn 2.0.66", 233 +] 234 + 235 +[[package]] 236 +name = "async-trait" 237 +version = "0.1.80" 238 +source = "registry+https://github.com/rust-lang/crates.io-index" 239 +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" 240 +dependencies = [ 241 + "proc-macro2", 242 + "quote", 243 + "syn 2.0.66", 244 +] 245 + 246 +[[package]] 247 +name = "autocfg" 248 +version = "1.3.0" 249 +source = "registry+https://github.com/rust-lang/crates.io-index" 250 +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" 251 + 252 +[[package]] 253 +name = "backoff" 254 +version = "0.4.0" 255 +source = "registry+https://github.com/rust-lang/crates.io-index" 256 +checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" 257 +dependencies = [ 258 + "futures-core", 259 + "getrandom", 260 + "instant", 261 + "pin-project-lite", 262 + "rand", 263 + "tokio", 264 +] 265 + 266 +[[package]] 267 +name = "backtrace" 268 +version = "0.3.71" 269 +source = "registry+https://github.com/rust-lang/crates.io-index" 270 +checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" 271 +dependencies = [ 272 + "addr2line", 273 + "cc", 274 + "cfg-if", 275 + "libc", 276 + "miniz_oxide", 277 + "object", 278 + "rustc-demangle", 279 +] 280 + 281 +[[package]] 282 +name = "base64" 283 +version = "0.21.7" 284 +source = "registry+https://github.com/rust-lang/crates.io-index" 285 +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 286 + 287 +[[package]] 288 +name = "base64ct" 289 +version = "1.6.0" 290 +source = "registry+https://github.com/rust-lang/crates.io-index" 291 +checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" 292 + 293 +[[package]] 294 +name = "bitflags" 295 +version = "1.3.2" 296 +source = "registry+https://github.com/rust-lang/crates.io-index" 297 +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 298 + 299 +[[package]] 300 +name = "bitflags" 301 +version = "2.5.0" 302 +source = "registry+https://github.com/rust-lang/crates.io-index" 303 +checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 304 + 305 +[[package]] 306 +name = "bitmaps" 307 +version = "3.2.1" 308 +source = "registry+https://github.com/rust-lang/crates.io-index" 309 +checksum = "a1d084b0137aaa901caf9f1e8b21daa6aa24d41cd806e111335541eff9683bd6" 310 + 311 +[[package]] 312 +name = "blake3" 313 +version = "1.5.1" 314 +source = "registry+https://github.com/rust-lang/crates.io-index" 315 +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" 316 +dependencies = [ 317 + "arrayref", 318 + "arrayvec", 319 + "cc", 320 + "cfg-if", 321 + "constant_time_eq", 322 +] 323 + 324 +[[package]] 325 +name = "block-buffer" 326 +version = "0.10.4" 327 +source = "registry+https://github.com/rust-lang/crates.io-index" 328 +checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 329 +dependencies = [ 330 + "generic-array", 331 +] 332 + 333 +[[package]] 334 +name = "block-padding" 335 +version = "0.3.3" 336 +source = "registry+https://github.com/rust-lang/crates.io-index" 337 +checksum = "a8894febbff9f758034a5b8e12d87918f56dfc64a8e1fe757d65e29041538d93" 338 +dependencies = [ 339 + "generic-array", 340 +] 341 + 342 +[[package]] 343 +name = "bs58" 344 +version = "0.5.1" 345 +source = "registry+https://github.com/rust-lang/crates.io-index" 346 +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" 347 +dependencies = [ 348 + "tinyvec", 349 +] 350 + 351 +[[package]] 352 +name = "bumpalo" 353 +version = "3.16.0" 354 +source = "registry+https://github.com/rust-lang/crates.io-index" 355 +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 356 + 357 +[[package]] 358 +name = "byteorder" 359 +version = "1.5.0" 360 +source = "registry+https://github.com/rust-lang/crates.io-index" 361 +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 362 + 363 +[[package]] 364 +name = "bytes" 365 +version = "1.6.0" 366 +source = "registry+https://github.com/rust-lang/crates.io-index" 367 +checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 368 + 369 +[[package]] 370 +name = "bytesize" 371 +version = "1.3.0" 372 +source = "registry+https://github.com/rust-lang/crates.io-index" 373 +checksum = "a3e368af43e418a04d52505cf3dbc23dda4e3407ae2fa99fd0e4f308ce546acc" 374 + 375 +[[package]] 376 +name = "cbc" 377 +version = "0.1.2" 378 +source = "registry+https://github.com/rust-lang/crates.io-index" 379 +checksum = "26b52a9543ae338f279b96b0b9fed9c8093744685043739079ce85cd58f289a6" 380 +dependencies = [ 381 + "cipher", 382 +] 383 + 384 +[[package]] 385 +name = "cc" 386 +version = "1.0.99" 387 +source = "registry+https://github.com/rust-lang/crates.io-index" 388 +checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" 389 + 390 +[[package]] 391 +name = "cfg-if" 392 +version = "1.0.0" 393 +source = "registry+https://github.com/rust-lang/crates.io-index" 394 +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 395 + 396 +[[package]] 397 +name = "cfg-vis" 398 +version = "0.3.0" 399 +source = "registry+https://github.com/rust-lang/crates.io-index" 400 +checksum = "c3a2c3bf5fc10fe2ca157564fbe08a4cb2b0a7d2ff3fe2f9683e65d5e7c7859c" 401 +dependencies = [ 402 + "proc-macro-crate 1.3.1", 403 + "proc-macro2", 404 + "quote", 405 + "syn 1.0.109", 406 +] 407 + 408 +[[package]] 409 +name = "chacha20" 410 +version = "0.9.1" 411 +source = "registry+https://github.com/rust-lang/crates.io-index" 412 +checksum = "c3613f74bd2eac03dad61bd53dbe620703d4371614fe0bc3b9f04dd36fe4e818" 413 +dependencies = [ 414 + "cfg-if", 415 + "cipher", 416 + "cpufeatures", 417 +] 418 + 419 +[[package]] 420 +name = "chacha20poly1305" 421 +version = "0.10.1" 422 +source = "registry+https://github.com/rust-lang/crates.io-index" 423 +checksum = "10cd79432192d1c0f4e1a0fef9527696cc039165d729fb41b3f4f4f354c2dc35" 424 +dependencies = [ 425 + "aead", 426 + "chacha20", 427 + "cipher", 428 + "poly1305", 429 + "zeroize", 430 +] 431 + 432 +[[package]] 433 +name = "cipher" 434 +version = "0.4.4" 435 +source = "registry+https://github.com/rust-lang/crates.io-index" 436 +checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" 437 +dependencies = [ 438 + "crypto-common", 439 + "inout", 440 + "zeroize", 441 +] 442 + 443 +[[package]] 444 +name = "clap" 445 +version = "4.5.7" 446 +source = "registry+https://github.com/rust-lang/crates.io-index" 447 +checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" 448 +dependencies = [ 449 + "clap_builder", 450 + "clap_derive", 451 +] 452 + 453 +[[package]] 454 +name = "clap_builder" 455 +version = "4.5.7" 456 +source = "registry+https://github.com/rust-lang/crates.io-index" 457 +checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" 458 +dependencies = [ 459 + "anstream", 460 + "anstyle", 461 + "clap_lex", 462 + "strsim", 463 +] 464 + 465 +[[package]] 466 +name = "clap_derive" 467 +version = "4.5.5" 468 +source = "registry+https://github.com/rust-lang/crates.io-index" 469 +checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" 470 +dependencies = [ 471 + "heck", 472 + "proc-macro2", 473 + "quote", 474 + "syn 2.0.66", 475 +] 476 + 477 +[[package]] 478 +name = "clap_lex" 479 +version = "0.7.1" 480 +source = "registry+https://github.com/rust-lang/crates.io-index" 481 +checksum = "4b82cf0babdbd58558212896d1a4272303a57bdb245c2bf1147185fb45640e70" 482 + 483 +[[package]] 484 +name = "color-eyre" 485 +version = "0.6.3" 486 +source = "registry+https://github.com/rust-lang/crates.io-index" 487 +checksum = "55146f5e46f237f7423d74111267d4597b59b0dad0ffaf7303bce9945d843ad5" 488 +dependencies = [ 489 + "backtrace", 490 + "color-spantrace", 491 + "eyre", 492 + "indenter", 493 + "once_cell", 494 + "owo-colors", 495 + "tracing-error", 496 +] 497 + 498 +[[package]] 499 +name = "color-spantrace" 500 +version = "0.2.1" 501 +source = "registry+https://github.com/rust-lang/crates.io-index" 502 +checksum = "cd6be1b2a7e382e2b98b43b2adcca6bb0e465af0bdd38123873ae61eb17a72c2" 503 +dependencies = [ 504 + "once_cell", 505 + "owo-colors", 506 + "tracing-core", 507 + "tracing-error", 508 +] 509 + 510 +[[package]] 511 +name = "colorchoice" 512 +version = "1.0.1" 513 +source = "registry+https://github.com/rust-lang/crates.io-index" 514 +checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" 515 + 516 +[[package]] 517 +name = "concurrent-queue" 518 +version = "2.5.0" 519 +source = "registry+https://github.com/rust-lang/crates.io-index" 520 +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" 521 +dependencies = [ 522 + "crossbeam-utils", 523 +] 524 + 525 +[[package]] 526 +name = "const-oid" 527 +version = "0.9.6" 528 +source = "registry+https://github.com/rust-lang/crates.io-index" 529 +checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" 530 + 531 +[[package]] 532 +name = "const_panic" 533 +version = "0.2.8" 534 +source = "registry+https://github.com/rust-lang/crates.io-index" 535 +checksum = "6051f239ecec86fde3410901ab7860d458d160371533842974fc61f96d15879b" 536 + 537 +[[package]] 538 +name = "constant_time_eq" 539 +version = "0.3.0" 540 +source = "registry+https://github.com/rust-lang/crates.io-index" 541 +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" 542 + 543 +[[package]] 544 +name = "convert_case" 545 +version = "0.6.0" 546 +source = "registry+https://github.com/rust-lang/crates.io-index" 547 +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" 548 +dependencies = [ 549 + "unicode-segmentation", 550 +] 551 + 552 +[[package]] 553 +name = "core-foundation" 554 +version = "0.9.4" 555 +source = "registry+https://github.com/rust-lang/crates.io-index" 556 +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 557 +dependencies = [ 558 + "core-foundation-sys", 559 + "libc", 560 +] 561 + 562 +[[package]] 563 +name = "core-foundation-sys" 564 +version = "0.8.6" 565 +source = "registry+https://github.com/rust-lang/crates.io-index" 566 +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 567 + 568 +[[package]] 569 +name = "cpufeatures" 570 +version = "0.2.12" 571 +source = "registry+https://github.com/rust-lang/crates.io-index" 572 +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 573 +dependencies = [ 574 + "libc", 575 +] 576 + 577 +[[package]] 578 +name = "crossbeam-utils" 579 +version = "0.8.20" 580 +source = "registry+https://github.com/rust-lang/crates.io-index" 581 +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" 582 + 583 +[[package]] 584 +name = "crypto-common" 585 +version = "0.1.6" 586 +source = "registry+https://github.com/rust-lang/crates.io-index" 587 +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 588 +dependencies = [ 589 + "generic-array", 590 + "rand_core", 591 + "typenum", 592 +] 593 + 594 +[[package]] 595 +name = "ctr" 596 +version = "0.9.2" 597 +source = "registry+https://github.com/rust-lang/crates.io-index" 598 +checksum = "0369ee1ad671834580515889b80f2ea915f23b8be8d0daa4bbaf2ac5c7590835" 599 +dependencies = [ 600 + "cipher", 601 +] 602 + 603 +[[package]] 604 +name = "curve25519-dalek" 605 +version = "4.1.2" 606 +source = "registry+https://github.com/rust-lang/crates.io-index" 607 +checksum = "0a677b8922c94e01bdbb12126b0bc852f00447528dee1782229af9c720c3f348" 608 +dependencies = [ 609 + "cfg-if", 610 + "cpufeatures", 611 + "curve25519-dalek-derive", 612 + "digest", 613 + "fiat-crypto", 614 + "platforms", 615 + "rustc_version", 616 + "serde", 617 + "subtle", 618 + "zeroize", 619 +] 620 + 621 +[[package]] 622 +name = "curve25519-dalek-derive" 623 +version = "0.1.1" 624 +source = "registry+https://github.com/rust-lang/crates.io-index" 625 +checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" 626 +dependencies = [ 627 + "proc-macro2", 628 + "quote", 629 + "syn 2.0.66", 630 +] 631 + 632 +[[package]] 633 +name = "deadpool" 634 +version = "0.10.0" 635 +source = "registry+https://github.com/rust-lang/crates.io-index" 636 +checksum = "fb84100978c1c7b37f09ed3ce3e5f843af02c2a2c431bae5b19230dad2c1b490" 637 +dependencies = [ 638 + "async-trait", 639 + "deadpool-runtime", 640 + "num_cpus", 641 + "tokio", 642 +] 643 + 644 +[[package]] 645 +name = "deadpool-runtime" 646 +version = "0.1.4" 647 +source = "registry+https://github.com/rust-lang/crates.io-index" 648 +checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" 649 +dependencies = [ 650 + "tokio", 651 +] 652 + 653 +[[package]] 654 +name = "deadpool-sqlite" 655 +version = "0.7.0" 656 +source = "registry+https://github.com/rust-lang/crates.io-index" 657 +checksum = "b8010e36e12f3be22543a5e478b4af20aeead9a700dd69581a5e050a070fc22c" 658 +dependencies = [ 659 + "deadpool", 660 + "deadpool-sync", 661 + "rusqlite", 662 +] 663 + 664 +[[package]] 665 +name = "deadpool-sync" 666 +version = "0.1.4" 667 +source = "registry+https://github.com/rust-lang/crates.io-index" 668 +checksum = "524bc3df0d57e98ecd022e21ba31166c2625e7d3e5bcc4510efaeeab4abcab04" 669 +dependencies = [ 670 + "deadpool-runtime", 671 +] 672 + 673 +[[package]] 674 +name = "delegate-display" 675 +version = "2.1.1" 676 +source = "registry+https://github.com/rust-lang/crates.io-index" 677 +checksum = "98a85201f233142ac819bbf6226e36d0b5e129a47bd325084674261c82d4cd66" 678 +dependencies = [ 679 + "macroific", 680 + "proc-macro2", 681 + "quote", 682 + "syn 2.0.66", 683 +] 684 + 685 +[[package]] 686 +name = "der" 687 +version = "0.7.9" 688 +source = "registry+https://github.com/rust-lang/crates.io-index" 689 +checksum = "f55bf8e7b65898637379c1b74eb1551107c8294ed26d855ceb9fd1a09cfc9bc0" 690 +dependencies = [ 691 + "const-oid", 692 + "der_derive", 693 + "flagset", 694 + "zeroize", 695 +] 696 + 697 +[[package]] 698 +name = "der_derive" 699 +version = "0.7.2" 700 +source = "registry+https://github.com/rust-lang/crates.io-index" 701 +checksum = "5fe87ce4529967e0ba1dcf8450bab64d97dfd5010a6256187ffe2e43e6f0e049" 702 +dependencies = [ 703 + "proc-macro2", 704 + "quote", 705 + "syn 2.0.66", 706 +] 707 + 708 +[[package]] 709 +name = "digest" 710 +version = "0.10.7" 711 +source = "registry+https://github.com/rust-lang/crates.io-index" 712 +checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 713 +dependencies = [ 714 + "block-buffer", 715 + "crypto-common", 716 + "subtle", 717 +] 718 + 719 +[[package]] 720 +name = "displaydoc" 721 +version = "0.2.4" 722 +source = "registry+https://github.com/rust-lang/crates.io-index" 723 +checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" 724 +dependencies = [ 725 + "proc-macro2", 726 + "quote", 727 + "syn 2.0.66", 728 +] 729 + 730 +[[package]] 731 +name = "ed25519" 732 +version = "2.2.3" 733 +source = "registry+https://github.com/rust-lang/crates.io-index" 734 +checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" 735 +dependencies = [ 736 + "pkcs8", 737 + "serde", 738 + "signature", 739 +] 740 + 741 +[[package]] 742 +name = "ed25519-dalek" 743 +version = "2.1.1" 744 +source = "registry+https://github.com/rust-lang/crates.io-index" 745 +checksum = "4a3daa8e81a3963a60642bcc1f90a670680bd4a77535faa384e9d1c79d620871" 746 +dependencies = [ 747 + "curve25519-dalek", 748 + "ed25519", 749 + "rand_core", 750 + "serde", 751 + "sha2", 752 + "subtle", 753 + "zeroize", 754 +] 755 + 756 +[[package]] 757 +name = "either" 758 +version = "1.12.0" 759 +source = "registry+https://github.com/rust-lang/crates.io-index" 760 +checksum = "3dca9240753cf90908d7e4aac30f630662b02aebaa1b58a3cadabdb23385b58b" 761 + 762 +[[package]] 763 +name = "encoding_rs" 764 +version = "0.8.34" 765 +source = "registry+https://github.com/rust-lang/crates.io-index" 766 +checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 767 +dependencies = [ 768 + "cfg-if", 769 +] 770 + 771 +[[package]] 772 +name = "equivalent" 773 +version = "1.0.1" 774 +source = "registry+https://github.com/rust-lang/crates.io-index" 775 +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 776 + 777 +[[package]] 778 +name = "errno" 779 +version = "0.3.9" 780 +source = "registry+https://github.com/rust-lang/crates.io-index" 781 +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" 782 +dependencies = [ 783 + "libc", 784 + "windows-sys 0.52.0", 785 +] 786 + 787 +[[package]] 788 +name = "event-listener" 789 +version = "4.0.3" 790 +source = "registry+https://github.com/rust-lang/crates.io-index" 791 +checksum = "67b215c49b2b248c855fb73579eb1f4f26c38ffdc12973e20e07b91d78d5646e" 792 +dependencies = [ 793 + "concurrent-queue", 794 + "parking", 795 + "pin-project-lite", 796 +] 797 + 798 +[[package]] 799 +name = "event-listener" 800 +version = "5.3.1" 801 +source = "registry+https://github.com/rust-lang/crates.io-index" 802 +checksum = "6032be9bd27023a771701cc49f9f053c751055f71efb2e0ae5c15809093675ba" 803 +dependencies = [ 804 + "concurrent-queue", 805 + "parking", 806 + "pin-project-lite", 807 +] 808 + 809 +[[package]] 810 +name = "event-listener-strategy" 811 +version = "0.5.2" 812 +source = "registry+https://github.com/rust-lang/crates.io-index" 813 +checksum = "0f214dc438f977e6d4e3500aaa277f5ad94ca83fbbd9b1a15713ce2344ccc5a1" 814 +dependencies = [ 815 + "event-listener 5.3.1", 816 + "pin-project-lite", 817 +] 818 + 819 +[[package]] 820 +name = "example-bot" 821 +version = "0.2.0" 822 +dependencies = [ 823 + "async-trait", 824 + "clap", 825 + "color-eyre", 826 + "matrix-sdk", 827 + "mrsbfh", 828 + "regex", 829 + "serde", 830 + "thiserror", 831 + "tokio", 832 + "tracing", 833 + "tracing-futures", 834 + "tracing-subscriber", 835 +] 836 + 837 +[[package]] 838 +name = "eyeball" 839 +version = "0.8.7" 840 +source = "registry+https://github.com/rust-lang/crates.io-index" 841 +checksum = "42482893d982111055ce4b24234d6250396d3785767c6b04cedd84612a0b80fb" 842 +dependencies = [ 843 + "futures-core", 844 + "readlock", 845 + "tracing", 846 +] 847 + 848 +[[package]] 849 +name = "eyeball-im" 850 +version = "0.4.2" 851 +source = "registry+https://github.com/rust-lang/crates.io-index" 852 +checksum = "021fab29d9670be5867b16d56a95c29a12c3c1bb654e7d589010a028716d625d" 853 +dependencies = [ 854 + "futures-core", 855 + "imbl", 856 + "tokio", 857 + "tokio-util", 858 + "tracing", 859 +] 860 + 861 +[[package]] 862 +name = "eyre" 863 +version = "0.6.12" 864 +source = "registry+https://github.com/rust-lang/crates.io-index" 865 +checksum = "7cd915d99f24784cdc19fd37ef22b97e3ff0ae756c7e492e9fbfe897d61e2aec" 866 +dependencies = [ 867 + "indenter", 868 + "once_cell", 869 +] 870 + 871 +[[package]] 872 +name = "fallible-iterator" 873 +version = "0.3.0" 874 +source = "registry+https://github.com/rust-lang/crates.io-index" 875 +checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 876 + 877 +[[package]] 878 +name = "fallible-streaming-iterator" 879 +version = "0.1.9" 880 +source = "registry+https://github.com/rust-lang/crates.io-index" 881 +checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 882 + 883 +[[package]] 884 +name = "fancy_constructor" 885 +version = "1.2.2" 886 +source = "registry+https://github.com/rust-lang/crates.io-index" 887 +checksum = "f71f317e4af73b2f8f608fac190c52eac4b1879d2145df1db2fe48881ca69435" 888 +dependencies = [ 889 + "macroific", 890 + "proc-macro2", 891 + "quote", 892 + "syn 2.0.66", 893 +] 894 + 895 +[[package]] 896 +name = "fastrand" 897 +version = "2.1.0" 898 +source = "registry+https://github.com/rust-lang/crates.io-index" 899 +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" 900 + 901 +[[package]] 902 +name = "fiat-crypto" 903 +version = "0.2.9" 904 +source = "registry+https://github.com/rust-lang/crates.io-index" 905 +checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" 906 + 907 +[[package]] 908 +name = "flagset" 909 +version = "0.4.5" 910 +source = "registry+https://github.com/rust-lang/crates.io-index" 911 +checksum = "cdeb3aa5e95cf9aabc17f060cfa0ced7b83f042390760ca53bf09df9968acaa1" 912 + 913 +[[package]] 914 +name = "fnv" 915 +version = "1.0.7" 916 +source = "registry+https://github.com/rust-lang/crates.io-index" 917 +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 918 + 919 +[[package]] 920 +name = "foreign-types" 921 +version = "0.3.2" 922 +source = "registry+https://github.com/rust-lang/crates.io-index" 923 +checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" 924 +dependencies = [ 925 + "foreign-types-shared", 926 +] 927 + 928 +[[package]] 929 +name = "foreign-types-shared" 930 +version = "0.1.1" 931 +source = "registry+https://github.com/rust-lang/crates.io-index" 932 +checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" 933 + 934 +[[package]] 935 +name = "form_urlencoded" 936 +version = "1.2.1" 937 +source = "registry+https://github.com/rust-lang/crates.io-index" 938 +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 939 +dependencies = [ 940 + "percent-encoding", 941 +] 942 + 943 +[[package]] 944 +name = "futures-channel" 945 +version = "0.3.30" 946 +source = "registry+https://github.com/rust-lang/crates.io-index" 947 +checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 948 +dependencies = [ 949 + "futures-core", 950 +] 951 + 952 +[[package]] 953 +name = "futures-core" 954 +version = "0.3.30" 955 +source = "registry+https://github.com/rust-lang/crates.io-index" 956 +checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 957 + 958 +[[package]] 959 +name = "futures-io" 960 +version = "0.3.30" 961 +source = "registry+https://github.com/rust-lang/crates.io-index" 962 +checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 963 + 964 +[[package]] 965 +name = "futures-macro" 966 +version = "0.3.30" 967 +source = "registry+https://github.com/rust-lang/crates.io-index" 968 +checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" 969 +dependencies = [ 970 + "proc-macro2", 971 + "quote", 972 + "syn 2.0.66", 973 +] 974 + 975 +[[package]] 976 +name = "futures-sink" 977 +version = "0.3.30" 978 +source = "registry+https://github.com/rust-lang/crates.io-index" 979 +checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 980 + 981 +[[package]] 982 +name = "futures-task" 983 +version = "0.3.30" 984 +source = "registry+https://github.com/rust-lang/crates.io-index" 985 +checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 986 + 987 +[[package]] 988 +name = "futures-util" 989 +version = "0.3.30" 990 +source = "registry+https://github.com/rust-lang/crates.io-index" 991 +checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 992 +dependencies = [ 993 + "futures-channel", 994 + "futures-core", 995 + "futures-io", 996 + "futures-macro", 997 + "futures-sink", 998 + "futures-task", 999 + "memchr", 1000 + "pin-project-lite", 1001 + "pin-utils", 1002 + "slab", 1003 +] 1004 + 1005 +[[package]] 1006 +name = "generic-array" 1007 +version = "0.14.7" 1008 +source = "registry+https://github.com/rust-lang/crates.io-index" 1009 +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 1010 +dependencies = [ 1011 + "typenum", 1012 + "version_check", 1013 +] 1014 + 1015 +[[package]] 1016 +name = "getopts" 1017 +version = "0.2.21" 1018 +source = "registry+https://github.com/rust-lang/crates.io-index" 1019 +checksum = "14dbbfd5c71d70241ecf9e6f13737f7b5ce823821063188d7e46c41d371eebd5" 1020 +dependencies = [ 1021 + "unicode-width", 1022 +] 1023 + 1024 +[[package]] 1025 +name = "getrandom" 1026 +version = "0.2.15" 1027 +source = "registry+https://github.com/rust-lang/crates.io-index" 1028 +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" 1029 +dependencies = [ 1030 + "cfg-if", 1031 + "js-sys", 1032 + "libc", 1033 + "wasi", 1034 + "wasm-bindgen", 1035 +] 1036 + 1037 +[[package]] 1038 +name = "gimli" 1039 +version = "0.28.1" 1040 +source = "registry+https://github.com/rust-lang/crates.io-index" 1041 +checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 1042 + 1043 +[[package]] 1044 +name = "gloo-timers" 1045 +version = "0.3.0" 1046 +source = "registry+https://github.com/rust-lang/crates.io-index" 1047 +checksum = "bbb143cf96099802033e0d4f4963b19fd2e0b728bcf076cd9cf7f6634f092994" 1048 +dependencies = [ 1049 + "futures-channel", 1050 + "futures-core", 1051 + "js-sys", 1052 + "wasm-bindgen", 1053 +] 1054 + 1055 +[[package]] 1056 +name = "gloo-utils" 1057 +version = "0.2.0" 1058 +source = "registry+https://github.com/rust-lang/crates.io-index" 1059 +checksum = "0b5555354113b18c547c1d3a98fbf7fb32a9ff4f6fa112ce823a21641a0ba3aa" 1060 +dependencies = [ 1061 + "js-sys", 1062 + "serde", 1063 + "serde_json", 1064 + "wasm-bindgen", 1065 + "web-sys", 1066 +] 1067 + 1068 +[[package]] 1069 +name = "h2" 1070 +version = "0.3.26" 1071 +source = "registry+https://github.com/rust-lang/crates.io-index" 1072 +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 1073 +dependencies = [ 1074 + "bytes", 1075 + "fnv", 1076 + "futures-core", 1077 + "futures-sink", 1078 + "futures-util", 1079 + "http", 1080 + "indexmap", 1081 + "slab", 1082 + "tokio", 1083 + "tokio-util", 1084 + "tracing", 1085 +] 1086 + 1087 +[[package]] 1088 +name = "hashbrown" 1089 +version = "0.14.5" 1090 +source = "registry+https://github.com/rust-lang/crates.io-index" 1091 +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 1092 +dependencies = [ 1093 + "ahash", 1094 + "allocator-api2", 1095 +] 1096 + 1097 +[[package]] 1098 +name = "hashlink" 1099 +version = "0.8.4" 1100 +source = "registry+https://github.com/rust-lang/crates.io-index" 1101 +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" 1102 +dependencies = [ 1103 + "hashbrown", 1104 +] 1105 + 1106 +[[package]] 1107 +name = "heck" 1108 +version = "0.5.0" 1109 +source = "registry+https://github.com/rust-lang/crates.io-index" 1110 +checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 1111 + 1112 +[[package]] 1113 +name = "hermit-abi" 1114 +version = "0.3.9" 1115 +source = "registry+https://github.com/rust-lang/crates.io-index" 1116 +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 1117 + 1118 +[[package]] 1119 +name = "hkdf" 1120 +version = "0.12.4" 1121 +source = "registry+https://github.com/rust-lang/crates.io-index" 1122 +checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7" 1123 +dependencies = [ 1124 + "hmac", 1125 +] 1126 + 1127 +[[package]] 1128 +name = "hmac" 1129 +version = "0.12.1" 1130 +source = "registry+https://github.com/rust-lang/crates.io-index" 1131 +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" 1132 +dependencies = [ 1133 + "digest", 1134 +] 1135 + 1136 +[[package]] 1137 +name = "http" 1138 +version = "0.2.12" 1139 +source = "registry+https://github.com/rust-lang/crates.io-index" 1140 +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 1141 +dependencies = [ 1142 + "bytes", 1143 + "fnv", 1144 + "itoa", 1145 +] 1146 + 1147 +[[package]] 1148 +name = "http-body" 1149 +version = "0.4.6" 1150 +source = "registry+https://github.com/rust-lang/crates.io-index" 1151 +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 1152 +dependencies = [ 1153 + "bytes", 1154 + "http", 1155 + "pin-project-lite", 1156 +] 1157 + 1158 +[[package]] 1159 +name = "httparse" 1160 +version = "1.9.2" 1161 +source = "registry+https://github.com/rust-lang/crates.io-index" 1162 +checksum = "9f3935c160d00ac752e09787e6e6bfc26494c2183cc922f1bc678a60d4733bc2" 1163 + 1164 +[[package]] 1165 +name = "httpdate" 1166 +version = "1.0.3" 1167 +source = "registry+https://github.com/rust-lang/crates.io-index" 1168 +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 1169 + 1170 +[[package]] 1171 +name = "hyper" 1172 +version = "0.14.29" 1173 +source = "registry+https://github.com/rust-lang/crates.io-index" 1174 +checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" 1175 +dependencies = [ 1176 + "bytes", 1177 + "futures-channel", 1178 + "futures-core", 1179 + "futures-util", 1180 + "h2", 1181 + "http", 1182 + "http-body", 1183 + "httparse", 1184 + "httpdate", 1185 + "itoa", 1186 + "pin-project-lite", 1187 + "socket2", 1188 + "tokio", 1189 + "tower-service", 1190 + "tracing", 1191 + "want", 1192 +] 1193 + 1194 +[[package]] 1195 +name = "hyper-rustls" 1196 +version = "0.24.2" 1197 +source = "registry+https://github.com/rust-lang/crates.io-index" 1198 +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" 1199 +dependencies = [ 1200 + "futures-util", 1201 + "http", 1202 + "hyper", 1203 + "rustls", 1204 + "tokio", 1205 + "tokio-rustls", 1206 +] 1207 + 1208 +[[package]] 1209 +name = "hyper-tls" 1210 +version = "0.5.0" 1211 +source = "registry+https://github.com/rust-lang/crates.io-index" 1212 +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" 1213 +dependencies = [ 1214 + "bytes", 1215 + "hyper", 1216 + "native-tls", 1217 + "tokio", 1218 + "tokio-native-tls", 1219 +] 1220 + 1221 +[[package]] 1222 +name = "icu_collections" 1223 +version = "1.5.0" 1224 +source = "registry+https://github.com/rust-lang/crates.io-index" 1225 +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" 1226 +dependencies = [ 1227 + "displaydoc", 1228 + "yoke", 1229 + "zerofrom", 1230 + "zerovec", 1231 +] 1232 + 1233 +[[package]] 1234 +name = "icu_locid" 1235 +version = "1.5.0" 1236 +source = "registry+https://github.com/rust-lang/crates.io-index" 1237 +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" 1238 +dependencies = [ 1239 + "displaydoc", 1240 + "litemap", 1241 + "tinystr", 1242 + "writeable", 1243 + "zerovec", 1244 +] 1245 + 1246 +[[package]] 1247 +name = "icu_locid_transform" 1248 +version = "1.5.0" 1249 +source = "registry+https://github.com/rust-lang/crates.io-index" 1250 +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" 1251 +dependencies = [ 1252 + "displaydoc", 1253 + "icu_locid", 1254 + "icu_locid_transform_data", 1255 + "icu_provider", 1256 + "tinystr", 1257 + "zerovec", 1258 +] 1259 + 1260 +[[package]] 1261 +name = "icu_locid_transform_data" 1262 +version = "1.5.0" 1263 +source = "registry+https://github.com/rust-lang/crates.io-index" 1264 +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" 1265 + 1266 +[[package]] 1267 +name = "icu_normalizer" 1268 +version = "1.5.0" 1269 +source = "registry+https://github.com/rust-lang/crates.io-index" 1270 +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" 1271 +dependencies = [ 1272 + "displaydoc", 1273 + "icu_collections", 1274 + "icu_normalizer_data", 1275 + "icu_properties", 1276 + "icu_provider", 1277 + "smallvec", 1278 + "utf16_iter", 1279 + "utf8_iter", 1280 + "write16", 1281 + "zerovec", 1282 +] 1283 + 1284 +[[package]] 1285 +name = "icu_normalizer_data" 1286 +version = "1.5.0" 1287 +source = "registry+https://github.com/rust-lang/crates.io-index" 1288 +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" 1289 + 1290 +[[package]] 1291 +name = "icu_properties" 1292 +version = "1.5.0" 1293 +source = "registry+https://github.com/rust-lang/crates.io-index" 1294 +checksum = "1f8ac670d7422d7f76b32e17a5db556510825b29ec9154f235977c9caba61036" 1295 +dependencies = [ 1296 + "displaydoc", 1297 + "icu_collections", 1298 + "icu_locid_transform", 1299 + "icu_properties_data", 1300 + "icu_provider", 1301 + "tinystr", 1302 + "zerovec", 1303 +] 1304 + 1305 +[[package]] 1306 +name = "icu_properties_data" 1307 +version = "1.5.0" 1308 +source = "registry+https://github.com/rust-lang/crates.io-index" 1309 +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" 1310 + 1311 +[[package]] 1312 +name = "icu_provider" 1313 +version = "1.5.0" 1314 +source = "registry+https://github.com/rust-lang/crates.io-index" 1315 +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" 1316 +dependencies = [ 1317 + "displaydoc", 1318 + "icu_locid", 1319 + "icu_provider_macros", 1320 + "stable_deref_trait", 1321 + "tinystr", 1322 + "writeable", 1323 + "yoke", 1324 + "zerofrom", 1325 + "zerovec", 1326 +] 1327 + 1328 +[[package]] 1329 +name = "icu_provider_macros" 1330 +version = "1.5.0" 1331 +source = "registry+https://github.com/rust-lang/crates.io-index" 1332 +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" 1333 +dependencies = [ 1334 + "proc-macro2", 1335 + "quote", 1336 + "syn 2.0.66", 1337 +] 1338 + 1339 +[[package]] 1340 +name = "idna" 1341 +version = "1.0.0" 1342 +source = "registry+https://github.com/rust-lang/crates.io-index" 1343 +checksum = "4716a3a0933a1d01c2f72450e89596eb51dd34ef3c211ccd875acdf1f8fe47ed" 1344 +dependencies = [ 1345 + "icu_normalizer", 1346 + "icu_properties", 1347 + "smallvec", 1348 + "utf8_iter", 1349 +] 1350 + 1351 +[[package]] 1352 +name = "imbl" 1353 +version = "2.0.3" 1354 +source = "registry+https://github.com/rust-lang/crates.io-index" 1355 +checksum = "978d142c8028edf52095703af2fad11d6f611af1246685725d6b850634647085" 1356 +dependencies = [ 1357 + "bitmaps", 1358 + "imbl-sized-chunks", 1359 + "rand_core", 1360 + "rand_xoshiro", 1361 + "serde", 1362 + "version_check", 1363 +] 1364 + 1365 +[[package]] 1366 +name = "imbl-sized-chunks" 1367 +version = "0.1.2" 1368 +source = "registry+https://github.com/rust-lang/crates.io-index" 1369 +checksum = "144006fb58ed787dcae3f54575ff4349755b00ccc99f4b4873860b654be1ed63" 1370 +dependencies = [ 1371 + "bitmaps", 1372 +] 1373 + 1374 +[[package]] 1375 +name = "include_dir" 1376 +version = "0.7.3" 1377 +source = "registry+https://github.com/rust-lang/crates.io-index" 1378 +checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" 1379 +dependencies = [ 1380 + "include_dir_macros", 1381 +] 1382 + 1383 +[[package]] 1384 +name = "include_dir_macros" 1385 +version = "0.7.3" 1386 +source = "registry+https://github.com/rust-lang/crates.io-index" 1387 +checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" 1388 +dependencies = [ 1389 + "proc-macro2", 1390 + "quote", 1391 +] 1392 + 1393 +[[package]] 1394 +name = "indenter" 1395 +version = "0.3.3" 1396 +source = "registry+https://github.com/rust-lang/crates.io-index" 1397 +checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 1398 + 1399 +[[package]] 1400 +name = "indexed_db_futures" 1401 +version = "0.4.1" 1402 +source = "registry+https://github.com/rust-lang/crates.io-index" 1403 +checksum = "6cc2083760572ee02385ab8b7c02c20925d2dd1f97a1a25a8737a238608f1152" 1404 +dependencies = [ 1405 + "accessory", 1406 + "cfg-if", 1407 + "delegate-display", 1408 + "fancy_constructor", 1409 + "js-sys", 1410 + "uuid", 1411 + "wasm-bindgen", 1412 + "wasm-bindgen-futures", 1413 + "web-sys", 1414 +] 1415 + 1416 +[[package]] 1417 +name = "indexmap" 1418 +version = "2.2.6" 1419 +source = "registry+https://github.com/rust-lang/crates.io-index" 1420 +checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 1421 +dependencies = [ 1422 + "equivalent", 1423 + "hashbrown", 1424 + "serde", 1425 +] 1426 + 1427 +[[package]] 1428 +name = "inout" 1429 +version = "0.1.3" 1430 +source = "registry+https://github.com/rust-lang/crates.io-index" 1431 +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" 1432 +dependencies = [ 1433 + "block-padding", 1434 + "generic-array", 1435 +] 1436 + 1437 +[[package]] 1438 +name = "instant" 1439 +version = "0.1.13" 1440 +source = "registry+https://github.com/rust-lang/crates.io-index" 1441 +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" 1442 +dependencies = [ 1443 + "cfg-if", 1444 + "js-sys", 1445 + "wasm-bindgen", 1446 + "web-sys", 1447 +] 1448 + 1449 +[[package]] 1450 +name = "ipnet" 1451 +version = "2.9.0" 1452 +source = "registry+https://github.com/rust-lang/crates.io-index" 1453 +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" 1454 + 1455 +[[package]] 1456 +name = "is_terminal_polyfill" 1457 +version = "1.70.0" 1458 +source = "registry+https://github.com/rust-lang/crates.io-index" 1459 +checksum = "f8478577c03552c21db0e2724ffb8986a5ce7af88107e6be5d2ee6e158c12800" 1460 + 1461 +[[package]] 1462 +name = "itertools" 1463 +version = "0.10.5" 1464 +source = "registry+https://github.com/rust-lang/crates.io-index" 1465 +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1466 +dependencies = [ 1467 + "either", 1468 +] 1469 + 1470 +[[package]] 1471 +name = "itertools" 1472 +version = "0.12.1" 1473 +source = "registry+https://github.com/rust-lang/crates.io-index" 1474 +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 1475 +dependencies = [ 1476 + "either", 1477 +] 1478 + 1479 +[[package]] 1480 +name = "itoa" 1481 +version = "1.0.11" 1482 +source = "registry+https://github.com/rust-lang/crates.io-index" 1483 +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 1484 + 1485 +[[package]] 1486 +name = "js-sys" 1487 +version = "0.3.69" 1488 +source = "registry+https://github.com/rust-lang/crates.io-index" 1489 +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 1490 +dependencies = [ 1491 + "wasm-bindgen", 1492 +] 1493 + 1494 +[[package]] 1495 +name = "js_int" 1496 +version = "0.2.2" 1497 +source = "registry+https://github.com/rust-lang/crates.io-index" 1498 +checksum = "d937f95470b270ce8b8950207715d71aa8e153c0d44c6684d59397ed4949160a" 1499 +dependencies = [ 1500 + "serde", 1501 +] 1502 + 1503 +[[package]] 1504 +name = "js_option" 1505 +version = "0.1.1" 1506 +source = "registry+https://github.com/rust-lang/crates.io-index" 1507 +checksum = "68421373957a1593a767013698dbf206e2b221eefe97a44d98d18672ff38423c" 1508 +dependencies = [ 1509 + "serde", 1510 +] 1511 + 1512 +[[package]] 1513 +name = "konst" 1514 +version = "0.3.9" 1515 +source = "registry+https://github.com/rust-lang/crates.io-index" 1516 +checksum = "50a0ba6de5f7af397afff922f22c149ff605c766cd3269cf6c1cd5e466dbe3b9" 1517 +dependencies = [ 1518 + "const_panic", 1519 + "konst_kernel", 1520 + "typewit", 1521 +] 1522 + 1523 +[[package]] 1524 +name = "konst_kernel" 1525 +version = "0.3.9" 1526 +source = "registry+https://github.com/rust-lang/crates.io-index" 1527 +checksum = "be0a455a1719220fd6adf756088e1c69a85bf14b6a9e24537a5cc04f503edb2b" 1528 +dependencies = [ 1529 + "typewit", 1530 +] 1531 + 1532 +[[package]] 1533 +name = "lazy_static" 1534 +version = "1.4.0" 1535 +source = "registry+https://github.com/rust-lang/crates.io-index" 1536 +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1537 + 1538 +[[package]] 1539 +name = "libc" 1540 +version = "0.2.155" 1541 +source = "registry+https://github.com/rust-lang/crates.io-index" 1542 +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" 1543 + 1544 +[[package]] 1545 +name = "libsqlite3-sys" 1546 +version = "0.27.0" 1547 +source = "registry+https://github.com/rust-lang/crates.io-index" 1548 +checksum = "cf4e226dcd58b4be396f7bd3c20da8fdee2911400705297ba7d2d7cc2c30f716" 1549 +dependencies = [ 1550 + "pkg-config", 1551 + "vcpkg", 1552 +] 1553 + 1554 +[[package]] 1555 +name = "libyml" 1556 +version = "0.0.1" 1557 +source = "registry+https://github.com/rust-lang/crates.io-index" 1558 +checksum = "1303532258de1fbe263b4daaaba0e17e3d502b8de57b7845928b92398fb4afd1" 1559 + 1560 +[[package]] 1561 +name = "linux-raw-sys" 1562 +version = "0.4.14" 1563 +source = "registry+https://github.com/rust-lang/crates.io-index" 1564 +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" 1565 + 1566 +[[package]] 1567 +name = "litemap" 1568 +version = "0.7.3" 1569 +source = "registry+https://github.com/rust-lang/crates.io-index" 1570 +checksum = "643cb0b8d4fcc284004d5fd0d67ccf61dfffadb7f75e1e71bc420f4688a3a704" 1571 + 1572 +[[package]] 1573 +name = "log" 1574 +version = "0.4.21" 1575 +source = "registry+https://github.com/rust-lang/crates.io-index" 1576 +checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 1577 + 1578 +[[package]] 1579 +name = "macroific" 1580 +version = "1.3.1" 1581 +source = "registry+https://github.com/rust-lang/crates.io-index" 1582 +checksum = "f05c00ac596022625d01047c421a0d97d7f09a18e429187b341c201cb631b9dd" 1583 +dependencies = [ 1584 + "macroific_attr_parse", 1585 + "macroific_core", 1586 + "macroific_macro", 1587 +] 1588 + 1589 +[[package]] 1590 +name = "macroific_attr_parse" 1591 +version = "1.3.0" 1592 +source = "registry+https://github.com/rust-lang/crates.io-index" 1593 +checksum = "fd94d5da95b30ae6e10621ad02340909346ad91661f3f8c0f2b62345e46a2f67" 1594 +dependencies = [ 1595 + "cfg-if", 1596 + "proc-macro2", 1597 + "quote", 1598 + "syn 2.0.66", 1599 +] 1600 + 1601 +[[package]] 1602 +name = "macroific_core" 1603 +version = "1.0.2" 1604 +source = "registry+https://github.com/rust-lang/crates.io-index" 1605 +checksum = "13198c120864097a565ccb3ff947672d969932b7975ebd4085732c9f09435e55" 1606 +dependencies = [ 1607 + "proc-macro2", 1608 + "quote", 1609 + "syn 2.0.66", 1610 +] 1611 + 1612 +[[package]] 1613 +name = "macroific_macro" 1614 +version = "1.1.0" 1615 +source = "registry+https://github.com/rust-lang/crates.io-index" 1616 +checksum = "b0c9853143cbed7f1e41dc39fee95f9b361bec65c8dc2a01bf609be01b61f5ae" 1617 +dependencies = [ 1618 + "macroific_attr_parse", 1619 + "macroific_core", 1620 + "proc-macro2", 1621 + "quote", 1622 + "syn 2.0.66", 1623 +] 1624 + 1625 +[[package]] 1626 +name = "maplit" 1627 +version = "1.0.2" 1628 +source = "registry+https://github.com/rust-lang/crates.io-index" 1629 +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" 1630 + 1631 +[[package]] 1632 +name = "matrix-pickle" 1633 +version = "0.1.1" 1634 +source = "registry+https://github.com/rust-lang/crates.io-index" 1635 +checksum = "d7fd26463ce5d86b8d9bb9c4142d453198ba22fb91bd46d3c9f144ae699d821d" 1636 +dependencies = [ 1637 + "matrix-pickle-derive", 1638 + "thiserror", 1639 +] 1640 + 1641 +[[package]] 1642 +name = "matrix-pickle-derive" 1643 +version = "0.1.1" 1644 +source = "registry+https://github.com/rust-lang/crates.io-index" 1645 +checksum = "93779aa78d39c2fe34746287b10a866192cf8af1b81767fff76bd64099acc0f5" 1646 +dependencies = [ 1647 + "proc-macro-crate 2.0.2", 1648 + "proc-macro-error", 1649 + "proc-macro2", 1650 + "quote", 1651 + "syn 2.0.66", 1652 +] 1653 + 1654 +[[package]] 1655 +name = "matrix-sdk" 1656 +version = "0.7.1" 1657 +source = "registry+https://github.com/rust-lang/crates.io-index" 1658 +checksum = "336687e5fc8b33661a31681e988a67e9a3090c7fb1a8323a7f71eeaabad642ec" 1659 +dependencies = [ 1660 + "anymap2", 1661 + "aquamarine", 1662 + "as_variant", 1663 + "async-channel", 1664 + "async-stream", 1665 + "async-trait", 1666 + "backoff", 1667 + "bytes", 1668 + "bytesize", 1669 + "cfg-vis", 1670 + "event-listener 4.0.3", 1671 + "eyeball", 1672 + "eyeball-im", 1673 + "futures-core", 1674 + "futures-util", 1675 + "gloo-timers", 1676 + "http", 1677 + "imbl", 1678 + "indexmap", 1679 + "matrix-sdk-base", 1680 + "matrix-sdk-common", 1681 + "matrix-sdk-indexeddb", 1682 + "matrix-sdk-sqlite", 1683 + "mime", 1684 + "mime2ext", 1685 + "reqwest", 1686 + "ruma", 1687 + "serde", 1688 + "serde_html_form", 1689 + "serde_json", 1690 + "tempfile", 1691 + "thiserror", 1692 + "tokio", 1693 + "tokio-stream", 1694 + "tokio-util", 1695 + "tracing", 1696 + "url", 1697 + "urlencoding", 1698 + "zeroize", 1699 +] 1700 + 1701 +[[package]] 1702 +name = "matrix-sdk-base" 1703 +version = "0.7.0" 1704 +source = "registry+https://github.com/rust-lang/crates.io-index" 1705 +checksum = "00891954d0826a94f1d130f46cbca64176003a234c1be5d9d282970d31cf0c87" 1706 +dependencies = [ 1707 + "as_variant", 1708 + "async-trait", 1709 + "bitflags 2.5.0", 1710 + "eyeball", 1711 + "eyeball-im", 1712 + "futures-util", 1713 + "matrix-sdk-common", 1714 + "matrix-sdk-crypto", 1715 + "matrix-sdk-store-encryption", 1716 + "once_cell", 1717 + "ruma", 1718 + "serde", 1719 + "serde_json", 1720 + "thiserror", 1721 + "tokio", 1722 + "tracing", 1723 +] 1724 + 1725 +[[package]] 1726 +name = "matrix-sdk-common" 1727 +version = "0.7.0" 1728 +source = "registry+https://github.com/rust-lang/crates.io-index" 1729 +checksum = "bb365a626ab6f6c6a2422cfe2565522f19accb06706c6d04bca8f0f71df29c9f" 1730 +dependencies = [ 1731 + "async-trait", 1732 + "futures-core", 1733 + "futures-util", 1734 + "gloo-timers", 1735 + "instant", 1736 + "ruma", 1737 + "serde", 1738 + "serde_json", 1739 + "thiserror", 1740 + "tokio", 1741 + "tracing", 1742 + "tracing-subscriber", 1743 + "wasm-bindgen", 1744 + "wasm-bindgen-futures", 1745 + "web-sys", 1746 +] 1747 + 1748 +[[package]] 1749 +name = "matrix-sdk-crypto" 1750 +version = "0.7.1" 1751 +source = "registry+https://github.com/rust-lang/crates.io-index" 1752 +checksum = "f69cfc1741fece1d920f0ce56632f14103c7d15f5d95482626d318d3907da81c" 1753 +dependencies = [ 1754 + "aes", 1755 + "as_variant", 1756 + "async-trait", 1757 + "bs58", 1758 + "byteorder", 1759 + "cbc", 1760 + "cfg-if", 1761 + "ctr", 1762 + "eyeball", 1763 + "futures-core", 1764 + "futures-util", 1765 + "hkdf", 1766 + "hmac", 1767 + "itertools 0.12.1", 1768 + "matrix-sdk-common", 1769 + "pbkdf2", 1770 + "rand", 1771 + "rmp-serde", 1772 + "ruma", 1773 + "serde", 1774 + "serde_json", 1775 + "sha2", 1776 + "subtle", 1777 + "thiserror", 1778 + "tokio", 1779 + "tokio-stream", 1780 + "tracing", 1781 + "ulid", 1782 + "vodozemac", 1783 + "zeroize", 1784 +] 1785 + 1786 +[[package]] 1787 +name = "matrix-sdk-indexeddb" 1788 +version = "0.7.0" 1789 +source = "registry+https://github.com/rust-lang/crates.io-index" 1790 +checksum = "ad388005c5d4ed2ff38f405d52aa7fa606f4e1ab51baf5f2504721124ed4a58b" 1791 +dependencies = [ 1792 + "anyhow", 1793 + "async-trait", 1794 + "base64", 1795 + "getrandom", 1796 + "gloo-utils", 1797 + "indexed_db_futures", 1798 + "js-sys", 1799 + "matrix-sdk-base", 1800 + "matrix-sdk-crypto", 1801 + "matrix-sdk-store-encryption", 1802 + "ruma", 1803 + "serde", 1804 + "serde-wasm-bindgen", 1805 + "serde_json", 1806 + "thiserror", 1807 + "tokio", 1808 + "tracing", 1809 + "wasm-bindgen", 1810 + "web-sys", 1811 +] 1812 + 1813 +[[package]] 1814 +name = "matrix-sdk-sqlite" 1815 +version = "0.7.0" 1816 +source = "registry+https://github.com/rust-lang/crates.io-index" 1817 +checksum = "20bd36bc5fa7ecd93516b242ba27466196d52b4a8743d85dd883a67bd6db11dc" 1818 +dependencies = [ 1819 + "async-trait", 1820 + "deadpool-sqlite", 1821 + "itertools 0.12.1", 1822 + "matrix-sdk-base", 1823 + "matrix-sdk-crypto", 1824 + "matrix-sdk-store-encryption", 1825 + "rmp-serde", 1826 + "ruma", 1827 + "rusqlite", 1828 + "serde", 1829 + "serde_json", 1830 + "thiserror", 1831 + "tokio", 1832 + "tracing", 1833 + "vodozemac", 1834 +] 1835 + 1836 +[[package]] 1837 +name = "matrix-sdk-store-encryption" 1838 +version = "0.7.0" 1839 +source = "registry+https://github.com/rust-lang/crates.io-index" 1840 +checksum = "6a7e3162e9f982a4c57ab46df01a4775f697dec8899738bf62d7e97b63faa61c" 1841 +dependencies = [ 1842 + "blake3", 1843 + "chacha20poly1305", 1844 + "displaydoc", 1845 + "getrandom", 1846 + "hmac", 1847 + "pbkdf2", 1848 + "rand", 1849 + "rmp-serde", 1850 + "serde", 1851 + "serde_json", 1852 + "sha2", 1853 + "thiserror", 1854 + "zeroize", 1855 +] 1856 + 1857 +[[package]] 1858 +name = "memchr" 1859 +version = "2.7.2" 1860 +source = "registry+https://github.com/rust-lang/crates.io-index" 1861 +checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 1862 + 1863 +[[package]] 1864 +name = "mime" 1865 +version = "0.3.17" 1866 +source = "registry+https://github.com/rust-lang/crates.io-index" 1867 +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1868 + 1869 +[[package]] 1870 +name = "mime2ext" 1871 +version = "0.1.52" 1872 +source = "registry+https://github.com/rust-lang/crates.io-index" 1873 +checksum = "a1a85a5069ebd40e64b1985773cc81addbe9d90d7ecf60e7b5475a57ad584c70" 1874 + 1875 +[[package]] 1876 +name = "miniz_oxide" 1877 +version = "0.7.3" 1878 +source = "registry+https://github.com/rust-lang/crates.io-index" 1879 +checksum = "87dfd01fe195c66b572b37921ad8803d010623c0aca821bea2302239d155cdae" 1880 +dependencies = [ 1881 + "adler", 1882 +] 1883 + 1884 +[[package]] 1885 +name = "mio" 1886 +version = "0.8.11" 1887 +source = "registry+https://github.com/rust-lang/crates.io-index" 1888 +checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 1889 +dependencies = [ 1890 + "libc", 1891 + "wasi", 1892 + "windows-sys 0.48.0", 1893 +] 1894 + 1895 +[[package]] 1896 +name = "mrsbfh" 1897 +version = "0.4.1" 1898 +dependencies = [ 1899 + "lazy_static", 1900 + "matrix-sdk", 1901 + "mrsbfh-macros", 1902 + "pulldown-cmark", 1903 + "regex", 1904 + "serde", 1905 + "serde_json", 1906 + "serde_yml", 1907 + "thiserror", 1908 + "tokio", 1909 + "tracing", 1910 + "url", 1911 +] 1912 + 1913 +[[package]] 1914 +name = "mrsbfh-macros" 1915 +version = "0.4.1" 1916 +dependencies = [ 1917 + "convert_case", 1918 + "proc-macro2", 1919 + "quote", 1920 + "syn 2.0.66", 1921 +] 1922 + 1923 +[[package]] 1924 +name = "native-tls" 1925 +version = "0.2.12" 1926 +source = "registry+https://github.com/rust-lang/crates.io-index" 1927 +checksum = "a8614eb2c83d59d1c8cc974dd3f920198647674a0a035e1af1fa58707e317466" 1928 +dependencies = [ 1929 + "libc", 1930 + "log", 1931 + "openssl", 1932 + "openssl-probe", 1933 + "openssl-sys", 1934 + "schannel", 1935 + "security-framework", 1936 + "security-framework-sys", 1937 + "tempfile", 1938 +] 1939 + 1940 +[[package]] 1941 +name = "nu-ansi-term" 1942 +version = "0.46.0" 1943 +source = "registry+https://github.com/rust-lang/crates.io-index" 1944 +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1945 +dependencies = [ 1946 + "overload", 1947 + "winapi", 1948 +] 1949 + 1950 +[[package]] 1951 +name = "num-traits" 1952 +version = "0.2.19" 1953 +source = "registry+https://github.com/rust-lang/crates.io-index" 1954 +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1955 +dependencies = [ 1956 + "autocfg", 1957 +] 1958 + 1959 +[[package]] 1960 +name = "num_cpus" 1961 +version = "1.16.0" 1962 +source = "registry+https://github.com/rust-lang/crates.io-index" 1963 +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1964 +dependencies = [ 1965 + "hermit-abi", 1966 + "libc", 1967 +] 1968 + 1969 +[[package]] 1970 +name = "object" 1971 +version = "0.32.2" 1972 +source = "registry+https://github.com/rust-lang/crates.io-index" 1973 +checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 1974 +dependencies = [ 1975 + "memchr", 1976 +] 1977 + 1978 +[[package]] 1979 +name = "once_cell" 1980 +version = "1.19.0" 1981 +source = "registry+https://github.com/rust-lang/crates.io-index" 1982 +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1983 + 1984 +[[package]] 1985 +name = "opaque-debug" 1986 +version = "0.3.1" 1987 +source = "registry+https://github.com/rust-lang/crates.io-index" 1988 +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" 1989 + 1990 +[[package]] 1991 +name = "openssl" 1992 +version = "0.10.64" 1993 +source = "registry+https://github.com/rust-lang/crates.io-index" 1994 +checksum = "95a0481286a310808298130d22dd1fef0fa571e05a8f44ec801801e84b216b1f" 1995 +dependencies = [ 1996 + "bitflags 2.5.0", 1997 + "cfg-if", 1998 + "foreign-types", 1999 + "libc", 2000 + "once_cell", 2001 + "openssl-macros", 2002 + "openssl-sys", 2003 +] 2004 + 2005 +[[package]] 2006 +name = "openssl-macros" 2007 +version = "0.1.1" 2008 +source = "registry+https://github.com/rust-lang/crates.io-index" 2009 +checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" 2010 +dependencies = [ 2011 + "proc-macro2", 2012 + "quote", 2013 + "syn 2.0.66", 2014 +] 2015 + 2016 +[[package]] 2017 +name = "openssl-probe" 2018 +version = "0.1.5" 2019 +source = "registry+https://github.com/rust-lang/crates.io-index" 2020 +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" 2021 + 2022 +[[package]] 2023 +name = "openssl-sys" 2024 +version = "0.9.102" 2025 +source = "registry+https://github.com/rust-lang/crates.io-index" 2026 +checksum = "c597637d56fbc83893a35eb0dd04b2b8e7a50c91e64e9493e398b5df4fb45fa2" 2027 +dependencies = [ 2028 + "cc", 2029 + "libc", 2030 + "pkg-config", 2031 + "vcpkg", 2032 +] 2033 + 2034 +[[package]] 2035 +name = "overload" 2036 +version = "0.1.1" 2037 +source = "registry+https://github.com/rust-lang/crates.io-index" 2038 +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 2039 + 2040 +[[package]] 2041 +name = "owo-colors" 2042 +version = "3.5.0" 2043 +source = "registry+https://github.com/rust-lang/crates.io-index" 2044 +checksum = "c1b04fb49957986fdce4d6ee7a65027d55d4b6d2265e5848bbb507b58ccfdb6f" 2045 + 2046 +[[package]] 2047 +name = "parking" 2048 +version = "2.2.0" 2049 +source = "registry+https://github.com/rust-lang/crates.io-index" 2050 +checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" 2051 + 2052 +[[package]] 2053 +name = "paste" 2054 +version = "1.0.15" 2055 +source = "registry+https://github.com/rust-lang/crates.io-index" 2056 +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" 2057 + 2058 +[[package]] 2059 +name = "pbkdf2" 2060 +version = "0.12.2" 2061 +source = "registry+https://github.com/rust-lang/crates.io-index" 2062 +checksum = "f8ed6a7761f76e3b9f92dfb0a60a6a6477c61024b775147ff0973a02653abaf2" 2063 +dependencies = [ 2064 + "digest", 2065 + "hmac", 2066 +] 2067 + 2068 +[[package]] 2069 +name = "percent-encoding" 2070 +version = "2.3.1" 2071 +source = "registry+https://github.com/rust-lang/crates.io-index" 2072 +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 2073 + 2074 +[[package]] 2075 +name = "pin-project" 2076 +version = "1.1.5" 2077 +source = "registry+https://github.com/rust-lang/crates.io-index" 2078 +checksum = "b6bf43b791c5b9e34c3d182969b4abb522f9343702850a2e57f460d00d09b4b3" 2079 +dependencies = [ 2080 + "pin-project-internal", 2081 +] 2082 + 2083 +[[package]] 2084 +name = "pin-project-internal" 2085 +version = "1.1.5" 2086 +source = "registry+https://github.com/rust-lang/crates.io-index" 2087 +checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" 2088 +dependencies = [ 2089 + "proc-macro2", 2090 + "quote", 2091 + "syn 2.0.66", 2092 +] 2093 + 2094 +[[package]] 2095 +name = "pin-project-lite" 2096 +version = "0.2.14" 2097 +source = "registry+https://github.com/rust-lang/crates.io-index" 2098 +checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 2099 + 2100 +[[package]] 2101 +name = "pin-utils" 2102 +version = "0.1.0" 2103 +source = "registry+https://github.com/rust-lang/crates.io-index" 2104 +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 2105 + 2106 +[[package]] 2107 +name = "pkcs7" 2108 +version = "0.4.1" 2109 +source = "registry+https://github.com/rust-lang/crates.io-index" 2110 +checksum = "d79178be066405e0602bf3035946edef6b11b3f9dde46dfe5f8bfd7dea4b77e7" 2111 +dependencies = [ 2112 + "der", 2113 + "spki", 2114 + "x509-cert", 2115 +] 2116 + 2117 +[[package]] 2118 +name = "pkcs8" 2119 +version = "0.10.2" 2120 +source = "registry+https://github.com/rust-lang/crates.io-index" 2121 +checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" 2122 +dependencies = [ 2123 + "der", 2124 + "spki", 2125 +] 2126 + 2127 +[[package]] 2128 +name = "pkg-config" 2129 +version = "0.3.30" 2130 +source = "registry+https://github.com/rust-lang/crates.io-index" 2131 +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 2132 + 2133 +[[package]] 2134 +name = "platforms" 2135 +version = "3.4.0" 2136 +source = "registry+https://github.com/rust-lang/crates.io-index" 2137 +checksum = "db23d408679286588f4d4644f965003d056e3dd5abcaaa938116871d7ce2fee7" 2138 + 2139 +[[package]] 2140 +name = "poly1305" 2141 +version = "0.8.0" 2142 +source = "registry+https://github.com/rust-lang/crates.io-index" 2143 +checksum = "8159bd90725d2df49889a078b54f4f79e87f1f8a8444194cdca81d38f5393abf" 2144 +dependencies = [ 2145 + "cpufeatures", 2146 + "opaque-debug", 2147 + "universal-hash", 2148 +] 2149 + 2150 +[[package]] 2151 +name = "ppv-lite86" 2152 +version = "0.2.17" 2153 +source = "registry+https://github.com/rust-lang/crates.io-index" 2154 +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 2155 + 2156 +[[package]] 2157 +name = "proc-macro-crate" 2158 +version = "1.3.1" 2159 +source = "registry+https://github.com/rust-lang/crates.io-index" 2160 +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" 2161 +dependencies = [ 2162 + "once_cell", 2163 + "toml_edit 0.19.15", 2164 +] 2165 + 2166 +[[package]] 2167 +name = "proc-macro-crate" 2168 +version = "2.0.2" 2169 +source = "registry+https://github.com/rust-lang/crates.io-index" 2170 +checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" 2171 +dependencies = [ 2172 + "toml_datetime", 2173 + "toml_edit 0.20.2", 2174 +] 2175 + 2176 +[[package]] 2177 +name = "proc-macro-error" 2178 +version = "1.0.4" 2179 +source = "registry+https://github.com/rust-lang/crates.io-index" 2180 +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 2181 +dependencies = [ 2182 + "proc-macro-error-attr", 2183 + "proc-macro2", 2184 + "quote", 2185 + "syn 1.0.109", 2186 + "version_check", 2187 +] 2188 + 2189 +[[package]] 2190 +name = "proc-macro-error-attr" 2191 +version = "1.0.4" 2192 +source = "registry+https://github.com/rust-lang/crates.io-index" 2193 +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 2194 +dependencies = [ 2195 + "proc-macro2", 2196 + "quote", 2197 + "version_check", 2198 +] 2199 + 2200 +[[package]] 2201 +name = "proc-macro2" 2202 +version = "1.0.85" 2203 +source = "registry+https://github.com/rust-lang/crates.io-index" 2204 +checksum = "22244ce15aa966053a896d1accb3a6e68469b97c7f33f284b99f0d576879fc23" 2205 +dependencies = [ 2206 + "unicode-ident", 2207 +] 2208 + 2209 +[[package]] 2210 +name = "prost" 2211 +version = "0.12.6" 2212 +source = "registry+https://github.com/rust-lang/crates.io-index" 2213 +checksum = "deb1435c188b76130da55f17a466d252ff7b1418b2ad3e037d127b94e3411f29" 2214 +dependencies = [ 2215 + "bytes", 2216 + "prost-derive", 2217 +] 2218 + 2219 +[[package]] 2220 +name = "prost-derive" 2221 +version = "0.12.6" 2222 +source = "registry+https://github.com/rust-lang/crates.io-index" 2223 +checksum = "81bddcdb20abf9501610992b6759a4c888aef7d1a7247ef75e2404275ac24af1" 2224 +dependencies = [ 2225 + "anyhow", 2226 + "itertools 0.12.1", 2227 + "proc-macro2", 2228 + "quote", 2229 + "syn 2.0.66", 2230 +] 2231 + 2232 +[[package]] 2233 +name = "pulldown-cmark" 2234 +version = "0.11.0" 2235 +source = "registry+https://github.com/rust-lang/crates.io-index" 2236 +checksum = "8746739f11d39ce5ad5c2520a9b75285310dbfe78c541ccf832d38615765aec0" 2237 +dependencies = [ 2238 + "bitflags 2.5.0", 2239 + "getopts", 2240 + "memchr", 2241 + "pulldown-cmark-escape", 2242 + "unicase", 2243 +] 2244 + 2245 +[[package]] 2246 +name = "pulldown-cmark-escape" 2247 +version = "0.11.0" 2248 +source = "registry+https://github.com/rust-lang/crates.io-index" 2249 +checksum = "007d8adb5ddab6f8e3f491ac63566a7d5002cc7ed73901f72057943fa71ae1ae" 2250 + 2251 +[[package]] 2252 +name = "quote" 2253 +version = "1.0.36" 2254 +source = "registry+https://github.com/rust-lang/crates.io-index" 2255 +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 2256 +dependencies = [ 2257 + "proc-macro2", 2258 +] 2259 + 2260 +[[package]] 2261 +name = "rand" 2262 +version = "0.8.5" 2263 +source = "registry+https://github.com/rust-lang/crates.io-index" 2264 +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2265 +dependencies = [ 2266 + "libc", 2267 + "rand_chacha", 2268 + "rand_core", 2269 +] 2270 + 2271 +[[package]] 2272 +name = "rand_chacha" 2273 +version = "0.3.1" 2274 +source = "registry+https://github.com/rust-lang/crates.io-index" 2275 +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2276 +dependencies = [ 2277 + "ppv-lite86", 2278 + "rand_core", 2279 +] 2280 + 2281 +[[package]] 2282 +name = "rand_core" 2283 +version = "0.6.4" 2284 +source = "registry+https://github.com/rust-lang/crates.io-index" 2285 +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2286 +dependencies = [ 2287 + "getrandom", 2288 +] 2289 + 2290 +[[package]] 2291 +name = "rand_xoshiro" 2292 +version = "0.6.0" 2293 +source = "registry+https://github.com/rust-lang/crates.io-index" 2294 +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" 2295 +dependencies = [ 2296 + "rand_core", 2297 +] 2298 + 2299 +[[package]] 2300 +name = "readlock" 2301 +version = "0.1.7" 2302 +source = "registry+https://github.com/rust-lang/crates.io-index" 2303 +checksum = "d7b323e7196daa571c8584de958be19e92941c41f845776fe06babfe8fa280a2" 2304 + 2305 +[[package]] 2306 +name = "regex" 2307 +version = "1.10.5" 2308 +source = "registry+https://github.com/rust-lang/crates.io-index" 2309 +checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" 2310 +dependencies = [ 2311 + "aho-corasick", 2312 + "memchr", 2313 + "regex-automata", 2314 + "regex-syntax", 2315 +] 2316 + 2317 +[[package]] 2318 +name = "regex-automata" 2319 +version = "0.4.7" 2320 +source = "registry+https://github.com/rust-lang/crates.io-index" 2321 +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" 2322 +dependencies = [ 2323 + "aho-corasick", 2324 + "memchr", 2325 + "regex-syntax", 2326 +] 2327 + 2328 +[[package]] 2329 +name = "regex-syntax" 2330 +version = "0.8.4" 2331 +source = "registry+https://github.com/rust-lang/crates.io-index" 2332 +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" 2333 + 2334 +[[package]] 2335 +name = "reqwest" 2336 +version = "0.11.27" 2337 +source = "registry+https://github.com/rust-lang/crates.io-index" 2338 +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" 2339 +dependencies = [ 2340 + "base64", 2341 + "bytes", 2342 + "encoding_rs", 2343 + "futures-core", 2344 + "futures-util", 2345 + "h2", 2346 + "http", 2347 + "http-body", 2348 + "hyper", 2349 + "hyper-rustls", 2350 + "hyper-tls", 2351 + "ipnet", 2352 + "js-sys", 2353 + "log", 2354 + "mime", 2355 + "native-tls", 2356 + "once_cell", 2357 + "percent-encoding", 2358 + "pin-project-lite", 2359 + "rustls", 2360 + "rustls-pemfile", 2361 + "serde", 2362 + "serde_json", 2363 + "serde_urlencoded", 2364 + "sync_wrapper", 2365 + "system-configuration", 2366 + "tokio", 2367 + "tokio-native-tls", 2368 + "tokio-rustls", 2369 + "tokio-util", 2370 + "tower-service", 2371 + "url", 2372 + "wasm-bindgen", 2373 + "wasm-bindgen-futures", 2374 + "wasm-streams", 2375 + "web-sys", 2376 + "webpki-roots", 2377 + "winreg", 2378 +] 2379 + 2380 +[[package]] 2381 +name = "ring" 2382 +version = "0.17.8" 2383 +source = "registry+https://github.com/rust-lang/crates.io-index" 2384 +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 2385 +dependencies = [ 2386 + "cc", 2387 + "cfg-if", 2388 + "getrandom", 2389 + "libc", 2390 + "spin", 2391 + "untrusted", 2392 + "windows-sys 0.52.0", 2393 +] 2394 + 2395 +[[package]] 2396 +name = "rmp" 2397 +version = "0.8.14" 2398 +source = "registry+https://github.com/rust-lang/crates.io-index" 2399 +checksum = "228ed7c16fa39782c3b3468e974aec2795e9089153cd08ee2e9aefb3613334c4" 2400 +dependencies = [ 2401 + "byteorder", 2402 + "num-traits", 2403 + "paste", 2404 +] 2405 + 2406 +[[package]] 2407 +name = "rmp-serde" 2408 +version = "1.3.0" 2409 +source = "registry+https://github.com/rust-lang/crates.io-index" 2410 +checksum = "52e599a477cf9840e92f2cde9a7189e67b42c57532749bf90aea6ec10facd4db" 2411 +dependencies = [ 2412 + "byteorder", 2413 + "rmp", 2414 + "serde", 2415 +] 2416 + 2417 +[[package]] 2418 +name = "ruma" 2419 +version = "0.9.4" 2420 +source = "registry+https://github.com/rust-lang/crates.io-index" 2421 +checksum = "2779c38df072964c63476259d9300efb07d0d1a7178c6469893636ce0c547a36" 2422 +dependencies = [ 2423 + "assign", 2424 + "js_int", 2425 + "js_option", 2426 + "ruma-client-api", 2427 + "ruma-common", 2428 + "ruma-events", 2429 + "ruma-federation-api", 2430 +] 2431 + 2432 +[[package]] 2433 +name = "ruma-client-api" 2434 +version = "0.17.4" 2435 +source = "registry+https://github.com/rust-lang/crates.io-index" 2436 +checksum = "641837258fa214a70823477514954ef0f5d3bc6ae8e1d5d85081856a33103386" 2437 +dependencies = [ 2438 + "assign", 2439 + "bytes", 2440 + "http", 2441 + "js_int", 2442 + "js_option", 2443 + "maplit", 2444 + "ruma-common", 2445 + "ruma-events", 2446 + "serde", 2447 + "serde_html_form", 2448 + "serde_json", 2449 +] 2450 + 2451 +[[package]] 2452 +name = "ruma-common" 2453 +version = "0.12.1" 2454 +source = "registry+https://github.com/rust-lang/crates.io-index" 2455 +checksum = "3bca4c33c50e47b4cdceeac71bdef0c04153b0e29aa992d9030ec14a62323e85" 2456 +dependencies = [ 2457 + "as_variant", 2458 + "base64", 2459 + "bytes", 2460 + "form_urlencoded", 2461 + "getrandom", 2462 + "http", 2463 + "indexmap", 2464 + "js-sys", 2465 + "js_int", 2466 + "konst", 2467 + "percent-encoding", 2468 + "rand", 2469 + "regex", 2470 + "ruma-identifiers-validation", 2471 + "ruma-macros", 2472 + "serde", 2473 + "serde_html_form", 2474 + "serde_json", 2475 + "thiserror", 2476 + "tracing", 2477 + "url", 2478 + "uuid", 2479 + "wildmatch", 2480 +] 2481 + 2482 +[[package]] 2483 +name = "ruma-events" 2484 +version = "0.27.11" 2485 +source = "registry+https://github.com/rust-lang/crates.io-index" 2486 +checksum = "d20a52770e5a9fb30b7a1c14ba8b3dcf76dadc01674e58e40094f78e6bd5e3f1" 2487 +dependencies = [ 2488 + "as_variant", 2489 + "indexmap", 2490 + "js_int", 2491 + "js_option", 2492 + "percent-encoding", 2493 + "regex", 2494 + "ruma-common", 2495 + "ruma-identifiers-validation", 2496 + "ruma-macros", 2497 + "serde", 2498 + "serde_json", 2499 + "thiserror", 2500 + "tracing", 2501 + "url", 2502 + "wildmatch", 2503 +] 2504 + 2505 +[[package]] 2506 +name = "ruma-federation-api" 2507 +version = "0.8.0" 2508 +source = "registry+https://github.com/rust-lang/crates.io-index" 2509 +checksum = "e1901c1f27bc327652d58af2a130c73acef3198abeccd24cee97f7267fdf3fe7" 2510 +dependencies = [ 2511 + "js_int", 2512 + "ruma-common", 2513 + "ruma-events", 2514 + "serde", 2515 + "serde_json", 2516 +] 2517 + 2518 +[[package]] 2519 +name = "ruma-identifiers-validation" 2520 +version = "0.9.5" 2521 +source = "registry+https://github.com/rust-lang/crates.io-index" 2522 +checksum = "9fa38974f5901ed4e00e10aec57b9ad3b4d6d6c1a1ae683c51b88700b9f4ffba" 2523 +dependencies = [ 2524 + "js_int", 2525 + "thiserror", 2526 +] 2527 + 2528 +[[package]] 2529 +name = "ruma-macros" 2530 +version = "0.12.0" 2531 +source = "registry+https://github.com/rust-lang/crates.io-index" 2532 +checksum = "0280534a4b3e34416f883285fac4f9c408cd0b737890ae66f3e7a7056d14be80" 2533 +dependencies = [ 2534 + "once_cell", 2535 + "proc-macro-crate 2.0.2", 2536 + "proc-macro2", 2537 + "quote", 2538 + "ruma-identifiers-validation", 2539 + "serde", 2540 + "syn 2.0.66", 2541 + "toml", 2542 +] 2543 + 2544 +[[package]] 2545 +name = "rusqlite" 2546 +version = "0.30.0" 2547 +source = "registry+https://github.com/rust-lang/crates.io-index" 2548 +checksum = "a78046161564f5e7cd9008aff3b2990b3850dc8e0349119b98e8f251e099f24d" 2549 +dependencies = [ 2550 + "bitflags 2.5.0", 2551 + "fallible-iterator", 2552 + "fallible-streaming-iterator", 2553 + "hashlink", 2554 + "libsqlite3-sys", 2555 + "smallvec", 2556 +] 2557 + 2558 +[[package]] 2559 +name = "rustc-demangle" 2560 +version = "0.1.24" 2561 +source = "registry+https://github.com/rust-lang/crates.io-index" 2562 +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 2563 + 2564 +[[package]] 2565 +name = "rustc_version" 2566 +version = "0.4.0" 2567 +source = "registry+https://github.com/rust-lang/crates.io-index" 2568 +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 2569 +dependencies = [ 2570 + "semver", 2571 +] 2572 + 2573 +[[package]] 2574 +name = "rustix" 2575 +version = "0.38.34" 2576 +source = "registry+https://github.com/rust-lang/crates.io-index" 2577 +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" 2578 +dependencies = [ 2579 + "bitflags 2.5.0", 2580 + "errno", 2581 + "libc", 2582 + "linux-raw-sys", 2583 + "windows-sys 0.52.0", 2584 +] 2585 + 2586 +[[package]] 2587 +name = "rustls" 2588 +version = "0.21.12" 2589 +source = "registry+https://github.com/rust-lang/crates.io-index" 2590 +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" 2591 +dependencies = [ 2592 + "log", 2593 + "ring", 2594 + "rustls-webpki", 2595 + "sct", 2596 +] 2597 + 2598 +[[package]] 2599 +name = "rustls-pemfile" 2600 +version = "1.0.4" 2601 +source = "registry+https://github.com/rust-lang/crates.io-index" 2602 +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 2603 +dependencies = [ 2604 + "base64", 2605 +] 2606 + 2607 +[[package]] 2608 +name = "rustls-webpki" 2609 +version = "0.101.7" 2610 +source = "registry+https://github.com/rust-lang/crates.io-index" 2611 +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" 2612 +dependencies = [ 2613 + "ring", 2614 + "untrusted", 2615 +] 2616 + 2617 +[[package]] 2618 +name = "ryu" 2619 +version = "1.0.18" 2620 +source = "registry+https://github.com/rust-lang/crates.io-index" 2621 +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" 2622 + 2623 +[[package]] 2624 +name = "schannel" 2625 +version = "0.1.23" 2626 +source = "registry+https://github.com/rust-lang/crates.io-index" 2627 +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" 2628 +dependencies = [ 2629 + "windows-sys 0.52.0", 2630 +] 2631 + 2632 +[[package]] 2633 +name = "sct" 2634 +version = "0.7.1" 2635 +source = "registry+https://github.com/rust-lang/crates.io-index" 2636 +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" 2637 +dependencies = [ 2638 + "ring", 2639 + "untrusted", 2640 +] 2641 + 2642 +[[package]] 2643 +name = "security-framework" 2644 +version = "2.11.0" 2645 +source = "registry+https://github.com/rust-lang/crates.io-index" 2646 +checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" 2647 +dependencies = [ 2648 + "bitflags 2.5.0", 2649 + "core-foundation", 2650 + "core-foundation-sys", 2651 + "libc", 2652 + "security-framework-sys", 2653 +] 2654 + 2655 +[[package]] 2656 +name = "security-framework-sys" 2657 +version = "2.11.0" 2658 +source = "registry+https://github.com/rust-lang/crates.io-index" 2659 +checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" 2660 +dependencies = [ 2661 + "core-foundation-sys", 2662 + "libc", 2663 +] 2664 + 2665 +[[package]] 2666 +name = "semver" 2667 +version = "1.0.23" 2668 +source = "registry+https://github.com/rust-lang/crates.io-index" 2669 +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" 2670 + 2671 +[[package]] 2672 +name = "serde" 2673 +version = "1.0.203" 2674 +source = "registry+https://github.com/rust-lang/crates.io-index" 2675 +checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" 2676 +dependencies = [ 2677 + "serde_derive", 2678 +] 2679 + 2680 +[[package]] 2681 +name = "serde-wasm-bindgen" 2682 +version = "0.6.5" 2683 +source = "registry+https://github.com/rust-lang/crates.io-index" 2684 +checksum = "8302e169f0eddcc139c70f139d19d6467353af16f9fce27e8c30158036a1e16b" 2685 +dependencies = [ 2686 + "js-sys", 2687 + "serde", 2688 + "wasm-bindgen", 2689 +] 2690 + 2691 +[[package]] 2692 +name = "serde_bytes" 2693 +version = "0.11.14" 2694 +source = "registry+https://github.com/rust-lang/crates.io-index" 2695 +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" 2696 +dependencies = [ 2697 + "serde", 2698 +] 2699 + 2700 +[[package]] 2701 +name = "serde_derive" 2702 +version = "1.0.203" 2703 +source = "registry+https://github.com/rust-lang/crates.io-index" 2704 +checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" 2705 +dependencies = [ 2706 + "proc-macro2", 2707 + "quote", 2708 + "syn 2.0.66", 2709 +] 2710 + 2711 +[[package]] 2712 +name = "serde_html_form" 2713 +version = "0.2.6" 2714 +source = "registry+https://github.com/rust-lang/crates.io-index" 2715 +checksum = "8de514ef58196f1fc96dcaef80fe6170a1ce6215df9687a93fe8300e773fefc5" 2716 +dependencies = [ 2717 + "form_urlencoded", 2718 + "indexmap", 2719 + "itoa", 2720 + "ryu", 2721 + "serde", 2722 +] 2723 + 2724 +[[package]] 2725 +name = "serde_json" 2726 +version = "1.0.117" 2727 +source = "registry+https://github.com/rust-lang/crates.io-index" 2728 +checksum = "455182ea6142b14f93f4bc5320a2b31c1f266b66a4a5c858b013302a5d8cbfc3" 2729 +dependencies = [ 2730 + "itoa", 2731 + "ryu", 2732 + "serde", 2733 +] 2734 + 2735 +[[package]] 2736 +name = "serde_spanned" 2737 +version = "0.6.6" 2738 +source = "registry+https://github.com/rust-lang/crates.io-index" 2739 +checksum = "79e674e01f999af37c49f70a6ede167a8a60b2503e56c5599532a65baa5969a0" 2740 +dependencies = [ 2741 + "serde", 2742 +] 2743 + 2744 +[[package]] 2745 +name = "serde_urlencoded" 2746 +version = "0.7.1" 2747 +source = "registry+https://github.com/rust-lang/crates.io-index" 2748 +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2749 +dependencies = [ 2750 + "form_urlencoded", 2751 + "itoa", 2752 + "ryu", 2753 + "serde", 2754 +] 2755 + 2756 +[[package]] 2757 +name = "serde_yml" 2758 +version = "0.0.7" 2759 +source = "registry+https://github.com/rust-lang/crates.io-index" 2760 +checksum = "c83ad088d28e2f6640b8e6b7d64bbca3cafb7a0442fe53673ac9a8b1f5fe621b" 2761 +dependencies = [ 2762 + "indexmap", 2763 + "itoa", 2764 + "libyml", 2765 + "log", 2766 + "memchr", 2767 + "ryu", 2768 + "serde", 2769 + "serde_json", 2770 +] 2771 + 2772 +[[package]] 2773 +name = "sha2" 2774 +version = "0.10.8" 2775 +source = "registry+https://github.com/rust-lang/crates.io-index" 2776 +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 2777 +dependencies = [ 2778 + "cfg-if", 2779 + "cpufeatures", 2780 + "digest", 2781 +] 2782 + 2783 +[[package]] 2784 +name = "sharded-slab" 2785 +version = "0.1.7" 2786 +source = "registry+https://github.com/rust-lang/crates.io-index" 2787 +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2788 +dependencies = [ 2789 + "lazy_static", 2790 +] 2791 + 2792 +[[package]] 2793 +name = "signature" 2794 +version = "2.2.0" 2795 +source = "registry+https://github.com/rust-lang/crates.io-index" 2796 +checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" 2797 +dependencies = [ 2798 + "rand_core", 2799 +] 2800 + 2801 +[[package]] 2802 +name = "slab" 2803 +version = "0.4.9" 2804 +source = "registry+https://github.com/rust-lang/crates.io-index" 2805 +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2806 +dependencies = [ 2807 + "autocfg", 2808 +] 2809 + 2810 +[[package]] 2811 +name = "smallvec" 2812 +version = "1.13.2" 2813 +source = "registry+https://github.com/rust-lang/crates.io-index" 2814 +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2815 + 2816 +[[package]] 2817 +name = "socket2" 2818 +version = "0.5.7" 2819 +source = "registry+https://github.com/rust-lang/crates.io-index" 2820 +checksum = "ce305eb0b4296696835b71df73eb912e0f1ffd2556a501fcede6e0c50349191c" 2821 +dependencies = [ 2822 + "libc", 2823 + "windows-sys 0.52.0", 2824 +] 2825 + 2826 +[[package]] 2827 +name = "spin" 2828 +version = "0.9.8" 2829 +source = "registry+https://github.com/rust-lang/crates.io-index" 2830 +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2831 + 2832 +[[package]] 2833 +name = "spki" 2834 +version = "0.7.3" 2835 +source = "registry+https://github.com/rust-lang/crates.io-index" 2836 +checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" 2837 +dependencies = [ 2838 + "base64ct", 2839 + "der", 2840 +] 2841 + 2842 +[[package]] 2843 +name = "stable_deref_trait" 2844 +version = "1.2.0" 2845 +source = "registry+https://github.com/rust-lang/crates.io-index" 2846 +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" 2847 + 2848 +[[package]] 2849 +name = "strsim" 2850 +version = "0.11.1" 2851 +source = "registry+https://github.com/rust-lang/crates.io-index" 2852 +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2853 + 2854 +[[package]] 2855 +name = "subtle" 2856 +version = "2.5.0" 2857 +source = "registry+https://github.com/rust-lang/crates.io-index" 2858 +checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" 2859 + 2860 +[[package]] 2861 +name = "syn" 2862 +version = "1.0.109" 2863 +source = "registry+https://github.com/rust-lang/crates.io-index" 2864 +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2865 +dependencies = [ 2866 + "proc-macro2", 2867 + "quote", 2868 + "unicode-ident", 2869 +] 2870 + 2871 +[[package]] 2872 +name = "syn" 2873 +version = "2.0.66" 2874 +source = "registry+https://github.com/rust-lang/crates.io-index" 2875 +checksum = "c42f3f41a2de00b01c0aaad383c5a45241efc8b2d1eda5661812fda5f3cdcff5" 2876 +dependencies = [ 2877 + "proc-macro2", 2878 + "quote", 2879 + "unicode-ident", 2880 +] 2881 + 2882 +[[package]] 2883 +name = "sync_wrapper" 2884 +version = "0.1.2" 2885 +source = "registry+https://github.com/rust-lang/crates.io-index" 2886 +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 2887 + 2888 +[[package]] 2889 +name = "synstructure" 2890 +version = "0.13.1" 2891 +source = "registry+https://github.com/rust-lang/crates.io-index" 2892 +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" 2893 +dependencies = [ 2894 + "proc-macro2", 2895 + "quote", 2896 + "syn 2.0.66", 2897 +] 2898 + 2899 +[[package]] 2900 +name = "system-configuration" 2901 +version = "0.5.1" 2902 +source = "registry+https://github.com/rust-lang/crates.io-index" 2903 +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" 2904 +dependencies = [ 2905 + "bitflags 1.3.2", 2906 + "core-foundation", 2907 + "system-configuration-sys", 2908 +] 2909 + 2910 +[[package]] 2911 +name = "system-configuration-sys" 2912 +version = "0.5.0" 2913 +source = "registry+https://github.com/rust-lang/crates.io-index" 2914 +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" 2915 +dependencies = [ 2916 + "core-foundation-sys", 2917 + "libc", 2918 +] 2919 + 2920 +[[package]] 2921 +name = "tempfile" 2922 +version = "3.10.1" 2923 +source = "registry+https://github.com/rust-lang/crates.io-index" 2924 +checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" 2925 +dependencies = [ 2926 + "cfg-if", 2927 + "fastrand", 2928 + "rustix", 2929 + "windows-sys 0.52.0", 2930 +] 2931 + 2932 +[[package]] 2933 +name = "thiserror" 2934 +version = "1.0.61" 2935 +source = "registry+https://github.com/rust-lang/crates.io-index" 2936 +checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" 2937 +dependencies = [ 2938 + "thiserror-impl", 2939 +] 2940 + 2941 +[[package]] 2942 +name = "thiserror-impl" 2943 +version = "1.0.61" 2944 +source = "registry+https://github.com/rust-lang/crates.io-index" 2945 +checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" 2946 +dependencies = [ 2947 + "proc-macro2", 2948 + "quote", 2949 + "syn 2.0.66", 2950 +] 2951 + 2952 +[[package]] 2953 +name = "thread_local" 2954 +version = "1.1.8" 2955 +source = "registry+https://github.com/rust-lang/crates.io-index" 2956 +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 2957 +dependencies = [ 2958 + "cfg-if", 2959 + "once_cell", 2960 +] 2961 + 2962 +[[package]] 2963 +name = "tinystr" 2964 +version = "0.7.6" 2965 +source = "registry+https://github.com/rust-lang/crates.io-index" 2966 +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" 2967 +dependencies = [ 2968 + "displaydoc", 2969 + "zerovec", 2970 +] 2971 + 2972 +[[package]] 2973 +name = "tinyvec" 2974 +version = "1.6.0" 2975 +source = "registry+https://github.com/rust-lang/crates.io-index" 2976 +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2977 +dependencies = [ 2978 + "tinyvec_macros", 2979 +] 2980 + 2981 +[[package]] 2982 +name = "tinyvec_macros" 2983 +version = "0.1.1" 2984 +source = "registry+https://github.com/rust-lang/crates.io-index" 2985 +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2986 + 2987 +[[package]] 2988 +name = "tokio" 2989 +version = "1.38.0" 2990 +source = "registry+https://github.com/rust-lang/crates.io-index" 2991 +checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" 2992 +dependencies = [ 2993 + "backtrace", 2994 + "bytes", 2995 + "libc", 2996 + "mio", 2997 + "num_cpus", 2998 + "pin-project-lite", 2999 + "socket2", 3000 + "tokio-macros", 3001 + "windows-sys 0.48.0", 3002 +] 3003 + 3004 +[[package]] 3005 +name = "tokio-macros" 3006 +version = "2.3.0" 3007 +source = "registry+https://github.com/rust-lang/crates.io-index" 3008 +checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" 3009 +dependencies = [ 3010 + "proc-macro2", 3011 + "quote", 3012 + "syn 2.0.66", 3013 +] 3014 + 3015 +[[package]] 3016 +name = "tokio-native-tls" 3017 +version = "0.3.1" 3018 +source = "registry+https://github.com/rust-lang/crates.io-index" 3019 +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" 3020 +dependencies = [ 3021 + "native-tls", 3022 + "tokio", 3023 +] 3024 + 3025 +[[package]] 3026 +name = "tokio-rustls" 3027 +version = "0.24.1" 3028 +source = "registry+https://github.com/rust-lang/crates.io-index" 3029 +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" 3030 +dependencies = [ 3031 + "rustls", 3032 + "tokio", 3033 +] 3034 + 3035 +[[package]] 3036 +name = "tokio-stream" 3037 +version = "0.1.15" 3038 +source = "registry+https://github.com/rust-lang/crates.io-index" 3039 +checksum = "267ac89e0bec6e691e5813911606935d77c476ff49024f98abcea3e7b15e37af" 3040 +dependencies = [ 3041 + "futures-core", 3042 + "pin-project-lite", 3043 + "tokio", 3044 + "tokio-util", 3045 +] 3046 + 3047 +[[package]] 3048 +name = "tokio-util" 3049 +version = "0.7.11" 3050 +source = "registry+https://github.com/rust-lang/crates.io-index" 3051 +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" 3052 +dependencies = [ 3053 + "bytes", 3054 + "futures-core", 3055 + "futures-sink", 3056 + "pin-project-lite", 3057 + "tokio", 3058 +] 3059 + 3060 +[[package]] 3061 +name = "toml" 3062 +version = "0.8.2" 3063 +source = "registry+https://github.com/rust-lang/crates.io-index" 3064 +checksum = "185d8ab0dfbb35cf1399a6344d8484209c088f75f8f68230da55d48d95d43e3d" 3065 +dependencies = [ 3066 + "serde", 3067 + "serde_spanned", 3068 + "toml_datetime", 3069 + "toml_edit 0.20.2", 3070 +] 3071 + 3072 +[[package]] 3073 +name = "toml_datetime" 3074 +version = "0.6.3" 3075 +source = "registry+https://github.com/rust-lang/crates.io-index" 3076 +checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" 3077 +dependencies = [ 3078 + "serde", 3079 +] 3080 + 3081 +[[package]] 3082 +name = "toml_edit" 3083 +version = "0.19.15" 3084 +source = "registry+https://github.com/rust-lang/crates.io-index" 3085 +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" 3086 +dependencies = [ 3087 + "indexmap", 3088 + "toml_datetime", 3089 + "winnow", 3090 +] 3091 + 3092 +[[package]] 3093 +name = "toml_edit" 3094 +version = "0.20.2" 3095 +source = "registry+https://github.com/rust-lang/crates.io-index" 3096 +checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" 3097 +dependencies = [ 3098 + "indexmap", 3099 + "serde", 3100 + "serde_spanned", 3101 + "toml_datetime", 3102 + "winnow", 3103 +] 3104 + 3105 +[[package]] 3106 +name = "tower-service" 3107 +version = "0.3.2" 3108 +source = "registry+https://github.com/rust-lang/crates.io-index" 3109 +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 3110 + 3111 +[[package]] 3112 +name = "tracing" 3113 +version = "0.1.40" 3114 +source = "registry+https://github.com/rust-lang/crates.io-index" 3115 +checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 3116 +dependencies = [ 3117 + "pin-project-lite", 3118 + "tracing-attributes", 3119 + "tracing-core", 3120 +] 3121 + 3122 +[[package]] 3123 +name = "tracing-attributes" 3124 +version = "0.1.27" 3125 +source = "registry+https://github.com/rust-lang/crates.io-index" 3126 +checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" 3127 +dependencies = [ 3128 + "proc-macro2", 3129 + "quote", 3130 + "syn 2.0.66", 3131 +] 3132 + 3133 +[[package]] 3134 +name = "tracing-core" 3135 +version = "0.1.32" 3136 +source = "registry+https://github.com/rust-lang/crates.io-index" 3137 +checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 3138 +dependencies = [ 3139 + "once_cell", 3140 + "valuable", 3141 +] 3142 + 3143 +[[package]] 3144 +name = "tracing-error" 3145 +version = "0.2.0" 3146 +source = "registry+https://github.com/rust-lang/crates.io-index" 3147 +checksum = "d686ec1c0f384b1277f097b2f279a2ecc11afe8c133c1aabf036a27cb4cd206e" 3148 +dependencies = [ 3149 + "tracing", 3150 + "tracing-subscriber", 3151 +] 3152 + 3153 +[[package]] 3154 +name = "tracing-futures" 3155 +version = "0.2.5" 3156 +source = "registry+https://github.com/rust-lang/crates.io-index" 3157 +checksum = "97d095ae15e245a057c8e8451bab9b3ee1e1f68e9ba2b4fbc18d0ac5237835f2" 3158 +dependencies = [ 3159 + "pin-project", 3160 + "tracing", 3161 +] 3162 + 3163 +[[package]] 3164 +name = "tracing-log" 3165 +version = "0.2.0" 3166 +source = "registry+https://github.com/rust-lang/crates.io-index" 3167 +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 3168 +dependencies = [ 3169 + "log", 3170 + "once_cell", 3171 + "tracing-core", 3172 +] 3173 + 3174 +[[package]] 3175 +name = "tracing-subscriber" 3176 +version = "0.3.18" 3177 +source = "registry+https://github.com/rust-lang/crates.io-index" 3178 +checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" 3179 +dependencies = [ 3180 + "nu-ansi-term", 3181 + "sharded-slab", 3182 + "smallvec", 3183 + "thread_local", 3184 + "tracing-core", 3185 + "tracing-log", 3186 +] 3187 + 3188 +[[package]] 3189 +name = "try-lock" 3190 +version = "0.2.5" 3191 +source = "registry+https://github.com/rust-lang/crates.io-index" 3192 +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 3193 + 3194 +[[package]] 3195 +name = "typenum" 3196 +version = "1.17.0" 3197 +source = "registry+https://github.com/rust-lang/crates.io-index" 3198 +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 3199 + 3200 +[[package]] 3201 +name = "typewit" 3202 +version = "1.9.0" 3203 +source = "registry+https://github.com/rust-lang/crates.io-index" 3204 +checksum = "c6fb9ae6a3cafaf0a5d14c2302ca525f9ae8e07a0f0e6949de88d882c37a6e24" 3205 +dependencies = [ 3206 + "typewit_proc_macros", 3207 +] 3208 + 3209 +[[package]] 3210 +name = "typewit_proc_macros" 3211 +version = "1.8.1" 3212 +source = "registry+https://github.com/rust-lang/crates.io-index" 3213 +checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" 3214 + 3215 +[[package]] 3216 +name = "ulid" 3217 +version = "1.1.2" 3218 +source = "registry+https://github.com/rust-lang/crates.io-index" 3219 +checksum = "34778c17965aa2a08913b57e1f34db9b4a63f5de31768b55bf20d2795f921259" 3220 +dependencies = [ 3221 + "getrandom", 3222 + "rand", 3223 + "web-time", 3224 +] 3225 + 3226 +[[package]] 3227 +name = "unicase" 3228 +version = "2.7.0" 3229 +source = "registry+https://github.com/rust-lang/crates.io-index" 3230 +checksum = "f7d2d4dafb69621809a81864c9c1b864479e1235c0dd4e199924b9742439ed89" 3231 +dependencies = [ 3232 + "version_check", 3233 +] 3234 + 3235 +[[package]] 3236 +name = "unicode-ident" 3237 +version = "1.0.12" 3238 +source = "registry+https://github.com/rust-lang/crates.io-index" 3239 +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 3240 + 3241 +[[package]] 3242 +name = "unicode-segmentation" 3243 +version = "1.11.0" 3244 +source = "registry+https://github.com/rust-lang/crates.io-index" 3245 +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" 3246 + 3247 +[[package]] 3248 +name = "unicode-width" 3249 +version = "0.1.13" 3250 +source = "registry+https://github.com/rust-lang/crates.io-index" 3251 +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" 3252 + 3253 +[[package]] 3254 +name = "universal-hash" 3255 +version = "0.5.1" 3256 +source = "registry+https://github.com/rust-lang/crates.io-index" 3257 +checksum = "fc1de2c688dc15305988b563c3854064043356019f97a4b46276fe734c4f07ea" 3258 +dependencies = [ 3259 + "crypto-common", 3260 + "subtle", 3261 +] 3262 + 3263 +[[package]] 3264 +name = "untrusted" 3265 +version = "0.9.0" 3266 +source = "registry+https://github.com/rust-lang/crates.io-index" 3267 +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 3268 + 3269 +[[package]] 3270 +name = "url" 3271 +version = "2.5.1" 3272 +source = "registry+https://github.com/rust-lang/crates.io-index" 3273 +checksum = "f7c25da092f0a868cdf09e8674cd3b7ef3a7d92a24253e663a2fb85e2496de56" 3274 +dependencies = [ 3275 + "form_urlencoded", 3276 + "idna", 3277 + "percent-encoding", 3278 +] 3279 + 3280 +[[package]] 3281 +name = "urlencoding" 3282 +version = "2.1.3" 3283 +source = "registry+https://github.com/rust-lang/crates.io-index" 3284 +checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" 3285 + 3286 +[[package]] 3287 +name = "utf16_iter" 3288 +version = "1.0.5" 3289 +source = "registry+https://github.com/rust-lang/crates.io-index" 3290 +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" 3291 + 3292 +[[package]] 3293 +name = "utf8_iter" 3294 +version = "1.0.4" 3295 +source = "registry+https://github.com/rust-lang/crates.io-index" 3296 +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" 3297 + 3298 +[[package]] 3299 +name = "utf8parse" 3300 +version = "0.2.2" 3301 +source = "registry+https://github.com/rust-lang/crates.io-index" 3302 +checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 3303 + 3304 +[[package]] 3305 +name = "uuid" 3306 +version = "1.6.1" 3307 +source = "registry+https://github.com/rust-lang/crates.io-index" 3308 +checksum = "5e395fcf16a7a3d8127ec99782007af141946b4795001f876d54fb0d55978560" 3309 +dependencies = [ 3310 + "getrandom", 3311 + "wasm-bindgen", 3312 +] 3313 + 3314 +[[package]] 3315 +name = "valuable" 3316 +version = "0.1.0" 3317 +source = "registry+https://github.com/rust-lang/crates.io-index" 3318 +checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 3319 + 3320 +[[package]] 3321 +name = "vcpkg" 3322 +version = "0.2.15" 3323 +source = "registry+https://github.com/rust-lang/crates.io-index" 3324 +checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3325 + 3326 +[[package]] 3327 +name = "version_check" 3328 +version = "0.9.4" 3329 +source = "registry+https://github.com/rust-lang/crates.io-index" 3330 +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 3331 + 3332 +[[package]] 3333 +name = "vodozemac" 3334 +version = "0.5.1" 3335 +source = "registry+https://github.com/rust-lang/crates.io-index" 3336 +checksum = "2790dffeecc522299d72d9a855c43adb0c23ba1dc1112d79a651fdf3beb2a356" 3337 +dependencies = [ 3338 + "aes", 3339 + "arrayvec", 3340 + "base64", 3341 + "cbc", 3342 + "curve25519-dalek", 3343 + "ed25519-dalek", 3344 + "getrandom", 3345 + "hkdf", 3346 + "hmac", 3347 + "matrix-pickle", 3348 + "pkcs7", 3349 + "prost", 3350 + "rand", 3351 + "serde", 3352 + "serde_bytes", 3353 + "serde_json", 3354 + "sha2", 3355 + "subtle", 3356 + "thiserror", 3357 + "x25519-dalek", 3358 + "zeroize", 3359 +] 3360 + 3361 +[[package]] 3362 +name = "want" 3363 +version = "0.3.1" 3364 +source = "registry+https://github.com/rust-lang/crates.io-index" 3365 +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 3366 +dependencies = [ 3367 + "try-lock", 3368 +] 3369 + 3370 +[[package]] 3371 +name = "wasi" 3372 +version = "0.11.0+wasi-snapshot-preview1" 3373 +source = "registry+https://github.com/rust-lang/crates.io-index" 3374 +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3375 + 3376 +[[package]] 3377 +name = "wasm-bindgen" 3378 +version = "0.2.92" 3379 +source = "registry+https://github.com/rust-lang/crates.io-index" 3380 +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 3381 +dependencies = [ 3382 + "cfg-if", 3383 + "wasm-bindgen-macro", 3384 +] 3385 + 3386 +[[package]] 3387 +name = "wasm-bindgen-backend" 3388 +version = "0.2.92" 3389 +source = "registry+https://github.com/rust-lang/crates.io-index" 3390 +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 3391 +dependencies = [ 3392 + "bumpalo", 3393 + "log", 3394 + "once_cell", 3395 + "proc-macro2", 3396 + "quote", 3397 + "syn 2.0.66", 3398 + "wasm-bindgen-shared", 3399 +] 3400 + 3401 +[[package]] 3402 +name = "wasm-bindgen-futures" 3403 +version = "0.4.42" 3404 +source = "registry+https://github.com/rust-lang/crates.io-index" 3405 +checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" 3406 +dependencies = [ 3407 + "cfg-if", 3408 + "js-sys", 3409 + "wasm-bindgen", 3410 + "web-sys", 3411 +] 3412 + 3413 +[[package]] 3414 +name = "wasm-bindgen-macro" 3415 +version = "0.2.92" 3416 +source = "registry+https://github.com/rust-lang/crates.io-index" 3417 +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 3418 +dependencies = [ 3419 + "quote", 3420 + "wasm-bindgen-macro-support", 3421 +] 3422 + 3423 +[[package]] 3424 +name = "wasm-bindgen-macro-support" 3425 +version = "0.2.92" 3426 +source = "registry+https://github.com/rust-lang/crates.io-index" 3427 +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 3428 +dependencies = [ 3429 + "proc-macro2", 3430 + "quote", 3431 + "syn 2.0.66", 3432 + "wasm-bindgen-backend", 3433 + "wasm-bindgen-shared", 3434 +] 3435 + 3436 +[[package]] 3437 +name = "wasm-bindgen-shared" 3438 +version = "0.2.92" 3439 +source = "registry+https://github.com/rust-lang/crates.io-index" 3440 +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 3441 + 3442 +[[package]] 3443 +name = "wasm-streams" 3444 +version = "0.4.0" 3445 +source = "registry+https://github.com/rust-lang/crates.io-index" 3446 +checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" 3447 +dependencies = [ 3448 + "futures-util", 3449 + "js-sys", 3450 + "wasm-bindgen", 3451 + "wasm-bindgen-futures", 3452 + "web-sys", 3453 +] 3454 + 3455 +[[package]] 3456 +name = "web-sys" 3457 +version = "0.3.69" 3458 +source = "registry+https://github.com/rust-lang/crates.io-index" 3459 +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" 3460 +dependencies = [ 3461 + "js-sys", 3462 + "wasm-bindgen", 3463 +] 3464 + 3465 +[[package]] 3466 +name = "web-time" 3467 +version = "1.1.0" 3468 +source = "registry+https://github.com/rust-lang/crates.io-index" 3469 +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" 3470 +dependencies = [ 3471 + "js-sys", 3472 + "wasm-bindgen", 3473 +] 3474 + 3475 +[[package]] 3476 +name = "webpki-roots" 3477 +version = "0.25.4" 3478 +source = "registry+https://github.com/rust-lang/crates.io-index" 3479 +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" 3480 + 3481 +[[package]] 3482 +name = "wildmatch" 3483 +version = "2.3.4" 3484 +source = "registry+https://github.com/rust-lang/crates.io-index" 3485 +checksum = "3928939971918220fed093266b809d1ee4ec6c1a2d72692ff6876898f3b16c19" 3486 + 3487 +[[package]] 3488 +name = "winapi" 3489 +version = "0.3.9" 3490 +source = "registry+https://github.com/rust-lang/crates.io-index" 3491 +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3492 +dependencies = [ 3493 + "winapi-i686-pc-windows-gnu", 3494 + "winapi-x86_64-pc-windows-gnu", 3495 +] 3496 + 3497 +[[package]] 3498 +name = "winapi-i686-pc-windows-gnu" 3499 +version = "0.4.0" 3500 +source = "registry+https://github.com/rust-lang/crates.io-index" 3501 +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3502 + 3503 +[[package]] 3504 +name = "winapi-x86_64-pc-windows-gnu" 3505 +version = "0.4.0" 3506 +source = "registry+https://github.com/rust-lang/crates.io-index" 3507 +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3508 + 3509 +[[package]] 3510 +name = "windows-sys" 3511 +version = "0.48.0" 3512 +source = "registry+https://github.com/rust-lang/crates.io-index" 3513 +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3514 +dependencies = [ 3515 + "windows-targets 0.48.5", 3516 +] 3517 + 3518 +[[package]] 3519 +name = "windows-sys" 3520 +version = "0.52.0" 3521 +source = "registry+https://github.com/rust-lang/crates.io-index" 3522 +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 3523 +dependencies = [ 3524 + "windows-targets 0.52.5", 3525 +] 3526 + 3527 +[[package]] 3528 +name = "windows-targets" 3529 +version = "0.48.5" 3530 +source = "registry+https://github.com/rust-lang/crates.io-index" 3531 +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 3532 +dependencies = [ 3533 + "windows_aarch64_gnullvm 0.48.5", 3534 + "windows_aarch64_msvc 0.48.5", 3535 + "windows_i686_gnu 0.48.5", 3536 + "windows_i686_msvc 0.48.5", 3537 + "windows_x86_64_gnu 0.48.5", 3538 + "windows_x86_64_gnullvm 0.48.5", 3539 + "windows_x86_64_msvc 0.48.5", 3540 +] 3541 + 3542 +[[package]] 3543 +name = "windows-targets" 3544 +version = "0.52.5" 3545 +source = "registry+https://github.com/rust-lang/crates.io-index" 3546 +checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 3547 +dependencies = [ 3548 + "windows_aarch64_gnullvm 0.52.5", 3549 + "windows_aarch64_msvc 0.52.5", 3550 + "windows_i686_gnu 0.52.5", 3551 + "windows_i686_gnullvm", 3552 + "windows_i686_msvc 0.52.5", 3553 + "windows_x86_64_gnu 0.52.5", 3554 + "windows_x86_64_gnullvm 0.52.5", 3555 + "windows_x86_64_msvc 0.52.5", 3556 +] 3557 + 3558 +[[package]] 3559 +name = "windows_aarch64_gnullvm" 3560 +version = "0.48.5" 3561 +source = "registry+https://github.com/rust-lang/crates.io-index" 3562 +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 3563 + 3564 +[[package]] 3565 +name = "windows_aarch64_gnullvm" 3566 +version = "0.52.5" 3567 +source = "registry+https://github.com/rust-lang/crates.io-index" 3568 +checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 3569 + 3570 +[[package]] 3571 +name = "windows_aarch64_msvc" 3572 +version = "0.48.5" 3573 +source = "registry+https://github.com/rust-lang/crates.io-index" 3574 +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 3575 + 3576 +[[package]] 3577 +name = "windows_aarch64_msvc" 3578 +version = "0.52.5" 3579 +source = "registry+https://github.com/rust-lang/crates.io-index" 3580 +checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 3581 + 3582 +[[package]] 3583 +name = "windows_i686_gnu" 3584 +version = "0.48.5" 3585 +source = "registry+https://github.com/rust-lang/crates.io-index" 3586 +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 3587 + 3588 +[[package]] 3589 +name = "windows_i686_gnu" 3590 +version = "0.52.5" 3591 +source = "registry+https://github.com/rust-lang/crates.io-index" 3592 +checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 3593 + 3594 +[[package]] 3595 +name = "windows_i686_gnullvm" 3596 +version = "0.52.5" 3597 +source = "registry+https://github.com/rust-lang/crates.io-index" 3598 +checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 3599 + 3600 +[[package]] 3601 +name = "windows_i686_msvc" 3602 +version = "0.48.5" 3603 +source = "registry+https://github.com/rust-lang/crates.io-index" 3604 +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 3605 + 3606 +[[package]] 3607 +name = "windows_i686_msvc" 3608 +version = "0.52.5" 3609 +source = "registry+https://github.com/rust-lang/crates.io-index" 3610 +checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 3611 + 3612 +[[package]] 3613 +name = "windows_x86_64_gnu" 3614 +version = "0.48.5" 3615 +source = "registry+https://github.com/rust-lang/crates.io-index" 3616 +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 3617 + 3618 +[[package]] 3619 +name = "windows_x86_64_gnu" 3620 +version = "0.52.5" 3621 +source = "registry+https://github.com/rust-lang/crates.io-index" 3622 +checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 3623 + 3624 +[[package]] 3625 +name = "windows_x86_64_gnullvm" 3626 +version = "0.48.5" 3627 +source = "registry+https://github.com/rust-lang/crates.io-index" 3628 +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3629 + 3630 +[[package]] 3631 +name = "windows_x86_64_gnullvm" 3632 +version = "0.52.5" 3633 +source = "registry+https://github.com/rust-lang/crates.io-index" 3634 +checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 3635 + 3636 +[[package]] 3637 +name = "windows_x86_64_msvc" 3638 +version = "0.48.5" 3639 +source = "registry+https://github.com/rust-lang/crates.io-index" 3640 +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 3641 + 3642 +[[package]] 3643 +name = "windows_x86_64_msvc" 3644 +version = "0.52.5" 3645 +source = "registry+https://github.com/rust-lang/crates.io-index" 3646 +checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 3647 + 3648 +[[package]] 3649 +name = "winnow" 3650 +version = "0.5.40" 3651 +source = "registry+https://github.com/rust-lang/crates.io-index" 3652 +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" 3653 +dependencies = [ 3654 + "memchr", 3655 +] 3656 + 3657 +[[package]] 3658 +name = "winreg" 3659 +version = "0.50.0" 3660 +source = "registry+https://github.com/rust-lang/crates.io-index" 3661 +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 3662 +dependencies = [ 3663 + "cfg-if", 3664 + "windows-sys 0.48.0", 3665 +] 3666 + 3667 +[[package]] 3668 +name = "write16" 3669 +version = "1.0.0" 3670 +source = "registry+https://github.com/rust-lang/crates.io-index" 3671 +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" 3672 + 3673 +[[package]] 3674 +name = "writeable" 3675 +version = "0.5.5" 3676 +source = "registry+https://github.com/rust-lang/crates.io-index" 3677 +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" 3678 + 3679 +[[package]] 3680 +name = "x25519-dalek" 3681 +version = "2.0.1" 3682 +source = "registry+https://github.com/rust-lang/crates.io-index" 3683 +checksum = "c7e468321c81fb07fa7f4c636c3972b9100f0346e5b6a9f2bd0603a52f7ed277" 3684 +dependencies = [ 3685 + "curve25519-dalek", 3686 + "rand_core", 3687 + "serde", 3688 + "zeroize", 3689 +] 3690 + 3691 +[[package]] 3692 +name = "x509-cert" 3693 +version = "0.2.5" 3694 +source = "registry+https://github.com/rust-lang/crates.io-index" 3695 +checksum = "1301e935010a701ae5f8655edc0ad17c44bad3ac5ce8c39185f75453b720ae94" 3696 +dependencies = [ 3697 + "const-oid", 3698 + "der", 3699 + "spki", 3700 +] 3701 + 3702 +[[package]] 3703 +name = "yoke" 3704 +version = "0.7.4" 3705 +source = "registry+https://github.com/rust-lang/crates.io-index" 3706 +checksum = "6c5b1314b079b0930c31e3af543d8ee1757b1951ae1e1565ec704403a7240ca5" 3707 +dependencies = [ 3708 + "serde", 3709 + "stable_deref_trait", 3710 + "yoke-derive", 3711 + "zerofrom", 3712 +] 3713 + 3714 +[[package]] 3715 +name = "yoke-derive" 3716 +version = "0.7.4" 3717 +source = "registry+https://github.com/rust-lang/crates.io-index" 3718 +checksum = "28cc31741b18cb6f1d5ff12f5b7523e3d6eb0852bbbad19d73905511d9849b95" 3719 +dependencies = [ 3720 + "proc-macro2", 3721 + "quote", 3722 + "syn 2.0.66", 3723 + "synstructure", 3724 +] 3725 + 3726 +[[package]] 3727 +name = "zerocopy" 3728 +version = "0.7.34" 3729 +source = "registry+https://github.com/rust-lang/crates.io-index" 3730 +checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" 3731 +dependencies = [ 3732 + "zerocopy-derive", 3733 +] 3734 + 3735 +[[package]] 3736 +name = "zerocopy-derive" 3737 +version = "0.7.34" 3738 +source = "registry+https://github.com/rust-lang/crates.io-index" 3739 +checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" 3740 +dependencies = [ 3741 + "proc-macro2", 3742 + "quote", 3743 + "syn 2.0.66", 3744 +] 3745 + 3746 +[[package]] 3747 +name = "zerofrom" 3748 +version = "0.1.4" 3749 +source = "registry+https://github.com/rust-lang/crates.io-index" 3750 +checksum = "91ec111ce797d0e0784a1116d0ddcdbea84322cd79e5d5ad173daeba4f93ab55" 3751 +dependencies = [ 3752 + "zerofrom-derive", 3753 +] 3754 + 3755 +[[package]] 3756 +name = "zerofrom-derive" 3757 +version = "0.1.4" 3758 +source = "registry+https://github.com/rust-lang/crates.io-index" 3759 +checksum = "0ea7b4a3637ea8669cedf0f1fd5c286a17f3de97b8dd5a70a6c167a1730e63a5" 3760 +dependencies = [ 3761 + "proc-macro2", 3762 + "quote", 3763 + "syn 2.0.66", 3764 + "synstructure", 3765 +] 3766 + 3767 +[[package]] 3768 +name = "zeroize" 3769 +version = "1.8.1" 3770 +source = "registry+https://github.com/rust-lang/crates.io-index" 3771 +checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 3772 +dependencies = [ 3773 + "zeroize_derive", 3774 +] 3775 + 3776 +[[package]] 3777 +name = "zeroize_derive" 3778 +version = "1.4.2" 3779 +source = "registry+https://github.com/rust-lang/crates.io-index" 3780 +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 3781 +dependencies = [ 3782 + "proc-macro2", 3783 + "quote", 3784 + "syn 2.0.66", 3785 +] 3786 + 3787 +[[package]] 3788 +name = "zerovec" 3789 +version = "0.10.2" 3790 +source = "registry+https://github.com/rust-lang/crates.io-index" 3791 +checksum = "bb2cc8827d6c0994478a15c53f374f46fbd41bea663d809b14744bc42e6b109c" 3792 +dependencies = [ 3793 + "yoke", 3794 + "zerofrom", 3795 + "zerovec-derive", 3796 +] 3797 + 3798 +[[package]] 3799 +name = "zerovec-derive" 3800 +version = "0.10.2" 3801 +source = "registry+https://github.com/rust-lang/crates.io-index" 3802 +checksum = "97cf56601ee5052b4417d90c8755c6683473c926039908196cf35d99f893ebe7" 3803 +dependencies = [ 3804 + "proc-macro2", 3805 + "quote", 3806 + "syn 2.0.66", 3807 +] 3808 diff --git a/Cargo.toml b/Cargo.toml 3809 index d2731e0..dbb1a9d 100644 3810 --- a/Cargo.toml 3811 +++ b/Cargo.toml 3812 @@ -1,5 +1,5 @@ 3813 [workspace] 3814 - 3815 +resolver = "2" 3816 members = [ 3817 "mrsbfh", 3818 "mrsbfh-macros", 3819 diff --git a/README.md b/README.md 3820 index ca4892b..daad9e5 100644 3821 --- a/README.md 3822 +++ b/README.md 3823 @@ -5,14 +5,13 @@ 3824 [<img alt="docs.rs" src="https://img.shields.io/badge/docs.rs-mrsbfh-66c2a5?style=for-the-badge&labelColor=555555&logoColor=white&logo=data:image/svg+xml;base64,PHN2ZyByb2xlPSJpbWciIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgdmlld0JveD0iMCAwIDUxMiA1MTIiPjxwYXRoIGZpbGw9IiNmNWY1ZjUiIGQ9Ik00ODguNiAyNTAuMkwzOTIgMjE0VjEwNS41YzAtMTUtOS4zLTI4LjQtMjMuNC0zMy43bC0xMDAtMzcuNWMtOC4xLTMuMS0xNy4xLTMuMS0yNS4zIDBsLTEwMCAzNy41Yy0xNC4xIDUuMy0yMy40IDE4LjctMjMuNCAzMy43VjIxNGwtOTYuNiAzNi4yQzkuMyAyNTUuNSAwIDI2OC45IDAgMjgzLjlWMzk0YzAgMTMuNiA3LjcgMjYuMSAxOS45IDMyLjJsMTAwIDUwYzEwLjEgNS4xIDIyLjEgNS4xIDMyLjIgMGwxMDMuOS01MiAxMDMuOSA1MmMxMC4xIDUuMSAyMi4xIDUuMSAzMi4yIDBsMTAwLTUwYzEyLjItNi4xIDE5LjktMTguNiAxOS45LTMyLjJWMjgzLjljMC0xNS05LjMtMjguNC0yMy40LTMzLjd6TTM1OCAyMTQuOGwtODUgMzEuOXYtNjguMmw4NS0zN3Y3My4zek0xNTQgMTA0LjFsMTAyLTM4LjIgMTAyIDM4LjJ2LjZsLTEwMiA0MS40LTEwMi00MS40di0uNnptODQgMjkxLjFsLTg1IDQyLjV2LTc5LjFsODUtMzguOHY3NS40em0wLTExMmwtMTAyIDQxLjQtMTAyLTQxLjR2LS42bDEwMi0zOC4yIDEwMiAzOC4ydi42em0yNDAgMTEybC04NSA0Mi41di03OS4xbDg1LTM4Ljh2NzUuNHptMC0xMTJsLTEwMiA0MS40LTEwMi00MS40di0uNmwxMDItMzguMiAxMDIgMzguMnYuNnoiPjwvcGF0aD48L3N2Zz4K" height="20">](https://docs.rs/mrsbfh) 3825 <!--[<img alt="build status" src="https://img.shields.io/github/workflow/status/MTRNord/mrsbfh/CI/master?style=for-the-badge" height="20">](https://github.com/MTRNord/mrsbfh/actions?query=branch%3Amaster) --> 3826 3827 - 3828 A toolkit for writing commandbots more efficient in rust for matrix. 3829 3830 ## How to use 3831 3832 To use it you need to add mrsbfh just like any regular create: 3833 3834 -``` 3835 +```toml 3836 mrsbfh = "0.4.1" 3837 ``` 3838 3839 diff --git a/example-bot/Cargo.toml b/example-bot/Cargo.toml 3840 index aec98c6..1464212 100644 3841 --- a/example-bot/Cargo.toml 3842 +++ b/example-bot/Cargo.toml 3843 @@ -10,7 +10,7 @@ repository = "https://github.com/MTRNord/mrsbfh" 3844 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 3845 3846 [dependencies.matrix-sdk] 3847 -version = "0.4.1" 3848 +version = "0.7.1" 3849 3850 # To create a bot that uses the Rust implementation of TLS use the default features minus native-tls 3851 # Ex: 3852 @@ -20,13 +20,19 @@ version = "0.4.1" 3853 # features = ["encryption", "sled_cryptostore", "sled_state_store", "require_auth_for_profile_requests", "rustls-tls"] 3854 3855 [dependencies] 3856 -mrsbfh = {version = "0.4.0", path = "../mrsbfh"} 3857 +mrsbfh = { version = "0.4.0", path = "../mrsbfh" } 3858 serde = "1.0" 3859 tracing = "0.1" 3860 tracing-subscriber = "0.3.9" 3861 tracing-futures = "0.2.5" 3862 -tokio = { version = "1", features = ["rt", "rt-multi-thread", "sync", "macros"] } 3863 -clap = { version = "3.1.1", features = ["derive"] } 3864 +tokio = { version = "1", features = [ 3865 + "rt", 3866 + "rt-multi-thread", 3867 + "sync", 3868 + "macros", 3869 +] } 3870 +clap = { version = "4.5.4", features = ["derive"] } 3871 async-trait = "0.1.52" 3872 thiserror = "1.0" 3873 regex = "1.5.4" 3874 +color-eyre = "0.6.3" 3875 diff --git a/example-bot/src/commands/hello_world.rs b/example-bot/src/commands/hello_world.rs 3876 index f5c0014..674314d 100644 3877 --- a/example-bot/src/commands/hello_world.rs 3878 +++ b/example-bot/src/commands/hello_world.rs 3879 @@ -1,27 +1,12 @@ 3880 -use crate::config::Config; 3881 use crate::errors::Error; 3882 -use matrix_sdk::ruma::events::{room::message::MessageEventContent, AnyMessageEventContent}; 3883 -use matrix_sdk::ruma::RoomId; 3884 -use matrix_sdk::Client; 3885 +use matrix_sdk::ruma::events::room::message::RoomMessageEventContent; 3886 use mrsbfh::commands::command; 3887 -use std::sync::Arc; 3888 -use tokio::sync::Mutex; 3889 +use mrsbfh::commands::extract::Extension; 3890 3891 #[command(help = "`!hello_world` - Prints \"hello world\".")] 3892 -pub async fn hello_world<'a>( 3893 - _client: Client, 3894 - tx: mrsbfh::Sender, 3895 - _config: Arc<Mutex<Config<'a>>>, 3896 - _sender: String, 3897 - _room_id: RoomId, 3898 - mut _args: Vec<&str>, 3899 -) -> Result<(), Error> 3900 -where 3901 - Config<'a>: mrsbfh::config::Loader + Clone, 3902 -{ 3903 - let content = 3904 - AnyMessageEventContent::RoomMessage(MessageEventContent::notice_plain("Hello World!")); 3905 +pub async fn hello_world<'a>(Extension(room): Extension<matrix_sdk::Room>) -> Result<(), Error> { 3906 + let content = RoomMessageEventContent::notice_plain("Hello World!"); 3907 3908 - tx.send(content).await?; 3909 + room.lock().await.send(content).await?; 3910 Ok(()) 3911 } 3912 diff --git a/example-bot/src/commands/mod.rs b/example-bot/src/commands/mod.rs 3913 index 2a36cea..2344bc2 100644 3914 --- a/example-bot/src/commands/mod.rs 3915 +++ b/example-bot/src/commands/mod.rs 3916 @@ -1,5 +1,3 @@ 3917 -use crate::config::Config; 3918 -use crate::errors::Error; 3919 use mrsbfh::commands::command_generate; 3920 3921 pub mod hello_world; 3922 diff --git a/example-bot/src/errors.rs b/example-bot/src/errors.rs 3923 index a77f976..6e80cb5 100644 3924 --- a/example-bot/src/errors.rs 3925 +++ b/example-bot/src/errors.rs 3926 @@ -1,8 +1,7 @@ 3927 -use matrix_sdk::ruma::events::AnyMessageEventContent; 3928 use thiserror::Error as ThisError; 3929 3930 #[derive(ThisError, Debug)] 3931 pub enum Error { 3932 #[error(transparent)] 3933 - SendError(#[from] tokio::sync::mpsc::error::SendError<AnyMessageEventContent>), 3934 + MatrixError(#[from] matrix_sdk::Error) 3935 } 3936 diff --git a/example-bot/src/main.rs b/example-bot/src/main.rs 3937 index 8311f02..ec456cd 100644 3938 --- a/example-bot/src/main.rs 3939 +++ b/example-bot/src/main.rs 3940 @@ -1,7 +1,9 @@ 3941 +#![warn(clippy::missing_const_for_fn)] 3942 + 3943 use crate::config::Config; 3944 use clap::Parser; 3945 +use color_eyre::Result; 3946 use mrsbfh::config::Loader; 3947 -use std::error::Error; 3948 use tracing::*; 3949 3950 pub mod commands; 3951 @@ -17,7 +19,8 @@ struct Opts { 3952 } 3953 3954 #[tokio::main] 3955 -async fn main() -> Result<(), Box<dyn Error>> { 3956 +async fn main() -> Result<()> { 3957 + color_eyre::install()?; 3958 tracing_subscriber::fmt() 3959 .pretty() 3960 .with_thread_names(true) 3961 diff --git a/example-bot/src/matrix/mod.rs b/example-bot/src/matrix/mod.rs 3962 index d56a803..2a75927 100644 3963 --- a/example-bot/src/matrix/mod.rs 3964 +++ b/example-bot/src/matrix/mod.rs 3965 @@ -1,58 +1,71 @@ 3966 use crate::config::Config; 3967 -use matrix_sdk::{Client, ClientConfig, Session as SDKSession, SyncSettings}; 3968 +use color_eyre::Result; 3969 +use matrix_sdk::config::SyncSettings; 3970 +use matrix_sdk::matrix_auth::MatrixSessionTokens; 3971 +use matrix_sdk::ruma::UserId; 3972 +use matrix_sdk::SessionMeta; 3973 +use matrix_sdk::{matrix_auth::MatrixSession, Client}; 3974 use mrsbfh::url::Url; 3975 use mrsbfh::utils::Session; 3976 -use std::{convert::TryFrom, error::Error, fs, path::Path, sync::Arc}; 3977 +use std::sync::Arc; 3978 +use std::{convert::TryFrom, fs, path::Path}; 3979 use tokio::sync::Mutex; 3980 use tracing::*; 3981 3982 mod sync; 3983 3984 -pub async fn setup(config: Config<'_>) -> Result<Client, Box<dyn Error>> { 3985 +pub async fn setup(config: Config<'_>) -> Result<Client> { 3986 info!("Beginning Matrix Setup"); 3987 let store_path_string = config.store_path.to_string(); 3988 let store_path = Path::new(&store_path_string); 3989 if !store_path.exists() { 3990 fs::create_dir_all(store_path)?; 3991 } 3992 - let client_config = ClientConfig::new().store_path(fs::canonicalize(&store_path)?); 3993 3994 let homeserver_url = 3995 Url::parse(&config.homeserver_url).expect("Couldn't parse the homeserver URL"); 3996 3997 - let client = Client::new_with_config(homeserver_url, client_config).unwrap(); 3998 + let client = Client::builder() 3999 + .homeserver_url(homeserver_url) 4000 + .sqlite_store(store_path, None) 4001 + .build() 4002 + .await?; 4003 4004 if let Some(session) = Session::load(config.session_path.parse().unwrap()) { 4005 info!("Starting relogin"); 4006 4007 - let session = SDKSession { 4008 - access_token: session.access_token, 4009 - device_id: session.device_id.into(), 4010 - user_id: matrix_sdk::ruma::UserId::try_from(session.user_id.as_str()).unwrap(), 4011 + let session = MatrixSession { 4012 + meta: SessionMeta { 4013 + user_id: <&UserId>::try_from(session.user_id.as_str()) 4014 + .unwrap() 4015 + .to_owned(), 4016 + device_id: session.device_id.into(), 4017 + }, 4018 + tokens: MatrixSessionTokens { 4019 + access_token: session.access_token, 4020 + refresh_token: None, 4021 + }, 4022 }; 4023 4024 - if let Err(e) = client.restore_login(session).await { 4025 + if let Err(e) = client.restore_session(session).await { 4026 error!("{}", e); 4027 }; 4028 info!("Finished relogin"); 4029 } else { 4030 info!("Starting login"); 4031 let login_response = client 4032 - .login( 4033 - &config.mxid, 4034 - &config.password, 4035 - None, 4036 - Some(&"timetracking-bot".to_string()), 4037 - ) 4038 + .matrix_auth() 4039 + .login_username(&config.mxid, &config.password) 4040 + .initial_device_display_name("timetracking-bot") 4041 .await; 4042 match login_response { 4043 Ok(login_response) => { 4044 info!("Session: {:#?}", login_response); 4045 let session = Session { 4046 - homeserver: client.homeserver().await.to_string(), 4047 + homeserver: client.homeserver().to_string(), 4048 user_id: login_response.user_id.to_string(), 4049 access_token: login_response.access_token, 4050 - device_id: login_response.device_id.into(), 4051 + device_id: login_response.device_id.to_string(), 4052 }; 4053 session.save(config.session_path.parse().unwrap())?; 4054 } 4055 @@ -66,21 +79,18 @@ pub async fn setup(config: Config<'_>) -> Result<Client, Box<dyn Error>> { 4056 Ok(client) 4057 } 4058 4059 -pub async fn start_sync( 4060 - client: &mut Client, 4061 - config: Config<'static>, 4062 -) -> Result<(), Box<dyn Error>> { 4063 - client.register_event_handler(mrsbfh::sync::autojoin).await; 4064 +pub async fn start_sync(client: &mut Client, config: Config<'static>) -> Result<()> { 4065 + client.add_event_handler(mrsbfh::sync::autojoin); 4066 4067 let config = Arc::new(Mutex::new(config)); 4068 - client 4069 - .register_event_handler(move |ev, room, client| { 4070 - sync::on_room_message(ev, room, client, config.clone()) 4071 - }) 4072 - .await; 4073 + let cloned_config = Arc::clone(&config); 4074 + client.add_event_handler(move |ev, room, client| { 4075 + let cloned_config = Arc::clone(&cloned_config); 4076 + sync::on_room_message(ev, room, client, cloned_config) 4077 + }); 4078 4079 info!("Starting full Sync..."); 4080 - client.sync(SyncSettings::default()).await; 4081 + client.sync(SyncSettings::default()).await?; 4082 4083 Ok(()) 4084 } 4085 diff --git a/example-bot/src/matrix/sync.rs b/example-bot/src/matrix/sync.rs 4086 index fc30c78..5c23162 100644 4087 --- a/example-bot/src/matrix/sync.rs 4088 +++ b/example-bot/src/matrix/sync.rs 4089 @@ -1,19 +1,16 @@ 4090 use crate::commands::match_command; 4091 use crate::Config; 4092 +use matrix_sdk::room::Room; 4093 +use matrix_sdk::ruma::events::room::message::OriginalSyncRoomMessageEvent; 4094 use matrix_sdk::Client; 4095 -use matrix_sdk::{ 4096 - room::Room, 4097 - ruma::events::{room::message::MessageEventContent, SyncMessageEvent}, 4098 -}; 4099 use std::sync::Arc; 4100 use tokio::sync::Mutex; 4101 4102 #[mrsbfh::commands::commands] 4103 pub(crate) async fn on_room_message( 4104 - event: SyncMessageEvent<MessageEventContent>, 4105 + event: OriginalSyncRoomMessageEvent, 4106 room: Room, 4107 client: Client, 4108 config: Arc<Mutex<Config<'static>>>, 4109 ) { 4110 - println!("message example") 4111 } 4112 diff --git a/mrsbfh-macros/Cargo.toml b/mrsbfh-macros/Cargo.toml 4113 index f8d6078..36a01cd 100644 4114 --- a/mrsbfh-macros/Cargo.toml 4115 +++ b/mrsbfh-macros/Cargo.toml 4116 @@ -13,7 +13,7 @@ categories = ["network-programming", "parsing"] 4117 proc-macro = true 4118 4119 [dependencies] 4120 -syn = { version= "1.0", features = ["full"] } 4121 +syn = { version = "2.0", features = ["full"] } 4122 quote = "1.0" 4123 -convert_case = "0.5.0" 4124 +convert_case = "0.6.0" 4125 proc-macro2 = "1.0" 4126 diff --git a/mrsbfh-macros/src/lib.rs b/mrsbfh-macros/src/lib.rs 4127 index b9d00ca..25dc7a2 100644 4128 --- a/mrsbfh-macros/src/lib.rs 4129 +++ b/mrsbfh-macros/src/lib.rs 4130 @@ -1,25 +1,31 @@ 4131 +#![warn(clippy::missing_const_for_fn)] 4132 + 4133 pub(crate) mod utils; 4134 -use crate::utils::get_arg; 4135 use convert_case::{Case, Casing}; 4136 use proc_macro::TokenStream; 4137 -use quote::quote; 4138 -use syn::parse_macro_input; 4139 +use proc_macro2::Span; 4140 +use quote::{quote, quote_spanned}; 4141 use syn::spanned::Spanned; 4142 +use syn::{parse_macro_input, Ident}; 4143 +use utils::Args; 4144 4145 /// Used to define a command 4146 /// 4147 +/// Important: Do not return `Ok(())` yourself. 4148 +/// The macro takes care of the correct return value 4149 +/// 4150 /// ```compile_fail 4151 -/// use std::sync::Arc; 4152 -/// use tokio::sync::Mutex; 4153 +/// use mrsbfh::commands::extract::Extension; 4154 +/// use mrsbfh_macros::command; 4155 /// 4156 /// #[command(help = "Description")] 4157 -/// async fn hello_world(mut tx: mrsbfh::Sender, config: Arc<Mutex<Config>>, sender: String, mut args: Vec<&str>) -> Result<(), Box<dyn std::error::Error>> where Config: mrsbfh::config::Loader + Clone {} 4158 +/// async fn hello_world(Extension(room): Extension<matrix_sdk::Room>,) -> Result<(), Box<dyn std::error::Error>> {} 4159 /// ``` 4160 #[proc_macro_attribute] 4161 pub fn command(args: TokenStream, input: TokenStream) -> TokenStream { 4162 let input = parse_macro_input!(input as syn::ItemFn); 4163 4164 - let args = parse_macro_input!(args as syn::AttributeArgs); 4165 + let args = parse_macro_input!(args as Args); 4166 4167 let help_const_name = syn::Ident::new( 4168 &format!( 4169 @@ -28,9 +34,8 @@ pub fn command(args: TokenStream, input: TokenStream) -> TokenStream { 4170 ), 4171 input.sig.span(), 4172 ); 4173 - let help_description = match get_arg( 4174 + let help_description = match args.get_arg( 4175 input.span(), 4176 - args, 4177 "help", 4178 "#[command(help = \"<description>\")]", 4179 1, 4180 @@ -50,6 +55,7 @@ pub fn command(args: TokenStream, input: TokenStream) -> TokenStream { 4181 /// Used to generate the match case and help text 4182 /// 4183 /// ```compile_fail 4184 +/// use mrsbfh_macros::command_generate; 4185 /// #[command_generate(bot_name = "botless", description = "Is it a bot or is it not?")] 4186 /// enum Commands { 4187 /// In, 4188 @@ -62,7 +68,7 @@ pub fn command(args: TokenStream, input: TokenStream) -> TokenStream { 4189 pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4190 let input = parse_macro_input!(input as syn::ItemEnum); 4191 4192 - let args = parse_macro_input!(args as syn::AttributeArgs); 4193 + let args = parse_macro_input!(args as Args); 4194 4195 let commands = input.variants.iter().map(|v| { 4196 let command_string = v.ident.to_string().to_lowercase(); 4197 @@ -83,10 +89,10 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4198 4199 quote! { 4200 #command_string => { 4201 - #command::#command(client, tx, config, sender, room_id, args).await 4202 + mrsbfh::commands::Command::call(#command::#command, msg).await 4203 }, 4204 #command_short => { 4205 - #command::#command(client, tx, config, sender, room_id, args).await 4206 + mrsbfh::commands::Command::call(#command::#command, msg).await 4207 }, 4208 } 4209 }); 4210 @@ -109,9 +115,8 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4211 help_format_string = format!("{}{}", help_format_string, "{}"); 4212 }); 4213 4214 - let bot_name = match get_arg( 4215 + let bot_name = match args.get_arg( 4216 input.span(), 4217 - args.clone(), 4218 "bot_name", 4219 "#[command_generate(bot_name = \"<bot name>\", description = \"<bot description>\")]", 4220 2, 4221 @@ -119,9 +124,8 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4222 Ok(v) => v.value(), 4223 Err(e) => return e, 4224 }; 4225 - let description = match get_arg( 4226 + let description = match args.get_arg( 4227 input.span(), 4228 - args, 4229 "description", 4230 "#[command_generate(bot_name = \"<bot name>\", description = \"<bot description>\")]", 4231 2, 4232 @@ -135,10 +139,9 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4233 let help_preamble = help_title + &description + commands_title; 4234 4235 let code = quote! { 4236 - 4237 async fn help( 4238 - mut tx: mrsbfh::Sender, 4239 - ) -> Result<(), Error> { 4240 + mrsbfh::commands::extract::Extension(room): mrsbfh::commands::extract::Extension<matrix_sdk::Room>, 4241 + ) -> Result<(), mrsbfh::errors::Errors> { 4242 let options = mrsbfh::pulldown_cmark::Options::empty(); 4243 let help_markdown = format!(#help_format_string, #help_preamble, #(#help_parts,)*); 4244 let parser = mrsbfh::pulldown_cmark::Parser::new_ext(&help_markdown, options); 4245 @@ -147,14 +150,12 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4246 let owned_html = html.to_owned(); 4247 4248 mrsbfh::tokio::spawn(async move { 4249 - let content = matrix_sdk::ruma::events::AnyMessageEventContent::RoomMessage( 4250 - matrix_sdk::ruma::events::room::message::MessageEventContent::notice_html( 4251 - &help_markdown, 4252 - owned_html, 4253 - ), 4254 + let content = matrix_sdk::ruma::events::room::message::RoomMessageEventContent::notice_html( 4255 + &help_markdown, 4256 + owned_html, 4257 ); 4258 4259 - if let Err(e) = tx.send(content).await { 4260 + if let Err(e) = room.lock().await.send(content).await { 4261 mrsbfh::tracing::error!("Error: {}",e); 4262 }; 4263 }); 4264 @@ -162,14 +163,14 @@ pub fn command_generate(args: TokenStream, input: TokenStream) -> TokenStream { 4265 Ok(()) 4266 } 4267 4268 - pub async fn match_command<'a>(cmd: &str, client: matrix_sdk::Client, config: std::sync::Arc<tokio::sync::Mutex<Config<'a>>>, tx: mrsbfh::Sender, sender: String, room_id: matrix_sdk::ruma::RoomId, args: Vec<&str>,) -> Result<(), Error> where Config<'a>: mrsbfh::config::Loader + Clone { 4269 + pub async fn match_command<'a>(cmd: &str, msg: mrsbfh::commands::Message) -> Result<(), impl std::error::Error> { 4270 match cmd { 4271 #(#commands)* 4272 "help" => { 4273 - help(tx).await 4274 + mrsbfh::commands::Command::call(help, msg).await 4275 }, 4276 "h" => { 4277 - help(tx).await 4278 + mrsbfh::commands::Command::call(help, msg).await 4279 }, 4280 _ => {Ok(())} 4281 } 4282 @@ -189,7 +190,7 @@ pub fn config_derive(input: TokenStream) -> TokenStream { 4283 impl #impl_generics mrsbfh::config::Loader for #name #ty_generics #where_clause { 4284 fn load<P: AsRef<std::path::Path> + std::fmt::Debug>(path: P) -> Result<Self, mrsbfh::errors::ConfigError> { 4285 let contents = std::fs::read_to_string(path)?; 4286 - let config: Self = mrsbfh::serde_yaml::from_str(&contents)?; 4287 + let config: Self = mrsbfh::serde_yml::from_str(&contents)?; 4288 Ok(config) 4289 } 4290 } 4291 @@ -209,17 +210,47 @@ pub fn config_derive(input: TokenStream) -> TokenStream { 4292 /// * The match_command MUST be imported 4293 /// 4294 /// ```compile_fail 4295 -/// use crate::commands::match_command; 4296 -/// 4297 -/// #[mrsbfh::commands::commands] 4298 -/// async fn on_room_message(event: SyncMessageEvent<MessageEventContent>, room: Room) { 4299 +/// use mrsbfh_macros::commands; 4300 +/// #[commands] 4301 +/// async fn on_room_message(event: matrix_sdk::ruma::events::room::message::OriginalSyncRoomMessageEvent, room: Room) { 4302 /// // Your own logic. (Executed BEFORE the commands matching) 4303 /// } 4304 /// ``` 4305 /// 4306 +/// 4307 #[proc_macro_attribute] 4308 pub fn commands(_: TokenStream, input: TokenStream) -> TokenStream { 4309 let mut method = parse_macro_input!(input as syn::ItemFn); 4310 + let arguments = method.sig.inputs.clone(); 4311 + 4312 + let message_magic = arguments.iter().map(|argument| { 4313 + if let syn::FnArg::Typed(arg_type) = argument { 4314 + if let syn::Pat::Ident(ref raw_ident) = *arg_type.pat { 4315 + if let syn::Type::Path(ref path) = *arg_type.ty { 4316 + let ident = &raw_ident.ident; 4317 + if path 4318 + .path 4319 + .segments 4320 + .iter() 4321 + .any(|x| x.ident == Ident::new("Arc", Span::call_site())) { 4322 + quote! { 4323 + msg.extensions_mut().insert(std::sync::Arc::clone(&#ident)); 4324 + } 4325 + } else { 4326 + quote! { 4327 + msg.extensions_mut().insert(std::sync::Arc::new(mrsbfh::tokio::sync::Mutex::new(#ident.clone()))); 4328 + } 4329 + } 4330 + } else { 4331 + panic!("Unexpected type for argument"); 4332 + } 4333 + } else { 4334 + panic!("Unexpected type for argument"); 4335 + } 4336 + } else { 4337 + panic!("Unexpected type for argument"); 4338 + } 4339 + }); 4340 4341 if method.sig.ident == "on_room_message" { 4342 let original = method.block.clone(); 4343 @@ -228,74 +259,62 @@ pub fn commands(_: TokenStream, input: TokenStream) -> TokenStream { 4344 #original 4345 4346 // Command matching logic 4347 - if let matrix_sdk::room::Room::Joined(room) = room { 4348 - let msg_body = if let matrix_sdk::ruma::events::SyncMessageEvent { 4349 - content: matrix_sdk::ruma::events::room::message::MessageEventContent { 4350 - msgtype: matrix_sdk::ruma::events::room::message::MessageType::Text(matrix_sdk::ruma::events::room::message::TextMessageEventContent { body: msg_body, .. }), 4351 - .. 4352 - }, 4353 - .. 4354 - } = event 4355 - { 4356 - msg_body.clone() 4357 - } else { 4358 - String::new() 4359 - }; 4360 - if msg_body.is_empty() { 4361 - return; 4362 - } 4363 - 4364 - let sender = event.sender.clone().to_string(); 4365 - 4366 - let (tx, mut rx) = tokio::sync::mpsc::channel(100); 4367 - let room_id = room.room_id().clone(); 4368 - 4369 - let cloned_config = config.clone(); 4370 - let cloned_client = client.clone(); 4371 - tokio::spawn(async move { 4372 - let normalized_body = mrsbfh::commands::command_utils::WHITESPACE_DEDUPLICATOR_MAGIC.replace_all(&msg_body, " "); 4373 - let mut split = msg_body.split_whitespace(); 4374 - 4375 - let command_raw = split.next().expect("This is not a command").to_lowercase(); 4376 - let command = mrsbfh::commands::command_utils::COMMAND_MATCHER_MAGIC.captures(command_raw.as_str()) 4377 - .map_or(String::new(), |caps| { 4378 - caps.get(1) 4379 - .map_or(String::new(), 4380 - |m| String::from(m.as_str())) 4381 - }); 4382 - if !command.is_empty() { 4383 - tracing::info!("Got command: {}", command); 4384 - } 4385 - // Make sure this is immutable 4386 - let args: Vec<&str> = split.collect(); 4387 - if let Err(e) = match_command( 4388 - command.as_str(), 4389 - cloned_client.clone(), 4390 - cloned_config.clone(), 4391 - tx, 4392 - sender, 4393 - room_id, 4394 - args, 4395 - ) 4396 - .await 4397 - { 4398 - tracing::error!("{}", e); 4399 - } 4400 + if room.state() != matrix_sdk::RoomState::Joined { 4401 + return; 4402 + } 4403 4404 - }); 4405 + let msg_body = match event.content.msgtype { 4406 + matrix_sdk::ruma::events::room::message::MessageType::Text(matrix_sdk::ruma::events::room::message::TextMessageEventContent { ref body, .. }) => body.clone(), 4407 + _ => return, 4408 + }; 4409 + if msg_body.is_empty() { 4410 + return; 4411 + } 4412 4413 - while let Some(v) = rx.recv().await { 4414 - if let Err(e) = room.send(v, None) 4415 - .await 4416 - { 4417 - tracing::error!("{}", e); 4418 - } 4419 + let sender = event.sender.clone().to_string(); 4420 + 4421 + let room_id = room.room_id().clone(); 4422 + 4423 + let cloned_client = client.clone(); 4424 + let cloned_room = room.clone(); 4425 + tokio::spawn(async move { 4426 + let normalized_body = mrsbfh::commands::command_utils::WHITESPACE_DEDUPLICATOR_MAGIC.replace_all(&msg_body, " "); 4427 + let cloned_body = dbg!(normalized_body).clone(); 4428 + let mut split = cloned_body.split_whitespace().map(|x|x.to_string()); 4429 + 4430 + let command_raw = split.next().expect("This is not a command").to_lowercase(); 4431 + let command = mrsbfh::commands::command_utils::COMMAND_MATCHER_MAGIC.captures(command_raw.as_str()) 4432 + .map_or(String::new(), |caps| { 4433 + caps.get(1) 4434 + .map_or(String::new(), 4435 + |m| String::from(m.as_str())) 4436 + }); 4437 + if !command.is_empty() { 4438 + tracing::info!("Got command: {}", command); 4439 } 4440 - } 4441 + // Make sure this is immutable 4442 + let args_raw: Vec<String> = split.collect(); 4443 + let args: std::sync::Arc<mrsbfh::tokio::sync::Mutex<Vec<String>>> = std::sync::Arc::new(mrsbfh::tokio::sync::Mutex::new(args_raw.clone())); 4444 + 4445 + let mut msg = mrsbfh::commands::Message::new(); 4446 + #(#message_magic)* 4447 + msg.extensions_mut().insert(std::sync::Arc::clone(&args)); 4448 + if let Err(e) = match_command( 4449 + command.as_str(), 4450 + msg 4451 + ) 4452 + .await 4453 + { 4454 + tracing::error!("{}", e); 4455 + } 4456 + 4457 + }); 4458 } 4459 }; 4460 method.block = new_block; 4461 + } else { 4462 + panic!("Function needs to be called `on_room_message`"); 4463 } 4464 4465 - TokenStream::from(quote! {#method}) 4466 + TokenStream::from(quote_spanned! {Span::call_site()=>#method}) 4467 } 4468 diff --git a/mrsbfh-macros/src/utils.rs b/mrsbfh-macros/src/utils.rs 4469 index ac77c31..e0ad9cc 100644 4470 --- a/mrsbfh-macros/src/utils.rs 4471 +++ b/mrsbfh-macros/src/utils.rs 4472 @@ -1,63 +1,75 @@ 4473 +use std::collections::HashSet; 4474 + 4475 use proc_macro::TokenStream; 4476 use quote::quote; 4477 -use syn::spanned::Spanned; 4478 +use syn::{ 4479 + parse::{Parse, ParseStream}, 4480 + punctuated::Punctuated, 4481 + spanned::Spanned, 4482 + Expr, Lit, Meta, Token, 4483 +}; 4484 4485 -pub(crate) fn get_arg<'a>( 4486 - input_span: proc_macro2::Span, 4487 - args: syn::AttributeArgs, 4488 - arg: &'a str, 4489 - expected: &'a str, 4490 - expected_args: usize, 4491 -) -> Result<syn::LitStr, TokenStream> { 4492 - if args.len() == expected_args { 4493 - let meta = args 4494 - .iter() 4495 - .filter_map(|x| { 4496 - if let syn::NestedMeta::Meta(ref meta) = x { 4497 - if meta.path().is_ident(&arg) { 4498 - return Some(meta); 4499 - } 4500 - } 4501 - None 4502 - }) 4503 - .next(); 4504 - if let Some(meta) = meta { 4505 - if let syn::Meta::NameValue(ref meta) = meta { 4506 - let meta_lit = meta.lit.clone(); 4507 - return match meta_lit { 4508 - syn::Lit::Str(s) => Ok(s), 4509 - _ => { 4510 - let error = syn::Error::new( 4511 - meta.lit.span(), 4512 - format!( 4513 - "expected `{}`\n\nThe field '{}' needs to be a str literal!", 4514 - expected, arg 4515 - ), 4516 - ) 4517 - .to_compile_error(); 4518 - Err(quote! {#error}.into()) 4519 +pub(crate) struct Args { 4520 + args: HashSet<Meta>, 4521 +} 4522 + 4523 +impl Parse for Args { 4524 + fn parse(input: ParseStream) -> syn::Result<Self> { 4525 + let args = Punctuated::<Meta, Token![,]>::parse_terminated(input)?; 4526 + Ok(Args { 4527 + args: args.into_iter().collect(), 4528 + }) 4529 + } 4530 +} 4531 + 4532 +impl Args { 4533 + pub(crate) fn get_arg<'a>( 4534 + &self, 4535 + input_span: proc_macro2::Span, 4536 + arg: &'a str, 4537 + expected: &'a str, 4538 + expected_args: usize, 4539 + ) -> Result<syn::LitStr, TokenStream> { 4540 + if self.args.len() == expected_args { 4541 + let lit = self 4542 + .args 4543 + .iter() 4544 + .cloned() 4545 + .filter_map(|x| { 4546 + if let syn::Meta::NameValue(name_value) = x { 4547 + if name_value.path.is_ident(arg) { 4548 + if let Expr::Lit(lit) = name_value.value { 4549 + if let Lit::Str(lit_str) = lit.lit { 4550 + return Some(lit_str); 4551 + } 4552 + } 4553 + } 4554 } 4555 - }; 4556 + None 4557 + }) 4558 + .next(); 4559 + if let Some(lit) = lit { 4560 + return Ok(lit); 4561 + } else { 4562 + let error = syn::Error::new( 4563 + lit.span(), 4564 + format!( 4565 + "1expected `{}`\n\nThe field '{}' is required!", 4566 + expected, arg 4567 + ), 4568 + ) 4569 + .to_compile_error(); 4570 + return Err(quote! {#error}.into()); 4571 } 4572 - } else { 4573 - let error = syn::Error::new( 4574 - meta.span(), 4575 - format!( 4576 - "1expected `{}`\n\nThe field '{}' is required!", 4577 - expected, arg 4578 - ), 4579 - ) 4580 - .to_compile_error(); 4581 - return Err(quote! {#error}.into()); 4582 } 4583 + let error = syn::Error::new( 4584 + input_span, 4585 + format!( 4586 + "expected `{}` but not enough arguments where provided.", 4587 + expected 4588 + ), 4589 + ) 4590 + .to_compile_error(); 4591 + Err(quote! {#error}.into()) 4592 } 4593 - let error = syn::Error::new( 4594 - input_span, 4595 - format!( 4596 - "expected `{}` but not enough arguments where provided.", 4597 - expected 4598 - ), 4599 - ) 4600 - .to_compile_error(); 4601 - Err(quote! {#error}.into()) 4602 } 4603 diff --git a/mrsbfh/Cargo.toml b/mrsbfh/Cargo.toml 4604 index 76028ad..275eb92 100644 4605 --- a/mrsbfh/Cargo.toml 4606 +++ b/mrsbfh/Cargo.toml 4607 @@ -11,32 +11,43 @@ categories = ["network-programming"] 4608 readme = "../README.md" 4609 4610 [dependencies.matrix-sdk] 4611 -version = "0.4.1" 4612 -default_features = false 4613 +version = "0.7.1" 4614 +default-features = false 4615 4616 [dependencies] 4617 -url = "2.2.2" 4618 +url = "2.5.0" 4619 4620 -thiserror = "1.0" 4621 +thiserror = "1.0.61" 4622 4623 # Command macros 4624 -mrsbfh-macros = {version = "0.4.0", path = "../mrsbfh-macros", optional = true} 4625 +mrsbfh-macros = { version = "0.4.0", path = "../mrsbfh-macros", optional = true } 4626 4627 -tokio = { version = "1", features = ["rt", "rt-multi-thread", "macros"] } 4628 -tracing = "0.1" 4629 +tokio = { version = "1.37.0", features = [ 4630 + "rt", 4631 + "rt-multi-thread", 4632 + "macros", 4633 + "sync", 4634 +] } 4635 +tracing = "0.1.40" 4636 4637 -serde = "1.0" 4638 -serde_yaml = "0.8" 4639 -serde_json = "1" 4640 +serde = "1.0.202" 4641 +serde_yml = "0.0.7" 4642 +serde_json = "1.0.117" 4643 4644 -pulldown-cmark = {version = "0.9.1", optional = true} # For generating the help text 4645 +pulldown-cmark = { version = "0.11", optional = true } # For generating the help text 4646 4647 -regex = "1.5" 4648 -async-trait = "0.1" 4649 -lazy_static = "1" 4650 +regex = "1.10.4" 4651 +lazy_static = "1.4.0" 4652 4653 [features] 4654 default = ["macros", "native-tls"] 4655 macros = ["mrsbfh-macros", "pulldown-cmark"] 4656 rustls = ["matrix-sdk/rustls-tls"] 4657 native-tls = ["matrix-sdk/native-tls"] 4658 + 4659 +# Hack for katex 4660 +[package.metadata.docs.rs] 4661 +rustdoc-args = [ 4662 + "--html-in-header", 4663 + "misc/katex-header.html", 4664 +] 4665 diff --git a/mrsbfh/misc/katex-header.html b/mrsbfh/misc/katex-header.html 4666 new file mode 100644 4667 index 0000000..3cdb91f 4668 --- /dev/null 4669 +++ b/mrsbfh/misc/katex-header.html 4670 @@ -0,0 +1,15 @@ 4671 +<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css" integrity="sha384-wcIxkf4k558AjM3Yz3BBFQUbk/zgIYC2R0QpeeYb+TwlBVMrlgLqwRjRtGZiK7ww" crossorigin="anonymous"> 4672 +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.js" integrity="sha384-hIoBPJpTUs74ddyc4bFZSM1TVlQDA60VBbJS0oA934VSz82sBx1X7kSx2ATBDIyd" crossorigin="anonymous"></script> 4673 +<script defer src="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/contrib/auto-render.min.js" integrity="sha384-43gviWU0YVjaDtb/GhzOouOXtZMP/7XUzwPTstBeZFe/+rCMvRwr4yROQP43s0Xk" crossorigin="anonymous"></script> 4674 +<script> 4675 + document.addEventListener("DOMContentLoaded", function() { 4676 + renderMathInElement(document.body, { 4677 + delimiters: [ 4678 + {left: "$$", right: "$$", display: true}, 4679 + {left: "\\(", right: "\\)", display: false}, 4680 + {left: "$", right: "$", display: false}, 4681 + {left: "\\[", right: "\\]", display: true} 4682 + ] 4683 + }); 4684 + }); 4685 +</script> 4686 \ No newline at end of file 4687 diff --git a/mrsbfh/src/commands.rs b/mrsbfh/src/commands.rs 4688 index ac679cf..b10947e 100644 4689 --- a/mrsbfh/src/commands.rs 4690 +++ b/mrsbfh/src/commands.rs 4691 @@ -6,7 +6,7 @@ 4692 //! 4693 //! These functions require a specific syntax which is described below. 4694 //! 4695 -//! Also that function requires you to have a config struct which implements the [Loader](crate::config::Loader) 4696 +//! Also, that function requires you to have a config struct which implements the [Loader](crate::config::Loader) 4697 //! trait. 4698 //! 4699 //! <br> 4700 @@ -16,32 +16,23 @@ 4701 //! 4702 //! In each of these submodules you can define a command like this: 4703 //! 4704 -//! ```compile_fail 4705 -//! use crate::config::Config; 4706 -//! use crate::errors::Error; 4707 -//! use matrix_sdk::ruma::events::{room::message::MessageEventContent, AnyMessageEventContent}; 4708 -//! use matrix_sdk::ruma::RoomId; 4709 -//! use matrix_sdk::Client; 4710 +//! ``` 4711 +//! use matrix_sdk::ruma::events::room::message::RoomMessageEventContent; 4712 //! use mrsbfh::commands::command; 4713 -//! use std::sync::Arc; 4714 -//! use tokio::sync::Mutex; 4715 +//! use mrsbfh::commands::extract::Extension; 4716 +//! use thiserror::Error as ThisError; 4717 +//! 4718 +//! #[derive(ThisError, Debug)] 4719 +//! pub enum Error { 4720 +//! #[error(transparent)] 4721 +//! MatrixError(#[from] matrix_sdk::Error) 4722 +//! } 4723 //! 4724 //! #[command(help = "`!hello_world` - Prints \"hello world\".")] 4725 -//! pub async fn hello_world<'a>( 4726 -//! _client: Client, 4727 -//! tx: mrsbfh::Sender, 4728 -//! _config: Arc<Mutex<Config<'a>>>, 4729 -//! _sender: String, 4730 -//! _room_id: RoomId, 4731 -//! mut _args: Vec<&str>, 4732 -//! ) -> Result<(), Error> 4733 -//! where 4734 -//! Config<'a>: mrsbfh::config::Loader + Clone, 4735 -//! { 4736 -//! let content = 4737 -//! AnyMessageEventContent::RoomMessage(MessageEventContent::notice_plain("Hello World!")); 4738 -//! 4739 -//! tx.send(content).await?; 4740 +//! pub async fn hello_world<'a>(Extension(room): Extension<matrix_sdk::Room>) -> Result<(), Error> { 4741 +//! let content = RoomMessageEventContent::notice_plain("Hello World!"); 4742 +//! 4743 +//! room.lock().await.send(content).await?; 4744 //! Ok(()) 4745 //! } 4746 //! ``` 4747 @@ -83,12 +74,12 @@ 4748 //! 4749 //! ## `#[commands]` macro 4750 //! 4751 -//! This macro is used to generate the logic in the [register_event_handler](matrix_sdk::Client::register_event_handler) method to 4752 +//! This macro is used to generate the logic in the [register_event_handler](matrix_sdk::Client::add_event_handler) method to 4753 //! handle commands after your code. 4754 //! 4755 //! The definition is: 4756 //! 4757 -//! ```compile_fail 4758 +//! ```ignore 4759 //! use crate::commands::match_command; 4760 //! use crate::config::Config; 4761 //! use matrix_sdk::async_trait; 4762 @@ -115,9 +106,9 @@ 4763 //! 4764 //! You use it using this snippet: 4765 //! 4766 -//! ``` 4767 +//! ```ignore 4768 //! client 4769 -//! .register_event_handler(move |ev, room, client| { 4770 +//! .add_event_handler(move |ev, room, client| { 4771 //! sync::on_room_message(ev, room, client, config.clone()) 4772 //! }) 4773 //! .await; 4774 @@ -129,6 +120,12 @@ 4775 //! * Your `match_command` function MUST be imported 4776 //! 4777 4778 +pub mod extract; 4779 + 4780 +use crate::commands::extract::Extensions; 4781 +use std::convert::Infallible; 4782 +use std::future::Future; 4783 + 4784 pub mod command_utils { 4785 use lazy_static::lazy_static; 4786 4787 @@ -140,4 +137,230 @@ pub mod command_utils { 4788 } 4789 } 4790 4791 +/// Types that can be created from messages. 4792 +/// 4793 +/// See [`axum::extract`] for more details. 4794 +/// 4795 +/// [`axum::extract`]: https://docs.rs/axum/latest/axum/extract/index.html 4796 +pub trait FromMessage: Sized { 4797 + /// If the extractor fails it'll use this "rejection" type. A rejection is 4798 + /// a kind of error that can be converted into a response. 4799 + type Rejection: IntoError; 4800 + 4801 + /// Perform the extraction. 4802 + fn from_message( 4803 + msg: &mut MessageParts, 4804 + ) -> impl Future<Output = Result<Self, Self::Rejection>> + Send; 4805 +} 4806 + 4807 +impl FromMessage for Parts { 4808 + type Rejection = Infallible; 4809 + 4810 + async fn from_message(msg: &mut MessageParts) -> Result<Self, Self::Rejection> { 4811 + let extensions = std::mem::take(msg.extensions_mut()); 4812 + 4813 + let mut temp_message = Message::new(); 4814 + *temp_message.extensions_mut() = extensions; 4815 + 4816 + let parts = temp_message.into_parts(); 4817 + 4818 + Ok(parts) 4819 + } 4820 +} 4821 + 4822 +pub struct Parts { 4823 + /// The message's extensions 4824 + pub extensions: Extensions, 4825 +} 4826 + 4827 +impl Parts { 4828 + /// Creates a new default instance of `Parts` 4829 + fn new() -> Parts { 4830 + Parts { 4831 + extensions: Extensions::default(), 4832 + } 4833 + } 4834 +} 4835 + 4836 +pub struct Message { 4837 + parts: Parts, 4838 +} 4839 + 4840 +impl Message { 4841 + /// Creates a new blank `Message` 4842 + /// 4843 + /// The component parts of this message will be set to their default. 4844 + /// 4845 + /// # Examples 4846 + /// 4847 + /// ``` 4848 + /// use mrsbfh::commands::Message; 4849 + /// let message = Message::new(); 4850 + /// ``` 4851 + #[inline] 4852 + pub fn new() -> Message { 4853 + Message { 4854 + parts: Parts::new(), 4855 + } 4856 + } 4857 + 4858 + /// Creates a new `Message` with the given components parts. 4859 + /// 4860 + /// # Examples 4861 + /// 4862 + /// ``` 4863 + /// use mrsbfh::commands::Message; 4864 + /// let message = Message::new(); 4865 + /// let mut parts = message.into_parts(); 4866 + /// 4867 + /// let message = Message::from_parts(parts); 4868 + /// ``` 4869 + #[inline] 4870 + pub const fn from_parts(parts: Parts) -> Message { 4871 + Message { parts } 4872 + } 4873 + 4874 + /// Returns a reference to the associated extensions. 4875 + /// 4876 + /// # Examples 4877 + /// 4878 + /// ``` 4879 + /// use mrsbfh::commands::Message; 4880 + /// let message: Message = Message::default(); 4881 + /// assert!(message.extensions().get::<i32>().is_none()); 4882 + /// ``` 4883 + #[inline] 4884 + pub const fn extensions(&self) -> &Extensions { 4885 + &self.parts.extensions 4886 + } 4887 + 4888 + /// Returns a mutable reference to the associated extensions. 4889 + /// 4890 + /// # Examples 4891 + /// 4892 + /// ``` 4893 + /// # tokio::runtime::Runtime::new().unwrap().block_on(async { 4894 + /// use std::ops::Deref; 4895 + /// use std::sync::Arc; 4896 + /// use tokio::sync::Mutex; 4897 + /// use mrsbfh::commands::Message; 4898 + /// let mut message: Message = Message::default(); 4899 + /// message.extensions_mut().insert(Arc::new(Mutex::new("hello"))); 4900 + /// assert_eq!(*message.extensions().get::<&str>().unwrap().lock().await, "hello"); 4901 + /// # }) 4902 + /// ``` 4903 + #[inline] 4904 + pub fn extensions_mut(&mut self) -> &mut Extensions { 4905 + &mut self.parts.extensions 4906 + } 4907 + 4908 + /// Consumes the message returning the parts. 4909 + /// 4910 + /// # Examples 4911 + /// 4912 + /// ``` 4913 + /// use mrsbfh::commands::Message; 4914 + /// let message = Message::new(); 4915 + /// let parts = message.into_parts(); 4916 + /// ``` 4917 + #[inline] 4918 + pub fn into_parts(self) -> Parts { 4919 + self.parts 4920 + } 4921 +} 4922 + 4923 +impl Default for Message { 4924 + fn default() -> Self { 4925 + Self::new() 4926 + } 4927 +} 4928 + 4929 +pub(crate) mod sealed { 4930 + #![allow(unreachable_pub, missing_docs, missing_debug_implementations)] 4931 + 4932 + pub trait HiddenTrait {} 4933 + pub struct Hidden; 4934 + impl HiddenTrait for Hidden {} 4935 +} 4936 + 4937 +#[derive(Debug)] 4938 +pub struct MessageParts { 4939 + extensions: Extensions, 4940 +} 4941 + 4942 +impl MessageParts { 4943 + pub fn new(msg: Message) -> Self { 4944 + let Parts { extensions, .. } = msg.into_parts(); 4945 + MessageParts { extensions } 4946 + } 4947 + 4948 + /// Gets a reference to the message extensions. 4949 + pub const fn extensions(&self) -> &Extensions { 4950 + &self.extensions 4951 + } 4952 + 4953 + /// Gets a mutable reference to the message extensions. 4954 + pub fn extensions_mut(&mut self) -> &mut Extensions { 4955 + &mut self.extensions 4956 + } 4957 +} 4958 + 4959 +pub trait Command<T>: Clone + Send + Sized + 'static { 4960 + // This seals the trait. We cannot use the regular "sealed super trait" 4961 + // approach due to coherence. 4962 + #[doc(hidden)] 4963 + type Sealed: sealed::HiddenTrait; 4964 + 4965 + /// Call the command with the given request. 4966 + fn call( 4967 + self, 4968 + req: Message, 4969 + ) -> impl Future<Output = Result<(), crate::errors::Errors>> + Send; 4970 +} 4971 + 4972 +macro_rules! impl_command { 4973 + ( $($ty:ident),* $(,)? ) => { 4974 + #[allow(non_snake_case)] 4975 + impl<F, Fut, Res, $($ty,)*> Command<($($ty,)*)> for F 4976 + where 4977 + F: FnOnce($($ty,)*) -> Fut + Clone + Send + 'static, 4978 + Fut: Future<Output = Result<(), Res>> + Send, 4979 + Res: IntoError, 4980 + $( $ty: FromMessage + Send,)* 4981 + { 4982 + type Sealed = sealed::Hidden; 4983 + 4984 + async fn call(self, msg: Message) -> Result<(), crate::errors::Errors> { 4985 + let mut msg = MessageParts::new(msg); 4986 + 4987 + $( 4988 + let $ty = match $ty::from_message(&mut msg).await { 4989 + Ok(value) => value, 4990 + Err(rejection) => return Err(rejection.into_error()), 4991 + }; 4992 + )* 4993 + 4994 + let res = self($($ty,)*).await.map_err(|x|x.into_error())?; 4995 + 4996 + Ok(res) 4997 + } 4998 + } 4999 + }; 5000 +} 5001 + 5002 +crate::utils::all_the_tuples!(impl_command); 5003 + 5004 pub use mrsbfh_macros::{command, command_generate, commands}; 5005 + 5006 +pub trait IntoError { 5007 + fn into_error(self) -> crate::errors::Errors; 5008 +} 5009 + 5010 +impl<T> IntoError for T 5011 +where 5012 + T: ToString, 5013 +{ 5014 + fn into_error(self) -> crate::errors::Errors { 5015 + crate::errors::Errors::CustomError(self.to_string()) 5016 + } 5017 +} 5018 diff --git a/mrsbfh/src/commands/extract.rs b/mrsbfh/src/commands/extract.rs 5019 new file mode 100644 5020 index 0000000..92b87c8 5021 --- /dev/null 5022 +++ b/mrsbfh/src/commands/extract.rs 5023 @@ -0,0 +1,242 @@ 5024 +use crate::commands::FromMessage; 5025 +use crate::commands::MessageParts; 5026 +use crate::errors::ExtensionRejection; 5027 +use std::any::{Any, TypeId}; 5028 +use std::collections::HashMap; 5029 +use std::fmt; 5030 +use std::hash::{BuildHasherDefault, Hasher}; 5031 +use std::ops::Deref; 5032 +use std::sync::Arc; 5033 +use tokio::sync::Mutex; 5034 + 5035 +type AnyMap = HashMap<TypeId, Box<dyn Any + Send + Sync>, BuildHasherDefault<IdHasher>>; 5036 + 5037 +// With TypeIds as keys, there's no need to hash them. They are already hashes 5038 +// themselves, coming from the compiler. The IdHasher just holds the u64 of 5039 +// the TypeId, and then returns it, instead of doing any bit fiddling. 5040 +#[derive(Default)] 5041 +struct IdHasher(u64); 5042 + 5043 +impl Hasher for IdHasher { 5044 + #[inline] 5045 + fn finish(&self) -> u64 { 5046 + self.0 5047 + } 5048 + 5049 + fn write(&mut self, _: &[u8]) { 5050 + unreachable!("TypeId calls write_u64"); 5051 + } 5052 + 5053 + #[inline] 5054 + fn write_u64(&mut self, id: u64) { 5055 + self.0 = id; 5056 + } 5057 +} 5058 +/// A type map of protocol extensions. 5059 +/// 5060 +/// `Extensions` can be used by `Messages` to store 5061 +/// extra data derived from the underlying protocol. 5062 +#[derive(Default)] 5063 +pub struct Extensions { 5064 + // If extensions are never used, no need to carry around an empty HashMap. 5065 + // That's 3 words. Instead, this is only 1 word. 5066 + map: Option<Box<AnyMap>>, 5067 +} 5068 + 5069 +impl fmt::Debug for Extensions { 5070 + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { 5071 + f.debug_struct("Extensions").finish() 5072 + } 5073 +} 5074 + 5075 +impl Extensions { 5076 + /// Create an empty `Extensions`. 5077 + #[inline] 5078 + pub fn new() -> Extensions { 5079 + Extensions { map: None } 5080 + } 5081 + 5082 + /// Insert a type into this `Extensions`. 5083 + /// 5084 + /// If a extension of this type already existed, it will 5085 + /// be returned. 5086 + /// 5087 + /// # Example 5088 + /// 5089 + /// ``` 5090 + /// use mrsbfh::commands::extract::Extensions; 5091 + /// use tokio::sync::Mutex; 5092 + /// use std::sync::Arc; 5093 + /// let mut ext = Extensions::new(); 5094 + /// assert!(ext.insert(Arc::new(Mutex::new(5i32))).is_none()); 5095 + /// assert!(ext.insert(Arc::new(Mutex::new(4u8))).is_none()); 5096 + /// ``` 5097 + pub fn insert<T: Send + Sync + 'static>(&mut self, val: Arc<Mutex<T>>) -> Option<T> { 5098 + self.map 5099 + .get_or_insert_with(|| Box::new(HashMap::default())) 5100 + .insert(TypeId::of::<Arc<Mutex<T>>>(), Box::new(val)) 5101 + .and_then(|boxed| { 5102 + (boxed as Box<dyn Any + 'static>) 5103 + .downcast() 5104 + .ok() 5105 + .map(|boxed| *boxed) 5106 + }) 5107 + } 5108 + 5109 + /// Get a reference to a type previously inserted on this `Extensions`. 5110 + /// 5111 + /// # Example 5112 + /// 5113 + /// ``` 5114 + /// # tokio::runtime::Runtime::new().unwrap().block_on(async { 5115 + /// use mrsbfh::commands::extract::Extensions; 5116 + /// use tokio::sync::Mutex; 5117 + /// use std::sync::Arc; 5118 + /// let mut ext = Extensions::new(); 5119 + /// assert!(ext.get::<i32>().is_none()); 5120 + /// ext.insert(Arc::new(Mutex::new(5i32))); 5121 + /// 5122 + /// assert_eq!(*ext.get::<i32>().unwrap().lock().await, 5i32); 5123 + /// }) 5124 + /// ``` 5125 + pub fn get<T: Send + Sync + 'static>(&self) -> Option<&Arc<Mutex<T>>> { 5126 + self.map 5127 + .as_ref() 5128 + .and_then(|map| map.get(&TypeId::of::<Arc<Mutex<T>>>())) 5129 + .and_then(|boxed| (&**boxed as &(dyn Any + 'static)).downcast_ref()) 5130 + } 5131 + 5132 + /// Get a mutable reference to a type previously inserted on this `Extensions`. 5133 + /// 5134 + /// # Example 5135 + /// 5136 + /// ``` 5137 + /// # tokio::runtime::Runtime::new().unwrap().block_on(async { 5138 + /// use mrsbfh::commands::extract::Extensions; 5139 + /// use std::sync::Arc; 5140 + /// use tokio::sync::Mutex; 5141 + /// let mut ext = Extensions::new(); 5142 + /// struct HelloWorld(String); 5143 + /// ext.insert(Arc::new(Mutex::new(HelloWorld(String::from("Hello"))))); 5144 + /// {ext.get_mut::<HelloWorld>().unwrap().lock().await.0 += " World";}; 5145 + /// 5146 + /// assert_eq!(ext.get::<HelloWorld>().unwrap().lock().await.0, "Hello World"); 5147 + /// }) 5148 + /// ``` 5149 + pub fn get_mut<T: Send + Sync + 'static>(&mut self) -> Option<&mut Arc<Mutex<T>>> { 5150 + self.map 5151 + .as_mut() 5152 + .and_then(|map| map.get_mut(&TypeId::of::<Arc<Mutex<T>>>())) 5153 + .and_then(|boxed| (&mut **boxed as &mut (dyn Any + 'static)).downcast_mut()) 5154 + } 5155 + 5156 + /// Remove a type from this `Extensions`. 5157 + /// 5158 + /// If a extension of this type existed, it will be returned. 5159 + /// 5160 + /// # Example 5161 + /// 5162 + /// ``` 5163 + /// # tokio::runtime::Runtime::new().unwrap().block_on(async { 5164 + /// use mrsbfh::commands::extract::Extensions; 5165 + /// let mut ext = Extensions::new(); 5166 + /// ext.insert(std::sync::Arc::new(tokio::sync::Mutex::new(5i32))); 5167 + /// assert_eq!(*ext.remove::<i32>().unwrap().lock().await, 5i32); 5168 + /// assert!(ext.get::<i32>().is_none()); 5169 + /// }) 5170 + /// ``` 5171 + pub fn remove<T: Send + Sync + 'static>(&mut self) -> Option<Arc<Mutex<T>>> { 5172 + self.map 5173 + .as_mut() 5174 + .and_then(|map| map.remove(&TypeId::of::<Arc<Mutex<T>>>())) 5175 + .and_then(|boxed| { 5176 + (boxed as Box<dyn Any + 'static>) 5177 + .downcast() 5178 + .ok() 5179 + .map(|boxed| *boxed) 5180 + }) 5181 + } 5182 + 5183 + /// Clear the `Extensions` of all inserted extensions. 5184 + /// 5185 + /// # Example 5186 + /// 5187 + /// ``` 5188 + /// # use mrsbfh::commands::extract::Extensions; 5189 + /// let mut ext = Extensions::new(); 5190 + /// ext.insert(std::sync::Arc::new(tokio::sync::Mutex::new(5i32))); 5191 + /// ext.clear(); 5192 + /// 5193 + /// assert!(ext.get::<i32>().is_none()); 5194 + /// ``` 5195 + #[inline] 5196 + pub fn clear(&mut self) { 5197 + if let Some(ref mut map) = self.map { 5198 + map.clear(); 5199 + } 5200 + } 5201 + 5202 + /// Check whether the extension set is empty or not. 5203 + /// 5204 + /// # Example 5205 + /// 5206 + /// ``` 5207 + /// # use mrsbfh::commands::extract::Extensions; 5208 + /// let mut ext = Extensions::new(); 5209 + /// assert!(ext.is_empty()); 5210 + /// ext.insert(std::sync::Arc::new(tokio::sync::Mutex::new(5i32))); 5211 + /// assert!(!ext.is_empty()); 5212 + /// ``` 5213 + #[inline] 5214 + pub fn is_empty(&self) -> bool { 5215 + self.map.as_ref().map_or(true, |map| map.is_empty()) 5216 + } 5217 + 5218 + /// Get the numer of extensions available. 5219 + /// 5220 + /// # Example 5221 + /// 5222 + /// ``` 5223 + /// # use mrsbfh::commands::extract::Extensions; 5224 + /// let mut ext = Extensions::new(); 5225 + /// assert_eq!(ext.len(), 0); 5226 + /// ext.insert(std::sync::Arc::new(tokio::sync::Mutex::new(5i32))); 5227 + /// assert_eq!(ext.len(), 1); 5228 + /// ``` 5229 + #[inline] 5230 + pub fn len(&self) -> usize { 5231 + self.map.as_ref().map_or(0, |map| map.len()) 5232 + } 5233 +} 5234 + 5235 +#[derive(Debug, Clone)] 5236 +pub struct Extension<T>(pub Arc<Mutex<T>>); 5237 + 5238 +impl<T> FromMessage for Extension<T> 5239 +where 5240 + T: Clone + Send + Sync + 'static, 5241 +{ 5242 + type Rejection = ExtensionRejection; 5243 + 5244 + async fn from_message(msg: &mut MessageParts) -> Result<Self, Self::Rejection> { 5245 + let value = msg 5246 + .extensions() 5247 + .get::<T>() 5248 + .ok_or_else(|| { 5249 + ExtensionRejection::MissingExtension(format!( 5250 + "Extension of type `{}` was not found. Perhaps you forgot to add it? See `axum::extract::Extension`.", 5251 + std::any::type_name::<Arc<Mutex<T>>>() 5252 + )) 5253 + }).cloned()?; 5254 + 5255 + Ok(Extension(value)) 5256 + } 5257 +} 5258 + 5259 +impl<T> Deref for Extension<T> { 5260 + type Target = Arc<Mutex<T>>; 5261 + 5262 + fn deref(&self) -> &Self::Target { 5263 + &self.0 5264 + } 5265 +} 5266 diff --git a/mrsbfh/src/config.rs b/mrsbfh/src/config.rs 5267 index ef2bd0e..91771f2 100644 5268 --- a/mrsbfh/src/config.rs 5269 +++ b/mrsbfh/src/config.rs 5270 @@ -7,15 +7,16 @@ 5271 //! 5272 //! The simplest way is to use the Derive macro [`#[derive(ConfigDerive)]`](crate::config::ConfigDerive) 5273 //! 5274 -//! It requires however that You also derive [Clone](std::clone::Clone), [Serialize](serde::Serialize) 5275 +//! It requires however that You also derive [Clone], [Serialize] 5276 //! and [Deserialize](serde::Deserialize). 5277 //! 5278 -//! Also this only works for yaml config files. For any other format you will to implement the trait 5279 -//! yourself. However the crate still needs to implement [Clone](std::clone::Clone). 5280 +//! Also, this only works for yaml config files. For any other format you will to implement the trait 5281 +//! yourself. However, the crate still needs to implement [Clone]. 5282 //! 5283 //! ## Example 5284 //! 5285 -//! ```compile_fail 5286 +//! ``` 5287 +//! use mrsbfh::config::ConfigDerive; 5288 //! use serde::{Deserialize, Serialize}; 5289 //! use std::borrow::Cow; 5290 //! 5291 diff --git a/mrsbfh/src/errors.rs b/mrsbfh/src/errors.rs 5292 index 0d3ba04..cad9316 100644 5293 --- a/mrsbfh/src/errors.rs 5294 +++ b/mrsbfh/src/errors.rs 5295 @@ -7,7 +7,7 @@ pub enum ConfigError { 5296 #[error(transparent)] 5297 IOError(#[from] std::io::Error), 5298 #[error(transparent)] 5299 - SerdeError(#[from] serde_yaml::Error), 5300 + SerdeError(#[from] serde_yml::Error), 5301 } 5302 5303 #[derive(Error, Debug)] 5304 @@ -17,3 +17,17 @@ pub enum SessionError { 5305 #[error(transparent)] 5306 SerdeError(#[from] serde_json::Error), 5307 } 5308 + 5309 +#[derive(Error, Debug)] 5310 +pub enum ExtensionRejection { 5311 + #[error("Extensions taken by other extractor")] 5312 + ExtensionsAlreadyExtracted, 5313 + #[error("{0}")] 5314 + MissingExtension(String), 5315 +} 5316 + 5317 +#[derive(Error, Debug)] 5318 +pub enum Errors { 5319 + #[error("{0}")] 5320 + CustomError(String), 5321 +} 5322 diff --git a/mrsbfh/src/lib.rs b/mrsbfh/src/lib.rs 5323 index 7b87908..7643a8d 100644 5324 --- a/mrsbfh/src/lib.rs 5325 +++ b/mrsbfh/src/lib.rs 5326 @@ -21,6 +21,7 @@ 5327 //! ## Examples 5328 //! 5329 //! For examples please have a look at the [example-bot](https://github.com/MTRNord/mrsbfh/tree/main/example-bot) or take a look in the individual modules. 5330 +#![warn(clippy::missing_const_for_fn)] 5331 5332 #[cfg(feature = "macros")] 5333 pub mod commands; 5334 @@ -32,56 +33,7 @@ pub mod errors; 5335 pub mod sync; 5336 pub mod utils; 5337 5338 -/// A wrapper type for the tokio sender channel with AnyMessageEventContent as content needed in multiple places 5339 -pub type Sender = tokio::sync::mpsc::Sender<matrix_sdk::ruma::events::AnyMessageEventContent>; 5340 - 5341 -/// An extension to simply do notices 5342 -#[async_trait::async_trait] 5343 -pub trait MatrixMessageExt { 5344 - async fn send_notice( 5345 - &mut self, 5346 - body: String, 5347 - formatted_body: Option<String>, 5348 - ) -> Result< 5349 - (), 5350 - tokio::sync::mpsc::error::SendError<matrix_sdk::ruma::events::AnyMessageEventContent>, 5351 - >; 5352 -} 5353 - 5354 -#[async_trait::async_trait] 5355 -impl MatrixMessageExt for Sender { 5356 - async fn send_notice( 5357 - &mut self, 5358 - body: String, 5359 - formatted_body: Option<String>, 5360 - ) -> Result< 5361 - (), 5362 - tokio::sync::mpsc::error::SendError<matrix_sdk::ruma::events::AnyMessageEventContent>, 5363 - > { 5364 - match formatted_body { 5365 - Some(formatted_body) => { 5366 - let content = matrix_sdk::ruma::events::AnyMessageEventContent::RoomMessage( 5367 - matrix_sdk::ruma::events::room::message::MessageEventContent::notice_html( 5368 - body, 5369 - formatted_body, 5370 - ), 5371 - ); 5372 - 5373 - self.send(content).await 5374 - } 5375 - None => { 5376 - let content = matrix_sdk::ruma::events::AnyMessageEventContent::RoomMessage( 5377 - matrix_sdk::ruma::events::room::message::MessageEventContent::notice_plain( 5378 - body, 5379 - ), 5380 - ); 5381 - self.send(content).await 5382 - } 5383 - } 5384 - } 5385 -} 5386 - 5387 -pub use serde_yaml; 5388 +pub use serde_yml; 5389 pub use tokio; 5390 pub use tracing; 5391 pub use url; 5392 diff --git a/mrsbfh/src/sync.rs b/mrsbfh/src/sync.rs 5393 index 9a0ab41..80e2531 100644 5394 --- a/mrsbfh/src/sync.rs 5395 +++ b/mrsbfh/src/sync.rs 5396 @@ -1,37 +1,29 @@ 5397 //! # Helpers for the sync process 5398 5399 -use matrix_sdk::{ 5400 - room::Room, 5401 - ruma::events::{room::member::MemberEventContent, StrippedStateEvent}, 5402 - Client, 5403 -}; 5404 +use matrix_sdk::{room::Room, ruma::events::room::member::StrippedRoomMemberEvent, Client}; 5405 use tracing::*; 5406 5407 -/// A small helper to auto join any incitation 5408 +/// A small helper to auto join any invitation 5409 /// 5410 /// To join just do this: 5411 -/// ```compile_fail 5412 -/// client.register_event_handler(mrsbfh::sync::autojoin).await; 5413 +/// ```ignore 5414 +/// client.add_event_handler(mrsbfh::sync::autojoin); 5415 /// ``` 5416 /// This will also automatically retry to join if that failed with increasing 5417 -/// delay between tries (numeber_of_tries*2) starting with a delay of 2. 5418 +/// delay between tries ($number\\_of\\_tries\cdot{}2$) starting with a delay of 2. 5419 /// It will print an error with the room id if the delay exceeds 3600s. 5420 /// 5421 -pub async fn autojoin( 5422 - room_member: StrippedStateEvent<MemberEventContent>, 5423 - client: Client, 5424 - room: Room, 5425 -) { 5426 +pub async fn autojoin(room_member: StrippedRoomMemberEvent, client: Client, room: Room) { 5427 // Autojoin logic 5428 - if room_member.state_key != client.user_id().await.unwrap() { 5429 + if room_member.state_key != client.user_id().unwrap() { 5430 debug!("Got invite that isn't for us"); 5431 return; 5432 } 5433 - if let matrix_sdk::room::Room::Invited(room) = room { 5434 + tokio::spawn(async move { 5435 info!("Autojoining room {}", room.room_id()); 5436 let mut delay = 2; 5437 5438 - while let Err(err) = room.accept_invitation().await { 5439 + while let Err(err) = room.join().await { 5440 // retry autojoin due to synapse sending invites, before the 5441 // invited user can join for more information see 5442 // https://github.com/matrix-org/synapse/issues/4345 5443 @@ -51,5 +43,5 @@ pub async fn autojoin( 5444 } 5445 } 5446 info!("Successfully joined room {}", room.room_id()); 5447 - } 5448 + }); 5449 } 5450 diff --git a/mrsbfh/src/utils.rs b/mrsbfh/src/utils.rs 5451 index 1031d0e..2169372 100644 5452 --- a/mrsbfh/src/utils.rs 5453 +++ b/mrsbfh/src/utils.rs 5454 @@ -2,26 +2,35 @@ 5455 //! 5456 //! ## Session 5457 //! 5458 -//! The easiest way to use the [Session](crate::utils::Session) struct is to use it like this: 5459 +//! The easiest way to use the [Session] struct is to use it like this: 5460 //! 5461 //! ```compile_fail 5462 -//! use matrix_sdk::Session as SDKSession; 5463 -//! 5464 +//! use matrix_sdk::matrix_auth::{MatrixSession, MatrixSessionTokens}; 5465 +//! use matrix_sdk::ruma::UserId; 5466 +//! use matrix_sdk::SessionMeta; 5467 +//! use mrsbfh::utils::Session; 5468 //! if let Some(session) = Session::load(config.session_path.parse().unwrap()) { 5469 -//! info!("Starting relogin"); 5470 +//! tracing::info!("Starting relogin"); 5471 //! 5472 -//! let session = SDKSession { 5473 -//! access_token: session.access_token, 5474 -//! device_id: session.device_id.into(), 5475 -//! user_id: matrix_sdk::identifiers::UserId::try_from(session.user_id.as_str()).unwrap(), 5476 -//! }; 5477 +//! let session = MatrixSession { 5478 +//! meta: SessionMeta { 5479 +//! user_id: <&UserId>::try_from(session.user_id.as_str()) 5480 +//! .unwrap() 5481 +//! .to_owned(), 5482 +//! device_id: session.device_id.into(), 5483 +//! }, 5484 +//! tokens: MatrixSessionTokens { 5485 +//! access_token: session.access_token, 5486 +//! refresh_token: None, 5487 +//! }, 5488 +//! }; 5489 //! 5490 //! if let Err(e) = client.restore_login(session).await { 5491 -//! error!("{}", e); 5492 +//! tracing::error!("{}", e); 5493 //! }; 5494 -//! info!("Finished relogin"); 5495 +//! tracing::info!("Finished relogin"); 5496 //! } else { 5497 -//! info!("Starting login"); 5498 +//! tracing::info!("Starting login"); 5499 //! let login_response = client 5500 //! .login( 5501 //! &config.mxid, 5502 @@ -32,7 +41,7 @@ 5503 //! .await; 5504 //! match login_response { 5505 //! Ok(login_response) => { 5506 -//! info!("Session: {:#?}", login_response); 5507 +//! tracing::info!("Session: {:#?}", login_response); 5508 //! let session = Session { 5509 //! homeserver: client.homeserver().to_string(), 5510 //! user_id: login_response.user_id.to_string(), 5511 @@ -41,9 +50,9 @@ 5512 //! }; 5513 //! session.save(config.session_path.parse().unwrap())?; 5514 //! } 5515 -//! Err(e) => error!("Error while login: {}", e), 5516 +//! Err(e) => tracing::error!("Error while login: {}", e), 5517 //! } 5518 -//! info!("Finished login"); 5519 +//! tracing::info!("Finished login"); 5520 //! } 5521 //! ``` 5522 //! 5523 @@ -52,7 +61,7 @@ 5524 //! This first checks if there is a session already existing and uses it to relogin using the known 5525 //! session data. 5526 //! 5527 -//! If not it creates and saves the [Session](crate::utils::Session) struct. Allowing for a relogin on the next start. 5528 +//! If not it creates and saves the [Session] struct. Allowing for a relogin on the next start. 5529 //! 5530 5531 use crate::errors::SessionError; 5532 @@ -60,7 +69,7 @@ use serde::{Deserialize, Serialize}; 5533 use std::path::PathBuf; 5534 use tracing::*; 5535 5536 -/// Informations needed to keep track about a session 5537 +/// Information needed to keep track about a session 5538 #[derive(Clone, Debug, Serialize, Deserialize)] 5539 pub struct Session { 5540 /// The homeserver used for this session. 5541 @@ -101,3 +110,26 @@ impl Session { 5542 } 5543 } 5544 } 5545 + 5546 +macro_rules! all_the_tuples { 5547 + ($name:ident) => { 5548 + $name!(T1); 5549 + $name!(T1, T2); 5550 + $name!(T1, T2, T3); 5551 + $name!(T1, T2, T3, T4); 5552 + $name!(T1, T2, T3, T4, T5); 5553 + $name!(T1, T2, T3, T4, T5, T6); 5554 + $name!(T1, T2, T3, T4, T5, T6, T7); 5555 + $name!(T1, T2, T3, T4, T5, T6, T7, T8); 5556 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9); 5557 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10); 5558 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11); 5559 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12); 5560 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13); 5561 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14); 5562 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15); 5563 + $name!(T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, T11, T12, T13, T14, T15, T16); 5564 + }; 5565 +} 5566 + 5567 +pub(crate) use all_the_tuples;