diff --git a/Cargo.lock b/Cargo.lock index 113ae25..fcfe0a9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -42,6 +42,17 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "aae1277d39aeec15cb388266ecc24b11c80469deae6067e17a1a7aa9e5c1f234" +[[package]] +name = "aead" +version = "0.6.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac8202ab55fcbf46ca829833f347a82a2a4ce0596f0304ac322c2d100030cd56" +dependencies = [ + "bytes", + "crypto-common 0.2.0-rc.4", + "inout", +] + [[package]] name = "ahash" version = "0.8.12" @@ -257,7 +268,7 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -289,7 +300,7 @@ checksum = "0a184645bcc6f52d69d8e7639720699c6a99efb711f886e251ed1d16db8dd90e" dependencies = [ "quote", "swc_macros_common", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -304,11 +315,24 @@ dependencies = [ "pin-project-lite", ] +[[package]] +name = "async-compat" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ba85bc55464dcbf728b56d97e119d673f4cf9062be330a9a26f3acf504a590" +dependencies = [ + "futures-core", + "futures-io", + "once_cell", + "pin-project-lite", + "tokio", +] + [[package]] name = "async-compression" -version = "0.4.33" +version = "0.4.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93c1f86859c1af3d514fa19e8323147ff10ea98684e6c7b307912509f50e67b2" +checksum = "0e86f6d3dc9dc4352edeea6b8e499e13e3f5dc3b964d7ca5fd411415a3498473" dependencies = [ "compression-codecs", "compression-core", @@ -331,7 +355,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -353,7 +377,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -364,7 +388,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -383,6 +407,17 @@ dependencies = [ "tungstenite 0.27.0", ] +[[package]] +name = "async_io_stream" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6d7b9decdf35d8908a7e3ef02f64c5e9b1695e230154c0e8de3969142d9b94c" +dependencies = [ + "futures", + "pharos", + "rustc_version", +] + [[package]] name = "atk" version = "0.18.2" @@ -421,6 +456,18 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" +[[package]] +name = "attohttpc" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16e2cdb6d5ed835199484bb92bb8b3edd526effe995c61732580439c1a67e2e9" +dependencies = [ + "base64 0.22.1", + "http", + "log", + "url", +] + [[package]] name = "autocfg" version = "1.5.0" @@ -455,7 +502,7 @@ dependencies = [ "serde_json", "serde_path_to_error", "serde_urlencoded", - "sha1", + "sha1 0.10.6", "sync_wrapper", "tokio", "tokio-tungstenite 0.28.0", @@ -515,7 +562,18 @@ checksum = "604fde5e028fea851ce1d8570bbdc034bec850d157f7569d10f347d06808c05c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", +] + +[[package]] +name = "backon" +version = "1.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cffb0e931875b666fc4fcb20fee52e9bbd1ef836fd9e9e04ec21555f9f85f7ef" +dependencies = [ + "fastrand", + "gloo-timers", + "tokio", ] [[package]] @@ -560,6 +618,12 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf" +[[package]] +name = "base16ct" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8b59d472eab27ade8d770dcb11da7201c11234bef9f82ce7aa517be028d462b" + [[package]] name = "base256emoji" version = "1.0.2" @@ -570,6 +634,12 @@ dependencies = [ "match-lookup", ] +[[package]] +name = "base32" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "022dfe9eb35f19ebbcb51e0b40a5ab759f46ad60cadf7297e0bd085afb50e076" + [[package]] name = "base64" version = "0.13.1" @@ -654,6 +724,19 @@ dependencies = [ "typenum", ] +[[package]] +name = "blake3" +version = "1.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" +dependencies = [ + "arrayref", + "arrayvec", + "cc", + "cfg-if", + "constant_time_eq", +] + [[package]] name = "block" version = "0.1.6" @@ -669,6 +752,16 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block-buffer" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96eb4cdd6cf1b31d671e9efe75c5d1ec614776856cefbe109ca373554a6d514f" +dependencies = [ + "hybrid-array", + "zeroize", +] + [[package]] name = "block2" version = "0.6.2" @@ -700,7 +793,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -711,9 +804,9 @@ checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" [[package]] name = "borsh" -version = "1.5.7" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ "cfg_aliases", ] @@ -865,9 +958,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.46" +version = "1.2.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97463e1064cb1b1c1384ad0a0b9c8abd0988e2a91f52606c80ef14aadb63e36" +checksum = "c481bdbf0ed3b892f6f806287d72acd515b352a4ec27a208489b8c1bc839633a" dependencies = [ "find-msvc-tools", "jobserver", @@ -923,6 +1016,18 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" +[[package]] +name = "chacha20" +version = "0.10.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bd162f2b8af3e0639d83f28a637e4e55657b7a74508dba5a9bf4da523d5c9e9" +dependencies = [ + "cfg-if", + "cipher", + "cpufeatures", + "zeroize", +] + [[package]] name = "charset" version = "0.1.5" @@ -994,6 +1099,18 @@ dependencies = [ "unsigned-varint", ] +[[package]] +name = "cipher" +version = "0.5.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e12a13eb01ded5d32ee9658d94f553a19e804204f2dc811df69ab4d9e0cb8c7" +dependencies = [ + "block-buffer 0.11.0", + "crypto-common 0.2.0-rc.4", + "inout", + "zeroize", +] + [[package]] name = "clap" version = "4.5.53" @@ -1027,7 +1144,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1098,9 +1215,9 @@ dependencies = [ [[package]] name = "compression-codecs" -version = "0.4.32" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "680dc087785c5230f8e8843e2e57ac7c1c90488b6a91b88caa265410568f441b" +checksum = "302266479cb963552d11bd042013a58ef1adc56768016c8b82b4199488f2d4ad" dependencies = [ "compression-core", "flate2", @@ -1109,9 +1226,9 @@ dependencies = [ [[package]] name = "compression-core" -version = "0.4.30" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a9b614a5787ef0c8802a55766480563cb3a93b435898c422ed2a359cf811582" +checksum = "75984efb6ed102a0d42db99afb6c1948f0380d1d91808d5529916e6c08b49d8d" [[package]] name = "concurrent-queue" @@ -1150,6 +1267,12 @@ version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" +[[package]] +name = "const-oid" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dabb6555f92fb9ee4140454eb5dcd14c7960e1225c6d1a6cc361f032947713e" + [[package]] name = "const-serialize" version = "0.6.2" @@ -1162,11 +1285,11 @@ dependencies = [ [[package]] name = "const-serialize" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd339aa356cc6452308fad2ee56623f900a8e68bc0ab9360a0ddb8270e5640c8" +checksum = "ad7154afa56de2f290e3c82c2c6dc4f5b282b6870903f56ef3509aba95866edc" dependencies = [ - "const-serialize-macro 0.7.1", + "const-serialize-macro 0.7.2", "serde", ] @@ -1178,18 +1301,18 @@ checksum = "04382d0d9df7434af6b1b49ea1a026ef39df1b0738b1cc373368cf175354f6eb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "const-serialize-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "797d158acb331e2a89d696343a27cd39bf7e36aaef33ba4799a5ef1526e24861" +checksum = "4f160aad86b4343e8d4e261fee9965c3005b2fd6bc117d172ab65948779e4acf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1224,6 +1347,12 @@ dependencies = [ "unicode-xid", ] +[[package]] +name = "constant_time_eq" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + [[package]] name = "content_disposition" version = "0.4.0" @@ -1257,6 +1386,15 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "convert_case" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "633458d4ef8c78b72454de2d54fd6ab2e60f9e02be22f3c6104cdc8a4e0fceb9" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "cookie" version = "0.18.1" @@ -1459,6 +1597,48 @@ dependencies = [ "typenum", ] +[[package]] +name = "crypto-common" +version = "0.2.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8235645834fbc6832939736ce2f2d08192652269e11010a6240f61b908a1c6" +dependencies = [ + "hybrid-array", + "rand_core 0.9.3", +] + +[[package]] +name = "crypto_box" +version = "0.10.0-pre.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bda4de3e070830cf3a27a394de135b6709aefcc54d1e16f2f029271254a6ed9" +dependencies = [ + "aead", + "chacha20", + "crypto_secretbox", + "curve25519-dalek 5.0.0-pre.1", + "salsa20", + "serdect 0.4.1", + "subtle", + "zeroize", +] + +[[package]] +name = "crypto_secretbox" +version = "0.2.0-pre.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "54532aae6546084a52cef855593daf9555945719eeeda9974150e0def854873e" +dependencies = [ + "aead", + "chacha20", + "cipher", + "hybrid-array", + "poly1305", + "salsa20", + "subtle", + "zeroize", +] + [[package]] name = "cssparser" version = "0.29.6" @@ -1483,7 +1663,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331" dependencies = [ "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1495,9 +1675,27 @@ dependencies = [ "cfg-if", "cpufeatures", "curve25519-dalek-derive", - "digest", - "fiat-crypto", + "digest 0.10.7", + "fiat-crypto 0.2.9", + "rustc_version", + "subtle", + "zeroize", +] + +[[package]] +name = "curve25519-dalek" +version = "5.0.0-pre.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f9200d1d13637f15a6acb71e758f64624048d85b31a5fdbfd8eca1e2687d0b7" +dependencies = [ + "cfg-if", + "cpufeatures", + "curve25519-dalek-derive", + "digest 0.11.0-rc.3", + "fiat-crypto 0.3.0", + "rand_core 0.9.3", "rustc_version", + "serde", "subtle", "zeroize", ] @@ -1510,7 +1708,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1544,7 +1742,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1558,7 +1756,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1569,7 +1767,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core 0.20.11", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1580,7 +1778,7 @@ checksum = "d38308df82d1080de0afee5d069fa14b0326a88c14f15c5ccda35b4a6c414c81" dependencies = [ "darling_core 0.21.3", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1633,7 +1831,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8d162beedaa69905488a8da94f5ac3edb4dd4788b732fadb7bd120b2625c1976" dependencies = [ "data-encoding", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1676,8 +1874,19 @@ version = "0.7.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb" dependencies = [ - "const-oid", - "pem-rfc7468", + "const-oid 0.9.6", + "pem-rfc7468 0.7.0", + "zeroize", +] + +[[package]] +name = "der" +version = "0.8.0-rc.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02c1d73e9668ea6b6a28172aa55f3ebec38507131ce179051c8033b5c6037653" +dependencies = [ + "const-oid 0.10.1", + "pem-rfc7468 1.0.0", "zeroize", ] @@ -1699,7 +1908,7 @@ checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1712,7 +1921,7 @@ dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1726,11 +1935,11 @@ dependencies = [ [[package]] name = "derive_more" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093242cf7570c207c83073cf82f79706fe7b8317e98620a47d5be7c3d8497678" +checksum = "10b768e943bed7bf2cab53df09f4bc34bfd217cdb57d971e769874c9a6710618" dependencies = [ - "derive_more-impl 2.0.1", + "derive_more-impl 2.1.0", ] [[package]] @@ -1741,19 +1950,21 @@ checksum = "cb7330aeadfbe296029522e6c40f315320aba36fc43a5b3632f3795348f3bd22" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "unicode-xid", ] [[package]] name = "derive_more-impl" -version = "2.0.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bda628edc44c4bb645fbe0f758797143e4e07926f7ebf4e9bdfbd3d2ce621df3" +checksum = "6d286bfdaf75e988b4a78e013ecd79c581e06399ab53fbacd2d916c2f904f30b" dependencies = [ + "convert_case 0.10.0", "proc-macro2", "quote", - "syn 2.0.110", + "rustc_version", + "syn 2.0.111", "unicode-xid", ] @@ -1765,9 +1976,9 @@ checksum = "ab03c107fafeb3ee9f5925686dbb7a73bc76e3932abb0d2b365cb64b169cf04c" [[package]] name = "diesel" -version = "2.3.3" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e7624a3bb9fffd82fff016be9a7f163d20e5a89eb8d28f9daaa6b30fff37500" +checksum = "0c415189028b232660655e4893e8bc25ca7aee8e96888db66d9edb400535456a" dependencies = [ "chrono", "diesel_derives", @@ -1794,22 +2005,22 @@ dependencies = [ [[package]] name = "diesel_derives" -version = "2.3.4" +version = "2.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9daac6489a36e42570da165a10c424f3edcefdff70c5fd55e1847c23f3dd7562" +checksum = "8587cbca3c929fb198e7950d761d31ca72b80aa6e07c1b7bec5879d187720436" dependencies = [ "diesel_table_macro_syntax", "dsl_auto_type", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "diesel_migrations" -version = "2.3.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee060f709c3e3b1cadd83fcd0f61711f7a8cf493348f758d3a1c1147d70b3c97" +checksum = "745fd255645f0f1135f9ec55c7b00e0882192af9683ab4731e4bba3da82b8f9c" dependencies = [ "diesel", "migrations_internals", @@ -1822,7 +2033,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fe2444076b48641147115697648dc743c2c00b61adade0f01ce67133c7babe8c" dependencies = [ - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -1837,12 +2048,23 @@ version = "0.10.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" dependencies = [ - "block-buffer", - "const-oid", - "crypto-common", + "block-buffer 0.10.4", + "const-oid 0.9.6", + "crypto-common 0.1.6", "subtle", ] +[[package]] +name = "digest" +version = "0.11.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dac89f8a64533a9b0eaa73a68e424db0fb1fd6271c74cc0125336a05f090568d" +dependencies = [ + "block-buffer 0.11.0", + "const-oid 0.10.1", + "crypto-common 0.2.0-rc.4", +] + [[package]] name = "dioxus" version = "0.6.3" @@ -1868,33 +2090,33 @@ dependencies = [ [[package]] name = "dioxus" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f76e820919058a685a1fdbb2ef4888c73ac77d623c39a7dfde2aa812947246be" +checksum = "3a115f9dbe5900c6044ee6a791e1b160c29989c6a8721eec099e01a964e5dae4" dependencies = [ "dioxus-asset-resolver", - "dioxus-cli-config 0.7.1", - "dioxus-config-macro 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-config-macro 0.7.2", "dioxus-config-macros", - "dioxus-core 0.7.1", - "dioxus-core-macro 0.7.1", + "dioxus-core 0.7.2", + "dioxus-core-macro 0.7.2", "dioxus-desktop", - "dioxus-devtools 0.7.1", - "dioxus-document 0.7.1", - "dioxus-fullstack 0.7.1", + "dioxus-devtools 0.7.2", + "dioxus-document 0.7.2", + "dioxus-fullstack 0.7.2", "dioxus-fullstack-macro", - "dioxus-history 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-html 0.7.1", + "dioxus-history 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-html 0.7.2", "dioxus-liveview", - "dioxus-logger 0.7.1", + "dioxus-logger 0.7.2", "dioxus-router", "dioxus-server", - "dioxus-signals 0.7.1", + "dioxus-signals 0.7.2", "dioxus-ssr", "dioxus-stores", - "dioxus-web 0.7.1", - "manganis 0.7.1", + "dioxus-web 0.7.2", + "manganis 0.7.2", "serde", "subsecond", "warnings", @@ -1903,11 +2125,11 @@ dependencies = [ [[package]] name = "dioxus-asset-resolver" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f6a124667ce5565c39fe2f33af45c21fe459c5bfcf7a8074ad12c9e9da5817c" +checksum = "6851ae49ba3988f1b77f6ef826eb142e811602129841c24bf5a4e103708d9844" dependencies = [ - "dioxus-cli-config 0.7.1", + "dioxus-cli-config 0.7.2", "http", "infer", "jni", @@ -1933,9 +2155,9 @@ dependencies = [ [[package]] name = "dioxus-cli-config" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "babc8eaf90379352bc4820830749fd231feb9312433d4094b4e7b79d912b3d96" +checksum = "c59e9d9da2e7334fdae5d77e3989207aa549062f74ff1ca2171393bbdd7fda90" dependencies = [ "wasm-bindgen", ] @@ -1952,9 +2174,9 @@ dependencies = [ [[package]] name = "dioxus-config-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30018b5b95567cee42febbb444d5e5e47dbe3e91fa6e44b9e571edad0184cd36" +checksum = "9bd56be5ea6c9f416b25e9e3adc910c02127be75b6d1ecd567661f31920b27ba" dependencies = [ "proc-macro2", "quote", @@ -1962,9 +2184,9 @@ dependencies = [ [[package]] name = "dioxus-config-macros" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a16b25f8761253ed5ffa4d0789376310fbbc1bbaa8190fc2f374db82c6285a1" +checksum = "c49327465c2d434d00fb4c86bd35ae72155b479622e09352b950d9ab4807bf23" [[package]] name = "dioxus-core" @@ -1989,16 +2211,16 @@ dependencies = [ [[package]] name = "dioxus-core" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75468d08468919f783b0f7ee826802f4e8e66c5b5a0451245d861c211ca18216" +checksum = "7400cbd21a98e585a13f8c29574da9b8afb2fd343f712618042b6c71761f0933" dependencies = [ "anyhow", "const_format", - "dioxus-core-types 0.7.1", + "dioxus-core-types 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "longest-increasing-subsequence", "rustc-hash 2.1.1", "rustversion", @@ -2007,7 +2229,6 @@ dependencies = [ "slotmap", "subsecond", "tracing", - "warnings", ] [[package]] @@ -2020,20 +2241,20 @@ dependencies = [ "dioxus-rsx 0.6.2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "dioxus-core-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f145abdb2a3f858456cb4382390863cf0398c228ad0733618f48891da7687be3" +checksum = "e51c0eb7eb76dd5a0b9a116d94d29ca78924a1ed1fcb7ea072eda5045d3ac056" dependencies = [ "convert_case 0.8.0", - "dioxus-rsx 0.7.1", + "dioxus-rsx 0.7.2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2047,15 +2268,15 @@ dependencies = [ [[package]] name = "dioxus-core-types" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36f5ecf5a51de06d78aded3b5f7516a258f53117cba718bc5706317a3c04c844" +checksum = "0652ab5f9c2c32261d44a3155debbfd909ed03d03434d7f70f5a796bf255c519" [[package]] name = "dioxus-desktop" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f493c74ff09410c5eadf42abd031d4b3d4032a4d5a2411c77d1d0d5156ca3687" +checksum = "b24aa7e4aa87fce202c5e67d560cddd9ed67ad533f16b7d922916c04993766ff" dependencies = [ "async-trait", "base64 0.22.1", @@ -2063,23 +2284,23 @@ dependencies = [ "cocoa", "core-foundation 0.10.1", "dioxus-asset-resolver", - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-devtools 0.7.1", - "dioxus-document 0.7.1", - "dioxus-history 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-html 0.7.1", - "dioxus-interpreter-js 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-devtools 0.7.2", + "dioxus-document 0.7.2", + "dioxus-history 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-html 0.7.2", + "dioxus-interpreter-js 0.7.2", + "dioxus-signals 0.7.2", "dunce", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "global-hotkey", "infer", "jni", - "lazy-js-bundle 0.7.1", + "lazy-js-bundle 0.7.2", "libc", "muda", "ndk", @@ -2124,14 +2345,14 @@ dependencies = [ [[package]] name = "dioxus-devtools" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4eb2c5019b7fa72e8e6b21ba99e9263bd390c9a30bbf09793b72f4b57ed7c3d7" +checksum = "9748128bcd102b10e58c765939807053ccab542206a939b8bab228077455c259" dependencies = [ - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-devtools-types 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-devtools-types 0.7.2", + "dioxus-signals 0.7.2", "futures-channel", "futures-util", "serde", @@ -2140,7 +2361,6 @@ dependencies = [ "thiserror 2.0.17", "tracing", "tungstenite 0.27.0", - "warnings", ] [[package]] @@ -2155,11 +2375,11 @@ dependencies = [ [[package]] name = "dioxus-devtools-types" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b007cec5b8548281921c4e4678926a3936e9d6757e951380685cc6121a6f974" +checksum = "48540ca8a0ab1ec81cd4db35f0c9713d43b158647fc1dcb0d79965fc3b41d96c" dependencies = [ - "dioxus-core 0.7.1", + "dioxus-core 0.7.2", "serde", "subsecond-types", ] @@ -2185,18 +2405,18 @@ dependencies = [ [[package]] name = "dioxus-document" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c55bcae9aaf150d4a141c61b3826da5a7ac23dfff09726568525cd46336e9a2" +checksum = "501a189b391d091c9aa02c05f5b25f5d0d17fa0e1016e000b0fdbb073d77cd6a" dependencies = [ - "dioxus-core 0.7.1", - "dioxus-core-macro 0.7.1", - "dioxus-core-types 0.7.1", - "dioxus-html 0.7.1", + "dioxus-core 0.7.2", + "dioxus-core-macro 0.7.2", + "dioxus-core-types 0.7.2", + "dioxus-html 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", - "lazy-js-bundle 0.7.1", + "generational-box 0.7.2", + "lazy-js-bundle 0.7.2", "serde", "serde_json", "tracing", @@ -2236,9 +2456,9 @@ dependencies = [ [[package]] name = "dioxus-fullstack" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff04cef82d6639eb15186f626298645dbd92978bf66dc3efd2e5984a2ff4a1ff" +checksum = "54150804265defdb21a6f2d8914a45316a1e7fb70ab22c30cf836e8fe2f8081b" dependencies = [ "anyhow", "async-stream", @@ -2252,15 +2472,15 @@ dependencies = [ "const-str 0.7.0", "const_format", "content_disposition", - "derive_more 2.0.1", + "derive_more 2.1.0", "dioxus-asset-resolver", - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", "dioxus-fullstack-core", "dioxus-fullstack-macro", - "dioxus-hooks 0.7.1", - "dioxus-html 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-hooks 0.7.2", + "dioxus-html 0.7.2", + "dioxus-signals 0.7.2", "form_urlencoded", "futures", "futures-channel", @@ -2301,22 +2521,22 @@ dependencies = [ [[package]] name = "dioxus-fullstack-core" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41281c7cd4d311a50933256e19a5d91d0d950ad350dd3232bd4321fdd3a59fb0" +checksum = "d0a9be2ef4d701520eefef284d218fb35b159dccd6bccc02b5bad42945e2599d" dependencies = [ "anyhow", "axum-core", "base64 0.22.1", "ciborium", - "dioxus-core 0.7.1", - "dioxus-document 0.7.1", - "dioxus-history 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-core 0.7.2", + "dioxus-document 0.7.2", + "dioxus-history 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-signals 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "http", "inventory", "parking_lot", @@ -2329,15 +2549,15 @@ dependencies = [ [[package]] name = "dioxus-fullstack-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae73023c8b8fee2692fc50a28063336f0b6930e86727e30c1047c92d30805b49" +checksum = "a31ea4451fe8c9d2af24fb718a94966d5fd7e11325777e5b5a59085c5c85e5fb" dependencies = [ "const_format", "convert_case 0.8.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "xxhash-rust", ] @@ -2353,11 +2573,11 @@ dependencies = [ [[package]] name = "dioxus-history" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac73657da5c7a20629482d774b52f4a4f7cb57a520649f1d855d4073e809c98" +checksum = "55d704b3ba9504cb3c9cde49499b75546d1faaff2736f4c368aca6c061c48ac3" dependencies = [ - "dioxus-core 0.7.1", + "dioxus-core 0.7.2", "tracing", ] @@ -2380,19 +2600,18 @@ dependencies = [ [[package]] name = "dioxus-hooks" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffd445f16d64939e06cd71a1c63a665f383fda6b7882f4c6f8f1bd6efca2046" +checksum = "79c6d68be372eca8186a1c57ec49be67a6ea46022150b5e85ab6a6acde52d272" dependencies = [ - "dioxus-core 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-core 0.7.2", + "dioxus-signals 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "rustversion", "slab", "tracing", - "warnings", ] [[package]] @@ -2419,24 +2638,24 @@ dependencies = [ [[package]] name = "dioxus-html" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f407fc73a9554a644872fcccc9faf762acad8f45158e3d67e42ab8dd42f4586" +checksum = "3aa87ecfa0f38ec286be25789a7f2d6c30778111f1fbff563da4bae41d171496" dependencies = [ "async-trait", "bytes", - "dioxus-core 0.7.1", - "dioxus-core-macro 0.7.1", - "dioxus-core-types 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-html-internal-macro 0.7.1", + "dioxus-core 0.7.2", + "dioxus-core-macro 0.7.2", + "dioxus-core-types 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-html-internal-macro 0.7.2", "enumset", "euclid", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "keyboard-types", - "lazy-js-bundle 0.7.1", + "lazy-js-bundle 0.7.2", "rustversion", "serde", "serde_json", @@ -2453,19 +2672,19 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "dioxus-html-internal-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a968aae4bc92de87cbac3d0d043803b25a7c62c187841e61adcc9b49917c2b2a" +checksum = "49301d0e389378e8070b8b704110339a0d3358efad9f5ad483ffab3a8d406dae" dependencies = [ "convert_case 0.8.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2486,15 +2705,15 @@ dependencies = [ [[package]] name = "dioxus-interpreter-js" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83ab170d89308399205f8ad3d43d8d419affe317016b41ca0695186f7593cba2" +checksum = "f5437a89d3ef7edfebc0f10acb065f1709cb7ffb678e3a4bb1416706d71f7c67" dependencies = [ - "dioxus-core 0.7.1", - "dioxus-core-types 0.7.1", - "dioxus-html 0.7.1", + "dioxus-core 0.7.2", + "dioxus-core-types 0.7.2", + "dioxus-html 0.7.2", "js-sys", - "lazy-js-bundle 0.7.1", + "lazy-js-bundle 0.7.2", "rustc-hash 2.1.1", "serde", "sledgehammer_bindgen", @@ -2524,21 +2743,21 @@ dependencies = [ [[package]] name = "dioxus-liveview" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca4f2850ec1a468c6f15b578c43218562d2309aadaf2b8bf17f54ce30e72f594" +checksum = "f690466a88cc93d7f87e1735aab9cb4a83c70f452ed344a32559577e80505da4" dependencies = [ "axum", - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-devtools 0.7.1", - "dioxus-document 0.7.1", - "dioxus-history 0.7.1", - "dioxus-html 0.7.1", - "dioxus-interpreter-js 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-devtools 0.7.2", + "dioxus-document 0.7.2", + "dioxus-history 0.7.2", + "dioxus-html 0.7.2", + "dioxus-interpreter-js 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "rustc-hash 2.1.1", "serde", "serde_json", @@ -2565,11 +2784,11 @@ dependencies = [ [[package]] name = "dioxus-logger" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42237934c6a67f5ed9a8c37e47ca980ee7cfec9e783a9a1f8c2e36c8b96ae74b" +checksum = "2b25ebfbc193cebcf5af5e19b8ee7c6adee486fbd1c12f11aea058b464da16f9" dependencies = [ - "dioxus-cli-config 0.7.1", + "dioxus-cli-config 0.7.2", "tracing", "tracing-subscriber", "tracing-wasm", @@ -2578,9 +2797,9 @@ dependencies = [ [[package]] name = "dioxus-primitives" version = "0.0.1" -source = "git+https://github.com/DioxusLabs/components#a15f329d1dc2bd76cd4030b27ecd70edb9fd8c6b" +source = "git+https://github.com/DioxusLabs/components#f165b24277a8f04a2d78a6303effb9ba3a86c285" dependencies = [ - "dioxus 0.7.1", + "dioxus 0.7.2", "dioxus-time", "lazy-js-bundle 0.6.2", "num-integer", @@ -2590,19 +2809,19 @@ dependencies = [ [[package]] name = "dioxus-router" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf1b95b7cafd07a2b39651ab2b146e4aa72acb0295cd52f422b7db5e2ab6eeb" +checksum = "18282604175f38d8c9291946ad6b34899657e47aef994fbbe6defb501a000f33" dependencies = [ - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-core-macro 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-core-macro 0.7.2", "dioxus-fullstack-core", - "dioxus-history 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-html 0.7.1", + "dioxus-history 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-html 0.7.2", "dioxus-router-macro", - "dioxus-signals 0.7.1", + "dioxus-signals 0.7.2", "percent-encoding", "rustversion", "tracing", @@ -2611,17 +2830,17 @@ dependencies = [ [[package]] name = "dioxus-router-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a292046c5d166046ae027fce47b177a733946cf1efc8d006de9f4064f69110cd" +checksum = "47340b339c2c3f042b190f541b7241e2547b2e703f813d34ea24b963330c6757" dependencies = [ "base16", - "digest", + "digest 0.10.7", "proc-macro2", "quote", - "sha2", + "sha2 0.10.9", "slab", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2633,19 +2852,20 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "dioxus-rsx" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f026380dfda8b93ad995c0a90a62a17b8afeb246baff1b781a52c7b1b3ebd791" +checksum = "19d97c02689beff55767ba5f6e185ffd204c6a193e372f0fead8a3722c6f7eea" dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.110", + "rustversion", + "syn 2.0.111", ] [[package]] @@ -2663,7 +2883,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80c25ae93a3f72e734873b97fbd09d9b1b6adff97205fb0ffd8543e3564fb78e" dependencies = [ - "dioxus 0.7.1", + "dioxus 0.7.2", "futures", "gloo-timers", "tokio", @@ -2671,9 +2891,9 @@ dependencies = [ [[package]] name = "dioxus-server" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "012e972802d2dc4f4afab89bb4c7695e6a7b8b8a81b6bc30d43c1a42e11eb6ff" +checksum = "2d608c33c39f032469c6eb59f361dc2724799724d8b3e15c824d1047e664c087" dependencies = [ "anyhow", "async-trait", @@ -2683,31 +2903,31 @@ dependencies = [ "chrono", "ciborium", "dashmap 6.1.0", - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-core-macro 0.7.1", - "dioxus-devtools 0.7.1", - "dioxus-document 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-core-macro 0.7.2", + "dioxus-devtools 0.7.2", + "dioxus-document 0.7.2", "dioxus-fullstack-core", - "dioxus-history 0.7.1", - "dioxus-hooks 0.7.1", - "dioxus-html 0.7.1", - "dioxus-interpreter-js 0.7.1", - "dioxus-logger 0.7.1", + "dioxus-history 0.7.2", + "dioxus-hooks 0.7.2", + "dioxus-html 0.7.2", + "dioxus-interpreter-js 0.7.2", + "dioxus-logger 0.7.2", "dioxus-router", - "dioxus-signals 0.7.1", + "dioxus-signals 0.7.2", "dioxus-ssr", "enumset", "futures", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "http", "http-body-util", "hyper", "hyper-util", "inventory", - "lru", + "lru 0.16.2", "parking_lot", "pin-project", "rustc-hash 2.1.1", @@ -2746,14 +2966,14 @@ dependencies = [ [[package]] name = "dioxus-signals" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3895cc17ff5b43ada07743111be586e7a927ed7ec511457020e4235e13e63fe6" +checksum = "27fc4df7a31a7f02e5a0b40884bb66ee165226a05d75fce03baa44029e438762" dependencies = [ - "dioxus-core 0.7.1", + "dioxus-core 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "parking_lot", "rustc-hash 2.1.1", "tracing", @@ -2762,37 +2982,38 @@ dependencies = [ [[package]] name = "dioxus-ssr" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "592391fc30a77f94bc5a3385d1569052907e3b3cecb28099671b9d5801dee6c6" +checksum = "088efddedd39fc29d007bc91c8a61b25130355149ea5313469f96fb695c5e3ab" dependencies = [ "askama_escape 0.13.0", - "dioxus-core 0.7.1", - "dioxus-core-types 0.7.1", + "dioxus-core 0.7.2", + "dioxus-core-types 0.7.2", "rustc-hash 2.1.1", ] [[package]] name = "dioxus-stores" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8521729ac35f362476ac4eb7d1c4ab79e7e92a0facfdea3ee978c0ddf7108d37" +checksum = "e2dec3cd677078824a733de25ddbe8e987cfc8d98aec29b7d199e1fdb8452b96" dependencies = [ - "dioxus-core 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-core 0.7.2", + "dioxus-signals 0.7.2", "dioxus-stores-macro", + "generational-box 0.7.2", ] [[package]] name = "dioxus-stores-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23a733d2684dc843e81954f6176b3353e4cfc71b6978a8e464591bb5536f610b" +checksum = "c9b7f085e374aaaa78403227b9bd83675c4078388d41a41b67dfbe4aa0bb64d5" dependencies = [ "convert_case 0.8.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2800,7 +3021,7 @@ name = "dioxus-time" version = "0.7.0" source = "git+https://github.com/ealmloff/dioxus-std?branch=0.7#8c868ac1d60e3232e3f16f6195d6deb3c016de17" dependencies = [ - "dioxus 0.7.1", + "dioxus 0.7.2", "futures", "gloo-timers", "tokio", @@ -2816,7 +3037,7 @@ dependencies = [ "swc_ecma_ast", "swc_ecma_parser", "swc_ecma_visit", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2853,26 +3074,26 @@ dependencies = [ [[package]] name = "dioxus-web" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76155ecd44535e7c096ec8c5aac4a945899e47567ead4869babdaa74f3f9bca0" +checksum = "315009f3a77c3c813415b3b8a8ea62a4d7a32dde9a666664b30862d4386e8456" dependencies = [ - "dioxus-cli-config 0.7.1", - "dioxus-core 0.7.1", - "dioxus-core-types 0.7.1", - "dioxus-devtools 0.7.1", - "dioxus-document 0.7.1", + "dioxus-cli-config 0.7.2", + "dioxus-core 0.7.2", + "dioxus-core-types 0.7.2", + "dioxus-devtools 0.7.2", + "dioxus-document 0.7.2", "dioxus-fullstack-core", - "dioxus-history 0.7.1", - "dioxus-html 0.7.1", - "dioxus-interpreter-js 0.7.1", - "dioxus-signals 0.7.1", + "dioxus-history 0.7.2", + "dioxus-html 0.7.2", + "dioxus-interpreter-js 0.7.2", + "dioxus-signals 0.7.2", "futures-channel", "futures-util", - "generational-box 0.7.1", + "generational-box 0.7.2", "gloo-timers", "js-sys", - "lazy-js-bundle 0.7.1", + "lazy-js-bundle 0.7.2", "rustc-hash 2.1.1", "send_wrapper", "serde", @@ -2894,7 +3115,7 @@ dependencies = [ "proc-macro2", "quote", "server_fn_macro", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2944,7 +3165,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -2958,9 +3179,20 @@ dependencies = [ [[package]] name = "dlopen2" -version = "0.8.0" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" +dependencies = [ + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b54f373ccf864bf587a89e880fb7610f8d73f3045f13580948ccbcaff26febff" +checksum = "8d65cde5fb0c42a3d5882d99807698b459f5928de035fa7f547c784fb7b34219" dependencies = [ "dlopen2_derive", "libc", @@ -2970,13 +3202,13 @@ dependencies = [ [[package]] name = "dlopen2_derive" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "788160fb30de9cdd857af31c6a2675904b16ece8fc2737b2c7127ba368c9d0f4" +checksum = "95f4a04e1bfbfa4835a6073177aafb95ead4de0722dbb339195fdc7e0a09599b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3023,7 +3255,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3059,12 +3291,12 @@ version = "0.16.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca" dependencies = [ - "der", - "digest", + "der 0.7.10", + "digest 0.10.7", "elliptic-curve", "rfc6979", - "signature", - "spki", + "signature 2.2.0", + "spki 0.7.3", ] [[package]] @@ -3073,7 +3305,18 @@ version = "2.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "115531babc129696a58c64a4fef0a8bf9e9698629fb97e9e40767d235cfbcd53" dependencies = [ - "signature", + "signature 2.2.0", +] + +[[package]] +name = "ed25519" +version = "3.0.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "594435fe09e345ee388e4e8422072ff7dfeca8729389fbd997b3f5504c44cd47" +dependencies = [ + "pkcs8 0.11.0-rc.8", + "serde", + "signature 3.0.0-rc.5", ] [[package]] @@ -3082,39 +3325,55 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70e796c081cee67dc755e1a36a0a172b897fab85fc3f6bc48307991f64e4eca9" dependencies = [ - "curve25519-dalek", - "ed25519", + "curve25519-dalek 4.1.3", + "ed25519 2.2.3", "rand_core 0.6.4", - "sha2", + "sha2 0.10.9", "subtle", "zeroize", ] [[package]] -name = "either" -version = "1.15.0" +name = "ed25519-dalek" +version = "3.0.0-pre.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" - +checksum = "ad207ed88a133091f83224265eac21109930db09bedcad05d5252f2af2de20a1" +dependencies = [ + "curve25519-dalek 5.0.0-pre.1", + "ed25519 3.0.0-rc.2", + "rand_core 0.9.3", + "serde", + "sha2 0.11.0-rc.2", + "signature 3.0.0-rc.5", + "subtle", + "zeroize", +] + +[[package]] +name = "either" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" + [[package]] name = "elliptic-curve" version = "0.13.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47" dependencies = [ - "base16ct", + "base16ct 0.2.0", "base64ct", "crypto-bigint", - "digest", + "digest 0.10.7", "ff", "generic-array", "group", - "pem-rfc7468", - "pkcs8", + "pem-rfc7468 0.7.0", + "pkcs8 0.10.2", "rand_core 0.6.4", "sec1", "serde_json", - "serdect", + "serdect 0.2.0", "subtle", "zeroize", ] @@ -3148,9 +3407,9 @@ dependencies = [ [[package]] name = "endi" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3d8a32ae18130a3c84dd492d4215c3d913c3b07c6b63c2eb3eb7ff1101ab7bf" +checksum = "66b7e2430c6dff6a955451e2cfc438f09cea1965a9d6f87f7e3b90decc014099" [[package]] name = "ensure-cov" @@ -3179,7 +3438,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3191,7 +3450,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3212,7 +3471,7 @@ checksum = "67c78a4d8fdf9953a5c9d458f9efe940fd97a0cab0941c075a813ac594733827" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3233,7 +3492,7 @@ dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3325,6 +3584,12 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "fiat-crypto" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64cd1e32ddd350061ae6edb1b082d7c54915b5c672c389143b9a63403a109f24" + [[package]] name = "field-offset" version = "0.3.6" @@ -3353,11 +3618,17 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3a3076410a55c90011c298b04d0cfa770b00fa04e1e3c97d3f6c9de105a03844" +[[package]] +name = "fixedbitset" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" + [[package]] name = "flate2" -version = "1.1.5" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfe33edd8e85a12a67454e37f8c75e730830d83e313556ab9ebf9ee7fbeb3bfb" +checksum = "a2152dbcb980c05735e2a651d96011320a949eb31a0c8b38b72645ce97dec676" dependencies = [ "crc32fast", "miniz_oxide", @@ -3447,7 +3718,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3478,7 +3749,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "308530a56b099da144ebc5d8e179f343ad928fa2b3558d1eb3db9af18d6eff43" dependencies = [ "swc_macros_common", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3529,6 +3800,21 @@ dependencies = [ "futures-sink", ] +[[package]] +name = "futures-concurrency" +version = "7.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0eb68017df91f2e477ed4bea586c59eaecaa47ed885a770d0444e21e62572cd2" +dependencies = [ + "fixedbitset", + "futures-buffered", + "futures-core", + "futures-lite", + "pin-project", + "slab", + "smallvec", +] + [[package]] name = "futures-core" version = "0.3.31" @@ -3573,7 +3859,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -3712,9 +3998,9 @@ dependencies = [ [[package]] name = "generational-box" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c1ae09dfd2d455484a54b56129b9821241c4b0e412227806b6c3730cd18a29" +checksum = "e658d10252a15200ca4a1c67c7180fc0baffa3f92869bbd903025daf6f70fd65" dependencies = [ "parking_lot", "tracing", @@ -3731,7 +4017,7 @@ dependencies = [ "libc", "log", "rustversion", - "windows", + "windows 0.61.3", ] [[package]] @@ -3899,7 +4185,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4074,7 +4360,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4194,7 +4480,7 @@ dependencies = [ "http", "httpdate", "mime", - "sha1", + "sha1 0.10.6", ] [[package]] @@ -4294,6 +4580,36 @@ dependencies = [ "url", ] +[[package]] +name = "hickory-proto" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8a6fe56c0038198998a6f217ca4e7ef3a5e51f46163bd6dd60b5c71ca6c6502" +dependencies = [ + "async-trait", + "bytes", + "cfg-if", + "data-encoding", + "enum-as-inner 0.6.1", + "futures-channel", + "futures-io", + "futures-util", + "h2", + "http", + "idna", + "ipnet", + "once_cell", + "rand 0.9.2", + "ring", + "rustls", + "thiserror 2.0.17", + "tinyvec", + "tokio", + "tokio-rustls", + "tracing", + "url", +] + [[package]] name = "hickory-resolver" version = "0.24.4" @@ -4302,7 +4618,7 @@ checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e" dependencies = [ "cfg-if", "futures-util", - "hickory-proto", + "hickory-proto 0.24.4", "ipconfig", "lru-cache", "once_cell", @@ -4315,13 +4631,36 @@ dependencies = [ "tracing", ] +[[package]] +name = "hickory-resolver" +version = "0.25.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc62a9a99b0bfb44d2ab95a7208ac952d31060efc16241c87eaf36406fecf87a" +dependencies = [ + "cfg-if", + "futures-util", + "hickory-proto 0.25.2", + "ipconfig", + "moka", + "once_cell", + "parking_lot", + "rand 0.9.2", + "resolv-conf", + "rustls", + "smallvec", + "thiserror 2.0.17", + "tokio", + "tokio-rustls", + "tracing", +] + [[package]] name = "hmac" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "digest", + "digest 0.10.7", ] [[package]] @@ -4348,7 +4687,7 @@ dependencies = [ "markup5ever 0.12.1", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4365,12 +4704,11 @@ dependencies = [ [[package]] name = "http" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" +checksum = "e3ba2a386d7f85a81f119ad7498ebe444d2e22c2af0b86b069416ace48b3311a" dependencies = [ "bytes", - "fnv", "itoa", ] @@ -4424,6 +4762,16 @@ dependencies = [ "libm", ] +[[package]] +name = "hybrid-array" +version = "0.4.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f471e0a81b2f90ffc0cb2f951ae04da57de8baa46fa99112b062a5173a5088d0" +dependencies = [ + "typenum", + "zeroize", +] + [[package]] name = "hyper" version = "1.8.1" @@ -4466,9 +4814,9 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.18" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52e9a2a24dc5c6821e71a7030e1e14b7b632acac55c40e9d2e082c621261bb56" +checksum = "727805d60e7938b76b826a6ef209eb70eaa1812794f9424d4a4e2d740662df5f" dependencies = [ "base64 0.22.1", "bytes", @@ -4485,6 +4833,7 @@ dependencies = [ "socket2 0.6.1", "system-configuration", "tokio", + "tower-layer", "tower-service", "tracing", "windows-registry", @@ -4622,6 +4971,27 @@ dependencies = [ "icu_properties", ] +[[package]] +name = "igd-next" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "516893339c97f6011282d5825ac94fc1c7aad5cad26bdc2d0cee068c0bf97f97" +dependencies = [ + "async-trait", + "attohttpc", + "bytes", + "futures", + "http", + "http-body-util", + "hyper", + "hyper-util", + "log", + "rand 0.9.2", + "tokio", + "url", + "xmltree", +] + [[package]] name = "ignore" version = "0.4.25" @@ -4710,11 +5080,20 @@ dependencies = [ "cfb", ] +[[package]] +name = "inout" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7357b6e7aa75618c7864ebd0634b115a7218b0615f4cb1df33ac3eca23943d4" +dependencies = [ + "hybrid-array", +] + [[package]] name = "insta" -version = "1.44.1" +version = "1.44.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8732d3774162a0851e3f2b150eb98f31a9885dd75985099421d393385a01dfd" +checksum = "b5c943d4415edd8153251b6f197de5eb1640e56d84e8d9159bea190421c73698" dependencies = [ "console", "once_cell", @@ -4722,6 +5101,18 @@ dependencies = [ "similar", ] +[[package]] +name = "instant" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "inventory" version = "0.3.21" @@ -4755,19 +5146,291 @@ dependencies = [ ] [[package]] -name = "ipnet" -version = "2.11.0" +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "iri-string" +version = "0.7.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +dependencies = [ + "memchr", + "serde", +] + +[[package]] +name = "iroh" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2374ba3cdaac152dc6ada92d971f7328e6408286faab3b7350842b2ebbed4789" +dependencies = [ + "aead", + "backon", + "bytes", + "cfg_aliases", + "crypto_box", + "data-encoding", + "derive_more 2.1.0", + "ed25519-dalek 3.0.0-pre.1", + "futures-util", + "getrandom 0.3.4", + "hickory-resolver 0.25.2", + "http", + "igd-next", + "instant", + "iroh-base", + "iroh-metrics", + "iroh-quinn", + "iroh-quinn-proto", + "iroh-quinn-udp", + "iroh-relay", + "n0-error", + "n0-future 0.3.1", + "n0-watcher", + "netdev", + "netwatch", + "pin-project", + "pkarr", + "pkcs8 0.11.0-rc.8", + "portmapper", + "rand 0.9.2", + "reqwest", + "rustls", + "rustls-pki-types", + "rustls-platform-verifier", + "rustls-webpki", + "serde", + "smallvec", + "strum", + "time", + "tokio", + "tokio-stream", + "tokio-util", + "tracing", + "url", + "wasm-bindgen-futures", + "webpki-roots", + "z32", +] + +[[package]] +name = "iroh-base" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25a8c5fb1cc65589f0d7ab44269a76f615a8c4458356952c9b0ef1c93ea45ff8" +dependencies = [ + "curve25519-dalek 5.0.0-pre.1", + "data-encoding", + "derive_more 2.1.0", + "ed25519-dalek 3.0.0-pre.1", + "n0-error", + "rand_core 0.9.3", + "serde", + "url", + "zeroize", + "zeroize_derive", +] + +[[package]] +name = "iroh-gossip" +version = "0.95.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "026dd31b487ec5e80ac0240f4eb70cd6c0a2800f6ef44beca5329443c194bb22" +dependencies = [ + "blake3", + "bytes", + "data-encoding", + "derive_more 2.1.0", + "ed25519-dalek 3.0.0-pre.1", + "futures-concurrency", + "futures-lite", + "futures-util", + "hex", + "indexmap 2.12.1", + "iroh", + "iroh-base", + "iroh-metrics", + "irpc", + "n0-error", + "n0-future 0.3.1", + "postcard", + "rand 0.9.2", + "serde", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "iroh-metrics" +version = "0.37.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "79e3381da7c93c12d353230c74bba26131d1c8bf3a4d8af0fec041546454582e" +dependencies = [ + "iroh-metrics-derive", + "itoa", + "n0-error", + "postcard", + "ryu", + "serde", + "tracing", +] + +[[package]] +name = "iroh-metrics-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4e12bd0763fd16062f5cc5e8db15dd52d26e75a8af4c7fb57ccee3589b344b8" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.111", +] + +[[package]] +name = "iroh-quinn" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0cde160ebee7aabede6ae887460cd303c8b809054224815addf1469d54a6fcf7" +dependencies = [ + "bytes", + "cfg_aliases", + "iroh-quinn-proto", + "iroh-quinn-udp", + "pin-project-lite", + "rustc-hash 2.1.1", + "rustls", + "socket2 0.5.10", + "thiserror 2.0.17", + "tokio", + "tracing", + "web-time", +] + +[[package]] +name = "iroh-quinn-proto" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "929d5d8fa77d5c304d3ee7cae9aede31f13908bd049f9de8c7c0094ad6f7c535" +dependencies = [ + "bytes", + "getrandom 0.2.16", + "rand 0.8.5", + "ring", + "rustc-hash 2.1.1", + "rustls", + "rustls-pki-types", + "slab", + "thiserror 2.0.17", + "tinyvec", + "tracing", + "web-time", +] + +[[package]] +name = "iroh-quinn-udp" +version = "0.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c53afaa1049f7c83ea1331f5ebb9e6ebc5fdd69c468b7a22dd598b02c9bcc973" +dependencies = [ + "cfg_aliases", + "libc", + "once_cell", + "socket2 0.5.10", + "tracing", + "windows-sys 0.59.0", +] + +[[package]] +name = "iroh-relay" +version = "0.95.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "43fbdf2aeffa7d6ede1a31f6570866c2199b1cee96a0b563994623795d1bac2c" +dependencies = [ + "blake3", + "bytes", + "cfg_aliases", + "data-encoding", + "derive_more 2.1.0", + "getrandom 0.3.4", + "hickory-resolver 0.25.2", + "http", + "http-body-util", + "hyper", + "hyper-util", + "iroh-base", + "iroh-metrics", + "iroh-quinn", + "iroh-quinn-proto", + "lru 0.16.2", + "n0-error", + "n0-future 0.3.1", + "num_enum", + "pin-project", + "pkarr", + "postcard", + "rand 0.9.2", + "reqwest", + "rustls", + "rustls-pki-types", + "serde", + "serde_bytes", + "sha1 0.11.0-rc.2", + "strum", + "tokio", + "tokio-rustls", + "tokio-util", + "tokio-websockets", + "tracing", + "url", + "webpki-roots", + "ws_stream_wasm", + "z32", +] + +[[package]] +name = "iroh-tickets" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a322053cacddeca222f0999ce3cf6aa45c64ae5ad8c8911eac9b66008ffbaa5" +dependencies = [ + "data-encoding", + "derive_more 2.1.0", + "iroh-base", + "n0-error", + "postcard", + "serde", +] + +[[package]] +name = "irpc" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" +checksum = "0bee97aaa18387c4f0aae61058195dc9f9dea3e41c0e272973fe3e9bf611563d" +dependencies = [ + "futures-util", + "irpc-derive", + "n0-error", + "n0-future 0.3.1", + "serde", + "tokio", + "tokio-util", + "tracing", +] [[package]] -name = "iri-string" -version = "0.7.9" +name = "irpc-derive" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f867b9d1d896b67beb18518eda36fdb77a32ea590de864f1325b294a6d14397" +checksum = "58148196d2230183c9679431ac99b57e172000326d664e8456fa2cd27af6505a" dependencies = [ - "memchr", - "serde", + "proc-macro2", + "quote", + "syn 2.0.111", ] [[package]] @@ -4779,7 +5442,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4836,6 +5499,7 @@ dependencies = [ "regex", "regex-lite", "reqwest", + "ring", "serde", "serde_html_form", "serde_json", @@ -4907,7 +5571,7 @@ dependencies = [ "miette 7.6.0", "multibase", "multihash", - "n0-future", + "n0-future 0.1.3", "ouroboros", "p256", "postcard", @@ -4915,12 +5579,13 @@ dependencies = [ "regex", "regex-lite", "reqwest", + "ring", "serde", "serde_bytes", "serde_html_form", "serde_ipld_dagcbor", "serde_json", - "signature", + "signature 2.2.0", "smol_str", "thiserror 2.0.17", "tokio", @@ -4940,7 +5605,7 @@ dependencies = [ "jacquard-lexicon", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -4949,16 +5614,17 @@ version = "0.9.2" dependencies = [ "bon", "bytes", - "hickory-resolver", + "hickory-resolver 0.24.4", "http", "jacquard-api", "jacquard-common", "jacquard-lexicon", "miette 7.6.0", "mini-moka 0.10.99", - "n0-future", + "n0-future 0.1.3", "percent-encoding", "reqwest", + "ring", "serde", "serde_html_form", "serde_json", @@ -4989,8 +5655,8 @@ dependencies = [ "serde_json", "serde_repr", "serde_with", - "sha2", - "syn 2.0.110", + "sha2 0.10.9", + "syn 2.0.111", "thiserror 2.0.17", "unicode-segmentation", ] @@ -5012,11 +5678,12 @@ dependencies = [ "miette 7.6.0", "p256", "rand 0.8.5", + "ring", "rouille", "serde", "serde_html_form", "serde_json", - "sha2", + "sha2 0.10.9", "smol_str", "thiserror 2.0.17", "tokio", @@ -5089,9 +5756,9 @@ checksum = "de791f8b277ef903d49b0c6f3f3b866569ae8cb1d0829825eea28374cc4c803c" dependencies = [ "base64ct", "cfg-if", - "digest", + "digest 0.10.7", "ecdsa", - "ed25519-dalek", + "ed25519-dalek 2.2.0", "elliptic-curve", "fluent-uri", "generic-array", @@ -5107,8 +5774,8 @@ dependencies = [ "serde", "serde-value", "serde_json", - "sha2", - "signature", + "sha2 0.10.9", + "signature 2.2.0", "subtle", "thiserror 2.0.17", "zeroize", @@ -5152,9 +5819,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.82" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65" +checksum = "464a3709c7f55f1f721e5389aa6ea4e3bc6aba669353300af094b29ffbdde1d8" dependencies = [ "once_cell", "wasm-bindgen", @@ -5169,7 +5836,7 @@ dependencies = [ "cfg-if", "ecdsa", "elliptic-curve", - "sha2", + "sha2 0.10.9", ] [[package]] @@ -5236,9 +5903,9 @@ checksum = "e49596223b9d9d4947a14a25c142a6e7d8ab3f27eb3ade269d238bb8b5c267e2" [[package]] name = "lazy-js-bundle" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "409273b42d0e3ae7c8ce6b8cfbc6a27b7c7d83bbb94fc7f93f22cc9b90eea078" +checksum = "21972afec4627b7ba0de60b5269585b5ac2f56d559b0696f57eee6daf8a51b68" [[package]] name = "lazy_static" @@ -5281,9 +5948,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.177" +version = "0.2.178" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976" +checksum = "37c93d8daa9d8a012fd8ab92f088405fb202ea0b6ab73ee2482ae66af4f42091" [[package]] name = "libloading" @@ -5387,9 +6054,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.28" +version = "0.4.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" +checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" [[package]] name = "lol_alloc" @@ -5423,9 +6090,9 @@ dependencies = [ [[package]] name = "loro" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "546b01ae9bb635853dc8beacfc74a7eb5d0b90cdfdb9c63175cdc1e319fae414" +checksum = "88dccd9df337cf38accfa64bd2267edfd2eeb17a459d38ab0f7ac80eb878cdc5" dependencies = [ "enum-as-inner 0.6.1", "generic-btree", @@ -5439,9 +6106,9 @@ dependencies = [ [[package]] name = "loro-common" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d354299916ca5b8b50a14d9b6bc04943477f5ac5ad6a1351a99eae25a4bb3fd8" +checksum = "70363ea05a9c507fd9d58b65dc414bf515f636d69d8ab53e50ecbe8d27eef90c" dependencies = [ "arbitrary", "enum-as-inner 0.6.1", @@ -5469,9 +6136,9 @@ dependencies = [ [[package]] name = "loro-internal" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "824ea2d4a3bb4e9d95d145b6d539509d7988a12b9e5e54d20956722d719af17b" +checksum = "9e5c014162198a558f119e67287f042c37feb55e82b50d97d6ac2a90333995dd" dependencies = [ "append-only-bytes", "arref", @@ -5516,9 +6183,9 @@ dependencies = [ [[package]] name = "loro-kv-store" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "849d246b5791e97cf37f1bbd54ad7885f128b690ee3a634ee89cf52a1930fb88" +checksum = "78beebc933a33c26495c9a98f05b38bc0a4c0a337ecfbd3146ce1f9437eec71f" dependencies = [ "bytes", "ensure-cov", @@ -5559,6 +6226,12 @@ dependencies = [ "serde", ] +[[package]] +name = "lru" +version = "0.13.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "227748d55f2f0ab4735d87fd623798cb6b664512fe979705f829c9f81c934465" + [[package]] name = "lru" version = "0.16.2" @@ -5606,7 +6279,7 @@ checksum = "1b27834086c65ec3f9387b096d66e99f221cf081c2b738042aa252bcd41204e3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5631,13 +6304,13 @@ dependencies = [ [[package]] name = "manganis" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "124f8f094eb75783b38209ce4d534b9617da4efac652802d9bafe05043a3ec95" +checksum = "97c63ae68d25457a579b7714806088c5cb44c536cf624a53a17184878f9f0bcd" dependencies = [ - "const-serialize 0.7.1", - "manganis-core 0.7.1", - "manganis-macro 0.7.1", + "const-serialize 0.7.2", + "manganis-core 0.7.2", + "manganis-macro 0.7.2", ] [[package]] @@ -5654,13 +6327,13 @@ dependencies = [ [[package]] name = "manganis-core" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41fbd1fb8c5aabcc54c6b02dbc968e1c89c28f3e543f2789ef9e3ce45dbdf5df" +checksum = "88d071660b149f985cbab8b23f2004ea6dd5cf947b63a0843f0e2f46e6af7229" dependencies = [ - "const-serialize 0.7.1", - "dioxus-cli-config 0.7.1", - "dioxus-core-types 0.7.1", + "const-serialize 0.7.2", + "dioxus-cli-config 0.7.2", + "dioxus-core-types 0.7.2", "serde", ] @@ -5674,21 +6347,21 @@ dependencies = [ "manganis-core 0.6.2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "manganis-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45d6fec2a8249739bb30b53a08ecbb217f76096c08f1053f38ec3981ba424c11" +checksum = "9793d1d33778245b4240c330a8f575d208ce077c7e7bab1c79064252ddd4a162" dependencies = [ "dunce", "macro-string", - "manganis-core 0.7.1", + "manganis-core 0.7.2", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5766,7 +6439,7 @@ checksum = "88a9689d8d44bf9964484516275f5cd4c9b59457a6940c1d5d0ecbb94510a36b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5878,7 +6551,7 @@ checksum = "49e7bc1560b95a3c4a25d03de42fe76ca718ab92d1a22a55b9b4cf67b3ae635c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5889,7 +6562,7 @@ checksum = "db5b29714e950dbb20d5e6f74f9dcec4edbcc1067bb7f8ed198c097b8c1a818b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -5968,18 +6641,18 @@ dependencies = [ [[package]] name = "minijinja" -version = "2.12.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f264d75233323f4b7d2f03aefe8a990690cdebfbfe26ea86bcbaec5e9ac990" +checksum = "0adbe6e92a6ce0fd6c4aac593fdfd3e3950b0f61b1a63aa9731eb6fd85776fa3" dependencies = [ "serde", ] [[package]] name = "minijinja-contrib" -version = "2.12.0" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "182ba1438db4679ddfa03792c183bdc2b9ce26b58e7d41a749e59b06497cf136" +checksum = "a915f5cc17b954d5252b6373cc5fd97eb86d75e29b30ac2ee7932126451eef24" dependencies = [ "minijinja", "serde", @@ -6003,15 +6676,33 @@ dependencies = [ [[package]] name = "mio" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873" +checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc" dependencies = [ "libc", "wasi 0.11.1+wasi-snapshot-preview1", "windows-sys 0.61.2", ] +[[package]] +name = "moka" +version = "0.12.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8261cd88c312e0004c1d51baad2980c66528dfdb2bee62003e643a4d8f86b077" +dependencies = [ + "crossbeam-channel", + "crossbeam-epoch", + "crossbeam-utils", + "equivalent", + "parking_lot", + "portable-atomic", + "rustc_version", + "smallvec", + "tagptr", + "uuid", +] + [[package]] name = "muda" version = "0.17.1" @@ -6091,6 +6782,28 @@ dependencies = [ "twoway", ] +[[package]] +name = "n0-error" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7d5969a2f40e9d9ed121a789c415f4114ac2b28e5731c080bdefee217d3b3fb" +dependencies = [ + "anyhow", + "n0-error-macros", + "spez", +] + +[[package]] +name = "n0-error-macros" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a6908df844696d9af91c7c3950d50e52d67df327d02a95367f95bbf177d6556" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "n0-future" version = "0.1.3" @@ -6112,6 +6825,38 @@ dependencies = [ "web-time", ] +[[package]] +name = "n0-future" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c0709ac8235ce13b82bc4d180ee3c42364b90c1a8a628c3422d991d75a728b5" +dependencies = [ + "cfg_aliases", + "derive_more 1.0.0", + "futures-buffered", + "futures-lite", + "futures-util", + "js-sys", + "pin-project", + "send_wrapper", + "tokio", + "tokio-util", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-time", +] + +[[package]] +name = "n0-watcher" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38acf13c1ddafc60eb7316d52213467f8ccb70b6f02b65e7d97f7799b1f50be4" +dependencies = [ + "derive_more 2.1.0", + "n0-error", + "n0-future 0.3.1", +] + [[package]] name = "native-tls" version = "0.2.14" @@ -6159,6 +6904,105 @@ dependencies = [ "jni-sys", ] +[[package]] +name = "netdev" +version = "0.38.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67ab878b4c90faf36dab10ea51d48c69ae9019bcca47c048a7c9b273d5d7a823" +dependencies = [ + "dlopen2 0.5.0", + "ipnet", + "libc", + "netlink-packet-core", + "netlink-packet-route", + "netlink-sys", + "once_cell", + "system-configuration", + "windows-sys 0.59.0", +] + +[[package]] +name = "netlink-packet-core" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3463cbb78394cb0141e2c926b93fc2197e473394b761986eca3b9da2c63ae0f4" +dependencies = [ + "paste", +] + +[[package]] +name = "netlink-packet-route" +version = "0.25.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ec2f5b6839be2a19d7fa5aab5bc444380f6311c2b693551cb80f45caaa7b5ef" +dependencies = [ + "bitflags 2.10.0", + "libc", + "log", + "netlink-packet-core", +] + +[[package]] +name = "netlink-proto" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b65d130ee111430e47eed7896ea43ca693c387f097dd97376bffafbf25812128" +dependencies = [ + "bytes", + "futures", + "log", + "netlink-packet-core", + "netlink-sys", + "thiserror 2.0.17", +] + +[[package]] +name = "netlink-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16c903aa70590cb93691bf97a767c8d1d6122d2cc9070433deb3bbf36ce8bd23" +dependencies = [ + "bytes", + "futures", + "libc", + "log", + "tokio", +] + +[[package]] +name = "netwatch" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f2acd376ef48b6c326abf3ba23c449e0cb8aa5c2511d189dd8a8a3bfac889b" +dependencies = [ + "atomic-waker", + "bytes", + "cfg_aliases", + "derive_more 2.1.0", + "iroh-quinn-udp", + "js-sys", + "libc", + "n0-error", + "n0-future 0.3.1", + "n0-watcher", + "netdev", + "netlink-packet-core", + "netlink-packet-route", + "netlink-proto", + "netlink-sys", + "pin-project-lite", + "serde", + "socket2 0.6.1", + "time", + "tokio", + "tokio-util", + "tracing", + "web-sys", + "windows 0.62.2", + "windows-result 0.4.1", + "wmi", +] + [[package]] name = "new_debug_unreachable" version = "1.0.6" @@ -6200,6 +7044,21 @@ version = "0.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "610a5acd306ec67f907abe5567859a3c693fb9886eb1f012ab8f2a47bef3db51" +[[package]] +name = "ntimestamp" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c50f94c405726d3e0095e89e72f75ce7f6587b94a8bd8dc8054b73f65c0fd68c" +dependencies = [ + "base32", + "document-features", + "getrandom 0.2.16", + "httpdate", + "js-sys", + "once_cell", + "serde", +] + [[package]] name = "nu-ansi-term" version = "0.50.3" @@ -6335,7 +7194,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6485,6 +7344,10 @@ name = "once_cell" version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" +dependencies = [ + "critical-section", + "portable-atomic", +] [[package]] name = "once_cell_polyfill" @@ -6537,7 +7400,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6604,7 +7467,7 @@ dependencies = [ "proc-macro2", "proc-macro2-diagnostics", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6622,7 +7485,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2", + "sha2 0.10.9", ] [[package]] @@ -6634,7 +7497,7 @@ dependencies = [ "ecdsa", "elliptic-curve", "primeorder", - "sha2", + "sha2 0.10.9", ] [[package]] @@ -6691,6 +7554,12 @@ dependencies = [ "windows-link 0.2.1", ] +[[package]] +name = "paste" +version = "1.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" + [[package]] name = "pem-rfc7468" version = "0.7.0" @@ -6700,6 +7569,15 @@ dependencies = [ "base64ct", ] +[[package]] +name = "pem-rfc7468" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6305423e0e7738146434843d1694d621cce767262b2a86910beab705e4493d9" +dependencies = [ + "base64ct", +] + [[package]] name = "percent-encoding" version = "2.3.2" @@ -6736,7 +7614,7 @@ dependencies = [ "pest_meta", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6746,7 +7624,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf1d70880e76bdc13ba52eafa6239ce793d85c8e43896507e43dd8984ff05b82" dependencies = [ "pest", - "sha2", + "sha2 0.10.9", +] + +[[package]] +name = "pharos" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9567389417feee6ce15dd6527a8a1ecac205ef62c2932bcf3d9f6fc5b78b414" +dependencies = [ + "futures", + "rustc_version", ] [[package]] @@ -6853,7 +7741,7 @@ dependencies = [ "phf_shared 0.11.3", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6906,7 +7794,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -6921,15 +7809,46 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +[[package]] +name = "pkarr" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "792c1328860f6874e90e3b387b4929819cc7783a6bd5a4728e918706eb436a48" +dependencies = [ + "async-compat", + "base32", + "bytes", + "cfg_aliases", + "document-features", + "dyn-clone", + "ed25519-dalek 3.0.0-pre.1", + "futures-buffered", + "futures-lite", + "getrandom 0.3.4", + "log", + "lru 0.13.0", + "ntimestamp", + "reqwest", + "self_cell", + "serde", + "sha1_smol", + "simple-dns", + "thiserror 2.0.17", + "tokio", + "tracing", + "url", + "wasm-bindgen-futures", +] + [[package]] name = "pkcs1" version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c8ffb9f10fa047879315e6625af03c164b16962a5368d724ed16323b68ace47f" dependencies = [ - "der", - "pkcs8", - "spki", + "der 0.7.10", + "pkcs8 0.10.2", + "spki 0.7.3", ] [[package]] @@ -6938,8 +7857,18 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7" dependencies = [ - "der", - "spki", + "der 0.7.10", + "spki 0.7.3", +] + +[[package]] +name = "pkcs8" +version = "0.11.0-rc.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77089aec8290d0b7bb01b671b091095cf1937670725af4fd73d47249f03b12c0" +dependencies = [ + "der 0.8.0-rc.10", + "spki 0.8.0-rc.4", ] [[package]] @@ -6980,6 +7909,52 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2f3a9f18d041e6d0e102a0a46750538147e5e8992d3b4873aaafee2520b00ce3" +[[package]] +name = "poly1305" +version = "0.9.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fb78a635f75d76d856374961deecf61031c0b6f928c83dc9c0924ab6c019c298" +dependencies = [ + "cpufeatures", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483" + +[[package]] +name = "portmapper" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7b575f975dcf03e258b0c7ab3f81497d7124f508884c37da66a7314aa2a8d467" +dependencies = [ + "base64 0.22.1", + "bytes", + "derive_more 2.1.0", + "futures-lite", + "futures-util", + "hyper-util", + "igd-next", + "iroh-metrics", + "libc", + "n0-error", + "netwatch", + "num_enum", + "rand 0.9.2", + "serde", + "smallvec", + "socket2 0.6.1", + "time", + "tokio", + "tokio-util", + "tower-layer", + "tracing", + "url", +] + [[package]] name = "postcard" version = "1.1.3" @@ -6990,9 +7965,21 @@ dependencies = [ "embedded-io 0.4.0", "embedded-io 0.6.1", "heapless 0.7.17", + "postcard-derive", "serde", ] +[[package]] +name = "postcard-derive" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0232bd009a197ceec9cc881ba46f727fcd8060a2d8d6a9dde7a69030a6fe2bb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "potential_utf" version = "0.1.4" @@ -7040,7 +8027,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -7077,7 +8064,7 @@ version = "3.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "219cb19e96be00ab2e37d6e299658a0cfa83e52429179969b0f0121b4ac46983" dependencies = [ - "toml_edit 0.23.7", + "toml_edit 0.23.8", ] [[package]] @@ -7127,7 +8114,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "version_check", "yansi", ] @@ -7453,7 +8440,7 @@ checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -7655,16 +8642,16 @@ version = "0.9.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40a0376c50d0358279d9d643e4bf7b7be212f1f4ff1da9070a7b54d22ef75c88" dependencies = [ - "const-oid", - "digest", + "const-oid 0.9.6", + "digest 0.10.7", "num-bigint-dig", "num-integer", "num-traits", "pkcs1", - "pkcs8", + "pkcs8 0.10.2", "rand_core 0.6.4", - "signature", - "spki", + "signature 2.2.0", + "spki 0.7.3", "subtle", "zeroize", ] @@ -7715,6 +8702,7 @@ version = "0.23.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f" dependencies = [ + "log", "once_cell", "ring", "rustls-pki-types", @@ -7737,14 +8725,41 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94182ad936a0c91c324cd46c6511b9510ed16af436d7b5bab34beab0afd55f7a" +checksum = "708c0f9d5f54ba0272468c1d306a52c495b31fa155e91bc25371e6df7996908c" dependencies = [ "web-time", "zeroize", ] +[[package]] +name = "rustls-platform-verifier" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19787cda76408ec5404443dc8b31795c87cd8fec49762dc75fa727740d34acc1" +dependencies = [ + "core-foundation 0.10.1", + "core-foundation-sys", + "jni", + "log", + "once_cell", + "rustls", + "rustls-native-certs", + "rustls-platform-verifier-android", + "rustls-webpki", + "security-framework 3.5.1", + "security-framework-sys", + "webpki-root-certs 0.26.11", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls-platform-verifier-android" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f87165f0995f63a9fbeea62b64d10b4d9d8e78ec6d7d51fb2125fda7bb36788f" + [[package]] name = "rustls-webpki" version = "0.103.8" @@ -7792,6 +8807,16 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef703b7cb59335eae2eb93ceb664c0eb7ea6bf567079d843e09420219668e072" +[[package]] +name = "salsa20" +version = "0.11.0-rc.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3ff3b81c8a6e381bc1673768141383f9328048a60edddcfc752a8291a138443" +dependencies = [ + "cfg-if", + "cipher", +] + [[package]] name = "same-file" version = "1.0.6" @@ -7861,11 +8886,11 @@ version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc" dependencies = [ - "base16ct", - "der", + "base16ct 0.2.0", + "der 0.7.10", "generic-array", - "pkcs8", - "serdect", + "pkcs8 0.10.2", + "serdect 0.2.0", "subtle", "zeroize", ] @@ -7934,6 +8959,12 @@ dependencies = [ "smallvec", ] +[[package]] +name = "self_cell" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16c2f82143577edb4921b71ede051dac62ca3c16084e918bf7b40c96ae10eb33" + [[package]] name = "semver" version = "1.0.27" @@ -8040,7 +9071,7 @@ dependencies = [ "darling 0.20.11", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8060,7 +9091,7 @@ checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8143,7 +9174,7 @@ checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8178,9 +9209,9 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.16.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10574371d41b0d9b2cff89418eda27da52bcaff2cc8741db26382a77c29131f1" +checksum = "4fa237f2807440d238e0364a218270b98f767a00d3dada77b1c53ae88940e2e7" dependencies = [ "base64 0.22.1", "chrono", @@ -8197,14 +9228,14 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.16.0" +version = "3.16.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a72d8216842fdd57820dc78d840bef99248e35fb2554ff923319e60f2d686b" +checksum = "52a8e3ca0ca629121f70ab50f95249e5a6f925cc0f6ffe8256c45b728875706c" dependencies = [ "darling 0.21.3", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8213,7 +9244,17 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a84f14a19e9a014bb9f4512488d9829a68e04ecabffb0f9904cd1ace94598177" dependencies = [ - "base16ct", + "base16ct 0.2.0", + "serde", +] + +[[package]] +name = "serdect" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3ef0e35b322ddfaecbc60f34ab448e157e48531288ee49fafbb053696b8ffe2" +dependencies = [ + "base16ct 0.3.0", "serde", ] @@ -8255,7 +9296,7 @@ dependencies = [ "convert_case 0.6.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "xxhash-rust", ] @@ -8266,7 +9307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f2aa8119b558a17992e0ac1fd07f080099564f24532858811ce04f742542440" dependencies = [ "server_fn_macro", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8287,7 +9328,18 @@ checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha1" +version = "0.11.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c5e046edf639aa2e7afb285589e5405de2ef7e61d4b0ac1e30256e3eab911af9" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.11.0-rc.3", ] [[package]] @@ -8304,7 +9356,18 @@ checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", - "digest", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.11.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1e3878ab0f98e35b2df35fe53201d088299b41a6bb63e3e34dada2ac4abd924" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.11.0-rc.3", ] [[package]] @@ -8334,9 +9397,9 @@ dependencies = [ [[package]] name = "signal-hook-registry" -version = "1.4.6" +version = "1.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" +checksum = "7664a098b8e616bdfcc2dc0e9ac44eb231eedf41db4e9fe95d8d32ec728dedad" dependencies = [ "libc", ] @@ -8347,22 +9410,43 @@ version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" dependencies = [ - "digest", + "digest 0.10.7", "rand_core 0.6.4", ] +[[package]] +name = "signature" +version = "3.0.0-rc.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a0251c9d6468f4ba853b6352b190fb7c1e405087779917c238445eb03993826" + [[package]] name = "simd-adler32" version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" +[[package]] +name = "simdutf8" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" + [[package]] name = "similar" version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbbb5d9659141646ae647b42fe094daf6c6192d1620870b449d9557f748b2daa" +[[package]] +name = "simple-dns" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dee851d0e5e7af3721faea1843e8015e820a234f81fda3dea9247e15bac9a86a" +dependencies = [ + "bitflags 2.10.0", +] + [[package]] name = "simplecss" version = "0.2.2" @@ -8417,7 +9501,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f62f06db0370222f7f498ef478fce9f8df5828848d1d3517e3331936d7074f55" dependencies = [ "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8431,9 +9515,9 @@ dependencies = [ [[package]] name = "slotmap" -version = "1.0.7" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbff4acf519f630b3a3ddcfaea6c06b42174d9a44bc70c620e9ed1649d58b82a" +checksum = "811fec94324ff439b2d5e4a1cf88cc5b6c09d92358715d600b2fe91c0489b5cb" dependencies = [ "serde", "version_check", @@ -8521,6 +9605,17 @@ dependencies = [ "system-deps", ] +[[package]] +name = "spez" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c87e960f4dca2788eeb86bbdde8dd246be8948790b7618d656e68f9b720a86e8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "spin" version = "0.9.8" @@ -8543,14 +9638,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" dependencies = [ "base64ct", - "der", + "der 0.7.10", +] + +[[package]] +name = "spki" +version = "0.8.0-rc.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8baeff88f34ed0691978ec34440140e1572b68c7dd4a495fd14a3dc1944daa80" +dependencies = [ + "base64ct", + "der 0.8.0-rc.10", ] [[package]] name = "sqlite-wasm-rs" -version = "0.4.7" +version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35c6d746902bca4ddf16592357eacf0473631ea26b36072f0dd0b31fa5ccd1f4" +checksum = "60bdd87fcb4c9764b024805fb2df5f1d659bea6e629fdbdcdcfc4042b9a640d0" dependencies = [ "js-sys", "once_cell", @@ -8595,8 +9700,8 @@ dependencies = [ "proc-macro2", "quote", "serde", - "sha2", - "syn 2.0.110", + "sha2 0.10.9", + "syn 2.0.111", "thiserror 1.0.69", ] @@ -8648,7 +9753,7 @@ checksum = "ae36a4951ca7bd1cfd991c241584a9824a70f6aff1e7d4f693fb3f2465e4030e" dependencies = [ "quote", "swc_macros_common", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8657,11 +9762,32 @@ version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" +[[package]] +name = "strum" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af23d6f6c1a224baef9d3f61e287d2761385a5b88fdab4eb4c6f11aeb54c4bcf" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.27.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7695ce3845ea4b33927c055a39dc438a45b059f7c1b3d91d38d10355fb8cbca7" +dependencies = [ + "heck 0.5.0", + "proc-macro2", + "quote", + "syn 2.0.111", +] + [[package]] name = "subsecond" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "834e8caec50249083ee6972a2f7645c4baadcb39d49ea801da1dc1d5e1c2ccb9" +checksum = "c09bc2c9ef0381b403ab8b58122961cb83266d16b1f55f9486d5857ba4a9ae26" dependencies = [ "js-sys", "libc", @@ -8678,9 +9804,9 @@ dependencies = [ [[package]] name = "subsecond-types" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6beffea67e72a7a530990b270fd0277971eae564fdc10c1e0080e928b477fab" +checksum = "d07aa455c66ddfdbb51507537402b961e027846468954ef8d974bce65dff9eb0" dependencies = [ "serde", ] @@ -8868,7 +9994,7 @@ checksum = "c16ce73424a6316e95e09065ba6a207eba7765496fed113702278b7711d4b632" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8879,7 +10005,7 @@ checksum = "aae1efbaa74943dc5ad2a2fb16cbd78b77d7e4d63188f3c5b4df2b4dcd2faaae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -8905,9 +10031,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.110" +version = "2.0.111" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a99801b5bd34ede4cf3fc688c5919368fea4e4814a4664359503e6015b280aea" +checksum = "390cc9a294ab71bdb1aa2e99d13be9c753cd2d7bd6560c77118597410c4d2e87" dependencies = [ "proc-macro2", "quote", @@ -8931,7 +10057,7 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9008,7 +10134,7 @@ dependencies = [ "core-graphics", "crossbeam-channel", "dispatch", - "dlopen2", + "dlopen2 0.8.1", "dpi", "gdkwayland-sys", "gdkx11-sys", @@ -9031,7 +10157,7 @@ dependencies = [ "tao-macros", "unicode-segmentation", "url", - "windows", + "windows 0.61.3", "windows-core 0.61.2", "windows-version", "x11-dl", @@ -9045,7 +10171,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9125,7 +10251,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9136,7 +10262,7 @@ checksum = "3ff15c8ecd7de3849db632e14d18d2571fa09dfc5ed93479bc4485c7a517c913" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9280,7 +10406,7 @@ checksum = "af407857209536a95c8e56f8231ef2c2e2aff839b22e07a1ffcbc617e9db9fa5" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9379,6 +10505,28 @@ dependencies = [ "tokio", ] +[[package]] +name = "tokio-websockets" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1b6348ebfaaecd771cecb69e832961d277f59845d4220a584701f72728152b7" +dependencies = [ + "base64 0.22.1", + "bytes", + "futures-core", + "futures-sink", + "getrandom 0.3.4", + "http", + "httparse", + "rand 0.9.2", + "ring", + "rustls-pki-types", + "simdutf8", + "tokio", + "tokio-rustls", + "tokio-util", +] + [[package]] name = "toml" version = "0.8.23" @@ -9402,7 +10550,7 @@ dependencies = [ "serde_spanned 1.0.3", "toml_datetime 0.7.3", "toml_parser", - "winnow 0.7.13", + "winnow 0.7.14", ] [[package]] @@ -9456,19 +10604,19 @@ dependencies = [ "serde_spanned 0.6.9", "toml_datetime 0.6.11", "toml_write", - "winnow 0.7.13", + "winnow 0.7.14", ] [[package]] name = "toml_edit" -version = "0.23.7" +version = "0.23.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6485ef6d0d9b5d0ec17244ff7eb05310113c3f316f2d14200d4de56b3cb98f8d" +checksum = "5a9b7ac41d92f2d2803f233e297127bac397df7b337e0460a1cc39d6c006dee4" dependencies = [ "indexmap 2.12.1", "toml_datetime 0.7.3", "toml_parser", - "winnow 0.7.13", + "winnow 0.7.14", ] [[package]] @@ -9477,7 +10625,7 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e" dependencies = [ - "winnow 0.7.13", + "winnow 0.7.14", ] [[package]] @@ -9520,9 +10668,9 @@ dependencies = [ [[package]] name = "tower-http" -version = "0.6.6" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc82fd73de2a9722ac5da747f12383d2bfdb93591ee6c58486e0097890f05f2" +checksum = "9cf146f99d442e8e68e585f5d798ccd3cad9a7835b917e09728880a862706456" dependencies = [ "bitflags 2.10.0", "bytes", @@ -9561,9 +10709,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.41" +version = "0.1.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +checksum = "2d15d90a0b5c19378952d479dc858407149d7bb45a14de0142f6c534b16fc647" dependencies = [ "log", "pin-project-lite", @@ -9573,33 +10721,33 @@ dependencies = [ [[package]] name = "tracing-appender" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +checksum = "786d480bce6247ab75f005b14ae1624ad978d3029d9113f0a22fa1ac773faeaf" dependencies = [ "crossbeam-channel", "parking_lot", - "thiserror 1.0.69", + "thiserror 2.0.17", "time", "tracing-subscriber", ] [[package]] name = "tracing-attributes" -version = "0.1.30" +version = "0.1.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" +checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] name = "tracing-core" -version = "0.1.34" +version = "0.1.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" +checksum = "7a04e24fab5c89c6a36eb8558c9656f30d81de51dfa4d3b45f26b21d61fa0a6c" dependencies = [ "once_cell", "valuable", @@ -9638,9 +10786,9 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.20" +version = "0.3.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" +checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e" dependencies = [ "matchers", "nu-ansi-term", @@ -9676,7 +10824,7 @@ checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -9738,7 +10886,7 @@ dependencies = [ "httparse", "log", "rand 0.8.5", - "sha1", + "sha1 0.10.6", "thiserror 1.0.69", "utf-8", ] @@ -9758,7 +10906,7 @@ dependencies = [ "rand 0.8.5", "rustls", "rustls-pki-types", - "sha1", + "sha1 0.10.6", "thiserror 1.0.69", "utf-8", ] @@ -9777,7 +10925,7 @@ dependencies = [ "native-tls", "rand 0.9.2", "rustls", - "sha1", + "sha1 0.10.6", "thiserror 2.0.17", "utf-8", ] @@ -9794,7 +10942,7 @@ dependencies = [ "httparse", "log", "rand 0.9.2", - "sha1", + "sha1 0.10.6", "thiserror 2.0.17", "utf-8", ] @@ -9902,9 +11050,9 @@ checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d" [[package]] name = "unicode-script" -version = "0.5.7" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb421b350c9aff471779e262955939f565ec18b86c15364e6bdf0d662ca7c1f" +checksum = "383ad40bb927465ec0ce7720e033cb4ca06912855fc35db31b5755d0de75b1ee" [[package]] name = "unicode-segmentation" @@ -9936,6 +11084,16 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +[[package]] +name = "universal-hash" +version = "0.6.0-rc.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a55be643b40a21558f44806b53ee9319595bc7ca6896372e4e08e5d7d83c9cd6" +dependencies = [ + "crypto-common 0.2.0-rc.4", + "subtle", +] + [[package]] name = "unsigned-varint" version = "0.8.0" @@ -10013,13 +11171,13 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.18.1" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +checksum = "e2e054861b4bd027cd373e18e8d8d8e6548085000e41290d95ce0c373a654b4a" dependencies = [ "getrandom 0.3.4", "js-sys", - "serde", + "serde_core", "wasm-bindgen", ] @@ -10085,7 +11243,7 @@ checksum = "59195a1db0e95b920366d949ba5e0d3fc0e70b67c09be15ce5abb790106b0571" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -10111,9 +11269,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60" +checksum = "0d759f433fa64a2d763d1340820e46e111a7a5ab75f993d1852d70b03dbb80fd" dependencies = [ "cfg-if", "once_cell", @@ -10124,9 +11282,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-futures" -version = "0.4.55" +version = "0.4.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "551f88106c6d5e7ccc7cd9a16f312dd3b5d36ea8b4954304657d5dfba115d4a0" +checksum = "836d9622d604feee9e5de25ac10e3ea5f2d65b41eac0d9ce72eb5deae707ce7c" dependencies = [ "cfg-if", "js-sys", @@ -10137,9 +11295,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2" +checksum = "48cb0d2638f8baedbc542ed444afc0644a29166f1595371af4fecf8ce1e7eeb3" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -10147,45 +11305,45 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc" +checksum = "cefb59d5cd5f92d9dcf80e4683949f15ca4b511f4ac0a6e14d4e1ac60c6ecd40" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.105" +version = "0.2.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76" +checksum = "cbc538057e648b67f72a982e708d485b2efa771e1ac05fec311f9f63e5800db4" dependencies = [ "unicode-ident", ] [[package]] name = "wasm-split-macro" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a12f9d65e85c7ea30ad753fd6c84e5e7a0ff9e581e1ed1860d173807018f955" +checksum = "c1fbee96cfc9480b067d0ee1cadd2f04db107f753da071c4cf81d76ac98fc164" dependencies = [ "base16", - "digest", + "digest 0.10.7", "proc-macro2", "quote", - "sha2", - "syn 2.0.110", + "sha2 0.10.9", + "syn 2.0.111", ] [[package]] name = "wasm-splitter" -version = "0.7.1" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0bdc944727dcfb8cb919213d19f2946b508370740bf7c1c6e215acd98dd5b4" +checksum = "d4c8089c649c2aff2ba9505db4b85d63c6c5a443cee72ebf011295af4947041d" dependencies = [ "async-once-cell", "wasm-split-macro", @@ -10231,7 +11389,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffd01f29024361dcb5b54f50b4cfe8d56ecac0ece515f52e7756e979b9a43c2d" dependencies = [ "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -10321,12 +11479,13 @@ dependencies = [ "chrono", "console_error_panic_hook", "dashmap 6.1.0", - "dioxus 0.7.1", + "dioxus 0.7.2", "dioxus-free-icons", "dioxus-primitives", "dioxus-sdk", "dotenvy", "fontdb", + "getrandom 0.3.4", "gloo-storage", "gloo-timers", "http", @@ -10343,11 +11502,12 @@ dependencies = [ "markdown-weaver-escape", "mime-sniffer", "mini-moka 0.11.0", - "n0-future", + "n0-future 0.1.3", "regex", "regex-lite", "reqwest", "resvg", + "ring", "serde", "serde_html_form", "serde_ipld_dagcbor", @@ -10383,7 +11543,7 @@ dependencies = [ "markdown-weaver", "markdown-weaver-escape", "miette 7.6.0", - "n0-future", + "n0-future 0.1.3", "tokio", "tracing", "tracing-subscriber", @@ -10396,8 +11556,15 @@ dependencies = [ name = "weaver-common" version = "0.1.0" dependencies = [ + "blake3", + "chrono", "futures-util", + "getrandom 0.3.4", "http", + "iroh", + "iroh-gossip", + "iroh-quinn", + "iroh-tickets", "jacquard", "jacquard-common", "js-sys", @@ -10405,11 +11572,14 @@ dependencies = [ "markdown-weaver-escape", "miette 7.6.0", "mime-sniffer", - "n0-future", + "n0-future 0.1.3", "pin-project", + "postcard", + "rand 0.9.2", "regex", "regex-lite", "reqwest", + "ring", "send_wrapper", "serde", "serde_json", @@ -10486,7 +11656,7 @@ dependencies = [ "markdown-weaver-escape", "miette 7.6.0", "mime-sniffer", - "n0-future", + "n0-future 0.1.3", "pin-project", "pin-utils", "pulldown-latex", @@ -10508,9 +11678,9 @@ dependencies = [ [[package]] name = "web-sys" -version = "0.3.82" +version = "0.3.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1" +checksum = "9b32828d774c412041098d182a8b38b16ea816958e07cf40eec2bc080ae137ac" dependencies = [ "js-sys", "wasm-bindgen", @@ -10598,6 +11768,24 @@ dependencies = [ "url", ] +[[package]] +name = "webpki-root-certs" +version = "0.26.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75c7f0ef91146ebfb530314f5f1d24528d7f0767efbfd31dce919275413e393e" +dependencies = [ + "webpki-root-certs 1.0.4", +] + +[[package]] +name = "webpki-root-certs" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee3e3b5f5e80bc89f30ce8d0343bf4e5f12341c51f3e26cbeecbc7c85443e85b" +dependencies = [ + "rustls-pki-types", +] + [[package]] name = "webpki-roots" version = "1.0.4" @@ -10615,7 +11803,7 @@ checksum = "d4ba622a989277ef3886dd5afb3e280e3dd6d974b766118950a08f8f678ad6a4" dependencies = [ "webview2-com-macros", "webview2-com-sys", - "windows", + "windows 0.61.3", "windows-core 0.61.2", "windows-implement", "windows-interface", @@ -10629,7 +11817,7 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -10639,7 +11827,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36695906a1b53a3bf5c4289621efedac12b73eeb0b89e7e1a89b517302d5d75c" dependencies = [ "thiserror 2.0.17", - "windows", + "windows 0.61.3", "windows-core 0.61.2", ] @@ -10692,11 +11880,23 @@ version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections", + "windows-collections 0.2.0", "windows-core 0.61.2", - "windows-future", + "windows-future 0.2.1", "windows-link 0.1.3", - "windows-numerics", + "windows-numerics 0.2.0", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", ] [[package]] @@ -10708,6 +11908,15 @@ dependencies = [ "windows-core 0.61.2", ] +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + [[package]] name = "windows-core" version = "0.61.2" @@ -10742,7 +11951,18 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ "windows-core 0.61.2", "windows-link 0.1.3", - "windows-threading", + "windows-threading 0.1.0", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", ] [[package]] @@ -10753,7 +11973,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -10764,7 +11984,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -10789,6 +12009,16 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", +] + [[package]] name = "windows-registry" version = "0.6.1" @@ -10962,6 +12192,15 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-version" version = "0.1.7" @@ -11162,9 +12401,9 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.13" +version = "0.7.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" +checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829" dependencies = [ "memchr", ] @@ -11185,6 +12424,21 @@ version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" +[[package]] +name = "wmi" +version = "0.17.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120d8c2b6a7c96c27bf4a7947fd7f02d73ca7f5958b8bd72a696e46cb5521ee6" +dependencies = [ + "chrono", + "futures", + "log", + "serde", + "thiserror 2.0.17", + "windows 0.62.2", + "windows-core 0.62.2", +] + [[package]] name = "writeable" version = "0.6.2" @@ -11221,7 +12475,7 @@ dependencies = [ "once_cell", "percent-encoding", "raw-window-handle 0.6.2", - "sha2", + "sha2 0.10.9", "soup3", "tao-macros", "thiserror 2.0.17", @@ -11229,11 +12483,30 @@ dependencies = [ "webkit2gtk", "webkit2gtk-sys", "webview2-com", - "windows", + "windows 0.61.3", "windows-core 0.61.2", "windows-version", ] +[[package]] +name = "ws_stream_wasm" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c173014acad22e83f16403ee360115b38846fe754e735c5d9d3803fe70c6abc" +dependencies = [ + "async_io_stream", + "futures", + "js-sys", + "log", + "pharos", + "rustc_version", + "send_wrapper", + "thiserror 2.0.17", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "x11" version = "2.21.0" @@ -11278,6 +12551,12 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b9cc00251562a284751c9973bace760d86c0276c471b4be569fe6b068ee97a56" +[[package]] +name = "xml-rs" +version = "0.8.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3ae8337f8a065cfc972643663ea4279e04e7256de865aa66fe25cec5fb912d3f" + [[package]] name = "xml5ever" version = "0.18.1" @@ -11289,6 +12568,15 @@ dependencies = [ "markup5ever 0.12.1", ] +[[package]] +name = "xmltree" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7d8a75eaf6557bb84a65ace8609883db44a29951042ada9b393151532e41fcb" +dependencies = [ + "xml-rs", +] + [[package]] name = "xmlwriter" version = "0.1.0" @@ -11346,10 +12634,16 @@ checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "synstructure", ] +[[package]] +name = "z32" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2164e798d9e3d84ee2c91139ace54638059a3b23e361f5c11781c2c6459bde0f" + [[package]] name = "zbus" version = "5.12.0" @@ -11373,7 +12667,7 @@ dependencies = [ "uds_windows", "uuid", "windows-sys 0.61.2", - "winnow 0.7.13", + "winnow 0.7.14", "zbus_macros", "zbus_names", "zvariant", @@ -11388,7 +12682,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "zbus_names", "zvariant", "zvariant_utils", @@ -11402,28 +12696,28 @@ checksum = "7be68e64bf6ce8db94f63e72f0c7eb9a60d733f7e0499e628dfab0f84d6bcb97" dependencies = [ "serde", "static_assertions", - "winnow 0.7.13", + "winnow 0.7.14", "zvariant", ] [[package]] name = "zerocopy" -version = "0.8.28" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43fa6694ed34d6e57407afbccdeecfa268c470a7d2a5b0cf49ce9fcc345afb90" +checksum = "fd74ec98b9250adb3ca554bdde269adf631549f51d8a8f8f0a10b50f1cb298c3" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.28" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c640b22cd9817fae95be82f0d2f90b11f7605f6c319d16705c459b27ac2cbc26" +checksum = "d8a8d209fdf45cf5138cbb5a506f6b52522a25afccc534d1475dad8e31105c6a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -11443,7 +12737,7 @@ checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "synstructure", ] @@ -11465,7 +12759,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -11498,7 +12792,7 @@ checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", ] [[package]] @@ -11554,7 +12848,7 @@ dependencies = [ "enumflags2", "serde", "url", - "winnow 0.7.13", + "winnow 0.7.14", "zvariant_derive", "zvariant_utils", ] @@ -11568,7 +12862,7 @@ dependencies = [ "proc-macro-crate 3.4.0", "proc-macro2", "quote", - "syn 2.0.110", + "syn 2.0.111", "zvariant_utils", ] @@ -11581,6 +12875,6 @@ dependencies = [ "proc-macro2", "quote", "serde", - "syn 2.0.110", - "winnow 0.7.13", + "syn 2.0.111", + "winnow 0.7.14", ] diff --git a/Cargo.toml b/Cargo.toml index 712c4e5..a78abb3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -55,6 +55,12 @@ jacquard-lexicon = { path = "../jacquard/crates/jacquard-lexicon", default-featu # jacquard-axum = {path = "../jacquard-facet/crates/jacquard-axum" } # jacquard-derive = { path = "../jacquard-facet/crates/jacquard-derive" } # jacquard-lexicon = { path = "../jacquard-facet/crates/jacquard-lexicon", default-features = false } +# + +# [patch.crates-io] +# #secp256k1-zkp = { git = "https://github.com/dpc/rust-secp256k1-zkp/", branch = "sanket-pr" } +# ring = { git = "https://github.com/dpc/ring", rev = "5493e7e76d0d8fb1d3cbb0be9c4944700741b802" } + [profile] @@ -66,7 +72,7 @@ lto = true codegen-units = 1 panic = "abort" incremental = false -strip = "debuginfo" +strip = "symbols" [profile.wasm-dev] diff --git a/crates/weaver-api/lexicons/sh_weaver_collab_session.json b/crates/weaver-api/lexicons/sh_weaver_collab_session.json new file mode 100644 index 0000000..8d4f6d6 --- /dev/null +++ b/crates/weaver-api/lexicons/sh_weaver_collab_session.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "sh.weaver.collab.session", + "defs": { + "main": { + "type": "record", + "description": "Active real-time collaboration session. Published when joining a collaborative editing session, deleted on disconnect.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "resource", + "nodeId", + "createdAt" + ], + "properties": { + "createdAt": { + "type": "string", + "format": "datetime" + }, + "expiresAt": { + "type": "string", + "description": "Session TTL. Should be refreshed periodically while active.", + "format": "datetime" + }, + "nodeId": { + "type": "string", + "description": "iroh NodeId in z-base32 encoding for P2P connection." + }, + "relayUrl": { + "type": "string", + "description": "DERP relay URL if using relay-only mode (browser clients).", + "format": "uri" + }, + "resource": { + "type": "ref", + "description": "The resource being collaboratively edited.", + "ref": "com.atproto.repo.strongRef" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/weaver-api/src/app_bsky/actor.rs b/crates/weaver-api/src/app_bsky/actor.rs index d95b153..50b2400 100644 --- a/crates/weaver-api/src/app_bsky/actor.rs +++ b/crates/weaver-api/src/app_bsky/actor.rs @@ -3037,37 +3037,37 @@ pub mod known_followers_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Followers; type Count; + type Followers; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Followers = Unset; type Count = Unset; - } - ///State transition - sets the `followers` field to Set - pub struct SetFollowers(PhantomData S>); - impl sealed::Sealed for SetFollowers {} - impl State for SetFollowers { - type Followers = Set; - type Count = S::Count; + type Followers = Unset; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData S>); impl sealed::Sealed for SetCount {} impl State for SetCount { - type Followers = S::Followers; type Count = Set; + type Followers = S::Followers; + } + ///State transition - sets the `followers` field to Set + pub struct SetFollowers(PhantomData S>); + impl sealed::Sealed for SetFollowers {} + impl State for SetFollowers { + type Count = S::Count; + type Followers = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `followers` field - pub struct followers(()); ///Marker type for the `count` field pub struct count(()); + ///Marker type for the `followers` field + pub struct followers(()); } } @@ -3140,8 +3140,8 @@ where impl<'a, S> KnownFollowersBuilder<'a, S> where S: known_followers_state::State, - S::Followers: known_followers_state::IsSet, S::Count: known_followers_state::IsSet, + S::Followers: known_followers_state::IsSet, { /// Build the final struct pub fn build(self) -> KnownFollowers<'a> { @@ -5141,37 +5141,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -5454,8 +5454,8 @@ impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, - S::Did: profile_view_basic_state::IsSet, S::Handle: profile_view_basic_state::IsSet, + S::Did: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { @@ -5633,37 +5633,37 @@ pub mod profile_view_detailed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -6117,8 +6117,8 @@ impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S impl<'a, S> ProfileViewDetailedBuilder<'a, S> where S: profile_view_detailed_state::State, - S::Did: profile_view_detailed_state::IsSet, S::Handle: profile_view_detailed_state::IsSet, + S::Did: profile_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewDetailed<'a> { @@ -6290,67 +6290,67 @@ pub mod saved_feed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Id; - type Pinned; type Type; + type Value; + type Pinned; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; type Id = Unset; - type Pinned = Unset; type Type = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Id = S::Id; - type Pinned = S::Pinned; - type Type = S::Type; + type Value = Unset; + type Pinned = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Value = S::Value; type Id = Set; - type Pinned = S::Pinned; type Type = S::Type; - } - ///State transition - sets the `pinned` field to Set - pub struct SetPinned(PhantomData S>); - impl sealed::Sealed for SetPinned {} - impl State for SetPinned { type Value = S::Value; - type Id = S::Id; - type Pinned = Set; - type Type = S::Type; + type Pinned = S::Pinned; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { + type Id = S::Id; + type Type = Set; type Value = S::Value; + type Pinned = S::Pinned; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type Id = S::Id; + type Type = S::Type; + type Value = Set; type Pinned = S::Pinned; - type Type = Set; + } + ///State transition - sets the `pinned` field to Set + pub struct SetPinned(PhantomData S>); + impl sealed::Sealed for SetPinned {} + impl State for SetPinned { + type Id = S::Id; + type Type = S::Type; + type Value = S::Value; + type Pinned = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `pinned` field - pub struct pinned(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `pinned` field + pub struct pinned(()); } } @@ -6463,10 +6463,10 @@ where impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, - S::Value: saved_feed_state::IsSet, S::Id: saved_feed_state::IsSet, - S::Pinned: saved_feed_state::IsSet, S::Type: saved_feed_state::IsSet, + S::Value: saved_feed_state::IsSet, + S::Pinned: saved_feed_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeed<'a> { @@ -6883,37 +6883,37 @@ pub mod status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Status; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Status = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Status = S::Status; + type Record = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Record = S::Record; type Status = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Status = S::Status; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -7040,8 +7040,8 @@ where impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, - S::Record: status_view_state::IsSet, S::Status: status_view_state::IsSet, + S::Record: status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StatusView<'a> { @@ -7196,51 +7196,51 @@ pub mod verification_state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type VerifiedStatus; type Verifications; type TrustedVerifierStatus; + type VerifiedStatus; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type VerifiedStatus = Unset; type Verifications = Unset; type TrustedVerifierStatus = Unset; - } - ///State transition - sets the `verified_status` field to Set - pub struct SetVerifiedStatus(PhantomData S>); - impl sealed::Sealed for SetVerifiedStatus {} - impl State for SetVerifiedStatus { - type VerifiedStatus = Set; - type Verifications = S::Verifications; - type TrustedVerifierStatus = S::TrustedVerifierStatus; + type VerifiedStatus = Unset; } ///State transition - sets the `verifications` field to Set pub struct SetVerifications(PhantomData S>); impl sealed::Sealed for SetVerifications {} impl State for SetVerifications { - type VerifiedStatus = S::VerifiedStatus; type Verifications = Set; type TrustedVerifierStatus = S::TrustedVerifierStatus; + type VerifiedStatus = S::VerifiedStatus; } ///State transition - sets the `trusted_verifier_status` field to Set pub struct SetTrustedVerifierStatus(PhantomData S>); impl sealed::Sealed for SetTrustedVerifierStatus {} impl State for SetTrustedVerifierStatus { - type VerifiedStatus = S::VerifiedStatus; type Verifications = S::Verifications; type TrustedVerifierStatus = Set; + type VerifiedStatus = S::VerifiedStatus; + } + ///State transition - sets the `verified_status` field to Set + pub struct SetVerifiedStatus(PhantomData S>); + impl sealed::Sealed for SetVerifiedStatus {} + impl State for SetVerifiedStatus { + type Verifications = S::Verifications; + type TrustedVerifierStatus = S::TrustedVerifierStatus; + type VerifiedStatus = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `verified_status` field - pub struct verified_status(()); ///Marker type for the `verifications` field pub struct verifications(()); ///Marker type for the `trusted_verifier_status` field pub struct trusted_verifier_status(()); + ///Marker type for the `verified_status` field + pub struct verified_status(()); } } @@ -7336,9 +7336,9 @@ where impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, - S::VerifiedStatus: verification_state_state::IsSet, S::Verifications: verification_state_state::IsSet, S::TrustedVerifierStatus: verification_state_state::IsSet, + S::VerifiedStatus: verification_state_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationState<'a> { @@ -7418,67 +7418,67 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Issuer; + type CreatedAt; type Uri; + type Issuer; type IsValid; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Issuer = Unset; + type CreatedAt = Unset; type Uri = Unset; + type Issuer = Unset; type IsValid = Unset; - type CreatedAt = Unset; } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData S>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { - type Issuer = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Uri = S::Uri; + type Issuer = S::Issuer; type IsValid = S::IsValid; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Issuer = S::Issuer; + type CreatedAt = S::CreatedAt; type Uri = Set; + type Issuer = S::Issuer; type IsValid = S::IsValid; + } + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { type CreatedAt = S::CreatedAt; + type Uri = S::Uri; + type Issuer = Set; + type IsValid = S::IsValid; } ///State transition - sets the `is_valid` field to Set pub struct SetIsValid(PhantomData S>); impl sealed::Sealed for SetIsValid {} impl State for SetIsValid { - type Issuer = S::Issuer; - type Uri = S::Uri; - type IsValid = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Issuer = S::Issuer; type Uri = S::Uri; - type IsValid = S::IsValid; - type CreatedAt = Set; + type Issuer = S::Issuer; + type IsValid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `issuer` field - pub struct issuer(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `issuer` field + pub struct issuer(()); ///Marker type for the `is_valid` field pub struct is_valid(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -7591,10 +7591,10 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, - S::Issuer: verification_view_state::IsSet, + S::CreatedAt: verification_view_state::IsSet, S::Uri: verification_view_state::IsSet, + S::Issuer: verification_view_state::IsSet, S::IsValid: verification_view_state::IsSet, - S::CreatedAt: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { diff --git a/crates/weaver-api/src/app_bsky/ageassurance.rs b/crates/weaver-api/src/app_bsky/ageassurance.rs index c49bc4f..77c56fe 100644 --- a/crates/weaver-api/src/app_bsky/ageassurance.rs +++ b/crates/weaver-api/src/app_bsky/ageassurance.rs @@ -1111,37 +1111,37 @@ pub mod config_region_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rules; type CountryCode; + type Rules; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rules = Unset; type CountryCode = Unset; - } - ///State transition - sets the `rules` field to Set - pub struct SetRules(PhantomData S>); - impl sealed::Sealed for SetRules {} - impl State for SetRules { - type Rules = Set; - type CountryCode = S::CountryCode; + type Rules = Unset; } ///State transition - sets the `country_code` field to Set pub struct SetCountryCode(PhantomData S>); impl sealed::Sealed for SetCountryCode {} impl State for SetCountryCode { - type Rules = S::Rules; type CountryCode = Set; + type Rules = S::Rules; + } + ///State transition - sets the `rules` field to Set + pub struct SetRules(PhantomData S>); + impl sealed::Sealed for SetRules {} + impl State for SetRules { + type CountryCode = S::CountryCode; + type Rules = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rules` field - pub struct rules(()); ///Marker type for the `country_code` field pub struct country_code(()); + ///Marker type for the `rules` field + pub struct rules(()); } } @@ -1234,8 +1234,8 @@ where impl<'a, S> ConfigRegionBuilder<'a, S> where S: config_region_state::State, - S::Rules: config_region_state::IsSet, S::CountryCode: config_region_state::IsSet, + S::Rules: config_region_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegion<'a> { @@ -2082,37 +2082,37 @@ pub mod config_region_rule_if_assured_under_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = S::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData S>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = S::Access; type Age = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = S::Age; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `age` field pub struct age(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -2202,8 +2202,8 @@ where impl<'a, S> ConfigRegionRuleIfAssuredUnderAgeBuilder<'a, S> where S: config_region_rule_if_assured_under_age_state::State, - S::Access: config_region_rule_if_assured_under_age_state::IsSet, S::Age: config_region_rule_if_assured_under_age_state::IsSet, + S::Access: config_region_rule_if_assured_under_age_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAssuredUnderAge<'a> { @@ -2276,37 +2276,37 @@ pub mod config_region_rule_if_declared_over_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = S::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData S>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = S::Access; type Age = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = S::Age; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `age` field pub struct age(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -2396,8 +2396,8 @@ where impl<'a, S> ConfigRegionRuleIfDeclaredOverAgeBuilder<'a, S> where S: config_region_rule_if_declared_over_age_state::State, - S::Access: config_region_rule_if_declared_over_age_state::IsSet, S::Age: config_region_rule_if_declared_over_age_state::IsSet, + S::Access: config_region_rule_if_declared_over_age_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfDeclaredOverAge<'a> { @@ -2698,85 +2698,85 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; - type AttemptId; + type CreatedAt; type Access; + type AttemptId; type CountryCode; - type CreatedAt; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; - type AttemptId = Unset; + type CreatedAt = Unset; type Access = Unset; + type AttemptId = Unset; type CountryCode = Unset; - type CreatedAt = Unset; + type Status = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type AttemptId = S::AttemptId; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Access = S::Access; + type AttemptId = S::AttemptId; type CountryCode = S::CountryCode; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `attempt_id` field to Set - pub struct SetAttemptId(PhantomData S>); - impl sealed::Sealed for SetAttemptId {} - impl State for SetAttemptId { type Status = S::Status; - type AttemptId = Set; - type Access = S::Access; - type CountryCode = S::CountryCode; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData S>); impl sealed::Sealed for SetAccess {} impl State for SetAccess { - type Status = S::Status; - type AttemptId = S::AttemptId; + type CreatedAt = S::CreatedAt; type Access = Set; + type AttemptId = S::AttemptId; type CountryCode = S::CountryCode; + type Status = S::Status; + } + ///State transition - sets the `attempt_id` field to Set + pub struct SetAttemptId(PhantomData S>); + impl sealed::Sealed for SetAttemptId {} + impl State for SetAttemptId { type CreatedAt = S::CreatedAt; + type Access = S::Access; + type AttemptId = Set; + type CountryCode = S::CountryCode; + type Status = S::Status; } ///State transition - sets the `country_code` field to Set pub struct SetCountryCode(PhantomData S>); impl sealed::Sealed for SetCountryCode {} impl State for SetCountryCode { - type Status = S::Status; - type AttemptId = S::AttemptId; + type CreatedAt = S::CreatedAt; type Access = S::Access; + type AttemptId = S::AttemptId; type CountryCode = Set; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Status = S::Status; - type AttemptId = S::AttemptId; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = S::CreatedAt; type Access = S::Access; + type AttemptId = S::AttemptId; type CountryCode = S::CountryCode; - type CreatedAt = Set; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `attempt_id` field - pub struct attempt_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `access` field pub struct access(()); + ///Marker type for the `attempt_id` field + pub struct attempt_id(()); ///Marker type for the `country_code` field pub struct country_code(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -3032,11 +3032,11 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::Status: event_state::IsSet, - S::AttemptId: event_state::IsSet, + S::CreatedAt: event_state::IsSet, S::Access: event_state::IsSet, + S::AttemptId: event_state::IsSet, S::CountryCode: event_state::IsSet, - S::CreatedAt: event_state::IsSet, + S::Status: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -3129,37 +3129,37 @@ pub mod state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Status; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Status = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Status = S::Status; + type Access = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Access = S::Access; type Status = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Status = S::Status; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -3252,8 +3252,8 @@ where impl<'a, S> StateBuilder<'a, S> where S: state_state::State, - S::Access: state_state::IsSet, S::Status: state_state::IsSet, + S::Access: state_state::IsSet, { /// Build the final struct pub fn build(self) -> State<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed.rs b/crates/weaver-api/src/app_bsky/embed.rs index edfa136..27ec288 100644 --- a/crates/weaver-api/src/app_bsky/embed.rs +++ b/crates/weaver-api/src/app_bsky/embed.rs @@ -38,37 +38,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData S>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = S::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = S::Width; type Height = Set; + type Width = S::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = S::Height; + type Width = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `height` field pub struct height(()); + ///Marker type for the `width` field + pub struct width(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AspectRatioBuilder<'a, S> where S: aspect_ratio_state::State, - S::Width: aspect_ratio_state::IsSet, S::Height: aspect_ratio_state::IsSet, + S::Width: aspect_ratio_state::IsSet, { /// Build the final struct pub fn build(self) -> AspectRatio<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/external.rs b/crates/weaver-api/src/app_bsky/embed/external.rs index a693915..cea205e 100644 --- a/crates/weaver-api/src/app_bsky/embed/external.rs +++ b/crates/weaver-api/src/app_bsky/embed/external.rs @@ -38,51 +38,51 @@ pub mod external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Description; type Uri; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Description = Unset; type Uri = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Description = S::Description; - type Uri = S::Uri; + type Title = Unset; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Title = S::Title; type Description = Set; type Uri = S::Uri; + type Title = S::Title; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = S::Title; type Description = S::Description; type Uri = Set; + type Title = S::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Description = S::Description; + type Uri = S::Uri; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `description` field pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, - S::Title: external_state::IsSet, S::Description: external_state::IsSet, S::Uri: external_state::IsSet, + S::Title: external_state::IsSet, { /// Build the final struct pub fn build(self) -> External<'a> { @@ -784,49 +784,49 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Description; + type Uri; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Description = Unset; + type Uri = Unset; type Title = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Description = S::Description; - type Title = S::Title; - } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Uri = S::Uri; type Description = Set; + type Uri = S::Uri; + type Title = S::Title; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Description = S::Description; + type Uri = Set; type Title = S::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Uri = S::Uri; type Description = S::Description; + type Uri = S::Uri; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `title` field pub struct title(()); } @@ -941,8 +941,8 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Uri: view_external_state::IsSet, S::Description: view_external_state::IsSet, + S::Uri: view_external_state::IsSet, S::Title: view_external_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/embed/images.rs b/crates/weaver-api/src/app_bsky/embed/images.rs index 38edf27..a9e20d5 100644 --- a/crates/weaver-api/src/app_bsky/embed/images.rs +++ b/crates/weaver-api/src/app_bsky/embed/images.rs @@ -761,50 +761,50 @@ pub mod view_image_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Alt; - type Thumb; type Fullsize; + type Thumb; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Alt = Unset; - type Thumb = Unset; type Fullsize = Unset; + type Thumb = Unset; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { type Alt = Set; - type Thumb = S::Thumb; - type Fullsize = S::Fullsize; - } - ///State transition - sets the `thumb` field to Set - pub struct SetThumb(PhantomData S>); - impl sealed::Sealed for SetThumb {} - impl State for SetThumb { - type Alt = S::Alt; - type Thumb = Set; type Fullsize = S::Fullsize; + type Thumb = S::Thumb; } ///State transition - sets the `fullsize` field to Set pub struct SetFullsize(PhantomData S>); impl sealed::Sealed for SetFullsize {} impl State for SetFullsize { type Alt = S::Alt; - type Thumb = S::Thumb; type Fullsize = Set; + type Thumb = S::Thumb; + } + ///State transition - sets the `thumb` field to Set + pub struct SetThumb(PhantomData S>); + impl sealed::Sealed for SetThumb {} + impl State for SetThumb { + type Alt = S::Alt; + type Fullsize = S::Fullsize; + type Thumb = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `alt` field pub struct alt(()); - ///Marker type for the `thumb` field - pub struct thumb(()); ///Marker type for the `fullsize` field pub struct fullsize(()); + ///Marker type for the `thumb` field + pub struct thumb(()); } } @@ -918,8 +918,8 @@ impl<'a, S> ViewImageBuilder<'a, S> where S: view_image_state::State, S::Alt: view_image_state::IsSet, - S::Thumb: view_image_state::IsSet, S::Fullsize: view_image_state::IsSet, + S::Thumb: view_image_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewImage<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/record.rs b/crates/weaver-api/src/app_bsky/embed/record.rs index abeaac6..2fcad3b 100644 --- a/crates/weaver-api/src/app_bsky/embed/record.rs +++ b/crates/weaver-api/src/app_bsky/embed/record.rs @@ -723,49 +723,49 @@ pub mod view_blocked_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Author; + type Uri; type Blocked; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Author = Unset; + type Uri = Unset; type Blocked = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Author = S::Author; - type Blocked = S::Blocked; - } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = S::Uri; type Author = Set; + type Uri = S::Uri; + type Blocked = S::Blocked; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Author = S::Author; + type Uri = Set; type Blocked = S::Blocked; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Uri = S::Uri; type Author = S::Author; + type Uri = S::Uri; type Blocked = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `blocked` field pub struct blocked(()); } @@ -860,8 +860,8 @@ where impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, - S::Uri: view_blocked_state::IsSet, S::Author: view_blocked_state::IsSet, + S::Uri: view_blocked_state::IsSet, S::Blocked: view_blocked_state::IsSet, { /// Build the final struct @@ -1108,37 +1108,37 @@ pub mod view_not_found_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type NotFound; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type NotFound = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = S::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = S::Uri; type NotFound = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = S::NotFound; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `not_found` field pub struct not_found(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1211,8 +1211,8 @@ where impl<'a, S> ViewNotFoundBuilder<'a, S> where S: view_not_found_state::State, - S::Uri: view_not_found_state::IsSet, S::NotFound: view_not_found_state::IsSet, + S::Uri: view_not_found_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewNotFound<'a> { @@ -1304,84 +1304,84 @@ pub mod view_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; - type Cid; - type Value; type Author; type IndexedAt; + type Cid; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; - type Cid = Unset; - type Value = Unset; type Author = Unset; type IndexedAt = Unset; + type Cid = Unset; + type Value = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; - type Cid = S::Cid; - type Value = S::Value; - type Author = S::Author; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = S::Uri; - type Cid = Set; - type Value = S::Value; type Author = S::Author; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Uri = S::Uri; type Cid = S::Cid; - type Value = Set; - type Author = S::Author; - type IndexedAt = S::IndexedAt; + type Value = S::Value; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type Uri = S::Uri; - type Cid = S::Cid; - type Value = S::Value; type Author = Set; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Value = S::Value; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Uri = S::Uri; + type Author = S::Author; + type IndexedAt = Set; type Cid = S::Cid; type Value = S::Value; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; + type Author = S::Author; + type IndexedAt = S::IndexedAt; + type Cid = Set; + type Value = S::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Uri = S::Uri; type Author = S::Author; - type IndexedAt = Set; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -1620,10 +1620,10 @@ impl<'a, S> ViewRecordBuilder<'a, S> where S: view_record_state::State, S::Uri: view_record_state::IsSet, - S::Cid: view_record_state::IsSet, - S::Value: view_record_state::IsSet, S::Author: view_record_state::IsSet, S::IndexedAt: view_record_state::IsSet, + S::Cid: view_record_state::IsSet, + S::Value: view_record_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewRecord<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/record_with_media.rs b/crates/weaver-api/src/app_bsky/embed/record_with_media.rs index 11a250f..edebb00 100644 --- a/crates/weaver-api/src/app_bsky/embed/record_with_media.rs +++ b/crates/weaver-api/src/app_bsky/embed/record_with_media.rs @@ -33,37 +33,37 @@ pub mod record_with_media_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = S::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData S>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = S::Record; type Media = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = S::Media; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RecordWithMediaBuilder<'a, S> where S: record_with_media_state::State, - S::Record: record_with_media_state::IsSet, S::Media: record_with_media_state::IsSet, + S::Record: record_with_media_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordWithMedia<'a> { @@ -322,37 +322,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = S::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData S>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = S::Record; type Media = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = S::Media; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -425,8 +425,8 @@ where impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, - S::Record: view_state::IsSet, S::Media: view_state::IsSet, + S::Record: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/video.rs b/crates/weaver-api/src/app_bsky/embed/video.rs index a4169e3..73ef658 100644 --- a/crates/weaver-api/src/app_bsky/embed/video.rs +++ b/crates/weaver-api/src/app_bsky/embed/video.rs @@ -32,37 +32,37 @@ pub mod caption_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type File; type Lang; + type File; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type File = Unset; type Lang = Unset; - } - ///State transition - sets the `file` field to Set - pub struct SetFile(PhantomData S>); - impl sealed::Sealed for SetFile {} - impl State for SetFile { - type File = Set; - type Lang = S::Lang; + type File = Unset; } ///State transition - sets the `lang` field to Set pub struct SetLang(PhantomData S>); impl sealed::Sealed for SetLang {} impl State for SetLang { - type File = S::File; type Lang = Set; + type File = S::File; + } + ///State transition - sets the `file` field to Set + pub struct SetFile(PhantomData S>); + impl sealed::Sealed for SetFile {} + impl State for SetFile { + type Lang = S::Lang; + type File = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `file` field - pub struct file(()); ///Marker type for the `lang` field pub struct lang(()); + ///Marker type for the `file` field + pub struct file(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> CaptionBuilder<'a, S> where S: caption_state::State, - S::File: caption_state::IsSet, S::Lang: caption_state::IsSet, + S::File: caption_state::IsSet, { /// Build the final struct pub fn build(self) -> Caption<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed.rs b/crates/weaver-api/src/app_bsky/feed.rs index 96387eb..7bea208 100644 --- a/crates/weaver-api/src/app_bsky/feed.rs +++ b/crates/weaver-api/src/app_bsky/feed.rs @@ -1609,51 +1609,51 @@ pub mod blocked_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; type Uri; type Blocked; + type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; type Uri = Unset; type Blocked = Unset; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type Uri = S::Uri; - type Blocked = S::Blocked; + type Author = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Author = S::Author; type Uri = Set; type Blocked = S::Blocked; + type Author = S::Author; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Author = S::Author; type Uri = S::Uri; type Blocked = Set; + type Author = S::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Uri = S::Uri; + type Blocked = S::Blocked; + type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `blocked` field pub struct blocked(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -1746,9 +1746,9 @@ where impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, - S::Author: blocked_post_state::IsSet, S::Uri: blocked_post_state::IsSet, S::Blocked: blocked_post_state::IsSet, + S::Author: blocked_post_state::IsSet, { /// Build the final struct pub fn build(self) -> BlockedPost<'a> { @@ -2234,105 +2234,105 @@ pub mod generator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type IndexedAt; type Creator; type Cid; - type DisplayName; type Did; + type DisplayName; + type IndexedAt; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type IndexedAt = Unset; type Creator = Unset; type Cid = Unset; - type DisplayName = Unset; type Did = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; - type Cid = S::Cid; - type DisplayName = S::DisplayName; - type Did = S::Did; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Uri = S::Uri; - type IndexedAt = Set; - type Creator = S::Creator; - type Cid = S::Cid; - type DisplayName = S::DisplayName; - type Did = S::Did; + type DisplayName = Unset; + type IndexedAt = Unset; + type Uri = Unset; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Creator = Set; type Cid = S::Cid; - type DisplayName = S::DisplayName; type Did = S::Did; + type DisplayName = S::DisplayName; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Creator = S::Creator; type Cid = Set; - type DisplayName = S::DisplayName; type Did = S::Did; + type DisplayName = S::DisplayName; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Creator = S::Creator; + type Cid = S::Cid; + type Did = Set; + type DisplayName = S::DisplayName; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Creator = S::Creator; type Cid = S::Cid; - type DisplayName = Set; type Did = S::Did; + type DisplayName = Set; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Creator = S::Creator; + type Cid = S::Cid; + type Did = S::Did; + type DisplayName = S::DisplayName; + type IndexedAt = Set; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Creator = S::Creator; type Cid = S::Cid; + type Did = S::Did; type DisplayName = S::DisplayName; - type Did = Set; + type IndexedAt = S::IndexedAt; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `creator` field pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -2648,12 +2648,12 @@ impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, - S::Uri: generator_view_state::IsSet, - S::IndexedAt: generator_view_state::IsSet, S::Creator: generator_view_state::IsSet, S::Cid: generator_view_state::IsSet, - S::DisplayName: generator_view_state::IsSet, S::Did: generator_view_state::IsSet, + S::DisplayName: generator_view_state::IsSet, + S::IndexedAt: generator_view_state::IsSet, + S::Uri: generator_view_state::IsSet, { /// Build the final struct pub fn build(self) -> GeneratorView<'a> { @@ -3207,85 +3207,85 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Author; + type Record; type IndexedAt; type Uri; - type Author; type Cid; - type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Author = Unset; + type Record = Unset; type IndexedAt = Unset; type Uri = Unset; - type Author = Unset; type Cid = Unset; - type Record = Unset; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Author = Set; + type Record = S::Record; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Cid = S::Cid; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Author = S::Author; + type Record = Set; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Author = S::Author; + type Record = S::Record; type IndexedAt = Set; type Uri = S::Uri; - type Author = S::Author; type Cid = S::Cid; - type Record = S::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type IndexedAt = S::IndexedAt; - type Uri = Set; type Author = S::Author; - type Cid = S::Cid; type Record = S::Record; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Author = Set; + type Uri = Set; type Cid = S::Cid; - type Record = S::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; type Author = S::Author; - type Cid = Set; type Record = S::Record; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Author = S::Author; - type Cid = S::Cid; - type Record = Set; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `author` field + pub struct author(()); + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `record` field - pub struct record(()); } } @@ -3598,11 +3598,11 @@ impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, + S::Author: post_view_state::IsSet, + S::Record: post_view_state::IsSet, S::IndexedAt: post_view_state::IsSet, S::Uri: post_view_state::IsSet, - S::Author: post_view_state::IsSet, S::Cid: post_view_state::IsSet, - S::Record: post_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PostView<'a> { @@ -3759,37 +3759,37 @@ pub mod reason_repost_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type By; type IndexedAt; + type By; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type By = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `by` field to Set - pub struct SetBy(PhantomData S>); - impl sealed::Sealed for SetBy {} - impl State for SetBy { - type By = Set; - type IndexedAt = S::IndexedAt; + type By = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type By = S::By; type IndexedAt = Set; + type By = S::By; + } + ///State transition - sets the `by` field to Set + pub struct SetBy(PhantomData S>); + impl sealed::Sealed for SetBy {} + impl State for SetBy { + type IndexedAt = S::IndexedAt; + type By = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `by` field - pub struct by(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `by` field + pub struct by(()); } } @@ -3902,8 +3902,8 @@ impl<'a, S: reason_repost_state::State> ReasonRepostBuilder<'a, S> { impl<'a, S> ReasonRepostBuilder<'a, S> where S: reason_repost_state::State, - S::By: reason_repost_state::IsSet, S::IndexedAt: reason_repost_state::IsSet, + S::By: reason_repost_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonRepost<'a> { @@ -3984,37 +3984,37 @@ pub mod reply_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Root; type Parent; + type Root; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Root = Unset; type Parent = Unset; - } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData S>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Parent = S::Parent; + type Root = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData S>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Root = S::Root; type Parent = Set; + type Root = S::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData S>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = S::Parent; + type Root = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `root` field - pub struct root(()); ///Marker type for the `parent` field pub struct parent(()); + ///Marker type for the `root` field + pub struct root(()); } } @@ -4107,8 +4107,8 @@ where impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, - S::Root: reply_ref_state::IsSet, S::Parent: reply_ref_state::IsSet, + S::Root: reply_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> ReplyRef<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/generator.rs b/crates/weaver-api/src/app_bsky/feed/generator.rs index 711b6f4..26c10e8 100644 --- a/crates/weaver-api/src/app_bsky/feed/generator.rs +++ b/crates/weaver-api/src/app_bsky/feed/generator.rs @@ -57,50 +57,50 @@ pub mod generator_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type DisplayName; - type Did; type CreatedAt; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type DisplayName = Unset; - type Did = Unset; type CreatedAt = Unset; + type Did = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type DisplayName = Set; - type Did = S::Did; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type DisplayName = S::DisplayName; - type Did = Set; type CreatedAt = S::CreatedAt; + type Did = S::Did; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type DisplayName = S::DisplayName; - type Did = S::Did; type CreatedAt = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type DisplayName = S::DisplayName; + type CreatedAt = S::CreatedAt; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -318,8 +318,8 @@ impl<'a, S> GeneratorBuilder<'a, S> where S: generator_state::State, S::DisplayName: generator_state::IsSet, - S::Did: generator_state::IsSet, S::CreatedAt: generator_state::IsSet, + S::Did: generator_state::IsSet, { /// Build the final struct pub fn build(self) -> Generator<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/get_likes.rs b/crates/weaver-api/src/app_bsky/feed/get_likes.rs index 0036f79..d63c059 100644 --- a/crates/weaver-api/src/app_bsky/feed/get_likes.rs +++ b/crates/weaver-api/src/app_bsky/feed/get_likes.rs @@ -33,51 +33,51 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Actor; type CreatedAt; type IndexedAt; - type Actor; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Actor = Unset; type CreatedAt = Unset; type IndexedAt = Unset; - type Actor = Unset; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData S>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type Actor = Set; + type CreatedAt = S::CreatedAt; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Actor = S::Actor; type CreatedAt = Set; type IndexedAt = S::IndexedAt; - type Actor = S::Actor; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type CreatedAt = S::CreatedAt; - type IndexedAt = Set; type Actor = S::Actor; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData S>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { type CreatedAt = S::CreatedAt; - type IndexedAt = S::IndexedAt; - type Actor = Set; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `actor` field + pub struct actor(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `actor` field - pub struct actor(()); } } @@ -170,9 +170,9 @@ where impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, + S::Actor: like_state::IsSet, S::CreatedAt: like_state::IsSet, S::IndexedAt: like_state::IsSet, - S::Actor: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/like.rs b/crates/weaver-api/src/app_bsky/feed/like.rs index 29aa754..7d60480 100644 --- a/crates/weaver-api/src/app_bsky/feed/like.rs +++ b/crates/weaver-api/src/app_bsky/feed/like.rs @@ -36,37 +36,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -159,8 +159,8 @@ impl<'a, S: like_state::State> LikeBuilder<'a, S> { impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, - S::CreatedAt: like_state::IsSet, S::Subject: like_state::IsSet, + S::CreatedAt: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/post.rs b/crates/weaver-api/src/app_bsky/feed/post.rs index 2112aa4..c93d990 100644 --- a/crates/weaver-api/src/app_bsky/feed/post.rs +++ b/crates/weaver-api/src/app_bsky/feed/post.rs @@ -37,51 +37,51 @@ pub mod entity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Type; type Value; + type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Index = Unset; type Type = Unset; type Value = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Type = S::Type; - type Value = S::Value; + type Index = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { - type Index = S::Index; type Type = Set; type Value = S::Value; + type Index = S::Index; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Index = S::Index; type Type = S::Type; type Value = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Type = S::Type; + type Value = S::Value; + type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `index` field - pub struct index(()); ///Marker type for the `type` field pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> EntityBuilder<'a, S> where S: entity_state::State, - S::Index: entity_state::IsSet, S::Type: entity_state::IsSet, S::Value: entity_state::IsSet, + S::Index: entity_state::IsSet, { /// Build the final struct pub fn build(self) -> Entity<'a> { @@ -622,37 +622,37 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; type CreatedAt; + type Text; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Text = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData S>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type CreatedAt = S::CreatedAt; + type Text = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Text = S::Text; type CreatedAt = Set; + type Text = S::Text; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData S>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type CreatedAt = S::CreatedAt; + type Text = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `text` field - pub struct text(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `text` field + pub struct text(()); } } @@ -869,8 +869,8 @@ where impl<'a, S> PostBuilder<'a, S> where S: post_state::State, - S::Text: post_state::IsSet, S::CreatedAt: post_state::IsSet, + S::Text: post_state::IsSet, { /// Build the final struct pub fn build(self) -> Post<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/postgate.rs b/crates/weaver-api/src/app_bsky/feed/postgate.rs index f10b387..196efae 100644 --- a/crates/weaver-api/src/app_bsky/feed/postgate.rs +++ b/crates/weaver-api/src/app_bsky/feed/postgate.rs @@ -224,37 +224,37 @@ pub mod postgate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type CreatedAt; + type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type CreatedAt = S::CreatedAt; + type Post = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Post = S::Post; type CreatedAt = Set; + type Post = S::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type CreatedAt = S::CreatedAt; + type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `post` field - pub struct post(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `post` field + pub struct post(()); } } @@ -367,8 +367,8 @@ where impl<'a, S> PostgateBuilder<'a, S> where S: postgate_state::State, - S::Post: postgate_state::IsSet, S::CreatedAt: postgate_state::IsSet, + S::Post: postgate_state::IsSet, { /// Build the final struct pub fn build(self) -> Postgate<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/repost.rs b/crates/weaver-api/src/app_bsky/feed/repost.rs index bd94244..3c88b6b 100644 --- a/crates/weaver-api/src/app_bsky/feed/repost.rs +++ b/crates/weaver-api/src/app_bsky/feed/repost.rs @@ -36,37 +36,37 @@ pub mod repost_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -159,8 +159,8 @@ impl<'a, S: repost_state::State> RepostBuilder<'a, S> { impl<'a, S> RepostBuilder<'a, S> where S: repost_state::State, - S::CreatedAt: repost_state::IsSet, S::Subject: repost_state::IsSet, + S::CreatedAt: repost_state::IsSet, { /// Build the final struct pub fn build(self) -> Repost<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/threadgate.rs b/crates/weaver-api/src/app_bsky/feed/threadgate.rs index 6384dab..e68990f 100644 --- a/crates/weaver-api/src/app_bsky/feed/threadgate.rs +++ b/crates/weaver-api/src/app_bsky/feed/threadgate.rs @@ -463,37 +463,37 @@ pub mod threadgate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Post; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Post = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Post = S::Post; + type CreatedAt = Unset; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData S>); impl sealed::Sealed for SetPost {} impl State for SetPost { - type CreatedAt = S::CreatedAt; type Post = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Post = S::Post; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `post` field pub struct post(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -603,8 +603,8 @@ where impl<'a, S> ThreadgateBuilder<'a, S> where S: threadgate_state::State, - S::CreatedAt: threadgate_state::IsSet, S::Post: threadgate_state::IsSet, + S::CreatedAt: threadgate_state::IsSet, { /// Build the final struct pub fn build(self) -> Threadgate<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph.rs b/crates/weaver-api/src/app_bsky/graph.rs index 8a2ceed..317509f 100644 --- a/crates/weaver-api/src/app_bsky/graph.rs +++ b/crates/weaver-api/src/app_bsky/graph.rs @@ -82,37 +82,37 @@ pub mod list_item_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Subject; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Subject = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Subject = S::Subject; + type Uri = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Uri = S::Uri; type Subject = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Subject = S::Subject; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -185,8 +185,8 @@ where impl<'a, S> ListItemViewBuilder<'a, S> where S: list_item_view_state::State, - S::Uri: list_item_view_state::IsSet, S::Subject: list_item_view_state::IsSet, + S::Uri: list_item_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListItemView<'a> { @@ -1277,105 +1277,105 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; type Purpose; type IndexedAt; + type Uri; type Name; - type Cid; type Creator; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Cid = Unset; type Purpose = Unset; type IndexedAt = Unset; + type Uri = Unset; type Name = Unset; - type Cid = Unset; type Creator = Unset; - type Uri = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Name = S::Name; + type Creator = S::Creator; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { + type Cid = S::Cid; type Purpose = Set; type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Name = S::Name; - type Cid = S::Cid; type Creator = S::Creator; - type Uri = S::Uri; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = Set; + type Uri = S::Uri; type Name = S::Name; + type Creator = S::Creator; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Cid = S::Cid; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + type Uri = Set; + type Name = S::Name; type Creator = S::Creator; - type Uri = S::Uri; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - type Name = Set; type Cid = S::Cid; - type Creator = S::Creator; - type Uri = S::Uri; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; - type Name = S::Name; - type Cid = Set; - type Creator = S::Creator; type Uri = S::Uri; + type Name = Set; + type Creator = S::Creator; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - type Name = S::Name; type Cid = S::Cid; - type Creator = Set; - type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Name = S::Name; - type Cid = S::Cid; - type Creator = S::Creator; - type Uri = Set; + type Creator = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -1655,12 +1655,12 @@ impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, + S::Cid: list_view_state::IsSet, S::Purpose: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, + S::Uri: list_view_state::IsSet, S::Name: list_view_state::IsSet, - S::Cid: list_view_state::IsSet, S::Creator: list_view_state::IsSet, - S::Uri: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { @@ -1835,67 +1835,67 @@ pub mod list_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Cid; type Purpose; type Name; + type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Cid = Unset; type Purpose = Unset; type Name = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = S::Cid; - type Purpose = S::Purpose; - type Name = S::Name; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = S::Uri; - type Cid = Set; - type Purpose = S::Purpose; - type Name = S::Name; + type Cid = Unset; + type Uri = Unset; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Uri = S::Uri; - type Cid = S::Cid; type Purpose = Set; type Name = S::Name; + type Cid = S::Cid; + type Uri = S::Uri; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Uri = S::Uri; - type Cid = S::Cid; type Purpose = S::Purpose; type Name = Set; + type Cid = S::Cid; + type Uri = S::Uri; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Purpose = S::Purpose; + type Name = S::Name; + type Cid = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Purpose = S::Purpose; + type Name = S::Name; + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -2112,10 +2112,10 @@ impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, - S::Uri: list_view_basic_state::IsSet, - S::Cid: list_view_basic_state::IsSet, S::Purpose: list_view_basic_state::IsSet, S::Name: list_view_basic_state::IsSet, + S::Cid: list_view_basic_state::IsSet, + S::Uri: list_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ListViewBasic<'a> { @@ -2292,37 +2292,37 @@ pub mod not_found_actor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type NotFound; type Actor; + type NotFound; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type NotFound = Unset; type Actor = Unset; - } - ///State transition - sets the `not_found` field to Set - pub struct SetNotFound(PhantomData S>); - impl sealed::Sealed for SetNotFound {} - impl State for SetNotFound { - type NotFound = Set; - type Actor = S::Actor; + type NotFound = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type NotFound = S::NotFound; type Actor = Set; + type NotFound = S::NotFound; + } + ///State transition - sets the `not_found` field to Set + pub struct SetNotFound(PhantomData S>); + impl sealed::Sealed for SetNotFound {} + impl State for SetNotFound { + type Actor = S::Actor; + type NotFound = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `not_found` field - pub struct not_found(()); ///Marker type for the `actor` field pub struct actor(()); + ///Marker type for the `not_found` field + pub struct not_found(()); } } @@ -2395,8 +2395,8 @@ where impl<'a, S> NotFoundActorBuilder<'a, S> where S: not_found_actor_state::State, - S::NotFound: not_found_actor_state::IsSet, S::Actor: not_found_actor_state::IsSet, + S::NotFound: not_found_actor_state::IsSet, { /// Build the final struct pub fn build(self) -> NotFoundActor<'a> { @@ -2699,85 +2699,85 @@ pub mod starter_pack_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Cid; type Creator; - type IndexedAt; + type Cid; type Uri; + type IndexedAt; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; - type Cid = Unset; type Creator = Unset; - type IndexedAt = Unset; + type Cid = Unset; type Uri = Unset; + type IndexedAt = Unset; + type Record = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { + type Creator = Set; type Cid = S::Cid; - type Creator = S::Creator; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; + type IndexedAt = S::IndexedAt; + type Record = S::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = S::Record; - type Cid = Set; type Creator = S::Creator; - type IndexedAt = S::IndexedAt; + type Cid = Set; type Uri = S::Uri; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { + type IndexedAt = S::IndexedAt; type Record = S::Record; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Creator = S::Creator; type Cid = S::Cid; - type Creator = Set; + type Uri = Set; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; + type Record = S::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Record = S::Record; - type Cid = S::Cid; type Creator = S::Creator; - type IndexedAt = Set; + type Cid = S::Cid; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type IndexedAt = Set; type Record = S::Record; - type Cid = S::Cid; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type Creator = S::Creator; + type Cid = S::Cid; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Uri = Set; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -3030,11 +3030,11 @@ where impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, - S::Record: starter_pack_view_state::IsSet, - S::Cid: starter_pack_view_state::IsSet, S::Creator: starter_pack_view_state::IsSet, - S::IndexedAt: starter_pack_view_state::IsSet, + S::Cid: starter_pack_view_state::IsSet, S::Uri: starter_pack_view_state::IsSet, + S::IndexedAt: starter_pack_view_state::IsSet, + S::Record: starter_pack_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackView<'a> { @@ -3183,85 +3183,85 @@ pub mod starter_pack_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type IndexedAt; - type Cid; - type Record; type Creator; - type Uri; + type Record; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type IndexedAt = Unset; - type Cid = Unset; - type Record = Unset; type Creator = Unset; - type Uri = Unset; + type Record = Unset; + type Cid = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Record = S::Record; + type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Uri = S::Uri; type IndexedAt = Set; - type Cid = S::Cid; - type Record = S::Record; type Creator = S::Creator; - type Uri = S::Uri; + type Record = S::Record; + type Cid = S::Cid; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { + type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Cid = Set; + type Creator = Set; type Record = S::Record; - type Creator = S::Creator; - type Uri = S::Uri; + type Cid = S::Cid; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Record = Set; - type Creator = S::Creator; type Uri = S::Uri; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Record = Set; type Cid = S::Cid; - type Record = S::Record; - type Creator = Set; - type Uri = S::Uri; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Record = S::Record; type Creator = S::Creator; - type Uri = Set; + type Record = S::Record; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `uri` field - pub struct uri(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -3472,11 +3472,11 @@ where impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, + S::Uri: starter_pack_view_basic_state::IsSet, S::IndexedAt: starter_pack_view_basic_state::IsSet, - S::Cid: starter_pack_view_basic_state::IsSet, - S::Record: starter_pack_view_basic_state::IsSet, S::Creator: starter_pack_view_basic_state::IsSet, - S::Uri: starter_pack_view_basic_state::IsSet, + S::Record: starter_pack_view_basic_state::IsSet, + S::Cid: starter_pack_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackViewBasic<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/block.rs b/crates/weaver-api/src/app_bsky/graph/block.rs index e7fceb5..8fb41f0 100644 --- a/crates/weaver-api/src/app_bsky/graph/block.rs +++ b/crates/weaver-api/src/app_bsky/graph/block.rs @@ -34,37 +34,37 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> BlockBuilder<'a, S> where S: block_state::State, - S::Subject: block_state::IsSet, S::CreatedAt: block_state::IsSet, + S::Subject: block_state::IsSet, { /// Build the final struct pub fn build(self) -> Block<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/follow.rs b/crates/weaver-api/src/app_bsky/graph/follow.rs index d21ea03..0fa2f29 100644 --- a/crates/weaver-api/src/app_bsky/graph/follow.rs +++ b/crates/weaver-api/src/app_bsky/graph/follow.rs @@ -36,37 +36,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -159,8 +159,8 @@ impl<'a, S: follow_state::State> FollowBuilder<'a, S> { impl<'a, S> FollowBuilder<'a, S> where S: follow_state::State, - S::Subject: follow_state::IsSet, S::CreatedAt: follow_state::IsSet, + S::Subject: follow_state::IsSet, { /// Build the final struct pub fn build(self) -> Follow<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/list.rs b/crates/weaver-api/src/app_bsky/graph/list.rs index 88b06f9..6d28785 100644 --- a/crates/weaver-api/src/app_bsky/graph/list.rs +++ b/crates/weaver-api/src/app_bsky/graph/list.rs @@ -51,51 +51,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Name; type Purpose; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Name = Unset; type Purpose = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Name = S::Name; + type Purpose = S::Purpose; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type CreatedAt = S::CreatedAt; type Name = Set; type Purpose = S::Purpose; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Name = S::Name; - type Purpose = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Name = S::Name; - type Purpose = S::Purpose; - type CreatedAt = Set; + type Purpose = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -268,9 +268,9 @@ where impl<'a, S> ListBuilder<'a, S> where S: list_state::State, + S::CreatedAt: list_state::IsSet, S::Name: list_state::IsSet, S::Purpose: list_state::IsSet, - S::CreatedAt: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/listitem.rs b/crates/weaver-api/src/app_bsky/graph/listitem.rs index 4455bad..0c870cf 100644 --- a/crates/weaver-api/src/app_bsky/graph/listitem.rs +++ b/crates/weaver-api/src/app_bsky/graph/listitem.rs @@ -37,49 +37,49 @@ pub mod listitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; type List = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; - type List = S::List; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + type List = S::List; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; type List = S::List; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData S>); impl sealed::Sealed for SetList {} impl State for SetList { - type Subject = S::Subject; type CreatedAt = S::CreatedAt; + type Subject = S::Subject; type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `list` field pub struct list(()); } @@ -174,8 +174,8 @@ where impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, - S::Subject: listitem_state::IsSet, S::CreatedAt: listitem_state::IsSet, + S::Subject: listitem_state::IsSet, S::List: listitem_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/graph/verification.rs b/crates/weaver-api/src/app_bsky/graph/verification.rs index 777a571..bb8adf1 100644 --- a/crates/weaver-api/src/app_bsky/graph/verification.rs +++ b/crates/weaver-api/src/app_bsky/graph/verification.rs @@ -41,67 +41,67 @@ pub mod verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DisplayName; - type CreatedAt; - type Handle; type Subject; + type Handle; + type CreatedAt; + type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DisplayName = Unset; - type CreatedAt = Unset; - type Handle = Unset; type Subject = Unset; + type Handle = Unset; + type CreatedAt = Unset; + type DisplayName = Unset; } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type DisplayName = Set; - type CreatedAt = S::CreatedAt; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; type Handle = S::Handle; - type Subject = S::Subject; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type CreatedAt = S::CreatedAt; type DisplayName = S::DisplayName; - type CreatedAt = Set; - type Handle = S::Handle; - type Subject = S::Subject; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type DisplayName = S::DisplayName; - type CreatedAt = S::CreatedAt; - type Handle = Set; type Subject = S::Subject; + type Handle = Set; + type CreatedAt = S::CreatedAt; + type DisplayName = S::DisplayName; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type Handle = S::Handle; + type CreatedAt = Set; type DisplayName = S::DisplayName; - type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type Subject = S::Subject; type Handle = S::Handle; - type Subject = Set; + type CreatedAt = S::CreatedAt; + type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `display_name` field - pub struct display_name(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `handle` field + pub struct handle(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `display_name` field + pub struct display_name(()); } } @@ -214,10 +214,10 @@ where impl<'a, S> VerificationBuilder<'a, S> where S: verification_state::State, - S::DisplayName: verification_state::IsSet, - S::CreatedAt: verification_state::IsSet, - S::Handle: verification_state::IsSet, S::Subject: verification_state::IsSet, + S::Handle: verification_state::IsSet, + S::CreatedAt: verification_state::IsSet, + S::DisplayName: verification_state::IsSet, { /// Build the final struct pub fn build(self) -> Verification<'a> { diff --git a/crates/weaver-api/src/app_bsky/labeler.rs b/crates/weaver-api/src/app_bsky/labeler.rs index e369202..482b861 100644 --- a/crates/weaver-api/src/app_bsky/labeler.rs +++ b/crates/weaver-api/src/app_bsky/labeler.rs @@ -634,8 +634,8 @@ pub mod labeler_view_state { pub trait State: sealed::Sealed { type IndexedAt; type Uri; - type Cid; type Creator; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -643,8 +643,8 @@ pub mod labeler_view_state { impl State for Empty { type IndexedAt = Unset; type Uri = Unset; - type Cid = Unset; type Creator = Unset; + type Cid = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); @@ -652,8 +652,8 @@ pub mod labeler_view_state { impl State for SetIndexedAt { type IndexedAt = Set; type Uri = S::Uri; - type Cid = S::Cid; type Creator = S::Creator; + type Cid = S::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); @@ -661,17 +661,8 @@ pub mod labeler_view_state { impl State for SetUri { type IndexedAt = S::IndexedAt; type Uri = Set; - type Cid = S::Cid; - type Creator = S::Creator; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Cid = Set; type Creator = S::Creator; + type Cid = S::Cid; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); @@ -679,8 +670,17 @@ pub mod labeler_view_state { impl State for SetCreator { type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Cid = S::Cid; type Creator = Set; + type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Creator = S::Creator; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -689,10 +689,10 @@ pub mod labeler_view_state { pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `creator` field pub struct creator(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -861,8 +861,8 @@ where S: labeler_view_state::State, S::IndexedAt: labeler_view_state::IsSet, S::Uri: labeler_view_state::IsSet, - S::Cid: labeler_view_state::IsSet, S::Creator: labeler_view_state::IsSet, + S::Cid: labeler_view_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerView<'a> { @@ -986,84 +986,84 @@ pub mod labeler_view_detailed_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; - type Creator; + type Cid; type IndexedAt; + type Creator; type Policies; - type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; - type Creator = Unset; + type Cid = Unset; type IndexedAt = Unset; + type Creator = Unset; type Policies = Unset; - type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; - type Creator = S::Creator; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; type Policies = S::Policies; - type Cid = S::Cid; } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Uri = S::Uri; - type Creator = Set; + type Cid = Set; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; type Policies = S::Policies; - type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Uri = S::Uri; - type Creator = S::Creator; + type Cid = S::Cid; type IndexedAt = Set; + type Creator = S::Creator; type Policies = S::Policies; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { + type Uri = S::Uri; type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Creator = Set; + type Policies = S::Policies; } ///State transition - sets the `policies` field to Set pub struct SetPolicies(PhantomData S>); impl sealed::Sealed for SetPolicies {} impl State for SetPolicies { type Uri = S::Uri; - type Creator = S::Creator; - type IndexedAt = S::IndexedAt; - type Policies = Set; type Cid = S::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = S::Uri; - type Creator = S::Creator; type IndexedAt = S::IndexedAt; - type Policies = S::Policies; - type Cid = Set; + type Creator = S::Creator; + type Policies = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `creator` field - pub struct creator(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `creator` field + pub struct creator(()); ///Marker type for the `policies` field pub struct policies(()); - ///Marker type for the `cid` field - pub struct cid(()); } } @@ -1323,10 +1323,10 @@ impl<'a, S> LabelerViewDetailedBuilder<'a, S> where S: labeler_view_detailed_state::State, S::Uri: labeler_view_detailed_state::IsSet, - S::Creator: labeler_view_detailed_state::IsSet, + S::Cid: labeler_view_detailed_state::IsSet, S::IndexedAt: labeler_view_detailed_state::IsSet, + S::Creator: labeler_view_detailed_state::IsSet, S::Policies: labeler_view_detailed_state::IsSet, - S::Cid: labeler_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerViewDetailed<'a> { diff --git a/crates/weaver-api/src/app_bsky/labeler/service.rs b/crates/weaver-api/src/app_bsky/labeler/service.rs index 24e3395..c9ccb61 100644 --- a/crates/weaver-api/src/app_bsky/labeler/service.rs +++ b/crates/weaver-api/src/app_bsky/labeler/service.rs @@ -54,37 +54,37 @@ pub mod service_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Policies; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Policies = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Policies = S::Policies; + type CreatedAt = Unset; } ///State transition - sets the `policies` field to Set pub struct SetPolicies(PhantomData S>); impl sealed::Sealed for SetPolicies {} impl State for SetPolicies { - type CreatedAt = S::CreatedAt; type Policies = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Policies = S::Policies; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `policies` field pub struct policies(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -237,8 +237,8 @@ impl<'a, S: service_state::State> ServiceBuilder<'a, S> { impl<'a, S> ServiceBuilder<'a, S> where S: service_state::State, - S::CreatedAt: service_state::IsSet, S::Policies: service_state::IsSet, + S::CreatedAt: service_state::IsSet, { /// Build the final struct pub fn build(self) -> Service<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification.rs b/crates/weaver-api/src/app_bsky/notification.rs index 28ce04b..61190f8 100644 --- a/crates/weaver-api/src/app_bsky/notification.rs +++ b/crates/weaver-api/src/app_bsky/notification.rs @@ -43,37 +43,37 @@ pub mod activity_subscription_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type Reply; + type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; type Reply = Unset; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type Reply = S::Reply; + type Post = Unset; } ///State transition - sets the `reply` field to Set pub struct SetReply(PhantomData S>); impl sealed::Sealed for SetReply {} impl State for SetReply { - type Post = S::Post; type Reply = Set; + type Post = S::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type Reply = S::Reply; + type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `post` field - pub struct post(()); ///Marker type for the `reply` field pub struct reply(()); + ///Marker type for the `post` field + pub struct post(()); } } @@ -143,8 +143,8 @@ where impl<'a, S> ActivitySubscriptionBuilder<'a, S> where S: activity_subscription_state::State, - S::Post: activity_subscription_state::IsSet, S::Reply: activity_subscription_state::IsSet, + S::Post: activity_subscription_state::IsSet, { /// Build the final struct pub fn build(self) -> ActivitySubscription<'a> { @@ -601,37 +601,37 @@ pub mod chat_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Push; type Include; + type Push; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Push = Unset; type Include = Unset; - } - ///State transition - sets the `push` field to Set - pub struct SetPush(PhantomData S>); - impl sealed::Sealed for SetPush {} - impl State for SetPush { - type Push = Set; - type Include = S::Include; + type Push = Unset; } ///State transition - sets the `include` field to Set pub struct SetInclude(PhantomData S>); impl sealed::Sealed for SetInclude {} impl State for SetInclude { - type Push = S::Push; type Include = Set; + type Push = S::Push; + } + ///State transition - sets the `push` field to Set + pub struct SetPush(PhantomData S>); + impl sealed::Sealed for SetPush {} + impl State for SetPush { + type Include = S::Include; + type Push = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `push` field - pub struct push(()); ///Marker type for the `include` field pub struct include(()); + ///Marker type for the `push` field + pub struct push(()); } } @@ -704,8 +704,8 @@ where impl<'a, S> ChatPreferenceBuilder<'a, S> where S: chat_preference_state::State, - S::Push: chat_preference_state::IsSet, S::Include: chat_preference_state::IsSet, + S::Push: chat_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> ChatPreference<'a> { @@ -776,51 +776,51 @@ pub mod filterable_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type List; type Push; type Include; + type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type List = Unset; type Push = Unset; type Include = Unset; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData S>); - impl sealed::Sealed for SetList {} - impl State for SetList { - type List = Set; - type Push = S::Push; - type Include = S::Include; + type List = Unset; } ///State transition - sets the `push` field to Set pub struct SetPush(PhantomData S>); impl sealed::Sealed for SetPush {} impl State for SetPush { - type List = S::List; type Push = Set; type Include = S::Include; + type List = S::List; } ///State transition - sets the `include` field to Set pub struct SetInclude(PhantomData S>); impl sealed::Sealed for SetInclude {} impl State for SetInclude { - type List = S::List; type Push = S::Push; type Include = Set; + type List = S::List; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData S>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type Push = S::Push; + type Include = S::Include; + type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `list` field - pub struct list(()); ///Marker type for the `push` field pub struct push(()); ///Marker type for the `include` field pub struct include(()); + ///Marker type for the `list` field + pub struct list(()); } } @@ -913,9 +913,9 @@ where impl<'a, S> FilterablePreferenceBuilder<'a, S> where S: filterable_preference_state::State, - S::List: filterable_preference_state::IsSet, S::Push: filterable_preference_state::IsSet, S::Include: filterable_preference_state::IsSet, + S::List: filterable_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> FilterablePreference<'a> { @@ -1180,301 +1180,301 @@ pub mod preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Chat; - type Verified; - type StarterpackJoined; + type Repost; + type Unverified; type Follow; - type Reply; + type Mention; type Quote; + type StarterpackJoined; type SubscribedPost; - type Mention; - type Unverified; - type LikeViaRepost; - type Repost; + type Chat; type Like; + type LikeViaRepost; + type Verified; type RepostViaRepost; + type Reply; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Chat = Unset; - type Verified = Unset; - type StarterpackJoined = Unset; + type Repost = Unset; + type Unverified = Unset; type Follow = Unset; - type Reply = Unset; + type Mention = Unset; type Quote = Unset; + type StarterpackJoined = Unset; type SubscribedPost = Unset; - type Mention = Unset; - type Unverified = Unset; - type LikeViaRepost = Unset; - type Repost = Unset; + type Chat = Unset; type Like = Unset; + type LikeViaRepost = Unset; + type Verified = Unset; type RepostViaRepost = Unset; + type Reply = Unset; } - ///State transition - sets the `chat` field to Set - pub struct SetChat(PhantomData S>); - impl sealed::Sealed for SetChat {} - impl State for SetChat { - type Chat = Set; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; - type Follow = S::Follow; - type Reply = S::Reply; - type Quote = S::Quote; - type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; + ///State transition - sets the `repost` field to Set + pub struct SetRepost(PhantomData S>); + impl sealed::Sealed for SetRepost {} + impl State for SetRepost { + type Repost = Set; type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; - type Like = S::Like; - type RepostViaRepost = S::RepostViaRepost; - } - ///State transition - sets the `verified` field to Set - pub struct SetVerified(PhantomData S>); - impl sealed::Sealed for SetVerified {} - impl State for SetVerified { - type Chat = S::Chat; - type Verified = Set; - type StarterpackJoined = S::StarterpackJoined; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } - ///State transition - sets the `starterpack_joined` field to Set - pub struct SetStarterpackJoined(PhantomData S>); - impl sealed::Sealed for SetStarterpackJoined {} - impl State for SetStarterpackJoined { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = Set; + ///State transition - sets the `unverified` field to Set + pub struct SetUnverified(PhantomData S>); + impl sealed::Sealed for SetUnverified {} + impl State for SetUnverified { + type Repost = S::Repost; + type Unverified = Set; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } ///State transition - sets the `follow` field to Set pub struct SetFollow(PhantomData S>); impl sealed::Sealed for SetFollow {} impl State for SetFollow { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = Set; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } - ///State transition - sets the `reply` field to Set - pub struct SetReply(PhantomData S>); - impl sealed::Sealed for SetReply {} - impl State for SetReply { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + ///State transition - sets the `mention` field to Set + pub struct SetMention(PhantomData S>); + impl sealed::Sealed for SetMention {} + impl State for SetMention { + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = Set; + type Mention = Set; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } ///State transition - sets the `quote` field to Set pub struct SetQuote(PhantomData S>); impl sealed::Sealed for SetQuote {} impl State for SetQuote { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = Set; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; + type Chat = S::Chat; + type Like = S::Like; type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; + type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; + } + ///State transition - sets the `starterpack_joined` field to Set + pub struct SetStarterpackJoined(PhantomData S>); + impl sealed::Sealed for SetStarterpackJoined {} + impl State for SetStarterpackJoined { type Repost = S::Repost; + type Unverified = S::Unverified; + type Follow = S::Follow; + type Mention = S::Mention; + type Quote = S::Quote; + type StarterpackJoined = Set; + type SubscribedPost = S::SubscribedPost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } ///State transition - sets the `subscribed_post` field to Set pub struct SetSubscribedPost(PhantomData S>); impl sealed::Sealed for SetSubscribedPost {} impl State for SetSubscribedPost { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = Set; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } - ///State transition - sets the `mention` field to Set - pub struct SetMention(PhantomData S>); - impl sealed::Sealed for SetMention {} - impl State for SetMention { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + ///State transition - sets the `chat` field to Set + pub struct SetChat(PhantomData S>); + impl sealed::Sealed for SetChat {} + impl State for SetChat { + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = Set; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; + type Chat = Set; type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } - ///State transition - sets the `unverified` field to Set - pub struct SetUnverified(PhantomData S>); - impl sealed::Sealed for SetUnverified {} - impl State for SetUnverified { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + ///State transition - sets the `like` field to Set + pub struct SetLike(PhantomData S>); + impl sealed::Sealed for SetLike {} + impl State for SetLike { + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = Set; + type Chat = S::Chat; + type Like = Set; type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; - type Like = S::Like; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } ///State transition - sets the `like_via_repost` field to Set pub struct SetLikeViaRepost(PhantomData S>); impl sealed::Sealed for SetLikeViaRepost {} impl State for SetLikeViaRepost { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; - type Follow = S::Follow; - type Reply = S::Reply; - type Quote = S::Quote; - type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = Set; type Repost = S::Repost; - type Like = S::Like; - type RepostViaRepost = S::RepostViaRepost; - } - ///State transition - sets the `repost` field to Set - pub struct SetRepost(PhantomData S>); - impl sealed::Sealed for SetRepost {} - impl State for SetRepost { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; - type LikeViaRepost = S::LikeViaRepost; - type Repost = Set; + type Chat = S::Chat; type Like = S::Like; + type LikeViaRepost = Set; + type Verified = S::Verified; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } - ///State transition - sets the `like` field to Set - pub struct SetLike(PhantomData S>); - impl sealed::Sealed for SetLike {} - impl State for SetLike { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + ///State transition - sets the `verified` field to Set + pub struct SetVerified(PhantomData S>); + impl sealed::Sealed for SetVerified {} + impl State for SetVerified { + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; + type Chat = S::Chat; + type Like = S::Like; type LikeViaRepost = S::LikeViaRepost; - type Repost = S::Repost; - type Like = Set; + type Verified = Set; type RepostViaRepost = S::RepostViaRepost; + type Reply = S::Reply; } ///State transition - sets the `repost_via_repost` field to Set pub struct SetRepostViaRepost(PhantomData S>); impl sealed::Sealed for SetRepostViaRepost {} impl State for SetRepostViaRepost { - type Chat = S::Chat; - type Verified = S::Verified; - type StarterpackJoined = S::StarterpackJoined; + type Repost = S::Repost; + type Unverified = S::Unverified; type Follow = S::Follow; - type Reply = S::Reply; + type Mention = S::Mention; type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; - type Mention = S::Mention; - type Unverified = S::Unverified; + type Chat = S::Chat; + type Like = S::Like; type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; + type RepostViaRepost = Set; + type Reply = S::Reply; + } + ///State transition - sets the `reply` field to Set + pub struct SetReply(PhantomData S>); + impl sealed::Sealed for SetReply {} + impl State for SetReply { type Repost = S::Repost; + type Unverified = S::Unverified; + type Follow = S::Follow; + type Mention = S::Mention; + type Quote = S::Quote; + type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; + type Chat = S::Chat; type Like = S::Like; - type RepostViaRepost = Set; + type LikeViaRepost = S::LikeViaRepost; + type Verified = S::Verified; + type RepostViaRepost = S::RepostViaRepost; + type Reply = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `chat` field - pub struct chat(()); - ///Marker type for the `verified` field - pub struct verified(()); - ///Marker type for the `starterpack_joined` field - pub struct starterpack_joined(()); + ///Marker type for the `repost` field + pub struct repost(()); + ///Marker type for the `unverified` field + pub struct unverified(()); ///Marker type for the `follow` field pub struct follow(()); - ///Marker type for the `reply` field - pub struct reply(()); + ///Marker type for the `mention` field + pub struct mention(()); ///Marker type for the `quote` field pub struct quote(()); + ///Marker type for the `starterpack_joined` field + pub struct starterpack_joined(()); ///Marker type for the `subscribed_post` field pub struct subscribed_post(()); - ///Marker type for the `mention` field - pub struct mention(()); - ///Marker type for the `unverified` field - pub struct unverified(()); - ///Marker type for the `like_via_repost` field - pub struct like_via_repost(()); - ///Marker type for the `repost` field - pub struct repost(()); + ///Marker type for the `chat` field + pub struct chat(()); ///Marker type for the `like` field pub struct like(()); + ///Marker type for the `like_via_repost` field + pub struct like_via_repost(()); + ///Marker type for the `verified` field + pub struct verified(()); ///Marker type for the `repost_via_repost` field pub struct repost_via_repost(()); + ///Marker type for the `reply` field + pub struct reply(()); } } @@ -1781,19 +1781,19 @@ where impl<'a, S> PreferencesBuilder<'a, S> where S: preferences_state::State, - S::Chat: preferences_state::IsSet, - S::Verified: preferences_state::IsSet, - S::StarterpackJoined: preferences_state::IsSet, + S::Repost: preferences_state::IsSet, + S::Unverified: preferences_state::IsSet, S::Follow: preferences_state::IsSet, - S::Reply: preferences_state::IsSet, + S::Mention: preferences_state::IsSet, S::Quote: preferences_state::IsSet, + S::StarterpackJoined: preferences_state::IsSet, S::SubscribedPost: preferences_state::IsSet, - S::Mention: preferences_state::IsSet, - S::Unverified: preferences_state::IsSet, - S::LikeViaRepost: preferences_state::IsSet, - S::Repost: preferences_state::IsSet, + S::Chat: preferences_state::IsSet, S::Like: preferences_state::IsSet, + S::LikeViaRepost: preferences_state::IsSet, + S::Verified: preferences_state::IsSet, S::RepostViaRepost: preferences_state::IsSet, + S::Reply: preferences_state::IsSet, { /// Build the final struct pub fn build(self) -> Preferences<'a> { @@ -1917,37 +1917,37 @@ pub mod subject_activity_subscription_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type ActivitySubscription; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type ActivitySubscription = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type ActivitySubscription = S::ActivitySubscription; + type Subject = Unset; } ///State transition - sets the `activity_subscription` field to Set pub struct SetActivitySubscription(PhantomData S>); impl sealed::Sealed for SetActivitySubscription {} impl State for SetActivitySubscription { - type Subject = S::Subject; type ActivitySubscription = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type ActivitySubscription = S::ActivitySubscription; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `activity_subscription` field pub struct activity_subscription(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -2034,8 +2034,8 @@ where impl<'a, S> SubjectActivitySubscriptionBuilder<'a, S> where S: subject_activity_subscription_state::State, - S::Subject: subject_activity_subscription_state::IsSet, S::ActivitySubscription: subject_activity_subscription_state::IsSet, + S::Subject: subject_activity_subscription_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectActivitySubscription<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs index ee34da4..2938a72 100644 --- a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs @@ -272,126 +272,126 @@ pub mod notification_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; - type Author; - type Record; type IsRead; type IndexedAt; - type Reason; type Uri; + type Author; + type Reason; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; - type Author = Unset; - type Record = Unset; type IsRead = Unset; type IndexedAt = Unset; - type Reason = Unset; type Uri = Unset; + type Author = Unset; + type Reason = Unset; + type Record = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; - type Author = S::Author; - type Record = S::Record; type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; - type Reason = S::Reason; - type Uri = S::Uri; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Cid = S::Cid; - type Author = Set; - type Record = S::Record; - type IsRead = S::IsRead; - type IndexedAt = S::IndexedAt; - type Reason = S::Reason; type Uri = S::Uri; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Cid = S::Cid; type Author = S::Author; - type Record = Set; - type IsRead = S::IsRead; - type IndexedAt = S::IndexedAt; type Reason = S::Reason; - type Uri = S::Uri; + type Record = S::Record; } ///State transition - sets the `is_read` field to Set pub struct SetIsRead(PhantomData S>); impl sealed::Sealed for SetIsRead {} impl State for SetIsRead { type Cid = S::Cid; - type Author = S::Author; - type Record = S::Record; type IsRead = Set; type IndexedAt = S::IndexedAt; - type Reason = S::Reason; type Uri = S::Uri; + type Author = S::Author; + type Reason = S::Reason; + type Record = S::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Cid = S::Cid; + type IsRead = S::IsRead; + type IndexedAt = Set; + type Uri = S::Uri; type Author = S::Author; + type Reason = S::Reason; type Record = S::Record; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; type IsRead = S::IsRead; - type IndexedAt = Set; + type IndexedAt = S::IndexedAt; + type Uri = Set; + type Author = S::Author; type Reason = S::Reason; + type Record = S::Record; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Cid = S::Cid; + type IsRead = S::IsRead; + type IndexedAt = S::IndexedAt; type Uri = S::Uri; + type Author = Set; + type Reason = S::Reason; + type Record = S::Record; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { type Cid = S::Cid; - type Author = S::Author; - type Record = S::Record; type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; - type Reason = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Cid = S::Cid; type Author = S::Author; + type Reason = Set; type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Cid = S::Cid; type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Author = S::Author; type Reason = S::Reason; - type Uri = Set; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `is_read` field pub struct is_read(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `author` field + pub struct author(()); + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -615,12 +615,12 @@ impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, S::Cid: notification_state::IsSet, - S::Author: notification_state::IsSet, - S::Record: notification_state::IsSet, S::IsRead: notification_state::IsSet, S::IndexedAt: notification_state::IsSet, - S::Reason: notification_state::IsSet, S::Uri: notification_state::IsSet, + S::Author: notification_state::IsSet, + S::Reason: notification_state::IsSet, + S::Record: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/put_activity_subscription.rs b/crates/weaver-api/src/app_bsky/notification/put_activity_subscription.rs index b0c858e..7e167a9 100644 --- a/crates/weaver-api/src/app_bsky/notification/put_activity_subscription.rs +++ b/crates/weaver-api/src/app_bsky/notification/put_activity_subscription.rs @@ -33,37 +33,37 @@ pub mod put_activity_subscription_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ActivitySubscription; type Subject; + type ActivitySubscription; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ActivitySubscription = Unset; type Subject = Unset; - } - ///State transition - sets the `activity_subscription` field to Set - pub struct SetActivitySubscription(PhantomData S>); - impl sealed::Sealed for SetActivitySubscription {} - impl State for SetActivitySubscription { - type ActivitySubscription = Set; - type Subject = S::Subject; + type ActivitySubscription = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type ActivitySubscription = S::ActivitySubscription; type Subject = Set; + type ActivitySubscription = S::ActivitySubscription; + } + ///State transition - sets the `activity_subscription` field to Set + pub struct SetActivitySubscription(PhantomData S>); + impl sealed::Sealed for SetActivitySubscription {} + impl State for SetActivitySubscription { + type Subject = S::Subject; + type ActivitySubscription = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `activity_subscription` field - pub struct activity_subscription(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `activity_subscription` field + pub struct activity_subscription(()); } } @@ -148,8 +148,8 @@ where impl<'a, S> PutActivitySubscriptionBuilder<'a, S> where S: put_activity_subscription_state::State, - S::ActivitySubscription: put_activity_subscription_state::IsSet, S::Subject: put_activity_subscription_state::IsSet, + S::ActivitySubscription: put_activity_subscription_state::IsSet, { /// Build the final struct pub fn build(self) -> PutActivitySubscription<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/register_push.rs b/crates/weaver-api/src/app_bsky/notification/register_push.rs index 12b4a93..dd39b47 100644 --- a/crates/weaver-api/src/app_bsky/notification/register_push.rs +++ b/crates/weaver-api/src/app_bsky/notification/register_push.rs @@ -40,67 +40,67 @@ pub mod register_push_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ServiceDid; type Platform; - type Token; type AppId; + type ServiceDid; + type Token; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ServiceDid = Unset; type Platform = Unset; - type Token = Unset; type AppId = Unset; - } - ///State transition - sets the `service_did` field to Set - pub struct SetServiceDid(PhantomData S>); - impl sealed::Sealed for SetServiceDid {} - impl State for SetServiceDid { - type ServiceDid = Set; - type Platform = S::Platform; - type Token = S::Token; - type AppId = S::AppId; + type ServiceDid = Unset; + type Token = Unset; } ///State transition - sets the `platform` field to Set pub struct SetPlatform(PhantomData S>); impl sealed::Sealed for SetPlatform {} impl State for SetPlatform { - type ServiceDid = S::ServiceDid; type Platform = Set; - type Token = S::Token; type AppId = S::AppId; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData S>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { type ServiceDid = S::ServiceDid; - type Platform = S::Platform; - type Token = Set; - type AppId = S::AppId; + type Token = S::Token; } ///State transition - sets the `app_id` field to Set pub struct SetAppId(PhantomData S>); impl sealed::Sealed for SetAppId {} impl State for SetAppId { + type Platform = S::Platform; + type AppId = Set; type ServiceDid = S::ServiceDid; + type Token = S::Token; + } + ///State transition - sets the `service_did` field to Set + pub struct SetServiceDid(PhantomData S>); + impl sealed::Sealed for SetServiceDid {} + impl State for SetServiceDid { type Platform = S::Platform; + type AppId = S::AppId; + type ServiceDid = Set; type Token = S::Token; - type AppId = Set; + } + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData S>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Platform = S::Platform; + type AppId = S::AppId; + type ServiceDid = S::ServiceDid; + type Token = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `service_did` field - pub struct service_did(()); ///Marker type for the `platform` field pub struct platform(()); - ///Marker type for the `token` field - pub struct token(()); ///Marker type for the `app_id` field pub struct app_id(()); + ///Marker type for the `service_did` field + pub struct service_did(()); + ///Marker type for the `token` field + pub struct token(()); } } @@ -227,10 +227,10 @@ where impl<'a, S> RegisterPushBuilder<'a, S> where S: register_push_state::State, - S::ServiceDid: register_push_state::IsSet, S::Platform: register_push_state::IsSet, - S::Token: register_push_state::IsSet, S::AppId: register_push_state::IsSet, + S::ServiceDid: register_push_state::IsSet, + S::Token: register_push_state::IsSet, { /// Build the final struct pub fn build(self) -> RegisterPush<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/unregister_push.rs b/crates/weaver-api/src/app_bsky/notification/unregister_push.rs index b229e6b..8f47e47 100644 --- a/crates/weaver-api/src/app_bsky/notification/unregister_push.rs +++ b/crates/weaver-api/src/app_bsky/notification/unregister_push.rs @@ -37,67 +37,67 @@ pub mod unregister_push_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AppId; type Platform; - type Token; type ServiceDid; + type AppId; + type Token; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AppId = Unset; type Platform = Unset; - type Token = Unset; type ServiceDid = Unset; - } - ///State transition - sets the `app_id` field to Set - pub struct SetAppId(PhantomData S>); - impl sealed::Sealed for SetAppId {} - impl State for SetAppId { - type AppId = Set; - type Platform = S::Platform; - type Token = S::Token; - type ServiceDid = S::ServiceDid; + type AppId = Unset; + type Token = Unset; } ///State transition - sets the `platform` field to Set pub struct SetPlatform(PhantomData S>); impl sealed::Sealed for SetPlatform {} impl State for SetPlatform { - type AppId = S::AppId; type Platform = Set; - type Token = S::Token; type ServiceDid = S::ServiceDid; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData S>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { type AppId = S::AppId; - type Platform = S::Platform; - type Token = Set; - type ServiceDid = S::ServiceDid; + type Token = S::Token; } ///State transition - sets the `service_did` field to Set pub struct SetServiceDid(PhantomData S>); impl sealed::Sealed for SetServiceDid {} impl State for SetServiceDid { + type Platform = S::Platform; + type ServiceDid = Set; type AppId = S::AppId; + type Token = S::Token; + } + ///State transition - sets the `app_id` field to Set + pub struct SetAppId(PhantomData S>); + impl sealed::Sealed for SetAppId {} + impl State for SetAppId { type Platform = S::Platform; + type ServiceDid = S::ServiceDid; + type AppId = Set; type Token = S::Token; - type ServiceDid = Set; + } + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData S>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Platform = S::Platform; + type ServiceDid = S::ServiceDid; + type AppId = S::AppId; + type Token = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `app_id` field - pub struct app_id(()); ///Marker type for the `platform` field pub struct platform(()); - ///Marker type for the `token` field - pub struct token(()); ///Marker type for the `service_did` field pub struct service_did(()); + ///Marker type for the `app_id` field + pub struct app_id(()); + ///Marker type for the `token` field + pub struct token(()); } } @@ -210,10 +210,10 @@ where impl<'a, S> UnregisterPushBuilder<'a, S> where S: unregister_push_state::State, - S::AppId: unregister_push_state::IsSet, S::Platform: unregister_push_state::IsSet, - S::Token: unregister_push_state::IsSet, S::ServiceDid: unregister_push_state::IsSet, + S::AppId: unregister_push_state::IsSet, + S::Token: unregister_push_state::IsSet, { /// Build the final struct pub fn build(self) -> UnregisterPush<'a> { diff --git a/crates/weaver-api/src/app_bsky/richtext/facet.rs b/crates/weaver-api/src/app_bsky/richtext/facet.rs index aeae106..2b225b3 100644 --- a/crates/weaver-api/src/app_bsky/richtext/facet.rs +++ b/crates/weaver-api/src/app_bsky/richtext/facet.rs @@ -32,37 +32,37 @@ pub mod byte_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ByteEnd; type ByteStart; + type ByteEnd; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ByteEnd = Unset; type ByteStart = Unset; - } - ///State transition - sets the `byte_end` field to Set - pub struct SetByteEnd(PhantomData S>); - impl sealed::Sealed for SetByteEnd {} - impl State for SetByteEnd { - type ByteEnd = Set; - type ByteStart = S::ByteStart; + type ByteEnd = Unset; } ///State transition - sets the `byte_start` field to Set pub struct SetByteStart(PhantomData S>); impl sealed::Sealed for SetByteStart {} impl State for SetByteStart { - type ByteEnd = S::ByteEnd; type ByteStart = Set; + type ByteEnd = S::ByteEnd; + } + ///State transition - sets the `byte_end` field to Set + pub struct SetByteEnd(PhantomData S>); + impl sealed::Sealed for SetByteEnd {} + impl State for SetByteEnd { + type ByteStart = S::ByteStart; + type ByteEnd = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `byte_end` field - pub struct byte_end(()); ///Marker type for the `byte_start` field pub struct byte_start(()); + ///Marker type for the `byte_end` field + pub struct byte_end(()); } } @@ -132,8 +132,8 @@ where impl<'a, S> ByteSliceBuilder<'a, S> where S: byte_slice_state::State, - S::ByteEnd: byte_slice_state::IsSet, S::ByteStart: byte_slice_state::IsSet, + S::ByteEnd: byte_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> ByteSlice<'a> { @@ -581,37 +581,37 @@ pub mod facet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Features; + type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Index = Unset; type Features = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Features = S::Features; + type Index = Unset; } ///State transition - sets the `features` field to Set pub struct SetFeatures(PhantomData S>); impl sealed::Sealed for SetFeatures {} impl State for SetFeatures { - type Index = S::Index; type Features = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Features = S::Features; + type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `index` field - pub struct index(()); ///Marker type for the `features` field pub struct features(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -684,8 +684,8 @@ where impl<'a, S> FacetBuilder<'a, S> where S: facet_state::State, - S::Index: facet_state::IsSet, S::Features: facet_state::IsSet, + S::Index: facet_state::IsSet, { /// Build the final struct pub fn build(self) -> Facet<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced.rs b/crates/weaver-api/src/app_bsky/unspecced.rs index 22556c0..cb4d28f 100644 --- a/crates/weaver-api/src/app_bsky/unspecced.rs +++ b/crates/weaver-api/src/app_bsky/unspecced.rs @@ -82,50 +82,50 @@ pub mod age_assurance_event_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type AttemptId; - type Status; type CreatedAt; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type AttemptId = Unset; - type Status = Unset; type CreatedAt = Unset; + type Status = Unset; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { type AttemptId = Set; - type Status = S::Status; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type AttemptId = S::AttemptId; - type Status = Set; type CreatedAt = S::CreatedAt; + type Status = S::Status; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type AttemptId = S::AttemptId; - type Status = S::Status; type CreatedAt = Set; + type Status = S::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type AttemptId = S::AttemptId; + type CreatedAt = S::CreatedAt; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `attempt_id` field pub struct attempt_id(()); - ///Marker type for the `status` field - pub struct status(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -310,8 +310,8 @@ impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::AttemptId: age_assurance_event_state::IsSet, - S::Status: age_assurance_event_state::IsSet, S::CreatedAt: age_assurance_event_state::IsSet, + S::Status: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -1743,105 +1743,105 @@ pub mod skeleton_trend_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type PostCount; type Topic; type DisplayName; - type StartedAt; - type PostCount; - type Dids; type Link; + type Dids; + type StartedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type PostCount = Unset; type Topic = Unset; type DisplayName = Unset; - type StartedAt = Unset; - type PostCount = Unset; - type Dids = Unset; type Link = Unset; + type Dids = Unset; + type StartedAt = Unset; + } + ///State transition - sets the `post_count` field to Set + pub struct SetPostCount(PhantomData S>); + impl sealed::Sealed for SetPostCount {} + impl State for SetPostCount { + type PostCount = Set; + type Topic = S::Topic; + type DisplayName = S::DisplayName; + type Link = S::Link; + type Dids = S::Dids; + type StartedAt = S::StartedAt; } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData S>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { + type PostCount = S::PostCount; type Topic = Set; type DisplayName = S::DisplayName; - type StartedAt = S::StartedAt; - type PostCount = S::PostCount; - type Dids = S::Dids; type Link = S::Link; + type Dids = S::Dids; + type StartedAt = S::StartedAt; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type PostCount = S::PostCount; type Topic = S::Topic; type DisplayName = Set; - type StartedAt = S::StartedAt; - type PostCount = S::PostCount; - type Dids = S::Dids; type Link = S::Link; - } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData S>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type Topic = S::Topic; - type DisplayName = S::DisplayName; - type StartedAt = Set; - type PostCount = S::PostCount; type Dids = S::Dids; - type Link = S::Link; + type StartedAt = S::StartedAt; } - ///State transition - sets the `post_count` field to Set - pub struct SetPostCount(PhantomData S>); - impl sealed::Sealed for SetPostCount {} - impl State for SetPostCount { + ///State transition - sets the `link` field to Set + pub struct SetLink(PhantomData S>); + impl sealed::Sealed for SetLink {} + impl State for SetLink { + type PostCount = S::PostCount; type Topic = S::Topic; type DisplayName = S::DisplayName; - type StartedAt = S::StartedAt; - type PostCount = Set; + type Link = Set; type Dids = S::Dids; - type Link = S::Link; + type StartedAt = S::StartedAt; } ///State transition - sets the `dids` field to Set pub struct SetDids(PhantomData S>); impl sealed::Sealed for SetDids {} impl State for SetDids { + type PostCount = S::PostCount; type Topic = S::Topic; type DisplayName = S::DisplayName; - type StartedAt = S::StartedAt; - type PostCount = S::PostCount; - type Dids = Set; type Link = S::Link; + type Dids = Set; + type StartedAt = S::StartedAt; } - ///State transition - sets the `link` field to Set - pub struct SetLink(PhantomData S>); - impl sealed::Sealed for SetLink {} - impl State for SetLink { + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData S>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type PostCount = S::PostCount; type Topic = S::Topic; type DisplayName = S::DisplayName; - type StartedAt = S::StartedAt; - type PostCount = S::PostCount; + type Link = S::Link; type Dids = S::Dids; - type Link = Set; + type StartedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `post_count` field + pub struct post_count(()); ///Marker type for the `topic` field pub struct topic(()); ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `started_at` field - pub struct started_at(()); - ///Marker type for the `post_count` field - pub struct post_count(()); - ///Marker type for the `dids` field - pub struct dids(()); ///Marker type for the `link` field pub struct link(()); + ///Marker type for the `dids` field + pub struct dids(()); + ///Marker type for the `started_at` field + pub struct started_at(()); } } @@ -2028,12 +2028,12 @@ where impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, + S::PostCount: skeleton_trend_state::IsSet, S::Topic: skeleton_trend_state::IsSet, S::DisplayName: skeleton_trend_state::IsSet, - S::StartedAt: skeleton_trend_state::IsSet, - S::PostCount: skeleton_trend_state::IsSet, - S::Dids: skeleton_trend_state::IsSet, S::Link: skeleton_trend_state::IsSet, + S::Dids: skeleton_trend_state::IsSet, + S::StartedAt: skeleton_trend_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonTrend<'a> { @@ -2322,105 +2322,105 @@ pub mod thread_item_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type OpThread; - type Post; - type MoreParents; + type MutedByViewer; type MoreReplies; + type MoreParents; + type Post; + type OpThread; type HiddenByThreadgate; - type MutedByViewer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type OpThread = Unset; - type Post = Unset; - type MoreParents = Unset; + type MutedByViewer = Unset; type MoreReplies = Unset; + type MoreParents = Unset; + type Post = Unset; + type OpThread = Unset; type HiddenByThreadgate = Unset; - type MutedByViewer = Unset; } - ///State transition - sets the `op_thread` field to Set - pub struct SetOpThread(PhantomData S>); - impl sealed::Sealed for SetOpThread {} - impl State for SetOpThread { - type OpThread = Set; - type Post = S::Post; - type MoreParents = S::MoreParents; + ///State transition - sets the `muted_by_viewer` field to Set + pub struct SetMutedByViewer(PhantomData S>); + impl sealed::Sealed for SetMutedByViewer {} + impl State for SetMutedByViewer { + type MutedByViewer = Set; type MoreReplies = S::MoreReplies; + type MoreParents = S::MoreParents; + type Post = S::Post; + type OpThread = S::OpThread; type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = S::MutedByViewer; } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type OpThread = S::OpThread; - type Post = Set; + ///State transition - sets the `more_replies` field to Set + pub struct SetMoreReplies(PhantomData S>); + impl sealed::Sealed for SetMoreReplies {} + impl State for SetMoreReplies { + type MutedByViewer = S::MutedByViewer; + type MoreReplies = Set; type MoreParents = S::MoreParents; - type MoreReplies = S::MoreReplies; + type Post = S::Post; + type OpThread = S::OpThread; type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = S::MutedByViewer; } ///State transition - sets the `more_parents` field to Set pub struct SetMoreParents(PhantomData S>); impl sealed::Sealed for SetMoreParents {} impl State for SetMoreParents { - type OpThread = S::OpThread; - type Post = S::Post; - type MoreParents = Set; + type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; + type MoreParents = Set; + type Post = S::Post; + type OpThread = S::OpThread; type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = S::MutedByViewer; } - ///State transition - sets the `more_replies` field to Set - pub struct SetMoreReplies(PhantomData S>); - impl sealed::Sealed for SetMoreReplies {} - impl State for SetMoreReplies { - type OpThread = S::OpThread; - type Post = S::Post; + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type MutedByViewer = S::MutedByViewer; + type MoreReplies = S::MoreReplies; type MoreParents = S::MoreParents; - type MoreReplies = Set; + type Post = Set; + type OpThread = S::OpThread; type HiddenByThreadgate = S::HiddenByThreadgate; + } + ///State transition - sets the `op_thread` field to Set + pub struct SetOpThread(PhantomData S>); + impl sealed::Sealed for SetOpThread {} + impl State for SetOpThread { type MutedByViewer = S::MutedByViewer; + type MoreReplies = S::MoreReplies; + type MoreParents = S::MoreParents; + type Post = S::Post; + type OpThread = Set; + type HiddenByThreadgate = S::HiddenByThreadgate; } ///State transition - sets the `hidden_by_threadgate` field to Set pub struct SetHiddenByThreadgate(PhantomData S>); impl sealed::Sealed for SetHiddenByThreadgate {} impl State for SetHiddenByThreadgate { - type OpThread = S::OpThread; - type Post = S::Post; - type MoreParents = S::MoreParents; - type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = Set; type MutedByViewer = S::MutedByViewer; - } - ///State transition - sets the `muted_by_viewer` field to Set - pub struct SetMutedByViewer(PhantomData S>); - impl sealed::Sealed for SetMutedByViewer {} - impl State for SetMutedByViewer { - type OpThread = S::OpThread; - type Post = S::Post; - type MoreParents = S::MoreParents; type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = Set; + type MoreParents = S::MoreParents; + type Post = S::Post; + type OpThread = S::OpThread; + type HiddenByThreadgate = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `op_thread` field - pub struct op_thread(()); - ///Marker type for the `post` field - pub struct post(()); - ///Marker type for the `more_parents` field - pub struct more_parents(()); + ///Marker type for the `muted_by_viewer` field + pub struct muted_by_viewer(()); ///Marker type for the `more_replies` field pub struct more_replies(()); + ///Marker type for the `more_parents` field + pub struct more_parents(()); + ///Marker type for the `post` field + pub struct post(()); + ///Marker type for the `op_thread` field + pub struct op_thread(()); ///Marker type for the `hidden_by_threadgate` field pub struct hidden_by_threadgate(()); - ///Marker type for the `muted_by_viewer` field - pub struct muted_by_viewer(()); } } @@ -2573,12 +2573,12 @@ where impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, - S::OpThread: thread_item_post_state::IsSet, - S::Post: thread_item_post_state::IsSet, - S::MoreParents: thread_item_post_state::IsSet, + S::MutedByViewer: thread_item_post_state::IsSet, S::MoreReplies: thread_item_post_state::IsSet, + S::MoreParents: thread_item_post_state::IsSet, + S::Post: thread_item_post_state::IsSet, + S::OpThread: thread_item_post_state::IsSet, S::HiddenByThreadgate: thread_item_post_state::IsSet, - S::MutedByViewer: thread_item_post_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItemPost<'a> { @@ -2669,105 +2669,105 @@ pub mod trend_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type StartedAt; + type Topic; type Link; type PostCount; - type Actors; - type Topic; type DisplayName; + type StartedAt; + type Actors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type StartedAt = Unset; + type Topic = Unset; type Link = Unset; type PostCount = Unset; - type Actors = Unset; - type Topic = Unset; type DisplayName = Unset; + type StartedAt = Unset; + type Actors = Unset; } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData S>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type StartedAt = Set; + ///State transition - sets the `topic` field to Set + pub struct SetTopic(PhantomData S>); + impl sealed::Sealed for SetTopic {} + impl State for SetTopic { + type Topic = Set; type Link = S::Link; type PostCount = S::PostCount; - type Actors = S::Actors; - type Topic = S::Topic; type DisplayName = S::DisplayName; + type StartedAt = S::StartedAt; + type Actors = S::Actors; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData S>); impl sealed::Sealed for SetLink {} impl State for SetLink { - type StartedAt = S::StartedAt; + type Topic = S::Topic; type Link = Set; type PostCount = S::PostCount; - type Actors = S::Actors; - type Topic = S::Topic; type DisplayName = S::DisplayName; + type StartedAt = S::StartedAt; + type Actors = S::Actors; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); impl sealed::Sealed for SetPostCount {} impl State for SetPostCount { - type StartedAt = S::StartedAt; - type Link = S::Link; - type PostCount = Set; - type Actors = S::Actors; type Topic = S::Topic; - type DisplayName = S::DisplayName; - } - ///State transition - sets the `actors` field to Set - pub struct SetActors(PhantomData S>); - impl sealed::Sealed for SetActors {} - impl State for SetActors { - type StartedAt = S::StartedAt; type Link = S::Link; - type PostCount = S::PostCount; - type Actors = Set; - type Topic = S::Topic; + type PostCount = Set; type DisplayName = S::DisplayName; - } - ///State transition - sets the `topic` field to Set - pub struct SetTopic(PhantomData S>); - impl sealed::Sealed for SetTopic {} - impl State for SetTopic { type StartedAt = S::StartedAt; - type Link = S::Link; - type PostCount = S::PostCount; type Actors = S::Actors; - type Topic = Set; - type DisplayName = S::DisplayName; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type Topic = S::Topic; + type Link = S::Link; + type PostCount = S::PostCount; + type DisplayName = Set; type StartedAt = S::StartedAt; + type Actors = S::Actors; + } + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData S>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type Topic = S::Topic; type Link = S::Link; type PostCount = S::PostCount; + type DisplayName = S::DisplayName; + type StartedAt = Set; type Actors = S::Actors; + } + ///State transition - sets the `actors` field to Set + pub struct SetActors(PhantomData S>); + impl sealed::Sealed for SetActors {} + impl State for SetActors { type Topic = S::Topic; - type DisplayName = Set; + type Link = S::Link; + type PostCount = S::PostCount; + type DisplayName = S::DisplayName; + type StartedAt = S::StartedAt; + type Actors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `started_at` field - pub struct started_at(()); + ///Marker type for the `topic` field + pub struct topic(()); ///Marker type for the `link` field pub struct link(()); ///Marker type for the `post_count` field pub struct post_count(()); - ///Marker type for the `actors` field - pub struct actors(()); - ///Marker type for the `topic` field - pub struct topic(()); ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `started_at` field + pub struct started_at(()); + ///Marker type for the `actors` field + pub struct actors(()); } } @@ -2954,12 +2954,12 @@ where impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, - S::StartedAt: trend_view_state::IsSet, + S::Topic: trend_view_state::IsSet, S::Link: trend_view_state::IsSet, S::PostCount: trend_view_state::IsSet, - S::Actors: trend_view_state::IsSet, - S::Topic: trend_view_state::IsSet, S::DisplayName: trend_view_state::IsSet, + S::StartedAt: trend_view_state::IsSet, + S::Actors: trend_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TrendView<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_config.rs b/crates/weaver-api/src/app_bsky/unspecced/get_config.rs index 93b7596..08bdc64 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_config.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_config.rs @@ -33,37 +33,37 @@ pub mod live_now_config_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Domains; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Domains = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Domains = S::Domains; + type Did = Unset; } ///State transition - sets the `domains` field to Set pub struct SetDomains(PhantomData S>); impl sealed::Sealed for SetDomains {} impl State for SetDomains { - type Did = S::Did; type Domains = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Domains = S::Domains; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `domains` field pub struct domains(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> LiveNowConfigBuilder<'a, S> where S: live_now_config_state::State, - S::Did: live_now_config_state::IsSet, S::Domains: live_now_config_state::IsSet, + S::Did: live_now_config_state::IsSet, { /// Build the final struct pub fn build(self) -> LiveNowConfig<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index b572674..691dc9b 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -189,51 +189,51 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type Depth; type Uri; + type Depth; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; - type Depth = Unset; type Uri = Unset; + type Depth = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Depth = S::Depth; - type Uri = S::Uri; + type Value = S::Value; } ///State transition - sets the `depth` field to Set pub struct SetDepth(PhantomData S>); impl sealed::Sealed for SetDepth {} impl State for SetDepth { - type Value = S::Value; - type Depth = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Depth = Set; type Value = S::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Uri = S::Uri; type Depth = S::Depth; - type Uri = Set; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); - ///Marker type for the `depth` field - pub struct depth(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `depth` field + pub struct depth(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -326,9 +326,9 @@ where impl<'a, S> ThreadItemBuilder<'a, S> where S: thread_item_state::State, - S::Value: thread_item_state::IsSet, - S::Depth: thread_item_state::IsSet, S::Uri: thread_item_state::IsSet, + S::Depth: thread_item_state::IsSet, + S::Value: thread_item_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItem<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs b/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs index e8fa283..cc9100b 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs @@ -90,51 +90,51 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type SubjectType; type Tag; type Subject; - type SubjectType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type SubjectType = Unset; type Tag = Unset; type Subject = Unset; - type SubjectType = Unset; + } + ///State transition - sets the `subject_type` field to Set + pub struct SetSubjectType(PhantomData S>); + impl sealed::Sealed for SetSubjectType {} + impl State for SetSubjectType { + type SubjectType = Set; + type Tag = S::Tag; + type Subject = S::Subject; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData S>); impl sealed::Sealed for SetTag {} impl State for SetTag { + type SubjectType = S::SubjectType; type Tag = Set; type Subject = S::Subject; - type SubjectType = S::SubjectType; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Tag = S::Tag; - type Subject = Set; type SubjectType = S::SubjectType; - } - ///State transition - sets the `subject_type` field to Set - pub struct SetSubjectType(PhantomData S>); - impl sealed::Sealed for SetSubjectType {} - impl State for SetSubjectType { type Tag = S::Tag; - type Subject = S::Subject; - type SubjectType = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `subject_type` field + pub struct subject_type(()); ///Marker type for the `tag` field pub struct tag(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `subject_type` field - pub struct subject_type(()); } } @@ -227,9 +227,9 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, + S::SubjectType: suggestion_state::IsSet, S::Tag: suggestion_state::IsSet, S::Subject: suggestion_state::IsSet, - S::SubjectType: suggestion_state::IsSet, { /// Build the final struct pub fn build(self) -> Suggestion<'a> { diff --git a/crates/weaver-api/src/app_bsky/video.rs b/crates/weaver-api/src/app_bsky/video.rs index a2657ef..582ebf2 100644 --- a/crates/weaver-api/src/app_bsky/video.rs +++ b/crates/weaver-api/src/app_bsky/video.rs @@ -52,49 +52,49 @@ pub mod job_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type JobId; + type Did; type State; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type JobId = Unset; + type Did = Unset; type State = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type JobId = S::JobId; - type State = S::State; - } ///State transition - sets the `job_id` field to Set pub struct SetJobId(PhantomData S>); impl sealed::Sealed for SetJobId {} impl State for SetJobId { - type Did = S::Did; type JobId = Set; + type Did = S::Did; + type State = S::State; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type JobId = S::JobId; + type Did = Set; type State = S::State; } ///State transition - sets the `state` field to Set pub struct SetState(PhantomData S>); impl sealed::Sealed for SetState {} impl State for SetState { - type Did = S::Did; type JobId = S::JobId; + type Did = S::Did; type State = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `job_id` field pub struct job_id(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `state` field pub struct state(()); } @@ -257,8 +257,8 @@ where impl<'a, S> JobStatusBuilder<'a, S> where S: job_status_state::State, - S::Did: job_status_state::IsSet, S::JobId: job_status_state::IsSet, + S::Did: job_status_state::IsSet, S::State: job_status_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/chat_bsky/actor.rs b/crates/weaver-api/src/chat_bsky/actor.rs index 0f2ca23..ced6c00 100644 --- a/crates/weaver-api/src/chat_bsky/actor.rs +++ b/crates/weaver-api/src/chat_bsky/actor.rs @@ -58,37 +58,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Did; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Did = Unset; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = S::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Did = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -305,8 +305,8 @@ impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, - S::Handle: profile_view_basic_state::IsSet, S::Did: profile_view_basic_state::IsSet, + S::Handle: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo.rs b/crates/weaver-api/src/chat_bsky/convo.rs index 0c84473..167413e 100644 --- a/crates/weaver-api/src/chat_bsky/convo.rs +++ b/crates/weaver-api/src/chat_bsky/convo.rs @@ -66,85 +66,85 @@ pub mod convo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type UnreadCount; type Rev; type Id; - type Members; - type UnreadCount; type Muted; + type Members; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type UnreadCount = Unset; type Rev = Unset; type Id = Unset; - type Members = Unset; - type UnreadCount = Unset; type Muted = Unset; + type Members = Unset; + } + ///State transition - sets the `unread_count` field to Set + pub struct SetUnreadCount(PhantomData S>); + impl sealed::Sealed for SetUnreadCount {} + impl State for SetUnreadCount { + type UnreadCount = Set; + type Rev = S::Rev; + type Id = S::Id; + type Muted = S::Muted; + type Members = S::Members; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { + type UnreadCount = S::UnreadCount; type Rev = Set; type Id = S::Id; - type Members = S::Members; - type UnreadCount = S::UnreadCount; type Muted = S::Muted; + type Members = S::Members; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Rev = S::Rev; - type Id = Set; - type Members = S::Members; type UnreadCount = S::UnreadCount; - type Muted = S::Muted; - } - ///State transition - sets the `members` field to Set - pub struct SetMembers(PhantomData S>); - impl sealed::Sealed for SetMembers {} - impl State for SetMembers { type Rev = S::Rev; - type Id = S::Id; - type Members = Set; - type UnreadCount = S::UnreadCount; + type Id = Set; type Muted = S::Muted; - } - ///State transition - sets the `unread_count` field to Set - pub struct SetUnreadCount(PhantomData S>); - impl sealed::Sealed for SetUnreadCount {} - impl State for SetUnreadCount { - type Rev = S::Rev; - type Id = S::Id; type Members = S::Members; - type UnreadCount = Set; - type Muted = S::Muted; } ///State transition - sets the `muted` field to Set pub struct SetMuted(PhantomData S>); impl sealed::Sealed for SetMuted {} impl State for SetMuted { + type UnreadCount = S::UnreadCount; type Rev = S::Rev; type Id = S::Id; + type Muted = Set; type Members = S::Members; + } + ///State transition - sets the `members` field to Set + pub struct SetMembers(PhantomData S>); + impl sealed::Sealed for SetMembers {} + impl State for SetMembers { type UnreadCount = S::UnreadCount; - type Muted = Set; + type Rev = S::Rev; + type Id = S::Id; + type Muted = S::Muted; + type Members = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `unread_count` field + pub struct unread_count(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `members` field - pub struct members(()); - ///Marker type for the `unread_count` field - pub struct unread_count(()); ///Marker type for the `muted` field pub struct muted(()); + ///Marker type for the `members` field + pub struct members(()); } } @@ -334,11 +334,11 @@ where impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, + S::UnreadCount: convo_view_state::IsSet, S::Rev: convo_view_state::IsSet, S::Id: convo_view_state::IsSet, - S::Members: convo_view_state::IsSet, - S::UnreadCount: convo_view_state::IsSet, S::Muted: convo_view_state::IsSet, + S::Members: convo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ConvoView<'a> { @@ -1649,66 +1649,66 @@ pub mod deleted_message_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Id; - type Sender; type SentAt; type Rev; + type Sender; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Id = Unset; - type Sender = Unset; type SentAt = Unset; type Rev = Unset; + type Sender = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Id = Set; - type Sender = S::Sender; - type SentAt = S::SentAt; - type Rev = S::Rev; - } - ///State transition - sets the `sender` field to Set - pub struct SetSender(PhantomData S>); - impl sealed::Sealed for SetSender {} - impl State for SetSender { - type Id = S::Id; - type Sender = Set; type SentAt = S::SentAt; type Rev = S::Rev; + type Sender = S::Sender; } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData S>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { type Id = S::Id; - type Sender = S::Sender; type SentAt = Set; type Rev = S::Rev; + type Sender = S::Sender; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Id = S::Id; - type Sender = S::Sender; type SentAt = S::SentAt; type Rev = Set; + type Sender = S::Sender; + } + ///State transition - sets the `sender` field to Set + pub struct SetSender(PhantomData S>); + impl sealed::Sealed for SetSender {} + impl State for SetSender { + type Id = S::Id; + type SentAt = S::SentAt; + type Rev = S::Rev; + type Sender = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `sender` field - pub struct sender(()); ///Marker type for the `sent_at` field pub struct sent_at(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `sender` field + pub struct sender(()); } } @@ -1822,9 +1822,9 @@ impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, S::Id: deleted_message_view_state::IsSet, - S::Sender: deleted_message_view_state::IsSet, S::SentAt: deleted_message_view_state::IsSet, S::Rev: deleted_message_view_state::IsSet, + S::Sender: deleted_message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DeletedMessageView<'a> { @@ -1940,66 +1940,66 @@ pub mod log_add_reaction_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Message; - type Rev; - type Reaction; type ConvoId; + type Reaction; + type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Message = Unset; - type Rev = Unset; - type Reaction = Unset; type ConvoId = Unset; + type Reaction = Unset; + type Rev = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Message = Set; - type Rev = S::Rev; - type Reaction = S::Reaction; type ConvoId = S::ConvoId; + type Reaction = S::Reaction; + type Rev = S::Rev; } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { + ///State transition - sets the `convo_id` field to Set + pub struct SetConvoId(PhantomData S>); + impl sealed::Sealed for SetConvoId {} + impl State for SetConvoId { type Message = S::Message; - type Rev = Set; + type ConvoId = Set; type Reaction = S::Reaction; - type ConvoId = S::ConvoId; + type Rev = S::Rev; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { type Message = S::Message; - type Rev = S::Rev; - type Reaction = Set; type ConvoId = S::ConvoId; + type Reaction = Set; + type Rev = S::Rev; } - ///State transition - sets the `convo_id` field to Set - pub struct SetConvoId(PhantomData S>); - impl sealed::Sealed for SetConvoId {} - impl State for SetConvoId { + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { type Message = S::Message; - type Rev = S::Rev; + type ConvoId = S::ConvoId; type Reaction = S::Reaction; - type ConvoId = Set; + type Rev = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message` field pub struct message(()); - ///Marker type for the `rev` field - pub struct rev(()); - ///Marker type for the `reaction` field - pub struct reaction(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `reaction` field + pub struct reaction(()); + ///Marker type for the `rev` field + pub struct rev(()); } } @@ -2113,9 +2113,9 @@ impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Message: log_add_reaction_state::IsSet, - S::Rev: log_add_reaction_state::IsSet, - S::Reaction: log_add_reaction_state::IsSet, S::ConvoId: log_add_reaction_state::IsSet, + S::Reaction: log_add_reaction_state::IsSet, + S::Rev: log_add_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogAddReaction<'a> { @@ -2247,51 +2247,51 @@ pub mod log_create_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type Rev; type ConvoId; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type Rev = Unset; type ConvoId = Unset; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData S>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type Rev = S::Rev; - type ConvoId = S::ConvoId; + type Message = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Message = S::Message; type Rev = Set; type ConvoId = S::ConvoId; + type Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = S::Message; type Rev = S::Rev; type ConvoId = Set; + type Message = S::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData S>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type Rev = S::Rev; + type ConvoId = S::ConvoId; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -2384,9 +2384,9 @@ where impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, - S::Message: log_create_message_state::IsSet, S::Rev: log_create_message_state::IsSet, S::ConvoId: log_create_message_state::IsSet, + S::Message: log_create_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogCreateMessage<'a> { @@ -2480,51 +2480,51 @@ pub mod log_delete_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type ConvoId; type Message; - type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; type ConvoId = Unset; type Message = Unset; - type Rev = Unset; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Rev = Set; + type ConvoId = S::ConvoId; + type Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { + type Rev = S::Rev; type ConvoId = Set; type Message = S::Message; - type Rev = S::Rev; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = S::ConvoId; - type Message = Set; type Rev = S::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type ConvoId = S::ConvoId; - type Message = S::Message; - type Rev = Set; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `message` field pub struct message(()); - ///Marker type for the `rev` field - pub struct rev(()); } } @@ -2617,9 +2617,9 @@ where impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, + S::Rev: log_delete_message_state::IsSet, S::ConvoId: log_delete_message_state::IsSet, S::Message: log_delete_message_state::IsSet, - S::Rev: log_delete_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogDeleteMessage<'a> { @@ -3020,67 +3020,67 @@ pub mod log_remove_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type ConvoId; type Message; type Reaction; - type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; type ConvoId = Unset; type Message = Unset; type Reaction = Unset; - type Rev = Unset; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Rev = Set; + type ConvoId = S::ConvoId; + type Message = S::Message; + type Reaction = S::Reaction; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { + type Rev = S::Rev; type ConvoId = Set; type Message = S::Message; type Reaction = S::Reaction; - type Rev = S::Rev; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { + type Rev = S::Rev; type ConvoId = S::ConvoId; type Message = Set; type Reaction = S::Reaction; - type Rev = S::Rev; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { - type ConvoId = S::ConvoId; - type Message = S::Message; - type Reaction = Set; type Rev = S::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type ConvoId = S::ConvoId; type Message = S::Message; - type Reaction = S::Reaction; - type Rev = Set; + type Reaction = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `message` field pub struct message(()); ///Marker type for the `reaction` field pub struct reaction(()); - ///Marker type for the `rev` field - pub struct rev(()); } } @@ -3193,10 +3193,10 @@ where impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, + S::Rev: log_remove_reaction_state::IsSet, S::ConvoId: log_remove_reaction_state::IsSet, S::Message: log_remove_reaction_state::IsSet, S::Reaction: log_remove_reaction_state::IsSet, - S::Rev: log_remove_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogRemoveReaction<'a> { @@ -3813,85 +3813,85 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev; - type Text; type Sender; - type Id; type SentAt; + type Id; + type Rev; + type Text; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev = Unset; - type Text = Unset; type Sender = Unset; - type Id = Unset; type SentAt = Unset; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { - type Rev = Set; - type Text = S::Text; - type Sender = S::Sender; - type Id = S::Id; - type SentAt = S::SentAt; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData S>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Rev = S::Rev; - type Text = Set; - type Sender = S::Sender; - type Id = S::Id; - type SentAt = S::SentAt; + type Id = Unset; + type Rev = Unset; + type Text = Unset; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { + type Sender = Set; + type SentAt = S::SentAt; + type Id = S::Id; type Rev = S::Rev; type Text = S::Text; - type Sender = Set; + } + ///State transition - sets the `sent_at` field to Set + pub struct SetSentAt(PhantomData S>); + impl sealed::Sealed for SetSentAt {} + impl State for SetSentAt { + type Sender = S::Sender; + type SentAt = Set; type Id = S::Id; - type SentAt = S::SentAt; + type Rev = S::Rev; + type Text = S::Text; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { + type Sender = S::Sender; + type SentAt = S::SentAt; + type Id = Set; type Rev = S::Rev; type Text = S::Text; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { type Sender = S::Sender; - type Id = Set; type SentAt = S::SentAt; - } - ///State transition - sets the `sent_at` field to Set - pub struct SetSentAt(PhantomData S>); - impl sealed::Sealed for SetSentAt {} - impl State for SetSentAt { - type Rev = S::Rev; + type Id = S::Id; + type Rev = Set; type Text = S::Text; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData S>); + impl sealed::Sealed for SetText {} + impl State for SetText { type Sender = S::Sender; + type SentAt = S::SentAt; type Id = S::Id; - type SentAt = Set; + type Rev = S::Rev; + type Text = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev` field - pub struct rev(()); - ///Marker type for the `text` field - pub struct text(()); ///Marker type for the `sender` field pub struct sender(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `sent_at` field pub struct sent_at(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `text` field + pub struct text(()); } } @@ -4084,11 +4084,11 @@ where impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, - S::Rev: message_view_state::IsSet, - S::Text: message_view_state::IsSet, S::Sender: message_view_state::IsSet, - S::Id: message_view_state::IsSet, S::SentAt: message_view_state::IsSet, + S::Id: message_view_state::IsSet, + S::Rev: message_view_state::IsSet, + S::Text: message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageView<'a> { @@ -4342,51 +4342,51 @@ pub mod reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Value; type Sender; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Value = Unset; type Sender = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Value = S::Value; - type Sender = S::Sender; + type CreatedAt = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type CreatedAt = S::CreatedAt; type Value = Set; type Sender = S::Sender; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type CreatedAt = S::CreatedAt; type Value = S::Value; type Sender = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Value = S::Value; + type Sender = S::Sender; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `sender` field pub struct sender(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -4479,9 +4479,9 @@ where impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, - S::CreatedAt: reaction_view_state::IsSet, S::Value: reaction_view_state::IsSet, S::Sender: reaction_view_state::IsSet, + S::CreatedAt: reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionView<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo/send_message.rs b/crates/weaver-api/src/chat_bsky/convo/send_message.rs index a6b37be..5950b13 100644 --- a/crates/weaver-api/src/chat_bsky/convo/send_message.rs +++ b/crates/weaver-api/src/chat_bsky/convo/send_message.rs @@ -33,37 +33,37 @@ pub mod send_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type ConvoId; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type ConvoId = Unset; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData S>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type ConvoId = S::ConvoId; + type Message = Unset; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = S::Message; type ConvoId = Set; + type Message = S::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData S>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type ConvoId = S::ConvoId; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> SendMessageBuilder<'a, S> where S: send_message_state::State, - S::Message: send_message_state::IsSet, S::ConvoId: send_message_state::IsSet, + S::Message: send_message_state::IsSet, { /// Build the final struct pub fn build(self) -> SendMessage<'a> { diff --git a/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs b/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs index e1744a5..87582a4 100644 --- a/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs +++ b/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs @@ -185,67 +185,67 @@ pub mod metadata_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type ConvosStarted; + type MessagesSent; type Convos; type MessagesReceived; - type MessagesSent; - type ConvosStarted; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type ConvosStarted = Unset; + type MessagesSent = Unset; type Convos = Unset; type MessagesReceived = Unset; - type MessagesSent = Unset; - type ConvosStarted = Unset; + } + ///State transition - sets the `convos_started` field to Set + pub struct SetConvosStarted(PhantomData S>); + impl sealed::Sealed for SetConvosStarted {} + impl State for SetConvosStarted { + type ConvosStarted = Set; + type MessagesSent = S::MessagesSent; + type Convos = S::Convos; + type MessagesReceived = S::MessagesReceived; + } + ///State transition - sets the `messages_sent` field to Set + pub struct SetMessagesSent(PhantomData S>); + impl sealed::Sealed for SetMessagesSent {} + impl State for SetMessagesSent { + type ConvosStarted = S::ConvosStarted; + type MessagesSent = Set; + type Convos = S::Convos; + type MessagesReceived = S::MessagesReceived; } ///State transition - sets the `convos` field to Set pub struct SetConvos(PhantomData S>); impl sealed::Sealed for SetConvos {} impl State for SetConvos { + type ConvosStarted = S::ConvosStarted; + type MessagesSent = S::MessagesSent; type Convos = Set; type MessagesReceived = S::MessagesReceived; - type MessagesSent = S::MessagesSent; - type ConvosStarted = S::ConvosStarted; } ///State transition - sets the `messages_received` field to Set pub struct SetMessagesReceived(PhantomData S>); impl sealed::Sealed for SetMessagesReceived {} impl State for SetMessagesReceived { - type Convos = S::Convos; - type MessagesReceived = Set; - type MessagesSent = S::MessagesSent; - type ConvosStarted = S::ConvosStarted; - } - ///State transition - sets the `messages_sent` field to Set - pub struct SetMessagesSent(PhantomData S>); - impl sealed::Sealed for SetMessagesSent {} - impl State for SetMessagesSent { - type Convos = S::Convos; - type MessagesReceived = S::MessagesReceived; - type MessagesSent = Set; type ConvosStarted = S::ConvosStarted; - } - ///State transition - sets the `convos_started` field to Set - pub struct SetConvosStarted(PhantomData S>); - impl sealed::Sealed for SetConvosStarted {} - impl State for SetConvosStarted { - type Convos = S::Convos; - type MessagesReceived = S::MessagesReceived; type MessagesSent = S::MessagesSent; - type ConvosStarted = Set; + type Convos = S::Convos; + type MessagesReceived = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `convos_started` field + pub struct convos_started(()); + ///Marker type for the `messages_sent` field + pub struct messages_sent(()); ///Marker type for the `convos` field pub struct convos(()); ///Marker type for the `messages_received` field pub struct messages_received(()); - ///Marker type for the `messages_sent` field - pub struct messages_sent(()); - ///Marker type for the `convos_started` field - pub struct convos_started(()); } } @@ -358,10 +358,10 @@ where impl<'a, S> MetadataBuilder<'a, S> where S: metadata_state::State, + S::ConvosStarted: metadata_state::IsSet, + S::MessagesSent: metadata_state::IsSet, S::Convos: metadata_state::IsSet, S::MessagesReceived: metadata_state::IsSet, - S::MessagesSent: metadata_state::IsSet, - S::ConvosStarted: metadata_state::IsSet, { /// Build the final struct pub fn build(self) -> Metadata<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin.rs b/crates/weaver-api/src/com_atproto/admin.rs index af3a0ef..aedf3f7 100644 --- a/crates/weaver-api/src/com_atproto/admin.rs +++ b/crates/weaver-api/src/com_atproto/admin.rs @@ -80,51 +80,51 @@ pub mod account_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Handle; type IndexedAt; type Did; - type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Handle = Unset; type IndexedAt = Unset; type Did = Unset; - type Handle = Unset; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Handle = Set; + type IndexedAt = S::IndexedAt; + type Did = S::Did; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Handle = S::Handle; type IndexedAt = Set; type Did = S::Did; - type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type IndexedAt = S::IndexedAt; - type Did = Set; type Handle = S::Handle; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Handle = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `handle` field + pub struct handle(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `handle` field - pub struct handle(()); } } @@ -401,9 +401,9 @@ impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, + S::Handle: account_view_state::IsSet, S::IndexedAt: account_view_state::IsSet, S::Did: account_view_state::IsSet, - S::Handle: account_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountView<'a> { @@ -907,37 +907,37 @@ pub mod repo_blob_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Did; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Did = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Did = S::Did; + type Cid = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Cid = S::Cid; type Did = Set; + type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Did = S::Did; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -1030,8 +1030,8 @@ impl<'a, S: repo_blob_ref_state::State> RepoBlobRefBuilder<'a, S> { impl<'a, S> RepoBlobRefBuilder<'a, S> where S: repo_blob_ref_state::State, - S::Cid: repo_blob_ref_state::IsSet, S::Did: repo_blob_ref_state::IsSet, + S::Cid: repo_blob_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoBlobRef<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/send_email.rs b/crates/weaver-api/src/com_atproto/admin/send_email.rs index b386221..3d4338a 100644 --- a/crates/weaver-api/src/com_atproto/admin/send_email.rs +++ b/crates/weaver-api/src/com_atproto/admin/send_email.rs @@ -42,51 +42,51 @@ pub mod send_email_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Content; type SenderDid; type RecipientDid; - type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Content = Unset; type SenderDid = Unset; type RecipientDid = Unset; - type Content = Unset; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData S>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Content = Set; + type SenderDid = S::SenderDid; + type RecipientDid = S::RecipientDid; } ///State transition - sets the `sender_did` field to Set pub struct SetSenderDid(PhantomData S>); impl sealed::Sealed for SetSenderDid {} impl State for SetSenderDid { + type Content = S::Content; type SenderDid = Set; type RecipientDid = S::RecipientDid; - type Content = S::Content; } ///State transition - sets the `recipient_did` field to Set pub struct SetRecipientDid(PhantomData S>); impl sealed::Sealed for SetRecipientDid {} impl State for SetRecipientDid { - type SenderDid = S::SenderDid; - type RecipientDid = Set; type Content = S::Content; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { type SenderDid = S::SenderDid; - type RecipientDid = S::RecipientDid; - type Content = Set; + type RecipientDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `content` field + pub struct content(()); ///Marker type for the `sender_did` field pub struct sender_did(()); ///Marker type for the `recipient_did` field pub struct recipient_did(()); - ///Marker type for the `content` field - pub struct content(()); } } @@ -213,9 +213,9 @@ impl<'a, S: send_email_state::State> SendEmailBuilder<'a, S> { impl<'a, S> SendEmailBuilder<'a, S> where S: send_email_state::State, + S::Content: send_email_state::IsSet, S::SenderDid: send_email_state::IsSet, S::RecipientDid: send_email_state::IsSet, - S::Content: send_email_state::IsSet, { /// Build the final struct pub fn build(self) -> SendEmail<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_email.rs b/crates/weaver-api/src/com_atproto/admin/update_account_email.rs index cf27c63..24aebdc 100644 --- a/crates/weaver-api/src/com_atproto/admin/update_account_email.rs +++ b/crates/weaver-api/src/com_atproto/admin/update_account_email.rs @@ -34,37 +34,37 @@ pub mod update_account_email_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Account; type Email; + type Account; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Account = Unset; type Email = Unset; - } - ///State transition - sets the `account` field to Set - pub struct SetAccount(PhantomData S>); - impl sealed::Sealed for SetAccount {} - impl State for SetAccount { - type Account = Set; - type Email = S::Email; + type Account = Unset; } ///State transition - sets the `email` field to Set pub struct SetEmail(PhantomData S>); impl sealed::Sealed for SetEmail {} impl State for SetEmail { - type Account = S::Account; type Email = Set; + type Account = S::Account; + } + ///State transition - sets the `account` field to Set + pub struct SetAccount(PhantomData S>); + impl sealed::Sealed for SetAccount {} + impl State for SetAccount { + type Email = S::Email; + type Account = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `account` field - pub struct account(()); ///Marker type for the `email` field pub struct email(()); + ///Marker type for the `account` field + pub struct account(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> UpdateAccountEmailBuilder<'a, S> where S: update_account_email_state::State, - S::Account: update_account_email_state::IsSet, S::Email: update_account_email_state::IsSet, + S::Account: update_account_email_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateAccountEmail<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_password.rs b/crates/weaver-api/src/com_atproto/admin/update_account_password.rs index 47c11d7..fdf105f 100644 --- a/crates/weaver-api/src/com_atproto/admin/update_account_password.rs +++ b/crates/weaver-api/src/com_atproto/admin/update_account_password.rs @@ -33,37 +33,37 @@ pub mod update_account_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Password; type Did; + type Password; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Password = Unset; type Did = Unset; - } - ///State transition - sets the `password` field to Set - pub struct SetPassword(PhantomData S>); - impl sealed::Sealed for SetPassword {} - impl State for SetPassword { - type Password = Set; - type Did = S::Did; + type Password = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Password = S::Password; type Did = Set; + type Password = S::Password; + } + ///State transition - sets the `password` field to Set + pub struct SetPassword(PhantomData S>); + impl sealed::Sealed for SetPassword {} + impl State for SetPassword { + type Did = S::Did; + type Password = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `password` field - pub struct password(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `password` field + pub struct password(()); } } @@ -142,8 +142,8 @@ where impl<'a, S> UpdateAccountPasswordBuilder<'a, S> where S: update_account_password_state::State, - S::Password: update_account_password_state::IsSet, S::Did: update_account_password_state::IsSet, + S::Password: update_account_password_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateAccountPassword<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_signing_key.rs b/crates/weaver-api/src/com_atproto/admin/update_account_signing_key.rs index e0cf07f..aae1574 100644 --- a/crates/weaver-api/src/com_atproto/admin/update_account_signing_key.rs +++ b/crates/weaver-api/src/com_atproto/admin/update_account_signing_key.rs @@ -34,37 +34,37 @@ pub mod update_account_signing_key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SigningKey; type Did; + type SigningKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SigningKey = Unset; type Did = Unset; - } - ///State transition - sets the `signing_key` field to Set - pub struct SetSigningKey(PhantomData S>); - impl sealed::Sealed for SetSigningKey {} - impl State for SetSigningKey { - type SigningKey = Set; - type Did = S::Did; + type SigningKey = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type SigningKey = S::SigningKey; type Did = Set; + type SigningKey = S::SigningKey; + } + ///State transition - sets the `signing_key` field to Set + pub struct SetSigningKey(PhantomData S>); + impl sealed::Sealed for SetSigningKey {} + impl State for SetSigningKey { + type Did = S::Did; + type SigningKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signing_key` field - pub struct signing_key(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `signing_key` field + pub struct signing_key(()); } } @@ -149,8 +149,8 @@ where impl<'a, S> UpdateAccountSigningKeyBuilder<'a, S> where S: update_account_signing_key_state::State, - S::SigningKey: update_account_signing_key_state::IsSet, S::Did: update_account_signing_key_state::IsSet, + S::SigningKey: update_account_signing_key_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateAccountSigningKey<'a> { diff --git a/crates/weaver-api/src/com_atproto/identity.rs b/crates/weaver-api/src/com_atproto/identity.rs index 6e752d0..c24ac7d 100644 --- a/crates/weaver-api/src/com_atproto/identity.rs +++ b/crates/weaver-api/src/com_atproto/identity.rs @@ -47,51 +47,51 @@ pub mod identity_info_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type DidDoc; type Did; type Handle; - type DidDoc; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type DidDoc = Unset; type Did = Unset; type Handle = Unset; - type DidDoc = Unset; + } + ///State transition - sets the `did_doc` field to Set + pub struct SetDidDoc(PhantomData S>); + impl sealed::Sealed for SetDidDoc {} + impl State for SetDidDoc { + type DidDoc = Set; + type Did = S::Did; + type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type DidDoc = S::DidDoc; type Did = Set; type Handle = S::Handle; - type DidDoc = S::DidDoc; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; - type Handle = Set; type DidDoc = S::DidDoc; - } - ///State transition - sets the `did_doc` field to Set - pub struct SetDidDoc(PhantomData S>); - impl sealed::Sealed for SetDidDoc {} - impl State for SetDidDoc { type Did = S::Did; - type Handle = S::Handle; - type DidDoc = Set; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `did_doc` field + pub struct did_doc(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `did_doc` field - pub struct did_doc(()); } } @@ -184,9 +184,9 @@ where impl<'a, S> IdentityInfoBuilder<'a, S> where S: identity_info_state::State, + S::DidDoc: identity_info_state::IsSet, S::Did: identity_info_state::IsSet, S::Handle: identity_info_state::IsSet, - S::DidDoc: identity_info_state::IsSet, { /// Build the final struct pub fn build(self) -> IdentityInfo<'a> { diff --git a/crates/weaver-api/src/com_atproto/label.rs b/crates/weaver-api/src/com_atproto/label.rs index 9a76e15..0aabecf 100644 --- a/crates/weaver-api/src/com_atproto/label.rs +++ b/crates/weaver-api/src/com_atproto/label.rs @@ -63,67 +63,67 @@ pub mod label_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Val; + type Src; type Uri; + type Val; type Cts; - type Src; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Val = Unset; + type Src = Unset; type Uri = Unset; + type Val = Unset; type Cts = Unset; - type Src = Unset; } - ///State transition - sets the `val` field to Set - pub struct SetVal(PhantomData S>); - impl sealed::Sealed for SetVal {} - impl State for SetVal { - type Val = Set; + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData S>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { + type Src = Set; type Uri = S::Uri; + type Val = S::Val; type Cts = S::Cts; - type Src = S::Src; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Val = S::Val; + type Src = S::Src; type Uri = Set; + type Val = S::Val; type Cts = S::Cts; + } + ///State transition - sets the `val` field to Set + pub struct SetVal(PhantomData S>); + impl sealed::Sealed for SetVal {} + impl State for SetVal { type Src = S::Src; + type Uri = S::Uri; + type Val = Set; + type Cts = S::Cts; } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData S>); impl sealed::Sealed for SetCts {} impl State for SetCts { - type Val = S::Val; - type Uri = S::Uri; - type Cts = Set; type Src = S::Src; - } - ///State transition - sets the `src` field to Set - pub struct SetSrc(PhantomData S>); - impl sealed::Sealed for SetSrc {} - impl State for SetSrc { - type Val = S::Val; type Uri = S::Uri; - type Cts = S::Cts; - type Src = Set; + type Val = S::Val; + type Cts = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `val` field - pub struct val(()); + ///Marker type for the `src` field + pub struct src(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `val` field + pub struct val(()); ///Marker type for the `cts` field pub struct cts(()); - ///Marker type for the `src` field - pub struct src(()); } } @@ -328,10 +328,10 @@ impl<'a, S: label_state::State> LabelBuilder<'a, S> { impl<'a, S> LabelBuilder<'a, S> where S: label_state::State, - S::Val: label_state::IsSet, + S::Src: label_state::IsSet, S::Uri: label_state::IsSet, + S::Val: label_state::IsSet, S::Cts: label_state::IsSet, - S::Src: label_state::IsSet, { /// Build the final struct pub fn build(self) -> Label<'a> { @@ -1054,66 +1054,66 @@ pub mod label_value_definition_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Severity; - type Blurs; type Identifier; type Locales; + type Blurs; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Severity = Unset; - type Blurs = Unset; type Identifier = Unset; type Locales = Unset; + type Blurs = Unset; } ///State transition - sets the `severity` field to Set pub struct SetSeverity(PhantomData S>); impl sealed::Sealed for SetSeverity {} impl State for SetSeverity { type Severity = Set; - type Blurs = S::Blurs; - type Identifier = S::Identifier; - type Locales = S::Locales; - } - ///State transition - sets the `blurs` field to Set - pub struct SetBlurs(PhantomData S>); - impl sealed::Sealed for SetBlurs {} - impl State for SetBlurs { - type Severity = S::Severity; - type Blurs = Set; type Identifier = S::Identifier; type Locales = S::Locales; + type Blurs = S::Blurs; } ///State transition - sets the `identifier` field to Set pub struct SetIdentifier(PhantomData S>); impl sealed::Sealed for SetIdentifier {} impl State for SetIdentifier { type Severity = S::Severity; - type Blurs = S::Blurs; type Identifier = Set; type Locales = S::Locales; + type Blurs = S::Blurs; } ///State transition - sets the `locales` field to Set pub struct SetLocales(PhantomData S>); impl sealed::Sealed for SetLocales {} impl State for SetLocales { type Severity = S::Severity; - type Blurs = S::Blurs; type Identifier = S::Identifier; type Locales = Set; + type Blurs = S::Blurs; + } + ///State transition - sets the `blurs` field to Set + pub struct SetBlurs(PhantomData S>); + impl sealed::Sealed for SetBlurs {} + impl State for SetBlurs { + type Severity = S::Severity; + type Identifier = S::Identifier; + type Locales = S::Locales; + type Blurs = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `severity` field pub struct severity(()); - ///Marker type for the `blurs` field - pub struct blurs(()); ///Marker type for the `identifier` field pub struct identifier(()); ///Marker type for the `locales` field pub struct locales(()); + ///Marker type for the `blurs` field + pub struct blurs(()); } } @@ -1269,9 +1269,9 @@ impl<'a, S> LabelValueDefinitionBuilder<'a, S> where S: label_value_definition_state::State, S::Severity: label_value_definition_state::IsSet, - S::Blurs: label_value_definition_state::IsSet, S::Identifier: label_value_definition_state::IsSet, S::Locales: label_value_definition_state::IsSet, + S::Blurs: label_value_definition_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinition<'a> { @@ -1387,51 +1387,51 @@ pub mod label_value_definition_strings_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Lang; - type Description; type Name; + type Description; + type Lang; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Lang = Unset; - type Description = Unset; type Name = Unset; + type Description = Unset; + type Lang = Unset; } - ///State transition - sets the `lang` field to Set - pub struct SetLang(PhantomData S>); - impl sealed::Sealed for SetLang {} - impl State for SetLang { - type Lang = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Description = S::Description; - type Name = S::Name; + type Lang = S::Lang; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Lang = S::Lang; - type Description = Set; type Name = S::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Description = Set; type Lang = S::Lang; + } + ///State transition - sets the `lang` field to Set + pub struct SetLang(PhantomData S>); + impl sealed::Sealed for SetLang {} + impl State for SetLang { + type Name = S::Name; type Description = S::Description; - type Name = Set; + type Lang = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `lang` field - pub struct lang(()); - ///Marker type for the `description` field - pub struct description(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `description` field + pub struct description(()); + ///Marker type for the `lang` field + pub struct lang(()); } } @@ -1541,9 +1541,9 @@ where impl<'a, S> LabelValueDefinitionStringsBuilder<'a, S> where S: label_value_definition_strings_state::State, - S::Lang: label_value_definition_strings_state::IsSet, - S::Description: label_value_definition_strings_state::IsSet, S::Name: label_value_definition_strings_state::IsSet, + S::Description: label_value_definition_strings_state::IsSet, + S::Lang: label_value_definition_strings_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinitionStrings<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs index 2607e33..079a970 100644 --- a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs @@ -928,37 +928,37 @@ pub mod delete_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; type Rkey; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; type Rkey = Unset; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; - type Rkey = S::Rkey; + type Collection = Unset; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Collection = S::Collection; type Rkey = Set; + type Collection = S::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Rkey = S::Rkey; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); ///Marker type for the `rkey` field pub struct rkey(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -1039,8 +1039,8 @@ where impl<'a, S> DeleteBuilder<'a, S> where S: delete_state::State, - S::Collection: delete_state::IsSet, S::Rkey: delete_state::IsSet, + S::Collection: delete_state::IsSet, { /// Build the final struct pub fn build(self) -> Delete<'a> { @@ -1477,50 +1477,50 @@ pub mod update_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Value; - type Rkey; type Collection; + type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Value = Unset; - type Rkey = Unset; type Collection = Unset; + type Rkey = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Value = Set; - type Rkey = S::Rkey; - type Collection = S::Collection; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData S>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Value = S::Value; - type Rkey = Set; type Collection = S::Collection; + type Rkey = S::Rkey; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Value = S::Value; - type Rkey = S::Rkey; type Collection = Set; + type Rkey = S::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Value = S::Value; + type Collection = S::Collection; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `rkey` field - pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -1622,8 +1622,8 @@ impl<'a, S> UpdateBuilder<'a, S> where S: update_state::State, S::Value: update_state::IsSet, - S::Rkey: update_state::IsSet, S::Collection: update_state::IsSet, + S::Rkey: update_state::IsSet, { /// Build the final struct pub fn build(self) -> Update<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/create_record.rs b/crates/weaver-api/src/com_atproto/repo/create_record.rs index 0bebd18..2df559c 100644 --- a/crates/weaver-api/src/com_atproto/repo/create_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/create_record.rs @@ -53,49 +53,49 @@ pub mod create_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Record; + type Repo; type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repo = Unset; type Record = Unset; + type Repo = Unset; type Collection = Unset; } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Record = S::Record; - type Collection = S::Collection; - } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Repo = S::Repo; type Record = Set; + type Repo = S::Repo; + type Collection = S::Collection; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Record = S::Record; + type Repo = Set; type Collection = S::Collection; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Repo = S::Repo; type Record = S::Record; + type Repo = S::Repo; type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repo` field - pub struct repo(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `repo` field + pub struct repo(()); ///Marker type for the `collection` field pub struct collection(()); } @@ -258,8 +258,8 @@ impl<'a, S: create_record_state::State> CreateRecordBuilder<'a, S> { impl<'a, S> CreateRecordBuilder<'a, S> where S: create_record_state::State, - S::Repo: create_record_state::IsSet, S::Record: create_record_state::IsSet, + S::Repo: create_record_state::IsSet, S::Collection: create_record_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/com_atproto/repo/delete_record.rs b/crates/weaver-api/src/com_atproto/repo/delete_record.rs index c8c24c6..dcd1553 100644 --- a/crates/weaver-api/src/com_atproto/repo/delete_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/delete_record.rs @@ -48,51 +48,51 @@ pub mod delete_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; type Repo; type Rkey; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; type Repo = Unset; type Rkey = Unset; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; - type Repo = S::Repo; - type Rkey = S::Rkey; + type Collection = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Collection = S::Collection; type Repo = Set; type Rkey = S::Rkey; + type Collection = S::Collection; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Collection = S::Collection; type Repo = S::Repo; type Rkey = Set; + type Collection = S::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Repo = S::Repo; + type Rkey = S::Rkey; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `rkey` field pub struct rkey(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -233,9 +233,9 @@ impl<'a, S: delete_record_state::State> DeleteRecordBuilder<'a, S> { impl<'a, S> DeleteRecordBuilder<'a, S> where S: delete_record_state::State, - S::Collection: delete_record_state::IsSet, S::Repo: delete_record_state::IsSet, S::Rkey: delete_record_state::IsSet, + S::Collection: delete_record_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/get_record.rs b/crates/weaver-api/src/com_atproto/repo/get_record.rs index 7cc233f..c1a4fb8 100644 --- a/crates/weaver-api/src/com_atproto/repo/get_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/get_record.rs @@ -39,51 +39,51 @@ pub mod get_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; - type Repo; type Rkey; + type Repo; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; - type Repo = Unset; type Rkey = Unset; + type Repo = Unset; + type Collection = Unset; } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Rkey = Set; type Repo = S::Repo; - type Rkey = S::Rkey; + type Collection = S::Collection; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Collection = S::Collection; - type Repo = Set; type Rkey = S::Rkey; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData S>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { + type Repo = Set; type Collection = S::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Rkey = S::Rkey; type Repo = S::Repo; - type Rkey = Set; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); - ///Marker type for the `repo` field - pub struct repo(()); ///Marker type for the `rkey` field pub struct rkey(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -204,9 +204,9 @@ where impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, - S::Collection: get_record_state::IsSet, - S::Repo: get_record_state::IsSet, S::Rkey: get_record_state::IsSet, + S::Repo: get_record_state::IsSet, + S::Collection: get_record_state::IsSet, { /// Build the final struct pub fn build(self) -> GetRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/list_records.rs b/crates/weaver-api/src/com_atproto/repo/list_records.rs index 16572ca..86d973a 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_records.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_records.rs @@ -278,51 +278,51 @@ pub mod record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Uri; type Value; + type Uri; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Uri = Unset; type Value = Unset; + type Uri = Unset; + type Cid = Unset; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; type Uri = S::Uri; - type Value = S::Value; + type Cid = S::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = S::Cid; - type Uri = Set; type Value = S::Value; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { + type Uri = Set; type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Value = S::Value; type Uri = S::Uri; - type Value = Set; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -415,9 +415,9 @@ where impl<'a, S> RecordBuilder<'a, S> where S: record_state::State, - S::Cid: record_state::IsSet, - S::Uri: record_state::IsSet, S::Value: record_state::IsSet, + S::Uri: record_state::IsSet, + S::Cid: record_state::IsSet, { /// Build the final struct pub fn build(self) -> Record<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/put_record.rs b/crates/weaver-api/src/com_atproto/repo/put_record.rs index a98f2a6..06d0781 100644 --- a/crates/weaver-api/src/com_atproto/repo/put_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/put_record.rs @@ -54,67 +54,67 @@ pub mod put_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Repo; type Record; type Collection; type Rkey; - type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Repo = Unset; type Record = Unset; type Collection = Unset; type Rkey = Unset; - type Repo = Unset; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; + type Record = S::Record; + type Collection = S::Collection; + type Rkey = S::Rkey; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { + type Repo = S::Repo; type Record = Set; type Collection = S::Collection; type Rkey = S::Rkey; - type Repo = S::Repo; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { + type Repo = S::Repo; type Record = S::Record; type Collection = Set; type Rkey = S::Rkey; - type Repo = S::Repo; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Record = S::Record; - type Collection = S::Collection; - type Rkey = Set; type Repo = S::Repo; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { type Record = S::Record; type Collection = S::Collection; - type Rkey = S::Rkey; - type Repo = Set; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `repo` field + pub struct repo(()); ///Marker type for the `record` field pub struct record(()); ///Marker type for the `collection` field pub struct collection(()); ///Marker type for the `rkey` field pub struct rkey(()); - ///Marker type for the `repo` field - pub struct repo(()); } } @@ -289,10 +289,10 @@ impl<'a, S: put_record_state::State> PutRecordBuilder<'a, S> { impl<'a, S> PutRecordBuilder<'a, S> where S: put_record_state::State, + S::Repo: put_record_state::IsSet, S::Record: put_record_state::IsSet, S::Collection: put_record_state::IsSet, S::Rkey: put_record_state::IsSet, - S::Repo: put_record_state::IsSet, { /// Build the final struct pub fn build(self) -> PutRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/strong_ref.rs b/crates/weaver-api/src/com_atproto/repo/strong_ref.rs index dc0555c..9a034c1 100644 --- a/crates/weaver-api/src/com_atproto/repo/strong_ref.rs +++ b/crates/weaver-api/src/com_atproto/repo/strong_ref.rs @@ -33,37 +33,37 @@ pub mod strong_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = S::Cid; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; type Cid = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> StrongRefBuilder<'a, S> where S: strong_ref_state::State, - S::Uri: strong_ref_state::IsSet, S::Cid: strong_ref_state::IsSet, + S::Uri: strong_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> StrongRef<'a> { diff --git a/crates/weaver-api/src/com_atproto/server.rs b/crates/weaver-api/src/com_atproto/server.rs index a62e43f..e0f8716 100644 --- a/crates/weaver-api/src/com_atproto/server.rs +++ b/crates/weaver-api/src/com_atproto/server.rs @@ -66,127 +66,127 @@ pub mod invite_code_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Disabled; + type ForAccount; type CreatedBy; - type Uses; type CreatedAt; + type Uses; type Code; type Available; - type ForAccount; + type Disabled; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Disabled = Unset; + type ForAccount = Unset; type CreatedBy = Unset; - type Uses = Unset; type CreatedAt = Unset; + type Uses = Unset; type Code = Unset; type Available = Unset; - type ForAccount = Unset; + type Disabled = Unset; } - ///State transition - sets the `disabled` field to Set - pub struct SetDisabled(PhantomData S>); - impl sealed::Sealed for SetDisabled {} - impl State for SetDisabled { - type Disabled = Set; + ///State transition - sets the `for_account` field to Set + pub struct SetForAccount(PhantomData S>); + impl sealed::Sealed for SetForAccount {} + impl State for SetForAccount { + type ForAccount = Set; type CreatedBy = S::CreatedBy; - type Uses = S::Uses; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; type Code = S::Code; type Available = S::Available; - type ForAccount = S::ForAccount; + type Disabled = S::Disabled; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Disabled = S::Disabled; + type ForAccount = S::ForAccount; type CreatedBy = Set; - type Uses = S::Uses; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; type Code = S::Code; type Available = S::Available; - type ForAccount = S::ForAccount; - } - ///State transition - sets the `uses` field to Set - pub struct SetUses(PhantomData S>); - impl sealed::Sealed for SetUses {} - impl State for SetUses { type Disabled = S::Disabled; - type CreatedBy = S::CreatedBy; - type Uses = Set; - type CreatedAt = S::CreatedAt; - type Code = S::Code; - type Available = S::Available; - type ForAccount = S::ForAccount; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Disabled = S::Disabled; + type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - type Uses = S::Uses; type CreatedAt = Set; + type Uses = S::Uses; type Code = S::Code; type Available = S::Available; + type Disabled = S::Disabled; + } + ///State transition - sets the `uses` field to Set + pub struct SetUses(PhantomData S>); + impl sealed::Sealed for SetUses {} + impl State for SetUses { type ForAccount = S::ForAccount; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Uses = Set; + type Code = S::Code; + type Available = S::Available; + type Disabled = S::Disabled; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData S>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type Disabled = S::Disabled; + type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - type Uses = S::Uses; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; type Code = Set; type Available = S::Available; - type ForAccount = S::ForAccount; + type Disabled = S::Disabled; } ///State transition - sets the `available` field to Set pub struct SetAvailable(PhantomData S>); impl sealed::Sealed for SetAvailable {} impl State for SetAvailable { - type Disabled = S::Disabled; + type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - type Uses = S::Uses; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; type Code = S::Code; type Available = Set; - type ForAccount = S::ForAccount; - } - ///State transition - sets the `for_account` field to Set - pub struct SetForAccount(PhantomData S>); - impl sealed::Sealed for SetForAccount {} - impl State for SetForAccount { type Disabled = S::Disabled; + } + ///State transition - sets the `disabled` field to Set + pub struct SetDisabled(PhantomData S>); + impl sealed::Sealed for SetDisabled {} + impl State for SetDisabled { + type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - type Uses = S::Uses; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; type Code = S::Code; type Available = S::Available; - type ForAccount = Set; + type Disabled = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `disabled` field - pub struct disabled(()); + ///Marker type for the `for_account` field + pub struct for_account(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `uses` field - pub struct uses(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `uses` field + pub struct uses(()); ///Marker type for the `code` field pub struct code(()); ///Marker type for the `available` field pub struct available(()); - ///Marker type for the `for_account` field - pub struct for_account(()); + ///Marker type for the `disabled` field + pub struct disabled(()); } } @@ -359,13 +359,13 @@ where impl<'a, S> InviteCodeBuilder<'a, S> where S: invite_code_state::State, - S::Disabled: invite_code_state::IsSet, + S::ForAccount: invite_code_state::IsSet, S::CreatedBy: invite_code_state::IsSet, - S::Uses: invite_code_state::IsSet, S::CreatedAt: invite_code_state::IsSet, + S::Uses: invite_code_state::IsSet, S::Code: invite_code_state::IsSet, S::Available: invite_code_state::IsSet, - S::ForAccount: invite_code_state::IsSet, + S::Disabled: invite_code_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteCode<'a> { @@ -638,37 +638,37 @@ pub mod invite_code_use_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UsedBy; type UsedAt; + type UsedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UsedBy = Unset; type UsedAt = Unset; - } - ///State transition - sets the `used_by` field to Set - pub struct SetUsedBy(PhantomData S>); - impl sealed::Sealed for SetUsedBy {} - impl State for SetUsedBy { - type UsedBy = Set; - type UsedAt = S::UsedAt; + type UsedBy = Unset; } ///State transition - sets the `used_at` field to Set pub struct SetUsedAt(PhantomData S>); impl sealed::Sealed for SetUsedAt {} impl State for SetUsedAt { - type UsedBy = S::UsedBy; type UsedAt = Set; + type UsedBy = S::UsedBy; + } + ///State transition - sets the `used_by` field to Set + pub struct SetUsedBy(PhantomData S>); + impl sealed::Sealed for SetUsedBy {} + impl State for SetUsedBy { + type UsedAt = S::UsedAt; + type UsedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `used_by` field - pub struct used_by(()); ///Marker type for the `used_at` field pub struct used_at(()); + ///Marker type for the `used_by` field + pub struct used_by(()); } } @@ -741,8 +741,8 @@ where impl<'a, S> InviteCodeUseBuilder<'a, S> where S: invite_code_use_state::State, - S::UsedBy: invite_code_use_state::IsSet, S::UsedAt: invite_code_use_state::IsSet, + S::UsedBy: invite_code_use_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteCodeUse<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/create_app_password.rs b/crates/weaver-api/src/com_atproto/server/create_app_password.rs index aa77ef4..9796b09 100644 --- a/crates/weaver-api/src/com_atproto/server/create_app_password.rs +++ b/crates/weaver-api/src/com_atproto/server/create_app_password.rs @@ -36,51 +36,51 @@ pub mod app_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Name; type Password; + type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type Name = Unset; type Password = Unset; + type Name = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `password` field to Set + pub struct SetPassword(PhantomData S>); + impl sealed::Sealed for SetPassword {} + impl State for SetPassword { + type Password = Set; type Name = S::Name; - type Password = S::Password; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = S::CreatedAt; - type Name = Set; type Password = S::Password; - } - ///State transition - sets the `password` field to Set - pub struct SetPassword(PhantomData S>); - impl sealed::Sealed for SetPassword {} - impl State for SetPassword { + type Name = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Password = S::Password; type Name = S::Name; - type Password = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `password` field pub struct password(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -187,9 +187,9 @@ impl<'a, S: app_password_state::State> AppPasswordBuilder<'a, S> { impl<'a, S> AppPasswordBuilder<'a, S> where S: app_password_state::State, - S::CreatedAt: app_password_state::IsSet, - S::Name: app_password_state::IsSet, S::Password: app_password_state::IsSet, + S::Name: app_password_state::IsSet, + S::CreatedAt: app_password_state::IsSet, { /// Build the final struct pub fn build(self) -> AppPassword<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs b/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs index a9b68c2..829d545 100644 --- a/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs +++ b/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs @@ -33,37 +33,37 @@ pub mod account_codes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Codes; type Account; + type Codes; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Codes = Unset; type Account = Unset; - } - ///State transition - sets the `codes` field to Set - pub struct SetCodes(PhantomData S>); - impl sealed::Sealed for SetCodes {} - impl State for SetCodes { - type Codes = Set; - type Account = S::Account; + type Codes = Unset; } ///State transition - sets the `account` field to Set pub struct SetAccount(PhantomData S>); impl sealed::Sealed for SetAccount {} impl State for SetAccount { - type Codes = S::Codes; type Account = Set; + type Codes = S::Codes; + } + ///State transition - sets the `codes` field to Set + pub struct SetCodes(PhantomData S>); + impl sealed::Sealed for SetCodes {} + impl State for SetCodes { + type Account = S::Account; + type Codes = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `codes` field - pub struct codes(()); ///Marker type for the `account` field pub struct account(()); + ///Marker type for the `codes` field + pub struct codes(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> AccountCodesBuilder<'a, S> where S: account_codes_state::State, - S::Codes: account_codes_state::IsSet, S::Account: account_codes_state::IsSet, + S::Codes: account_codes_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountCodes<'a> { @@ -361,37 +361,37 @@ pub mod create_invite_codes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CodeCount; type UseCount; + type CodeCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CodeCount = Unset; type UseCount = Unset; - } - ///State transition - sets the `code_count` field to Set - pub struct SetCodeCount(PhantomData S>); - impl sealed::Sealed for SetCodeCount {} - impl State for SetCodeCount { - type CodeCount = Set; - type UseCount = S::UseCount; + type CodeCount = Unset; } ///State transition - sets the `use_count` field to Set pub struct SetUseCount(PhantomData S>); impl sealed::Sealed for SetUseCount {} impl State for SetUseCount { - type CodeCount = S::CodeCount; type UseCount = Set; + type CodeCount = S::CodeCount; + } + ///State transition - sets the `code_count` field to Set + pub struct SetCodeCount(PhantomData S>); + impl sealed::Sealed for SetCodeCount {} + impl State for SetCodeCount { + type UseCount = S::UseCount; + type CodeCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `code_count` field - pub struct code_count(()); ///Marker type for the `use_count` field pub struct use_count(()); + ///Marker type for the `code_count` field + pub struct code_count(()); } } @@ -484,8 +484,8 @@ where impl<'a, S> CreateInviteCodesBuilder<'a, S> where S: create_invite_codes_state::State, - S::CodeCount: create_invite_codes_state::IsSet, S::UseCount: create_invite_codes_state::IsSet, + S::CodeCount: create_invite_codes_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateInviteCodes<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/delete_account.rs b/crates/weaver-api/src/com_atproto/server/delete_account.rs index 9805d89..621258d 100644 --- a/crates/weaver-api/src/com_atproto/server/delete_account.rs +++ b/crates/weaver-api/src/com_atproto/server/delete_account.rs @@ -35,51 +35,51 @@ pub mod delete_account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Token; type Did; type Password; - type Token; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Token = Unset; type Did = Unset; type Password = Unset; - type Token = Unset; + } + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData S>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Token = Set; + type Did = S::Did; + type Password = S::Password; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type Token = S::Token; type Did = Set; type Password = S::Password; - type Token = S::Token; } ///State transition - sets the `password` field to Set pub struct SetPassword(PhantomData S>); impl sealed::Sealed for SetPassword {} impl State for SetPassword { - type Did = S::Did; - type Password = Set; type Token = S::Token; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData S>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { type Did = S::Did; - type Password = S::Password; - type Token = Set; + type Password = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `token` field + pub struct token(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `password` field pub struct password(()); - ///Marker type for the `token` field - pub struct token(()); } } @@ -172,9 +172,9 @@ where impl<'a, S> DeleteAccountBuilder<'a, S> where S: delete_account_state::State, + S::Token: delete_account_state::IsSet, S::Did: delete_account_state::IsSet, S::Password: delete_account_state::IsSet, - S::Token: delete_account_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteAccount<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_blob.rs b/crates/weaver-api/src/com_atproto/sync/get_blob.rs index 549b7a1..e7c670d 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_blob.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_blob.rs @@ -32,37 +32,37 @@ pub mod get_blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Cid; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Cid = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Cid = S::Cid; + type Did = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Did = S::Did; type Cid = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Cid = S::Cid; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetBlobBuilder<'a, S> where S: get_blob_state::State, - S::Did: get_blob_state::IsSet, S::Cid: get_blob_state::IsSet, + S::Did: get_blob_state::IsSet, { /// Build the final struct pub fn build(self) -> GetBlob<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_record.rs b/crates/weaver-api/src/com_atproto/sync/get_record.rs index 03e0cca..415a6f2 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_record.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_record.rs @@ -36,51 +36,51 @@ pub mod get_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Did; type Rkey; type Collection; - type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Did = Unset; type Rkey = Unset; type Collection = Unset; - type Did = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; + type Rkey = S::Rkey; + type Collection = S::Collection; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { + type Did = S::Did; type Rkey = Set; type Collection = S::Collection; - type Did = S::Did; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Rkey = S::Rkey; - type Collection = Set; type Did = S::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type Rkey = S::Rkey; - type Collection = S::Collection; - type Did = Set; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `rkey` field pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); - ///Marker type for the `did` field - pub struct did(()); } } @@ -181,9 +181,9 @@ where impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, + S::Did: get_record_state::IsSet, S::Rkey: get_record_state::IsSet, S::Collection: get_record_state::IsSet, - S::Did: get_record_state::IsSet, { /// Build the final struct pub fn build(self) -> GetRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs index 650410a..c44d0d9 100644 --- a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs @@ -40,67 +40,67 @@ pub mod account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; - type Active; type Did; type Time; + type Seq; + type Active; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Seq = Unset; - type Active = Unset; type Did = Unset; type Time = Unset; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { - type Seq = Set; - type Active = S::Active; - type Did = S::Did; - type Time = S::Time; - } - ///State transition - sets the `active` field to Set - pub struct SetActive(PhantomData S>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { - type Seq = S::Seq; - type Active = Set; - type Did = S::Did; - type Time = S::Time; + type Seq = Unset; + type Active = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Seq = S::Seq; - type Active = S::Active; type Did = Set; type Time = S::Time; + type Seq = S::Seq; + type Active = S::Active; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); impl sealed::Sealed for SetTime {} impl State for SetTime { + type Did = S::Did; + type Time = Set; type Seq = S::Seq; type Active = S::Active; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { type Did = S::Did; - type Time = Set; + type Time = S::Time; + type Seq = Set; + type Active = S::Active; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData S>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Did = S::Did; + type Time = S::Time; + type Seq = S::Seq; + type Active = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `seq` field - pub struct seq(()); - ///Marker type for the `active` field - pub struct active(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `time` field pub struct time(()); + ///Marker type for the `seq` field + pub struct seq(()); + ///Marker type for the `active` field + pub struct active(()); } } @@ -230,10 +230,10 @@ where impl<'a, S> AccountBuilder<'a, S> where S: account_state::State, - S::Seq: account_state::IsSet, - S::Active: account_state::IsSet, S::Did: account_state::IsSet, S::Time: account_state::IsSet, + S::Seq: account_state::IsSet, + S::Active: account_state::IsSet, { /// Build the final struct pub fn build(self) -> Account<'a> { @@ -967,205 +967,205 @@ pub mod commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; - type TooBig; - type Ops; - type Blobs; - type Blocks; - type Rev; type Time; type Rebase; type Repo; + type Blocks; + type Seq; type Commit; + type Blobs; + type Ops; + type Rev; + type TooBig; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Seq = Unset; - type TooBig = Unset; - type Ops = Unset; - type Blobs = Unset; - type Blocks = Unset; - type Rev = Unset; type Time = Unset; type Rebase = Unset; type Repo = Unset; + type Blocks = Unset; + type Seq = Unset; type Commit = Unset; + type Blobs = Unset; + type Ops = Unset; + type Rev = Unset; + type TooBig = Unset; } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { - type Seq = Set; - type TooBig = S::TooBig; - type Ops = S::Ops; - type Blobs = S::Blobs; - type Blocks = S::Blocks; - type Rev = S::Rev; - type Time = S::Time; + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Time = Set; type Rebase = S::Rebase; type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `too_big` field to Set - pub struct SetTooBig(PhantomData S>); - impl sealed::Sealed for SetTooBig {} - impl State for SetTooBig { + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = Set; - type Ops = S::Ops; + type Commit = S::Commit; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Ops = S::Ops; type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `rebase` field to Set + pub struct SetRebase(PhantomData S>); + impl sealed::Sealed for SetRebase {} + impl State for SetRebase { type Time = S::Time; - type Rebase = S::Rebase; + type Rebase = Set; type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `ops` field to Set - pub struct SetOps(PhantomData S>); - impl sealed::Sealed for SetOps {} - impl State for SetOps { + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = Set; + type Commit = S::Commit; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Ops = S::Ops; type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { type Time = S::Time; type Rebase = S::Rebase; - type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `blobs` field to Set - pub struct SetBlobs(PhantomData S>); - impl sealed::Sealed for SetBlobs {} - impl State for SetBlobs { + type Repo = Set; + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; + type Commit = S::Commit; + type Blobs = S::Blobs; type Ops = S::Ops; - type Blobs = Set; - type Blocks = S::Blocks; type Rev = S::Rev; - type Time = S::Time; - type Rebase = S::Rebase; - type Repo = S::Repo; - type Commit = S::Commit; + type TooBig = S::TooBig; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData S>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { + type Time = S::Time; + type Rebase = S::Rebase; + type Repo = S::Repo; + type Blocks = Set; type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = S::Ops; + type Commit = S::Commit; type Blobs = S::Blobs; - type Blocks = Set; + type Ops = S::Ops; type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { type Time = S::Time; type Rebase = S::Rebase; type Repo = S::Repo; + type Blocks = S::Blocks; + type Seq = Set; type Commit = S::Commit; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { - type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = S::Ops; type Blobs = S::Blobs; - type Blocks = S::Blocks; - type Rev = Set; + type Ops = S::Ops; + type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `commit` field to Set + pub struct SetCommit(PhantomData S>); + impl sealed::Sealed for SetCommit {} + impl State for SetCommit { type Time = S::Time; type Rebase = S::Rebase; type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = S::Ops; + type Commit = Set; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Ops = S::Ops; type Rev = S::Rev; - type Time = Set; + type TooBig = S::TooBig; + } + ///State transition - sets the `blobs` field to Set + pub struct SetBlobs(PhantomData S>); + impl sealed::Sealed for SetBlobs {} + impl State for SetBlobs { + type Time = S::Time; type Rebase = S::Rebase; type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `rebase` field to Set - pub struct SetRebase(PhantomData S>); - impl sealed::Sealed for SetRebase {} - impl State for SetRebase { + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; + type Commit = S::Commit; + type Blobs = Set; type Ops = S::Ops; - type Blobs = S::Blobs; - type Blocks = S::Blocks; type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `ops` field to Set + pub struct SetOps(PhantomData S>); + impl sealed::Sealed for SetOps {} + impl State for SetOps { type Time = S::Time; - type Rebase = Set; + type Rebase = S::Rebase; type Repo = S::Repo; - type Commit = S::Commit; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = S::Ops; + type Commit = S::Commit; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Ops = Set; type Rev = S::Rev; + type TooBig = S::TooBig; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { type Time = S::Time; type Rebase = S::Rebase; - type Repo = Set; - type Commit = S::Commit; - } - ///State transition - sets the `commit` field to Set - pub struct SetCommit(PhantomData S>); - impl sealed::Sealed for SetCommit {} - impl State for SetCommit { + type Repo = S::Repo; + type Blocks = S::Blocks; type Seq = S::Seq; - type TooBig = S::TooBig; - type Ops = S::Ops; + type Commit = S::Commit; type Blobs = S::Blobs; - type Blocks = S::Blocks; - type Rev = S::Rev; + type Ops = S::Ops; + type Rev = Set; + type TooBig = S::TooBig; + } + ///State transition - sets the `too_big` field to Set + pub struct SetTooBig(PhantomData S>); + impl sealed::Sealed for SetTooBig {} + impl State for SetTooBig { type Time = S::Time; type Rebase = S::Rebase; type Repo = S::Repo; - type Commit = Set; + type Blocks = S::Blocks; + type Seq = S::Seq; + type Commit = S::Commit; + type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = S::Rev; + type TooBig = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `seq` field - pub struct seq(()); - ///Marker type for the `too_big` field - pub struct too_big(()); - ///Marker type for the `ops` field - pub struct ops(()); - ///Marker type for the `blobs` field - pub struct blobs(()); - ///Marker type for the `blocks` field - pub struct blocks(()); - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `time` field pub struct time(()); ///Marker type for the `rebase` field pub struct rebase(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `blocks` field + pub struct blocks(()); + ///Marker type for the `seq` field + pub struct seq(()); ///Marker type for the `commit` field pub struct commit(()); + ///Marker type for the `blobs` field + pub struct blobs(()); + ///Marker type for the `ops` field + pub struct ops(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `too_big` field + pub struct too_big(()); } } @@ -1453,16 +1453,16 @@ where impl<'a, S> CommitBuilder<'a, S> where S: commit_state::State, - S::Seq: commit_state::IsSet, - S::TooBig: commit_state::IsSet, - S::Ops: commit_state::IsSet, - S::Blobs: commit_state::IsSet, - S::Blocks: commit_state::IsSet, - S::Rev: commit_state::IsSet, S::Time: commit_state::IsSet, S::Rebase: commit_state::IsSet, S::Repo: commit_state::IsSet, + S::Blocks: commit_state::IsSet, + S::Seq: commit_state::IsSet, S::Commit: commit_state::IsSet, + S::Blobs: commit_state::IsSet, + S::Ops: commit_state::IsSet, + S::Rev: commit_state::IsSet, + S::TooBig: commit_state::IsSet, { /// Build the final struct pub fn build(self) -> Commit<'a> { @@ -1571,51 +1571,51 @@ pub mod identity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Time; type Seq; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Time = Unset; type Seq = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Time = S::Time; - type Seq = S::Seq; + type Did = Unset; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); impl sealed::Sealed for SetTime {} impl State for SetTime { - type Did = S::Did; type Time = Set; type Seq = S::Seq; + type Did = S::Did; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { - type Did = S::Did; type Time = S::Time; type Seq = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Time = S::Time; + type Seq = S::Seq; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `time` field pub struct time(()); ///Marker type for the `seq` field pub struct seq(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -1728,9 +1728,9 @@ where impl<'a, S> IdentityBuilder<'a, S> where S: identity_state::State, - S::Did: identity_state::IsSet, S::Time: identity_state::IsSet, S::Seq: identity_state::IsSet, + S::Did: identity_state::IsSet, { /// Build the final struct pub fn build(self) -> Identity<'a> { @@ -2300,8 +2300,8 @@ pub mod sync_state { type Rev; type Time; type Seq; - type Did; type Blocks; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -2310,8 +2310,8 @@ pub mod sync_state { type Rev = Unset; type Time = Unset; type Seq = Unset; - type Did = Unset; type Blocks = Unset; + type Did = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); @@ -2320,8 +2320,8 @@ pub mod sync_state { type Rev = Set; type Time = S::Time; type Seq = S::Seq; - type Did = S::Did; type Blocks = S::Blocks; + type Did = S::Did; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); @@ -2330,8 +2330,8 @@ pub mod sync_state { type Rev = S::Rev; type Time = Set; type Seq = S::Seq; - type Did = S::Did; type Blocks = S::Blocks; + type Did = S::Did; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); @@ -2340,18 +2340,8 @@ pub mod sync_state { type Rev = S::Rev; type Time = S::Time; type Seq = Set; - type Did = S::Did; - type Blocks = S::Blocks; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Rev = S::Rev; - type Time = S::Time; - type Seq = S::Seq; - type Did = Set; type Blocks = S::Blocks; + type Did = S::Did; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData S>); @@ -2360,8 +2350,18 @@ pub mod sync_state { type Rev = S::Rev; type Time = S::Time; type Seq = S::Seq; - type Did = S::Did; type Blocks = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Rev = S::Rev; + type Time = S::Time; + type Seq = S::Seq; + type Blocks = S::Blocks; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -2372,10 +2372,10 @@ pub mod sync_state { pub struct time(()); ///Marker type for the `seq` field pub struct seq(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `blocks` field pub struct blocks(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -2511,8 +2511,8 @@ where S::Rev: sync_state::IsSet, S::Time: sync_state::IsSet, S::Seq: sync_state::IsSet, - S::Did: sync_state::IsSet, S::Blocks: sync_state::IsSet, + S::Did: sync_state::IsSet, { /// Build the final struct pub fn build(self) -> Sync<'a> { diff --git a/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs b/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs index 3a09b2d..6590cd1 100644 --- a/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs +++ b/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs @@ -692,37 +692,37 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Method; type Handle; + type Method; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Method = Unset; type Handle = Unset; - } - ///State transition - sets the `method` field to Set - pub struct SetMethod(PhantomData S>); - impl sealed::Sealed for SetMethod {} - impl State for SetMethod { - type Method = Set; - type Handle = S::Handle; + type Method = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Method = S::Method; type Handle = Set; + type Method = S::Method; + } + ///State transition - sets the `method` field to Set + pub struct SetMethod(PhantomData S>); + impl sealed::Sealed for SetMethod {} + impl State for SetMethod { + type Handle = S::Handle; + type Method = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `method` field - pub struct method(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `method` field + pub struct method(()); } } @@ -795,8 +795,8 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, - S::Method: suggestion_state::IsSet, S::Handle: suggestion_state::IsSet, + S::Method: suggestion_state::IsSet, { /// Build the final struct pub fn build(self) -> Suggestion<'a> { diff --git a/crates/weaver-api/src/sh_weaver/actor.rs b/crates/weaver-api/src/sh_weaver/actor.rs index bc114f0..c1f7bcd 100644 --- a/crates/weaver-api/src/sh_weaver/actor.rs +++ b/crates/weaver-api/src/sh_weaver/actor.rs @@ -1962,37 +1962,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Did; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Did = Unset; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = S::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Did = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -2185,8 +2185,8 @@ impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, - S::Handle: profile_view_basic_state::IsSet, S::Did: profile_view_basic_state::IsSet, + S::Handle: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab.rs b/crates/weaver-api/src/sh_weaver/collab.rs index 75c6cda..643082f 100644 --- a/crates/weaver-api/src/sh_weaver/collab.rs +++ b/crates/weaver-api/src/sh_weaver/collab.rs @@ -7,6 +7,7 @@ pub mod accept; pub mod invite; +pub mod session; /// Collaboration scoped to a chapter. #[derive( diff --git a/crates/weaver-api/src/sh_weaver/collab/invite.rs b/crates/weaver-api/src/sh_weaver/collab/invite.rs index ec74351..b5a4a05 100644 --- a/crates/weaver-api/src/sh_weaver/collab/invite.rs +++ b/crates/weaver-api/src/sh_weaver/collab/invite.rs @@ -134,49 +134,49 @@ pub mod invite_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Resource; + type CreatedAt; type Invitee; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Resource = Unset; + type CreatedAt = Unset; type Invitee = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Resource = S::Resource; - type Invitee = S::Invitee; - } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type CreatedAt = S::CreatedAt; type Resource = Set; + type CreatedAt = S::CreatedAt; + type Invitee = S::Invitee; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Resource = S::Resource; + type CreatedAt = Set; type Invitee = S::Invitee; } ///State transition - sets the `invitee` field to Set pub struct SetInvitee(PhantomData S>); impl sealed::Sealed for SetInvitee {} impl State for SetInvitee { - type CreatedAt = S::CreatedAt; type Resource = S::Resource; + type CreatedAt = S::CreatedAt; type Invitee = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `resource` field pub struct resource(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `invitee` field pub struct invitee(()); } @@ -328,8 +328,8 @@ impl<'a, S: invite_state::State> InviteBuilder<'a, S> { impl<'a, S> InviteBuilder<'a, S> where S: invite_state::State, - S::CreatedAt: invite_state::IsSet, S::Resource: invite_state::IsSet, + S::CreatedAt: invite_state::IsSet, S::Invitee: invite_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/collab/session.rs b/crates/weaver-api/src/sh_weaver/collab/session.rs new file mode 100644 index 0000000..f1b894d --- /dev/null +++ b/crates/weaver-api/src/sh_weaver/collab/session.rs @@ -0,0 +1,471 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.weaver.collab.session +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +/// Active real-time collaboration session. Published when joining a collaborative editing session, deleted on disconnect. +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct Session<'a> { + pub created_at: jacquard_common::types::string::Datetime, + /// Session TTL. Should be refreshed periodically while active. + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub expires_at: std::option::Option, + /// iroh NodeId in z-base32 encoding for P2P connection. + #[serde(borrow)] + pub node_id: jacquard_common::CowStr<'a>, + /// DERP relay URL if using relay-only mode (browser clients). + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub relay_url: std::option::Option>, + /// The resource being collaboratively edited. + #[serde(borrow)] + pub resource: crate::com_atproto::repo::strong_ref::StrongRef<'a>, +} + +pub mod session_state { + + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; + #[allow(unused)] + use ::core::marker::PhantomData; + mod sealed { + pub trait Sealed {} + } + /// State trait tracking which required fields have been set + pub trait State: sealed::Sealed { + type CreatedAt; + type Resource; + type NodeId; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type CreatedAt = Unset; + type Resource = Unset; + type NodeId = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Resource = S::Resource; + type NodeId = S::NodeId; + } + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData S>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type CreatedAt = S::CreatedAt; + type Resource = Set; + type NodeId = S::NodeId; + } + ///State transition - sets the `node_id` field to Set + pub struct SetNodeId(PhantomData S>); + impl sealed::Sealed for SetNodeId {} + impl State for SetNodeId { + type CreatedAt = S::CreatedAt; + type Resource = S::Resource; + type NodeId = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `resource` field + pub struct resource(()); + ///Marker type for the `node_id` field + pub struct node_id(()); + } +} + +/// Builder for constructing an instance of this type +pub struct SessionBuilder<'a, S: session_state::State> { + _phantom_state: ::core::marker::PhantomData S>, + __unsafe_private_named: ( + ::core::option::Option, + ::core::option::Option, + ::core::option::Option>, + ::core::option::Option>, + ::core::option::Option>, + ), + _phantom: ::core::marker::PhantomData<&'a ()>, +} + +impl<'a> Session<'a> { + /// Create a new builder for this type + pub fn new() -> SessionBuilder<'a, session_state::Empty> { + SessionBuilder::new() + } +} + +impl<'a> SessionBuilder<'a, session_state::Empty> { + /// Create a new builder with all fields unset + pub fn new() -> Self { + SessionBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: (None, None, None, None, None), + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> SessionBuilder<'a, S> +where + S: session_state::State, + S::CreatedAt: session_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> SessionBuilder<'a, session_state::SetCreatedAt> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); + SessionBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S: session_state::State> SessionBuilder<'a, S> { + /// Set the `expiresAt` field (optional) + pub fn expires_at( + mut self, + value: impl Into>, + ) -> Self { + self.__unsafe_private_named.1 = value.into(); + self + } + /// Set the `expiresAt` field to an Option value (optional) + pub fn maybe_expires_at( + mut self, + value: Option, + ) -> Self { + self.__unsafe_private_named.1 = value; + self + } +} + +impl<'a, S> SessionBuilder<'a, S> +where + S: session_state::State, + S::NodeId: session_state::IsUnset, +{ + /// Set the `nodeId` field (required) + pub fn node_id( + mut self, + value: impl Into>, + ) -> SessionBuilder<'a, session_state::SetNodeId> { + self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); + SessionBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S: session_state::State> SessionBuilder<'a, S> { + /// Set the `relayUrl` field (optional) + pub fn relay_url( + mut self, + value: impl Into>>, + ) -> Self { + self.__unsafe_private_named.3 = value.into(); + self + } + /// Set the `relayUrl` field to an Option value (optional) + pub fn maybe_relay_url( + mut self, + value: Option>, + ) -> Self { + self.__unsafe_private_named.3 = value; + self + } +} + +impl<'a, S> SessionBuilder<'a, S> +where + S: session_state::State, + S::Resource: session_state::IsUnset, +{ + /// Set the `resource` field (required) + pub fn resource( + mut self, + value: impl Into>, + ) -> SessionBuilder<'a, session_state::SetResource> { + self.__unsafe_private_named.4 = ::core::option::Option::Some(value.into()); + SessionBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> SessionBuilder<'a, S> +where + S: session_state::State, + S::CreatedAt: session_state::IsSet, + S::Resource: session_state::IsSet, + S::NodeId: session_state::IsSet, +{ + /// Build the final struct + pub fn build(self) -> Session<'a> { + Session { + created_at: self.__unsafe_private_named.0.unwrap(), + expires_at: self.__unsafe_private_named.1, + node_id: self.__unsafe_private_named.2.unwrap(), + relay_url: self.__unsafe_private_named.3, + resource: self.__unsafe_private_named.4.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data + pub fn build_with_data( + self, + extra_data: std::collections::BTreeMap< + jacquard_common::smol_str::SmolStr, + jacquard_common::types::value::Data<'a>, + >, + ) -> Session<'a> { + Session { + created_at: self.__unsafe_private_named.0.unwrap(), + expires_at: self.__unsafe_private_named.1, + node_id: self.__unsafe_private_named.2.unwrap(), + relay_url: self.__unsafe_private_named.3, + resource: self.__unsafe_private_named.4.unwrap(), + extra_data: Some(extra_data), + } + } +} + +impl<'a> Session<'a> { + pub fn uri( + uri: impl Into>, + ) -> Result< + jacquard_common::types::uri::RecordUri<'a, SessionRecord>, + jacquard_common::types::uri::UriError, + > { + jacquard_common::types::uri::RecordUri::try_from_uri( + jacquard_common::types::string::AtUri::new_cow(uri.into())?, + ) + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct SessionGetRecordOutput<'a> { + #[serde(skip_serializing_if = "std::option::Option::is_none")] + #[serde(borrow)] + pub cid: std::option::Option>, + #[serde(borrow)] + pub uri: jacquard_common::types::string::AtUri<'a>, + #[serde(borrow)] + pub value: Session<'a>, +} + +impl From> for Session<'_> { + fn from(output: SessionGetRecordOutput<'_>) -> Self { + use jacquard_common::IntoStatic; + output.value.into_static() + } +} + +impl jacquard_common::types::collection::Collection for Session<'_> { + const NSID: &'static str = "sh.weaver.collab.session"; + type Record = SessionRecord; +} + +/// Marker type for deserializing records from this collection. +#[derive(Debug, serde::Serialize, serde::Deserialize)] +pub struct SessionRecord; +impl jacquard_common::xrpc::XrpcResp for SessionRecord { + const NSID: &'static str = "sh.weaver.collab.session"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = SessionGetRecordOutput<'de>; + type Err<'de> = jacquard_common::types::collection::RecordError<'de>; +} + +impl jacquard_common::types::collection::Collection for SessionRecord { + const NSID: &'static str = "sh.weaver.collab.session"; + type Record = SessionRecord; +} + +impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Session<'a> { + fn nsid() -> &'static str { + "sh.weaver.collab.session" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { + lexicon_doc_sh_weaver_collab_session() + } + fn validate( + &self, + ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { + Ok(()) + } +} + +fn lexicon_doc_sh_weaver_collab_session() -> ::jacquard_lexicon::lexicon::LexiconDoc< + 'static, +> { + ::jacquard_lexicon::lexicon::LexiconDoc { + lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, + id: ::jacquard_common::CowStr::new_static("sh.weaver.collab.session"), + revision: None, + description: None, + defs: { + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("main"), + ::jacquard_lexicon::lexicon::LexUserType::Record(::jacquard_lexicon::lexicon::LexRecord { + description: Some( + ::jacquard_common::CowStr::new_static( + "Active real-time collaboration session. Published when joining a collaborative editing session, deleted on disconnect.", + ), + ), + key: Some(::jacquard_common::CowStr::new_static("tid")), + record: ::jacquard_lexicon::lexicon::LexRecordRecord::Object(::jacquard_lexicon::lexicon::LexObject { + description: None, + required: Some( + vec![ + ::jacquard_common::smol_str::SmolStr::new_static("resource"), + ::jacquard_common::smol_str::SmolStr::new_static("nodeId"), + ::jacquard_common::smol_str::SmolStr::new_static("createdAt") + ], + ), + nullable: None, + properties: { + #[allow(unused_mut)] + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "createdAt", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: None, + format: Some( + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, + ), + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "expiresAt", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: Some( + ::jacquard_common::CowStr::new_static( + "Session TTL. Should be refreshed periodically while active.", + ), + ), + format: Some( + ::jacquard_lexicon::lexicon::LexStringFormat::Datetime, + ), + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("nodeId"), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: Some( + ::jacquard_common::CowStr::new_static( + "iroh NodeId in z-base32 encoding for P2P connection.", + ), + ), + format: None, + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "relayUrl", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: Some( + ::jacquard_common::CowStr::new_static( + "DERP relay URL if using relay-only mode (browser clients).", + ), + ), + format: Some( + ::jacquard_lexicon::lexicon::LexStringFormat::Uri, + ), + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static( + "resource", + ), + ::jacquard_lexicon::lexicon::LexObjectProperty::Ref(::jacquard_lexicon::lexicon::LexRef { + description: None, + r#ref: ::jacquard_common::CowStr::new_static( + "com.atproto.repo.strongRef", + ), + }), + ); + map + }, + }), + }), + ); + map + }, + } +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/edit/cursor.rs b/crates/weaver-api/src/sh_weaver/edit/cursor.rs index 00f070f..3fec0e8 100644 --- a/crates/weaver-api/src/sh_weaver/edit/cursor.rs +++ b/crates/weaver-api/src/sh_weaver/edit/cursor.rs @@ -586,37 +586,37 @@ pub mod id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Peer; type Counter; + type Peer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Peer = Unset; type Counter = Unset; - } - ///State transition - sets the `peer` field to Set - pub struct SetPeer(PhantomData S>); - impl sealed::Sealed for SetPeer {} - impl State for SetPeer { - type Peer = Set; - type Counter = S::Counter; + type Peer = Unset; } ///State transition - sets the `counter` field to Set pub struct SetCounter(PhantomData S>); impl sealed::Sealed for SetCounter {} impl State for SetCounter { - type Peer = S::Peer; type Counter = Set; + type Peer = S::Peer; + } + ///State transition - sets the `peer` field to Set + pub struct SetPeer(PhantomData S>); + impl sealed::Sealed for SetPeer {} + impl State for SetPeer { + type Counter = S::Counter; + type Peer = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `peer` field - pub struct peer(()); ///Marker type for the `counter` field pub struct counter(()); + ///Marker type for the `peer` field + pub struct peer(()); } } @@ -683,8 +683,8 @@ where impl<'a, S> IdBuilder<'a, S> where S: id_state::State, - S::Peer: id_state::IsSet, S::Counter: id_state::IsSet, + S::Peer: id_state::IsSet, { /// Build the final struct pub fn build(self) -> Id<'a> { @@ -1017,51 +1017,51 @@ pub mod normal_container_id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Counter; - type Peer; type ContainerType; + type Peer; + type Counter; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Counter = Unset; - type Peer = Unset; type ContainerType = Unset; + type Peer = Unset; + type Counter = Unset; } - ///State transition - sets the `counter` field to Set - pub struct SetCounter(PhantomData S>); - impl sealed::Sealed for SetCounter {} - impl State for SetCounter { - type Counter = Set; + ///State transition - sets the `container_type` field to Set + pub struct SetContainerType(PhantomData S>); + impl sealed::Sealed for SetContainerType {} + impl State for SetContainerType { + type ContainerType = Set; type Peer = S::Peer; - type ContainerType = S::ContainerType; + type Counter = S::Counter; } ///State transition - sets the `peer` field to Set pub struct SetPeer(PhantomData S>); impl sealed::Sealed for SetPeer {} impl State for SetPeer { - type Counter = S::Counter; - type Peer = Set; type ContainerType = S::ContainerType; - } - ///State transition - sets the `container_type` field to Set - pub struct SetContainerType(PhantomData S>); - impl sealed::Sealed for SetContainerType {} - impl State for SetContainerType { + type Peer = Set; type Counter = S::Counter; + } + ///State transition - sets the `counter` field to Set + pub struct SetCounter(PhantomData S>); + impl sealed::Sealed for SetCounter {} + impl State for SetCounter { + type ContainerType = S::ContainerType; type Peer = S::Peer; - type ContainerType = Set; + type Counter = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `counter` field - pub struct counter(()); - ///Marker type for the `peer` field - pub struct peer(()); ///Marker type for the `container_type` field pub struct container_type(()); + ///Marker type for the `peer` field + pub struct peer(()); + ///Marker type for the `counter` field + pub struct counter(()); } } @@ -1154,9 +1154,9 @@ where impl<'a, S> NormalContainerIdBuilder<'a, S> where S: normal_container_id_state::State, - S::Counter: normal_container_id_state::IsSet, - S::Peer: normal_container_id_state::IsSet, S::ContainerType: normal_container_id_state::IsSet, + S::Peer: normal_container_id_state::IsSet, + S::Counter: normal_container_id_state::IsSet, { /// Build the final struct pub fn build(self) -> NormalContainerId<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/diff.rs b/crates/weaver-api/src/sh_weaver/edit/diff.rs index fcd059f..52a4bdb 100644 --- a/crates/weaver-api/src/sh_weaver/edit/diff.rs +++ b/crates/weaver-api/src/sh_weaver/edit/diff.rs @@ -8,7 +8,13 @@ /// An edit record for a notebook. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Diff<'a> { @@ -33,7 +39,7 @@ pub struct Diff<'a> { pub mod diff_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -41,37 +47,37 @@ pub mod diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Doc; type Root; + type Doc; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Doc = Unset; type Root = Unset; - } - ///State transition - sets the `doc` field to Set - pub struct SetDoc(PhantomData S>); - impl sealed::Sealed for SetDoc {} - impl State for SetDoc { - type Doc = Set; - type Root = S::Root; + type Doc = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData S>); impl sealed::Sealed for SetRoot {} impl State for SetRoot { - type Doc = S::Doc; type Root = Set; + type Doc = S::Doc; + } + ///State transition - sets the `doc` field to Set + pub struct SetDoc(PhantomData S>); + impl sealed::Sealed for SetDoc {} + impl State for SetDoc { + type Root = S::Root; + type Doc = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `doc` field - pub struct doc(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `doc` field + pub struct doc(()); } } @@ -218,8 +224,8 @@ impl<'a, S: diff_state::State> DiffBuilder<'a, S> { impl<'a, S> DiffBuilder<'a, S> where S: diff_state::State, - S::Doc: diff_state::IsSet, S::Root: diff_state::IsSet, + S::Doc: diff_state::IsSet, { /// Build the final struct pub fn build(self) -> Diff<'a> { @@ -268,7 +274,13 @@ impl<'a> Diff<'a> { /// Typed wrapper for GetRecord response with this collection's record type. #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct DiffGetRecordOutput<'a> { @@ -325,7 +337,9 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Diff<'a> { } } -fn lexicon_doc_sh_weaver_edit_diff() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> { +fn lexicon_doc_sh_weaver_edit_diff() -> ::jacquard_lexicon::lexicon::LexiconDoc< + 'static, +> { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("sh.weaver.edit.diff"), @@ -428,4 +442,4 @@ fn lexicon_doc_sh_weaver_edit_diff() -> ::jacquard_lexicon::lexicon::LexiconDoc< map }, } -} +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/embed.rs b/crates/weaver-api/src/sh_weaver/embed.rs index c63b4e7..f1389d2 100644 --- a/crates/weaver-api/src/sh_weaver/embed.rs +++ b/crates/weaver-api/src/sh_weaver/embed.rs @@ -38,37 +38,37 @@ pub mod percent_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData S>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = S::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = S::Width; type Height = Set; + type Width = S::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = S::Height; + type Width = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `height` field pub struct height(()); + ///Marker type for the `width` field + pub struct width(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> PercentSizeBuilder<'a, S> where S: percent_size_state::State, - S::Width: percent_size_state::IsSet, S::Height: percent_size_state::IsSet, + S::Width: percent_size_state::IsSet, { /// Build the final struct pub fn build(self) -> PercentSize<'a> { @@ -312,37 +312,37 @@ pub mod pixel_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Height; type Width; + type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Height = Unset; type Width = Unset; - } - ///State transition - sets the `height` field to Set - pub struct SetHeight(PhantomData S>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = S::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData S>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = S::Height; type Width = Set; + type Height = S::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData S>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = S::Width; + type Height = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `height` field - pub struct height(()); ///Marker type for the `width` field pub struct width(()); + ///Marker type for the `height` field + pub struct height(()); } } @@ -412,8 +412,8 @@ where impl<'a, S> PixelSizeBuilder<'a, S> where S: pixel_size_state::State, - S::Height: pixel_size_state::IsSet, S::Width: pixel_size_state::IsSet, + S::Height: pixel_size_state::IsSet, { /// Build the final struct pub fn build(self) -> PixelSize<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/external.rs b/crates/weaver-api/src/sh_weaver/embed/external.rs index cf98ddf..75c1e2e 100644 --- a/crates/weaver-api/src/sh_weaver/embed/external.rs +++ b/crates/weaver-api/src/sh_weaver/embed/external.rs @@ -38,49 +38,49 @@ pub mod external_embed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; type Uri; + type Description; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; type Uri = Unset; + type Description = Unset; type Title = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; - type Uri = S::Uri; - type Title = S::Title; - } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Description = S::Description; type Uri = Set; + type Description = S::Description; + type Title = S::Title; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData S>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Uri = S::Uri; + type Description = Set; type Title = S::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = S::Description; type Uri = S::Uri; + type Description = S::Description; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `title` field pub struct title(()); } @@ -195,8 +195,8 @@ where impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, - S::Description: external_embed_state::IsSet, S::Uri: external_embed_state::IsSet, + S::Description: external_embed_state::IsSet, S::Title: external_embed_state::IsSet, { /// Build the final struct @@ -817,51 +817,51 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; - type Title; type Uri; + type Title; + type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; - type Title = Unset; type Uri = Unset; + type Title = Unset; + type Description = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Title = S::Title; - type Uri = S::Uri; + type Description = S::Description; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = S::Description; - type Title = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Title = Set; type Description = S::Description; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData S>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Uri = S::Uri; type Title = S::Title; - type Uri = Set; + type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -974,9 +974,9 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Description: view_external_state::IsSet, - S::Title: view_external_state::IsSet, S::Uri: view_external_state::IsSet, + S::Title: view_external_state::IsSet, + S::Description: view_external_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewExternal<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/images.rs b/crates/weaver-api/src/sh_weaver/embed/images.rs index 9c425fb..2a0edd4 100644 --- a/crates/weaver-api/src/sh_weaver/embed/images.rs +++ b/crates/weaver-api/src/sh_weaver/embed/images.rs @@ -44,37 +44,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Alt; type Image; + type Alt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Alt = Unset; type Image = Unset; - } - ///State transition - sets the `alt` field to Set - pub struct SetAlt(PhantomData S>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Alt = Set; - type Image = S::Image; + type Alt = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData S>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Alt = S::Alt; type Image = Set; + type Alt = S::Alt; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData S>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Image = S::Image; + type Alt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `alt` field - pub struct alt(()); ///Marker type for the `image` field pub struct image(()); + ///Marker type for the `alt` field + pub struct alt(()); } } @@ -195,8 +195,8 @@ impl<'a, S: image_state::State> ImageBuilder<'a, S> { impl<'a, S> ImageBuilder<'a, S> where S: image_state::State, - S::Alt: image_state::IsSet, S::Image: image_state::IsSet, + S::Alt: image_state::IsSet, { /// Build the final struct pub fn build(self) -> Image<'a> { @@ -902,49 +902,49 @@ pub mod view_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Fullsize; type Alt; + type Fullsize; type Thumb; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Fullsize = Unset; type Alt = Unset; + type Fullsize = Unset; type Thumb = Unset; } - ///State transition - sets the `fullsize` field to Set - pub struct SetFullsize(PhantomData S>); - impl sealed::Sealed for SetFullsize {} - impl State for SetFullsize { - type Fullsize = Set; - type Alt = S::Alt; - type Thumb = S::Thumb; - } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Fullsize = S::Fullsize; type Alt = Set; + type Fullsize = S::Fullsize; + type Thumb = S::Thumb; + } + ///State transition - sets the `fullsize` field to Set + pub struct SetFullsize(PhantomData S>); + impl sealed::Sealed for SetFullsize {} + impl State for SetFullsize { + type Alt = S::Alt; + type Fullsize = Set; type Thumb = S::Thumb; } ///State transition - sets the `thumb` field to Set pub struct SetThumb(PhantomData S>); impl sealed::Sealed for SetThumb {} impl State for SetThumb { - type Fullsize = S::Fullsize; type Alt = S::Alt; + type Fullsize = S::Fullsize; type Thumb = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `fullsize` field - pub struct fullsize(()); ///Marker type for the `alt` field pub struct alt(()); + ///Marker type for the `fullsize` field + pub struct fullsize(()); ///Marker type for the `thumb` field pub struct thumb(()); } @@ -1073,8 +1073,8 @@ where impl<'a, S> ViewImageBuilder<'a, S> where S: view_image_state::State, - S::Fullsize: view_image_state::IsSet, S::Alt: view_image_state::IsSet, + S::Fullsize: view_image_state::IsSet, S::Thumb: view_image_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/embed/records.rs b/crates/weaver-api/src/sh_weaver/embed/records.rs index 6039d3b..ee4aa16 100644 --- a/crates/weaver-api/src/sh_weaver/embed/records.rs +++ b/crates/weaver-api/src/sh_weaver/embed/records.rs @@ -1398,37 +1398,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Detached; type Uri; + type Detached; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Detached = Unset; type Uri = Unset; - } - ///State transition - sets the `detached` field to Set - pub struct SetDetached(PhantomData S>); - impl sealed::Sealed for SetDetached {} - impl State for SetDetached { - type Detached = Set; - type Uri = S::Uri; + type Detached = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Detached = S::Detached; type Uri = Set; + type Detached = S::Detached; + } + ///State transition - sets the `detached` field to Set + pub struct SetDetached(PhantomData S>); + impl sealed::Sealed for SetDetached {} + impl State for SetDetached { + type Uri = S::Uri; + type Detached = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `detached` field - pub struct detached(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `detached` field + pub struct detached(()); } } @@ -1501,8 +1501,8 @@ where impl<'a, S> ViewDetachedBuilder<'a, S> where S: view_detached_state::State, - S::Detached: view_detached_state::IsSet, S::Uri: view_detached_state::IsSet, + S::Detached: view_detached_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewDetached<'a> { @@ -1769,85 +1769,85 @@ pub mod view_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Author; - type IndexedAt; type Value; type Uri; + type IndexedAt; + type Author; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Author = Unset; - type IndexedAt = Unset; type Value = Unset; type Uri = Unset; + type IndexedAt = Unset; + type Author = Unset; + type Cid = Unset; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; type Author = S::Author; + type Cid = S::Cid; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Value = S::Value; + type Uri = Set; type IndexedAt = S::IndexedAt; + type Author = S::Author; + type Cid = S::Cid; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Value = S::Value; type Uri = S::Uri; + type IndexedAt = Set; + type Author = S::Author; + type Cid = S::Cid; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Cid = S::Cid; - type Author = Set; - type IndexedAt = S::IndexedAt; type Value = S::Value; type Uri = S::Uri; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + type IndexedAt = S::IndexedAt; + type Author = Set; type Cid = S::Cid; - type Author = S::Author; - type IndexedAt = Set; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Value = S::Value; type Uri = S::Uri; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Cid = S::Cid; - type Author = S::Author; type IndexedAt = S::IndexedAt; - type Value = Set; - type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Cid = S::Cid; type Author = S::Author; - type IndexedAt = S::IndexedAt; - type Value = S::Value; - type Uri = Set; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `author` field + pub struct author(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -2092,11 +2092,11 @@ where impl<'a, S> ViewRecordBuilder<'a, S> where S: view_record_state::State, - S::Cid: view_record_state::IsSet, - S::Author: view_record_state::IsSet, - S::IndexedAt: view_record_state::IsSet, S::Value: view_record_state::IsSet, S::Uri: view_record_state::IsSet, + S::IndexedAt: view_record_state::IsSet, + S::Author: view_record_state::IsSet, + S::Cid: view_record_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewRecord<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/video.rs b/crates/weaver-api/src/sh_weaver/embed/video.rs index a621183..3caecde 100644 --- a/crates/weaver-api/src/sh_weaver/embed/video.rs +++ b/crates/weaver-api/src/sh_weaver/embed/video.rs @@ -940,37 +940,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Playlist; type Cid; + type Playlist; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Playlist = Unset; type Cid = Unset; - } - ///State transition - sets the `playlist` field to Set - pub struct SetPlaylist(PhantomData S>); - impl sealed::Sealed for SetPlaylist {} - impl State for SetPlaylist { - type Playlist = Set; - type Cid = S::Cid; + type Playlist = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Playlist = S::Playlist; type Cid = Set; + type Playlist = S::Playlist; + } + ///State transition - sets the `playlist` field to Set + pub struct SetPlaylist(PhantomData S>); + impl sealed::Sealed for SetPlaylist {} + impl State for SetPlaylist { + type Cid = S::Cid; + type Playlist = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `playlist` field - pub struct playlist(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `playlist` field + pub struct playlist(()); } } @@ -1108,8 +1108,8 @@ impl<'a, S: view_state::State> ViewBuilder<'a, S> { impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, - S::Playlist: view_state::IsSet, S::Cid: view_state::IsSet, + S::Playlist: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs index 3021db2..efc3d29 100644 --- a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs +++ b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs @@ -38,37 +38,37 @@ pub mod bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -158,8 +158,8 @@ where impl<'a, S> BookmarkBuilder<'a, S> where S: bookmark_state::State, - S::Subject: bookmark_state::IsSet, S::CreatedAt: bookmark_state::IsSet, + S::Subject: bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> Bookmark<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs b/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs index f92a05f..19d3517 100644 --- a/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs +++ b/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs @@ -34,37 +34,37 @@ pub mod follow_accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Follow; type CreatedAt; + type Follow; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Follow = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData S>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { - type Follow = Set; - type CreatedAt = S::CreatedAt; + type Follow = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Follow = S::Follow; type CreatedAt = Set; + type Follow = S::Follow; + } + ///State transition - sets the `follow` field to Set + pub struct SetFollow(PhantomData S>); + impl sealed::Sealed for SetFollow {} + impl State for SetFollow { + type CreatedAt = S::CreatedAt; + type Follow = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `follow` field - pub struct follow(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `follow` field + pub struct follow(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> FollowAcceptBuilder<'a, S> where S: follow_accept_state::State, - S::Follow: follow_accept_state::IsSet, S::CreatedAt: follow_accept_state::IsSet, + S::Follow: follow_accept_state::IsSet, { /// Build the final struct pub fn build(self) -> FollowAccept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/list.rs b/crates/weaver-api/src/sh_weaver/graph/list.rs index 037d118..61cb1d8 100644 --- a/crates/weaver-api/src/sh_weaver/graph/list.rs +++ b/crates/weaver-api/src/sh_weaver/graph/list.rs @@ -124,50 +124,50 @@ pub mod list_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type Purpose; type CreatedAt; + type Purpose; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Name = Unset; - type Purpose = Unset; type CreatedAt = Unset; + type Purpose = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type Name = Set; - type Purpose = S::Purpose; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData S>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { - type Name = S::Name; - type Purpose = Set; type CreatedAt = S::CreatedAt; + type Purpose = S::Purpose; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Name = S::Name; - type Purpose = S::Purpose; type CreatedAt = Set; + type Purpose = S::Purpose; + } + ///State transition - sets the `purpose` field to Set + pub struct SetPurpose(PhantomData S>); + impl sealed::Sealed for SetPurpose {} + impl State for SetPurpose { + type Name = S::Name; + type CreatedAt = S::CreatedAt; + type Purpose = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `purpose` field - pub struct purpose(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `purpose` field + pub struct purpose(()); } } @@ -301,8 +301,8 @@ impl<'a, S> ListBuilder<'a, S> where S: list_state::State, S::Name: list_state::IsSet, - S::Purpose: list_state::IsSet, S::CreatedAt: list_state::IsSet, + S::Purpose: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/listitem.rs b/crates/weaver-api/src/sh_weaver/graph/listitem.rs index dbd9686..07064c0 100644 --- a/crates/weaver-api/src/sh_weaver/graph/listitem.rs +++ b/crates/weaver-api/src/sh_weaver/graph/listitem.rs @@ -37,51 +37,51 @@ pub mod listitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type List; type Subject; type CreatedAt; - type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type List = Unset; type Subject = Unset; type CreatedAt = Unset; - type List = Unset; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData S>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type List = Set; + type Subject = S::Subject; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type List = S::List; type Subject = Set; type CreatedAt = S::CreatedAt; - type List = S::List; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; - type CreatedAt = Set; type List = S::List; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData S>); - impl sealed::Sealed for SetList {} - impl State for SetList { type Subject = S::Subject; - type CreatedAt = S::CreatedAt; - type List = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `list` field + pub struct list(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `list` field - pub struct list(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, + S::List: listitem_state::IsSet, S::Subject: listitem_state::IsSet, S::CreatedAt: listitem_state::IsSet, - S::List: listitem_state::IsSet, { /// Build the final struct pub fn build(self) -> Listitem<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs b/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs index 79682a6..0062a2b 100644 --- a/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs +++ b/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs @@ -34,37 +34,37 @@ pub mod subscribe_accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subscribe; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subscribe = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subscribe = S::Subscribe; + type CreatedAt = Unset; } ///State transition - sets the `subscribe` field to Set pub struct SetSubscribe(PhantomData S>); impl sealed::Sealed for SetSubscribe {} impl State for SetSubscribe { - type CreatedAt = S::CreatedAt; type Subscribe = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subscribe = S::Subscribe; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subscribe` field pub struct subscribe(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> SubscribeAcceptBuilder<'a, S> where S: subscribe_accept_state::State, - S::CreatedAt: subscribe_accept_state::IsSet, S::Subscribe: subscribe_accept_state::IsSet, + S::CreatedAt: subscribe_accept_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscribeAccept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook.rs b/crates/weaver-api/src/sh_weaver/notebook.rs index 4777f1e..f706110 100644 --- a/crates/weaver-api/src/sh_weaver/notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook.rs @@ -47,37 +47,37 @@ pub mod author_list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Index; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Index = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Index = S::Index; + type Record = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Record = S::Record; type Index = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Index = S::Index; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -170,8 +170,8 @@ impl<'a, S: author_list_view_state::State> AuthorListViewBuilder<'a, S> { impl<'a, S> AuthorListViewBuilder<'a, S> where S: author_list_view_state::State, - S::Record: author_list_view_state::IsSet, S::Index: author_list_view_state::IsSet, + S::Record: author_list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AuthorListView<'a> { @@ -1799,77 +1799,75 @@ pub mod notebook_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Cid; type Uri; type Authors; type IndexedAt; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Cid = Unset; type Uri = Unset; type Authors = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Cid = S::Cid; - type Uri = S::Uri; - type Authors = S::Authors; - type IndexedAt = S::IndexedAt; + type Record = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = S::Record; type Cid = Set; type Uri = S::Uri; type Authors = S::Authors; type IndexedAt = S::IndexedAt; + type Record = S::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = S::Record; type Cid = S::Cid; type Uri = Set; type Authors = S::Authors; type IndexedAt = S::IndexedAt; + type Record = S::Record; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData S>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { - type Record = S::Record; type Cid = S::Cid; type Uri = S::Uri; type Authors = Set; type IndexedAt = S::IndexedAt; + type Record = S::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Record = S::Record; type Cid = S::Cid; type Uri = S::Uri; type Authors = S::Authors; type IndexedAt = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Cid = S::Cid; + type Uri = S::Uri; + type Authors = S::Authors; + type IndexedAt = S::IndexedAt; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `uri` field @@ -1878,6 +1876,8 @@ pub mod notebook_view_state { pub struct authors(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -2100,11 +2100,11 @@ where impl<'a, S> NotebookViewBuilder<'a, S> where S: notebook_view_state::State, - S::Record: notebook_view_state::IsSet, S::Cid: notebook_view_state::IsSet, S::Uri: notebook_view_state::IsSet, S::Authors: notebook_view_state::IsSet, S::IndexedAt: notebook_view_state::IsSet, + S::Record: notebook_view_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookView<'a> { @@ -2198,67 +2198,67 @@ pub mod permission_grant_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GrantedAt; type Scope; type Did; type Source; + type GrantedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GrantedAt = Unset; type Scope = Unset; type Did = Unset; type Source = Unset; - } - ///State transition - sets the `granted_at` field to Set - pub struct SetGrantedAt(PhantomData S>); - impl sealed::Sealed for SetGrantedAt {} - impl State for SetGrantedAt { - type GrantedAt = Set; - type Scope = S::Scope; - type Did = S::Did; - type Source = S::Source; + type GrantedAt = Unset; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type GrantedAt = S::GrantedAt; type Scope = Set; type Did = S::Did; type Source = S::Source; + type GrantedAt = S::GrantedAt; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type GrantedAt = S::GrantedAt; type Scope = S::Scope; type Did = Set; type Source = S::Source; + type GrantedAt = S::GrantedAt; } ///State transition - sets the `source` field to Set pub struct SetSource(PhantomData S>); impl sealed::Sealed for SetSource {} impl State for SetSource { - type GrantedAt = S::GrantedAt; type Scope = S::Scope; type Did = S::Did; type Source = Set; + type GrantedAt = S::GrantedAt; + } + ///State transition - sets the `granted_at` field to Set + pub struct SetGrantedAt(PhantomData S>); + impl sealed::Sealed for SetGrantedAt {} + impl State for SetGrantedAt { + type Scope = S::Scope; + type Did = S::Did; + type Source = S::Source; + type GrantedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `granted_at` field - pub struct granted_at(()); ///Marker type for the `scope` field pub struct scope(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `source` field pub struct source(()); + ///Marker type for the `granted_at` field + pub struct granted_at(()); } } @@ -2371,10 +2371,10 @@ where impl<'a, S> PermissionGrantBuilder<'a, S> where S: permission_grant_state::State, - S::GrantedAt: permission_grant_state::IsSet, S::Scope: permission_grant_state::IsSet, S::Did: permission_grant_state::IsSet, S::Source: permission_grant_state::IsSet, + S::GrantedAt: permission_grant_state::IsSet, { /// Build the final struct pub fn build(self) -> PermissionGrant<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs b/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs index 1f3bee8..89b9c12 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs @@ -39,50 +39,50 @@ pub mod colour_scheme_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Variant; - type Colours; type Name; + type Colours; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Variant = Unset; - type Colours = Unset; type Name = Unset; + type Colours = Unset; } ///State transition - sets the `variant` field to Set pub struct SetVariant(PhantomData S>); impl sealed::Sealed for SetVariant {} impl State for SetVariant { type Variant = Set; - type Colours = S::Colours; - type Name = S::Name; - } - ///State transition - sets the `colours` field to Set - pub struct SetColours(PhantomData S>); - impl sealed::Sealed for SetColours {} - impl State for SetColours { - type Variant = S::Variant; - type Colours = Set; type Name = S::Name; + type Colours = S::Colours; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type Variant = S::Variant; - type Colours = S::Colours; type Name = Set; + type Colours = S::Colours; + } + ///State transition - sets the `colours` field to Set + pub struct SetColours(PhantomData S>); + impl sealed::Sealed for SetColours {} + impl State for SetColours { + type Variant = S::Variant; + type Name = S::Name; + type Colours = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `variant` field pub struct variant(()); - ///Marker type for the `colours` field - pub struct colours(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `colours` field + pub struct colours(()); } } @@ -176,8 +176,8 @@ impl<'a, S> ColourSchemeBuilder<'a, S> where S: colour_scheme_state::State, S::Variant: colour_scheme_state::IsSet, - S::Colours: colour_scheme_state::IsSet, S::Name: colour_scheme_state::IsSet, + S::Colours: colour_scheme_state::IsSet, { /// Build the final struct pub fn build(self) -> ColourScheme<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/entry.rs b/crates/weaver-api/src/sh_weaver/notebook/entry.rs index 5d23323..548bed3 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/entry.rs @@ -52,67 +52,67 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; - type CreatedAt; type Path; type Title; + type CreatedAt; + type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Content = Unset; - type CreatedAt = Unset; type Path = Unset; type Title = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type CreatedAt = S::CreatedAt; - type Path = S::Path; - type Title = S::Title; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Content = S::Content; - type CreatedAt = Set; - type Path = S::Path; - type Title = S::Title; + type CreatedAt = Unset; + type Content = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Content = S::Content; - type CreatedAt = S::CreatedAt; type Path = Set; type Title = S::Title; + type CreatedAt = S::CreatedAt; + type Content = S::Content; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Content = S::Content; - type CreatedAt = S::CreatedAt; type Path = S::Path; type Title = Set; + type CreatedAt = S::CreatedAt; + type Content = S::Content; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Path = S::Path; + type Title = S::Title; + type CreatedAt = Set; + type Content = S::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData S>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Path = S::Path; + type Title = S::Title; + type CreatedAt = S::CreatedAt; + type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `content` field - pub struct content(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `path` field pub struct path(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -299,10 +299,10 @@ impl<'a, S: entry_state::State> EntryBuilder<'a, S> { impl<'a, S> EntryBuilder<'a, S> where S: entry_state::State, - S::Content: entry_state::IsSet, - S::CreatedAt: entry_state::IsSet, S::Path: entry_state::IsSet, S::Title: entry_state::IsSet, + S::CreatedAt: entry_state::IsSet, + S::Content: entry_state::IsSet, { /// Build the final struct pub fn build(self) -> Entry<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs index d0bb77c..7ef15dc 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs @@ -32,37 +32,37 @@ pub mod get_entry_by_title_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Title; + type Notebook; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; type Title = Unset; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; - type Title = S::Title; + type Notebook = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Notebook = S::Notebook; type Title = Set; + type Notebook = S::Notebook; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Title = S::Title; + type Notebook = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetEntryByTitleBuilder<'a, S> where S: get_entry_by_title_state::State, - S::Notebook: get_entry_by_title_state::IsSet, S::Title: get_entry_by_title_state::IsSet, + S::Notebook: get_entry_by_title_state::IsSet, { /// Build the final struct pub fn build(self) -> GetEntryByTitle<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs b/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs index 8f82bfb..28de921 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs @@ -32,37 +32,37 @@ pub mod get_notebook_by_title_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Actor; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Actor = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Actor = S::Actor; + type Title = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Title = S::Title; type Actor = Set; + type Title = S::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Actor = S::Actor; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `actor` field pub struct actor(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetNotebookByTitleBuilder<'a, S> where S: get_notebook_by_title_state::State, - S::Title: get_notebook_by_title_state::IsSet, S::Actor: get_notebook_by_title_state::IsSet, + S::Title: get_notebook_by_title_state::IsSet, { /// Build the final struct pub fn build(self) -> GetNotebookByTitle<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/page.rs b/crates/weaver-api/src/sh_weaver/notebook/page.rs index f59c364..7817be8 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/page.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/page.rs @@ -45,50 +45,50 @@ pub mod page_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Authors; - type EntryList; type Notebook; + type EntryList; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Authors = Unset; - type EntryList = Unset; type Notebook = Unset; + type EntryList = Unset; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData S>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { type Authors = Set; - type EntryList = S::EntryList; - type Notebook = S::Notebook; - } - ///State transition - sets the `entry_list` field to Set - pub struct SetEntryList(PhantomData S>); - impl sealed::Sealed for SetEntryList {} - impl State for SetEntryList { - type Authors = S::Authors; - type EntryList = Set; type Notebook = S::Notebook; + type EntryList = S::EntryList; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { type Authors = S::Authors; - type EntryList = S::EntryList; type Notebook = Set; + type EntryList = S::EntryList; + } + ///State transition - sets the `entry_list` field to Set + pub struct SetEntryList(PhantomData S>); + impl sealed::Sealed for SetEntryList {} + impl State for SetEntryList { + type Authors = S::Authors; + type Notebook = S::Notebook; + type EntryList = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `authors` field pub struct authors(()); - ///Marker type for the `entry_list` field - pub struct entry_list(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `entry_list` field + pub struct entry_list(()); } } @@ -222,8 +222,8 @@ impl<'a, S> PageBuilder<'a, S> where S: page_state::State, S::Authors: page_state::IsSet, - S::EntryList: page_state::IsSet, S::Notebook: page_state::IsSet, + S::EntryList: page_state::IsSet, { /// Build the final struct pub fn build(self) -> Page<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/theme.rs b/crates/weaver-api/src/sh_weaver/notebook/theme.rs index 49f0ce6..7647aa9 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/theme.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/theme.rs @@ -36,51 +36,51 @@ pub mod code_theme_file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type Content; type Name; + type Content; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type Content = Unset; type Name = Unset; + type Content = Unset; + type Did = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Content = S::Content; - type Name = S::Name; + type Did = S::Did; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData S>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Did = S::Did; - type Content = Set; type Name = S::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Content = Set; type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Name = S::Name; type Content = S::Content; - type Name = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -173,9 +173,9 @@ where impl<'a, S> CodeThemeFileBuilder<'a, S> where S: code_theme_file_state::State, - S::Did: code_theme_file_state::IsSet, - S::Content: code_theme_file_state::IsSet, S::Name: code_theme_file_state::IsSet, + S::Content: code_theme_file_state::IsSet, + S::Did: code_theme_file_state::IsSet, { /// Build the final struct pub fn build(self) -> CodeThemeFile<'a> { @@ -837,51 +837,51 @@ pub mod font_file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Content; type Name; type Did; - type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Content = Unset; type Name = Unset; type Did = Unset; - type Content = Unset; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData S>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Content = Set; + type Name = S::Name; + type Did = S::Did; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type Content = S::Content; type Name = Set; type Did = S::Did; - type Content = S::Content; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Name = S::Name; - type Did = Set; type Content = S::Content; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { type Name = S::Name; - type Did = S::Did; - type Content = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `content` field + pub struct content(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `content` field - pub struct content(()); } } @@ -974,9 +974,9 @@ where impl<'a, S> FontFileBuilder<'a, S> where S: font_file_state::State, + S::Content: font_file_state::IsSet, S::Name: font_file_state::IsSet, S::Did: font_file_state::IsSet, - S::Content: font_file_state::IsSet, { /// Build the final struct pub fn build(self) -> FontFile<'a> { @@ -1067,105 +1067,105 @@ pub mod theme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Fonts; type LightCodeTheme; - type LightScheme; - type Spacing; type DarkCodeTheme; type DarkScheme; + type Fonts; + type LightScheme; + type Spacing; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Fonts = Unset; type LightCodeTheme = Unset; - type LightScheme = Unset; - type Spacing = Unset; type DarkCodeTheme = Unset; type DarkScheme = Unset; - } - ///State transition - sets the `fonts` field to Set - pub struct SetFonts(PhantomData S>); - impl sealed::Sealed for SetFonts {} - impl State for SetFonts { - type Fonts = Set; - type LightCodeTheme = S::LightCodeTheme; - type LightScheme = S::LightScheme; - type Spacing = S::Spacing; - type DarkCodeTheme = S::DarkCodeTheme; - type DarkScheme = S::DarkScheme; + type Fonts = Unset; + type LightScheme = Unset; + type Spacing = Unset; } ///State transition - sets the `light_code_theme` field to Set pub struct SetLightCodeTheme(PhantomData S>); impl sealed::Sealed for SetLightCodeTheme {} impl State for SetLightCodeTheme { - type Fonts = S::Fonts; type LightCodeTheme = Set; - type LightScheme = S::LightScheme; - type Spacing = S::Spacing; - type DarkCodeTheme = S::DarkCodeTheme; - type DarkScheme = S::DarkScheme; - } - ///State transition - sets the `light_scheme` field to Set - pub struct SetLightScheme(PhantomData S>); - impl sealed::Sealed for SetLightScheme {} - impl State for SetLightScheme { - type Fonts = S::Fonts; - type LightCodeTheme = S::LightCodeTheme; - type LightScheme = Set; - type Spacing = S::Spacing; type DarkCodeTheme = S::DarkCodeTheme; type DarkScheme = S::DarkScheme; - } - ///State transition - sets the `spacing` field to Set - pub struct SetSpacing(PhantomData S>); - impl sealed::Sealed for SetSpacing {} - impl State for SetSpacing { type Fonts = S::Fonts; - type LightCodeTheme = S::LightCodeTheme; type LightScheme = S::LightScheme; - type Spacing = Set; - type DarkCodeTheme = S::DarkCodeTheme; - type DarkScheme = S::DarkScheme; + type Spacing = S::Spacing; } ///State transition - sets the `dark_code_theme` field to Set pub struct SetDarkCodeTheme(PhantomData S>); impl sealed::Sealed for SetDarkCodeTheme {} impl State for SetDarkCodeTheme { - type Fonts = S::Fonts; type LightCodeTheme = S::LightCodeTheme; - type LightScheme = S::LightScheme; - type Spacing = S::Spacing; type DarkCodeTheme = Set; type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type LightScheme = S::LightScheme; + type Spacing = S::Spacing; } ///State transition - sets the `dark_scheme` field to Set pub struct SetDarkScheme(PhantomData S>); impl sealed::Sealed for SetDarkScheme {} impl State for SetDarkScheme { + type LightCodeTheme = S::LightCodeTheme; + type DarkCodeTheme = S::DarkCodeTheme; + type DarkScheme = Set; type Fonts = S::Fonts; + type LightScheme = S::LightScheme; + type Spacing = S::Spacing; + } + ///State transition - sets the `fonts` field to Set + pub struct SetFonts(PhantomData S>); + impl sealed::Sealed for SetFonts {} + impl State for SetFonts { type LightCodeTheme = S::LightCodeTheme; + type DarkCodeTheme = S::DarkCodeTheme; + type DarkScheme = S::DarkScheme; + type Fonts = Set; type LightScheme = S::LightScheme; type Spacing = S::Spacing; + } + ///State transition - sets the `light_scheme` field to Set + pub struct SetLightScheme(PhantomData S>); + impl sealed::Sealed for SetLightScheme {} + impl State for SetLightScheme { + type LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = S::DarkCodeTheme; - type DarkScheme = Set; + type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type LightScheme = Set; + type Spacing = S::Spacing; + } + ///State transition - sets the `spacing` field to Set + pub struct SetSpacing(PhantomData S>); + impl sealed::Sealed for SetSpacing {} + impl State for SetSpacing { + type LightCodeTheme = S::LightCodeTheme; + type DarkCodeTheme = S::DarkCodeTheme; + type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type LightScheme = S::LightScheme; + type Spacing = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `fonts` field - pub struct fonts(()); ///Marker type for the `light_code_theme` field pub struct light_code_theme(()); - ///Marker type for the `light_scheme` field - pub struct light_scheme(()); - ///Marker type for the `spacing` field - pub struct spacing(()); ///Marker type for the `dark_code_theme` field pub struct dark_code_theme(()); ///Marker type for the `dark_scheme` field pub struct dark_scheme(()); + ///Marker type for the `fonts` field + pub struct fonts(()); + ///Marker type for the `light_scheme` field + pub struct light_scheme(()); + ///Marker type for the `spacing` field + pub struct spacing(()); } } @@ -1338,12 +1338,12 @@ where impl<'a, S> ThemeBuilder<'a, S> where S: theme_state::State, - S::Fonts: theme_state::IsSet, S::LightCodeTheme: theme_state::IsSet, - S::LightScheme: theme_state::IsSet, - S::Spacing: theme_state::IsSet, S::DarkCodeTheme: theme_state::IsSet, S::DarkScheme: theme_state::IsSet, + S::Fonts: theme_state::IsSet, + S::LightScheme: theme_state::IsSet, + S::Spacing: theme_state::IsSet, { /// Build the final struct pub fn build(self) -> Theme<'a> { diff --git a/crates/weaver-api/src/sh_weaver/publish/blob.rs b/crates/weaver-api/src/sh_weaver/publish/blob.rs index c532043..a2623c4 100644 --- a/crates/weaver-api/src/sh_weaver/publish/blob.rs +++ b/crates/weaver-api/src/sh_weaver/publish/blob.rs @@ -36,37 +36,37 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Upload; type Path; + type Upload; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Upload = Unset; type Path = Unset; - } - ///State transition - sets the `upload` field to Set - pub struct SetUpload(PhantomData S>); - impl sealed::Sealed for SetUpload {} - impl State for SetUpload { - type Upload = Set; - type Path = S::Path; + type Upload = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Upload = S::Upload; type Path = Set; + type Upload = S::Upload; + } + ///State transition - sets the `upload` field to Set + pub struct SetUpload(PhantomData S>); + impl sealed::Sealed for SetUpload {} + impl State for SetUpload { + type Path = S::Path; + type Upload = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `upload` field - pub struct upload(()); ///Marker type for the `path` field pub struct path(()); + ///Marker type for the `upload` field + pub struct upload(()); } } @@ -139,8 +139,8 @@ where impl<'a, S> BlobBuilder<'a, S> where S: blob_state::State, - S::Upload: blob_state::IsSet, S::Path: blob_state::IsSet, + S::Upload: blob_state::IsSet, { /// Build the final struct pub fn build(self) -> Blob<'a> { diff --git a/crates/weaver-api/src/tools_ozone/communication.rs b/crates/weaver-api/src/tools_ozone/communication.rs index e6468a3..3b4759f 100644 --- a/crates/weaver-api/src/tools_ozone/communication.rs +++ b/crates/weaver-api/src/tools_ozone/communication.rs @@ -55,127 +55,127 @@ pub mod template_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type LastUpdatedBy; type ContentMarkdown; - type Id; - type Disabled; - type CreatedAt; type UpdatedAt; + type Disabled; type Name; - type LastUpdatedBy; + type CreatedAt; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type LastUpdatedBy = Unset; type ContentMarkdown = Unset; - type Id = Unset; - type Disabled = Unset; - type CreatedAt = Unset; type UpdatedAt = Unset; + type Disabled = Unset; type Name = Unset; - type LastUpdatedBy = Unset; + type CreatedAt = Unset; + type Id = Unset; + } + ///State transition - sets the `last_updated_by` field to Set + pub struct SetLastUpdatedBy(PhantomData S>); + impl sealed::Sealed for SetLastUpdatedBy {} + impl State for SetLastUpdatedBy { + type LastUpdatedBy = Set; + type ContentMarkdown = S::ContentMarkdown; + type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; + type Name = S::Name; + type CreatedAt = S::CreatedAt; + type Id = S::Id; } ///State transition - sets the `content_markdown` field to Set pub struct SetContentMarkdown(PhantomData S>); impl sealed::Sealed for SetContentMarkdown {} impl State for SetContentMarkdown { + type LastUpdatedBy = S::LastUpdatedBy; type ContentMarkdown = Set; - type Id = S::Id; - type Disabled = S::Disabled; - type CreatedAt = S::CreatedAt; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; type Name = S::Name; - type LastUpdatedBy = S::LastUpdatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type LastUpdatedBy = S::LastUpdatedBy; type ContentMarkdown = S::ContentMarkdown; - type Id = Set; + type UpdatedAt = Set; type Disabled = S::Disabled; - type CreatedAt = S::CreatedAt; - type UpdatedAt = S::UpdatedAt; type Name = S::Name; - type LastUpdatedBy = S::LastUpdatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; } ///State transition - sets the `disabled` field to Set pub struct SetDisabled(PhantomData S>); impl sealed::Sealed for SetDisabled {} impl State for SetDisabled { - type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; - type Disabled = Set; - type CreatedAt = S::CreatedAt; - type UpdatedAt = S::UpdatedAt; - type Name = S::Name; type LastUpdatedBy = S::LastUpdatedBy; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; - type Disabled = S::Disabled; - type CreatedAt = Set; type UpdatedAt = S::UpdatedAt; + type Disabled = Set; type Name = S::Name; - type LastUpdatedBy = S::LastUpdatedBy; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; - type Disabled = S::Disabled; type CreatedAt = S::CreatedAt; - type UpdatedAt = Set; - type Name = S::Name; - type LastUpdatedBy = S::LastUpdatedBy; + type Id = S::Id; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type LastUpdatedBy = S::LastUpdatedBy; type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; - type Disabled = S::Disabled; - type CreatedAt = S::CreatedAt; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; type Name = Set; - type LastUpdatedBy = S::LastUpdatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; } - ///State transition - sets the `last_updated_by` field to Set - pub struct SetLastUpdatedBy(PhantomData S>); - impl sealed::Sealed for SetLastUpdatedBy {} - impl State for SetLastUpdatedBy { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type LastUpdatedBy = S::LastUpdatedBy; type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; + type UpdatedAt = S::UpdatedAt; type Disabled = S::Disabled; - type CreatedAt = S::CreatedAt; + type Name = S::Name; + type CreatedAt = Set; + type Id = S::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type LastUpdatedBy = S::LastUpdatedBy; + type ContentMarkdown = S::ContentMarkdown; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; type Name = S::Name; - type LastUpdatedBy = Set; + type CreatedAt = S::CreatedAt; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `last_updated_by` field + pub struct last_updated_by(()); ///Marker type for the `content_markdown` field pub struct content_markdown(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `disabled` field - pub struct disabled(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `updated_at` field pub struct updated_at(()); + ///Marker type for the `disabled` field + pub struct disabled(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `last_updated_by` field - pub struct last_updated_by(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -395,13 +395,13 @@ where impl<'a, S> TemplateViewBuilder<'a, S> where S: template_view_state::State, + S::LastUpdatedBy: template_view_state::IsSet, S::ContentMarkdown: template_view_state::IsSet, - S::Id: template_view_state::IsSet, - S::Disabled: template_view_state::IsSet, - S::CreatedAt: template_view_state::IsSet, S::UpdatedAt: template_view_state::IsSet, + S::Disabled: template_view_state::IsSet, S::Name: template_view_state::IsSet, - S::LastUpdatedBy: template_view_state::IsSet, + S::CreatedAt: template_view_state::IsSet, + S::Id: template_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TemplateView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs b/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs index c2d93fa..41af3c9 100644 --- a/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs +++ b/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs @@ -462,51 +462,51 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedBy; type CreatedAt; type Details; - type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedBy = Unset; type CreatedAt = Unset; type Details = Unset; - type CreatedBy = Unset; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedBy = Set; + type CreatedAt = S::CreatedAt; + type Details = S::Details; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type CreatedBy = S::CreatedBy; type CreatedAt = Set; type Details = S::Details; - type CreatedBy = S::CreatedBy; } ///State transition - sets the `details` field to Set pub struct SetDetails(PhantomData S>); impl sealed::Sealed for SetDetails {} impl State for SetDetails { - type CreatedAt = S::CreatedAt; - type Details = Set; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { type CreatedAt = S::CreatedAt; - type Details = S::Details; - type CreatedBy = Set; + type Details = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `details` field pub struct details(()); - ///Marker type for the `created_by` field - pub struct created_by(()); } } @@ -599,9 +599,9 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, + S::CreatedBy: event_state::IsSet, S::CreatedAt: event_state::IsSet, S::Details: event_state::IsSet, - S::CreatedBy: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation.rs b/crates/weaver-api/src/tools_ozone/moderation.rs index 2759242..02c2b26 100644 --- a/crates/weaver-api/src/tools_ozone/moderation.rs +++ b/crates/weaver-api/src/tools_ozone/moderation.rs @@ -5097,51 +5097,51 @@ pub mod age_assurance_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Status; type AttemptId; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Status = Unset; type AttemptId = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Status = S::Status; + type AttemptId = S::AttemptId; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { + type CreatedAt = S::CreatedAt; type Status = Set; type AttemptId = S::AttemptId; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type Status = S::Status; - type AttemptId = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Status = S::Status; - type AttemptId = S::AttemptId; - type CreatedAt = Set; + type AttemptId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `status` field pub struct status(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -5379,9 +5379,9 @@ where impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, + S::CreatedAt: age_assurance_event_state::IsSet, S::Status: age_assurance_event_state::IsSet, S::AttemptId: age_assurance_event_state::IsSet, - S::CreatedAt: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -5518,67 +5518,67 @@ pub mod blob_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MimeType; - type Size; type CreatedAt; type Cid; + type Size; + type MimeType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MimeType = Unset; - type Size = Unset; type CreatedAt = Unset; type Cid = Unset; - } - ///State transition - sets the `mime_type` field to Set - pub struct SetMimeType(PhantomData S>); - impl sealed::Sealed for SetMimeType {} - impl State for SetMimeType { - type MimeType = Set; - type Size = S::Size; - type CreatedAt = S::CreatedAt; - type Cid = S::Cid; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData S>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - type MimeType = S::MimeType; - type Size = Set; - type CreatedAt = S::CreatedAt; - type Cid = S::Cid; + type Size = Unset; + type MimeType = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type MimeType = S::MimeType; - type Size = S::Size; type CreatedAt = Set; type Cid = S::Cid; + type Size = S::Size; + type MimeType = S::MimeType; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type MimeType = S::MimeType; - type Size = S::Size; type CreatedAt = S::CreatedAt; type Cid = Set; + type Size = S::Size; + type MimeType = S::MimeType; + } + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData S>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type CreatedAt = S::CreatedAt; + type Cid = S::Cid; + type Size = Set; + type MimeType = S::MimeType; + } + ///State transition - sets the `mime_type` field to Set + pub struct SetMimeType(PhantomData S>); + impl sealed::Sealed for SetMimeType {} + impl State for SetMimeType { + type CreatedAt = S::CreatedAt; + type Cid = S::Cid; + type Size = S::Size; + type MimeType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `mime_type` field - pub struct mime_type(()); - ///Marker type for the `size` field - pub struct size(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `size` field + pub struct size(()); + ///Marker type for the `mime_type` field + pub struct mime_type(()); } } @@ -5725,10 +5725,10 @@ where impl<'a, S> BlobViewBuilder<'a, S> where S: blob_view_state::State, - S::MimeType: blob_view_state::IsSet, - S::Size: blob_view_state::IsSet, S::CreatedAt: blob_view_state::IsSet, S::Cid: blob_view_state::IsSet, + S::Size: blob_view_state::IsSet, + S::MimeType: blob_view_state::IsSet, { /// Build the final struct pub fn build(self) -> BlobView<'a> { @@ -7724,105 +7724,105 @@ pub mod mod_event_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type CreatedBy; type CreatedAt; + type Id; + type Event; type Subject; type SubjectBlobCids; - type Event; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type CreatedBy = Unset; type CreatedAt = Unset; + type Id = Unset; + type Event = Unset; type Subject = Unset; type SubjectBlobCids = Unset; - type Event = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type SubjectBlobCids = S::SubjectBlobCids; - type Event = S::Event; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Id = S::Id; type CreatedBy = Set; type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Event = S::Event; type Subject = S::Subject; type SubjectBlobCids = S::SubjectBlobCids; - type Event = S::Event; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Id = S::Id; type CreatedBy = S::CreatedBy; type CreatedAt = Set; + type Id = S::Id; + type Event = S::Event; type Subject = S::Subject; type SubjectBlobCids = S::SubjectBlobCids; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Id = Set; type Event = S::Event; + type Subject = S::Subject; + type SubjectBlobCids = S::SubjectBlobCids; + } + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData S>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Event = Set; + type Subject = S::Subject; + type SubjectBlobCids = S::SubjectBlobCids; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Id = S::Id; type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Event = S::Event; type Subject = Set; type SubjectBlobCids = S::SubjectBlobCids; - type Event = S::Event; } ///State transition - sets the `subject_blob_cids` field to Set pub struct SetSubjectBlobCids(PhantomData S>); impl sealed::Sealed for SetSubjectBlobCids {} impl State for SetSubjectBlobCids { - type Id = S::Id; type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type SubjectBlobCids = Set; - type Event = S::Event; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData S>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { type Id = S::Id; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; + type Event = S::Event; type Subject = S::Subject; - type SubjectBlobCids = S::SubjectBlobCids; - type Event = Set; + type SubjectBlobCids = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `event` field + pub struct event(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `subject_blob_cids` field pub struct subject_blob_cids(()); - ///Marker type for the `event` field - pub struct event(()); } } @@ -8045,12 +8045,12 @@ impl<'a, S: mod_event_view_state::State> ModEventViewBuilder<'a, S> { impl<'a, S> ModEventViewBuilder<'a, S> where S: mod_event_view_state::State, - S::Id: mod_event_view_state::IsSet, S::CreatedBy: mod_event_view_state::IsSet, S::CreatedAt: mod_event_view_state::IsSet, + S::Id: mod_event_view_state::IsSet, + S::Event: mod_event_view_state::IsSet, S::Subject: mod_event_view_state::IsSet, S::SubjectBlobCids: mod_event_view_state::IsSet, - S::Event: mod_event_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventView<'a> { @@ -8244,105 +8244,105 @@ pub mod mod_event_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SubjectBlobs; type CreatedBy; + type SubjectBlobs; + type Event; type CreatedAt; - type Id; type Subject; - type Event; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SubjectBlobs = Unset; type CreatedBy = Unset; + type SubjectBlobs = Unset; + type Event = Unset; type CreatedAt = Unset; - type Id = Unset; type Subject = Unset; - type Event = Unset; + type Id = Unset; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedBy = Set; + type SubjectBlobs = S::SubjectBlobs; + type Event = S::Event; + type CreatedAt = S::CreatedAt; + type Subject = S::Subject; + type Id = S::Id; } ///State transition - sets the `subject_blobs` field to Set pub struct SetSubjectBlobs(PhantomData S>); impl sealed::Sealed for SetSubjectBlobs {} impl State for SetSubjectBlobs { - type SubjectBlobs = Set; type CreatedBy = S::CreatedBy; + type SubjectBlobs = Set; + type Event = S::Event; type CreatedAt = S::CreatedAt; - type Id = S::Id; type Subject = S::Subject; - type Event = S::Event; + type Id = S::Id; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData S>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type CreatedBy = S::CreatedBy; type SubjectBlobs = S::SubjectBlobs; - type CreatedBy = Set; + type Event = Set; type CreatedAt = S::CreatedAt; - type Id = S::Id; type Subject = S::Subject; - type Event = S::Event; + type Id = S::Id; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SubjectBlobs = S::SubjectBlobs; type CreatedBy = S::CreatedBy; - type CreatedAt = Set; - type Id = S::Id; - type Subject = S::Subject; - type Event = S::Event; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { type SubjectBlobs = S::SubjectBlobs; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Id = Set; - type Subject = S::Subject; type Event = S::Event; + type CreatedAt = Set; + type Subject = S::Subject; + type Id = S::Id; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type SubjectBlobs = S::SubjectBlobs; type CreatedBy = S::CreatedBy; + type SubjectBlobs = S::SubjectBlobs; + type Event = S::Event; type CreatedAt = S::CreatedAt; - type Id = S::Id; type Subject = Set; - type Event = S::Event; + type Id = S::Id; } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData S>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { - type SubjectBlobs = S::SubjectBlobs; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { type CreatedBy = S::CreatedBy; + type SubjectBlobs = S::SubjectBlobs; + type Event = S::Event; type CreatedAt = S::CreatedAt; - type Id = S::Id; type Subject = S::Subject; - type Event = Set; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject_blobs` field - pub struct subject_blobs(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `subject` field - pub struct subject(()); + ///Marker type for the `subject_blobs` field + pub struct subject_blobs(()); ///Marker type for the `event` field pub struct event(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -8515,12 +8515,12 @@ where impl<'a, S> ModEventViewDetailBuilder<'a, S> where S: mod_event_view_detail_state::State, - S::SubjectBlobs: mod_event_view_detail_state::IsSet, S::CreatedBy: mod_event_view_detail_state::IsSet, + S::SubjectBlobs: mod_event_view_detail_state::IsSet, + S::Event: mod_event_view_detail_state::IsSet, S::CreatedAt: mod_event_view_detail_state::IsSet, - S::Id: mod_event_view_detail_state::IsSet, S::Subject: mod_event_view_detail_state::IsSet, - S::Event: mod_event_view_detail_state::IsSet, + S::Id: mod_event_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventViewDetail<'a> { @@ -9088,127 +9088,127 @@ pub mod record_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Cid; type BlobCids; type Moderation; + type IndexedAt; type Value; - type Uri; type Repo; - type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type Cid = Unset; type BlobCids = Unset; type Moderation = Unset; + type IndexedAt = Unset; type Value = Unset; - type Uri = Unset; type Repo = Unset; - type IndexedAt = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type Cid = S::Cid; + type BlobCids = S::BlobCids; + type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Repo = S::Repo; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Uri = S::Uri; type Cid = Set; type BlobCids = S::BlobCids; type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type Uri = S::Uri; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `blob_cids` field to Set pub struct SetBlobCids(PhantomData S>); impl sealed::Sealed for SetBlobCids {} impl State for SetBlobCids { + type Uri = S::Uri; type Cid = S::Cid; type BlobCids = Set; type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type Uri = S::Uri; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { + type Uri = S::Uri; type Cid = S::Cid; type BlobCids = S::BlobCids; type Moderation = Set; + type IndexedAt = S::IndexedAt; type Value = S::Value; + type Repo = S::Repo; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Uri = S::Uri; + type Cid = S::Cid; + type BlobCids = S::BlobCids; + type Moderation = S::Moderation; + type IndexedAt = Set; + type Value = S::Value; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Cid = S::Cid; - type BlobCids = S::BlobCids; - type Moderation = S::Moderation; - type Value = Set; type Uri = S::Uri; - type Repo = S::Repo; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Cid = S::Cid; type BlobCids = S::BlobCids; type Moderation = S::Moderation; - type Value = S::Value; - type Uri = Set; - type Repo = S::Repo; type IndexedAt = S::IndexedAt; + type Value = Set; + type Repo = S::Repo; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Cid = S::Cid; - type BlobCids = S::BlobCids; - type Moderation = S::Moderation; - type Value = S::Value; type Uri = S::Uri; - type Repo = Set; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { type Cid = S::Cid; type BlobCids = S::BlobCids; type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type Uri = S::Uri; - type Repo = S::Repo; - type IndexedAt = Set; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `blob_cids` field pub struct blob_cids(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); } } @@ -9381,13 +9381,13 @@ where impl<'a, S> RecordViewBuilder<'a, S> where S: record_view_state::State, + S::Uri: record_view_state::IsSet, S::Cid: record_view_state::IsSet, S::BlobCids: record_view_state::IsSet, S::Moderation: record_view_state::IsSet, + S::IndexedAt: record_view_state::IsSet, S::Value: record_view_state::IsSet, - S::Uri: record_view_state::IsSet, S::Repo: record_view_state::IsSet, - S::IndexedAt: record_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordView<'a> { @@ -9480,127 +9480,127 @@ pub mod record_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Uri; - type IndexedAt; - type Blobs; - type Moderation; type Repo; + type Blobs; type Cid; + type IndexedAt; + type Value; + type Moderation; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; type Uri = Unset; - type IndexedAt = Unset; - type Blobs = Unset; - type Moderation = Unset; type Repo = Unset; + type Blobs = Unset; type Cid = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Blobs = S::Blobs; - type Moderation = S::Moderation; - type Repo = S::Repo; - type Cid = S::Cid; + type IndexedAt = Unset; + type Value = Unset; + type Moderation = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Value = S::Value; type Uri = Set; - type IndexedAt = S::IndexedAt; - type Blobs = S::Blobs; - type Moderation = S::Moderation; type Repo = S::Repo; + type Blobs = S::Blobs; type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + type IndexedAt = S::IndexedAt; type Value = S::Value; + type Moderation = S::Moderation; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { type Uri = S::Uri; - type IndexedAt = Set; + type Repo = Set; type Blobs = S::Blobs; - type Moderation = S::Moderation; - type Repo = S::Repo; type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Moderation = S::Moderation; } ///State transition - sets the `blobs` field to Set pub struct SetBlobs(PhantomData S>); impl sealed::Sealed for SetBlobs {} impl State for SetBlobs { - type Value = S::Value; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Blobs = Set; - type Moderation = S::Moderation; type Repo = S::Repo; + type Blobs = Set; type Cid = S::Cid; - } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData S>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { - type Value = S::Value; - type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Blobs = S::Blobs; - type Moderation = Set; - type Repo = S::Repo; - type Cid = S::Cid; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { type Value = S::Value; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Blobs = S::Blobs; type Moderation = S::Moderation; - type Repo = Set; - type Cid = S::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Value = S::Value; type Uri = S::Uri; + type Repo = S::Repo; + type Blobs = S::Blobs; + type Cid = Set; type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Moderation = S::Moderation; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Uri = S::Uri; + type Repo = S::Repo; type Blobs = S::Blobs; + type Cid = S::Cid; + type IndexedAt = Set; + type Value = S::Value; type Moderation = S::Moderation; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Uri = S::Uri; type Repo = S::Repo; - type Cid = Set; + type Blobs = S::Blobs; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Value = Set; + type Moderation = S::Moderation; + } + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData S>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { + type Uri = S::Uri; + type Repo = S::Repo; + type Blobs = S::Blobs; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Moderation = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); - ///Marker type for the `blobs` field - pub struct blobs(()); - ///Marker type for the `moderation` field - pub struct moderation(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `blobs` field + pub struct blobs(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `moderation` field + pub struct moderation(()); } } @@ -9793,13 +9793,13 @@ where impl<'a, S> RecordViewDetailBuilder<'a, S> where S: record_view_detail_state::State, - S::Value: record_view_detail_state::IsSet, S::Uri: record_view_detail_state::IsSet, - S::IndexedAt: record_view_detail_state::IsSet, - S::Blobs: record_view_detail_state::IsSet, - S::Moderation: record_view_detail_state::IsSet, S::Repo: record_view_detail_state::IsSet, + S::Blobs: record_view_detail_state::IsSet, S::Cid: record_view_detail_state::IsSet, + S::IndexedAt: record_view_detail_state::IsSet, + S::Value: record_view_detail_state::IsSet, + S::Moderation: record_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordViewDetail<'a> { @@ -10100,85 +10100,85 @@ pub mod repo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Handle; - type Did; type RelatedRecords; + type Did; + type IndexedAt; type Moderation; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; - type Handle = Unset; - type Did = Unset; type RelatedRecords = Unset; + type Did = Unset; + type IndexedAt = Unset; type Moderation = Unset; + type Handle = Unset; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Handle = S::Handle; + ///State transition - sets the `related_records` field to Set + pub struct SetRelatedRecords(PhantomData S>); + impl sealed::Sealed for SetRelatedRecords {} + impl State for SetRelatedRecords { + type RelatedRecords = Set; type Did = S::Did; - type RelatedRecords = S::RelatedRecords; - type Moderation = S::Moderation; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { type IndexedAt = S::IndexedAt; - type Handle = Set; - type Did = S::Did; - type RelatedRecords = S::RelatedRecords; type Moderation = S::Moderation; + type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type IndexedAt = S::IndexedAt; - type Handle = S::Handle; - type Did = Set; type RelatedRecords = S::RelatedRecords; - type Moderation = S::Moderation; - } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData S>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { + type Did = Set; type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; type Handle = S::Handle; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type RelatedRecords = S::RelatedRecords; type Did = S::Did; - type RelatedRecords = Set; + type IndexedAt = Set; type Moderation = S::Moderation; + type Handle = S::Handle; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { + type RelatedRecords = S::RelatedRecords; + type Did = S::Did; type IndexedAt = S::IndexedAt; + type Moderation = Set; type Handle = S::Handle; - type Did = S::Did; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { type RelatedRecords = S::RelatedRecords; - type Moderation = Set; + type Did = S::Did; + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); - ///Marker type for the `handle` field - pub struct handle(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `related_records` field pub struct related_records(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -10434,11 +10434,11 @@ impl<'a, S: repo_view_state::State> RepoViewBuilder<'a, S> { impl<'a, S> RepoViewBuilder<'a, S> where S: repo_view_state::State, - S::IndexedAt: repo_view_state::IsSet, - S::Handle: repo_view_state::IsSet, - S::Did: repo_view_state::IsSet, S::RelatedRecords: repo_view_state::IsSet, + S::Did: repo_view_state::IsSet, + S::IndexedAt: repo_view_state::IsSet, S::Moderation: repo_view_state::IsSet, + S::Handle: repo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoView<'a> { @@ -10561,84 +10561,84 @@ pub mod repo_view_detail_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type RelatedRecords; - type IndexedAt; - type Handle; type Moderation; + type Handle; + type IndexedAt; + type RelatedRecords; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type RelatedRecords = Unset; - type IndexedAt = Unset; - type Handle = Unset; type Moderation = Unset; + type Handle = Unset; + type IndexedAt = Unset; + type RelatedRecords = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type RelatedRecords = S::RelatedRecords; - type IndexedAt = S::IndexedAt; - type Handle = S::Handle; type Moderation = S::Moderation; - } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData S>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { - type Did = S::Did; - type RelatedRecords = Set; - type IndexedAt = S::IndexedAt; type Handle = S::Handle; - type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type RelatedRecords = S::RelatedRecords; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData S>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { type Did = S::Did; - type RelatedRecords = S::RelatedRecords; - type IndexedAt = Set; + type Moderation = Set; type Handle = S::Handle; - type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type RelatedRecords = S::RelatedRecords; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = S::Did; - type RelatedRecords = S::RelatedRecords; - type IndexedAt = S::IndexedAt; - type Handle = Set; type Moderation = S::Moderation; + type Handle = Set; + type IndexedAt = S::IndexedAt; + type RelatedRecords = S::RelatedRecords; } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData S>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Did = S::Did; + type Moderation = S::Moderation; + type Handle = S::Handle; + type IndexedAt = Set; type RelatedRecords = S::RelatedRecords; - type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `related_records` field to Set + pub struct SetRelatedRecords(PhantomData S>); + impl sealed::Sealed for SetRelatedRecords {} + impl State for SetRelatedRecords { + type Did = S::Did; + type Moderation = S::Moderation; type Handle = S::Handle; - type Moderation = Set; + type IndexedAt = S::IndexedAt; + type RelatedRecords = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `related_records` field - pub struct related_records(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `handle` field + pub struct handle(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `related_records` field + pub struct related_records(()); } } @@ -10958,10 +10958,10 @@ impl<'a, S> RepoViewDetailBuilder<'a, S> where S: repo_view_detail_state::State, S::Did: repo_view_detail_state::IsSet, - S::RelatedRecords: repo_view_detail_state::IsSet, - S::IndexedAt: repo_view_detail_state::IsSet, - S::Handle: repo_view_detail_state::IsSet, S::Moderation: repo_view_detail_state::IsSet, + S::Handle: repo_view_detail_state::IsSet, + S::IndexedAt: repo_view_detail_state::IsSet, + S::RelatedRecords: repo_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoViewDetail<'a> { @@ -11208,177 +11208,177 @@ pub mod reporter_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AccountReportCount; - type RecordReportCount; + type ReportedRecordCount; type ReportedAccountCount; type LabeledAccountCount; + type TakendownRecordCount; type TakendownAccountCount; - type LabeledRecordCount; + type AccountReportCount; + type RecordReportCount; type Did; - type TakendownRecordCount; - type ReportedRecordCount; + type LabeledRecordCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AccountReportCount = Unset; - type RecordReportCount = Unset; + type ReportedRecordCount = Unset; type ReportedAccountCount = Unset; type LabeledAccountCount = Unset; + type TakendownRecordCount = Unset; type TakendownAccountCount = Unset; - type LabeledRecordCount = Unset; + type AccountReportCount = Unset; + type RecordReportCount = Unset; type Did = Unset; - type TakendownRecordCount = Unset; - type ReportedRecordCount = Unset; + type LabeledRecordCount = Unset; } - ///State transition - sets the `account_report_count` field to Set - pub struct SetAccountReportCount(PhantomData S>); - impl sealed::Sealed for SetAccountReportCount {} - impl State for SetAccountReportCount { - type AccountReportCount = Set; - type RecordReportCount = S::RecordReportCount; + ///State transition - sets the `reported_record_count` field to Set + pub struct SetReportedRecordCount(PhantomData S>); + impl sealed::Sealed for SetReportedRecordCount {} + impl State for SetReportedRecordCount { + type ReportedRecordCount = Set; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; - type Did = S::Did; type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; - } - ///State transition - sets the `record_report_count` field to Set - pub struct SetRecordReportCount(PhantomData S>); - impl sealed::Sealed for SetRecordReportCount {} - impl State for SetRecordReportCount { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = Set; - type ReportedAccountCount = S::ReportedAccountCount; - type LabeledAccountCount = S::LabeledAccountCount; type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; type Did = S::Did; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; + type LabeledRecordCount = S::LabeledRecordCount; } ///State transition - sets the `reported_account_count` field to Set pub struct SetReportedAccountCount(PhantomData S>); impl sealed::Sealed for SetReportedAccountCount {} impl State for SetReportedAccountCount { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = Set; type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; type Did = S::Did; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; + type LabeledRecordCount = S::LabeledRecordCount; } ///State transition - sets the `labeled_account_count` field to Set pub struct SetLabeledAccountCount(PhantomData S>); impl sealed::Sealed for SetLabeledAccountCount {} impl State for SetLabeledAccountCount { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = Set; + type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; type Did = S::Did; - type TakendownRecordCount = S::TakendownRecordCount; + type LabeledRecordCount = S::LabeledRecordCount; + } + ///State transition - sets the `takendown_record_count` field to Set + pub struct SetTakendownRecordCount(PhantomData S>); + impl sealed::Sealed for SetTakendownRecordCount {} + impl State for SetTakendownRecordCount { type ReportedRecordCount = S::ReportedRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = Set; + type TakendownAccountCount = S::TakendownAccountCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; + type Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; } ///State transition - sets the `takendown_account_count` field to Set pub struct SetTakendownAccountCount(PhantomData S>); impl sealed::Sealed for SetTakendownAccountCount {} impl State for SetTakendownAccountCount { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; - type TakendownAccountCount = Set; - type LabeledRecordCount = S::LabeledRecordCount; - type Did = S::Did; type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; - } - ///State transition - sets the `labeled_record_count` field to Set - pub struct SetLabeledRecordCount(PhantomData S>); - impl sealed::Sealed for SetLabeledRecordCount {} - impl State for SetLabeledRecordCount { + type TakendownAccountCount = Set; type AccountReportCount = S::AccountReportCount; type RecordReportCount = S::RecordReportCount; - type ReportedAccountCount = S::ReportedAccountCount; - type LabeledAccountCount = S::LabeledAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = Set; type Did = S::Did; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; + type LabeledRecordCount = S::LabeledRecordCount; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = S::RecordReportCount; + ///State transition - sets the `account_report_count` field to Set + pub struct SetAccountReportCount(PhantomData S>); + impl sealed::Sealed for SetAccountReportCount {} + impl State for SetAccountReportCount { + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; + type AccountReportCount = Set; + type RecordReportCount = S::RecordReportCount; + type Did = S::Did; type LabeledRecordCount = S::LabeledRecordCount; - type Did = Set; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; } - ///State transition - sets the `takendown_record_count` field to Set - pub struct SetTakendownRecordCount(PhantomData S>); - impl sealed::Sealed for SetTakendownRecordCount {} - impl State for SetTakendownRecordCount { - type AccountReportCount = S::AccountReportCount; - type RecordReportCount = S::RecordReportCount; + ///State transition - sets the `record_report_count` field to Set + pub struct SetRecordReportCount(PhantomData S>); + impl sealed::Sealed for SetRecordReportCount {} + impl State for SetRecordReportCount { + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = Set; type Did = S::Did; - type TakendownRecordCount = Set; - type ReportedRecordCount = S::ReportedRecordCount; + type LabeledRecordCount = S::LabeledRecordCount; } - ///State transition - sets the `reported_record_count` field to Set - pub struct SetReportedRecordCount(PhantomData S>); - impl sealed::Sealed for SetReportedRecordCount {} - impl State for SetReportedRecordCount { + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type ReportedRecordCount = S::ReportedRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; type AccountReportCount = S::AccountReportCount; type RecordReportCount = S::RecordReportCount; + type Did = Set; + type LabeledRecordCount = S::LabeledRecordCount; + } + ///State transition - sets the `labeled_record_count` field to Set + pub struct SetLabeledRecordCount(PhantomData S>); + impl sealed::Sealed for SetLabeledRecordCount {} + impl State for SetLabeledRecordCount { + type ReportedRecordCount = S::ReportedRecordCount; type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; type Did = S::Did; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = Set; + type LabeledRecordCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `account_report_count` field - pub struct account_report_count(()); - ///Marker type for the `record_report_count` field - pub struct record_report_count(()); + ///Marker type for the `reported_record_count` field + pub struct reported_record_count(()); ///Marker type for the `reported_account_count` field pub struct reported_account_count(()); ///Marker type for the `labeled_account_count` field pub struct labeled_account_count(()); + ///Marker type for the `takendown_record_count` field + pub struct takendown_record_count(()); ///Marker type for the `takendown_account_count` field pub struct takendown_account_count(()); - ///Marker type for the `labeled_record_count` field - pub struct labeled_record_count(()); + ///Marker type for the `account_report_count` field + pub struct account_report_count(()); + ///Marker type for the `record_report_count` field + pub struct record_report_count(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `takendown_record_count` field - pub struct takendown_record_count(()); - ///Marker type for the `reported_record_count` field - pub struct reported_record_count(()); + ///Marker type for the `labeled_record_count` field + pub struct labeled_record_count(()); } } @@ -11601,15 +11601,15 @@ where impl<'a, S> ReporterStatsBuilder<'a, S> where S: reporter_stats_state::State, - S::AccountReportCount: reporter_stats_state::IsSet, - S::RecordReportCount: reporter_stats_state::IsSet, + S::ReportedRecordCount: reporter_stats_state::IsSet, S::ReportedAccountCount: reporter_stats_state::IsSet, S::LabeledAccountCount: reporter_stats_state::IsSet, + S::TakendownRecordCount: reporter_stats_state::IsSet, S::TakendownAccountCount: reporter_stats_state::IsSet, - S::LabeledRecordCount: reporter_stats_state::IsSet, + S::AccountReportCount: reporter_stats_state::IsSet, + S::RecordReportCount: reporter_stats_state::IsSet, S::Did: reporter_stats_state::IsSet, - S::TakendownRecordCount: reporter_stats_state::IsSet, - S::ReportedRecordCount: reporter_stats_state::IsSet, + S::LabeledRecordCount: reporter_stats_state::IsSet, { /// Build the final struct pub fn build(self) -> ReporterStats<'a> { @@ -11887,105 +11887,105 @@ pub mod scheduled_action_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Status; + type Id; type CreatedBy; - type Action; type CreatedAt; type Did; + type Action; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type Status = Unset; + type Id = Unset; type CreatedBy = Unset; - type Action = Unset; type CreatedAt = Unset; type Did = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type Status = S::Status; - type CreatedBy = S::CreatedBy; - type Action = S::Action; - type CreatedAt = S::CreatedAt; - type Did = S::Did; + type Action = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Id = S::Id; type Status = Set; + type Id = S::Id; type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Did = S::Did; type Action = S::Action; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Status = S::Status; + type Id = Set; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Did = S::Did; + type Action = S::Action; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Id = S::Id; type Status = S::Status; - type CreatedBy = Set; - type Action = S::Action; - type CreatedAt = S::CreatedAt; - type Did = S::Did; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { type Id = S::Id; - type Status = S::Status; - type CreatedBy = S::CreatedBy; - type Action = Set; + type CreatedBy = Set; type CreatedAt = S::CreatedAt; type Did = S::Did; + type Action = S::Action; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Id = S::Id; type Status = S::Status; + type Id = S::Id; type CreatedBy = S::CreatedBy; - type Action = S::Action; type CreatedAt = Set; type Did = S::Did; + type Action = S::Action; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Id = S::Id; type Status = S::Status; + type Id = S::Id; type CreatedBy = S::CreatedBy; - type Action = S::Action; type CreatedAt = S::CreatedAt; type Did = Set; + type Action = S::Action; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Status = S::Status; + type Id = S::Id; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Did = S::Did; + type Action = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `action` field - pub struct action(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -12322,12 +12322,12 @@ impl<'a, S: scheduled_action_view_state::State> ScheduledActionViewBuilder<'a, S impl<'a, S> ScheduledActionViewBuilder<'a, S> where S: scheduled_action_view_state::State, - S::Id: scheduled_action_view_state::IsSet, S::Status: scheduled_action_view_state::IsSet, + S::Id: scheduled_action_view_state::IsSet, S::CreatedBy: scheduled_action_view_state::IsSet, - S::Action: scheduled_action_view_state::IsSet, S::CreatedAt: scheduled_action_view_state::IsSet, S::Did: scheduled_action_view_state::IsSet, + S::Action: scheduled_action_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduledActionView<'a> { @@ -12617,85 +12617,85 @@ pub mod subject_status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UpdatedAt; - type ReviewState; type Id; type CreatedAt; type Subject; + type UpdatedAt; + type ReviewState; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UpdatedAt = Unset; - type ReviewState = Unset; type Id = Unset; type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type UpdatedAt = Set; - type ReviewState = S::ReviewState; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - } - ///State transition - sets the `review_state` field to Set - pub struct SetReviewState(PhantomData S>); - impl sealed::Sealed for SetReviewState {} - impl State for SetReviewState { - type UpdatedAt = S::UpdatedAt; - type ReviewState = Set; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; + type UpdatedAt = Unset; + type ReviewState = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type UpdatedAt = S::UpdatedAt; - type ReviewState = S::ReviewState; type Id = Set; type CreatedAt = S::CreatedAt; type Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; + type ReviewState = S::ReviewState; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type UpdatedAt = S::UpdatedAt; - type ReviewState = S::ReviewState; type Id = S::Id; type CreatedAt = Set; type Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; + type ReviewState = S::ReviewState; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type Id = S::Id; + type CreatedAt = S::CreatedAt; + type Subject = Set; type UpdatedAt = S::UpdatedAt; type ReviewState = S::ReviewState; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { type Id = S::Id; type CreatedAt = S::CreatedAt; - type Subject = Set; + type Subject = S::Subject; + type UpdatedAt = Set; + type ReviewState = S::ReviewState; + } + ///State transition - sets the `review_state` field to Set + pub struct SetReviewState(PhantomData S>); + impl sealed::Sealed for SetReviewState {} + impl State for SetReviewState { + type Id = S::Id; + type CreatedAt = S::CreatedAt; + type Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; + type ReviewState = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `updated_at` field - pub struct updated_at(()); - ///Marker type for the `review_state` field - pub struct review_state(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `review_state` field + pub struct review_state(()); } } @@ -13230,11 +13230,11 @@ where impl<'a, S> SubjectStatusViewBuilder<'a, S> where S: subject_status_view_state::State, - S::UpdatedAt: subject_status_view_state::IsSet, - S::ReviewState: subject_status_view_state::IsSet, S::Id: subject_status_view_state::IsSet, S::CreatedAt: subject_status_view_state::IsSet, S::Subject: subject_status_view_state::IsSet, + S::UpdatedAt: subject_status_view_state::IsSet, + S::ReviewState: subject_status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectStatusView<'a> { @@ -13430,37 +13430,37 @@ pub mod subject_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Subject; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Subject = Unset; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData S>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Subject = S::Subject; + type Type = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Type = S::Type; type Subject = Set; + type Type = S::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData S>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Subject = S::Subject; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -13613,8 +13613,8 @@ where impl<'a, S> SubjectViewBuilder<'a, S> where S: subject_view_state::State, - S::Type: subject_view_state::IsSet, S::Subject: subject_view_state::IsSet, + S::Type: subject_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectView<'a> { @@ -13747,50 +13747,50 @@ pub mod video_details_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Height; - type Width; type Length; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Height = Unset; - type Width = Unset; type Length = Unset; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { type Height = Set; - type Width = S::Width; - type Length = S::Length; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData S>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Height = S::Height; - type Width = Set; type Length = S::Length; + type Width = S::Width; } ///State transition - sets the `length` field to Set pub struct SetLength(PhantomData S>); impl sealed::Sealed for SetLength {} impl State for SetLength { type Height = S::Height; - type Width = S::Width; type Length = Set; + type Width = S::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = S::Height; + type Length = S::Length; + type Width = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `height` field pub struct height(()); - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `length` field pub struct length(()); + ///Marker type for the `width` field + pub struct width(()); } } @@ -13884,8 +13884,8 @@ impl<'a, S> VideoDetailsBuilder<'a, S> where S: video_details_state::State, S::Height: video_details_state::IsSet, - S::Width: video_details_state::IsSet, S::Length: video_details_state::IsSet, + S::Width: video_details_state::IsSet, { /// Build the final struct pub fn build(self) -> VideoDetails<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs b/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs index 9017601..43a4388 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs @@ -37,37 +37,37 @@ pub mod cancellation_results_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Failed; type Succeeded; + type Failed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Failed = Unset; type Succeeded = Unset; - } - ///State transition - sets the `failed` field to Set - pub struct SetFailed(PhantomData S>); - impl sealed::Sealed for SetFailed {} - impl State for SetFailed { - type Failed = Set; - type Succeeded = S::Succeeded; + type Failed = Unset; } ///State transition - sets the `succeeded` field to Set pub struct SetSucceeded(PhantomData S>); impl sealed::Sealed for SetSucceeded {} impl State for SetSucceeded { - type Failed = S::Failed; type Succeeded = Set; + type Failed = S::Failed; + } + ///State transition - sets the `failed` field to Set + pub struct SetFailed(PhantomData S>); + impl sealed::Sealed for SetFailed {} + impl State for SetFailed { + type Succeeded = S::Succeeded; + type Failed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `failed` field - pub struct failed(()); ///Marker type for the `succeeded` field pub struct succeeded(()); + ///Marker type for the `failed` field + pub struct failed(()); } } @@ -152,8 +152,8 @@ where impl<'a, S> CancellationResultsBuilder<'a, S> where S: cancellation_results_state::State, - S::Failed: cancellation_results_state::IsSet, S::Succeeded: cancellation_results_state::IsSet, + S::Failed: cancellation_results_state::IsSet, { /// Build the final struct pub fn build(self) -> CancellationResults<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs index 47944b9..4e31137 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs @@ -47,51 +47,51 @@ pub mod emit_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; - type Subject; type Event; + type Subject; + type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedBy = Unset; - type Subject = Unset; type Event = Unset; + type Subject = Unset; + type CreatedBy = Unset; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData S>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type Event = Set; type Subject = S::Subject; - type Event = S::Event; + type CreatedBy = S::CreatedBy; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedBy = S::CreatedBy; - type Subject = Set; type Event = S::Event; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData S>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { + type Subject = Set; type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Event = S::Event; type Subject = S::Subject; - type Event = Set; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_by` field - pub struct created_by(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `event` field pub struct event(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `created_by` field + pub struct created_by(()); } } @@ -244,9 +244,9 @@ impl<'a, S: emit_event_state::State> EmitEventBuilder<'a, S> { impl<'a, S> EmitEventBuilder<'a, S> where S: emit_event_state::State, - S::CreatedBy: emit_event_state::IsSet, - S::Subject: emit_event_state::IsSet, S::Event: emit_event_state::IsSet, + S::Subject: emit_event_state::IsSet, + S::CreatedBy: emit_event_state::IsSet, { /// Build the final struct pub fn build(self) -> EmitEvent<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs b/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs index 3d0ed8f..301799a 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -219,37 +219,37 @@ pub mod timeline_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Day; type Summary; + type Day; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Day = Unset; type Summary = Unset; - } - ///State transition - sets the `day` field to Set - pub struct SetDay(PhantomData S>); - impl sealed::Sealed for SetDay {} - impl State for SetDay { - type Day = Set; - type Summary = S::Summary; + type Day = Unset; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData S>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { - type Day = S::Day; type Summary = Set; + type Day = S::Day; + } + ///State transition - sets the `day` field to Set + pub struct SetDay(PhantomData S>); + impl sealed::Sealed for SetDay {} + impl State for SetDay { + type Summary = S::Summary; + type Day = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `day` field - pub struct day(()); ///Marker type for the `summary` field pub struct summary(()); + ///Marker type for the `day` field + pub struct day(()); } } @@ -334,8 +334,8 @@ where impl<'a, S> TimelineItemBuilder<'a, S> where S: timeline_item_state::State, - S::Day: timeline_item_state::IsSet, S::Summary: timeline_item_state::IsSet, + S::Day: timeline_item_state::IsSet, { /// Build the final struct pub fn build(self) -> TimelineItem<'a> { @@ -575,51 +575,51 @@ pub mod timeline_item_summary_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Count; - type EventSubjectType; type EventType; + type EventSubjectType; + type Count; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Count = Unset; - type EventSubjectType = Unset; type EventType = Unset; + type EventSubjectType = Unset; + type Count = Unset; } - ///State transition - sets the `count` field to Set - pub struct SetCount(PhantomData S>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { - type Count = Set; + ///State transition - sets the `event_type` field to Set + pub struct SetEventType(PhantomData S>); + impl sealed::Sealed for SetEventType {} + impl State for SetEventType { + type EventType = Set; type EventSubjectType = S::EventSubjectType; - type EventType = S::EventType; + type Count = S::Count; } ///State transition - sets the `event_subject_type` field to Set pub struct SetEventSubjectType(PhantomData S>); impl sealed::Sealed for SetEventSubjectType {} impl State for SetEventSubjectType { - type Count = S::Count; - type EventSubjectType = Set; type EventType = S::EventType; - } - ///State transition - sets the `event_type` field to Set - pub struct SetEventType(PhantomData S>); - impl sealed::Sealed for SetEventType {} - impl State for SetEventType { + type EventSubjectType = Set; type Count = S::Count; + } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData S>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { + type EventType = S::EventType; type EventSubjectType = S::EventSubjectType; - type EventType = Set; + type Count = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `count` field - pub struct count(()); - ///Marker type for the `event_subject_type` field - pub struct event_subject_type(()); ///Marker type for the `event_type` field pub struct event_type(()); + ///Marker type for the `event_subject_type` field + pub struct event_subject_type(()); + ///Marker type for the `count` field + pub struct count(()); } } @@ -715,9 +715,9 @@ where impl<'a, S> TimelineItemSummaryBuilder<'a, S> where S: timeline_item_summary_state::State, - S::Count: timeline_item_summary_state::IsSet, - S::EventSubjectType: timeline_item_summary_state::IsSet, S::EventType: timeline_item_summary_state::IsSet, + S::EventSubjectType: timeline_item_summary_state::IsSet, + S::Count: timeline_item_summary_state::IsSet, { /// Build the final struct pub fn build(self) -> TimelineItemSummary<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs b/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs index 0d6f9e2..9548aa4 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs @@ -762,66 +762,66 @@ pub mod schedule_action_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Action; + type Subjects; type CreatedBy; type Scheduling; - type Subjects; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Action = Unset; + type Subjects = Unset; type CreatedBy = Unset; type Scheduling = Unset; - type Subjects = Unset; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { type Action = Set; + type Subjects = S::Subjects; + type CreatedBy = S::CreatedBy; + type Scheduling = S::Scheduling; + } + ///State transition - sets the `subjects` field to Set + pub struct SetSubjects(PhantomData S>); + impl sealed::Sealed for SetSubjects {} + impl State for SetSubjects { + type Action = S::Action; + type Subjects = Set; type CreatedBy = S::CreatedBy; type Scheduling = S::Scheduling; - type Subjects = S::Subjects; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { type Action = S::Action; + type Subjects = S::Subjects; type CreatedBy = Set; type Scheduling = S::Scheduling; - type Subjects = S::Subjects; } ///State transition - sets the `scheduling` field to Set pub struct SetScheduling(PhantomData S>); impl sealed::Sealed for SetScheduling {} impl State for SetScheduling { type Action = S::Action; - type CreatedBy = S::CreatedBy; - type Scheduling = Set; type Subjects = S::Subjects; - } - ///State transition - sets the `subjects` field to Set - pub struct SetSubjects(PhantomData S>); - impl sealed::Sealed for SetSubjects {} - impl State for SetSubjects { - type Action = S::Action; type CreatedBy = S::CreatedBy; - type Scheduling = S::Scheduling; - type Subjects = Set; + type Scheduling = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `action` field pub struct action(()); + ///Marker type for the `subjects` field + pub struct subjects(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `scheduling` field pub struct scheduling(()); - ///Marker type for the `subjects` field - pub struct subjects(()); } } @@ -961,9 +961,9 @@ impl<'a, S> ScheduleActionBuilder<'a, S> where S: schedule_action_state::State, S::Action: schedule_action_state::IsSet, + S::Subjects: schedule_action_state::IsSet, S::CreatedBy: schedule_action_state::IsSet, S::Scheduling: schedule_action_state::IsSet, - S::Subjects: schedule_action_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduleAction<'a> { @@ -1072,37 +1072,37 @@ pub mod scheduled_action_results_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Succeeded; type Failed; + type Succeeded; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Succeeded = Unset; type Failed = Unset; - } - ///State transition - sets the `succeeded` field to Set - pub struct SetSucceeded(PhantomData S>); - impl sealed::Sealed for SetSucceeded {} - impl State for SetSucceeded { - type Succeeded = Set; - type Failed = S::Failed; + type Succeeded = Unset; } ///State transition - sets the `failed` field to Set pub struct SetFailed(PhantomData S>); impl sealed::Sealed for SetFailed {} impl State for SetFailed { - type Succeeded = S::Succeeded; type Failed = Set; + type Succeeded = S::Succeeded; + } + ///State transition - sets the `succeeded` field to Set + pub struct SetSucceeded(PhantomData S>); + impl sealed::Sealed for SetSucceeded {} + impl State for SetSucceeded { + type Failed = S::Failed; + type Succeeded = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `succeeded` field - pub struct succeeded(()); ///Marker type for the `failed` field pub struct failed(()); + ///Marker type for the `succeeded` field + pub struct succeeded(()); } } @@ -1188,8 +1188,8 @@ where impl<'a, S> ScheduledActionResultsBuilder<'a, S> where S: scheduled_action_results_state::State, - S::Succeeded: scheduled_action_results_state::IsSet, S::Failed: scheduled_action_results_state::IsSet, + S::Succeeded: scheduled_action_results_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduledActionResults<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink.rs b/crates/weaver-api/src/tools_ozone/safelink.rs index 86c00f4..0a343b9 100644 --- a/crates/weaver-api/src/tools_ozone/safelink.rs +++ b/crates/weaver-api/src/tools_ozone/safelink.rs @@ -138,151 +138,151 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Reason; + type CreatedBy; type EventType; + type Action; type Id; type Url; - type Reason; type Pattern; - type CreatedBy; type CreatedAt; - type Action; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Reason = Unset; + type CreatedBy = Unset; type EventType = Unset; + type Action = Unset; type Id = Unset; type Url = Unset; - type Reason = Unset; type Pattern = Unset; - type CreatedBy = Unset; type CreatedAt = Unset; - type Action = Unset; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Reason = Set; + type CreatedBy = S::CreatedBy; + type EventType = S::EventType; + type Action = S::Action; + type Id = S::Id; + type Url = S::Url; + type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Reason = S::Reason; + type CreatedBy = Set; + type EventType = S::EventType; + type Action = S::Action; + type Id = S::Id; + type Url = S::Url; + type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData S>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { + type Reason = S::Reason; + type CreatedBy = S::CreatedBy; type EventType = Set; + type Action = S::Action; type Id = S::Id; type Url = S::Url; - type Reason = S::Reason; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Reason = S::Reason; type CreatedBy = S::CreatedBy; + type EventType = S::EventType; + type Action = Set; + type Id = S::Id; + type Url = S::Url; + type Pattern = S::Pattern; type CreatedAt = S::CreatedAt; - type Action = S::Action; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { + type Reason = S::Reason; + type CreatedBy = S::CreatedBy; type EventType = S::EventType; + type Action = S::Action; type Id = Set; type Url = S::Url; - type Reason = S::Reason; type Pattern = S::Pattern; - type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; - type Action = S::Action; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type EventType = S::EventType; - type Id = S::Id; - type Url = Set; type Reason = S::Reason; - type Pattern = S::Pattern; type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Action = S::Action; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { type EventType = S::EventType; + type Action = S::Action; type Id = S::Id; - type Url = S::Url; - type Reason = Set; + type Url = Set; type Pattern = S::Pattern; - type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; - type Action = S::Action; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type EventType = S::EventType; - type Id = S::Id; - type Url = S::Url; type Reason = S::Reason; - type Pattern = Set; type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Action = S::Action; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { type EventType = S::EventType; + type Action = S::Action; type Id = S::Id; type Url = S::Url; - type Reason = S::Reason; - type Pattern = S::Pattern; - type CreatedBy = Set; + type Pattern = Set; type CreatedAt = S::CreatedAt; - type Action = S::Action; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type EventType = S::EventType; - type Id = S::Id; - type Url = S::Url; type Reason = S::Reason; - type Pattern = S::Pattern; type CreatedBy = S::CreatedBy; - type CreatedAt = Set; - type Action = S::Action; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { type EventType = S::EventType; + type Action = S::Action; type Id = S::Id; type Url = S::Url; - type Reason = S::Reason; type Pattern = S::Pattern; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Action = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `event_type` field pub struct event_type(()); + ///Marker type for the `action` field + pub struct action(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `url` field pub struct url(()); - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `pattern` field pub struct pattern(()); - ///Marker type for the `created_by` field - pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `action` field - pub struct action(()); } } @@ -502,14 +502,14 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, + S::Reason: event_state::IsSet, + S::CreatedBy: event_state::IsSet, S::EventType: event_state::IsSet, + S::Action: event_state::IsSet, S::Id: event_state::IsSet, S::Url: event_state::IsSet, - S::Reason: event_state::IsSet, S::Pattern: event_state::IsSet, - S::CreatedBy: event_state::IsSet, S::CreatedAt: event_state::IsSet, - S::Action: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -1233,11 +1233,11 @@ pub mod url_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; - type Url; type CreatedBy; - type CreatedAt; type Action; + type Reason; + type CreatedAt; + type Url; type UpdatedAt; type Pattern; } @@ -1245,47 +1245,47 @@ pub mod url_rule_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; - type Url = Unset; type CreatedBy = Unset; - type CreatedAt = Unset; type Action = Unset; + type Reason = Unset; + type CreatedAt = Unset; + type Url = Unset; type UpdatedAt = Unset; type Pattern = Unset; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type Url = S::Url; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedBy = Set; type Action = S::Action; + type Reason = S::Reason; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData S>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Reason = S::Reason; - type Url = Set; + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type CreatedBy = S::CreatedBy; + type Action = Set; + type Reason = S::Reason; type CreatedAt = S::CreatedAt; - type Action = S::Action; + type Url = S::Url; type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type Reason = S::Reason; - type Url = S::Url; - type CreatedBy = Set; - type CreatedAt = S::CreatedAt; + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type CreatedBy = S::CreatedBy; type Action = S::Action; + type Reason = Set; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; } @@ -1293,23 +1293,23 @@ pub mod url_rule_state { pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Reason = S::Reason; - type Url = S::Url; type CreatedBy = S::CreatedBy; - type CreatedAt = Set; type Action = S::Action; + type Reason = S::Reason; + type CreatedAt = Set; + type Url = S::Url; type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Reason = S::Reason; - type Url = S::Url; + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData S>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { type CreatedBy = S::CreatedBy; + type Action = S::Action; + type Reason = S::Reason; type CreatedAt = S::CreatedAt; - type Action = Set; + type Url = Set; type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; } @@ -1317,11 +1317,11 @@ pub mod url_rule_state { pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Reason = S::Reason; - type Url = S::Url; type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; type Action = S::Action; + type Reason = S::Reason; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type UpdatedAt = Set; type Pattern = S::Pattern; } @@ -1329,27 +1329,27 @@ pub mod url_rule_state { pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Reason = S::Reason; - type Url = S::Url; type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; type Action = S::Action; + type Reason = S::Reason; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type UpdatedAt = S::UpdatedAt; type Pattern = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reason` field - pub struct reason(()); - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `action` field pub struct action(()); + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `url` field + pub struct url(()); ///Marker type for the `updated_at` field pub struct updated_at(()); ///Marker type for the `pattern` field @@ -1543,11 +1543,11 @@ where impl<'a, S> UrlRuleBuilder<'a, S> where S: url_rule_state::State, - S::Reason: url_rule_state::IsSet, - S::Url: url_rule_state::IsSet, S::CreatedBy: url_rule_state::IsSet, - S::CreatedAt: url_rule_state::IsSet, S::Action: url_rule_state::IsSet, + S::Reason: url_rule_state::IsSet, + S::CreatedAt: url_rule_state::IsSet, + S::Url: url_rule_state::IsSet, S::UpdatedAt: url_rule_state::IsSet, S::Pattern: url_rule_state::IsSet, { diff --git a/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs index 40e4f54..c14b765 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs @@ -46,67 +46,67 @@ pub mod add_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; + type Action; type Pattern; type Reason; - type Action; + type Url; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Url = Unset; + type Action = Unset; type Pattern = Unset; type Reason = Unset; - type Action = Unset; + type Url = Unset; } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData S>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Action = Set; type Pattern = S::Pattern; type Reason = S::Reason; - type Action = S::Action; + type Url = S::Url; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Url = S::Url; + type Action = S::Action; type Pattern = Set; type Reason = S::Reason; - type Action = S::Action; + type Url = S::Url; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Url = S::Url; + type Action = S::Action; type Pattern = S::Pattern; type Reason = Set; - type Action = S::Action; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { type Url = S::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData S>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Action = S::Action; type Pattern = S::Pattern; type Reason = S::Reason; - type Action = Set; + type Url = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `url` field - pub struct url(()); + ///Marker type for the `action` field + pub struct action(()); ///Marker type for the `pattern` field pub struct pattern(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `action` field - pub struct action(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -256,10 +256,10 @@ where impl<'a, S> AddRuleBuilder<'a, S> where S: add_rule_state::State, - S::Url: add_rule_state::IsSet, + S::Action: add_rule_state::IsSet, S::Pattern: add_rule_state::IsSet, S::Reason: add_rule_state::IsSet, - S::Action: add_rule_state::IsSet, + S::Url: add_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> AddRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink/remove_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/remove_rule.rs index c7be4c7..2fc4176 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/remove_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/remove_rule.rs @@ -42,37 +42,37 @@ pub mod remove_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Pattern; type Url; + type Pattern; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Pattern = Unset; type Url = Unset; - } - ///State transition - sets the `pattern` field to Set - pub struct SetPattern(PhantomData S>); - impl sealed::Sealed for SetPattern {} - impl State for SetPattern { - type Pattern = Set; - type Url = S::Url; + type Pattern = Unset; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Pattern = S::Pattern; type Url = Set; + type Pattern = S::Pattern; + } + ///State transition - sets the `pattern` field to Set + pub struct SetPattern(PhantomData S>); + impl sealed::Sealed for SetPattern {} + impl State for SetPattern { + type Url = S::Url; + type Pattern = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `pattern` field - pub struct pattern(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `pattern` field + pub struct pattern(()); } } @@ -182,8 +182,8 @@ where impl<'a, S> RemoveRuleBuilder<'a, S> where S: remove_rule_state::State, - S::Pattern: remove_rule_state::IsSet, S::Url: remove_rule_state::IsSet, + S::Pattern: remove_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> RemoveRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs index bb789d4..a832dc3 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs @@ -46,65 +46,65 @@ pub mod update_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Pattern; type Reason; + type Url; type Action; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Url = Unset; type Pattern = Unset; type Reason = Unset; + type Url = Unset; type Action = Unset; } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData S>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Pattern = S::Pattern; - type Reason = S::Reason; - type Action = S::Action; - } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Url = S::Url; type Pattern = Set; type Reason = S::Reason; + type Url = S::Url; type Action = S::Action; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Url = S::Url; type Pattern = S::Pattern; type Reason = Set; + type Url = S::Url; + type Action = S::Action; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData S>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Pattern = S::Pattern; + type Reason = S::Reason; + type Url = Set; type Action = S::Action; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type Url = S::Url; type Pattern = S::Pattern; type Reason = S::Reason; + type Url = S::Url; type Action = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `pattern` field pub struct pattern(()); ///Marker type for the `reason` field pub struct reason(()); + ///Marker type for the `url` field + pub struct url(()); ///Marker type for the `action` field pub struct action(()); } @@ -256,9 +256,9 @@ where impl<'a, S> UpdateRuleBuilder<'a, S> where S: update_rule_state::State, - S::Url: update_rule_state::IsSet, S::Pattern: update_rule_state::IsSet, S::Reason: update_rule_state::IsSet, + S::Url: update_rule_state::IsSet, S::Action: update_rule_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/tools_ozone/set.rs b/crates/weaver-api/src/tools_ozone/set.rs index e29b9bc..b0634a8 100644 --- a/crates/weaver-api/src/tools_ozone/set.rs +++ b/crates/weaver-api/src/tools_ozone/set.rs @@ -300,67 +300,67 @@ pub mod set_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SetSize; - type UpdatedAt; type Name; + type UpdatedAt; type CreatedAt; + type SetSize; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SetSize = Unset; - type UpdatedAt = Unset; type Name = Unset; + type UpdatedAt = Unset; type CreatedAt = Unset; + type SetSize = Unset; } - ///State transition - sets the `set_size` field to Set - pub struct SetSetSize(PhantomData S>); - impl sealed::Sealed for SetSetSize {} - impl State for SetSetSize { - type SetSize = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type UpdatedAt = S::UpdatedAt; - type Name = S::Name; type CreatedAt = S::CreatedAt; + type SetSize = S::SetSize; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type SetSize = S::SetSize; - type UpdatedAt = Set; type Name = S::Name; + type UpdatedAt = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { type SetSize = S::SetSize; - type UpdatedAt = S::UpdatedAt; - type Name = Set; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SetSize = S::SetSize; - type UpdatedAt = S::UpdatedAt; type Name = S::Name; + type UpdatedAt = S::UpdatedAt; type CreatedAt = Set; + type SetSize = S::SetSize; + } + ///State transition - sets the `set_size` field to Set + pub struct SetSetSize(PhantomData S>); + impl sealed::Sealed for SetSetSize {} + impl State for SetSetSize { + type Name = S::Name; + type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; + type SetSize = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `set_size` field - pub struct set_size(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `set_size` field + pub struct set_size(()); } } @@ -493,10 +493,10 @@ where impl<'a, S> SetViewBuilder<'a, S> where S: set_view_state::State, - S::SetSize: set_view_state::IsSet, - S::UpdatedAt: set_view_state::IsSet, S::Name: set_view_state::IsSet, + S::UpdatedAt: set_view_state::IsSet, S::CreatedAt: set_view_state::IsSet, + S::SetSize: set_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SetView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set/add_values.rs b/crates/weaver-api/src/tools_ozone/set/add_values.rs index 426fd0d..06c548b 100644 --- a/crates/weaver-api/src/tools_ozone/set/add_values.rs +++ b/crates/weaver-api/src/tools_ozone/set/add_values.rs @@ -35,37 +35,37 @@ pub mod add_values_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Values; type Name; + type Values; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Values = Unset; type Name = Unset; - } - ///State transition - sets the `values` field to Set - pub struct SetValues(PhantomData S>); - impl sealed::Sealed for SetValues {} - impl State for SetValues { - type Values = Set; - type Name = S::Name; + type Values = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Values = S::Values; type Name = Set; + type Values = S::Values; + } + ///State transition - sets the `values` field to Set + pub struct SetValues(PhantomData S>); + impl sealed::Sealed for SetValues {} + impl State for SetValues { + type Name = S::Name; + type Values = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `values` field - pub struct values(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `values` field + pub struct values(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AddValuesBuilder<'a, S> where S: add_values_state::State, - S::Values: add_values_state::IsSet, S::Name: add_values_state::IsSet, + S::Values: add_values_state::IsSet, { /// Build the final struct pub fn build(self) -> AddValues<'a> { diff --git a/crates/weaver-api/src/tools_ozone/setting.rs b/crates/weaver-api/src/tools_ozone/setting.rs index d6cf5a6..1b3df5d 100644 --- a/crates/weaver-api/src/tools_ozone/setting.rs +++ b/crates/weaver-api/src/tools_ozone/setting.rs @@ -55,103 +55,103 @@ pub mod defs_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type Value; - type Scope; type CreatedBy; + type Scope; + type Value; type LastUpdatedBy; + type Did; type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type Value = Unset; - type Scope = Unset; type CreatedBy = Unset; + type Scope = Unset; + type Value = Unset; type LastUpdatedBy = Unset; + type Did = Unset; type Key = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Value = S::Value; + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedBy = Set; type Scope = S::Scope; - type CreatedBy = S::CreatedBy; + type Value = S::Value; type LastUpdatedBy = S::LastUpdatedBy; - type Key = S::Key; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { type Did = S::Did; - type Value = Set; - type Scope = S::Scope; - type CreatedBy = S::CreatedBy; - type LastUpdatedBy = S::LastUpdatedBy; type Key = S::Key; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type Did = S::Did; - type Value = S::Value; - type Scope = Set; type CreatedBy = S::CreatedBy; + type Scope = Set; + type Value = S::Value; type LastUpdatedBy = S::LastUpdatedBy; + type Did = S::Did; type Key = S::Key; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type Did = S::Did; - type Value = S::Value; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type CreatedBy = S::CreatedBy; type Scope = S::Scope; - type CreatedBy = Set; + type Value = Set; type LastUpdatedBy = S::LastUpdatedBy; + type Did = S::Did; type Key = S::Key; } ///State transition - sets the `last_updated_by` field to Set pub struct SetLastUpdatedBy(PhantomData S>); impl sealed::Sealed for SetLastUpdatedBy {} impl State for SetLastUpdatedBy { - type Did = S::Did; - type Value = S::Value; - type Scope = S::Scope; type CreatedBy = S::CreatedBy; + type Scope = S::Scope; + type Value = S::Value; type LastUpdatedBy = Set; + type Did = S::Did; + type Key = S::Key; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type CreatedBy = S::CreatedBy; + type Scope = S::Scope; + type Value = S::Value; + type LastUpdatedBy = S::LastUpdatedBy; + type Did = Set; type Key = S::Key; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData S>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type Did = S::Did; - type Value = S::Value; - type Scope = S::Scope; type CreatedBy = S::CreatedBy; + type Scope = S::Scope; + type Value = S::Value; type LastUpdatedBy = S::LastUpdatedBy; + type Did = S::Did; type Key = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); - ///Marker type for the `value` field - pub struct value(()); - ///Marker type for the `scope` field - pub struct scope(()); ///Marker type for the `created_by` field pub struct created_by(()); + ///Marker type for the `scope` field + pub struct scope(()); + ///Marker type for the `value` field + pub struct value(()); ///Marker type for the `last_updated_by` field pub struct last_updated_by(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `key` field pub struct key(()); } @@ -397,11 +397,11 @@ where impl<'a, S> DefsOptionBuilder<'a, S> where S: defs_option_state::State, - S::Did: defs_option_state::IsSet, - S::Value: defs_option_state::IsSet, - S::Scope: defs_option_state::IsSet, S::CreatedBy: defs_option_state::IsSet, + S::Scope: defs_option_state::IsSet, + S::Value: defs_option_state::IsSet, S::LastUpdatedBy: defs_option_state::IsSet, + S::Did: defs_option_state::IsSet, S::Key: defs_option_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs b/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs index ea2fbd5..131b34c 100644 --- a/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs @@ -42,50 +42,50 @@ pub mod upsert_option_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Key; - type Value; type Scope; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Key = Unset; - type Value = Unset; type Scope = Unset; + type Value = Unset; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData S>); impl sealed::Sealed for SetKey {} impl State for SetKey { type Key = Set; - type Value = S::Value; - type Scope = S::Scope; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Key = S::Key; - type Value = Set; type Scope = S::Scope; + type Value = S::Value; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { type Key = S::Key; - type Value = S::Value; type Scope = Set; + type Value = S::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Key = S::Key; + type Scope = S::Scope; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `key` field pub struct key(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `scope` field pub struct scope(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -219,8 +219,8 @@ impl<'a, S> UpsertOptionBuilder<'a, S> where S: upsert_option_state::State, S::Key: upsert_option_state::IsSet, - S::Value: upsert_option_state::IsSet, S::Scope: upsert_option_state::IsSet, + S::Value: upsert_option_state::IsSet, { /// Build the final struct pub fn build(self) -> UpsertOption<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification.rs b/crates/weaver-api/src/tools_ozone/verification.rs index e577793..a0d688b 100644 --- a/crates/weaver-api/src/tools_ozone/verification.rs +++ b/crates/weaver-api/src/tools_ozone/verification.rs @@ -74,105 +74,105 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; + type Issuer; type Subject; - type Uri; type DisplayName; - type Issuer; type Handle; - type CreatedAt; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; + type Issuer = Unset; type Subject = Unset; - type Uri = Unset; type DisplayName = Unset; - type Issuer = Unset; type Handle = Unset; - type CreatedAt = Unset; + type Uri = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Uri = S::Uri; - type DisplayName = S::DisplayName; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Issuer = S::Issuer; + type Subject = S::Subject; + type DisplayName = S::DisplayName; type Handle = S::Handle; - type CreatedAt = S::CreatedAt; + type Uri = S::Uri; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { + type CreatedAt = S::CreatedAt; + type Issuer = Set; type Subject = S::Subject; - type Uri = Set; type DisplayName = S::DisplayName; - type Issuer = S::Issuer; type Handle = S::Handle; + type Uri = S::Uri; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; + type Subject = Set; + type DisplayName = S::DisplayName; + type Handle = S::Handle; + type Uri = S::Uri; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; type Subject = S::Subject; - type Uri = S::Uri; type DisplayName = Set; - type Issuer = S::Issuer; type Handle = S::Handle; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData S>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { - type Subject = S::Subject; type Uri = S::Uri; - type DisplayName = S::DisplayName; - type Issuer = Set; - type Handle = S::Handle; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { + type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; type Subject = S::Subject; - type Uri = S::Uri; type DisplayName = S::DisplayName; - type Issuer = S::Issuer; type Handle = Set; - type CreatedAt = S::CreatedAt; + type Uri = S::Uri; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; type Subject = S::Subject; - type Uri = S::Uri; type DisplayName = S::DisplayName; - type Issuer = S::Issuer; type Handle = S::Handle; - type CreatedAt = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `issuer` field + pub struct issuer(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `issuer` field - pub struct issuer(()); ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -479,12 +479,12 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, + S::CreatedAt: verification_view_state::IsSet, + S::Issuer: verification_view_state::IsSet, S::Subject: verification_view_state::IsSet, - S::Uri: verification_view_state::IsSet, S::DisplayName: verification_view_state::IsSet, - S::Issuer: verification_view_state::IsSet, S::Handle: verification_view_state::IsSet, - S::CreatedAt: verification_view_state::IsSet, + S::Uri: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs b/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs index f1ea00d..fbcc08c 100644 --- a/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs @@ -36,37 +36,37 @@ pub mod grant_error_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Error; type Subject; + type Error; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Error = Unset; type Subject = Unset; - } - ///State transition - sets the `error` field to Set - pub struct SetError(PhantomData S>); - impl sealed::Sealed for SetError {} - impl State for SetError { - type Error = Set; - type Subject = S::Subject; + type Error = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Error = S::Error; type Subject = Set; + type Error = S::Error; + } + ///State transition - sets the `error` field to Set + pub struct SetError(PhantomData S>); + impl sealed::Sealed for SetError {} + impl State for SetError { + type Subject = S::Subject; + type Error = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `error` field - pub struct error(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `error` field + pub struct error(()); } } @@ -139,8 +139,8 @@ where impl<'a, S> GrantErrorBuilder<'a, S> where S: grant_error_state::State, - S::Error: grant_error_state::IsSet, S::Subject: grant_error_state::IsSet, + S::Error: grant_error_state::IsSet, { /// Build the final struct pub fn build(self) -> GrantError<'a> { @@ -640,51 +640,51 @@ pub mod verification_input_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; - type Handle; type DisplayName; + type Handle; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; - type Handle = Unset; type DisplayName = Unset; + type Handle = Unset; + type Subject = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type DisplayName = Set; type Handle = S::Handle; - type DisplayName = S::DisplayName; + type Subject = S::Subject; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Subject = S::Subject; - type Handle = Set; type DisplayName = S::DisplayName; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { + type Handle = Set; type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type DisplayName = S::DisplayName; type Handle = S::Handle; - type DisplayName = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `handle` field + pub struct handle(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -797,9 +797,9 @@ where impl<'a, S> VerificationInputBuilder<'a, S> where S: verification_input_state::State, - S::Subject: verification_input_state::IsSet, - S::Handle: verification_input_state::IsSet, S::DisplayName: verification_input_state::IsSet, + S::Handle: verification_input_state::IsSet, + S::Subject: verification_input_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationInput<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification/revoke_verifications.rs b/crates/weaver-api/src/tools_ozone/verification/revoke_verifications.rs index 85f9888..107233c 100644 --- a/crates/weaver-api/src/tools_ozone/verification/revoke_verifications.rs +++ b/crates/weaver-api/src/tools_ozone/verification/revoke_verifications.rs @@ -236,37 +236,37 @@ pub mod revoke_error_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Error; type Uri; + type Error; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Error = Unset; type Uri = Unset; - } - ///State transition - sets the `error` field to Set - pub struct SetError(PhantomData S>); - impl sealed::Sealed for SetError {} - impl State for SetError { - type Error = Set; - type Uri = S::Uri; + type Error = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Error = S::Error; type Uri = Set; + type Error = S::Error; + } + ///State transition - sets the `error` field to Set + pub struct SetError(PhantomData S>); + impl sealed::Sealed for SetError {} + impl State for SetError { + type Uri = S::Uri; + type Error = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `error` field - pub struct error(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `error` field + pub struct error(()); } } @@ -339,8 +339,8 @@ where impl<'a, S> RevokeErrorBuilder<'a, S> where S: revoke_error_state::State, - S::Error: revoke_error_state::IsSet, S::Uri: revoke_error_state::IsSet, + S::Error: revoke_error_state::IsSet, { /// Build the final struct pub fn build(self) -> RevokeError<'a> { diff --git a/crates/weaver-app/Cargo.toml b/crates/weaver-app/Cargo.toml index e984fc2..2b6128c 100644 --- a/crates/weaver-app/Cargo.toml +++ b/crates/weaver-app/Cargo.toml @@ -68,6 +68,7 @@ fontdb = { version = "0.22", optional = true } [target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] webbrowser = "1.0.6" reqwest = { version = "0.12", default-features = false, features = ["json"] } +ring = { version = "0.17", default-features = false, features = ["alloc"] } [target.'cfg(all(target_family = "wasm", target_os = "unknown"))'.dependencies] reqwest = { version = "0.12", default-features = false, features = ["json"] } @@ -83,7 +84,8 @@ web-sys = { version = "0.3", features = ["ServiceWorkerContainer", "ServiceWorke js-sys = "0.3" gloo-storage = "0.3" gloo-timers = "0.3" - +ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js"]} +getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] } lol_alloc = "0.4.1" [build-dependencies] diff --git a/crates/weaver-app/assets/styling/editor.css b/crates/weaver-app/assets/styling/editor.css index 2376bb8..7165df5 100644 --- a/crates/weaver-app/assets/styling/editor.css +++ b/crates/weaver-app/assets/styling/editor.css @@ -146,6 +146,7 @@ display: flex; flex-direction: column; min-height: 0; + position: relative; /* For remote cursor overlay positioning */ } .editor-content { @@ -1167,3 +1168,51 @@ li:has(.md-syntax-block:not(.hidden)) { font-size: 12px; font-weight: 500; } + +/* ========================================================================== + Remote Collaborator Cursors + ========================================================================== */ + +.remote-cursors-overlay { + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + pointer-events: none; + z-index: 10; +} + +.remote-cursor { + position: absolute; + pointer-events: none; +} + +.remote-cursor-caret { + width: 2px; + height: var(--cursor-height, 18px); + background: var(--cursor-color, #4ECDC4); + border-radius: 1px; + animation: cursor-blink 1.2s ease-in-out infinite; +} + +.remote-cursor-label { + position: absolute; + top: -18px; + left: 0; + padding: 2px 6px; + background: var(--cursor-color, #4ECDC4); + color: #fff; + font-size: 10px; + font-weight: 500; + line-height: 1.2; + border-radius: 3px 3px 3px 0; + white-space: nowrap; + opacity: 0.9; + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2); +} + +@keyframes cursor-blink { + 0%, 100% { opacity: 1; } + 50% { opacity: 0.5; } +} diff --git a/crates/weaver-app/src/collab_context.rs b/crates/weaver-app/src/collab_context.rs new file mode 100644 index 0000000..595d0c5 --- /dev/null +++ b/crates/weaver-app/src/collab_context.rs @@ -0,0 +1,93 @@ +//! Real-time collaboration context for P2P editing sessions. +//! +//! This module provides the CollabNode as a Dioxus context, allowing editor +//! components to join gossip sessions for real-time collaboration. +//! +//! The CollabNode is only active in WASM builds where iroh works via relays. + +use dioxus::prelude::*; +use std::sync::Arc; +use weaver_common::transport::CollabNode; + +/// Context state for the collaboration node. +/// +/// This is provided as a Dioxus context and can be accessed by editor components +/// to join/leave collaborative editing sessions. +#[derive(Clone)] +pub struct CollabContext { + /// The collaboration node, if successfully spawned. + /// None while loading or if spawn failed. + pub node: Option>, + /// Error message if spawn failed. + pub error: Option, +} + +impl Default for CollabContext { + fn default() -> Self { + Self { + node: None, + error: None, + } + } +} + +/// Provider component that spawns the CollabNode and provides it as context. +/// +/// Should be placed near the root of the app, wrapping any components that +/// need access to real-time collaboration. +#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] +#[component] +pub fn CollabProvider(children: Element) -> Element { + let mut collab_ctx = use_signal(CollabContext::default); + + // Spawn the CollabNode on mount + let _spawn_result = use_resource(move || async move { + tracing::info!("Spawning CollabNode..."); + + match CollabNode::spawn(None).await { + Ok(node) => { + tracing::info!(node_id = %node.node_id_string(), "CollabNode spawned"); + collab_ctx.set(CollabContext { + node: Some(node), + error: None, + }); + } + Err(e) => { + tracing::error!("Failed to spawn CollabNode: {}", e); + collab_ctx.set(CollabContext { + node: None, + error: Some(e.to_string()), + }); + } + } + }); + + // Provide the context + use_context_provider(|| collab_ctx); + + rsx! { {children} } +} + +/// No-op provider for non-WASM builds. +#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))] +#[component] +pub fn CollabProvider(children: Element) -> Element { + // On server/native, provide an empty context (collab happens in browser) + let collab_ctx = use_signal(CollabContext::default); + use_context_provider(|| collab_ctx); + rsx! { {children} } +} + +/// Hook to get the CollabNode from context. +/// +/// Returns None if the node hasn't spawned yet or failed to spawn. +pub fn use_collab_node() -> Option> { + let ctx = use_context::>(); + ctx.read().node.clone() +} + +/// Hook to check if collab is available. +pub fn use_collab_available() -> bool { + let ctx = use_context::>(); + ctx.read().node.is_some() +} diff --git a/crates/weaver-app/src/components/editor/component.rs b/crates/weaver-app/src/components/editor/component.rs index 0be4ddd..4b403f2 100644 --- a/crates/weaver-app/src/components/editor/component.rs +++ b/crates/weaver-app/src/components/editor/component.rs @@ -299,6 +299,7 @@ pub fn MarkdownEditor( edit_root: None, last_diff: None, synced_version: None, // Fresh from entry, never synced + last_seen_diffs: std::collections::HashMap::new(), resolved_content, }); } @@ -323,6 +324,7 @@ pub fn MarkdownEditor( edit_root: None, last_diff: None, synced_version: None, // New doc, never synced + last_seen_diffs: std::collections::HashMap::new(), resolved_content: weaver_common::ResolvedContent::default(), }) } @@ -422,6 +424,42 @@ fn MarkdownEditorInner( // Use pre-resolved content from loaded state (avoids embed pop-in) let resolved_content = use_signal(|| loaded_state.resolved_content.clone()); + // Presence tracker for remote collaborators (shared with RealTimeSync) + let presence = use_signal(weaver_common::transport::PresenceTracker::new); + + // Resolve StrongRef for real-time P2P sync + // - For entries: use entry_ref directly + // - For drafts: resolve via confirm_record_ref on draft URI + let realtime_ref_resource = { + let doc_for_ref = document.clone(); + let fetcher_for_ref = fetcher.clone(); + let draft_key_for_ref = draft_key.to_string(); + use_resource(move || { + let doc = doc_for_ref.clone(); + let fetcher = fetcher_for_ref.clone(); + let draft_key = draft_key_for_ref.clone(); + async move { + // Published entry - use entry_ref directly + if let Some(entry_ref) = doc.entry_ref() { + return Some(entry_ref.clone()); + } + // Draft with edit_root - resolve draft StrongRef + if doc.edit_root().is_some() { + if let Some(did) = fetcher.current_did().await { + let draft_uri = super::sync::build_draft_uri(&did, &draft_key); + match fetcher.confirm_record_ref(&draft_uri).await { + Ok(strong_ref) => return Some(strong_ref), + Err(e) => { + tracing::warn!("Failed to resolve draft ref: {}", e); + } + } + } + } + None + } + }) + }; + let doc_for_memo = document.clone(); let doc_for_refs = document.clone(); let entry_index_for_memo = entry_index.clone(); @@ -854,7 +892,7 @@ fn MarkdownEditorInner( // Enable collaborative sync for any published entry (both owners and collaborators) let is_published = document.entry_ref().is_some(); - // Refresh callback: fetch and merge collaborator changes + // Refresh callback: fetch and merge collaborator changes (incremental) let on_refresh = if is_published { let fetcher_for_refresh = fetcher.clone(); let mut doc_for_refresh = document.clone(); @@ -867,12 +905,17 @@ fn MarkdownEditorInner( spawn(async move { if let Some(uri) = uri { - match super::sync::load_all_edit_states_from_pds(&fetcher, &uri).await { + // Get last seen diffs for incremental sync + let last_seen = doc.last_seen_diffs.read().clone(); + + match super::sync::load_all_edit_states_from_pds(&fetcher, &uri, &last_seen).await { Ok(Some(pds_state)) => { if let Err(e) = doc.import_updates(&pds_state.root_snapshot) { tracing::error!("Failed to import collaborator updates: {:?}", e); } else { tracing::info!("Successfully merged collaborator updates"); + // Update the last seen diffs for next incremental sync + *doc.last_seen_diffs.write() = pds_state.last_seen_diffs; } } Ok(None) => { @@ -889,6 +932,9 @@ fn MarkdownEditorInner( None }; + // Get resolved StrongRef for real-time P2P sync + let realtime_ref = realtime_ref_resource.read().clone().flatten(); + rsx! { SyncStatus { document: document.clone(), @@ -896,6 +942,12 @@ fn MarkdownEditorInner( on_refresh, is_collaborative: is_published, } + // Real-time P2P sync (works for both published entries and drafts) + super::sync::RealTimeSync { + document: document.clone(), + resource_ref: realtime_ref, + presence, + } } } @@ -909,6 +961,8 @@ fn MarkdownEditorInner( // Editor content div { class: "editor-content-wrapper", + // Remote collaborator cursors overlay + RemoteCursors { presence, document: document.clone(), render_cache } div { id: "{editor_id}", class: "editor-content", @@ -1450,3 +1504,93 @@ fn MarkdownEditorInner( } } } + +/// Remote collaborator cursors overlay. +/// +/// Renders cursor indicators for each remote collaborator. +/// Uses the same offset mapping as local cursor restoration. +#[component] +fn RemoteCursors( + presence: Signal, + document: EditorDocument, + render_cache: Signal, +) -> Element { + let presence_read = presence.read(); + let cursors: Vec<_> = presence_read + .cursors() + .map(|(c, cur)| (c.display_name.clone(), c.color, cur.position, cur.selection)) + .collect(); + + if cursors.is_empty() { + return rsx! {}; + } + + // Get flattened offset map from all paragraphs + let cache = render_cache.read(); + let offset_map: Vec<_> = cache + .paragraphs + .iter() + .flat_map(|p| p.offset_map.iter().cloned()) + .collect(); + + rsx! { + div { class: "remote-cursors-overlay", + for (display_name, color, position, selection) in cursors { + RemoteCursorIndicator { + key: "{display_name}-{position}", + display_name, + position, + selection, + color, + offset_map: offset_map.clone(), + } + } + } + } +} + +/// Single remote cursor indicator with DOM-based positioning. +#[component] +fn RemoteCursorIndicator( + display_name: String, + position: usize, + selection: Option<(usize, usize)>, + color: u32, + offset_map: Vec, +) -> Element { + use super::cursor::{get_cursor_rect_relative, CursorRect}; + + // Convert RGBA u32 to CSS color + let r = (color >> 24) & 0xFF; + let g = (color >> 16) & 0xFF; + let b = (color >> 8) & 0xFF; + let a = (color & 0xFF) as f32 / 255.0; + let color_css = format!("rgba({}, {}, {}, {})", r, g, b, a); + + // Get cursor position relative to editor + let rect = get_cursor_rect_relative(position, &offset_map, "markdown-editor"); + + let Some(rect) = rect else { + return rsx! {}; + }; + + let style = format!( + "left: {}px; top: {}px; --cursor-height: {}px; --cursor-color: {};", + rect.x, rect.y, rect.height, color_css + ); + + rsx! { + div { + class: "remote-cursor", + style: "{style}", + + // Cursor caret line + div { class: "remote-cursor-caret" } + + // Name label + div { class: "remote-cursor-label", + "{display_name}" + } + } + } +} diff --git a/crates/weaver-app/src/components/editor/cursor.rs b/crates/weaver-app/src/components/editor/cursor.rs index f4e9551..7bd1b36 100644 --- a/crates/weaver-app/src/components/editor/cursor.rs +++ b/crates/weaver-app/src/components/editor/cursor.rs @@ -200,3 +200,110 @@ pub fn restore_cursor_position( ) -> Result<(), String> { Ok(()) } + +/// Screen coordinates for a cursor position. +#[derive(Debug, Clone, Copy)] +pub struct CursorRect { + pub x: f64, + pub y: f64, + pub height: f64, +} + +/// Get screen coordinates for a character offset in the editor. +/// +/// Returns the bounding rect of a zero-width range at the given offset. +#[cfg(all(target_family = "wasm", target_os = "unknown"))] +pub fn get_cursor_rect( + char_offset: usize, + offset_map: &[OffsetMapping], + editor_id: &str, +) -> Option { + if offset_map.is_empty() { + return None; + } + + // Find mapping for this position + let (mapping, char_offset) = match find_mapping_for_char(offset_map, char_offset) { + Some((m, _)) => (m, char_offset), + None => return None, + }; + + let window = web_sys::window()?; + let document = window.document()?; + + // Get container element + let container = document + .get_element_by_id(&mapping.node_id) + .or_else(|| { + let selector = format!("[data-node-id='{}']", mapping.node_id); + document.query_selector(&selector).ok().flatten() + })?; + + let range = document.create_range().ok()?; + + // Position the range at the character offset + if let Some(child_index) = mapping.child_index { + range.set_start(&container, child_index as u32).ok()?; + } else { + let container_element = container.dyn_into::().ok()?; + let offset_in_range = char_offset - mapping.char_range.start; + let target_utf16_offset = mapping.char_offset_in_node + offset_in_range; + + if let Ok((text_node, node_offset)) = + find_text_node_at_offset(&container_element, target_utf16_offset) + { + range.set_start(&text_node, node_offset as u32).ok()?; + } else { + return None; + } + } + + range.collapse_with_to_start(true); + + // Get the bounding rect + let rect = range.get_bounding_client_rect(); + Some(CursorRect { + x: rect.x(), + y: rect.y(), + height: rect.height().max(16.0), // Minimum height for empty lines + }) +} + +/// Get screen coordinates relative to the editor container. +#[cfg(all(target_family = "wasm", target_os = "unknown"))] +pub fn get_cursor_rect_relative( + char_offset: usize, + offset_map: &[OffsetMapping], + editor_id: &str, +) -> Option { + let cursor_rect = get_cursor_rect(char_offset, offset_map, editor_id)?; + + let window = web_sys::window()?; + let document = window.document()?; + let editor = document.get_element_by_id(editor_id)?; + let editor_rect = editor.get_bounding_client_rect(); + + Some(CursorRect { + x: cursor_rect.x - editor_rect.x(), + y: cursor_rect.y - editor_rect.y(), + height: cursor_rect.height, + }) +} + +#[cfg(not(all(target_family = "wasm", target_os = "unknown")))] +pub fn get_cursor_rect( + _char_offset: usize, + _offset_map: &[OffsetMapping], + _editor_id: &str, +) -> Option { + None +} + +#[cfg(not(all(target_family = "wasm", target_os = "unknown")))] +pub fn get_cursor_rect_relative( + _char_offset: usize, + _offset_map: &[OffsetMapping], + _editor_id: &str, +) -> Option { + None +} diff --git a/crates/weaver-app/src/components/editor/document.rs b/crates/weaver-app/src/components/editor/document.rs index 4310a12..8f1c4cc 100644 --- a/crates/weaver-app/src/components/editor/document.rs +++ b/crates/weaver-app/src/components/editor/document.rs @@ -107,6 +107,11 @@ pub struct EditorDocument { /// Signal so cloned docs share the same sync state. last_synced_version: Signal>, + /// Last seen diff URI per collaborator root. + /// Maps root URI -> last diff URI we've imported from that root. + /// The diff rkey (TID) is time-sortable, so we skip diffs with rkey <= this. + pub last_seen_diffs: Signal, AtUri<'static>>>, + // --- Editor state (non-reactive) --- /// Undo manager for the document. undo_mgr: Rc>, @@ -224,6 +229,9 @@ pub struct LoadedDocState { /// Used to determine what changes need to be synced. /// None if never synced to PDS. pub synced_version: Option, + /// Last seen diff URIs per collaborator root. + /// Used for incremental sync on subsequent refreshes. + pub last_seen_diffs: std::collections::HashMap, AtUri<'static>>, /// Pre-resolved embed content fetched during load. /// Avoids embed pop-in on initial render. pub resolved_content: weaver_common::ResolvedContent, @@ -311,6 +319,7 @@ impl EditorDocument { edit_root: Signal::new(None), last_diff: Signal::new(None), last_synced_version: Signal::new(None), + last_seen_diffs: Signal::new(std::collections::HashMap::new()), undo_mgr: Rc::new(RefCell::new(undo_mgr)), loro_cursor, // Reactive editor state - wrapped in Signals @@ -387,6 +396,11 @@ impl EditorDocument { &self.content } + /// Get the underlying LoroDoc for subscriptions and advanced operations. + pub fn loro_doc(&self) -> &LoroDoc { + &self.doc + } + // --- Content accessors --- /// Get the markdown content as a string. @@ -909,6 +923,19 @@ impl EditorDocument { self.last_diff.set(diff); } + /// Get the last seen diff URI for a collaborator root. + pub fn last_seen_diff_for_root(&self, root_uri: &AtUri<'_>) -> Option> { + self.last_seen_diffs + .read() + .get(&root_uri.clone().into_static()) + .cloned() + } + + /// Update the last seen diff for a collaborator root. + pub fn set_last_seen_diff(&mut self, root_uri: AtUri<'static>, diff_uri: AtUri<'static>) { + self.last_seen_diffs.write().insert(root_uri, diff_uri); + } + /// Check if there are unsynced changes since the last PDS sync. pub fn has_unsynced_changes(&self) -> bool { match &*self.last_synced_version.read() { @@ -954,9 +981,35 @@ impl EditorDocument { /// Used when loading edit history from the PDS. pub fn import_updates(&mut self, updates: &[u8]) -> LoroResult<()> { self.doc.import(updates)?; + // Trigger re-render after importing remote changes + self.last_edit.set(None); Ok(()) } + /// Export updates since the given version vector. + /// Used for real-time P2P sync where we track broadcast version separately from PDS sync. + pub fn export_updates_from(&self, from_vv: &VersionVector) -> Option> { + let current_vv = self.doc.oplog_vv(); + + // No changes since the given version + if *from_vv == current_vv { + return None; + } + + let updates = self + .doc + .export(ExportMode::Updates { + from: Cow::Borrowed(from_vv), + }) + .ok()?; + + if updates.is_empty() { + return None; + } + + Some(updates) + } + /// Set the sync state when loading from PDS. /// This sets the version marker to the current state so we don't /// re-upload what we just downloaded. @@ -1040,6 +1093,7 @@ impl EditorDocument { edit_root: Signal::new(None), last_diff: Signal::new(None), last_synced_version: Signal::new(None), + last_seen_diffs: Signal::new(std::collections::HashMap::new()), undo_mgr: Rc::new(RefCell::new(undo_mgr)), loro_cursor, // Reactive editor state - wrapped in Signals @@ -1098,6 +1152,7 @@ impl EditorDocument { last_diff: Signal::new(state.last_diff), // Use the synced version from state (tracks the PDS version vector) last_synced_version: Signal::new(state.synced_version), + last_seen_diffs: Signal::new(state.last_seen_diffs), undo_mgr: Rc::new(RefCell::new(undo_mgr)), loro_cursor, cursor: Signal::new(cursor_state), diff --git a/crates/weaver-app/src/components/editor/sync.rs b/crates/weaver-app/src/components/editor/sync.rs index 15358f0..d721e3a 100644 --- a/crates/weaver-app/src/components/editor/sync.rs +++ b/crates/weaver-app/src/components/editor/sync.rs @@ -866,6 +866,9 @@ pub struct PdsEditState { pub root_snapshot: Bytes, /// All diff update bytes in order (oldest first, by TID) pub diff_updates: Vec, + /// Last seen diff URI per collaborator root (for incremental sync). + /// Maps root URI -> last diff URI we've imported from that root. + pub last_seen_diffs: std::collections::HashMap, AtUri<'static>>, } /// Fetch a blob from the PDS. @@ -906,7 +909,7 @@ pub async fn load_edit_state_from_pds( None => return Ok(None), }; - load_edit_state_from_root_id(fetcher, root_id).await + load_edit_state_from_root_id(fetcher, root_id, None).await } /// Load edit state from the PDS for a draft. @@ -923,20 +926,24 @@ pub async fn load_edit_state_from_draft( None => return Ok(None), }; - load_edit_state_from_root_id(fetcher, root_id).await + load_edit_state_from_root_id(fetcher, root_id, None).await } /// Load edit state from ALL collaborator repos for an entry, returning merged state. /// /// For each edit.root found across collaborators: /// - Fetches the root snapshot -/// - Finds and fetches all diffs for that root +/// - Finds and fetches all diffs for that root (skipping already-seen diffs) /// - Merges all Loro states into one unified document /// -/// Returns merged state suitable for CRDT collaboration. +/// `last_seen_diffs` maps root URI -> last diff URI we've imported from that root. +/// This enables incremental sync by only fetching new diffs. +/// +/// Returns merged state suitable for CRDT collaboration, including updated last_seen_diffs. pub async fn load_all_edit_states_from_pds( fetcher: &Fetcher, entry_uri: &AtUri<'_>, + last_seen_diffs: &std::collections::HashMap, AtUri<'static>>, ) -> Result, WeaverError> { let all_roots = find_all_edit_roots_for_entry(fetcher, entry_uri).await?; @@ -948,6 +955,7 @@ pub async fn load_all_edit_states_from_pds( let merged_doc = LoroDoc::new(); let mut our_root_ref: Option> = None; let mut our_last_diff_ref: Option> = None; + let mut updated_last_seen = last_seen_diffs.clone(); // Get current user's DID to identify "our" root for sync state tracking let current_did = fetcher.current_did().await; @@ -956,8 +964,25 @@ pub async fn load_all_edit_states_from_pds( // Save the DID before consuming root_id let root_did = root_id.did.clone(); - // Load state from this root - if let Some(pds_state) = load_edit_state_from_root_id(fetcher, root_id).await? { + // Build root URI to look up last seen diff + let root_uri = AtUri::new(&format!( + "at://{}/{}/{}", + root_id.did, + ROOT_NSID, + root_id.rkey.as_ref() + )) + .ok() + .map(|u| u.into_static()); + + // Get the last seen diff rkey for this root (if any) + let after_rkey = root_uri.as_ref().and_then(|uri| { + last_seen_diffs.get(uri).and_then(|diff_uri| { + diff_uri.rkey().map(|rk| rk.0.to_string()) + }) + }); + + // Load state from this root (skipping already-seen diffs) + if let Some(pds_state) = load_edit_state_from_root_id(fetcher, root_id, after_rkey.as_deref()).await? { // Import root snapshot into merged doc if let Err(e) = merged_doc.import(&pds_state.root_snapshot) { tracing::warn!("Failed to import root snapshot from {}: {:?}", root_did, e); @@ -971,6 +996,11 @@ pub async fn load_all_edit_states_from_pds( } } + // Update last seen diff for this root (for incremental sync next time) + if let (Some(uri), Some(last_diff)) = (&root_uri, &pds_state.last_diff_ref) { + updated_last_seen.insert(uri.clone(), last_diff.uri.clone().into_static()); + } + // Track "our" root/diff refs for sync state (used when syncing back) // We want to track our own edit.root so subsequent diffs go to the right place let is_our_root = current_did.as_ref().is_some_and(|did| root_did == *did); @@ -998,20 +1028,25 @@ pub async fn load_all_edit_states_from_pds( merged_snapshot.len() ); - // If we found any roots, return the merged state + // If we found any roots, return the merged state (includes updated last_seen map) // Note: our_root_ref might be from another collaborator if we haven't created our own yet Ok(our_root_ref.map(|root_ref| PdsEditState { root_ref, last_diff_ref: our_last_diff_ref, root_snapshot: merged_snapshot.into(), diff_updates: vec![], // Already merged into snapshot + last_seen_diffs: updated_last_seen, })) } /// Internal helper to load edit state given a root record ID. +/// +/// If `after_rkey` is provided, only diffs with rkey > after_rkey are fetched. +/// This enables incremental sync by skipping diffs we've already imported. async fn load_edit_state_from_root_id( fetcher: &Fetcher, root_id: RecordId<'static>, + after_rkey: Option<&str>, ) -> Result, WeaverError> { // Build root URI let root_uri = AtUri::new(&format!( @@ -1060,6 +1095,7 @@ async fn load_edit_state_from_root_id( last_diff_ref: None, root_snapshot, diff_updates: vec![], + last_seen_diffs: std::collections::HashMap::new(), })); } @@ -1072,6 +1108,15 @@ async fn load_edit_state_from_root_id( for diff_id in &diff_ids { let rkey_str: &str = diff_id.rkey.as_ref(); + + // Skip diffs we've already seen (rkey/TID is lexicographically sortable by time) + if let Some(after) = after_rkey { + if rkey_str <= after { + tracing::debug!("Skipping already-seen diff rkey: {}", rkey_str); + continue; + } + } + let diff_uri = AtUri::new(&format!("at://{}/{}/{}", diff_id.did, DIFF_NSID, rkey_str)) .map_err(|e| WeaverError::InvalidNotebook(format!("Invalid diff URI: {}", e)))? .into_static(); @@ -1127,6 +1172,7 @@ async fn load_edit_state_from_root_id( last_diff_ref, root_snapshot, diff_updates, + last_seen_diffs: std::collections::HashMap::new(), })) } @@ -1152,7 +1198,8 @@ pub async fn load_and_merge_document( // for drafts use single-repo loading (draft sharing requires knowing the URI) let pds_state = if let Some(uri) = entry_uri { // Published entry: load from ALL collaborators (multi-repo CRDT merge) - load_all_edit_states_from_pds(fetcher, uri).await? + let empty_last_seen = std::collections::HashMap::new(); + load_all_edit_states_from_pds(fetcher, uri, &empty_last_seen).await? } else if let Some(did) = fetcher.current_did().await { // Unpublished draft: single-repo for now // (draft sharing would require collaborator to know the draft URI) @@ -1189,6 +1236,7 @@ pub async fn load_and_merge_document( edit_root: None, last_diff: None, synced_version: None, // Local-only, never synced to PDS + last_seen_diffs: std::collections::HashMap::new(), resolved_content, })) } @@ -1222,6 +1270,7 @@ pub async fn load_and_merge_document( edit_root: Some(pds.root_ref), last_diff: pds.last_diff_ref, synced_version, // Just loaded from PDS, fully synced + last_seen_diffs: pds.last_seen_diffs, resolved_content, })) } @@ -1273,12 +1322,333 @@ pub async fn load_and_merge_document( edit_root: Some(pds.root_ref), last_diff: pds.last_diff_ref, synced_version: Some(pds_version), + last_seen_diffs: pds.last_seen_diffs, resolved_content, })) } } } +// ============================================================================ +// Real-Time P2P Sync (iroh-gossip) +// ============================================================================ + +#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] +use crate::collab_context::use_collab_node; +#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] +use std::sync::Arc; + +use weaver_common::transport::PresenceTracker; + +/// Props for real-time P2P sync component. +#[derive(Props, Clone, PartialEq)] +pub struct RealTimeSyncProps { + /// The editor document to sync + pub document: super::document::EditorDocument, + /// StrongRef to the resource being edited (for topic derivation and session records) + pub resource_ref: Option>, + /// Presence tracker for remote collaborators (shared with editor for rendering) + pub presence: Signal, +} + +/// Real-time P2P sync component using iroh-gossip. +/// +/// When editing a collaborative document, this component: +/// - Joins a gossip topic for the resource +/// - Broadcasts local edits to peers via Loro's subscribe_local_update +/// - Imports incoming edits from peers +/// +/// This runs alongside the existing async PDS sync for redundancy. +/// Session TTL in minutes - sessions are refreshed while active +const SESSION_TTL_MINUTES: u32 = 15; + +#[cfg(all(target_arch = "wasm32", target_os = "unknown"))] +#[component] +pub fn RealTimeSync(props: RealTimeSyncProps) -> Element { + use tokio::sync::mpsc; + use weaver_common::transport::{CollabMessage, CollabSession, SessionEvent}; + use weaver_common::WeaverExt; + + let collab_node = use_collab_node(); + let fetcher = use_context::(); + let mut session: Signal>> = use_signal(|| None); + // URI of our published session record (for cleanup) + let mut session_record_uri: Signal>> = use_signal(|| None); + // Channel for sending local updates from Loro callback to async broadcast task + let mut update_tx: Signal>>> = use_signal(|| None); + // Channel for sending cursor updates + let mut cursor_tx: Signal)>>> = + use_signal(|| None); + // Keep subscription alive + let mut _subscription: Signal> = use_signal(|| None); + // Our assigned colour (set when we join) + let mut our_color: Signal = use_signal(|| 0x4ECDC4FF); + + let resource_ref = props.resource_ref.clone(); + let doc = props.document.clone(); + let mut presence = props.presence; + + // Broadcast cursor position when it changes + { + let doc = doc.clone(); + use_effect(move || { + // Read cursor to create reactive dependency + let cursor_state = doc.cursor.read(); + let selection = *doc.selection.read(); + + // Send cursor update if we have a channel + if let Some(ref tx) = *cursor_tx.read() { + let sel = selection.map(|s| (s.anchor, s.head)); + let _ = tx.send((cursor_state.offset, sel)); + } + }); + } + + // Join the gossip session when we have a node and resource ref + { + let resource_ref = resource_ref.clone(); + let doc_for_join = doc.clone(); + let fetcher = fetcher.clone(); + + use_effect(move || { + let Some(node) = collab_node.clone() else { + tracing::debug!("RealTimeSync: no CollabNode yet"); + return; + }; + + let Some(ref strong_ref) = resource_ref else { + tracing::debug!("RealTimeSync: no resource ref"); + return; + }; + + // Only join if we're not already in a session + if session.peek().is_some() { + return; + } + + let uri = strong_ref.uri.clone().into_static(); + tracing::info!("RealTimeSync: joining session for {}", uri); + + // Create channel for local update broadcasts + let (tx, mut rx) = mpsc::unbounded_channel::>(); + update_tx.set(Some(tx.clone())); + + // Create channel for cursor updates + let (ctx, mut crx) = mpsc::unbounded_channel::<(usize, Option<(usize, usize)>)>(); + cursor_tx.set(Some(ctx)); + + // Subscribe to local updates from Loro - fires when local changes are committed + let sub = doc_for_join.loro_doc().subscribe_local_update(Box::new(move |update| { + tracing::debug!("RealTimeSync: local update ({} bytes)", update.len()); + if let Err(e) = tx.send(update.to_vec()) { + tracing::warn!("RealTimeSync: failed to queue update: {}", e); + } + true // Keep subscription active + })); + _subscription.set(Some(sub)); + + let doc_for_recv = doc_for_join.clone(); + let resource_ref_for_spawn = resource_ref.clone().unwrap(); + let fetcher = fetcher.clone(); + + spawn(async move { + // Derive topic from resource URI + let topic = CollabSession::topic_from_uri(uri.as_str()); + + // Discover existing session peers for bootstrap + let bootstrap_peers = match fetcher.find_session_peers(&uri).await { + Ok(peers) => { + tracing::info!("RealTimeSync: found {} existing peers", peers.len()); + peers + .into_iter() + .filter_map(|p| { + weaver_common::transport::parse_node_id(&p.node_id).ok() + }) + .collect() + } + Err(e) => { + tracing::warn!("RealTimeSync: failed to find peers: {}", e); + vec![] + } + }; + + // Publish our session record for peer discovery + let node_id_str = node.node_id_string(); + match fetcher + .create_collab_session( + &resource_ref_for_spawn, + &node_id_str, + None, // relay_url - could add if needed + Some(SESSION_TTL_MINUTES), + ) + .await + { + Ok(uri) => { + tracing::info!("RealTimeSync: published session record: {}", uri); + session_record_uri.set(Some(uri)); + } + Err(e) => { + tracing::warn!("RealTimeSync: failed to publish session record: {}", e); + } + } + + match CollabSession::join(node, topic, bootstrap_peers).await { + Ok((collab_session, mut event_stream)) => { + let collab_session = Arc::new(collab_session); + session.set(Some(collab_session.clone())); + + tracing::info!("RealTimeSync: joined session for {}", uri); + + // Spawn broadcast task - sends local updates to gossip + let session_for_broadcast = collab_session.clone(); + spawn(async move { + while let Some(update_bytes) = rx.recv().await { + let msg = CollabMessage::LoroUpdate { + data: update_bytes, + version: vec![], // Version included in Loro update bytes + }; + if let Err(e) = session_for_broadcast.broadcast(&msg).await { + tracing::warn!("RealTimeSync: broadcast failed: {}", e); + } else { + tracing::debug!("RealTimeSync: broadcasted update"); + } + } + tracing::debug!("RealTimeSync: broadcast channel closed"); + }); + + // Spawn cursor broadcast task - sends cursor positions to gossip + let session_for_cursor = collab_session.clone(); + spawn(async move { + while let Some((position, selection)) = crx.recv().await { + let color = *our_color.peek(); + let msg = CollabMessage::Cursor { + position, + selection, + color, + }; + if let Err(e) = session_for_cursor.broadcast(&msg).await { + tracing::warn!("RealTimeSync: cursor broadcast failed: {}", e); + } + } + }); + + // Spawn event receiver task - receives updates from peers + let mut doc_for_recv = doc_for_recv.clone(); + spawn(async move { + use n0_future::StreamExt; + + while let Some(event) = event_stream.next().await { + match event { + SessionEvent::Message { from, message } => { + match message { + CollabMessage::LoroUpdate { data, .. } => { + tracing::debug!( + "RealTimeSync: received update from {} ({} bytes)", + from, + data.len() + ); + if let Err(e) = doc_for_recv.import_updates(&data) { + tracing::warn!( + "RealTimeSync: failed to import update: {:?}", + e + ); + } + } + CollabMessage::Cursor { + position, + selection, + .. + } => { + presence.write().update_cursor( + &from, + position, + selection, + ); + } + CollabMessage::Join { did, display_name } => { + tracing::info!( + "RealTimeSync: peer joined: {} ({})", + display_name, + did + ); + presence.write().add_collaborator( + from, + did, + display_name, + ); + } + CollabMessage::Leave { did } => { + tracing::info!("RealTimeSync: peer left: {}", did); + presence.write().remove_collaborator(&from); + } + CollabMessage::SyncRequest { have_version } => { + tracing::debug!( + "RealTimeSync: sync request (have {} entries)", + have_version.len() + ); + // TODO: Send snapshot or updates based on their version + } + _ => {} + } + } + SessionEvent::PeerJoined(peer) => { + tracing::info!("RealTimeSync: peer connected: {}", peer); + // Add peer with placeholder name until they send Join + if !presence.read().contains(&peer) { + presence.write().add_collaborator( + peer, + "unknown".into(), + "Collaborator".into(), + ); + } + } + SessionEvent::PeerLeft(peer) => { + tracing::info!("RealTimeSync: peer disconnected: {}", peer); + presence.write().remove_collaborator(&peer); + } + SessionEvent::Joined => { + tracing::info!("RealTimeSync: joined gossip swarm"); + } + } + } + tracing::debug!("RealTimeSync: event stream ended"); + }); + } + Err(e) => { + tracing::error!("RealTimeSync: failed to join session: {}", e); + } + } + }); + }); + } + + // Cleanup: delete session record when component unmounts + { + let fetcher = fetcher.clone(); + use_drop(move || { + if let Some(uri) = session_record_uri.peek().clone() { + let fetcher = fetcher.clone(); + spawn(async move { + tracing::info!("RealTimeSync: cleaning up session record: {}", uri); + if let Err(e) = fetcher.delete_collab_session(&uri).await { + tracing::warn!("RealTimeSync: failed to delete session record: {}", e); + } + }); + } + }); + } + + // No UI - this is a background sync component + rsx! {} +} + +/// No-op for non-WASM builds. +#[cfg(not(all(target_arch = "wasm32", target_os = "unknown")))] +#[component] +pub fn RealTimeSync(props: RealTimeSyncProps) -> Element { + rsx! {} +} + // ============================================================================ // Sync UI Components // ============================================================================ diff --git a/crates/weaver-app/src/main.rs b/crates/weaver-app/src/main.rs index 661d7bf..231420e 100644 --- a/crates/weaver-app/src/main.rs +++ b/crates/weaver-app/src/main.rs @@ -31,6 +31,7 @@ mod auth; #[cfg(feature = "server")] mod blobcache; mod cache_impl; +mod collab_context; /// Define a components module that contains all shared components for our app. mod components; mod config; @@ -288,8 +289,11 @@ fn App() -> Element { document::Link { rel: "stylesheet", href: "https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&family=IBM+Plex+Sans:ital,wght@0,100..700;1,100..700&family=IBM+Plex+Serif:ital,wght@0,200;0,300;0,400;0,500;0,600;0,700;1,200;1,300;1,400;1,500;1,600;1,700&display=swap" } // App shell styles (depends on theme variables) document::Link { rel: "stylesheet", href: MAIN_CSS } - components::toast::ToastProvider { - Router:: {} + // P2P collaboration node (provides CollabNode context for real-time sync) + collab_context::CollabProvider { + components::toast::ToastProvider { + Router:: {} + } } } } diff --git a/crates/weaver-common/Cargo.toml b/crates/weaver-common/Cargo.toml index 0f07f7f..b263a2b 100644 --- a/crates/weaver-common/Cargo.toml +++ b/crates/weaver-common/Cargo.toml @@ -31,6 +31,19 @@ reqwest = { version = "0.12", default-features = false, features = [ markdown-weaver-escape = { workspace = true, features = ["std"] } mime-sniffer = "^0.1" +# Real-time collaboration transport (iroh P2P) +chrono = "0.4" +blake3 = { version = "1", default-features = false, features = ["pure"] } +iroh = { version = "0.95", default-features = false } +iroh-gossip = { version = "0.95", default-features = false, features = ["net"] } +postcard = "1.1.1" +rand = "0.9.2" +getrandom = { version = "0.3", features = [] } +iroh-tickets = "0.2" +ring = { version = "0.17", default-features = false } +web-time = "1" + + [target.'cfg(not(all(target_family = "wasm", target_os = "unknown")))'.dependencies] regex = "1.11.1" @@ -42,11 +55,12 @@ js-sys = "0.3" pin-project = "1" wasm-bindgen = "0.2" wasm-bindgen-futures = "0.4" -web-time = "1" send_wrapper = "0.6" wasmworker = "0.1" wasmworker-proc-macro = "0.1" - +iroh-quinn = { version = "0.14", default-features = false } +ring = { version = "0.17", default-features = false, features = ["wasm32_unknown_unknown_js"]} +getrandom = { version = "0.3", default-features = false, features = ["wasm_js"] } [dev-dependencies] diff --git a/crates/weaver-common/src/agent.rs b/crates/weaver-common/src/agent.rs index 399af90..f07c1eb 100644 --- a/crates/weaver-common/src/agent.rs +++ b/crates/weaver-common/src/agent.rs @@ -1884,6 +1884,193 @@ pub trait WeaverExt: AgentSessionExt + XrpcExt + Send + Sync + Sized { } } + // ========================================================================= + // Real-time Collaboration Session Management + // ========================================================================= + + /// Create a collaboration session record on the user's PDS. + /// + /// Called when joining a real-time editing session. The session record + /// contains the iroh NodeId so other collaborators can discover and + /// connect to this peer. + /// + /// Returns the AT-URI of the created session record. + fn create_collab_session<'a>( + &'a self, + resource: &'a StrongRef<'a>, + node_id: &'a str, + relay_url: Option<&'a str>, + ttl_minutes: Option, + ) -> impl Future, WeaverError>> + 'a { + async move { + use jacquard::types::string::Datetime; + use weaver_api::sh_weaver::collab::session::Session; + + let now_chrono = chrono::Utc::now().fixed_offset(); + let now = Datetime::new(now_chrono); + let expires_at = ttl_minutes.map(|mins| { + let expires = now_chrono + chrono::Duration::minutes(mins as i64); + Datetime::new(expires) + }); + + let relay_uri = relay_url + .map(|url| jacquard::types::string::Uri::new(url)) + .transpose() + .map_err(|_| AgentError::from(ClientError::invalid_request("Invalid relay URL")))?; + + let session = Session::new() + .resource(resource.clone()) + .node_id(node_id) + .created_at(now) + .maybe_expires_at(expires_at) + .maybe_relay_url(relay_uri) + .build(); + + let response = self.create_record(session, None).await?; + Ok(response.uri.into_static()) + } + } + + /// Delete a collaboration session record. + /// + /// Called when leaving a real-time editing session to clean up. + fn delete_collab_session<'a>( + &'a self, + session_uri: &'a AtUri<'a>, + ) -> impl Future> + 'a { + async move { + use weaver_api::sh_weaver::collab::session::Session; + + let rkey = session_uri.rkey().ok_or_else(|| { + AgentError::from(ClientError::invalid_request("Session URI missing rkey")) + })?; + self.delete_record::(rkey.clone()).await?; + Ok(()) + } + } + + /// Refresh a collaboration session's TTL. + /// + /// Called periodically to indicate the session is still active. + fn refresh_collab_session<'a>( + &'a self, + session_uri: &'a AtUri<'a>, + ttl_minutes: u32, + ) -> impl Future> + 'a { + async move { + use jacquard::types::string::Datetime; + use weaver_api::sh_weaver::collab::session::Session; + + let now_chrono = chrono::Utc::now().fixed_offset(); + let expires = now_chrono + chrono::Duration::minutes(ttl_minutes as i64); + let expires_at = Datetime::new(expires); + + self.update_record::(session_uri, |session| { + session.expires_at = Some(expires_at); + }) + .await?; + Ok(()) + } + } + + /// Find active collaboration sessions for a resource. + /// + /// Queries Constellation for session records referencing the given resource, + /// then fetches each to extract peer connection info. + /// + /// Returns peers with unexpired sessions (or no expiry set). + fn find_session_peers<'a>( + &'a self, + resource_uri: &'a AtUri<'a>, + ) -> impl Future>, WeaverError>> + 'a + where + Self: Sized, + { + async move { + use jacquard::types::string::Datetime; + use weaver_api::sh_weaver::collab::session::Session; + + const SESSION_NSID: &str = "sh.weaver.collab.session"; + + let constellation_url = Url::parse(CONSTELLATION_URL).map_err(|e| { + AgentError::from(ClientError::invalid_request(format!( + "Invalid constellation URL: {}", + e + ))) + })?; + + // Query for session records referencing this resource + let query = GetBacklinksQuery { + subject: Uri::At(resource_uri.clone().into_static()), + source: format!("{}:resource.uri", SESSION_NSID).into(), + cursor: None, + did: vec![], + limit: 100, + }; + + let response = self + .xrpc(constellation_url) + .send(&query) + .await + .map_err(|e| { + AgentError::from(ClientError::invalid_request(format!( + "Constellation query failed: {}", + e + ))) + })?; + + let output = response.into_output().map_err(|e| { + AgentError::from(ClientError::invalid_request(format!( + "Failed to parse constellation response: {}", + e + ))) + })?; + + let mut peers = Vec::new(); + let now = Datetime::now(); + + for record_id in output.records { + let session_uri_str = format!( + "at://{}/{}/{}", + record_id.did, + SESSION_NSID, + record_id.rkey.0.as_ref() + ); + let Ok(session_uri) = AtUri::new(&session_uri_str) else { + continue; + }; + + // Fetch the session record + let Ok(session_resp) = self.get_record::(&session_uri).await else { + continue; + }; + let Ok(session_record) = session_resp.into_output() else { + continue; + }; + + // Check if session has expired (Datetime implements Ord) + if let Some(ref expires_at) = session_record.value.expires_at { + if *expires_at < now { + continue; // Session expired + } + } + + peers.push(SessionPeer { + did: record_id.did.into_static(), + node_id: session_record.value.node_id.to_string(), + relay_url: session_record + .value + .relay_url + .map(|u| u.as_str().to_string()), + created_at: session_record.value.created_at, + expires_at: session_record.value.expires_at, + }); + } + + Ok(peers) + } + } + /// Find contributors (authors) for a resource based on evidence. /// /// Contributors are DIDs who have actually contributed to this resource: @@ -1985,4 +2172,19 @@ pub struct CollaboratorVersion<'a> { pub value: jacquard::Data<'a>, } +/// Information about a peer discovered from session records. +#[derive(Debug, Clone)] +pub struct SessionPeer<'a> { + /// The peer's DID. + pub did: Did<'a>, + /// The peer's iroh NodeId (z-base32 encoded). + pub node_id: String, + /// Optional relay URL for browser clients. + pub relay_url: Option, + /// When the session was created. + pub created_at: jacquard::types::string::Datetime, + /// When the session expires (if set). + pub expires_at: Option, +} + impl WeaverExt for T {} diff --git a/crates/weaver-common/src/lib.rs b/crates/weaver-common/src/lib.rs index bf45db5..d89e1d6 100644 --- a/crates/weaver-common/src/lib.rs +++ b/crates/weaver-common/src/lib.rs @@ -4,10 +4,11 @@ pub mod agent; pub mod constellation; pub mod error; pub mod resolve; +pub mod transport; pub mod worker_rt; // Re-export jacquard for convenience -pub use agent::WeaverExt; +pub use agent::{SessionPeer, WeaverExt}; pub use error::WeaverError; pub use resolve::{EntryIndex, ExtractedRef, RefCollector, ResolvedContent, ResolvedEntry}; diff --git a/crates/weaver-common/src/transport/discovery.rs b/crates/weaver-common/src/transport/discovery.rs new file mode 100644 index 0000000..f9d26df --- /dev/null +++ b/crates/weaver-common/src/transport/discovery.rs @@ -0,0 +1,80 @@ +//! Peer discovery via AT Protocol session records. +//! +//! Collaborators publish `sh.weaver.collab.session` records to their PDS +//! when joining a session. This module provides utilities for: +//! - Parsing NodeIds from session records +//! - Converting between EndpointId and z-base32 strings + +use iroh::EndpointId; +use miette::Diagnostic; +use std::str::FromStr; + +/// Error type for discovery operations +#[derive(Debug, thiserror::Error, Diagnostic)] +#[diagnostic(code(weaver::transport::discovery))] +pub enum DiscoveryError { + #[error("invalid node ID: {0}")] + InvalidNodeId(String), + + #[error("failed to fetch session records")] + FetchError(#[source] Box), +} + +/// Parse an EndpointId from a z-base32 encoded string. +/// +/// Session records store NodeIds as z-base32 strings. This converts +/// them back to EndpointId for use with iroh. +pub fn parse_node_id(s: &str) -> Result { + EndpointId::from_str(s).map_err(|_| DiscoveryError::InvalidNodeId(s.to_string())) +} + +/// Convert an EndpointId to a z-base32 string for storage in session records. +pub fn node_id_to_string(id: &EndpointId) -> String { + id.to_string() +} + +/// Information about a discovered peer from a session record. +#[derive(Debug, Clone)] +pub struct DiscoveredPeer { + /// The peer's iroh EndpointId + pub node_id: EndpointId, + /// Optional relay URL for browser clients + pub relay_url: Option, +} + +impl DiscoveredPeer { + /// Parse a DiscoveredPeer from a session record's fields. + pub fn from_session_fields( + node_id: &str, + relay_url: Option<&str>, + ) -> Result { + Ok(Self { + node_id: parse_node_id(node_id)?, + relay_url: relay_url.map(String::from), + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_node_id_roundtrip() { + // Generate a random key and get its EndpointId + let secret = iroh::SecretKey::generate(&mut rand::rng()); + let endpoint_id = secret.public(); + + // Convert to string and back + let s = node_id_to_string(&endpoint_id); + let parsed = parse_node_id(&s).unwrap(); + + assert_eq!(endpoint_id, parsed); + } + + #[test] + fn test_invalid_node_id() { + let result = parse_node_id("not-a-valid-node-id"); + assert!(result.is_err()); + } +} diff --git a/crates/weaver-common/src/transport/messages.rs b/crates/weaver-common/src/transport/messages.rs new file mode 100644 index 0000000..caea7ff --- /dev/null +++ b/crates/weaver-common/src/transport/messages.rs @@ -0,0 +1,106 @@ +//! Wire protocol for collaborative editing messages. + +use serde::{Deserialize, Serialize}; + +/// Messages exchanged between collaborators over gossip. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub enum CollabMessage { + /// Loro CRDT update - incremental changes + LoroUpdate { + /// Serialized Loro update bytes + data: Vec, + /// Version vector for ordering/deduplication + version: Vec<(u64, u64)>, + }, + + /// Cursor position update (presence) + Cursor { + /// Cursor position in document + position: usize, + /// Optional selection range (anchor, head) + selection: Option<(usize, usize)>, + /// Assigned collaborator colour (RGBA) + color: u32, + }, + + /// Collaborator joined the session + Join { + /// DID of the joining user + did: String, + /// Display name for presence UI + display_name: String, + }, + + /// Collaborator left the session + Leave { + /// DID of the leaving user + did: String, + }, + + /// Request sync from peers (late joiner) + SyncRequest { + /// Version vector of what we already have + have_version: Vec<(u64, u64)>, + }, + + /// Response to sync request + SyncResponse { + /// Loro update/snapshot bytes + data: Vec, + /// True if this is a full snapshot, false if incremental + is_snapshot: bool, + }, +} + +impl CollabMessage { + /// Serialize message to CBOR bytes for wire transmission + pub fn to_bytes(&self) -> Result, postcard::Error> { + postcard::to_stdvec(self) + } + + /// Deserialize message from CBOR bytes + pub fn from_bytes(bytes: &[u8]) -> Result { + postcard::from_bytes(bytes) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_roundtrip_loro_update() { + let msg = CollabMessage::LoroUpdate { + data: vec![1, 2, 3, 4], + version: vec![(1, 10), (2, 5)], + }; + let bytes = msg.to_bytes().unwrap(); + let decoded = CollabMessage::from_bytes(&bytes).unwrap(); + + match decoded { + CollabMessage::LoroUpdate { data, version } => { + assert_eq!(data, vec![1, 2, 3, 4]); + assert_eq!(version, vec![(1, 10), (2, 5)]); + } + _ => panic!("wrong variant"), + } + } + + #[test] + fn test_roundtrip_join() { + let msg = CollabMessage::Join { + did: "did:plc:abc123".to_string(), + display_name: "Alice".to_string(), + }; + let bytes = msg.to_bytes().unwrap(); + let decoded = CollabMessage::from_bytes(&bytes).unwrap(); + + match decoded { + CollabMessage::Join { did, display_name } => { + assert_eq!(did, "did:plc:abc123"); + assert_eq!(display_name, "Alice"); + } + _ => panic!("wrong variant"), + } + } +} diff --git a/crates/weaver-common/src/transport/mod.rs b/crates/weaver-common/src/transport/mod.rs new file mode 100644 index 0000000..41e0267 --- /dev/null +++ b/crates/weaver-common/src/transport/mod.rs @@ -0,0 +1,23 @@ +//! Real-time collaboration transport layer using iroh P2P networking. +//! +//! This module provides the infrastructure for real-time collaborative editing: +//! - `CollabNode`: iroh endpoint + gossip router (one per app instance) +//! - `CollabSession`: per-resource session management +//! - `CollabMessage`: wire protocol for CRDT updates, cursors, presence +//! - `discovery`: utilities for parsing NodeIds from session records + +mod discovery; +mod messages; +mod node; +mod presence; +mod session; + +pub use discovery::{node_id_to_string, parse_node_id, DiscoveredPeer, DiscoveryError}; +pub use iroh::EndpointId; +pub use messages::CollabMessage; +pub use node::{CollabNode, TransportError}; +pub use presence::{Collaborator, PresenceTracker, RemoteCursor}; +pub use session::{CollabSession, SessionError, SessionEvent, TopicId}; + +/// ALPN protocol identifier for weaver collaboration +pub const WEAVER_GOSSIP_ALPN: &[u8] = b"weaver/collab/0"; diff --git a/crates/weaver-common/src/transport/node.rs b/crates/weaver-common/src/transport/node.rs new file mode 100644 index 0000000..11ea7c1 --- /dev/null +++ b/crates/weaver-common/src/transport/node.rs @@ -0,0 +1,101 @@ +//! CollabNode - iroh endpoint with gossip router for real-time collaboration. + +use iroh::Endpoint; +use iroh::EndpointId; +use iroh::SecretKey; +use iroh_gossip::net::Gossip; +use miette::Diagnostic; +use std::sync::Arc; + +use super::WEAVER_GOSSIP_ALPN; + +/// Error type for transport operations +#[derive(Debug, thiserror::Error, Diagnostic)] +#[diagnostic(code(weaver::transport))] +pub enum TransportError { + #[error("failed to bind endpoint")] + Bind(#[source] Box), + + #[error("gossip error")] + Gossip(#[source] Box), +} + +/// A collaboration node wrapping an iroh endpoint and gossip router. +/// +/// There should be one CollabNode per application instance. It manages: +/// - The iroh QUIC endpoint (with automatic relay fallback for browsers) +/// - The gossip protocol handler +/// - The protocol router for ALPN dispatch +pub struct CollabNode { + endpoint: Endpoint, + gossip: Gossip, + #[allow(dead_code)] + router: iroh::protocol::Router, + secret_key: SecretKey, +} + +impl CollabNode { + /// Spawn a new collaboration node. + /// + /// If no secret key is provided, a new one is generated. For browsers, + /// this means each session gets a fresh identity (published to PDS via + /// session records for peer discovery). + pub async fn spawn(secret_key: Option) -> Result, TransportError> { + let secret_key = secret_key.unwrap_or_else(|| SecretKey::generate(&mut rand::rng())); + + // Build endpoint with gossip ALPN + // In WASM, this automatically uses relay-only mode + // In native, this can do direct P2P with relay fallback + let endpoint = Endpoint::builder() + .secret_key(secret_key.clone()) + .alpns(vec![WEAVER_GOSSIP_ALPN.to_vec()]) + .bind() + .await + .map_err(|e| TransportError::Bind(Box::new(e)))?; + + // Build gossip protocol handler + let gossip = Gossip::builder().spawn(endpoint.clone()); + + // Build router to dispatch incoming connections by ALPN + let router = iroh::protocol::Router::builder(endpoint.clone()) + .accept(WEAVER_GOSSIP_ALPN, gossip.clone()) + .spawn(); + + tracing::info!(node_id = %endpoint.id(), "CollabNode started"); + + Ok(Arc::new(Self { + endpoint, + gossip, + router, + secret_key, + })) + } + + /// Get this node's public identifier. + /// + /// This should be published to the user's PDS in a session record + /// so other collaborators can discover and connect to this node. + pub fn node_id(&self) -> EndpointId { + self.endpoint.id() + } + + /// Get the node ID as a z-base32 string for storage in AT Protocol records. + pub fn node_id_string(&self) -> String { + self.endpoint.id().to_string() + } + + /// Get a reference to the gossip handler for joining topics. + pub fn gossip(&self) -> &Gossip { + &self.gossip + } + + /// Get a reference to the underlying endpoint. + pub fn endpoint(&self) -> &Endpoint { + &self.endpoint + } + + /// Get a clone of the secret key (for session persistence if needed). + pub fn secret_key(&self) -> SecretKey { + self.secret_key.clone() + } +} diff --git a/crates/weaver-common/src/transport/presence.rs b/crates/weaver-common/src/transport/presence.rs new file mode 100644 index 0000000..949d87b --- /dev/null +++ b/crates/weaver-common/src/transport/presence.rs @@ -0,0 +1,206 @@ +//! Presence tracking for collaborative editing sessions. +//! +//! Tracks active collaborators, their cursor positions, and display info. + +use std::collections::HashMap; + +use iroh::EndpointId; +use web_time::Instant; + +/// A remote collaborator's cursor state. +#[derive(Debug, Clone, PartialEq)] +pub struct RemoteCursor { + /// Character offset in the document. + pub position: usize, + /// Selection range (anchor, head) if any. + pub selection: Option<(usize, usize)>, + /// Assigned colour (RGBA). + pub color: u32, + /// When this cursor was last updated. + pub updated_at: Instant, +} + +/// A collaborator in the session. +#[derive(Debug, Clone)] +pub struct Collaborator { + /// The collaborator's DID. + pub did: String, + /// Display name for UI. + pub display_name: String, + /// Assigned colour (RGBA). + pub color: u32, + /// Current cursor state. + pub cursor: Option, + /// iroh endpoint ID for this peer. + pub node_id: EndpointId, +} + +/// Tracks all collaborators in a session. +#[derive(Debug, Default)] +pub struct PresenceTracker { + /// Collaborators by EndpointId. + collaborators: HashMap, + /// Colour assignment counter. + next_color_index: usize, +} + +/// Predefined collaborator colours (pastel-ish for readability). +const COLLABORATOR_COLORS: [u32; 8] = [ + 0xFF6B6BFF, // Red + 0x4ECDC4FF, // Teal + 0xFFE66DFF, // Yellow + 0x95E1D3FF, // Mint + 0xF38181FF, // Coral + 0xAA96DAFF, // Purple + 0xFCBF49FF, // Orange + 0x2EC4B6FF, // Cyan +]; + +impl PresenceTracker { + /// Create a new presence tracker. + pub fn new() -> Self { + Self::default() + } + + /// Add a collaborator when they join. + pub fn add_collaborator(&mut self, node_id: EndpointId, did: String, display_name: String) { + let color = self.assign_color(); + self.collaborators.insert( + node_id, + Collaborator { + did, + display_name, + color, + cursor: None, + node_id, + }, + ); + } + + /// Remove a collaborator when they leave. + pub fn remove_collaborator(&mut self, node_id: &EndpointId) -> Option { + self.collaborators.remove(node_id) + } + + /// Update a collaborator's cursor position. + pub fn update_cursor( + &mut self, + node_id: &EndpointId, + position: usize, + selection: Option<(usize, usize)>, + ) { + if let Some(collab) = self.collaborators.get_mut(node_id) { + collab.cursor = Some(RemoteCursor { + position, + selection, + color: collab.color, + updated_at: Instant::now(), + }); + } + } + + /// Get all active collaborators. + pub fn collaborators(&self) -> impl Iterator { + self.collaborators.values() + } + + /// Get all remote cursors (for rendering). + pub fn cursors(&self) -> impl Iterator { + self.collaborators + .values() + .filter_map(|c| c.cursor.as_ref().map(|cursor| (c, cursor))) + } + + /// Get a collaborator by EndpointId. + pub fn get(&self, node_id: &EndpointId) -> Option<&Collaborator> { + self.collaborators.get(node_id) + } + + /// Check if an EndpointId is a known collaborator. + pub fn contains(&self, node_id: &EndpointId) -> bool { + self.collaborators.contains_key(node_id) + } + + /// Number of active collaborators. + pub fn len(&self) -> usize { + self.collaborators.len() + } + + /// Check if there are no collaborators. + pub fn is_empty(&self) -> bool { + self.collaborators.is_empty() + } + + /// Assign a colour to a new collaborator. + fn assign_color(&mut self) -> u32 { + let color = COLLABORATOR_COLORS[self.next_color_index % COLLABORATOR_COLORS.len()]; + self.next_color_index += 1; + color + } + + /// Remove stale cursors that haven't been updated recently. + pub fn prune_stale_cursors(&mut self, max_age: std::time::Duration) { + let now = Instant::now(); + for collab in self.collaborators.values_mut() { + if let Some(ref cursor) = collab.cursor { + if now.duration_since(cursor.updated_at) > max_age { + collab.cursor = None; + } + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + fn test_node_id() -> EndpointId { + use iroh::SecretKey; + SecretKey::generate(&mut rand::rng()).public() + } + + #[test] + fn test_add_remove_collaborator() { + let mut tracker = PresenceTracker::new(); + let node_id = test_node_id(); + + tracker.add_collaborator(node_id, "did:plc:test".into(), "Alice".into()); + assert_eq!(tracker.len(), 1); + assert!(tracker.contains(&node_id)); + + let removed = tracker.remove_collaborator(&node_id); + assert!(removed.is_some()); + assert_eq!(removed.unwrap().display_name, "Alice"); + assert!(tracker.is_empty()); + } + + #[test] + fn test_cursor_update() { + let mut tracker = PresenceTracker::new(); + let node_id = test_node_id(); + + tracker.add_collaborator(node_id, "did:plc:test".into(), "Bob".into()); + tracker.update_cursor(&node_id, 42, Some((40, 50))); + + let collab = tracker.get(&node_id).unwrap(); + let cursor = collab.cursor.as_ref().unwrap(); + assert_eq!(cursor.position, 42); + assert_eq!(cursor.selection, Some((40, 50))); + } + + #[test] + fn test_color_assignment() { + let mut tracker = PresenceTracker::new(); + + for i in 0..10 { + let node_id = test_node_id(); + tracker.add_collaborator(node_id, format!("did:plc:test{}", i), format!("User{}", i)); + } + + // Each collaborator should have a colour + for collab in tracker.collaborators() { + assert!(collab.color != 0); + } + } +} diff --git a/crates/weaver-common/src/transport/session.rs b/crates/weaver-common/src/transport/session.rs new file mode 100644 index 0000000..ae1dcda --- /dev/null +++ b/crates/weaver-common/src/transport/session.rs @@ -0,0 +1,159 @@ +//! CollabSession - per-resource gossip session for real-time collaboration. + +use std::sync::Arc; + +use iroh::EndpointId; +use iroh_gossip::api::{Event, GossipReceiver, GossipSender}; +use miette::Diagnostic; +use n0_future::StreamExt; +use n0_future::boxed::BoxStream; +use n0_future::stream; + +use super::{CollabMessage, CollabNode}; + +/// Topic ID for a gossip session - derived from resource URI. +pub type TopicId = iroh_gossip::TopicId; + +/// Error type for session operations +#[derive(Debug, thiserror::Error, Diagnostic)] +#[diagnostic(code(weaver::transport::session))] +pub enum SessionError { + #[error("failed to subscribe to topic")] + Subscribe(#[source] Box), + + #[error("failed to broadcast message")] + Broadcast(#[source] Box), + + #[error("failed to decode message")] + Decode(#[source] Box), + + #[error("session closed")] + Closed, +} + +/// Events emitted by a collaboration session. +#[derive(Debug, Clone)] +pub enum SessionEvent { + /// A collaborator joined the session + PeerJoined(EndpointId), + + /// A collaborator left the session + PeerLeft(EndpointId), + + /// Received a collaboration message from a peer + Message { + from: EndpointId, + message: CollabMessage, + }, + + /// We successfully joined the gossip swarm + Joined, +} + +/// A collaboration session for a specific resource. +/// +/// Each session manages gossip subscriptions for one resource (e.g., one notebook). +/// Create via `CollabSession::join()`. +pub struct CollabSession { + topic: TopicId, + sender: GossipSender, + #[allow(dead_code)] + node: Arc, +} + +impl CollabSession { + /// Derive a topic ID from a resource identifier. + /// + /// We use blake3 hash of the AT-URI to get a stable 32-byte topic ID. + /// Format: `at://{did}/{collection}/{rkey}` + pub fn topic_from_uri(uri: &str) -> TopicId { + let hash = blake3::hash(uri.as_bytes()); + TopicId::from_bytes(*hash.as_bytes()) + } + + /// Join a collaboration session for a resource. + /// + /// Returns the session handle and a stream for receiving events. + /// Bootstrap peers are NodeIds of collaborators discovered from session records. + pub async fn join( + node: Arc, + topic: TopicId, + bootstrap_peers: Vec, + ) -> Result<(Self, BoxStream), SessionError> { + // Subscribe to the gossip topic + let (sender, receiver) = node + .gossip() + .subscribe(topic, bootstrap_peers) + .await + .map_err(|e| SessionError::Subscribe(Box::new(e)))? + .split(); + + let session = Self { + topic, + sender, + node: node.clone(), + }; + + // Create event stream from the gossip receiver + let event_stream = Self::event_stream(receiver); + + Ok((session, event_stream)) + } + + /// Convert gossip receiver into a stream of session events. + fn event_stream(receiver: GossipReceiver) -> BoxStream { + let stream = stream::unfold(receiver, |mut receiver| async move { + loop { + match receiver.next().await { + Some(Ok(event)) => { + let session_event = match event { + Event::NeighborUp(peer) => SessionEvent::PeerJoined(peer), + Event::NeighborDown(peer) => SessionEvent::PeerLeft(peer), + Event::Received(msg) => match CollabMessage::from_bytes(&msg.content) { + Ok(message) => SessionEvent::Message { + from: msg.delivered_from, + message, + }, + Err(e) => { + tracing::warn!(?e, "failed to decode collab message"); + continue; + } + }, + Event::Lagged => { + tracing::warn!("gossip receiver lagged, some messages may be lost"); + continue; + } + }; + return Some((session_event, receiver)); + } + Some(Err(e)) => { + tracing::warn!(?e, "gossip receiver error"); + continue; + } + None => return None, + } + } + }); + + Box::pin(stream) + } + + /// Broadcast a message to all peers in the session. + pub async fn broadcast(&self, message: &CollabMessage) -> Result<(), SessionError> { + let bytes = message + .to_bytes() + .map_err(|e| SessionError::Broadcast(Box::new(e)))?; + + self.sender + .broadcast(bytes.into()) + .await + .map_err(|e| SessionError::Broadcast(Box::new(e)))?; + + Ok(()) + } + + /// Get the topic ID for this session. + pub fn topic(&self) -> TopicId { + self.topic + } +} diff --git a/flake.lock b/flake.lock index 96e9537..4114f7c 100644 --- a/flake.lock +++ b/flake.lock @@ -3,11 +3,11 @@ "advisory-db": { "flake": false, "locked": { - "lastModified": 1763052940, - "narHash": "sha256-dt2Eze8JMyeCqpUPT1TF6XrGJR8QeD7UvUDaIrKngrE=", + "lastModified": 1764961644, + "narHash": "sha256-IjQ/BGpfkT9qctlaZMK8UbZcQlkw9F0ZVscTk7IlsqA=", "owner": "rustsec", "repo": "advisory-db", - "rev": "4b6acc7020a23b61ae4963a075f0a4058cef79f2", + "rev": "5d6f7fbf103a21c952246b1932a9c217147a98d8", "type": "github" }, "original": { @@ -18,11 +18,11 @@ }, "crane": { "locked": { - "lastModified": 1762538466, - "narHash": "sha256-8zrIPl6J+wLm9MH5ksHcW7BUHo7jSNOu0/hA0ohOOaM=", + "lastModified": 1764903584, + "narHash": "sha256-RSkJtNtx0SEaQiYqsoFoRynwfZLo2OZ9z6rUq1DJR6g=", "owner": "ipetkov", "repo": "crane", - "rev": "0cea393fffb39575c46b7a0318386467272182fe", + "rev": "2b3a5a88d852575758e1eb6ac9ee677fcd633fc1", "type": "github" }, "original": { @@ -39,11 +39,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1763000036, - "narHash": "sha256-yJiLpG1W2+yn3xvdeVTpt9CUYC2/VBLCCpKhEifdcsc=", + "lastModified": 1764965663, + "narHash": "sha256-5t3FTX2GVfROX0oMg4DsT+rTZb+b6KJn44sV8IHPwtU=", "owner": "DioxusLabs", "repo": "dioxus", - "rev": "bd2d1de873ae9c0e7c4656ec0c991ea9aafd3293", + "rev": "74bc78324b63b372c2d02a6b6991072240998db5", "type": "github" }, "original": { @@ -137,11 +137,11 @@ }, "nixpkgs_3": { "locked": { - "lastModified": 1762943920, - "narHash": "sha256-ITeH8GBpQTw9457ICZBddQEBjlXMmilML067q0e6vqY=", + "lastModified": 1764947035, + "narHash": "sha256-EYHSjVM4Ox4lvCXUMiKKs2vETUSL5mx+J2FfutM7T9w=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "91c9a64ce2a84e648d0cf9671274bb9c2fb9ba60", + "rev": "a672be65651c80d3f592a89b3945466584a22069", "type": "github" }, "original": { @@ -200,11 +200,11 @@ "nixpkgs": "nixpkgs_4" }, "locked": { - "lastModified": 1763087910, - "narHash": "sha256-eB9Z1mWd1U6N61+F8qwDggX0ihM55s4E0CluwNukJRU=", + "lastModified": 1764902447, + "narHash": "sha256-wNqkDBj+tjK619sTHPEA7uhjr7DHHEY8OsFou31dxy0=", "owner": "oxalica", "repo": "rust-overlay", - "rev": "cf4a68749733d45c0420726596367acd708eb2e8", + "rev": "d914a744a83098eeb28125d2848ad383b209223f", "type": "github" }, "original": { diff --git a/flake.nix b/flake.nix index 0d18471..b949129 100644 --- a/flake.nix +++ b/flake.nix @@ -228,13 +228,13 @@ src = pkgs.fetchCrate { pname = "wasm-bindgen-cli"; version = wasmBindgen.version; - hash = "sha256-zLPFFgnqAWq5R2KkaTGAYqVQswfBEYm9x3OPjx8DJRY="; + hash = "sha256-M6WuGl7EruNopHZbqBpucu4RWz44/MSdv6f0zkYw+44="; }; cargoDeps = pkgs.rustPlatform.fetchCargoVendor { inherit src; inherit (src) pname version; - hash = "sha256-a2X9bzwnMWNt0fTf30qAiJ4noal/ET1jEtf5fBFj5OU="; + hash = "sha256-ElDatyOwdKwHg3bNH/1pcxKI7LXkhsotlDPQjiLHBwA="; }; }; in @@ -269,7 +269,35 @@ wasm-pack twiggy binaryen.out + llvmPackages_18.clang-unwrapped + llvmPackages_18.llvm + llvmPackages_18.libclang + wabt ]; + + nativeBuildInputs = [pkgs.llvmPackages_18.clang-unwrapped pkgs.llvmPackages_18.bintools-unwrapped]; + + shellHook = '' + export CC_wasm32_unknown_unknown="${pkgs.llvmPackages_18.clang-unwrapped}/bin/clang" + export AR_wasm32_unknown_unknown="${pkgs.llvmPackages_18.bintools-unwrapped}/bin/llvm-ar" + CLANG_MAJOR_VERSION="18" + CLANG_RESOURCE_DIR="${pkgs.llvmPackages_18.clang-unwrapped}/lib/clang/$CLANG_MAJOR_VERSION" + + # Use libclang's include directory which has the standard headers + LIBCLANG_INCLUDE="${pkgs.llvmPackages_18.libclang.lib}/lib/clang/$CLANG_MAJOR_VERSION/include" + + export CFLAGS_wasm32_unknown_unknown="-isystem $LIBCLANG_INCLUDE -resource-dir $CLANG_RESOURCE_DIR" + export CPPFLAGS="-isystem $LIBCLANG_INCLUDE -resource-dir $CLANG_RESOURCE_DIR" + + # Debug: Print the paths to verify they exist + echo "Clang resource dir: $CLANG_RESOURCE_DIR" + echo "Libclang include dir: $LIBCLANG_INCLUDE" + if [ -f "$LIBCLANG_INCLUDE/stddef.h" ]; then + echo "Found stddef.h at: $LIBCLANG_INCLUDE/stddef.h" + else + echo "stddef.h not found in $LIBCLANG_INCLUDE" + fi + ''; }; }); } diff --git a/lexicons/collab/session.json b/lexicons/collab/session.json new file mode 100644 index 0000000..1728423 --- /dev/null +++ b/lexicons/collab/session.json @@ -0,0 +1,40 @@ +{ + "lexicon": 1, + "id": "sh.weaver.collab.session", + "defs": { + "main": { + "type": "record", + "description": "Active real-time collaboration session. Published when joining a collaborative editing session, deleted on disconnect.", + "key": "tid", + "record": { + "type": "object", + "required": ["resource", "nodeId", "createdAt"], + "properties": { + "resource": { + "type": "ref", + "ref": "com.atproto.repo.strongRef", + "description": "The resource being collaboratively edited." + }, + "nodeId": { + "type": "string", + "description": "iroh NodeId in z-base32 encoding for P2P connection." + }, + "relayUrl": { + "type": "string", + "format": "uri", + "description": "DERP relay URL if using relay-only mode (browser clients)." + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "expiresAt": { + "type": "string", + "format": "datetime", + "description": "Session TTL. Should be refreshed periodically while active." + } + } + } + } + } +}