From 6e27403880e9e754f0a7a51b350ba6031cbfad21 Mon Sep 17 00:00:00 2001 From: Orual Date: Fri, 9 Jan 2026 23:29:07 -0500 Subject: [PATCH] sketch of subdomain routing --- Cargo.lock | 274 ++-- Cargo.toml | 22 +- ...weaver_notebook_resolveGlobalNotebook.json | 42 + crates/weaver-api/src/app_bsky/actor.rs | 272 ++-- .../weaver-api/src/app_bsky/ageassurance.rs | 116 +- crates/weaver-api/src/app_bsky/bookmark.rs | 26 +- .../src/app_bsky/bookmark/create_bookmark.rs | 26 +- crates/weaver-api/src/app_bsky/embed.rs | 26 +- .../weaver-api/src/app_bsky/embed/external.rs | 78 +- .../weaver-api/src/app_bsky/embed/images.rs | 26 +- .../weaver-api/src/app_bsky/embed/record.rs | 146 +- .../src/app_bsky/embed/record_with_media.rs | 26 +- crates/weaver-api/src/app_bsky/embed/video.rs | 26 +- crates/weaver-api/src/app_bsky/feed.rs | 178 +-- .../weaver-api/src/app_bsky/feed/generator.rs | 30 +- .../weaver-api/src/app_bsky/feed/get_likes.rs | 30 +- crates/weaver-api/src/app_bsky/feed/post.rs | 56 +- .../weaver-api/src/app_bsky/feed/postgate.rs | 26 +- crates/weaver-api/src/app_bsky/feed/repost.rs | 26 +- .../src/app_bsky/feed/threadgate.rs | 26 +- crates/weaver-api/src/app_bsky/graph.rs | 288 ++-- crates/weaver-api/src/app_bsky/graph/list.rs | 30 +- .../src/app_bsky/graph/listblock.rs | 26 +- .../src/app_bsky/graph/starterpack.rs | 30 +- .../src/app_bsky/graph/verification.rs | 52 +- crates/weaver-api/src/app_bsky/labeler.rs | 142 +- .../weaver-api/src/app_bsky/notification.rs | 522 +++---- .../notification/list_notifications.rs | 104 +- .../notification/put_activity_subscription.rs | 26 +- .../app_bsky/notification/register_push.rs | 64 +- .../app_bsky/notification/unregister_push.rs | 60 +- .../weaver-api/src/app_bsky/richtext/facet.rs | 26 +- crates/weaver-api/src/app_bsky/unspecced.rs | 294 ++-- .../unspecced/get_post_thread_other_v2.rs | 48 +- .../app_bsky/unspecced/get_post_thread_v2.rs | 30 +- .../unspecced/get_tagged_suggestions.rs | 30 +- crates/weaver-api/src/app_bsky/video.rs | 30 +- .../weaver-api/src/blog_pckt/block/mention.rs | 26 +- .../src/blog_pckt/block/task_item.rs | 26 +- crates/weaver-api/src/blog_pckt/post.rs | 52 +- .../src/blog_pckt/richtext/facet.rs | 52 +- crates/weaver-api/src/chat_bsky/convo.rs | 452 +++--- .../moderation/get_actor_metadata.rs | 60 +- .../moderation/update_actor_access.rs | 26 +- crates/weaver-api/src/com_atproto/admin.rs | 74 +- .../src/com_atproto/admin/send_email.rs | 48 +- crates/weaver-api/src/com_atproto/identity.rs | 48 +- crates/weaver-api/src/com_atproto/label.rs | 124 +- .../src/com_atproto/label/subscribe_labels.rs | 26 +- crates/weaver-api/src/com_atproto/repo.rs | 26 +- .../src/com_atproto/repo/apply_writes.rs | 126 +- .../src/com_atproto/repo/create_record.rs | 30 +- .../src/com_atproto/repo/delete_record.rs | 30 +- .../src/com_atproto/repo/get_record.rs | 30 +- .../com_atproto/repo/list_missing_blobs.rs | 26 +- .../src/com_atproto/repo/list_records.rs | 56 +- .../src/com_atproto/repo/put_record.rs | 34 +- .../src/com_atproto/repo/strong_ref.rs | 26 +- crates/weaver-api/src/com_atproto/server.rs | 168 +-- .../com_atproto/server/create_app_password.rs | 30 +- .../com_atproto/server/create_invite_codes.rs | 26 +- .../src/com_atproto/server/delete_account.rs | 30 +- .../src/com_atproto/sync/get_blob.rs | 26 +- .../src/com_atproto/sync/get_blocks.rs | 26 +- .../src/com_atproto/sync/get_record.rs | 30 +- .../src/com_atproto/sync/list_repos.rs | 30 +- .../src/com_atproto/sync/subscribe_repos.rs | 406 +++--- .../src/com_deckbelcher/deck/list.rs | 78 +- .../src/com_deckbelcher/richtext/facet.rs | 26 +- .../src/com_deckbelcher/social/like.rs | 26 +- crates/weaver-api/src/com_whtwnd/blog.rs | 26 +- .../blog/get_entry_metadata_by_name.rs | 26 +- .../src/pub_leaflet/blocks/button.rs | 26 +- crates/weaver-api/src/pub_leaflet/comment.rs | 30 +- crates/weaver-api/src/pub_leaflet/document.rs | 30 +- .../src/pub_leaflet/pages/canvas.rs | 90 +- .../weaver-api/src/pub_leaflet/poll/vote.rs | 26 +- .../src/pub_leaflet/richtext/facet.rs | 26 +- .../weaver-api/src/pub_leaflet/theme/color.rs | 64 +- crates/weaver-api/src/sh_weaver/actor.rs | 56 +- crates/weaver-api/src/sh_weaver/collab.rs | 306 ++-- .../weaver-api/src/sh_weaver/collab/accept.rs | 30 +- .../weaver-api/src/sh_weaver/collab/invite.rs | 30 +- .../src/sh_weaver/collab/session.rs | 30 +- crates/weaver-api/src/sh_weaver/edit.rs | 38 +- .../weaver-api/src/sh_weaver/edit/cursor.rs | 56 +- crates/weaver-api/src/sh_weaver/edit/diff.rs | 26 +- crates/weaver-api/src/sh_weaver/embed.rs | 26 +- .../src/sh_weaver/embed/external.rs | 78 +- .../weaver-api/src/sh_weaver/embed/images.rs | 30 +- .../src/sh_weaver/embed/record_with_media.rs | 26 +- .../weaver-api/src/sh_weaver/embed/records.rs | 96 +- .../weaver-api/src/sh_weaver/embed/video.rs | 26 +- crates/weaver-api/src/sh_weaver/graph.rs | 282 ++-- .../src/sh_weaver/graph/bookmark.rs | 26 +- crates/weaver-api/src/sh_weaver/graph/like.rs | 26 +- crates/weaver-api/src/sh_weaver/graph/list.rs | 30 +- .../src/sh_weaver/graph/listitem.rs | 48 +- crates/weaver-api/src/sh_weaver/graph/tag.rs | 30 +- crates/weaver-api/src/sh_weaver/notebook.rs | 535 +++---- .../src/sh_weaver/notebook/chapter.rs | 30 +- .../src/sh_weaver/notebook/entry.rs | 78 +- .../sh_weaver/notebook/get_entry_notebooks.rs | 26 +- .../notebook/get_notebook_by_title.rs | 26 +- .../sh_weaver/notebook/get_reading_history.rs | 26 +- .../weaver-api/src/sh_weaver/notebook/page.rs | 48 +- .../src/sh_weaver/notebook/resolve_entry.rs | 48 +- .../notebook/resolve_global_notebook.rs | 189 +++ .../sh_weaver/notebook/resolve_notebook.rs | 26 +- .../src/sh_weaver/notebook/theme.rs | 214 +-- .../weaver-api/src/sh_weaver/notification.rs | 222 +-- .../weaver-api/src/sh_weaver/publish/blob.rs | 26 +- .../weaver-api/src/site_standard/document.rs | 48 +- .../src/site_standard/theme/basic.rs | 62 +- .../src/site_standard/theme/color.rs | 56 +- .../src/tools_ozone/communication.rs | 134 +- .../weaver-api/src/tools_ozone/moderation.rs | 1242 ++++++++--------- .../src/tools_ozone/moderation/emit_event.rs | 30 +- .../moderation/get_account_timeline.rs | 56 +- .../tools_ozone/moderation/schedule_action.rs | 88 +- crates/weaver-api/src/tools_ozone/safelink.rs | 280 ++-- .../src/tools_ozone/safelink/add_rule.rs | 56 +- .../src/tools_ozone/safelink/update_rule.rs | 34 +- crates/weaver-api/src/tools_ozone/set.rs | 58 +- .../src/tools_ozone/set/add_values.rs | 26 +- crates/weaver-api/src/tools_ozone/setting.rs | 96 +- .../src/tools_ozone/setting/upsert_option.rs | 30 +- .../src/tools_ozone/team/add_member.rs | 26 +- .../src/tools_ozone/verification.rs | 96 +- .../verification/grant_verifications.rs | 74 +- .../verification/revoke_verifications.rs | 26 +- crates/weaver-app/.env-prod | 10 +- crates/weaver-app/Cargo.toml | 6 +- crates/weaver-app/assets/styling/layouts.css | 12 +- crates/weaver-app/src/components/app_link.rs | 339 +++++ .../src/components/author_list/component.rs | 14 +- crates/weaver-app/src/components/entry.rs | 33 +- .../src/components/entry_actions.rs | 38 +- crates/weaver-app/src/components/mod.rs | 6 + .../src/components/notebook_cover.rs | 8 +- .../src/components/record_editor.rs | 4 +- .../weaver-app/src/components/record_view.rs | 2 +- crates/weaver-app/src/host_mode.rs | 160 +++ crates/weaver-app/src/lib.rs | 91 ++ crates/weaver-app/src/main.rs | 90 +- crates/weaver-app/src/record_utils.rs | 6 + crates/weaver-app/src/subdomain_app.rs | 199 +++ crates/weaver-app/src/views/mod.rs | 3 + crates/weaver-app/src/views/navbar.rs | 3 + crates/weaver-app/src/views/record.rs | 2 +- .../weaver-app/src/views/subdomain_navbar.rs | 201 +++ crates/weaver-index/package-lock.json | 329 +++++ crates/weaver-index/package.json | 5 + .../src/clickhouse/queries/notebooks.rs | 43 + crates/weaver-index/src/endpoints/notebook.rs | 84 ++ crates/weaver-index/src/server.rs | 6 +- 156 files changed, 7302 insertions(+), 5624 deletions(-) create mode 100644 crates/weaver-api/lexicons/sh_weaver_notebook_resolveGlobalNotebook.json create mode 100644 crates/weaver-api/src/sh_weaver/notebook/resolve_global_notebook.rs create mode 100644 crates/weaver-app/src/components/app_link.rs create mode 100644 crates/weaver-app/src/host_mode.rs create mode 100644 crates/weaver-app/src/subdomain_app.rs create mode 100644 crates/weaver-app/src/views/subdomain_navbar.rs create mode 100644 crates/weaver-index/package-lock.json create mode 100644 crates/weaver-index/package.json diff --git a/Cargo.lock b/Cargo.lock index d62bb04..0b5e0a6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,25 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "abnf" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "087113bd50d9adce24850eed5d0476c7d199d532fce8fab5173650331e09033a" -dependencies = [ - "abnf-core", - "nom", -] - -[[package]] -name = "abnf-core" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c44e09c43ae1c368fb91a03a566472d0087c26cf7e1b9e8e289c14ede681dd7d" -dependencies = [ - "nom", -] - [[package]] name = "addr2line" version = "0.25.1" @@ -896,30 +877,6 @@ dependencies = [ "serde", ] -[[package]] -name = "btree-range-map" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1be5c9672446d3800bcbcaabaeba121fe22f1fb25700c4562b22faf76d377c33" -dependencies = [ - "btree-slab", - "cc-traits", - "range-traits", - "serde", - "slab", -] - -[[package]] -name = "btree-slab" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2b56d3029f075c4fa892428a098425b86cef5c89ae54073137ece416aef13c" -dependencies = [ - "cc-traits", - "slab", - "smallvec", -] - [[package]] name = "buf_redux" version = "0.8.4" @@ -1050,15 +1007,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cc-traits" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "060303ef31ef4a522737e1b1ab68c67916f2a787bb2f4f54f383279adba962b5" -dependencies = [ - "slab", -] - [[package]] name = "cesu8" version = "1.1.0" @@ -2078,7 +2026,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ececcb659e7ba858fb4f10388c250a7252eb0a27373f1a72b8748afdd248e587" dependencies = [ "powerfmt", - "serde_core", ] [[package]] @@ -4526,7 +4473,7 @@ dependencies = [ "futures-core", "futures-sink", "http", - "indexmap 2.12.1", + "indexmap", "slab", "tokio", "tokio-util", @@ -4587,6 +4534,8 @@ version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" dependencies = [ + "allocator-api2", + "equivalent", "foldhash 0.1.5", ] @@ -4692,12 +4641,6 @@ version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" -[[package]] -name = "hex_fmt" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b07f60793ff0a4d9cef0f18e63b5357e06209987153a64648c972c1e5aff336f" - [[package]] name = "hickory-proto" version = "0.24.4" @@ -5228,17 +5171,6 @@ dependencies = [ "quote", ] -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - [[package]] name = "indexmap" version = "2.12.1" @@ -5251,15 +5183,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "indoc" -version = "2.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706" -dependencies = [ - "rustversion", -] - [[package]] name = "infer" version = "0.19.0" @@ -5455,7 +5378,7 @@ dependencies = [ "futures-lite", "futures-util", "hex", - "indexmap 2.12.1", + "indexmap", "iroh", "iroh-base", "iroh-metrics", @@ -5708,7 +5631,7 @@ checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" [[package]] name = "jacquard" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "bytes", "getrandom 0.2.16", @@ -5725,7 +5648,7 @@ dependencies = [ "regex-lite", "reqwest", "serde", - "serde_html_form", + "serde_html_form 0.3.2", "serde_json", "smol_str", "thiserror 2.0.17", @@ -5739,7 +5662,7 @@ dependencies = [ [[package]] name = "jacquard-api" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "bon", "bytes", @@ -5758,7 +5681,7 @@ dependencies = [ [[package]] name = "jacquard-axum" version = "0.9.6" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "axum", "bytes", @@ -5769,7 +5692,7 @@ dependencies = [ "miette 7.6.0", "multibase", "serde", - "serde_html_form", + "serde_html_form 0.3.2", "serde_json", "thiserror 2.0.17", "tokio", @@ -5780,40 +5703,45 @@ dependencies = [ [[package]] name = "jacquard-common" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "base64 0.22.1", "bon", "bytes", "chrono", "ciborium", + "ciborium-io", "cid", "ed25519-dalek 2.2.0", "futures", "getrandom 0.2.16", "getrandom 0.3.4", + "hashbrown 0.15.5", "http", "ipld-core", "k256", - "langtag", + "maitake-sync", "miette 7.6.0", "multibase", "multihash", "n0-future 0.1.3", "ouroboros", + "oxilangtag", "p256", "postcard", "rand 0.9.2", "regex", + "regex-automata", "regex-lite", "reqwest", "serde", "serde_bytes", - "serde_html_form", + "serde_html_form 0.3.2", "serde_ipld_dagcbor", "serde_json", "signature 2.2.0", "smol_str", + "spin 0.10.0", "thiserror 2.0.17", "tokio", "tokio-tungstenite-wasm", @@ -5827,7 +5755,7 @@ dependencies = [ [[package]] name = "jacquard-derive" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "heck 0.5.0", "jacquard-lexicon", @@ -5839,7 +5767,7 @@ dependencies = [ [[package]] name = "jacquard-identity" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "bon", "bytes", @@ -5849,12 +5777,12 @@ dependencies = [ "jacquard-common", "jacquard-lexicon", "miette 7.6.0", - "mini-moka-wasm 0.10.99 (git+https://tangled.org/@nonbinary.computer/jacquard)", + "mini-moka-wasm 0.10.99 (git+https://github.com/rsform/jacquard)", "n0-future 0.1.3", "percent-encoding", "reqwest", "serde", - "serde_html_form", + "serde_html_form 0.3.2", "serde_json", "thiserror 2.0.17", "tokio", @@ -5867,7 +5795,7 @@ dependencies = [ [[package]] name = "jacquard-lexicon" version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "cid", "dashmap 6.1.0", @@ -5882,6 +5810,7 @@ dependencies = [ "serde", "serde_ipld_dagcbor", "serde_json", + "serde_path_to_error", "serde_repr", "serde_with", "sha2 0.10.9", @@ -5893,7 +5822,7 @@ dependencies = [ [[package]] name = "jacquard-oauth" version = "0.9.6" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "base64 0.22.1", "bytes", @@ -5910,7 +5839,7 @@ dependencies = [ "rand 0.8.5", "rouille", "serde", - "serde_html_form", + "serde_html_form 0.3.2", "serde_json", "sha2 0.10.9", "smol_str", @@ -5924,8 +5853,8 @@ dependencies = [ [[package]] name = "jacquard-repo" -version = "0.9.5" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +version = "0.9.6" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "bytes", "cid", @@ -6093,7 +6022,7 @@ checksum = "02cb977175687f33fa4afa0c95c112b987ea1443e5a51c8f8ff27dc618270cc2" dependencies = [ "cssparser 0.29.6", "html5ever 0.29.1", - "indexmap 2.12.1", + "indexmap", "selectors", ] @@ -6108,17 +6037,6 @@ dependencies = [ "smallvec", ] -[[package]] -name = "langtag" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecb4c689a30e48ebeaa14237f34037e300dd072e6ad21a9ec72e810ff3c6600" -dependencies = [ - "serde", - "static-regular-grammar", - "thiserror 1.0.69", -] - [[package]] name = "lazy-js-bundle" version = "0.6.2" @@ -6257,7 +6175,7 @@ dependencies = [ "dashmap 5.5.3", "data-encoding", "getrandom 0.3.4", - "indexmap 2.12.1", + "indexmap", "itertools 0.10.5", "lazy_static", "lightningcss-derive", @@ -6572,6 +6490,19 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" +[[package]] +name = "maitake-sync" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6816ab14147f80234c675b80ed6dc4f440d8a1cefc158e766067aedb84c0bcd5" +dependencies = [ + "cordyceps", + "loom", + "mycelium-bitfield", + "pin-project", + "portable-atomic", +] + [[package]] name = "malloc_buf" version = "0.0.6" @@ -6815,7 +6746,7 @@ dependencies = [ "hyper", "hyper-rustls", "hyper-util", - "indexmap 2.12.1", + "indexmap", "ipnet", "metrics", "metrics-util", @@ -6950,7 +6881,7 @@ dependencies = [ [[package]] name = "mini-moka-wasm" version = "0.10.99" -source = "git+https://tangled.org/@nonbinary.computer/jacquard#9021d423a2c199294a9206fa3ec2b8b2c261e117" +source = "git+https://github.com/rsform/jacquard#bfb72e29f20b0683e939db0140fa44cabde162d2" dependencies = [ "crossbeam-channel", "crossbeam-utils", @@ -7095,6 +7026,12 @@ dependencies = [ "twoway", ] +[[package]] +name = "mycelium-bitfield" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24e0cc5e2c585acbd15c5ce911dff71e1f4d5313f43345873311c4f5efd741cc" + [[package]] name = "n0-error" version = "0.1.2" @@ -7798,6 +7735,15 @@ version = "4.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c6901729fa79e91a0913333229e9ca5dc725089d1c363b2f4b4760709dc4a52" +[[package]] +name = "oxilangtag" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23f3f87617a86af77fa3691e6350483e7154c2ead9f1261b75130e21ca0f8acb" +dependencies = [ + "serde", +] + [[package]] name = "p256" version = "0.13.2" @@ -8257,7 +8203,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "740ebea15c5d1428f910cd1a5f52cebf8d25006245ed8ade92702f4943d91e07" dependencies = [ "base64 0.22.1", - "indexmap 2.12.1", + "indexmap", "quick-xml 0.38.4", "serde", "time", @@ -8851,12 +8797,6 @@ dependencies = [ "rand_core 0.9.3", ] -[[package]] -name = "range-traits" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d20581732dd76fa913c7dff1a2412b714afe3573e94d41c34719de73337cc8ab" - [[package]] name = "raw-cpuid" version = "11.6.0" @@ -8927,26 +8867,6 @@ dependencies = [ "thiserror 2.0.17", ] -[[package]] -name = "ref-cast" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" -dependencies = [ - "ref-cast-impl", -] - -[[package]] -name = "ref-cast-impl" -version = "1.0.25" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.111", -] - [[package]] name = "regex" version = "1.12.2" @@ -9416,30 +9336,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "schemars" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4cd191f9397d57d581cddd31014772520aa448f65ef991055d7f61582c65165f" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - -[[package]] -name = "schemars" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9558e172d4e8533736ba97870c4b2cd63f84b382a3d6eb063da41b91cce17289" -dependencies = [ - "dyn-clone", - "ref-cast", - "serde", - "serde_json", -] - [[package]] name = "scoped-tls" version = "1.0.1" @@ -9678,12 +9574,24 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2f2d7ff8a2140333718bb329f5c40fc5f0865b84c426183ce14c97d2ab8154f" dependencies = [ "form_urlencoded", - "indexmap 2.12.1", + "indexmap", "itoa", "ryu", "serde_core", ] +[[package]] +name = "serde_html_form" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2acf96b1d9364968fce46ebb548f1c0e1d7eceae27bdff73865d42e6c7369d94" +dependencies = [ + "form_urlencoded", + "indexmap", + "itoa", + "serde_core", +] + [[package]] name = "serde_ipld_dagcbor" version = "0.6.4" @@ -9702,7 +9610,7 @@ version = "1.0.145" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c" dependencies = [ - "indexmap 2.12.1", + "indexmap", "itoa", "memchr", "ryu", @@ -9784,10 +9692,6 @@ dependencies = [ "base64 0.22.1", "chrono", "hex", - "indexmap 1.9.3", - "indexmap 2.12.1", - "schemars 0.9.0", - "schemars 1.1.0", "serde_core", "serde_json", "serde_with_macros", @@ -10249,26 +10153,6 @@ dependencies = [ "windows-sys 0.59.0", ] -[[package]] -name = "static-regular-grammar" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4a6c40247579acfbb138c3cd7de3dab113ab4ac6227f1b7de7d626ee667957" -dependencies = [ - "abnf", - "btree-range-map", - "ciborium", - "hex_fmt", - "indoc", - "proc-macro-error", - "proc-macro2", - "quote", - "serde", - "sha2 0.10.9", - "syn 2.0.111", - "thiserror 1.0.69", -] - [[package]] name = "static_assertions" version = "1.1.0" @@ -11162,7 +11046,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.12.1", + "indexmap", "toml_datetime 0.6.3", "winnow 0.5.40", ] @@ -11173,7 +11057,7 @@ version = "0.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" dependencies = [ - "indexmap 2.12.1", + "indexmap", "serde", "serde_spanned", "toml_datetime 0.6.3", @@ -11186,7 +11070,7 @@ version = "0.23.10+spec-1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "84c8b9f757e028cee9fa244aea147aab2a9ec09d5325a9b01e0a49730c2b5269" dependencies = [ - "indexmap 2.12.1", + "indexmap", "toml_datetime 0.7.5+spec-1.1.0", "toml_parser", "winnow 0.7.14", @@ -12118,6 +12002,7 @@ version = "0.1.0" dependencies = [ "askama", "axum", + "axum-extra", "base64 0.22.1", "chrono", "console_error_panic_hook", @@ -12155,7 +12040,7 @@ dependencies = [ "resvg", "ring", "serde", - "serde_html_form", + "serde_html_form 0.2.8", "serde_ipld_dagcbor", "serde_json", "syntect", @@ -12163,6 +12048,7 @@ dependencies = [ "time", "tiny-skia", "tokio", + "tower", "tracing", "tracing-subscriber", "tracing-wasm", diff --git a/Cargo.toml b/Cargo.toml index 8f1f323..da2dfc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,13 +33,21 @@ markdown-weaver-escape = { git = "https://github.com/rsform/markdown-weaver", br # markdown-weaver = { path = "../markdown-weaver/markdown-weaver" } # markdown-weaver-escape = { path = "../markdown-weaver/markdown-weaver-escape" } -jacquard = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "tracing"] } -jacquard-identity = { git = "https://tangled.org/@nonbinary.computer/jacquard", features = ["cache"] } -jacquard-common = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -jacquard-axum = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -jacquard-derive = { git = "https://tangled.org/@nonbinary.computer/jacquard" } -jacquard-lexicon = { git = "https://tangled.org/@nonbinary.computer/jacquard", default-features = false } -jacquard-repo = { git = "https://tangled.org/@nonbinary.computer/jacquard" } +# jacquard = { git = "https://tangled.org/nonbinary.computer/jacquard", default-features = false, features = ["derive", "api_bluesky", "tracing"] } +# jacquard-identity = { git = "https://tangled.org/nonbinary.computer/jacquard", features = ["cache"] } +# jacquard-common = { git = "https://tangled.org/nonbinary.computer/jacquard" } +# jacquard-axum = { git = "https://tangled.org/nonbinary.computer/jacquard" } +# jacquard-derive = { git = "https://tangled.org/nonbinary.computer/jacquard" } +# jacquard-lexicon = { git = "https://tangled.org/nonbinary.computer/jacquard", default-features = false } +# jacquard-repo = { git = "https://tangled.org/nonbinary.computer/jacquard" } + +jacquard = { git = "https://github.com/rsform/jacquard", default-features = false, features = ["derive", "api_bluesky", "tracing"] } +jacquard-identity = { git = "https://github.com/rsform/jacquard", features = ["cache"] } +jacquard-common = { git = "https://github.com/rsform/jacquard" } +jacquard-axum = { git = "https://github.com/rsform/jacquard" } +jacquard-derive = { git = "https://github.com/rsform/jacquard" } +jacquard-lexicon = { git = "https://github.com/rsform/jacquard", default-features = false } +jacquard-repo = { git = "https://github.com/rsform/jacquard" } # jacquard = { path = "../jacquard/crates/jacquard", default-features = false, features = ["derive", "api_bluesky", "tracing", "cache"] } # jacquard-identity = { path = "../jacquard/crates/jacquard-identity", features = ["cache"] } diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_resolveGlobalNotebook.json b/crates/weaver-api/lexicons/sh_weaver_notebook_resolveGlobalNotebook.json new file mode 100644 index 0000000..11b4e68 --- /dev/null +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_resolveGlobalNotebook.json @@ -0,0 +1,42 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.resolveGlobalNotebook", + "defs": { + "main": { + "type": "query", + "description": "Resolve a notebook by its global path. Only returns notebooks with publishGlobal enabled. Used for subdomain routing.", + "parameters": { + "type": "params", + "required": [ + "path" + ], + "properties": { + "path": { + "type": "string", + "description": "The global path to resolve (e.g., 'cooking' for cooking.weaver.sh)" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "notebook" + ], + "properties": { + "notebook": { + "type": "ref", + "ref": "sh.weaver.notebook.defs#notebookView" + } + } + } + }, + "errors": [ + { + "name": "NotFound" + } + ] + } + } +} \ 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 3b7351a..f39de99 100644 --- a/crates/weaver-api/src/app_bsky/actor.rs +++ b/crates/weaver-api/src/app_bsky/actor.rs @@ -3137,37 +3137,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(()); } } @@ -3240,8 +3240,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> { @@ -4215,37 +4215,37 @@ pub mod nux_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Completed; type Id; + type Completed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Completed = Unset; type Id = Unset; - } - ///State transition - sets the `completed` field to Set - pub struct SetCompleted(PhantomData S>); - impl sealed::Sealed for SetCompleted {} - impl State for SetCompleted { - type Completed = Set; - type Id = S::Id; + type Completed = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Completed = S::Completed; type Id = Set; + type Completed = S::Completed; + } + ///State transition - sets the `completed` field to Set + pub struct SetCompleted(PhantomData S>); + impl sealed::Sealed for SetCompleted {} + impl State for SetCompleted { + type Id = S::Id; + type Completed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `completed` field - pub struct completed(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `completed` field + pub struct completed(()); } } @@ -4355,8 +4355,8 @@ where impl<'a, S> NuxBuilder<'a, S> where S: nux_state::State, - S::Completed: nux_state::IsSet, S::Id: nux_state::IsSet, + S::Completed: nux_state::IsSet, { /// Build the final struct pub fn build(self) -> Nux<'a> { @@ -5007,37 +5007,37 @@ pub mod profile_view_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(()); } } @@ -5362,8 +5362,8 @@ impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, - S::Did: profile_view_state::IsSet, S::Handle: profile_view_state::IsSet, + S::Did: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { @@ -5548,37 +5548,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(()); } } @@ -5861,8 +5861,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> { @@ -6040,37 +6040,37 @@ pub mod profile_view_detailed_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(()); } } @@ -6524,8 +6524,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::Handle: profile_view_detailed_state::IsSet, S::Did: profile_view_detailed_state::IsSet, + S::Handle: profile_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewDetailed<'a> { @@ -6697,65 +6697,65 @@ pub mod saved_feed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Type; type Pinned; + type Id; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type Type = Unset; type Pinned = Unset; + type Id = Unset; type Value = 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 Type = S::Type; - type Pinned = S::Pinned; - type Value = S::Value; - } ///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 Pinned = S::Pinned; + type Id = S::Id; type Value = S::Value; } ///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 Pinned = Set; + type Id = S::Id; + type Value = S::Value; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Type = S::Type; + type Pinned = S::Pinned; + type Id = 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 Id = S::Id; type Type = S::Type; type Pinned = S::Pinned; + type Id = S::Id; type Value = 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 `type` field pub struct r#type(()); ///Marker type for the `pinned` field pub struct pinned(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `value` field pub struct value(()); } @@ -6870,9 +6870,9 @@ where impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, - S::Id: saved_feed_state::IsSet, S::Type: saved_feed_state::IsSet, S::Pinned: saved_feed_state::IsSet, + S::Id: saved_feed_state::IsSet, S::Value: saved_feed_state::IsSet, { /// Build the final struct @@ -7043,37 +7043,37 @@ pub mod saved_feeds_pref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Saved; type Pinned; + type Saved; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Saved = Unset; type Pinned = Unset; - } - ///State transition - sets the `saved` field to Set - pub struct SetSaved(PhantomData S>); - impl sealed::Sealed for SetSaved {} - impl State for SetSaved { - type Saved = Set; - type Pinned = S::Pinned; + type Saved = Unset; } ///State transition - sets the `pinned` field to Set pub struct SetPinned(PhantomData S>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { - type Saved = S::Saved; type Pinned = Set; + type Saved = S::Saved; + } + ///State transition - sets the `saved` field to Set + pub struct SetSaved(PhantomData S>); + impl sealed::Sealed for SetSaved {} + impl State for SetSaved { + type Pinned = S::Pinned; + type Saved = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `saved` field - pub struct saved(()); ///Marker type for the `pinned` field pub struct pinned(()); + ///Marker type for the `saved` field + pub struct saved(()); } } @@ -7160,8 +7160,8 @@ impl<'a, S: saved_feeds_pref_state::State> SavedFeedsPrefBuilder<'a, S> { impl<'a, S> SavedFeedsPrefBuilder<'a, S> where S: saved_feeds_pref_state::State, - S::Saved: saved_feeds_pref_state::IsSet, S::Pinned: saved_feeds_pref_state::IsSet, + S::Saved: saved_feeds_pref_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeedsPref<'a> { @@ -7383,37 +7383,37 @@ pub mod status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type Record; + 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 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 Status = Set; - type Record = S::Record; + 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 Status = S::Status; type Record = 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 Record = S::Record; + 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 `record` field pub struct record(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -7540,8 +7540,8 @@ where impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, - S::Status: status_view_state::IsSet, S::Record: status_view_state::IsSet, + S::Status: status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StatusView<'a> { @@ -8310,67 +8310,67 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Issuer; + type IsValid; type CreatedAt; + type Issuer; type Uri; - type IsValid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Issuer = Unset; + type IsValid = Unset; type CreatedAt = Unset; + type Issuer = Unset; type Uri = Unset; - type IsValid = 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 `is_valid` field to Set + pub struct SetIsValid(PhantomData S>); + impl sealed::Sealed for SetIsValid {} + impl State for SetIsValid { + type IsValid = Set; type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; type Uri = S::Uri; - type IsValid = S::IsValid; } ///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 IsValid = S::IsValid; type CreatedAt = Set; + type Issuer = S::Issuer; type Uri = S::Uri; + } + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { type IsValid = S::IsValid; + type CreatedAt = S::CreatedAt; + type Issuer = 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 Issuer = S::Issuer; - type CreatedAt = S::CreatedAt; - type Uri = 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 CreatedAt = S::CreatedAt; - type Uri = S::Uri; - type IsValid = Set; + type Issuer = S::Issuer; + type Uri = 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 `is_valid` field + pub struct is_valid(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `issuer` field + pub struct issuer(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `is_valid` field - pub struct is_valid(()); } } @@ -8483,10 +8483,10 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, - S::Issuer: verification_view_state::IsSet, + S::IsValid: verification_view_state::IsSet, S::CreatedAt: verification_view_state::IsSet, + S::Issuer: verification_view_state::IsSet, S::Uri: verification_view_state::IsSet, - S::IsValid: 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 47926de..462ba49 100644 --- a/crates/weaver-api/src/app_bsky/ageassurance.rs +++ b/crates/weaver-api/src/app_bsky/ageassurance.rs @@ -1700,37 +1700,37 @@ pub mod config_region_rule_if_account_older_than_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Date; + 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 Date = 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 Date = S::Date; + type Access = Unset; } ///State transition - sets the `date` field to Set pub struct SetDate(PhantomData S>); impl sealed::Sealed for SetDate {} impl State for SetDate { - type Access = S::Access; type Date = 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 Date = S::Date; + 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 `date` field pub struct date(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -1820,8 +1820,8 @@ where impl<'a, S> ConfigRegionRuleIfAccountOlderThanBuilder<'a, S> where S: config_region_rule_if_account_older_than_state::State, - S::Access: config_region_rule_if_account_older_than_state::IsSet, S::Date: config_region_rule_if_account_older_than_state::IsSet, + S::Access: config_region_rule_if_account_older_than_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAccountOlderThan<'a> { @@ -2476,37 +2476,37 @@ pub mod config_region_rule_if_declared_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(()); } } @@ -2596,8 +2596,8 @@ where impl<'a, S> ConfigRegionRuleIfDeclaredUnderAgeBuilder<'a, S> where S: config_region_rule_if_declared_under_age_state::State, - S::Access: config_region_rule_if_declared_under_age_state::IsSet, S::Age: config_region_rule_if_declared_under_age_state::IsSet, + S::Access: config_region_rule_if_declared_under_age_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfDeclaredUnderAge<'a> { @@ -2704,75 +2704,77 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Access; type Status; type AttemptId; type CountryCode; - 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 Access = Unset; type Status = Unset; type AttemptId = Unset; type CountryCode = 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 Access = S::Access; + type Status = S::Status; + type AttemptId = S::AttemptId; + type CountryCode = S::CountryCode; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData S>); impl sealed::Sealed for SetAccess {} impl State for SetAccess { + type CreatedAt = S::CreatedAt; type Access = Set; type Status = S::Status; type AttemptId = S::AttemptId; type CountryCode = S::CountryCode; - 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 CreatedAt = S::CreatedAt; type Access = S::Access; type Status = Set; 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 CreatedAt = S::CreatedAt; type Access = S::Access; type Status = S::Status; type AttemptId = Set; type CountryCode = S::CountryCode; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `country_code` field to Set pub struct SetCountryCode(PhantomData S>); impl sealed::Sealed for SetCountryCode {} impl State for SetCountryCode { - type Access = S::Access; - type Status = S::Status; - 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 Access = S::Access; type Status = S::Status; type AttemptId = S::AttemptId; - type CountryCode = S::CountryCode; - type CreatedAt = Set; + type CountryCode = 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 `access` field pub struct access(()); ///Marker type for the `status` field @@ -2781,8 +2783,6 @@ pub mod event_state { 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(()); } } @@ -3038,11 +3038,11 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, + S::CreatedAt: event_state::IsSet, S::Access: event_state::IsSet, S::Status: event_state::IsSet, S::AttemptId: event_state::IsSet, S::CountryCode: event_state::IsSet, - S::CreatedAt: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -3333,37 +3333,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(()); } } @@ -3456,8 +3456,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/bookmark.rs b/crates/weaver-api/src/app_bsky/bookmark.rs index ac81a96..300946d 100644 --- a/crates/weaver-api/src/app_bsky/bookmark.rs +++ b/crates/weaver-api/src/app_bsky/bookmark.rs @@ -281,37 +281,37 @@ pub mod bookmark_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Item; + 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 Item = 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 Item = S::Item; + type Subject = Unset; } ///State transition - sets the `item` field to Set pub struct SetItem(PhantomData S>); impl sealed::Sealed for SetItem {} impl State for SetItem { - type Subject = S::Subject; type Item = 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 Item = S::Item; + 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 `item` field pub struct item(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -404,8 +404,8 @@ where impl<'a, S> BookmarkViewBuilder<'a, S> where S: bookmark_view_state::State, - S::Subject: bookmark_view_state::IsSet, S::Item: bookmark_view_state::IsSet, + S::Subject: bookmark_view_state::IsSet, { /// Build the final struct pub fn build(self) -> BookmarkView<'a> { diff --git a/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs b/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs index 6cdf6a4..f592179 100644 --- a/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs +++ b/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs @@ -33,37 +33,37 @@ pub mod create_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; 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; - } - ///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 Uri = S::Uri; + 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 Cid = S::Cid; 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 Uri = S::Uri; + 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 `cid` field + pub struct cid(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> CreateBookmarkBuilder<'a, S> where S: create_bookmark_state::State, - S::Cid: create_bookmark_state::IsSet, S::Uri: create_bookmark_state::IsSet, + S::Cid: create_bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateBookmark<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed.rs b/crates/weaver-api/src/app_bsky/embed.rs index 89519f1..803afd8 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 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(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AspectRatioBuilder<'a, S> where S: aspect_ratio_state::State, - S::Height: aspect_ratio_state::IsSet, S::Width: aspect_ratio_state::IsSet, + S::Height: 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 a5bee9c..76316dc 100644 --- a/crates/weaver-api/src/app_bsky/embed/external.rs +++ b/crates/weaver-api/src/app_bsky/embed/external.rs @@ -39,50 +39,50 @@ pub mod external_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type Uri; type Description; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type Uri = 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 Uri = S::Uri; - type Description = S::Description; - } - ///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 Uri = Set; type Description = S::Description; + type Uri = S::Uri; } ///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 Uri = S::Uri; type Description = 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 = S::Title; + type Description = S::Description; + type Uri = 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 `uri` field - pub struct uri(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -196,8 +196,8 @@ impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, S::Title: external_state::IsSet, - S::Uri: external_state::IsSet, S::Description: external_state::IsSet, + S::Uri: external_state::IsSet, { /// Build the final struct pub fn build(self) -> External<'a> { @@ -784,51 +784,51 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; - type Uri; type Title; + type Uri; + 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 Uri = Unset; type Title = Unset; + type Uri = 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 `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type Uri = S::Uri; - type Title = S::Title; + type Description = S::Description; } ///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 = 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 Title = S::Title; type Uri = S::Uri; - type Title = 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 `uri` field - pub struct uri(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -941,9 +941,9 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Description: view_external_state::IsSet, - S::Uri: view_external_state::IsSet, S::Title: view_external_state::IsSet, + S::Uri: 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/app_bsky/embed/images.rs b/crates/weaver-api/src/app_bsky/embed/images.rs index fdb6bea..b277b40 100644 --- a/crates/weaver-api/src/app_bsky/embed/images.rs +++ b/crates/weaver-api/src/app_bsky/embed/images.rs @@ -37,37 +37,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(()); } } @@ -160,8 +160,8 @@ where 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> { diff --git a/crates/weaver-api/src/app_bsky/embed/record.rs b/crates/weaver-api/src/app_bsky/embed/record.rs index 336b4a2..bfc1f7d 100644 --- a/crates/weaver-api/src/app_bsky/embed/record.rs +++ b/crates/weaver-api/src/app_bsky/embed/record.rs @@ -723,51 +723,51 @@ pub mod view_blocked_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(()); } } @@ -860,9 +860,9 @@ where impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, - S::Author: view_blocked_state::IsSet, S::Uri: view_blocked_state::IsSet, S::Blocked: view_blocked_state::IsSet, + S::Author: view_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewBlocked<'a> { @@ -934,37 +934,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Detached; + 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 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 Uri = Set; - type Detached = S::Detached; + 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 Uri = S::Uri; type Detached = 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 Detached = S::Detached; + 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 `detached` field pub struct detached(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1037,8 +1037,8 @@ where impl<'a, S> ViewDetachedBuilder<'a, S> where S: view_detached_state::State, - S::Uri: view_detached_state::IsSet, S::Detached: view_detached_state::IsSet, + S::Uri: view_detached_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewDetached<'a> { @@ -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> { @@ -1303,85 +1303,85 @@ pub mod view_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Author; type Value; type IndexedAt; - type Author; + 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 Author = Unset; type Value = Unset; type IndexedAt = Unset; - 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 Uri = Set; - type Cid = S::Cid; - type Value = S::Value; - type IndexedAt = S::IndexedAt; - type Author = S::Author; + 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 Author = S::Author; type Value = S::Value; type IndexedAt = S::IndexedAt; - type Author = S::Author; + 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 Value = S::Value; + type IndexedAt = S::IndexedAt; + 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 Uri = S::Uri; type Cid = S::Cid; + type Author = S::Author; type Value = Set; type IndexedAt = S::IndexedAt; - type Author = S::Author; + 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 Uri = S::Uri; type Cid = S::Cid; + type Author = S::Author; type Value = S::Value; type IndexedAt = 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; + } + ///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 Value = S::Value; type IndexedAt = S::IndexedAt; - type Author = Set; + 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 `author` field + pub struct author(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1619,11 +1619,11 @@ where 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::Author: view_record_state::IsSet, S::Value: view_record_state::IsSet, S::IndexedAt: view_record_state::IsSet, - S::Author: view_record_state::IsSet, + S::Uri: 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 e530d9e..c02886f 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> { diff --git a/crates/weaver-api/src/app_bsky/embed/video.rs b/crates/weaver-api/src/app_bsky/embed/video.rs index 03e866e..4a3cf80 100644 --- a/crates/weaver-api/src/app_bsky/embed/video.rs +++ b/crates/weaver-api/src/app_bsky/embed/video.rs @@ -687,37 +687,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Playlist; + 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 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 Cid = Set; - type Playlist = S::Playlist; + 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 Cid = S::Cid; type Playlist = 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 Playlist = S::Playlist; + 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 `playlist` field pub struct playlist(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -844,8 +844,8 @@ impl<'a, S: view_state::State> ViewBuilder<'a, S> { impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, - S::Cid: view_state::IsSet, S::Playlist: view_state::IsSet, + S::Cid: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed.rs b/crates/weaver-api/src/app_bsky/feed.rs index 7ee404e..ac604e2 100644 --- a/crates/weaver-api/src/app_bsky/feed.rs +++ b/crates/weaver-api/src/app_bsky/feed.rs @@ -1609,49 +1609,49 @@ pub mod blocked_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Blocked; type Author; + type Blocked; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Blocked = Unset; type Author = Unset; + type Blocked = Unset; type Uri = Unset; } - ///State transition - sets the `blocked` field to Set - pub struct SetBlocked(PhantomData S>); - impl sealed::Sealed for SetBlocked {} - impl State for SetBlocked { - type Blocked = Set; - type Author = S::Author; - 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 Blocked = S::Blocked; type Author = Set; + type Blocked = S::Blocked; + type Uri = S::Uri; + } + ///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 Blocked = 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 Blocked = S::Blocked; type Author = S::Author; + type Blocked = S::Blocked; type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `blocked` field - pub struct blocked(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `blocked` field + pub struct blocked(()); ///Marker type for the `uri` field pub struct uri(()); } @@ -1746,8 +1746,8 @@ where impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, - S::Blocked: blocked_post_state::IsSet, S::Author: blocked_post_state::IsSet, + S::Blocked: blocked_post_state::IsSet, S::Uri: blocked_post_state::IsSet, { /// Build the final struct @@ -2234,103 +2234,103 @@ pub mod generator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; + type Uri; type Cid; type Did; type IndexedAt; - type Uri; + type Creator; type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; + type Uri = Unset; type Cid = Unset; type Did = Unset; type IndexedAt = Unset; - type Uri = Unset; + type Creator = Unset; type DisplayName = Unset; } - ///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; + ///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 Did = S::Did; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; + type Creator = S::Creator; type DisplayName = S::DisplayName; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Creator = S::Creator; + type Uri = S::Uri; type Cid = Set; type Did = S::Did; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; + type Creator = S::Creator; type DisplayName = S::DisplayName; } ///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 Uri = S::Uri; type Cid = S::Cid; type Did = Set; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; + type Creator = S::Creator; type DisplayName = S::DisplayName; } ///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 Uri = S::Uri; type Cid = S::Cid; type Did = S::Did; type IndexedAt = Set; - type Uri = S::Uri; + type Creator = S::Creator; type DisplayName = S::DisplayName; } - ///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; + ///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 Did = S::Did; type IndexedAt = S::IndexedAt; - type Uri = Set; + type Creator = 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 Creator = S::Creator; + type Uri = S::Uri; type Cid = S::Cid; type Did = S::Did; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; + type Creator = S::Creator; type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `creator` field - pub struct creator(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `uri` field - pub struct uri(()); + ///Marker type for the `creator` field + pub struct creator(()); ///Marker type for the `display_name` field pub struct display_name(()); } @@ -2648,11 +2648,11 @@ impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, - S::Creator: generator_view_state::IsSet, + S::Uri: generator_view_state::IsSet, S::Cid: generator_view_state::IsSet, S::Did: generator_view_state::IsSet, S::IndexedAt: generator_view_state::IsSet, - S::Uri: generator_view_state::IsSet, + S::Creator: generator_view_state::IsSet, S::DisplayName: generator_view_state::IsSet, { /// Build the final struct @@ -3441,85 +3441,85 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; + type Record; type Author; type IndexedAt; + type Cid; type Uri; - 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 Record = Unset; type Author = Unset; type IndexedAt = Unset; + type Cid = Unset; type Uri = 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; + ///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 Author = S::Author; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; type Uri = S::Uri; - 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 Record = S::Record; type Author = Set; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; 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 Cid = S::Cid; + type Record = S::Record; type Author = S::Author; type IndexedAt = 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 Record = S::Record; + type Author = S::Author; + type IndexedAt = S::IndexedAt; + 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 Author = S::Author; - type IndexedAt = S::IndexedAt; - type Uri = 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 Author = S::Author; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Record = Set; + type Cid = S::Cid; + type Uri = 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 `record` field + pub struct record(()); ///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 `uri` field pub struct uri(()); - ///Marker type for the `record` field - pub struct record(()); } } @@ -3832,11 +3832,11 @@ impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, - S::Cid: post_view_state::IsSet, + S::Record: post_view_state::IsSet, S::Author: post_view_state::IsSet, S::IndexedAt: post_view_state::IsSet, + S::Cid: post_view_state::IsSet, S::Uri: post_view_state::IsSet, - S::Record: post_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PostView<'a> { @@ -4218,37 +4218,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(()); } } @@ -4341,8 +4341,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 60b7b3d..d8661a0 100644 --- a/crates/weaver-api/src/app_bsky/feed/generator.rs +++ b/crates/weaver-api/src/app_bsky/feed/generator.rs @@ -56,49 +56,49 @@ pub mod generator_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Did; + type CreatedAt; type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Did = Unset; + type CreatedAt = Unset; type DisplayName = 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 Did = S::Did; - type DisplayName = S::DisplayName; - } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type CreatedAt = S::CreatedAt; type Did = Set; + type CreatedAt = S::CreatedAt; + 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 Did = S::Did; + type CreatedAt = 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 CreatedAt = S::CreatedAt; type Did = S::Did; + type CreatedAt = S::CreatedAt; type DisplayName = 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 `did` field pub struct did(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `display_name` field pub struct display_name(()); } @@ -317,8 +317,8 @@ impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { impl<'a, S> GeneratorBuilder<'a, S> where S: generator_state::State, - S::CreatedAt: generator_state::IsSet, S::Did: generator_state::IsSet, + S::CreatedAt: generator_state::IsSet, S::DisplayName: generator_state::IsSet, { /// Build the final struct 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 e5ae446..c7f7068 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 CreatedAt; type IndexedAt; type Actor; + 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 IndexedAt = Unset; type Actor = 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 IndexedAt = S::IndexedAt; - type Actor = S::Actor; + type CreatedAt = 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 CreatedAt = S::CreatedAt; type IndexedAt = Set; type Actor = S::Actor; + type CreatedAt = S::CreatedAt; } ///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 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 IndexedAt = S::IndexedAt; + type Actor = S::Actor; + 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 `indexed_at` field pub struct indexed_at(()); ///Marker type for the `actor` field pub struct actor(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -170,9 +170,9 @@ where impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, - S::CreatedAt: like_state::IsSet, S::IndexedAt: like_state::IsSet, S::Actor: 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 0d3fa4e..da43f84 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; - type Index = 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; } ///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 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; + type Value = 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 8516296..3d1d3c7 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 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(()); } } @@ -367,8 +367,8 @@ where impl<'a, S> PostgateBuilder<'a, S> where S: postgate_state::State, - S::CreatedAt: postgate_state::IsSet, S::Post: postgate_state::IsSet, + S::CreatedAt: 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 56e8e0d..2325253 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 2bdeef9..1282b43 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 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(()); } } @@ -603,8 +603,8 @@ where impl<'a, S> ThreadgateBuilder<'a, S> where S: threadgate_state::State, - S::Post: threadgate_state::IsSet, S::CreatedAt: threadgate_state::IsSet, + S::Post: 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 2b33593..aba181f 100644 --- a/crates/weaver-api/src/app_bsky/graph.rs +++ b/crates/weaver-api/src/app_bsky/graph.rs @@ -1284,104 +1284,104 @@ pub mod list_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Purpose; - type Cid; - type Uri; - type IndexedAt; type Name; + type Cid; type Creator; + type IndexedAt; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Purpose = Unset; - type Cid = Unset; - type Uri = Unset; - type IndexedAt = Unset; type Name = Unset; + type Cid = Unset; type Creator = Unset; + type IndexedAt = 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 Purpose = Set; + type Name = S::Name; type Cid = S::Cid; - type Uri = S::Uri; + type Creator = S::Creator; type IndexedAt = S::IndexedAt; - type Name = S::Name; + 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 Name = Set; + type Cid = S::Cid; type Creator = S::Creator; + 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 Purpose = S::Purpose; - type Cid = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Name = S::Name; + type Cid = Set; type Creator = S::Creator; + type IndexedAt = S::IndexedAt; + 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 `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Purpose = S::Purpose; + type Name = S::Name; type Cid = S::Cid; - type Uri = Set; + type Creator = Set; type IndexedAt = S::IndexedAt; - type Name = S::Name; - 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 Purpose = S::Purpose; - type Cid = S::Cid; - type Uri = S::Uri; - type IndexedAt = Set; type Name = S::Name; - type Creator = S::Creator; - } - ///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 Cid = S::Cid; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Name = Set; type Creator = S::Creator; + type IndexedAt = 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 { + ///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 = S::Uri; + type Creator = S::Creator; type IndexedAt = S::IndexedAt; - type Name = S::Name; - type Creator = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `purpose` field pub struct purpose(()); - ///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 `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 `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1662,11 +1662,11 @@ impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, S::Purpose: list_view_state::IsSet, - S::Cid: list_view_state::IsSet, - S::Uri: list_view_state::IsSet, - S::IndexedAt: list_view_state::IsSet, S::Name: list_view_state::IsSet, + S::Cid: list_view_state::IsSet, S::Creator: list_view_state::IsSet, + S::IndexedAt: list_view_state::IsSet, + S::Uri: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { @@ -1841,67 +1841,67 @@ pub mod list_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; + type Name; type Purpose; type Uri; - type Name; + 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 Name = Unset; type Purpose = Unset; type Uri = Unset; - type Name = 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 `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 Uri = S::Uri; - type Name = S::Name; + type Cid = S::Cid; } ///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 Name = S::Name; type Purpose = Set; type Uri = S::Uri; - type Name = S::Name; + 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 Name = S::Name; type Purpose = S::Purpose; type Uri = 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 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 Name = S::Name; type Purpose = S::Purpose; type Uri = S::Uri; - type Name = 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 `name` field + pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); ///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(()); } } @@ -2118,10 +2118,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::Cid: list_view_basic_state::IsSet, + S::Name: list_view_basic_state::IsSet, S::Purpose: list_view_basic_state::IsSet, S::Uri: list_view_basic_state::IsSet, - S::Name: list_view_basic_state::IsSet, + S::Cid: list_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ListViewBasic<'a> { @@ -2705,85 +2705,85 @@ pub mod starter_pack_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Record; - type Cid; type Creator; type Uri; + type Record; + type IndexedAt; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; - type Record = Unset; - type Cid = Unset; type Creator = Unset; type Uri = Unset; + type Record = Unset; + type IndexedAt = Unset; + type Cid = 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; + ///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 Uri = S::Uri; type Record = S::Record; + type IndexedAt = S::IndexedAt; 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 Creator = S::Creator; - type Uri = S::Uri; + type Uri = Set; + type Record = S::Record; + type IndexedAt = S::IndexedAt; + 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 Creator = S::Creator; + type Uri = S::Uri; type Record = Set; + type IndexedAt = S::IndexedAt; 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 Creator = S::Creator; type Uri = S::Uri; + type Record = S::Record; + type IndexedAt = 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 Record = S::Record; - type Cid = 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 Record = S::Record; - 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 IndexedAt = S::IndexedAt; - type Record = S::Record; - type Cid = S::Cid; - type Creator = S::Creator; - type Uri = Set; + type Cid = 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 `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 `uri` field pub struct uri(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -3036,11 +3036,11 @@ where impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, - S::IndexedAt: starter_pack_view_state::IsSet, - S::Record: starter_pack_view_state::IsSet, - S::Cid: starter_pack_view_state::IsSet, S::Creator: starter_pack_view_state::IsSet, S::Uri: starter_pack_view_state::IsSet, + S::Record: starter_pack_view_state::IsSet, + S::IndexedAt: starter_pack_view_state::IsSet, + S::Cid: starter_pack_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackView<'a> { @@ -3189,9 +3189,9 @@ pub mod starter_pack_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Creator; type Cid; + type Creator; + type IndexedAt; type Uri; type Record; } @@ -3199,19 +3199,19 @@ pub mod starter_pack_view_basic_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; - type Creator = Unset; type Cid = Unset; + type Creator = Unset; + type IndexedAt = Unset; type Uri = Unset; type Record = 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; + ///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 Creator = S::Creator; - type Cid = S::Cid; + type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Record = S::Record; } @@ -3219,19 +3219,19 @@ pub mod starter_pack_view_basic_state { pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type IndexedAt = S::IndexedAt; - type Creator = Set; type Cid = S::Cid; + type Creator = Set; + type IndexedAt = S::IndexedAt; type Uri = S::Uri; 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; + ///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 Creator = S::Creator; - type Cid = Set; + type IndexedAt = Set; type Uri = S::Uri; type Record = S::Record; } @@ -3239,9 +3239,9 @@ pub mod starter_pack_view_basic_state { pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; type Cid = S::Cid; + type Creator = S::Creator; + type IndexedAt = S::IndexedAt; type Uri = Set; type Record = S::Record; } @@ -3249,21 +3249,21 @@ pub mod starter_pack_view_basic_state { pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; type Cid = S::Cid; + type Creator = S::Creator; + type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Record = 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 `creator` field - pub struct creator(()); ///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 `uri` field pub struct uri(()); ///Marker type for the `record` field @@ -3478,9 +3478,9 @@ where impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, - S::IndexedAt: starter_pack_view_basic_state::IsSet, - S::Creator: starter_pack_view_basic_state::IsSet, S::Cid: starter_pack_view_basic_state::IsSet, + S::Creator: starter_pack_view_basic_state::IsSet, + S::IndexedAt: starter_pack_view_basic_state::IsSet, S::Uri: starter_pack_view_basic_state::IsSet, S::Record: starter_pack_view_basic_state::IsSet, { diff --git a/crates/weaver-api/src/app_bsky/graph/list.rs b/crates/weaver-api/src/app_bsky/graph/list.rs index 1c7816d..33d85fa 100644 --- a/crates/weaver-api/src/app_bsky/graph/list.rs +++ b/crates/weaver-api/src/app_bsky/graph/list.rs @@ -52,50 +52,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(()); } } @@ -269,8 +269,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/app_bsky/graph/listblock.rs b/crates/weaver-api/src/app_bsky/graph/listblock.rs index 1faa447..84dfe12 100644 --- a/crates/weaver-api/src/app_bsky/graph/listblock.rs +++ b/crates/weaver-api/src/app_bsky/graph/listblock.rs @@ -34,37 +34,37 @@ pub mod listblock_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(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> ListblockBuilder<'a, S> where S: listblock_state::State, - S::CreatedAt: listblock_state::IsSet, S::Subject: listblock_state::IsSet, + S::CreatedAt: listblock_state::IsSet, { /// Build the final struct pub fn build(self) -> Listblock<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/starterpack.rs b/crates/weaver-api/src/app_bsky/graph/starterpack.rs index 508139f..c05964c 100644 --- a/crates/weaver-api/src/app_bsky/graph/starterpack.rs +++ b/crates/weaver-api/src/app_bsky/graph/starterpack.rs @@ -366,51 +366,51 @@ pub mod starterpack_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; type List; + 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 List = 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 List = S::List; + type CreatedAt = Unset; } ///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 List = S::List; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData S>); impl sealed::Sealed for SetList {} impl State for SetList { - type CreatedAt = S::CreatedAt; type Name = S::Name; type List = 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 List = S::List; + 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 `list` field pub struct list(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -563,9 +563,9 @@ where impl<'a, S> StarterpackBuilder<'a, S> where S: starterpack_state::State, - S::CreatedAt: starterpack_state::IsSet, S::Name: starterpack_state::IsSet, S::List: starterpack_state::IsSet, + S::CreatedAt: starterpack_state::IsSet, { /// Build the final struct pub fn build(self) -> Starterpack<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/verification.rs b/crates/weaver-api/src/app_bsky/graph/verification.rs index 7a31b6b..4987865 100644 --- a/crates/weaver-api/src/app_bsky/graph/verification.rs +++ b/crates/weaver-api/src/app_bsky/graph/verification.rs @@ -41,65 +41,65 @@ pub mod verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; - type DisplayName; type Handle; + type DisplayName; + type Subject; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; - type DisplayName = Unset; type Handle = Unset; + type DisplayName = Unset; + 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; + ///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 DisplayName = S::DisplayName; - type Handle = S::Handle; + type Subject = S::Subject; 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 DisplayName = Set; type Handle = S::Handle; + type DisplayName = Set; + type Subject = S::Subject; 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 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 Handle = S::Handle; type DisplayName = S::DisplayName; - type Handle = Set; + 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 DisplayName = S::DisplayName; type Handle = S::Handle; + type DisplayName = S::DisplayName; + type Subject = S::Subject; type CreatedAt = 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 `display_name` field - pub struct display_name(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -214,9 +214,9 @@ where impl<'a, S> VerificationBuilder<'a, S> where S: verification_state::State, - S::Subject: verification_state::IsSet, - S::DisplayName: verification_state::IsSet, S::Handle: verification_state::IsSet, + S::DisplayName: verification_state::IsSet, + S::Subject: verification_state::IsSet, S::CreatedAt: verification_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/labeler.rs b/crates/weaver-api/src/app_bsky/labeler.rs index 3625e70..f332dd2 100644 --- a/crates/weaver-api/src/app_bsky/labeler.rs +++ b/crates/weaver-api/src/app_bsky/labeler.rs @@ -632,67 +632,67 @@ pub mod labeler_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Cid; - type Uri; type Creator; + type Uri; + type Cid; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; - type Cid = Unset; - type Uri = Unset; type Creator = Unset; + type Uri = Unset; + type Cid = Unset; + type IndexedAt = 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 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 { + type Creator = Set; type Uri = S::Uri; - 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 Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Cid = Set; - type Uri = S::Uri; - 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 IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Uri = Set; type Creator = S::Creator; + type Uri = Set; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; } - ///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 Creator = S::Creator; + type Uri = S::Uri; + type Cid = Set; type IndexedAt = S::IndexedAt; - 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 Creator = S::Creator; type Uri = S::Uri; - type Creator = Set; + type Cid = S::Cid; + type IndexedAt = 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 `cid` field - pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `creator` field pub struct creator(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -859,10 +859,10 @@ impl<'a, S: labeler_view_state::State> LabelerViewBuilder<'a, S> { impl<'a, S> LabelerViewBuilder<'a, S> where S: labeler_view_state::State, - S::IndexedAt: labeler_view_state::IsSet, - S::Cid: labeler_view_state::IsSet, - S::Uri: labeler_view_state::IsSet, S::Creator: labeler_view_state::IsSet, + S::Uri: labeler_view_state::IsSet, + S::Cid: labeler_view_state::IsSet, + S::IndexedAt: labeler_view_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerView<'a> { @@ -985,85 +985,85 @@ pub mod labeler_view_detailed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Policies; - type Cid; type IndexedAt; type Creator; - type Uri; + 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 Policies = Unset; - type Cid = Unset; type IndexedAt = Unset; type Creator = Unset; - 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 Policies = S::Policies; + type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Cid = S::Cid; } ///State transition - sets the `policies` field to Set pub struct SetPolicies(PhantomData S>); impl sealed::Sealed for SetPolicies {} impl State for SetPolicies { - type Policies = Set; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - 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 Policies = S::Policies; - type Cid = Set; + type Policies = Set; type IndexedAt = S::IndexedAt; type Creator = S::Creator; - 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 Uri = S::Uri; type Policies = S::Policies; - type Cid = S::Cid; type IndexedAt = Set; type Creator = S::Creator; - type Uri = S::Uri; + 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 { + type Uri = S::Uri; type Policies = S::Policies; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Creator = Set; - type Uri = S::Uri; + 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 { + ///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 Policies = S::Policies; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Creator = S::Creator; - type Uri = Set; + 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 `policies` field pub struct policies(()); - ///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 `uri` field - pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -1322,11 +1322,11 @@ impl<'a, S: labeler_view_detailed_state::State> LabelerViewDetailedBuilder<'a, S impl<'a, S> LabelerViewDetailedBuilder<'a, S> where S: labeler_view_detailed_state::State, + S::Uri: labeler_view_detailed_state::IsSet, S::Policies: 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::Uri: 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/notification.rs b/crates/weaver-api/src/app_bsky/notification.rs index d3d0656..63f6c3f 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 Include; type Push; + type Include; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Include = Unset; 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 Include = Set; - type Push = S::Push; + 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 Include = S::Include; type Push = Set; + type Include = S::Include; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `include` field - pub struct include(()); ///Marker type for the `push` field pub struct push(()); + ///Marker type for the `include` field + pub struct include(()); } } @@ -704,8 +704,8 @@ where impl<'a, S> ChatPreferenceBuilder<'a, S> where S: chat_preference_state::State, - S::Include: chat_preference_state::IsSet, S::Push: chat_preference_state::IsSet, + S::Include: chat_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> ChatPreference<'a> { @@ -867,50 +867,50 @@ pub mod filterable_preference_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Push; - type List; type Include; + type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Push = Unset; - type List = Unset; type Include = Unset; + 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 Push = Set; - type List = S::List; - type Include = S::Include; - } - ///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 List = 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 Push = S::Push; - type List = S::List; 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 `push` field pub struct push(()); - ///Marker type for the `list` field - pub struct list(()); ///Marker type for the `include` field pub struct include(()); + ///Marker type for the `list` field + pub struct list(()); } } @@ -1004,8 +1004,8 @@ impl<'a, S> FilterablePreferenceBuilder<'a, S> where S: filterable_preference_state::State, S::Push: filterable_preference_state::IsSet, - S::List: 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> { @@ -1360,301 +1360,301 @@ pub mod preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Mention; - type LikeViaRepost; - type Reply; - type Quote; - type Repost; - type Follow; + type SubscribedPost; type RepostViaRepost; type Unverified; + type Verified; + type Like; + type Repost; + type Quote; + type Mention; type StarterpackJoined; + type Follow; + type Reply; type Chat; - type Like; - type SubscribedPost; - type Verified; + type LikeViaRepost; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Mention = Unset; - type LikeViaRepost = Unset; - type Reply = Unset; - type Quote = Unset; - type Repost = Unset; - type Follow = Unset; + type SubscribedPost = Unset; type RepostViaRepost = Unset; type Unverified = Unset; + type Verified = Unset; + type Like = Unset; + type Repost = Unset; + type Quote = Unset; + type Mention = Unset; type StarterpackJoined = Unset; + type Follow = Unset; + type Reply = Unset; type Chat = Unset; - type Like = Unset; - type SubscribedPost = Unset; - type Verified = Unset; + type LikeViaRepost = Unset; } - ///State transition - sets the `mention` field to Set - pub struct SetMention(PhantomData S>); - impl sealed::Sealed for SetMention {} - impl State for SetMention { - type Mention = Set; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; - type Repost = S::Repost; - type Follow = S::Follow; + ///State transition - sets the `subscribed_post` field to Set + pub struct SetSubscribedPost(PhantomData S>); + impl sealed::Sealed for SetSubscribedPost {} + impl State for SetSubscribedPost { + type SubscribedPost = Set; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; + type Verified = S::Verified; + type Like = S::Like; + type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + } + ///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 SubscribedPost = S::SubscribedPost; + type RepostViaRepost = Set; + type Unverified = S::Unverified; type Verified = S::Verified; - } - ///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 Mention = S::Mention; - type LikeViaRepost = Set; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; - type Follow = S::Follow; - type RepostViaRepost = S::RepostViaRepost; - type Unverified = S::Unverified; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `unverified` field to Set + pub struct SetUnverified(PhantomData S>); + impl sealed::Sealed for SetUnverified {} + impl State for SetUnverified { type SubscribedPost = S::SubscribedPost; + type RepostViaRepost = S::RepostViaRepost; + type Unverified = Set; type Verified = S::Verified; - } - ///State transition - sets the `reply` field to Set - pub struct SetReply(PhantomData S>); - impl sealed::Sealed for SetReply {} - impl State for SetReply { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = Set; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; + type StarterpackJoined = S::StarterpackJoined; type Follow = S::Follow; + type Reply = S::Reply; + type Chat = S::Chat; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `verified` field to Set + pub struct SetVerified(PhantomData S>); + impl sealed::Sealed for SetVerified {} + impl State for SetVerified { + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; - type StarterpackJoined = S::StarterpackJoined; - type Chat = S::Chat; + type Verified = Set; type Like = S::Like; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; - } - ///State transition - sets the `quote` field to Set - pub struct SetQuote(PhantomData S>); - impl sealed::Sealed for SetQuote {} - impl State for SetQuote { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = Set; type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; + type StarterpackJoined = S::StarterpackJoined; type Follow = S::Follow; + type Reply = S::Reply; + type Chat = S::Chat; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `like` field to Set + pub struct SetLike(PhantomData S>); + impl sealed::Sealed for SetLike {} + impl State for SetLike { + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; + type Verified = S::Verified; + type Like = Set; + type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + type LikeViaRepost = S::LikeViaRepost; } ///State transition - sets the `repost` field to Set pub struct SetRepost(PhantomData S>); impl sealed::Sealed for SetRepost {} impl State for SetRepost { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; - type Repost = Set; - type Follow = S::Follow; + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; + type Verified = S::Verified; + type Like = S::Like; + type Repost = Set; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `quote` field to Set + pub struct SetQuote(PhantomData S>); + impl sealed::Sealed for SetQuote {} + impl State for SetQuote { type SubscribedPost = S::SubscribedPost; + type RepostViaRepost = S::RepostViaRepost; + type Unverified = S::Unverified; type Verified = S::Verified; - } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData S>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; - type Repost = S::Repost; - type Follow = Set; - type RepostViaRepost = S::RepostViaRepost; - type Unverified = S::Unverified; - type StarterpackJoined = S::StarterpackJoined; - type Chat = S::Chat; type Like = S::Like; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; - } - ///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 Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; type Repost = S::Repost; - type Follow = S::Follow; - type RepostViaRepost = Set; - type Unverified = S::Unverified; + type Quote = Set; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `mention` field to Set + pub struct SetMention(PhantomData S>); + impl sealed::Sealed for SetMention {} + impl State for SetMention { type SubscribedPost = S::SubscribedPost; + type RepostViaRepost = S::RepostViaRepost; + type Unverified = S::Unverified; type Verified = S::Verified; - } - ///State transition - sets the `unverified` field to Set - pub struct SetUnverified(PhantomData S>); - impl sealed::Sealed for SetUnverified {} - impl State for SetUnverified { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; - type Follow = S::Follow; - type RepostViaRepost = S::RepostViaRepost; - type Unverified = Set; + type Quote = S::Quote; + type Mention = Set; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + type LikeViaRepost = S::LikeViaRepost; } ///State transition - sets the `starterpack_joined` field to Set pub struct SetStarterpackJoined(PhantomData S>); impl sealed::Sealed for SetStarterpackJoined {} impl State for SetStarterpackJoined { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; - type Repost = S::Repost; - type Follow = S::Follow; + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; - type StarterpackJoined = Set; - type Chat = S::Chat; - type Like = S::Like; - type SubscribedPost = S::SubscribedPost; type Verified = S::Verified; - } - ///State transition - sets the `chat` field to Set - pub struct SetChat(PhantomData S>); - impl sealed::Sealed for SetChat {} - impl State for SetChat { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; + type StarterpackJoined = Set; type Follow = S::Follow; + type Reply = S::Reply; + type Chat = S::Chat; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `follow` field to Set + pub struct SetFollow(PhantomData S>); + impl sealed::Sealed for SetFollow {} + impl State for SetFollow { + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; - type StarterpackJoined = S::StarterpackJoined; - type Chat = Set; - type Like = S::Like; - type SubscribedPost = S::SubscribedPost; type Verified = S::Verified; - } - ///State transition - sets the `like` field to Set - pub struct SetLike(PhantomData S>); - impl sealed::Sealed for SetLike {} - impl State for SetLike { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; - type Follow = S::Follow; - type RepostViaRepost = S::RepostViaRepost; - type Unverified = S::Unverified; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = Set; + type Reply = S::Reply; type Chat = S::Chat; - type Like = Set; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `reply` field to Set + pub struct SetReply(PhantomData S>); + impl sealed::Sealed for SetReply {} + impl State for SetReply { type SubscribedPost = S::SubscribedPost; + type RepostViaRepost = S::RepostViaRepost; + type Unverified = S::Unverified; type Verified = S::Verified; - } - ///State transition - sets the `subscribed_post` field to Set - pub struct SetSubscribedPost(PhantomData S>); - impl sealed::Sealed for SetSubscribedPost {} - impl State for SetSubscribedPost { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; + type StarterpackJoined = S::StarterpackJoined; type Follow = S::Follow; + type Reply = Set; + type Chat = S::Chat; + type LikeViaRepost = S::LikeViaRepost; + } + ///State transition - sets the `chat` field to Set + pub struct SetChat(PhantomData S>); + impl sealed::Sealed for SetChat {} + impl State for SetChat { + type SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; - type StarterpackJoined = S::StarterpackJoined; - type Chat = S::Chat; - type Like = S::Like; - type SubscribedPost = Set; type Verified = S::Verified; - } - ///State transition - sets the `verified` field to Set - pub struct SetVerified(PhantomData S>); - impl sealed::Sealed for SetVerified {} - impl State for SetVerified { - type Mention = S::Mention; - type LikeViaRepost = S::LikeViaRepost; - type Reply = S::Reply; - type Quote = S::Quote; + type Like = S::Like; type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; + type StarterpackJoined = S::StarterpackJoined; type Follow = S::Follow; + type Reply = S::Reply; + type Chat = Set; + type LikeViaRepost = S::LikeViaRepost; + } + ///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 SubscribedPost = S::SubscribedPost; type RepostViaRepost = S::RepostViaRepost; type Unverified = S::Unverified; + type Verified = S::Verified; + type Like = S::Like; + type Repost = S::Repost; + type Quote = S::Quote; + type Mention = S::Mention; type StarterpackJoined = S::StarterpackJoined; + type Follow = S::Follow; + type Reply = S::Reply; type Chat = S::Chat; - type Like = S::Like; - type SubscribedPost = S::SubscribedPost; - type Verified = Set; + type LikeViaRepost = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `mention` field - pub struct mention(()); - ///Marker type for the `like_via_repost` field - pub struct like_via_repost(()); - ///Marker type for the `reply` field - pub struct reply(()); - ///Marker type for the `quote` field - pub struct quote(()); - ///Marker type for the `repost` field - pub struct repost(()); - ///Marker type for the `follow` field - pub struct follow(()); + ///Marker type for the `subscribed_post` field + pub struct subscribed_post(()); ///Marker type for the `repost_via_repost` field pub struct repost_via_repost(()); ///Marker type for the `unverified` field pub struct unverified(()); + ///Marker type for the `verified` field + pub struct verified(()); + ///Marker type for the `like` field + pub struct like(()); + ///Marker type for the `repost` field + pub struct repost(()); + ///Marker type for the `quote` field + pub struct quote(()); + ///Marker type for the `mention` field + pub struct mention(()); ///Marker type for the `starterpack_joined` field pub struct starterpack_joined(()); + ///Marker type for the `follow` field + pub struct follow(()); + ///Marker type for the `reply` field + pub struct reply(()); ///Marker type for the `chat` field pub struct chat(()); - ///Marker type for the `like` field - pub struct like(()); - ///Marker type for the `subscribed_post` field - pub struct subscribed_post(()); - ///Marker type for the `verified` field - pub struct verified(()); + ///Marker type for the `like_via_repost` field + pub struct like_via_repost(()); } } @@ -1961,19 +1961,19 @@ where impl<'a, S> PreferencesBuilder<'a, S> where S: preferences_state::State, - S::Mention: preferences_state::IsSet, - S::LikeViaRepost: preferences_state::IsSet, - S::Reply: preferences_state::IsSet, - S::Quote: preferences_state::IsSet, - S::Repost: preferences_state::IsSet, - S::Follow: preferences_state::IsSet, + S::SubscribedPost: preferences_state::IsSet, S::RepostViaRepost: preferences_state::IsSet, S::Unverified: preferences_state::IsSet, + S::Verified: preferences_state::IsSet, + S::Like: preferences_state::IsSet, + S::Repost: preferences_state::IsSet, + S::Quote: preferences_state::IsSet, + S::Mention: preferences_state::IsSet, S::StarterpackJoined: preferences_state::IsSet, + S::Follow: preferences_state::IsSet, + S::Reply: preferences_state::IsSet, S::Chat: preferences_state::IsSet, - S::Like: preferences_state::IsSet, - S::SubscribedPost: preferences_state::IsSet, - S::Verified: preferences_state::IsSet, + S::LikeViaRepost: preferences_state::IsSet, { /// Build the final struct pub fn build(self) -> Preferences<'a> { @@ -2097,37 +2097,37 @@ pub mod subject_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(()); } } @@ -2214,8 +2214,8 @@ where impl<'a, S> SubjectActivitySubscriptionBuilder<'a, S> where S: subject_activity_subscription_state::State, - S::ActivitySubscription: subject_activity_subscription_state::IsSet, S::Subject: subject_activity_subscription_state::IsSet, + S::ActivitySubscription: 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 071a963..f2dd158 100644 --- a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs @@ -271,125 +271,125 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; - type Record; type Author; - type Reason; + type Record; type IsRead; + type Reason; + type Uri; 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 Record = Unset; type Author = Unset; - type Reason = Unset; + type Record = Unset; type IsRead = Unset; + type Reason = Unset; + type Uri = 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 Record = S::Record; - type Author = S::Author; - type Reason = S::Reason; - type IsRead = S::IsRead; - 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 Record = S::Record; type Author = S::Author; + type Record = S::Record; + type IsRead = S::IsRead; type Reason = S::Reason; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; + } + ///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 Reason = S::Reason; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Uri = S::Uri; type Cid = S::Cid; - type Record = Set; type Author = S::Author; - type Reason = S::Reason; + type Record = Set; type IsRead = S::IsRead; + type Reason = S::Reason; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; } - ///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; + ///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 Author = Set; + type IsRead = Set; type Reason = S::Reason; - type IsRead = S::IsRead; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Uri = S::Uri; type Cid = S::Cid; - type Record = S::Record; type Author = S::Author; - type Reason = Set; + type Record = S::Record; type IsRead = S::IsRead; + type Reason = Set; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; } - ///State transition - sets the `is_read` field to Set - pub struct SetIsRead(PhantomData S>); - impl sealed::Sealed for SetIsRead {} - impl State for SetIsRead { - 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 Record = S::Record; type Author = S::Author; + type Record = S::Record; + type IsRead = S::IsRead; type Reason = S::Reason; - type IsRead = Set; + type Uri = 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 Uri = S::Uri; type Cid = S::Cid; - type Record = S::Record; type Author = S::Author; - type Reason = S::Reason; + type Record = S::Record; type IsRead = S::IsRead; + type Reason = S::Reason; + type Uri = S::Uri; type IndexedAt = 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 `record` field - pub struct record(()); ///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(()); ///Marker type for the `is_read` field pub struct is_read(()); + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } @@ -614,12 +614,12 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, - S::Uri: notification_state::IsSet, S::Cid: notification_state::IsSet, - S::Record: notification_state::IsSet, S::Author: notification_state::IsSet, - S::Reason: notification_state::IsSet, + S::Record: notification_state::IsSet, S::IsRead: notification_state::IsSet, + S::Reason: notification_state::IsSet, + S::Uri: notification_state::IsSet, S::IndexedAt: notification_state::IsSet, { /// Build the final struct 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 7e167a9..b0c858e 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 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(()); } } @@ -148,8 +148,8 @@ where impl<'a, S> PutActivitySubscriptionBuilder<'a, S> where S: put_activity_subscription_state::State, - S::Subject: put_activity_subscription_state::IsSet, S::ActivitySubscription: put_activity_subscription_state::IsSet, + S::Subject: 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 08c082f..476058c 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 Token; - type ServiceDid; type Platform; 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 Token = Unset; - type ServiceDid = Unset; type Platform = Unset; type AppId = 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 ServiceDid = S::ServiceDid; - type Platform = S::Platform; - type AppId = S::AppId; - } - ///State transition - sets the `service_did` field to Set - pub struct SetServiceDid(PhantomData S>); - impl sealed::Sealed for SetServiceDid {} - impl State for SetServiceDid { - type Token = S::Token; - type ServiceDid = Set; - type Platform = S::Platform; - 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 Token = S::Token; - type ServiceDid = S::ServiceDid; type Platform = Set; type AppId = S::AppId; + type ServiceDid = S::ServiceDid; + 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 Token = S::Token; - type ServiceDid = S::ServiceDid; 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; + } + ///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 `token` field - pub struct token(()); - ///Marker type for the `service_did` field - pub struct service_did(()); ///Marker type for the `platform` field pub struct platform(()); ///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::Token: register_push_state::IsSet, - S::ServiceDid: register_push_state::IsSet, S::Platform: 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 52867ed..d7ccc38 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 ServiceDid; - type Platform; type AppId; + type ServiceDid; type Token; + type Platform; } /// 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 AppId = Unset; + type ServiceDid = Unset; type Token = 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 AppId = S::AppId; - type Token = S::Token; - } - ///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 AppId = S::AppId; - type Token = S::Token; + type Platform = 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 ServiceDid = S::ServiceDid; + type Token = S::Token; type Platform = S::Platform; - type AppId = Set; + } + ///State transition - sets the `service_did` field to Set + pub struct SetServiceDid(PhantomData S>); + impl sealed::Sealed for SetServiceDid {} + impl State for SetServiceDid { + type AppId = S::AppId; + type ServiceDid = Set; type Token = S::Token; + type Platform = S::Platform; } ///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 ServiceDid = S::ServiceDid; + type Token = Set; type Platform = S::Platform; + } + ///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 Token = Set; + type ServiceDid = S::ServiceDid; + type Token = S::Token; + type Platform = 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 `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(()); + ///Marker type for the `platform` field + pub struct platform(()); } } @@ -210,10 +210,10 @@ where impl<'a, S> UnregisterPushBuilder<'a, S> where S: unregister_push_state::State, - S::ServiceDid: unregister_push_state::IsSet, - S::Platform: unregister_push_state::IsSet, S::AppId: unregister_push_state::IsSet, + S::ServiceDid: unregister_push_state::IsSet, S::Token: unregister_push_state::IsSet, + S::Platform: 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 97f3cdb..a23e047 100644 --- a/crates/weaver-api/src/app_bsky/richtext/facet.rs +++ b/crates/weaver-api/src/app_bsky/richtext/facet.rs @@ -581,37 +581,37 @@ pub mod facet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Features; type Index; + type Features; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Features = Unset; 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 Features = Set; - type Index = S::Index; + 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 Features = S::Features; type Index = Set; + type Features = S::Features; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `features` field - pub struct features(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `features` field + pub struct features(()); } } @@ -684,8 +684,8 @@ where impl<'a, S> FacetBuilder<'a, S> where S: facet_state::State, - S::Features: facet_state::IsSet, S::Index: facet_state::IsSet, + S::Features: 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 56cf118..b027f98 100644 --- a/crates/weaver-api/src/app_bsky/unspecced.rs +++ b/crates/weaver-api/src/app_bsky/unspecced.rs @@ -81,51 +81,51 @@ 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 AttemptId; } /// 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; - } - ///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; + type AttemptId = Unset; } ///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 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 AttemptId = S::AttemptId; type Status = S::Status; type CreatedAt = Set; + type AttemptId = S::AttemptId; + } + ///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 CreatedAt = S::CreatedAt; + type AttemptId = 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 `attempt_id` field + pub struct attempt_id(()); } } @@ -309,9 +309,9 @@ where 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::AttemptId: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -1940,105 +1940,105 @@ pub mod skeleton_trend_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DisplayName; + type Dids; type Link; type Topic; - type Dids; - type PostCount; type StartedAt; + type PostCount; + 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 Dids = Unset; type Link = Unset; type Topic = Unset; - type Dids = Unset; - type PostCount = Unset; type StartedAt = Unset; + type PostCount = 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; + ///State transition - sets the `dids` field to Set + pub struct SetDids(PhantomData S>); + impl sealed::Sealed for SetDids {} + impl State for SetDids { + type Dids = Set; type Link = S::Link; type Topic = S::Topic; - type Dids = S::Dids; - type PostCount = S::PostCount; type StartedAt = S::StartedAt; + type PostCount = S::PostCount; + type DisplayName = S::DisplayName; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData S>); impl sealed::Sealed for SetLink {} impl State for SetLink { - type DisplayName = S::DisplayName; + type Dids = S::Dids; type Link = Set; type Topic = S::Topic; - type Dids = S::Dids; - type PostCount = S::PostCount; type StartedAt = S::StartedAt; + type PostCount = S::PostCount; + 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 DisplayName = S::DisplayName; + type Dids = S::Dids; type Link = S::Link; type Topic = Set; - type Dids = S::Dids; - type PostCount = S::PostCount; 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 DisplayName = S::DisplayName; + } + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData S>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type Dids = S::Dids; type Link = S::Link; type Topic = S::Topic; - type Dids = Set; + type StartedAt = Set; type PostCount = S::PostCount; - type StartedAt = S::StartedAt; + type DisplayName = S::DisplayName; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); impl sealed::Sealed for SetPostCount {} impl State for SetPostCount { - type DisplayName = S::DisplayName; + type Dids = S::Dids; type Link = S::Link; type Topic = S::Topic; - type Dids = S::Dids; - type PostCount = Set; type StartedAt = S::StartedAt; - } - ///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 = 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 Dids = S::Dids; type Link = S::Link; type Topic = S::Topic; - type Dids = S::Dids; + type StartedAt = S::StartedAt; type PostCount = S::PostCount; - type StartedAt = Set; + 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 `dids` field + pub struct dids(()); ///Marker type for the `link` field pub struct link(()); ///Marker type for the `topic` field pub struct topic(()); - ///Marker type for the `dids` field - pub struct dids(()); - ///Marker type for the `post_count` field - pub struct post_count(()); ///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 `display_name` field + pub struct display_name(()); } } @@ -2222,12 +2222,12 @@ where impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, - S::DisplayName: skeleton_trend_state::IsSet, + S::Dids: skeleton_trend_state::IsSet, S::Link: skeleton_trend_state::IsSet, S::Topic: skeleton_trend_state::IsSet, - S::Dids: skeleton_trend_state::IsSet, - S::PostCount: skeleton_trend_state::IsSet, S::StartedAt: skeleton_trend_state::IsSet, + S::PostCount: skeleton_trend_state::IsSet, + S::DisplayName: skeleton_trend_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonTrend<'a> { @@ -2599,105 +2599,105 @@ pub mod thread_item_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; + type MutedByViewer; type MoreParents; type MoreReplies; type OpThread; + type Post; type HiddenByThreadgate; - type MutedByViewer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; + type MutedByViewer = Unset; type MoreParents = Unset; type MoreReplies = Unset; type OpThread = Unset; + type Post = Unset; type HiddenByThreadgate = Unset; - type MutedByViewer = 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; + ///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 MoreParents = S::MoreParents; type MoreReplies = S::MoreReplies; type OpThread = S::OpThread; + type Post = S::Post; 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 Post = S::Post; + type MutedByViewer = S::MutedByViewer; type MoreParents = Set; type MoreReplies = S::MoreReplies; type OpThread = S::OpThread; + type Post = S::Post; 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 Post = S::Post; + type MutedByViewer = S::MutedByViewer; type MoreParents = S::MoreParents; type MoreReplies = Set; type OpThread = S::OpThread; + type Post = S::Post; type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = S::MutedByViewer; } ///State transition - sets the `op_thread` field to Set pub struct SetOpThread(PhantomData S>); impl sealed::Sealed for SetOpThread {} impl State for SetOpThread { - type Post = S::Post; + type MutedByViewer = S::MutedByViewer; type MoreParents = S::MoreParents; type MoreReplies = S::MoreReplies; type OpThread = Set; + type Post = S::Post; type HiddenByThreadgate = S::HiddenByThreadgate; + } + ///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 MoreParents = S::MoreParents; + type MoreReplies = S::MoreReplies; + type OpThread = S::OpThread; + type Post = 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 Post = S::Post; - type MoreParents = S::MoreParents; - type MoreReplies = S::MoreReplies; - type OpThread = S::OpThread; - 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 Post = S::Post; type MoreParents = S::MoreParents; type MoreReplies = S::MoreReplies; type OpThread = S::OpThread; - type HiddenByThreadgate = S::HiddenByThreadgate; - type MutedByViewer = Set; + type Post = S::Post; + type HiddenByThreadgate = 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 `muted_by_viewer` field + pub struct muted_by_viewer(()); ///Marker type for the `more_parents` field pub struct more_parents(()); ///Marker type for the `more_replies` field pub struct more_replies(()); ///Marker type for the `op_thread` field pub struct op_thread(()); + ///Marker type for the `post` field + pub struct post(()); ///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(()); } } @@ -2850,12 +2850,12 @@ where impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, - S::Post: thread_item_post_state::IsSet, + S::MutedByViewer: thread_item_post_state::IsSet, S::MoreParents: thread_item_post_state::IsSet, S::MoreReplies: thread_item_post_state::IsSet, S::OpThread: thread_item_post_state::IsSet, + S::Post: 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> { @@ -2947,104 +2947,104 @@ pub mod trend_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Topic; - type DisplayName; - type Link; - type PostCount; type Actors; type StartedAt; + type PostCount; + type Link; + type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Topic = Unset; - type DisplayName = Unset; - type Link = Unset; - type PostCount = Unset; type Actors = Unset; type StartedAt = Unset; + type PostCount = Unset; + type Link = Unset; + type DisplayName = Unset; } ///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 DisplayName = S::DisplayName; - type Link = S::Link; - type PostCount = S::PostCount; type Actors = S::Actors; 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 Topic = S::Topic; - type DisplayName = Set; - type Link = S::Link; type PostCount = S::PostCount; - type Actors = S::Actors; - 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 { - type Topic = S::Topic; - type DisplayName = S::DisplayName; - type Link = Set; - type PostCount = S::PostCount; - type Actors = S::Actors; - 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 { - type Topic = S::Topic; - type DisplayName = S::DisplayName; type Link = S::Link; - type PostCount = Set; - type Actors = S::Actors; - type StartedAt = S::StartedAt; + 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 Topic = S::Topic; - type DisplayName = S::DisplayName; - type Link = S::Link; - type PostCount = S::PostCount; type Actors = Set; type StartedAt = S::StartedAt; + type PostCount = S::PostCount; + type Link = S::Link; + type DisplayName = S::DisplayName; } ///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 Actors = S::Actors; + type StartedAt = Set; + type PostCount = S::PostCount; + type Link = S::Link; type DisplayName = S::DisplayName; + } + ///State transition - sets the `post_count` field to Set + pub struct SetPostCount(PhantomData S>); + impl sealed::Sealed for SetPostCount {} + impl State for SetPostCount { + type Topic = S::Topic; + type Actors = S::Actors; + type StartedAt = S::StartedAt; + type PostCount = Set; type Link = S::Link; + type DisplayName = S::DisplayName; + } + ///State transition - sets the `link` field to Set + pub struct SetLink(PhantomData S>); + impl sealed::Sealed for SetLink {} + impl State for SetLink { + type Topic = S::Topic; + type Actors = S::Actors; + type StartedAt = S::StartedAt; type PostCount = S::PostCount; + type Link = 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 Actors = S::Actors; - type StartedAt = Set; + type StartedAt = S::StartedAt; + type PostCount = S::PostCount; + type Link = S::Link; + type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `topic` field pub struct topic(()); - ///Marker type for the `display_name` field - pub struct display_name(()); - ///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 `started_at` field pub struct started_at(()); + ///Marker type for the `post_count` field + pub struct post_count(()); + ///Marker type for the `link` field + pub struct link(()); + ///Marker type for the `display_name` field + pub struct display_name(()); } } @@ -3229,11 +3229,11 @@ impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, S::Topic: trend_view_state::IsSet, - S::DisplayName: trend_view_state::IsSet, - S::Link: trend_view_state::IsSet, - S::PostCount: trend_view_state::IsSet, S::Actors: trend_view_state::IsSet, S::StartedAt: trend_view_state::IsSet, + S::PostCount: trend_view_state::IsSet, + S::Link: trend_view_state::IsSet, + S::DisplayName: 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_post_thread_other_v2.rs b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index 95c8e55..23c1266 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 Uri; - type Value; type Depth; + type Value; + 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 Value = Unset; type Depth = Unset; + type Value = Unset; + type Uri = 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; + ///State transition - sets the `depth` field to Set + pub struct SetDepth(PhantomData S>); + impl sealed::Sealed for SetDepth {} + impl State for SetDepth { + type Depth = Set; type Value = S::Value; - type Depth = S::Depth; + 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 Uri = S::Uri; - type Value = Set; type Depth = S::Depth; - } - ///State transition - sets the `depth` field to Set - pub struct SetDepth(PhantomData S>); - impl sealed::Sealed for SetDepth {} - impl State for SetDepth { + 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 Depth = S::Depth; type Value = S::Value; - type Depth = Set; + 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 `value` field - pub struct value(()); ///Marker type for the `depth` field pub struct depth(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -326,9 +326,9 @@ where impl<'a, S> ThreadItemBuilder<'a, S> where S: thread_item_state::State, - S::Uri: thread_item_state::IsSet, - S::Value: thread_item_state::IsSet, S::Depth: thread_item_state::IsSet, + S::Value: thread_item_state::IsSet, + S::Uri: 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_post_thread_v2.rs b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs index d598876..d30616d 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs @@ -265,49 +265,49 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Depth; + type Uri; 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 Depth = Unset; + type Uri = 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 Depth = S::Depth; - 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 Uri = S::Uri; type Depth = Set; + type Uri = S::Uri; + type Value = S::Value; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Depth = S::Depth; + 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 = S::Uri; type Depth = S::Depth; + type Uri = S::Uri; 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 `depth` field pub struct depth(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `value` field pub struct value(()); } @@ -402,8 +402,8 @@ where impl<'a, S> ThreadItemBuilder<'a, S> where S: thread_item_state::State, - S::Uri: thread_item_state::IsSet, S::Depth: thread_item_state::IsSet, + S::Uri: thread_item_state::IsSet, S::Value: thread_item_state::IsSet, { /// Build the final struct 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 4f6a7f7..3092de2 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,49 +90,49 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Tag; type SubjectType; + type Tag; type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Tag = Unset; type SubjectType = Unset; + type Tag = Unset; type Subject = Unset; } - ///State transition - sets the `tag` field to Set - pub struct SetTag(PhantomData S>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type Tag = Set; - type SubjectType = S::SubjectType; - type Subject = S::Subject; - } ///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 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; } ///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 SubjectType = S::SubjectType; + type Tag = S::Tag; type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `tag` field - pub struct tag(()); ///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(()); } @@ -227,8 +227,8 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, - S::Tag: suggestion_state::IsSet, S::SubjectType: suggestion_state::IsSet, + S::Tag: suggestion_state::IsSet, S::Subject: suggestion_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/video.rs b/crates/weaver-api/src/app_bsky/video.rs index 6fe37df..3df153f 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 State; type Did; + type State; type JobId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type State = Unset; type Did = Unset; + type State = Unset; type JobId = Unset; } - ///State transition - sets the `state` field to Set - pub struct SetState(PhantomData S>); - impl sealed::Sealed for SetState {} - impl State for SetState { - type State = Set; - type Did = S::Did; - type JobId = S::JobId; - } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type State = S::State; type Did = Set; + type State = S::State; + type JobId = S::JobId; + } + ///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 State = Set; type JobId = S::JobId; } ///State transition - sets the `job_id` field to Set pub struct SetJobId(PhantomData S>); impl sealed::Sealed for SetJobId {} impl State for SetJobId { - type State = S::State; type Did = S::Did; + type State = S::State; type JobId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `state` field - pub struct state(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `state` field + pub struct state(()); ///Marker type for the `job_id` field pub struct job_id(()); } @@ -257,8 +257,8 @@ where impl<'a, S> JobStatusBuilder<'a, S> where S: job_status_state::State, - S::State: job_status_state::IsSet, S::Did: job_status_state::IsSet, + S::State: job_status_state::IsSet, S::JobId: job_status_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/blog_pckt/block/mention.rs b/crates/weaver-api/src/blog_pckt/block/mention.rs index bb7c274..6b65622 100644 --- a/crates/weaver-api/src/blog_pckt/block/mention.rs +++ b/crates/weaver-api/src/blog_pckt/block/mention.rs @@ -35,37 +35,37 @@ pub mod mention_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(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> MentionBuilder<'a, S> where S: mention_state::State, - S::Handle: mention_state::IsSet, S::Did: mention_state::IsSet, + S::Handle: mention_state::IsSet, { /// Build the final struct pub fn build(self) -> Mention<'a> { diff --git a/crates/weaver-api/src/blog_pckt/block/task_item.rs b/crates/weaver-api/src/blog_pckt/block/task_item.rs index aee720a..8caef90 100644 --- a/crates/weaver-api/src/blog_pckt/block/task_item.rs +++ b/crates/weaver-api/src/blog_pckt/block/task_item.rs @@ -34,37 +34,37 @@ pub mod task_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Checked; type Content; + type Checked; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Checked = Unset; type Content = Unset; - } - ///State transition - sets the `checked` field to Set - pub struct SetChecked(PhantomData S>); - impl sealed::Sealed for SetChecked {} - impl State for SetChecked { - type Checked = Set; - type Content = S::Content; + type Checked = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData S>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Checked = S::Checked; type Content = Set; + type Checked = S::Checked; + } + ///State transition - sets the `checked` field to Set + pub struct SetChecked(PhantomData S>); + impl sealed::Sealed for SetChecked {} + impl State for SetChecked { + type Content = S::Content; + type Checked = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `checked` field - pub struct checked(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `checked` field + pub struct checked(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> TaskItemBuilder<'a, S> where S: task_item_state::State, - S::Checked: task_item_state::IsSet, S::Content: task_item_state::IsSet, + S::Checked: task_item_state::IsSet, { /// Build the final struct pub fn build(self) -> TaskItem<'a> { diff --git a/crates/weaver-api/src/blog_pckt/post.rs b/crates/weaver-api/src/blog_pckt/post.rs index e757496..dbd5f0e 100644 --- a/crates/weaver-api/src/blog_pckt/post.rs +++ b/crates/weaver-api/src/blog_pckt/post.rs @@ -53,67 +53,67 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; + type Blog; type Blocks; type Url; - type Blog; + 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 Blog = Unset; type Blocks = Unset; type Url = Unset; - type Blog = Unset; + type Title = 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; + ///State transition - sets the `blog` field to Set + pub struct SetBlog(PhantomData S>); + impl sealed::Sealed for SetBlog {} + impl State for SetBlog { + type Blog = Set; type Blocks = S::Blocks; type Url = S::Url; - type Blog = S::Blog; + type Title = S::Title; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData S>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { - type Title = S::Title; + type Blog = S::Blog; type Blocks = Set; type Url = S::Url; - type Blog = S::Blog; + type Title = S::Title; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Title = S::Title; + type Blog = S::Blog; type Blocks = S::Blocks; type Url = Set; - type Blog = S::Blog; - } - ///State transition - sets the `blog` field to Set - pub struct SetBlog(PhantomData S>); - impl sealed::Sealed for SetBlog {} - impl State for SetBlog { 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 Blog = S::Blog; type Blocks = S::Blocks; type Url = S::Url; - type Blog = Set; + 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 `blog` field + pub struct blog(()); ///Marker type for the `blocks` field pub struct blocks(()); ///Marker type for the `url` field pub struct url(()); - ///Marker type for the `blog` field - pub struct blog(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -357,10 +357,10 @@ where impl<'a, S> PostBuilder<'a, S> where S: post_state::State, - S::Title: post_state::IsSet, + S::Blog: post_state::IsSet, S::Blocks: post_state::IsSet, S::Url: post_state::IsSet, - S::Blog: post_state::IsSet, + S::Title: post_state::IsSet, { /// Build the final struct pub fn build(self) -> Post<'a> { diff --git a/crates/weaver-api/src/blog_pckt/richtext/facet.rs b/crates/weaver-api/src/blog_pckt/richtext/facet.rs index 8e28b64..7beda8e 100644 --- a/crates/weaver-api/src/blog_pckt/richtext/facet.rs +++ b/crates/weaver-api/src/blog_pckt/richtext/facet.rs @@ -552,37 +552,37 @@ pub mod byte_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ByteStart; type ByteEnd; + type ByteStart; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ByteStart = Unset; 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 ByteStart = Set; - type ByteEnd = S::ByteEnd; + 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 ByteStart = S::ByteStart; type ByteEnd = Set; + type ByteStart = S::ByteStart; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `byte_start` field - pub struct byte_start(()); ///Marker type for the `byte_end` field pub struct byte_end(()); + ///Marker type for the `byte_start` field + pub struct byte_start(()); } } @@ -652,8 +652,8 @@ where impl<'a, S> ByteSliceBuilder<'a, S> where S: byte_slice_state::State, - S::ByteStart: byte_slice_state::IsSet, S::ByteEnd: byte_slice_state::IsSet, + S::ByteStart: byte_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> ByteSlice<'a> { @@ -1051,37 +1051,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(()); } } @@ -1154,8 +1154,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/chat_bsky/convo.rs b/crates/weaver-api/src/chat_bsky/convo.rs index c043881..b5c5d65 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 Id; type Muted; type UnreadCount; - type Id; - type Members; type Rev; + type Members; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Id = Unset; type Muted = Unset; type UnreadCount = Unset; - type Id = Unset; - type Members = Unset; type Rev = Unset; + type Members = 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 Muted = S::Muted; + type UnreadCount = S::UnreadCount; + type Rev = S::Rev; + type Members = S::Members; } ///State transition - sets the `muted` field to Set pub struct SetMuted(PhantomData S>); impl sealed::Sealed for SetMuted {} impl State for SetMuted { + type Id = S::Id; type Muted = Set; type UnreadCount = S::UnreadCount; - type Id = S::Id; - type Members = S::Members; type Rev = S::Rev; + type Members = S::Members; } ///State transition - sets the `unread_count` field to Set pub struct SetUnreadCount(PhantomData S>); impl sealed::Sealed for SetUnreadCount {} impl State for SetUnreadCount { + type Id = S::Id; type Muted = S::Muted; type UnreadCount = Set; - type Id = S::Id; - type Members = S::Members; type Rev = S::Rev; + 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 { + ///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 Muted = S::Muted; type UnreadCount = S::UnreadCount; - type Id = Set; + type Rev = Set; type Members = S::Members; - type Rev = S::Rev; } ///State transition - sets the `members` field to Set pub struct SetMembers(PhantomData S>); impl sealed::Sealed for SetMembers {} impl State for SetMembers { - type Muted = S::Muted; - type UnreadCount = S::UnreadCount; type Id = S::Id; - type Members = 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 Muted = S::Muted; type UnreadCount = S::UnreadCount; - type Id = S::Id; - type Members = S::Members; - type Rev = Set; + type Rev = S::Rev; + type Members = 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 `muted` field pub struct muted(()); ///Marker type for the `unread_count` field pub struct unread_count(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `members` field - pub struct members(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `members` field + pub struct members(()); } } @@ -331,11 +331,11 @@ where impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, + S::Id: convo_view_state::IsSet, S::Muted: convo_view_state::IsSet, S::UnreadCount: convo_view_state::IsSet, - S::Id: convo_view_state::IsSet, - S::Members: convo_view_state::IsSet, S::Rev: convo_view_state::IsSet, + S::Members: convo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ConvoView<'a> { @@ -1733,67 +1733,67 @@ pub mod deleted_message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type Sender; - type SentAt; type Id; - type Rev; + type SentAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; type Sender = Unset; - type SentAt = Unset; type Id = Unset; - type Rev = 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 Sender = S::Sender; + type Id = S::Id; + type SentAt = S::SentAt; } ///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; - } - ///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 Sender = Set; type Id = S::Id; - type Rev = S::Rev; + type SentAt = S::SentAt; } ///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 Sender = S::Sender; - type SentAt = S::SentAt; type Id = Set; - type Rev = S::Rev; + type SentAt = S::SentAt; } - ///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 `sent_at` field to Set + pub struct SetSentAt(PhantomData S>); + impl sealed::Sealed for SetSentAt {} + impl State for SetSentAt { + type Rev = S::Rev; type Sender = S::Sender; - type SentAt = S::SentAt; type Id = S::Id; - type Rev = Set; + type SentAt = 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 `sender` field pub struct sender(()); - ///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 `sent_at` field + pub struct sent_at(()); } } @@ -1906,10 +1906,10 @@ where impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, + S::Rev: deleted_message_view_state::IsSet, S::Sender: deleted_message_view_state::IsSet, - S::SentAt: deleted_message_view_state::IsSet, S::Id: deleted_message_view_state::IsSet, - S::Rev: deleted_message_view_state::IsSet, + S::SentAt: deleted_message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DeletedMessageView<'a> { @@ -2025,66 +2025,66 @@ pub mod log_add_reaction_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rev; - type Message; - type Reaction; type ConvoId; + type Reaction; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; - type Message = Unset; - type Reaction = Unset; type ConvoId = Unset; + type Reaction = Unset; + 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 Rev = Set; - type Message = S::Message; - type Reaction = S::Reaction; type ConvoId = S::ConvoId; + type Reaction = S::Reaction; + 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 { + ///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 Message = Set; + type ConvoId = Set; type Reaction = S::Reaction; - type ConvoId = S::ConvoId; + type Message = S::Message; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { type Rev = S::Rev; - type Message = S::Message; - type Reaction = Set; type ConvoId = S::ConvoId; + type Reaction = Set; + 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 { + ///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 Message = S::Message; + type ConvoId = S::ConvoId; type Reaction = S::Reaction; - type ConvoId = 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 `message` field - pub struct message(()); - ///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 `message` field + pub struct message(()); } } @@ -2198,9 +2198,9 @@ impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Rev: log_add_reaction_state::IsSet, - S::Message: 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::Message: log_add_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogAddReaction<'a> { @@ -2332,51 +2332,51 @@ pub mod log_create_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(()); } } @@ -2469,9 +2469,9 @@ where impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, + S::Rev: log_create_message_state::IsSet, S::ConvoId: log_create_message_state::IsSet, S::Message: log_create_message_state::IsSet, - S::Rev: log_create_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogCreateMessage<'a> { @@ -2565,51 +2565,51 @@ pub mod log_delete_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(()); } } @@ -2702,9 +2702,9 @@ where impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, - S::Message: log_delete_message_state::IsSet, S::Rev: log_delete_message_state::IsSet, S::ConvoId: log_delete_message_state::IsSet, + S::Message: log_delete_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogDeleteMessage<'a> { @@ -2870,51 +2870,51 @@ pub mod log_read_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type ConvoId; type Rev; type Message; - type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type ConvoId = Unset; type Rev = Unset; type Message = Unset; - type ConvoId = 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 ConvoId = Set; + type Rev = S::Rev; + type Message = S::Message; } ///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 Rev = Set; type Message = S::Message; - type ConvoId = S::ConvoId; } ///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 Message = Set; type ConvoId = S::ConvoId; - } - ///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 Message = S::Message; - type ConvoId = Set; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `convo_id` field + pub struct convo_id(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `message` field pub struct message(()); - ///Marker type for the `convo_id` field - pub struct convo_id(()); } } @@ -3007,9 +3007,9 @@ where impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, + S::ConvoId: log_read_message_state::IsSet, S::Rev: log_read_message_state::IsSet, S::Message: log_read_message_state::IsSet, - S::ConvoId: log_read_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogReadMessage<'a> { @@ -3107,8 +3107,8 @@ pub mod log_remove_reaction_state { pub trait State: sealed::Sealed { type Reaction; type ConvoId; - type Message; type Rev; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -3116,8 +3116,8 @@ pub mod log_remove_reaction_state { impl State for Empty { type Reaction = Unset; type ConvoId = Unset; - type Message = Unset; type Rev = Unset; + type Message = Unset; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); @@ -3125,8 +3125,8 @@ pub mod log_remove_reaction_state { impl State for SetReaction { type Reaction = Set; type ConvoId = S::ConvoId; - type Message = S::Message; type Rev = S::Rev; + type Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); @@ -3134,17 +3134,8 @@ pub mod log_remove_reaction_state { impl State for SetConvoId { type Reaction = S::Reaction; 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 Reaction = S::Reaction; - type ConvoId = S::ConvoId; - type Message = Set; type Rev = S::Rev; + type Message = S::Message; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); @@ -3152,8 +3143,17 @@ pub mod log_remove_reaction_state { impl State for SetRev { type Reaction = S::Reaction; type ConvoId = S::ConvoId; - type Message = S::Message; type Rev = 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 Reaction = S::Reaction; + type ConvoId = S::ConvoId; + type Rev = S::Rev; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -3162,10 +3162,10 @@ pub mod log_remove_reaction_state { pub struct reaction(()); ///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(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -3280,8 +3280,8 @@ where S: log_remove_reaction_state::State, S::Reaction: log_remove_reaction_state::IsSet, S::ConvoId: log_remove_reaction_state::IsSet, - S::Message: log_remove_reaction_state::IsSet, S::Rev: log_remove_reaction_state::IsSet, + S::Message: log_remove_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogRemoveReaction<'a> { @@ -3411,37 +3411,37 @@ pub mod message_and_reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reaction; type Message; + type Reaction; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reaction = Unset; type Message = Unset; - } - ///State transition - sets the `reaction` field to Set - pub struct SetReaction(PhantomData S>); - impl sealed::Sealed for SetReaction {} - impl State for SetReaction { - type Reaction = Set; - type Message = S::Message; + type Reaction = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Reaction = S::Reaction; type Message = Set; + type Reaction = S::Reaction; + } + ///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 Reaction = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reaction` field - pub struct reaction(()); ///Marker type for the `message` field pub struct message(()); + ///Marker type for the `reaction` field + pub struct reaction(()); } } @@ -3523,8 +3523,8 @@ where impl<'a, S> MessageAndReactionViewBuilder<'a, S> where S: message_and_reaction_view_state::State, - S::Reaction: message_and_reaction_view_state::IsSet, S::Message: message_and_reaction_view_state::IsSet, + S::Reaction: message_and_reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageAndReactionView<'a> { @@ -3670,51 +3670,51 @@ pub mod message_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MessageId; type ConvoId; type Did; + type MessageId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MessageId = Unset; type ConvoId = Unset; type Did = Unset; - } - ///State transition - sets the `message_id` field to Set - pub struct SetMessageId(PhantomData S>); - impl sealed::Sealed for SetMessageId {} - impl State for SetMessageId { - type MessageId = Set; - type ConvoId = S::ConvoId; - type Did = S::Did; + type MessageId = 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 MessageId = S::MessageId; type ConvoId = Set; type Did = S::Did; + type MessageId = S::MessageId; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type MessageId = S::MessageId; type ConvoId = S::ConvoId; type Did = Set; + type MessageId = S::MessageId; + } + ///State transition - sets the `message_id` field to Set + pub struct SetMessageId(PhantomData S>); + impl sealed::Sealed for SetMessageId {} + impl State for SetMessageId { + type ConvoId = S::ConvoId; + type Did = S::Did; + type MessageId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message_id` field - pub struct message_id(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `message_id` field + pub struct message_id(()); } } @@ -3807,9 +3807,9 @@ where impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, - S::MessageId: message_ref_state::IsSet, S::ConvoId: message_ref_state::IsSet, S::Did: message_ref_state::IsSet, + S::MessageId: message_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageRef<'a> { @@ -3898,83 +3898,83 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; - type Sender; type Rev; + type Id; type Text; + type Sender; type SentAt; } /// 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 Rev = Unset; + type Id = Unset; type Text = Unset; + type Sender = Unset; type SentAt = 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 Rev = S::Rev; - type Text = S::Text; - type SentAt = S::SentAt; - } - ///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 Rev = S::Rev; - type Text = S::Text; - type SentAt = S::SentAt; - } ///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 Id = S::Id; + type Text = S::Text; type Sender = S::Sender; - type Rev = Set; + type SentAt = S::SentAt; + } + ///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 Text = S::Text; + type Sender = S::Sender; 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 Id = S::Id; + type Text = Set; type Sender = S::Sender; + type SentAt = S::SentAt; + } + ///State transition - sets the `sender` field to Set + pub struct SetSender(PhantomData S>); + impl sealed::Sealed for SetSender {} + impl State for SetSender { type Rev = S::Rev; - type Text = Set; + type Id = S::Id; + type Text = S::Text; + type Sender = 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 Id = S::Id; - type Sender = S::Sender; type Rev = S::Rev; + type Id = S::Id; type Text = S::Text; + type Sender = S::Sender; type SentAt = 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 `rev` field pub struct rev(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `sender` field + pub struct sender(()); ///Marker type for the `sent_at` field pub struct sent_at(()); } @@ -4169,10 +4169,10 @@ where impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, - S::Id: message_view_state::IsSet, - S::Sender: message_view_state::IsSet, S::Rev: message_view_state::IsSet, + S::Id: message_view_state::IsSet, S::Text: message_view_state::IsSet, + S::Sender: message_view_state::IsSet, S::SentAt: message_view_state::IsSet, { /// Build the final struct @@ -4428,50 +4428,50 @@ pub mod reaction_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Value; - type Sender; type CreatedAt; + type Sender; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Value = Unset; - type Sender = Unset; type CreatedAt = Unset; + type Sender = 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 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 Value = S::Value; - type Sender = Set; type CreatedAt = S::CreatedAt; + type Sender = S::Sender; } ///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; + 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 Value = S::Value; + type CreatedAt = S::CreatedAt; + type Sender = 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 `sender` field - pub struct sender(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `sender` field + pub struct sender(()); } } @@ -4565,8 +4565,8 @@ impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, S::Value: reaction_view_state::IsSet, - S::Sender: reaction_view_state::IsSet, S::CreatedAt: reaction_view_state::IsSet, + S::Sender: reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionView<'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 a8b792b..c5f4847 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 MessagesReceived; + type ConvosStarted; type Convos; + type MessagesSent; } /// 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 MessagesReceived = Unset; + type ConvosStarted = Unset; type Convos = 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 MessagesReceived = S::MessagesReceived; - type Convos = S::Convos; - } - ///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 MessagesReceived = S::MessagesReceived; - type Convos = S::Convos; + type MessagesSent = Unset; } ///State transition - sets the `messages_received` field to Set pub struct SetMessagesReceived(PhantomData S>); impl sealed::Sealed for SetMessagesReceived {} impl State for SetMessagesReceived { + type MessagesReceived = Set; type ConvosStarted = S::ConvosStarted; + type Convos = S::Convos; type MessagesSent = S::MessagesSent; - type MessagesReceived = Set; + } + ///State transition - sets the `convos_started` field to Set + pub struct SetConvosStarted(PhantomData S>); + impl sealed::Sealed for SetConvosStarted {} + impl State for SetConvosStarted { + type MessagesReceived = S::MessagesReceived; + type ConvosStarted = Set; type Convos = S::Convos; + type MessagesSent = S::MessagesSent; } ///State transition - sets the `convos` field to Set pub struct SetConvos(PhantomData S>); impl sealed::Sealed for SetConvos {} impl State for SetConvos { + type MessagesReceived = S::MessagesReceived; type ConvosStarted = S::ConvosStarted; + type Convos = Set; type MessagesSent = S::MessagesSent; + } + ///State transition - sets the `messages_sent` field to Set + pub struct SetMessagesSent(PhantomData S>); + impl sealed::Sealed for SetMessagesSent {} + impl State for SetMessagesSent { type MessagesReceived = S::MessagesReceived; - type Convos = Set; + type ConvosStarted = S::ConvosStarted; + type Convos = S::Convos; + type MessagesSent = 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 `messages_received` field pub struct messages_received(()); + ///Marker type for the `convos_started` field + pub struct convos_started(()); ///Marker type for the `convos` field pub struct convos(()); + ///Marker type for the `messages_sent` field + pub struct messages_sent(()); } } @@ -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::MessagesReceived: metadata_state::IsSet, + S::ConvosStarted: metadata_state::IsSet, S::Convos: metadata_state::IsSet, + S::MessagesSent: metadata_state::IsSet, { /// Build the final struct pub fn build(self) -> Metadata<'a> { diff --git a/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs b/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs index ebdd92b..b93c5d1 100644 --- a/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs +++ b/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs @@ -35,37 +35,37 @@ pub mod update_actor_access_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Actor; type AllowAccess; + 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 AllowAccess = 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 AllowAccess = S::AllowAccess; + type Actor = Unset; } ///State transition - sets the `allow_access` field to Set pub struct SetAllowAccess(PhantomData S>); impl sealed::Sealed for SetAllowAccess {} impl State for SetAllowAccess { - type Actor = S::Actor; type AllowAccess = 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 AllowAccess = S::AllowAccess; + type Actor = 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 `allow_access` field pub struct allow_access(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -155,8 +155,8 @@ impl<'a, S: update_actor_access_state::State> UpdateActorAccessBuilder<'a, S> { impl<'a, S> UpdateActorAccessBuilder<'a, S> where S: update_actor_access_state::State, - S::Actor: update_actor_access_state::IsSet, S::AllowAccess: update_actor_access_state::IsSet, + S::Actor: update_actor_access_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateActorAccess<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin.rs b/crates/weaver-api/src/com_atproto/admin.rs index e2f86b6..f4dbd7c 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 Did; 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 Did = 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; + ///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 Did = S::Did; - type IndexedAt = S::IndexedAt; + 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 Handle = S::Handle; - type Did = 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 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 IndexedAt = Set; + 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 `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::Did: 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 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(()); } } @@ -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::Did: repo_blob_ref_state::IsSet, S::Cid: repo_blob_ref_state::IsSet, + S::Did: 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 3d4338a..6a048cf 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 SenderDid; + 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 SenderDid = 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; + ///State transition - sets the `recipient_did` field to Set + pub struct SetRecipientDid(PhantomData S>); + impl sealed::Sealed for SetRecipientDid {} + impl State for SetRecipientDid { + type RecipientDid = Set; type SenderDid = S::SenderDid; - type RecipientDid = S::RecipientDid; + type Content = S::Content; } ///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; - } - ///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 = 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 RecipientDid = S::RecipientDid; type SenderDid = S::SenderDid; - type RecipientDid = Set; + 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 `sender_did` field - pub struct sender_did(()); ///Marker type for the `recipient_did` field pub struct recipient_did(()); + ///Marker type for the `sender_did` field + pub struct sender_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::SenderDid: 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/identity.rs b/crates/weaver-api/src/com_atproto/identity.rs index 26d7ab3..9cbacff 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 Did; - type Handle; type DidDoc; + 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; type DidDoc = Unset; + type Handle = 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 `did_doc` field to Set + pub struct SetDidDoc(PhantomData S>); + impl sealed::Sealed for SetDidDoc {} + impl State for SetDidDoc { + type DidDoc = Set; type Handle = S::Handle; - type DidDoc = S::DidDoc; + 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 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 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 DidDoc = S::DidDoc; type Handle = S::Handle; - type DidDoc = 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 `handle` field - pub struct handle(()); ///Marker type for the `did_doc` field pub struct did_doc(()); + ///Marker type for the `handle` field + pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -184,9 +184,9 @@ where impl<'a, S> IdentityInfoBuilder<'a, S> where S: identity_info_state::State, - S::Did: identity_info_state::IsSet, - S::Handle: identity_info_state::IsSet, S::DidDoc: identity_info_state::IsSet, + S::Handle: identity_info_state::IsSet, + S::Did: 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 2a0fec2..9f3edc8 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 Src; type Uri; - type Val; type Cts; + type Src; + type Val; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Src = Unset; type Uri = Unset; - type Val = Unset; type Cts = Unset; - } - ///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 = Unset; + type Val = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - 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; + type Val = S::Val; } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData S>); impl sealed::Sealed for SetCts {} impl State for SetCts { + type Uri = S::Uri; + type Cts = Set; type Src = S::Src; + type Val = S::Val; + } + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData S>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { type Uri = S::Uri; + type Cts = S::Cts; + type Src = Set; type Val = S::Val; - type Cts = Set; + } + ///State transition - sets the `val` field to Set + pub struct SetVal(PhantomData S>); + impl sealed::Sealed for SetVal {} + impl State for SetVal { + type Uri = S::Uri; + type Cts = S::Cts; + type Src = S::Src; + type Val = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); + ///Marker type for the `val` field + pub struct val(()); } } @@ -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::Src: label_state::IsSet, S::Uri: label_state::IsSet, - S::Val: label_state::IsSet, S::Cts: label_state::IsSet, + S::Src: label_state::IsSet, + S::Val: label_state::IsSet, { /// Build the final struct pub fn build(self) -> Label<'a> { @@ -1061,8 +1061,8 @@ pub mod label_value_definition_state { pub trait State: sealed::Sealed { type Severity; type Identifier; - type Locales; type Blurs; + type Locales; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -1070,8 +1070,8 @@ pub mod label_value_definition_state { impl State for Empty { type Severity = Unset; type Identifier = Unset; - type Locales = Unset; type Blurs = Unset; + type Locales = Unset; } ///State transition - sets the `severity` field to Set pub struct SetSeverity(PhantomData S>); @@ -1079,8 +1079,8 @@ pub mod label_value_definition_state { impl State for SetSeverity { type Severity = Set; type Identifier = S::Identifier; - type Locales = S::Locales; type Blurs = S::Blurs; + type Locales = S::Locales; } ///State transition - sets the `identifier` field to Set pub struct SetIdentifier(PhantomData S>); @@ -1088,17 +1088,8 @@ pub mod label_value_definition_state { impl State for SetIdentifier { type Severity = S::Severity; 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 Identifier = S::Identifier; - type Locales = Set; type Blurs = S::Blurs; + type Locales = S::Locales; } ///State transition - sets the `blurs` field to Set pub struct SetBlurs(PhantomData S>); @@ -1106,8 +1097,17 @@ pub mod label_value_definition_state { impl State for SetBlurs { type Severity = S::Severity; type Identifier = S::Identifier; - type Locales = S::Locales; type Blurs = Set; + type Locales = S::Locales; + } + ///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 Identifier = S::Identifier; + type Blurs = S::Blurs; + type Locales = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -1116,10 +1116,10 @@ pub mod label_value_definition_state { pub struct severity(()); ///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(()); + ///Marker type for the `locales` field + pub struct locales(()); } } @@ -1276,8 +1276,8 @@ where S: label_value_definition_state::State, S::Severity: 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, + S::Locales: label_value_definition_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinition<'a> { @@ -1688,50 +1688,50 @@ pub mod label_value_definition_strings_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type Description; type Lang; + type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Name = Unset; - type Description = Unset; type Lang = Unset; + type Description = 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 Description = S::Description; - 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 Name = S::Name; - type Description = Set; type Lang = S::Lang; + type Description = S::Description; } ///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 Lang = 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 Name = S::Name; + type Lang = S::Lang; + type Description = 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 `description` field - pub struct description(()); ///Marker type for the `lang` field pub struct lang(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -1842,8 +1842,8 @@ impl<'a, S> LabelValueDefinitionStringsBuilder<'a, S> where S: label_value_definition_strings_state::State, S::Name: label_value_definition_strings_state::IsSet, - S::Description: label_value_definition_strings_state::IsSet, S::Lang: label_value_definition_strings_state::IsSet, + S::Description: 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/label/subscribe_labels.rs b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs index 2e30cc0..13df8eb 100644 --- a/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs +++ b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs @@ -286,37 +286,37 @@ pub mod labels_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; type Labels; + type Seq; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Seq = Unset; type Labels = 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 Labels = S::Labels; + type Seq = Unset; } ///State transition - sets the `labels` field to Set pub struct SetLabels(PhantomData S>); impl sealed::Sealed for SetLabels {} impl State for SetLabels { - type Seq = S::Seq; type Labels = Set; + type Seq = S::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Labels = S::Labels; + type Seq = 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 `labels` field pub struct labels(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -389,8 +389,8 @@ where impl<'a, S> LabelsBuilder<'a, S> where S: labels_state::State, - S::Seq: labels_state::IsSet, S::Labels: labels_state::IsSet, + S::Seq: labels_state::IsSet, { /// Build the final struct pub fn build(self) -> Labels<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo.rs b/crates/weaver-api/src/com_atproto/repo.rs index 9668377..a43999f 100644 --- a/crates/weaver-api/src/com_atproto/repo.rs +++ b/crates/weaver-api/src/com_atproto/repo.rs @@ -44,37 +44,37 @@ pub mod commit_meta_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev; type Cid; + 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 Cid = 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 Cid = S::Cid; + type Rev = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Rev = S::Rev; type Cid = 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 Cid = S::Cid; + type Rev = 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 `cid` field pub struct cid(()); + ///Marker type for the `rev` field + pub struct rev(()); } } @@ -147,8 +147,8 @@ where impl<'a, S> CommitMetaBuilder<'a, S> where S: commit_meta_state::State, - S::Rev: commit_meta_state::IsSet, S::Cid: commit_meta_state::IsSet, + S::Rev: commit_meta_state::IsSet, { /// Build the final struct pub fn build(self) -> CommitMeta<'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 19ca337..99176db 100644 --- a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs @@ -42,37 +42,37 @@ pub mod create_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Collection; + 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 Collection = 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 Collection = S::Collection; + type Value = Unset; } ///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 Collection = 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 Collection = S::Collection; + 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 `collection` field pub struct collection(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -179,8 +179,8 @@ where impl<'a, S> CreateBuilder<'a, S> where S: create_state::State, - S::Value: create_state::IsSet, S::Collection: create_state::IsSet, + S::Value: create_state::IsSet, { /// Build the final struct pub fn build(self) -> Create<'a> { @@ -728,37 +728,37 @@ pub mod create_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; 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; - } - ///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 Uri = S::Uri; + 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 Cid = S::Cid; 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 Uri = S::Uri; + 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 `cid` field + pub struct cid(()); } } @@ -851,8 +851,8 @@ impl<'a, S: create_result_state::State> CreateResultBuilder<'a, S> { impl<'a, S> CreateResultBuilder<'a, S> where S: create_result_state::State, - S::Cid: create_result_state::IsSet, S::Uri: create_result_state::IsSet, + S::Cid: create_result_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateResult<'a> { @@ -1241,37 +1241,37 @@ pub mod apply_writes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Writes; + 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 Writes = 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 Writes = S::Writes; + type Repo = Unset; } ///State transition - sets the `writes` field to Set pub struct SetWrites(PhantomData S>); impl sealed::Sealed for SetWrites {} impl State for SetWrites { - type Repo = S::Repo; type Writes = 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 Writes = S::Writes; + type Repo = 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 `writes` field pub struct writes(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -1378,8 +1378,8 @@ where impl<'a, S> ApplyWritesBuilder<'a, S> where S: apply_writes_state::State, - S::Repo: apply_writes_state::IsSet, S::Writes: apply_writes_state::IsSet, + S::Repo: apply_writes_state::IsSet, { /// Build the final struct pub fn build(self) -> ApplyWrites<'a> { @@ -1568,51 +1568,51 @@ 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; + 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 Rkey = Unset; type Collection = Unset; + type Rkey = 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 `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 = S::Collection; + type Value = S::Value; } ///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; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { + type Rkey = 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 Collection = S::Collection; type Rkey = S::Rkey; - type Collection = 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 `rkey` field - pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `rkey` field + pub struct rkey(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -1713,9 +1713,9 @@ where 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, + S::Value: 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 dbaf0b9..712de3d 100644 --- a/crates/weaver-api/src/com_atproto/repo/create_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/create_record.rs @@ -54,50 +54,50 @@ pub mod create_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Record; - type Collection; type Repo; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Record = Unset; - type Collection = Unset; type Repo = Unset; + type Collection = 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 Collection = S::Collection; - 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 Record = S::Record; - type Collection = 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 Collection = S::Collection; 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 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 `record` field pub struct record(()); - ///Marker type for the `collection` field - pub struct collection(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -259,8 +259,8 @@ impl<'a, S> CreateRecordBuilder<'a, S> where S: create_record_state::State, S::Record: create_record_state::IsSet, - S::Collection: create_record_state::IsSet, S::Repo: create_record_state::IsSet, + S::Collection: create_record_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateRecord<'a> { 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 c38096b..1529a1e 100644 --- a/crates/weaver-api/src/com_atproto/repo/delete_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/delete_record.rs @@ -48,49 +48,49 @@ pub mod delete_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; type Repo; + type Collection; type Rkey; } /// 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 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 Repo = S::Repo; - type Rkey = S::Rkey; - } ///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 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 Repo = S::Repo; + 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 Collection = S::Collection; type Repo = S::Repo; + type Collection = S::Collection; type Rkey = 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 `collection` field + pub struct collection(()); ///Marker type for the `rkey` field pub struct rkey(()); } @@ -233,8 +233,8 @@ 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::Collection: delete_record_state::IsSet, S::Rkey: delete_record_state::IsSet, { /// Build the final struct 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 67a7396..ff78415 100644 --- a/crates/weaver-api/src/com_atproto/repo/get_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/get_record.rs @@ -40,50 +40,50 @@ pub mod get_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rkey; - type Repo; type Collection; + type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rkey = Unset; - type Repo = Unset; type Collection = Unset; + type Repo = Unset; } ///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 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 Rkey = S::Rkey; - type Repo = Set; type Collection = S::Collection; + 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 Rkey = S::Rkey; - type Repo = S::Repo; type Collection = 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 Rkey = S::Rkey; + type Collection = S::Collection; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///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(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -205,8 +205,8 @@ impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, S::Rkey: get_record_state::IsSet, - S::Repo: get_record_state::IsSet, S::Collection: get_record_state::IsSet, + S::Repo: 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_missing_blobs.rs b/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs index 3bc064e..6a5fbc5 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs @@ -186,37 +186,37 @@ pub mod record_blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RecordUri; type Cid; + type RecordUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RecordUri = Unset; type Cid = Unset; - } - ///State transition - sets the `record_uri` field to Set - pub struct SetRecordUri(PhantomData S>); - impl sealed::Sealed for SetRecordUri {} - impl State for SetRecordUri { - type RecordUri = Set; - type Cid = S::Cid; + type RecordUri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type RecordUri = S::RecordUri; type Cid = Set; + type RecordUri = S::RecordUri; + } + ///State transition - sets the `record_uri` field to Set + pub struct SetRecordUri(PhantomData S>); + impl sealed::Sealed for SetRecordUri {} + impl State for SetRecordUri { + type Cid = S::Cid; + type RecordUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record_uri` field - pub struct record_uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `record_uri` field + pub struct record_uri(()); } } @@ -289,8 +289,8 @@ where impl<'a, S> RecordBlobBuilder<'a, S> where S: record_blob_state::State, - S::RecordUri: record_blob_state::IsSet, S::Cid: record_blob_state::IsSet, + S::RecordUri: record_blob_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordBlob<'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 b683462..ad621d4 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_records.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_records.rs @@ -40,37 +40,37 @@ pub mod list_records_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Collection; + 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 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 Collection = S::Collection; + type Repo = Unset; } ///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 Collection = 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 Collection = S::Collection; + type Repo = 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 `collection` field pub struct collection(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -188,8 +188,8 @@ impl<'a, S: list_records_state::State> ListRecordsBuilder<'a, S> { impl<'a, S> ListRecordsBuilder<'a, S> where S: list_records_state::State, - S::Repo: list_records_state::IsSet, S::Collection: list_records_state::IsSet, + S::Repo: list_records_state::IsSet, { /// Build the final struct pub fn build(self) -> ListRecords<'a> { @@ -278,51 +278,51 @@ pub mod record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Uri; type Cid; + 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 Uri = 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 Cid = S::Cid; + 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 Value = S::Value; type Uri = 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 Value = S::Value; type Uri = S::Uri; 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 Cid = S::Cid; + 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 `uri` field pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -415,9 +415,9 @@ where impl<'a, S> RecordBuilder<'a, S> where S: record_state::State, - S::Value: record_state::IsSet, S::Uri: record_state::IsSet, S::Cid: record_state::IsSet, + S::Value: 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 cc2325a..c954b32 100644 --- a/crates/weaver-api/src/com_atproto/repo/put_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/put_record.rs @@ -54,8 +54,8 @@ pub mod put_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Record; + type Repo; type Collection; type Rkey; } @@ -63,26 +63,26 @@ pub mod put_record_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repo = Unset; type Record = Unset; + type Repo = Unset; type Collection = Unset; type Rkey = 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 Repo = S::Repo; + type Collection = S::Collection; + type Rkey = S::Rkey; + } + ///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; type Rkey = S::Rkey; } @@ -90,8 +90,8 @@ pub mod put_record_state { 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; type Rkey = S::Rkey; } @@ -99,18 +99,18 @@ pub mod put_record_state { pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Repo = S::Repo; type Record = S::Record; + type Repo = S::Repo; type Collection = S::Collection; 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 `repo` field + pub struct repo(()); ///Marker type for the `collection` field pub struct collection(()); ///Marker type for the `rkey` field @@ -289,8 +289,8 @@ 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::Repo: put_record_state::IsSet, S::Collection: put_record_state::IsSet, S::Rkey: put_record_state::IsSet, { 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 f934e76..7d44605 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 Cid; 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; - } - ///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 Uri = S::Uri; + 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 Cid = S::Cid; 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 Uri = S::Uri; + 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 `cid` field + pub struct cid(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> StrongRefBuilder<'a, S> where S: strong_ref_state::State, - S::Cid: strong_ref_state::IsSet, S::Uri: strong_ref_state::IsSet, + S::Cid: 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 f70fa6e..2d8f10d 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 Available; + type CreatedAt; type Code; - type Disabled; type Uses; - type CreatedAt; - type Available; - type ForAccount; + type Disabled; type CreatedBy; + type ForAccount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Available = Unset; + type CreatedAt = Unset; type Code = Unset; - type Disabled = Unset; type Uses = Unset; - type CreatedAt = Unset; - type Available = Unset; - type ForAccount = Unset; + type Disabled = Unset; type CreatedBy = Unset; + type ForAccount = Unset; + } + ///State transition - sets the `available` field to Set + pub struct SetAvailable(PhantomData S>); + impl sealed::Sealed for SetAvailable {} + impl State for SetAvailable { + type Available = Set; + type CreatedAt = S::CreatedAt; + type Code = S::Code; + type Uses = S::Uses; + type Disabled = S::Disabled; + type CreatedBy = S::CreatedBy; + 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 Available = S::Available; + type CreatedAt = Set; + type Code = S::Code; + type Uses = S::Uses; + type Disabled = S::Disabled; + type CreatedBy = S::CreatedBy; + type ForAccount = S::ForAccount; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData S>); impl sealed::Sealed for SetCode {} impl State for SetCode { + type Available = S::Available; + type CreatedAt = S::CreatedAt; type Code = Set; - type Disabled = S::Disabled; type Uses = S::Uses; - type CreatedAt = S::CreatedAt; - type Available = S::Available; - type ForAccount = S::ForAccount; + type Disabled = S::Disabled; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `disabled` field to Set - pub struct SetDisabled(PhantomData S>); - impl sealed::Sealed for SetDisabled {} - impl State for SetDisabled { - type Code = S::Code; - type Disabled = Set; - type Uses = S::Uses; - type CreatedAt = S::CreatedAt; - type Available = S::Available; type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; } ///State transition - sets the `uses` field to Set pub struct SetUses(PhantomData S>); impl sealed::Sealed for SetUses {} impl State for SetUses { + type Available = S::Available; + type CreatedAt = S::CreatedAt; type Code = S::Code; - type Disabled = S::Disabled; type Uses = Set; - type CreatedAt = S::CreatedAt; - type Available = S::Available; - type ForAccount = S::ForAccount; + type Disabled = S::Disabled; type CreatedBy = S::CreatedBy; + 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 { + ///State transition - sets the `disabled` field to Set + pub struct SetDisabled(PhantomData S>); + impl sealed::Sealed for SetDisabled {} + impl State for SetDisabled { + type Available = S::Available; + type CreatedAt = S::CreatedAt; type Code = S::Code; - type Disabled = S::Disabled; type Uses = S::Uses; - type CreatedAt = Set; - type Available = S::Available; - type ForAccount = S::ForAccount; + type Disabled = Set; type CreatedBy = S::CreatedBy; + type ForAccount = S::ForAccount; } - ///State transition - sets the `available` field to Set - pub struct SetAvailable(PhantomData S>); - impl sealed::Sealed for SetAvailable {} - impl State for SetAvailable { + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Available = S::Available; + type CreatedAt = S::CreatedAt; type Code = S::Code; - type Disabled = S::Disabled; type Uses = S::Uses; - type CreatedAt = S::CreatedAt; - type Available = Set; + type Disabled = S::Disabled; + type CreatedBy = Set; type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; } ///State transition - sets the `for_account` field to Set pub struct SetForAccount(PhantomData S>); impl sealed::Sealed for SetForAccount {} impl State for SetForAccount { - type Code = S::Code; - type Disabled = S::Disabled; - type Uses = S::Uses; - type CreatedAt = S::CreatedAt; type Available = S::Available; - type ForAccount = 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 Code = S::Code; - type Disabled = S::Disabled; type Uses = S::Uses; - type CreatedAt = S::CreatedAt; - type Available = S::Available; - type ForAccount = S::ForAccount; - type CreatedBy = Set; + type Disabled = S::Disabled; + type CreatedBy = S::CreatedBy; + type ForAccount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `available` field + pub struct available(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `code` field pub struct code(()); - ///Marker type for the `disabled` field - pub struct disabled(()); ///Marker type for the `uses` field pub struct uses(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///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(()); ///Marker type for the `created_by` field pub struct created_by(()); + ///Marker type for the `for_account` field + pub struct for_account(()); } } @@ -359,13 +359,13 @@ where impl<'a, S> InviteCodeBuilder<'a, S> where S: invite_code_state::State, + S::Available: invite_code_state::IsSet, + S::CreatedAt: invite_code_state::IsSet, S::Code: invite_code_state::IsSet, - S::Disabled: invite_code_state::IsSet, S::Uses: invite_code_state::IsSet, - S::CreatedAt: invite_code_state::IsSet, - S::Available: invite_code_state::IsSet, - S::ForAccount: invite_code_state::IsSet, + S::Disabled: invite_code_state::IsSet, S::CreatedBy: invite_code_state::IsSet, + S::ForAccount: 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 UsedAt; type UsedBy; + type UsedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UsedAt = Unset; 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 UsedAt = Set; - type UsedBy = S::UsedBy; + 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 UsedAt = S::UsedAt; type UsedBy = Set; + type UsedAt = S::UsedAt; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `used_at` field - pub struct used_at(()); ///Marker type for the `used_by` field pub struct used_by(()); + ///Marker type for the `used_at` field + pub struct used_at(()); } } @@ -741,8 +741,8 @@ where impl<'a, S> InviteCodeUseBuilder<'a, S> where S: invite_code_use_state::State, - S::UsedAt: invite_code_use_state::IsSet, S::UsedBy: invite_code_use_state::IsSet, + S::UsedAt: 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 446c4cf..2e92c60 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,49 +36,49 @@ pub mod app_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Password; type Name; + type Password; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Password = Unset; type Name = Unset; + type Password = Unset; type CreatedAt = 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 Name = S::Name; - 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 Password = S::Password; type Name = Set; + type Password = S::Password; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `password` field to Set + pub struct SetPassword(PhantomData S>); + impl sealed::Sealed for SetPassword {} + impl State for SetPassword { + type Name = S::Name; + type Password = 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 = S::Password; type CreatedAt = 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 `name` field pub struct name(()); + ///Marker type for the `password` field + pub struct password(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -187,8 +187,8 @@ impl<'a, S: app_password_state::State> AppPasswordBuilder<'a, S> { impl<'a, S> AppPasswordBuilder<'a, S> where S: app_password_state::State, - S::Password: app_password_state::IsSet, S::Name: app_password_state::IsSet, + S::Password: app_password_state::IsSet, S::CreatedAt: app_password_state::IsSet, { /// Build the final struct 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 617d4ea..d046e27 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 @@ -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 2a365fe..ff3927b 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 Did; type Password; type Token; - 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 Password = Unset; type Token = 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 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; - type Did = S::Did; } ///State transition - sets the `token` field to Set pub struct SetToken(PhantomData S>); impl sealed::Sealed for SetToken {} impl State for SetToken { - type Password = S::Password; - type Token = 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 Password = S::Password; - type Token = S::Token; - type Did = Set; + type Token = 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 `password` field pub struct password(()); ///Marker type for the `token` field pub struct token(()); - ///Marker type for the `did` field - pub struct did(()); } } @@ -172,9 +172,9 @@ where impl<'a, S> DeleteAccountBuilder<'a, S> where S: delete_account_state::State, + S::Did: delete_account_state::IsSet, S::Password: delete_account_state::IsSet, S::Token: delete_account_state::IsSet, - S::Did: 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 19d72c4..edc9741 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 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(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetBlobBuilder<'a, S> where S: get_blob_state::State, - S::Cid: get_blob_state::IsSet, S::Did: get_blob_state::IsSet, + S::Cid: 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_blocks.rs b/crates/weaver-api/src/com_atproto/sync/get_blocks.rs index 4571bdb..6ff6d0a 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_blocks.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_blocks.rs @@ -32,37 +32,37 @@ pub mod get_blocks_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Cids; + 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 Cids = 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 Cids = S::Cids; + type Did = Unset; } ///State transition - sets the `cids` field to Set pub struct SetCids(PhantomData S>); impl sealed::Sealed for SetCids {} impl State for SetCids { - type Did = S::Did; type Cids = 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 Cids = S::Cids; + 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 `cids` field pub struct cids(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetBlocksBuilder<'a, S> where S: get_blocks_state::State, - S::Did: get_blocks_state::IsSet, S::Cids: get_blocks_state::IsSet, + S::Did: get_blocks_state::IsSet, { /// Build the final struct pub fn build(self) -> GetBlocks<'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 33c2825..b72791f 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 Rkey; type Collection; type Did; + type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rkey = Unset; type Collection = Unset; type Did = Unset; - } - ///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 Collection = S::Collection; - type Did = S::Did; + 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 Rkey = S::Rkey; type Collection = Set; type Did = S::Did; + type Rkey = S::Rkey; } ///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 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 Collection = S::Collection; + type Did = S::Did; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -181,9 +181,9 @@ where impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, - S::Rkey: get_record_state::IsSet, S::Collection: get_record_state::IsSet, S::Did: get_record_state::IsSet, + S::Rkey: get_record_state::IsSet, { /// Build the final struct pub fn build(self) -> GetRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/list_repos.rs b/crates/weaver-api/src/com_atproto/sync/list_repos.rs index fa5ad81..74421fb 100644 --- a/crates/weaver-api/src/com_atproto/sync/list_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/list_repos.rs @@ -195,50 +195,50 @@ pub mod repo_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Head; type Rev; + type Head; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Head = Unset; type Rev = Unset; + type Head = 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 Head = S::Head; - type Rev = S::Rev; - } - ///State transition - sets the `head` field to Set - pub struct SetHead(PhantomData S>); - impl sealed::Sealed for SetHead {} - impl State for SetHead { - type Did = S::Did; - type Head = Set; type Rev = S::Rev; + type Head = S::Head; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Did = S::Did; - type Head = S::Head; type Rev = Set; + type Head = S::Head; + } + ///State transition - sets the `head` field to Set + pub struct SetHead(PhantomData S>); + impl sealed::Sealed for SetHead {} + impl State for SetHead { + type Did = S::Did; + type Rev = S::Rev; + type Head = 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 `head` field - pub struct head(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `head` field + pub struct head(()); } } @@ -360,8 +360,8 @@ impl<'a, S> RepoBuilder<'a, S> where S: repo_state::State, S::Did: repo_state::IsSet, - S::Head: repo_state::IsSet, S::Rev: repo_state::IsSet, + S::Head: repo_state::IsSet, { /// Build the final struct pub fn build(self) -> Repo<'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 d2b496d..8891e75 100644 --- a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs @@ -42,8 +42,8 @@ pub mod account_state { pub trait State: sealed::Sealed { type Did; type Active; - type Seq; type Time; + type Seq; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -51,8 +51,8 @@ pub mod account_state { impl State for Empty { type Did = Unset; type Active = Unset; - type Seq = Unset; type Time = Unset; + type Seq = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); @@ -60,8 +60,8 @@ pub mod account_state { impl State for SetDid { type Did = Set; type Active = S::Active; - type Seq = S::Seq; type Time = S::Time; + type Seq = S::Seq; } ///State transition - sets the `active` field to Set pub struct SetActive(PhantomData S>); @@ -69,17 +69,8 @@ pub mod account_state { impl State for SetActive { type Did = S::Did; type Active = Set; - type Seq = S::Seq; - type Time = S::Time; - } - ///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 Active = S::Active; - type Seq = Set; type Time = S::Time; + type Seq = S::Seq; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); @@ -87,8 +78,17 @@ pub mod account_state { impl State for SetTime { type Did = S::Did; type Active = S::Active; - type Seq = S::Seq; type Time = Set; + type Seq = S::Seq; + } + ///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 Active = S::Active; + type Time = S::Time; + type Seq = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -97,10 +97,10 @@ pub mod account_state { pub struct did(()); ///Marker type for the `active` field pub struct active(()); - ///Marker type for the `seq` field - pub struct seq(()); ///Marker type for the `time` field pub struct time(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -229,8 +229,8 @@ where S: account_state::State, S::Did: account_state::IsSet, S::Active: account_state::IsSet, - S::Seq: account_state::IsSet, S::Time: account_state::IsSet, + S::Seq: account_state::IsSet, { /// Build the final struct pub fn build(self) -> Account<'a> { @@ -1073,205 +1073,205 @@ pub mod commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; + type TooBig; type Blobs; - type Blocks; + type Repo; + type Time; type Rev; type Commit; + type Blocks; type Ops; - type Repo; - type Time; type Rebase; - type TooBig; + type Seq; } /// 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 Blobs = Unset; - type Blocks = Unset; + type Repo = Unset; + type Time = Unset; type Rev = Unset; type Commit = Unset; + type Blocks = Unset; type Ops = Unset; - type Repo = Unset; - type Time = Unset; type Rebase = Unset; - type TooBig = Unset; + type Seq = 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; + ///State transition - sets the `too_big` field to Set + pub struct SetTooBig(PhantomData S>); + impl sealed::Sealed for SetTooBig {} + impl State for SetTooBig { + type TooBig = Set; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = S::Rev; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = S::Rebase; - type TooBig = S::TooBig; + type Seq = S::Seq; } ///State transition - sets the `blobs` field to Set pub struct SetBlobs(PhantomData S>); impl sealed::Sealed for SetBlobs {} impl State for SetBlobs { - type Seq = S::Seq; + type TooBig = S::TooBig; type Blobs = Set; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = S::Rev; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = S::Rebase; - 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 Seq = S::Seq; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type TooBig = S::TooBig; type Blobs = S::Blobs; - type Blocks = Set; + type Repo = Set; + type Time = S::Time; type Rev = S::Rev; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = S::Rebase; + type Seq = S::Seq; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { type TooBig = S::TooBig; + type Blobs = S::Blobs; + type Repo = S::Repo; + type Time = Set; + type Rev = S::Rev; + type Commit = S::Commit; + type Blocks = S::Blocks; + type Ops = S::Ops; + type Rebase = S::Rebase; + type Seq = S::Seq; } ///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 Blobs = S::Blobs; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = Set; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = S::Rebase; - type TooBig = S::TooBig; + type Seq = S::Seq; } ///State transition - sets the `commit` field to Set pub struct SetCommit(PhantomData S>); impl sealed::Sealed for SetCommit {} impl State for SetCommit { - type Seq = S::Seq; + type TooBig = S::TooBig; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = S::Rev; type Commit = Set; + type Blocks = S::Blocks; type Ops = S::Ops; + type Rebase = S::Rebase; + type Seq = S::Seq; + } + ///State transition - sets the `blocks` field to Set + pub struct SetBlocks(PhantomData S>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { + type TooBig = S::TooBig; + type Blobs = S::Blobs; type Repo = S::Repo; type Time = S::Time; + type Rev = S::Rev; + type Commit = S::Commit; + type Blocks = Set; + type Ops = S::Ops; type Rebase = S::Rebase; - type TooBig = S::TooBig; + type Seq = S::Seq; } ///State transition - sets the `ops` field to Set pub struct SetOps(PhantomData S>); impl sealed::Sealed for SetOps {} impl State for SetOps { - type Seq = S::Seq; + type TooBig = S::TooBig; type Blobs = S::Blobs; - type Blocks = S::Blocks; - type Rev = S::Rev; - type Commit = S::Commit; - type Ops = Set; type Repo = S::Repo; type Time = S::Time; - type Rebase = S::Rebase; - 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 Seq = S::Seq; - type Blobs = S::Blobs; - type Blocks = S::Blocks; type Rev = S::Rev; type Commit = S::Commit; - type Ops = S::Ops; - type Repo = Set; - type Time = S::Time; - type Rebase = S::Rebase; - type TooBig = S::TooBig; - } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Seq = S::Seq; - type Blobs = S::Blobs; type Blocks = S::Blocks; - type Rev = S::Rev; - type Commit = S::Commit; - type Ops = S::Ops; - type Repo = S::Repo; - type Time = Set; + type Ops = Set; type Rebase = S::Rebase; - type TooBig = S::TooBig; + type Seq = S::Seq; } ///State transition - sets the `rebase` field to Set pub struct SetRebase(PhantomData S>); impl sealed::Sealed for SetRebase {} impl State for SetRebase { - type Seq = S::Seq; + type TooBig = S::TooBig; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = S::Rev; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = 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 Seq = S::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type TooBig = S::TooBig; type Blobs = S::Blobs; - type Blocks = S::Blocks; + type Repo = S::Repo; + type Time = S::Time; type Rev = S::Rev; type Commit = S::Commit; + type Blocks = S::Blocks; type Ops = S::Ops; - type Repo = S::Repo; - type Time = S::Time; type Rebase = S::Rebase; - type TooBig = Set; + type Seq = 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 `blobs` field pub struct blobs(()); - ///Marker type for the `blocks` field - pub struct blocks(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `commit` field pub struct commit(()); + ///Marker type for the `blocks` field + pub struct blocks(()); ///Marker type for the `ops` field pub struct ops(()); - ///Marker type for the `repo` field - pub struct repo(()); - ///Marker type for the `time` field - pub struct time(()); ///Marker type for the `rebase` field pub struct rebase(()); - ///Marker type for the `too_big` field - pub struct too_big(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -1559,16 +1559,16 @@ where impl<'a, S> CommitBuilder<'a, S> where S: commit_state::State, - S::Seq: commit_state::IsSet, + S::TooBig: commit_state::IsSet, S::Blobs: commit_state::IsSet, - S::Blocks: commit_state::IsSet, + S::Repo: commit_state::IsSet, + S::Time: commit_state::IsSet, S::Rev: commit_state::IsSet, S::Commit: commit_state::IsSet, + S::Blocks: commit_state::IsSet, S::Ops: commit_state::IsSet, - S::Repo: commit_state::IsSet, - S::Time: commit_state::IsSet, S::Rebase: commit_state::IsSet, - S::TooBig: commit_state::IsSet, + S::Seq: commit_state::IsSet, { /// Build the final struct pub fn build(self) -> Commit<'a> { @@ -1677,51 +1677,51 @@ pub mod identity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Time; - type Did; type Seq; + type Did; + type Time; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Time = Unset; - type Did = Unset; type Seq = Unset; + type Did = Unset; + type Time = Unset; } - ///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; + ///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 Did = S::Did; - type Seq = S::Seq; + type Time = S::Time; } ///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 Did = Set; type Seq = S::Seq; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { + type Did = Set; 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 Seq = S::Seq; type Did = S::Did; - type Seq = Set; + type Time = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `time` field - pub struct time(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `seq` field pub struct seq(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `time` field + pub struct time(()); } } @@ -1834,9 +1834,9 @@ where impl<'a, S> IdentityBuilder<'a, S> where S: identity_state::State, - S::Time: identity_state::IsSet, - S::Did: identity_state::IsSet, S::Seq: identity_state::IsSet, + S::Did: identity_state::IsSet, + S::Time: identity_state::IsSet, { /// Build the final struct pub fn build(self) -> Identity<'a> { @@ -2257,37 +2257,37 @@ pub mod repo_op_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Action; type Path; + type Action; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Action = Unset; type Path = 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 Path = S::Path; + type Action = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Action = S::Action; type Path = 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 Path = S::Path; + type Action = 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 `path` field pub struct path(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -2400,8 +2400,8 @@ impl<'a, S: repo_op_state::State> RepoOpBuilder<'a, S> { impl<'a, S> RepoOpBuilder<'a, S> where S: repo_op_state::State, - S::Action: repo_op_state::IsSet, S::Path: repo_op_state::IsSet, + S::Action: repo_op_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoOp<'a> { @@ -2579,85 +2579,85 @@ pub mod sync_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; + type Blocks; type Did; - type Time; type Seq; - type Blocks; - type Rev; + type Time; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; + type Blocks = Unset; type Did = Unset; - type Time = Unset; type Seq = Unset; - type Blocks = Unset; - type Rev = Unset; + type Time = 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 Blocks = S::Blocks; + type Did = S::Did; + type Seq = S::Seq; + type Time = S::Time; + } + ///State transition - sets the `blocks` field to Set + pub struct SetBlocks(PhantomData S>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { + type Rev = S::Rev; + type Blocks = Set; + type Did = S::Did; + type Seq = S::Seq; + type Time = S::Time; } ///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 Blocks = S::Blocks; type Rev = S::Rev; - } - ///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 Blocks = S::Blocks; - type Rev = S::Rev; + type Did = Set; + type Seq = S::Seq; + type Time = S::Time; } ///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 Blocks = S::Blocks; type Rev = S::Rev; - } - ///State transition - sets the `blocks` field to Set - pub struct SetBlocks(PhantomData S>); - impl sealed::Sealed for SetBlocks {} - impl State for SetBlocks { + type Blocks = S::Blocks; type Did = S::Did; + type Seq = Set; type Time = S::Time; - type Seq = S::Seq; - type Blocks = 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 { + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Rev = S::Rev; + type Blocks = S::Blocks; type Did = S::Did; - type Time = S::Time; type Seq = S::Seq; - type Blocks = S::Blocks; - type Rev = Set; + type Time = 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 `blocks` field + pub struct blocks(()); ///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 `blocks` field - pub struct blocks(()); - ///Marker type for the `rev` field - pub struct rev(()); + ///Marker type for the `time` field + pub struct time(()); } } @@ -2790,11 +2790,11 @@ where impl<'a, S> SyncBuilder<'a, S> where S: sync_state::State, + S::Rev: sync_state::IsSet, + S::Blocks: sync_state::IsSet, S::Did: sync_state::IsSet, - S::Time: sync_state::IsSet, S::Seq: sync_state::IsSet, - S::Blocks: sync_state::IsSet, - S::Rev: sync_state::IsSet, + S::Time: sync_state::IsSet, { /// Build the final struct pub fn build(self) -> Sync<'a> { diff --git a/crates/weaver-api/src/com_deckbelcher/deck/list.rs b/crates/weaver-api/src/com_deckbelcher/deck/list.rs index 0801a8e..9cf7114 100644 --- a/crates/weaver-api/src/com_deckbelcher/deck/list.rs +++ b/crates/weaver-api/src/com_deckbelcher/deck/list.rs @@ -42,51 +42,51 @@ pub mod card_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Section; type ScryfallId; type Quantity; + type Section; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Section = Unset; type ScryfallId = Unset; type Quantity = Unset; - } - ///State transition - sets the `section` field to Set - pub struct SetSection(PhantomData S>); - impl sealed::Sealed for SetSection {} - impl State for SetSection { - type Section = Set; - type ScryfallId = S::ScryfallId; - type Quantity = S::Quantity; + type Section = Unset; } ///State transition - sets the `scryfall_id` field to Set pub struct SetScryfallId(PhantomData S>); impl sealed::Sealed for SetScryfallId {} impl State for SetScryfallId { - type Section = S::Section; type ScryfallId = Set; type Quantity = S::Quantity; + type Section = S::Section; } ///State transition - sets the `quantity` field to Set pub struct SetQuantity(PhantomData S>); impl sealed::Sealed for SetQuantity {} impl State for SetQuantity { - type Section = S::Section; type ScryfallId = S::ScryfallId; type Quantity = Set; + type Section = S::Section; + } + ///State transition - sets the `section` field to Set + pub struct SetSection(PhantomData S>); + impl sealed::Sealed for SetSection {} + impl State for SetSection { + type ScryfallId = S::ScryfallId; + type Quantity = S::Quantity; + type Section = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `section` field - pub struct section(()); ///Marker type for the `scryfall_id` field pub struct scryfall_id(()); ///Marker type for the `quantity` field pub struct quantity(()); + ///Marker type for the `section` field + pub struct section(()); } } @@ -199,9 +199,9 @@ impl<'a, S: card_state::State> CardBuilder<'a, S> { impl<'a, S> CardBuilder<'a, S> where S: card_state::State, - S::Section: card_state::IsSet, S::ScryfallId: card_state::IsSet, S::Quantity: card_state::IsSet, + S::Section: card_state::IsSet, { /// Build the final struct pub fn build(self) -> Card<'a> { @@ -704,51 +704,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cards; - type Name; type CreatedAt; + type Name; + type Cards; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cards = Unset; - type Name = Unset; type CreatedAt = Unset; + type Name = Unset; + type Cards = Unset; } - ///State transition - sets the `cards` field to Set - pub struct SetCards(PhantomData S>); - impl sealed::Sealed for SetCards {} - impl State for SetCards { - type Cards = 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 Name = S::Name; - type CreatedAt = S::CreatedAt; + type Cards = S::Cards; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Cards = S::Cards; - 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 Name = Set; type Cards = S::Cards; + } + ///State transition - sets the `cards` field to Set + pub struct SetCards(PhantomData S>); + impl sealed::Sealed for SetCards {} + impl State for SetCards { + type CreatedAt = S::CreatedAt; type Name = S::Name; - type CreatedAt = Set; + type Cards = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cards` field - pub struct cards(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `cards` field + pub struct cards(()); } } @@ -915,9 +915,9 @@ impl<'a, S: list_state::State> ListBuilder<'a, S> { impl<'a, S> ListBuilder<'a, S> where S: list_state::State, - S::Cards: list_state::IsSet, - S::Name: list_state::IsSet, S::CreatedAt: list_state::IsSet, + S::Name: list_state::IsSet, + S::Cards: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs b/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs index 0d5020f..6690150 100644 --- a/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs +++ b/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs @@ -585,37 +585,37 @@ pub mod facet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Features; type Index; + type Features; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Features = Unset; 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 Features = Set; - type Index = S::Index; + 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 Features = S::Features; type Index = Set; + type Features = S::Features; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `features` field - pub struct features(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `features` field + pub struct features(()); } } @@ -688,8 +688,8 @@ where impl<'a, S> FacetBuilder<'a, S> where S: facet_state::State, - S::Features: facet_state::IsSet, S::Index: facet_state::IsSet, + S::Features: facet_state::IsSet, { /// Build the final struct pub fn build(self) -> Facet<'a> { diff --git a/crates/weaver-api/src/com_deckbelcher/social/like.rs b/crates/weaver-api/src/com_deckbelcher/social/like.rs index 55cc9b0..72b761f 100644 --- a/crates/weaver-api/src/com_deckbelcher/social/like.rs +++ b/crates/weaver-api/src/com_deckbelcher/social/like.rs @@ -35,37 +35,37 @@ pub mod like_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(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, - S::Subject: like_state::IsSet, S::CreatedAt: like_state::IsSet, + S::Subject: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/com_whtwnd/blog.rs b/crates/weaver-api/src/com_whtwnd/blog.rs index 48f3179..722c65a 100644 --- a/crates/weaver-api/src/com_whtwnd/blog.rs +++ b/crates/weaver-api/src/com_whtwnd/blog.rs @@ -454,37 +454,37 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type EntryUri; + 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 EntryUri = 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 EntryUri = S::EntryUri; + type Content = Unset; } ///State transition - sets the `entry_uri` field to Set pub struct SetEntryUri(PhantomData S>); impl sealed::Sealed for SetEntryUri {} impl State for SetEntryUri { - type Content = S::Content; type EntryUri = 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 EntryUri = S::EntryUri; + 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 `entry_uri` field pub struct entry_uri(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -557,8 +557,8 @@ where impl<'a, S> CommentBuilder<'a, S> where S: comment_state::State, - S::Content: comment_state::IsSet, S::EntryUri: comment_state::IsSet, + S::Content: comment_state::IsSet, { /// Build the final struct pub fn build(self) -> Comment<'a> { diff --git a/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs b/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs index c6dc8df..7c49ac1 100644 --- a/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs +++ b/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs @@ -32,37 +32,37 @@ pub mod get_entry_metadata_by_name_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; type EntryTitle; + 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 EntryTitle = 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 EntryTitle = S::EntryTitle; + type Author = Unset; } ///State transition - sets the `entry_title` field to Set pub struct SetEntryTitle(PhantomData S>); impl sealed::Sealed for SetEntryTitle {} impl State for SetEntryTitle { - type Author = S::Author; type EntryTitle = 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 EntryTitle = S::EntryTitle; + 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 `entry_title` field pub struct entry_title(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -147,8 +147,8 @@ where impl<'a, S> GetEntryMetadataByNameBuilder<'a, S> where S: get_entry_metadata_by_name_state::State, - S::Author: get_entry_metadata_by_name_state::IsSet, S::EntryTitle: get_entry_metadata_by_name_state::IsSet, + S::Author: get_entry_metadata_by_name_state::IsSet, { /// Build the final struct pub fn build(self) -> GetEntryMetadataByName<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/blocks/button.rs b/crates/weaver-api/src/pub_leaflet/blocks/button.rs index b8513dd..6305544 100644 --- a/crates/weaver-api/src/pub_leaflet/blocks/button.rs +++ b/crates/weaver-api/src/pub_leaflet/blocks/button.rs @@ -33,37 +33,37 @@ pub mod button_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Text; + 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 Text = 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 Text = S::Text; + type Url = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData S>); impl sealed::Sealed for SetText {} impl State for SetText { - type Url = S::Url; type Text = Set; + 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 Text = S::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> ButtonBuilder<'a, S> where S: button_state::State, - S::Url: button_state::IsSet, S::Text: button_state::IsSet, + S::Url: button_state::IsSet, { /// Build the final struct pub fn build(self) -> Button<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/comment.rs b/crates/weaver-api/src/pub_leaflet/comment.rs index c24a62d..0e3ee34 100644 --- a/crates/weaver-api/src/pub_leaflet/comment.rs +++ b/crates/weaver-api/src/pub_leaflet/comment.rs @@ -443,51 +443,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Plaintext; 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 Plaintext = Unset; type Subject = 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 Plaintext = S::Plaintext; + type Subject = S::Subject; } ///State transition - sets the `plaintext` field to Set pub struct SetPlaintext(PhantomData S>); impl sealed::Sealed for SetPlaintext {} impl State for SetPlaintext { + type CreatedAt = S::CreatedAt; type Plaintext = 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 Plaintext = S::Plaintext; - 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 Plaintext = S::Plaintext; - type Subject = S::Subject; - type CreatedAt = Set; + type Subject = 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 `plaintext` field pub struct plaintext(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -657,9 +657,9 @@ where impl<'a, S> CommentBuilder<'a, S> where S: comment_state::State, + S::CreatedAt: comment_state::IsSet, S::Plaintext: comment_state::IsSet, S::Subject: comment_state::IsSet, - S::CreatedAt: comment_state::IsSet, { /// Build the final struct pub fn build(self) -> Comment<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/document.rs b/crates/weaver-api/src/pub_leaflet/document.rs index cf77d80..9a3eb94 100644 --- a/crates/weaver-api/src/pub_leaflet/document.rs +++ b/crates/weaver-api/src/pub_leaflet/document.rs @@ -55,51 +55,51 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Pages; type Author; + 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 Pages = Unset; type Author = 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 Pages = S::Pages; - type Author = S::Author; + type Title = Unset; } ///State transition - sets the `pages` field to Set pub struct SetPages(PhantomData S>); impl sealed::Sealed for SetPages {} impl State for SetPages { - type Title = S::Title; type Pages = Set; type Author = S::Author; + type Title = S::Title; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Title = S::Title; type Pages = S::Pages; type Author = 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 Pages = S::Pages; + type Author = S::Author; + 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 `pages` field pub struct pages(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -322,9 +322,9 @@ where impl<'a, S> DocumentBuilder<'a, S> where S: document_state::State, - S::Title: document_state::IsSet, S::Pages: document_state::IsSet, S::Author: document_state::IsSet, + S::Title: document_state::IsSet, { /// Build the final struct pub fn build(self) -> Document<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/pages/canvas.rs b/crates/weaver-api/src/pub_leaflet/pages/canvas.rs index 734fbce..83f5f62 100644 --- a/crates/weaver-api/src/pub_leaflet/pages/canvas.rs +++ b/crates/weaver-api/src/pub_leaflet/pages/canvas.rs @@ -39,67 +39,67 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type X; + type Block; type Width; type Y; - type Block; - type X; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type X = Unset; + type Block = Unset; type Width = Unset; type Y = Unset; - type Block = Unset; - type X = Unset; + } + ///State transition - sets the `x` field to Set + pub struct SetX(PhantomData S>); + impl sealed::Sealed for SetX {} + impl State for SetX { + type X = Set; + type Block = S::Block; + type Width = S::Width; + type Y = S::Y; + } + ///State transition - sets the `block` field to Set + pub struct SetBlock(PhantomData S>); + impl sealed::Sealed for SetBlock {} + impl State for SetBlock { + type X = S::X; + type Block = Set; + type Width = S::Width; + type Y = S::Y; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData S>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { + type X = S::X; + type Block = S::Block; type Width = Set; type Y = S::Y; - type Block = S::Block; - type X = S::X; } ///State transition - sets the `y` field to Set pub struct SetY(PhantomData S>); impl sealed::Sealed for SetY {} impl State for SetY { - type Width = S::Width; - type Y = Set; - type Block = S::Block; - type X = S::X; - } - ///State transition - sets the `block` field to Set - pub struct SetBlock(PhantomData S>); - impl sealed::Sealed for SetBlock {} - impl State for SetBlock { - type Width = S::Width; - type Y = S::Y; - type Block = Set; type X = S::X; - } - ///State transition - sets the `x` field to Set - pub struct SetX(PhantomData S>); - impl sealed::Sealed for SetX {} - impl State for SetX { - type Width = S::Width; - type Y = S::Y; type Block = S::Block; - type X = Set; + type Width = S::Width; + type Y = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `x` field + pub struct x(()); + ///Marker type for the `block` field + pub struct block(()); ///Marker type for the `width` field pub struct width(()); ///Marker type for the `y` field pub struct y(()); - ///Marker type for the `block` field - pub struct block(()); - ///Marker type for the `x` field - pub struct x(()); } } @@ -234,10 +234,10 @@ where impl<'a, S> BlockBuilder<'a, S> where S: block_state::State, + S::X: block_state::IsSet, + S::Block: block_state::IsSet, S::Width: block_state::IsSet, S::Y: block_state::IsSet, - S::Block: block_state::IsSet, - S::X: block_state::IsSet, { /// Build the final struct pub fn build(self) -> Block<'a> { @@ -764,37 +764,37 @@ pub mod position_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Block; type Offset; + type Block; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Block = Unset; type Offset = Unset; - } - ///State transition - sets the `block` field to Set - pub struct SetBlock(PhantomData S>); - impl sealed::Sealed for SetBlock {} - impl State for SetBlock { - type Block = Set; - type Offset = S::Offset; + type Block = Unset; } ///State transition - sets the `offset` field to Set pub struct SetOffset(PhantomData S>); impl sealed::Sealed for SetOffset {} impl State for SetOffset { - type Block = S::Block; type Offset = Set; + type Block = S::Block; + } + ///State transition - sets the `block` field to Set + pub struct SetBlock(PhantomData S>); + impl sealed::Sealed for SetBlock {} + impl State for SetBlock { + type Offset = S::Offset; + type Block = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `block` field - pub struct block(()); ///Marker type for the `offset` field pub struct offset(()); + ///Marker type for the `block` field + pub struct block(()); } } @@ -867,8 +867,8 @@ where impl<'a, S> PositionBuilder<'a, S> where S: position_state::State, - S::Block: position_state::IsSet, S::Offset: position_state::IsSet, + S::Block: position_state::IsSet, { /// Build the final struct pub fn build(self) -> Position<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/poll/vote.rs b/crates/weaver-api/src/pub_leaflet/poll/vote.rs index 9e9c9e4..0c9cf82 100644 --- a/crates/weaver-api/src/pub_leaflet/poll/vote.rs +++ b/crates/weaver-api/src/pub_leaflet/poll/vote.rs @@ -34,37 +34,37 @@ pub mod vote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Option; type Poll; + type Option; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Option = Unset; type Poll = Unset; - } - ///State transition - sets the `option` field to Set - pub struct SetOption(PhantomData S>); - impl sealed::Sealed for SetOption {} - impl State for SetOption { - type Option = Set; - type Poll = S::Poll; + type Option = Unset; } ///State transition - sets the `poll` field to Set pub struct SetPoll(PhantomData S>); impl sealed::Sealed for SetPoll {} impl State for SetPoll { - type Option = S::Option; type Poll = Set; + type Option = S::Option; + } + ///State transition - sets the `option` field to Set + pub struct SetOption(PhantomData S>); + impl sealed::Sealed for SetOption {} + impl State for SetOption { + type Poll = S::Poll; + type Option = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `option` field - pub struct option(()); ///Marker type for the `poll` field pub struct poll(()); + ///Marker type for the `option` field + pub struct option(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> VoteBuilder<'a, S> where S: vote_state::State, - S::Option: vote_state::IsSet, S::Poll: vote_state::IsSet, + S::Option: vote_state::IsSet, { /// Build the final struct pub fn build(self) -> Vote<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/richtext/facet.rs b/crates/weaver-api/src/pub_leaflet/richtext/facet.rs index 488179a..6e7f9e5 100644 --- a/crates/weaver-api/src/pub_leaflet/richtext/facet.rs +++ b/crates/weaver-api/src/pub_leaflet/richtext/facet.rs @@ -556,37 +556,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(()); } } @@ -656,8 +656,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> { diff --git a/crates/weaver-api/src/pub_leaflet/theme/color.rs b/crates/weaver-api/src/pub_leaflet/theme/color.rs index 5a4de7a..f4cb3b6 100644 --- a/crates/weaver-api/src/pub_leaflet/theme/color.rs +++ b/crates/weaver-api/src/pub_leaflet/theme/color.rs @@ -32,51 +32,51 @@ pub mod rgb_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type R; type G; type B; - type R; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type R = Unset; type G = Unset; type B = Unset; - type R = Unset; + } + ///State transition - sets the `r` field to Set + pub struct SetR(PhantomData S>); + impl sealed::Sealed for SetR {} + impl State for SetR { + type R = Set; + type G = S::G; + type B = S::B; } ///State transition - sets the `g` field to Set pub struct SetG(PhantomData S>); impl sealed::Sealed for SetG {} impl State for SetG { + type R = S::R; type G = Set; type B = S::B; - type R = S::R; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData S>); impl sealed::Sealed for SetB {} impl State for SetB { - type G = S::G; - type B = Set; type R = S::R; - } - ///State transition - sets the `r` field to Set - pub struct SetR(PhantomData S>); - impl sealed::Sealed for SetR {} - impl State for SetR { type G = S::G; - type B = S::B; - type R = Set; + type B = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `r` field + pub struct r(()); ///Marker type for the `g` field pub struct g(()); ///Marker type for the `b` field pub struct b(()); - ///Marker type for the `r` field - pub struct r(()); } } @@ -160,9 +160,9 @@ where impl<'a, S> RgbBuilder<'a, S> where S: rgb_state::State, + S::R: rgb_state::IsSet, S::G: rgb_state::IsSet, S::B: rgb_state::IsSet, - S::R: rgb_state::IsSet, { /// Build the final struct pub fn build(self) -> Rgb<'a> { @@ -439,8 +439,8 @@ pub mod rgba_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type R; - type B; type A; + type B; type G; } /// Empty state - all required fields are unset @@ -448,8 +448,8 @@ pub mod rgba_state { impl sealed::Sealed for Empty {} impl State for Empty { type R = Unset; - type B = Unset; type A = Unset; + type B = Unset; type G = Unset; } ///State transition - sets the `r` field to Set @@ -457,17 +457,8 @@ pub mod rgba_state { impl sealed::Sealed for SetR {} impl State for SetR { type R = Set; - type B = S::B; - type A = S::A; - type G = S::G; - } - ///State transition - sets the `b` field to Set - pub struct SetB(PhantomData S>); - impl sealed::Sealed for SetB {} - impl State for SetB { - type R = S::R; - type B = Set; type A = S::A; + type B = S::B; type G = S::G; } ///State transition - sets the `a` field to Set @@ -475,8 +466,17 @@ pub mod rgba_state { impl sealed::Sealed for SetA {} impl State for SetA { type R = S::R; - type B = S::B; type A = Set; + type B = S::B; + type G = S::G; + } + ///State transition - sets the `b` field to Set + pub struct SetB(PhantomData S>); + impl sealed::Sealed for SetB {} + impl State for SetB { + type R = S::R; + type A = S::A; + type B = Set; type G = S::G; } ///State transition - sets the `g` field to Set @@ -484,8 +484,8 @@ pub mod rgba_state { impl sealed::Sealed for SetG {} impl State for SetG { type R = S::R; - type B = S::B; type A = S::A; + type B = S::B; type G = Set; } /// Marker types for field names @@ -493,10 +493,10 @@ pub mod rgba_state { pub mod members { ///Marker type for the `r` field pub struct r(()); - ///Marker type for the `b` field - pub struct b(()); ///Marker type for the `a` field pub struct a(()); + ///Marker type for the `b` field + pub struct b(()); ///Marker type for the `g` field pub struct g(()); } @@ -600,8 +600,8 @@ impl<'a, S> RgbaBuilder<'a, S> where S: rgba_state::State, S::R: rgba_state::IsSet, - S::B: rgba_state::IsSet, S::A: rgba_state::IsSet, + S::B: rgba_state::IsSet, S::G: rgba_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/actor.rs b/crates/weaver-api/src/sh_weaver/actor.rs index 478dff9..d205f80 100644 --- a/crates/weaver-api/src/sh_weaver/actor.rs +++ b/crates/weaver-api/src/sh_weaver/actor.rs @@ -1979,37 +1979,37 @@ pub mod profile_view_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(()); } } @@ -2388,8 +2388,8 @@ impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, - S::Handle: profile_view_state::IsSet, S::Did: profile_view_state::IsSet, + S::Handle: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { @@ -3167,50 +3167,50 @@ pub mod tangled_profile_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Bluesky; type Handle; + type Bluesky; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Bluesky = Unset; type Handle = Unset; + type Bluesky = 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 Bluesky = S::Bluesky; - type Handle = S::Handle; - } - ///State transition - sets the `bluesky` field to Set - pub struct SetBluesky(PhantomData S>); - impl sealed::Sealed for SetBluesky {} - impl State for SetBluesky { - type Did = S::Did; - type Bluesky = Set; type Handle = S::Handle; + type Bluesky = S::Bluesky; } ///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 Bluesky = S::Bluesky; type Handle = Set; + type Bluesky = S::Bluesky; + } + ///State transition - sets the `bluesky` field to Set + pub struct SetBluesky(PhantomData S>); + impl sealed::Sealed for SetBluesky {} + impl State for SetBluesky { + type Did = S::Did; + type Handle = S::Handle; + type Bluesky = 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 `bluesky` field - pub struct bluesky(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `bluesky` field + pub struct bluesky(()); } } @@ -3401,8 +3401,8 @@ impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, S::Did: tangled_profile_view_state::IsSet, - S::Bluesky: tangled_profile_view_state::IsSet, S::Handle: tangled_profile_view_state::IsSet, + S::Bluesky: tangled_profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TangledProfileView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab.rs b/crates/weaver-api/src/sh_weaver/collab.rs index d2bf017..d3f0405 100644 --- a/crates/weaver-api/src/sh_weaver/collab.rs +++ b/crates/weaver-api/src/sh_weaver/collab.rs @@ -1610,65 +1610,65 @@ pub mod former_collaborator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type EndReason; type WasActiveFrom; type WasActiveUntil; - type EndReason; type User; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type EndReason = Unset; type WasActiveFrom = Unset; type WasActiveUntil = Unset; - type EndReason = Unset; type User = Unset; } + ///State transition - sets the `end_reason` field to Set + pub struct SetEndReason(PhantomData S>); + impl sealed::Sealed for SetEndReason {} + impl State for SetEndReason { + type EndReason = Set; + type WasActiveFrom = S::WasActiveFrom; + type WasActiveUntil = S::WasActiveUntil; + type User = S::User; + } ///State transition - sets the `was_active_from` field to Set pub struct SetWasActiveFrom(PhantomData S>); impl sealed::Sealed for SetWasActiveFrom {} impl State for SetWasActiveFrom { + type EndReason = S::EndReason; type WasActiveFrom = Set; type WasActiveUntil = S::WasActiveUntil; - type EndReason = S::EndReason; type User = S::User; } ///State transition - sets the `was_active_until` field to Set pub struct SetWasActiveUntil(PhantomData S>); impl sealed::Sealed for SetWasActiveUntil {} impl State for SetWasActiveUntil { - type WasActiveFrom = S::WasActiveFrom; - type WasActiveUntil = Set; type EndReason = S::EndReason; - type User = S::User; - } - ///State transition - sets the `end_reason` field to Set - pub struct SetEndReason(PhantomData S>); - impl sealed::Sealed for SetEndReason {} - impl State for SetEndReason { type WasActiveFrom = S::WasActiveFrom; - type WasActiveUntil = S::WasActiveUntil; - type EndReason = Set; + type WasActiveUntil = Set; type User = S::User; } ///State transition - sets the `user` field to Set pub struct SetUser(PhantomData S>); impl sealed::Sealed for SetUser {} impl State for SetUser { + type EndReason = S::EndReason; type WasActiveFrom = S::WasActiveFrom; type WasActiveUntil = S::WasActiveUntil; - type EndReason = S::EndReason; type User = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `end_reason` field + pub struct end_reason(()); ///Marker type for the `was_active_from` field pub struct was_active_from(()); ///Marker type for the `was_active_until` field pub struct was_active_until(()); - ///Marker type for the `end_reason` field - pub struct end_reason(()); ///Marker type for the `user` field pub struct user(()); } @@ -1843,9 +1843,9 @@ where impl<'a, S> FormerCollaboratorViewBuilder<'a, S> where S: former_collaborator_view_state::State, + S::EndReason: former_collaborator_view_state::IsSet, S::WasActiveFrom: former_collaborator_view_state::IsSet, S::WasActiveUntil: former_collaborator_view_state::IsSet, - S::EndReason: former_collaborator_view_state::IsSet, S::User: former_collaborator_view_state::IsSet, { /// Build the final struct @@ -2061,127 +2061,127 @@ pub mod invite_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Inviter; - type CreatedAt; - type Status; - type Cid; type Resource; type Invitee; + type Cid; + type CreatedAt; + type Status; + type Uri; + type Inviter; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Inviter = Unset; - type CreatedAt = Unset; - type Status = Unset; - type Cid = Unset; type Resource = Unset; type Invitee = Unset; + type Cid = Unset; + type CreatedAt = Unset; + type Status = Unset; + type Uri = Unset; + type Inviter = 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 Inviter = S::Inviter; + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData S>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type Resource = Set; + type Invitee = S::Invitee; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; - type Resource = S::Resource; - type Invitee = S::Invitee; - } - ///State transition - sets the `inviter` field to Set - pub struct SetInviter(PhantomData S>); - impl sealed::Sealed for SetInviter {} - impl State for SetInviter { type Uri = S::Uri; - type Inviter = Set; + type Inviter = S::Inviter; + } + ///State transition - sets the `invitee` field to Set + pub struct SetInvitee(PhantomData S>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Resource = S::Resource; + type Invitee = Set; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; + type Uri = S::Uri; + type Inviter = S::Inviter; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Resource = S::Resource; type Invitee = S::Invitee; + type Cid = Set; + type CreatedAt = S::CreatedAt; + type Status = S::Status; + type Uri = S::Uri; + type Inviter = S::Inviter; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = S::Uri; - type Inviter = S::Inviter; - type CreatedAt = Set; - type Status = S::Status; - type Cid = S::Cid; type Resource = S::Resource; type Invitee = S::Invitee; + type Cid = S::Cid; + type CreatedAt = Set; + type Status = S::Status; + type Uri = S::Uri; + type Inviter = S::Inviter; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Uri = S::Uri; - type Inviter = S::Inviter; - type CreatedAt = S::CreatedAt; - type Status = Set; - type Cid = S::Cid; type Resource = S::Resource; type Invitee = S::Invitee; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Cid = S::Cid; + type CreatedAt = S::CreatedAt; + type Status = Set; type Uri = S::Uri; type Inviter = S::Inviter; - type CreatedAt = S::CreatedAt; - type Status = S::Status; - type Cid = Set; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { 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 Uri = S::Uri; - type Inviter = S::Inviter; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; - type Resource = 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 Uri = S::Uri; + type Uri = Set; type Inviter = S::Inviter; + } + ///State transition - sets the `inviter` field to Set + pub struct SetInviter(PhantomData S>); + impl sealed::Sealed for SetInviter {} + impl State for SetInviter { + type Resource = S::Resource; + type Invitee = S::Invitee; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; - type Resource = S::Resource; - type Invitee = Set; + type Uri = S::Uri; + type Inviter = 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 `inviter` field - pub struct inviter(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `resource` field pub struct resource(()); ///Marker type for the `invitee` field pub struct invitee(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `status` field + pub struct status(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `inviter` field + pub struct inviter(()); } } @@ -2479,13 +2479,13 @@ where impl<'a, S> InviteViewBuilder<'a, S> where S: invite_view_state::State, - S::Uri: invite_view_state::IsSet, - S::Inviter: invite_view_state::IsSet, - S::CreatedAt: invite_view_state::IsSet, - S::Status: invite_view_state::IsSet, - S::Cid: invite_view_state::IsSet, S::Resource: invite_view_state::IsSet, S::Invitee: invite_view_state::IsSet, + S::Cid: invite_view_state::IsSet, + S::CreatedAt: invite_view_state::IsSet, + S::Status: invite_view_state::IsSet, + S::Uri: invite_view_state::IsSet, + S::Inviter: invite_view_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteView<'a> { @@ -2821,51 +2821,51 @@ pub mod participant_state_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type User; type Role; type Status; + type User; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type User = Unset; type Role = Unset; type Status = Unset; - } - ///State transition - sets the `user` field to Set - pub struct SetUser(PhantomData S>); - impl sealed::Sealed for SetUser {} - impl State for SetUser { - type User = Set; - type Role = S::Role; - type Status = S::Status; + type User = Unset; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData S>); impl sealed::Sealed for SetRole {} impl State for SetRole { - type User = S::User; type Role = Set; type Status = S::Status; + type User = S::User; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type User = S::User; type Role = S::Role; type Status = Set; + type User = S::User; + } + ///State transition - sets the `user` field to Set + pub struct SetUser(PhantomData S>); + impl sealed::Sealed for SetUser {} + impl State for SetUser { + type Role = S::Role; + type Status = S::Status; + type User = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user` field - pub struct user(()); ///Marker type for the `role` field pub struct role(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `user` field + pub struct user(()); } } @@ -3127,9 +3127,9 @@ impl<'a, S: participant_state_view_state::State> ParticipantStateViewBuilder<'a, impl<'a, S> ParticipantStateViewBuilder<'a, S> where S: participant_state_view_state::State, - S::User: participant_state_view_state::IsSet, S::Role: participant_state_view_state::IsSet, S::Status: participant_state_view_state::IsSet, + S::User: participant_state_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ParticipantStateView<'a> { @@ -3543,85 +3543,85 @@ pub mod session_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type User; - type CreatedAt; - type NodeId; type Resource; type Uri; + type CreatedAt; + type NodeId; + type User; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type User = Unset; - type CreatedAt = Unset; - type NodeId = Unset; type Resource = Unset; type Uri = Unset; + type CreatedAt = Unset; + type NodeId = Unset; + type User = Unset; } - ///State transition - sets the `user` field to Set - pub struct SetUser(PhantomData S>); - impl sealed::Sealed for SetUser {} - impl State for SetUser { - type User = Set; + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData S>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type Resource = Set; + type Uri = S::Uri; type CreatedAt = S::CreatedAt; type NodeId = S::NodeId; + type User = S::User; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Resource = S::Resource; - type Uri = S::Uri; + type Uri = Set; + type CreatedAt = S::CreatedAt; + type NodeId = S::NodeId; + type User = S::User; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type User = S::User; - type CreatedAt = Set; - type NodeId = S::NodeId; type Resource = S::Resource; type Uri = S::Uri; + type CreatedAt = Set; + type NodeId = S::NodeId; + type User = S::User; } ///State transition - sets the `node_id` field to Set pub struct SetNodeId(PhantomData S>); impl sealed::Sealed for SetNodeId {} impl State for SetNodeId { - type User = S::User; - type CreatedAt = S::CreatedAt; - type NodeId = Set; type Resource = S::Resource; type Uri = S::Uri; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData S>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { - type User = S::User; type CreatedAt = S::CreatedAt; - type NodeId = S::NodeId; - type Resource = 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 NodeId = Set; type User = S::User; + } + ///State transition - sets the `user` field to Set + pub struct SetUser(PhantomData S>); + impl sealed::Sealed for SetUser {} + impl State for SetUser { + type Resource = S::Resource; + type Uri = S::Uri; type CreatedAt = S::CreatedAt; type NodeId = S::NodeId; - type Resource = S::Resource; - type Uri = Set; + type User = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user` field - pub struct user(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `node_id` field - pub struct node_id(()); ///Marker type for the `resource` field pub struct resource(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `node_id` field + pub struct node_id(()); + ///Marker type for the `user` field + pub struct user(()); } } @@ -3794,11 +3794,11 @@ where impl<'a, S> SessionViewBuilder<'a, S> where S: session_view_state::State, - S::User: session_view_state::IsSet, - S::CreatedAt: session_view_state::IsSet, - S::NodeId: session_view_state::IsSet, S::Resource: session_view_state::IsSet, S::Uri: session_view_state::IsSet, + S::CreatedAt: session_view_state::IsSet, + S::NodeId: session_view_state::IsSet, + S::User: session_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SessionView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab/accept.rs b/crates/weaver-api/src/sh_weaver/collab/accept.rs index 34260eb..f792abd 100644 --- a/crates/weaver-api/src/sh_weaver/collab/accept.rs +++ b/crates/weaver-api/src/sh_weaver/collab/accept.rs @@ -37,51 +37,51 @@ pub mod accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Invite; type Resource; type CreatedAt; - type Invite; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Invite = Unset; type Resource = Unset; type CreatedAt = Unset; - type Invite = Unset; + } + ///State transition - sets the `invite` field to Set + pub struct SetInvite(PhantomData S>); + impl sealed::Sealed for SetInvite {} + impl State for SetInvite { + type Invite = Set; + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { + type Invite = S::Invite; type Resource = Set; type CreatedAt = S::CreatedAt; - type Invite = S::Invite; } ///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 Invite = S::Invite; - } - ///State transition - sets the `invite` field to Set - pub struct SetInvite(PhantomData S>); - impl sealed::Sealed for SetInvite {} - impl State for SetInvite { type Resource = S::Resource; - type CreatedAt = S::CreatedAt; - type Invite = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `invite` field + pub struct invite(()); ///Marker type for the `resource` field pub struct resource(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `invite` field - pub struct invite(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> AcceptBuilder<'a, S> where S: accept_state::State, + S::Invite: accept_state::IsSet, S::Resource: accept_state::IsSet, S::CreatedAt: accept_state::IsSet, - S::Invite: accept_state::IsSet, { /// Build the final struct pub fn build(self) -> Accept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab/invite.rs b/crates/weaver-api/src/sh_weaver/collab/invite.rs index 087eb79..e0cdd18 100644 --- a/crates/weaver-api/src/sh_weaver/collab/invite.rs +++ b/crates/weaver-api/src/sh_weaver/collab/invite.rs @@ -140,49 +140,49 @@ pub mod invite_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Invitee; + type CreatedAt; type Resource; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Invitee = Unset; + type CreatedAt = Unset; type Resource = 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 Invitee = S::Invitee; - type Resource = S::Resource; - } ///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 Invitee = Set; + type CreatedAt = S::CreatedAt; + type Resource = S::Resource; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Invitee = S::Invitee; + type CreatedAt = Set; type Resource = S::Resource; } ///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 Invitee = S::Invitee; + type CreatedAt = S::CreatedAt; type Resource = 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 `invitee` field pub struct invitee(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `resource` field pub struct resource(()); } @@ -334,8 +334,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::Invitee: invite_state::IsSet, + S::CreatedAt: invite_state::IsSet, S::Resource: 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 index c0ffe28..6b839d6 100644 --- a/crates/weaver-api/src/sh_weaver/collab/session.rs +++ b/crates/weaver-api/src/sh_weaver/collab/session.rs @@ -44,49 +44,49 @@ pub mod session_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type NodeId; type CreatedAt; + type NodeId; type Resource; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type NodeId = Unset; type CreatedAt = Unset; + type NodeId = Unset; type Resource = Unset; } - ///State transition - sets the `node_id` field to Set - pub struct SetNodeId(PhantomData S>); - impl sealed::Sealed for SetNodeId {} - impl State for SetNodeId { - type NodeId = Set; - type CreatedAt = S::CreatedAt; - type Resource = S::Resource; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type NodeId = S::NodeId; type CreatedAt = Set; + type NodeId = S::NodeId; + type Resource = S::Resource; + } + ///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 NodeId = Set; type Resource = S::Resource; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type NodeId = S::NodeId; type CreatedAt = S::CreatedAt; + type NodeId = S::NodeId; type Resource = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `node_id` field - pub struct node_id(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `node_id` field + pub struct node_id(()); ///Marker type for the `resource` field pub struct resource(()); } @@ -221,8 +221,8 @@ where impl<'a, S> SessionBuilder<'a, S> where S: session_state::State, - S::NodeId: session_state::IsSet, S::CreatedAt: session_state::IsSet, + S::NodeId: session_state::IsSet, S::Resource: session_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/edit.rs b/crates/weaver-api/src/sh_weaver/edit.rs index 784cedb..edef340 100644 --- a/crates/weaver-api/src/sh_weaver/edit.rs +++ b/crates/weaver-api/src/sh_weaver/edit.rs @@ -1053,8 +1053,8 @@ pub mod edit_history_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; type Author; type CreatedAt; type Type; @@ -1063,28 +1063,28 @@ pub mod edit_history_entry_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; + type Uri = Unset; type Author = Unset; type CreatedAt = Unset; type Type = 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 Author = S::Author; - type CreatedAt = S::CreatedAt; - type Type = S::Type; - } ///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; + type Author = S::Author; + type CreatedAt = S::CreatedAt; + type Type = S::Type; + } + ///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 Author = S::Author; type CreatedAt = S::CreatedAt; type Type = S::Type; @@ -1093,8 +1093,8 @@ pub mod edit_history_entry_state { pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = S::Uri; type Cid = S::Cid; + type Uri = S::Uri; type Author = Set; type CreatedAt = S::CreatedAt; type Type = S::Type; @@ -1103,8 +1103,8 @@ pub mod edit_history_entry_state { pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = S::Uri; type Cid = S::Cid; + type Uri = S::Uri; type Author = S::Author; type CreatedAt = Set; type Type = S::Type; @@ -1113,8 +1113,8 @@ pub mod edit_history_entry_state { pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { - type Uri = S::Uri; type Cid = S::Cid; + type Uri = S::Uri; type Author = S::Author; type CreatedAt = S::CreatedAt; type Type = Set; @@ -1122,10 +1122,10 @@ pub mod edit_history_entry_state { /// 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(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `created_at` field @@ -1348,8 +1348,8 @@ where impl<'a, S> EditHistoryEntryBuilder<'a, S> where S: edit_history_entry_state::State, - S::Uri: edit_history_entry_state::IsSet, S::Cid: edit_history_entry_state::IsSet, + S::Uri: edit_history_entry_state::IsSet, S::Author: edit_history_entry_state::IsSet, S::CreatedAt: edit_history_entry_state::IsSet, S::Type: edit_history_entry_state::IsSet, diff --git a/crates/weaver-api/src/sh_weaver/edit/cursor.rs b/crates/weaver-api/src/sh_weaver/edit/cursor.rs index aaa0b8a..9f8bf7d 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> { @@ -1018,50 +1018,50 @@ 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; } /// 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; } ///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; - type Peer = S::Peer; - type ContainerType = S::ContainerType; - } - ///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; + type Peer = S::Peer; } ///State transition - sets the `container_type` field to Set pub struct SetContainerType(PhantomData S>); impl sealed::Sealed for SetContainerType {} impl State for SetContainerType { type Counter = S::Counter; - type Peer = S::Peer; type ContainerType = 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 ContainerType = S::ContainerType; + type Peer = 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(()); } } @@ -1155,8 +1155,8 @@ 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, { /// 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 062858f..149c305 100644 --- a/crates/weaver-api/src/sh_weaver/edit/diff.rs +++ b/crates/weaver-api/src/sh_weaver/edit/diff.rs @@ -47,37 +47,37 @@ pub mod diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Root; type Doc; + 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 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 Root = Set; - type Doc = S::Doc; + 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 Root = S::Root; type Doc = 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 Doc = S::Doc; + 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 `doc` field pub struct doc(()); + ///Marker type for the `root` field + pub struct root(()); } } @@ -224,8 +224,8 @@ impl<'a, S: diff_state::State> DiffBuilder<'a, S> { impl<'a, S> DiffBuilder<'a, S> where S: diff_state::State, - S::Root: diff_state::IsSet, S::Doc: diff_state::IsSet, + S::Root: diff_state::IsSet, { /// Build the final struct pub fn build(self) -> Diff<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed.rs b/crates/weaver-api/src/sh_weaver/embed.rs index 7c9dccc..779675e 100644 --- a/crates/weaver-api/src/sh_weaver/embed.rs +++ b/crates/weaver-api/src/sh_weaver/embed.rs @@ -312,37 +312,37 @@ pub mod pixel_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(()); } } @@ -412,8 +412,8 @@ where impl<'a, S> PixelSizeBuilder<'a, S> where S: pixel_size_state::State, - S::Width: pixel_size_state::IsSet, S::Height: pixel_size_state::IsSet, + S::Width: 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 7f6ef3b..6c4cbf2 100644 --- a/crates/weaver-api/src/sh_weaver/embed/external.rs +++ b/crates/weaver-api/src/sh_weaver/embed/external.rs @@ -38,51 +38,51 @@ pub mod external_embed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Description; type Title; type Uri; - 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 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; + type Title = S::Title; + type Uri = S::Uri; } ///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; - type Description = S::Description; } ///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 Uri = 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 Title = S::Title; - type Uri = S::Uri; - type Description = Set; + type Uri = 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 `description` field - pub struct description(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, + S::Description: external_embed_state::IsSet, S::Title: external_embed_state::IsSet, S::Uri: external_embed_state::IsSet, - S::Description: external_embed_state::IsSet, { /// Build the final struct pub fn build(self) -> ExternalEmbed<'a> { @@ -817,51 +817,51 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; - 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 Title = Unset; - type Description = Unset; type Uri = Unset; + type Description = Unset; + type Title = 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; + ///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 Uri = S::Uri; + 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 Title = S::Title; - type Description = 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 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 Uri = S::Uri; type Description = S::Description; - type Uri = Set; + 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 `description` field + pub struct description(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -974,9 +974,9 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Title: view_external_state::IsSet, - S::Description: view_external_state::IsSet, S::Uri: view_external_state::IsSet, + S::Description: view_external_state::IsSet, + S::Title: 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 5ef0d9a..61cd63a 100644 --- a/crates/weaver-api/src/sh_weaver/embed/images.rs +++ b/crates/weaver-api/src/sh_weaver/embed/images.rs @@ -902,51 +902,51 @@ 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 Alt; } /// 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 Alt = 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 Alt = S::Alt; } ///State transition - sets the `fullsize` field to Set pub struct SetFullsize(PhantomData S>); impl sealed::Sealed for SetFullsize {} impl State for SetFullsize { - type Thumb = S::Thumb; - type Fullsize = 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 Thumb = S::Thumb; - type Fullsize = S::Fullsize; - type Alt = Set; + type Fullsize = 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 `alt` field - pub struct alt(()); } } @@ -1073,9 +1073,9 @@ where 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::Alt: view_image_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewImage<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs b/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs index a622740..297864a 100644 --- a/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs +++ b/crates/weaver-api/src/sh_weaver/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 Media; type Records; + type Media; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Media = Unset; type Records = Unset; - } - ///State transition - sets the `media` field to Set - pub struct SetMedia(PhantomData S>); - impl sealed::Sealed for SetMedia {} - impl State for SetMedia { - type Media = Set; - type Records = S::Records; + type Media = Unset; } ///State transition - sets the `records` field to Set pub struct SetRecords(PhantomData S>); impl sealed::Sealed for SetRecords {} impl State for SetRecords { - type Media = S::Media; type Records = Set; + type Media = S::Media; + } + ///State transition - sets the `media` field to Set + pub struct SetMedia(PhantomData S>); + impl sealed::Sealed for SetMedia {} + impl State for SetMedia { + type Records = S::Records; + type Media = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `media` field - pub struct media(()); ///Marker type for the `records` field pub struct records(()); + ///Marker type for the `media` field + pub struct media(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RecordWithMediaBuilder<'a, S> where S: record_with_media_state::State, - S::Media: record_with_media_state::IsSet, S::Records: record_with_media_state::IsSet, + S::Media: record_with_media_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordWithMedia<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/records.rs b/crates/weaver-api/src/sh_weaver/embed/records.rs index dc3df86..c1bea74 100644 --- a/crates/weaver-api/src/sh_weaver/embed/records.rs +++ b/crates/weaver-api/src/sh_weaver/embed/records.rs @@ -1188,50 +1188,50 @@ pub mod view_blocked_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Author; - type Blocked; type Uri; + type Blocked; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Author = Unset; - type Blocked = 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 Blocked = S::Blocked; - type Uri = S::Uri; - } - ///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 Blocked = 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 Blocked = S::Blocked; 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 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 `author` field pub struct author(()); - ///Marker type for the `blocked` field - pub struct blocked(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `blocked` field + pub struct blocked(()); } } @@ -1325,8 +1325,8 @@ impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, S::Author: view_blocked_state::IsSet, - S::Blocked: view_blocked_state::IsSet, S::Uri: view_blocked_state::IsSet, + S::Blocked: view_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewBlocked<'a> { @@ -1770,84 +1770,84 @@ pub mod view_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; - type Value; - type IndexedAt; type Uri; + type Value; type Author; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; - type Value = Unset; - type IndexedAt = Unset; type Uri = Unset; + type Value = Unset; type Author = Unset; + type IndexedAt = 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 Value = S::Value; - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Author = S::Author; - } - ///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 Value = Set; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Author = S::Author; - } - ///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 Value = S::Value; - type IndexedAt = Set; - type Uri = S::Uri; type Author = S::Author; + 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 Uri = Set; type Value = S::Value; + type Author = S::Author; type IndexedAt = S::IndexedAt; - type Uri = Set; + } + ///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 Uri = S::Uri; + type Value = Set; type Author = S::Author; + type IndexedAt = S::IndexedAt; } ///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 Uri = S::Uri; type Value = S::Value; + type Author = 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 Uri = S::Uri; - type Author = Set; + type Value = S::Value; + type Author = S::Author; + type IndexedAt = 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 `value` field - pub struct value(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); + ///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(()); } } @@ -2093,10 +2093,10 @@ impl<'a, S> ViewRecordBuilder<'a, S> where S: view_record_state::State, S::Cid: view_record_state::IsSet, - S::Value: view_record_state::IsSet, - S::IndexedAt: view_record_state::IsSet, S::Uri: view_record_state::IsSet, + S::Value: view_record_state::IsSet, S::Author: view_record_state::IsSet, + S::IndexedAt: 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 ca20c77..99229fd 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.rs b/crates/weaver-api/src/sh_weaver/graph.rs index 34ef11f..e53ae93 100644 --- a/crates/weaver-api/src/sh_weaver/graph.rs +++ b/crates/weaver-api/src/sh_weaver/graph.rs @@ -59,37 +59,37 @@ pub mod community_tag_count_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Count; type Tag; + 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 Tag = 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; - type Tag = S::Tag; + type Count = Unset; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData S>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type Count = S::Count; type Tag = 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 Tag = S::Tag; + 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 `tag` field pub struct tag(()); + ///Marker type for the `count` field + pub struct count(()); } } @@ -162,8 +162,8 @@ where impl<'a, S> CommunityTagCountBuilder<'a, S> where S: community_tag_count_state::State, - S::Count: community_tag_count_state::IsSet, S::Tag: community_tag_count_state::IsSet, + S::Count: community_tag_count_state::IsSet, { /// Build the final struct pub fn build(self) -> CommunityTagCount<'a> { @@ -883,37 +883,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(()); } } @@ -1006,8 +1006,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> { @@ -1212,127 +1212,127 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Name; - type ItemCount; - type Cid; type Purpose; type IndexedAt; type Creator; + type Uri; + type ItemCount; + 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 Name = Unset; - type ItemCount = Unset; - type Cid = Unset; type Purpose = Unset; type IndexedAt = Unset; type Creator = 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 Name = S::Name; - type ItemCount = S::ItemCount; - type Cid = S::Cid; - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; + type Uri = Unset; + type ItemCount = Unset; + type Cid = Unset; } ///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 Name = Set; - type ItemCount = S::ItemCount; - type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; type Creator = S::Creator; - } - ///State transition - sets the `item_count` field to Set - pub struct SetItemCount(PhantomData S>); - impl sealed::Sealed for SetItemCount {} - impl State for SetItemCount { type Uri = S::Uri; - type Name = S::Name; - type ItemCount = Set; - type Cid = S::Cid; - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - 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 Uri = S::Uri; - type Name = S::Name; type ItemCount = S::ItemCount; - type Cid = Set; - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; + type Cid = S::Cid; } ///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 Name = S::Name; - type ItemCount = S::ItemCount; - type Cid = S::Cid; type Purpose = Set; type IndexedAt = S::IndexedAt; type Creator = S::Creator; + type Uri = S::Uri; + type ItemCount = S::ItemCount; + 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 Name = S::Name; - type ItemCount = S::ItemCount; - type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = Set; type Creator = S::Creator; + type Uri = S::Uri; + type ItemCount = S::ItemCount; + 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 { + type Name = S::Name; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + type Creator = Set; type Uri = S::Uri; + type ItemCount = S::ItemCount; + 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 Name = S::Name; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Uri = Set; type ItemCount = S::ItemCount; type Cid = S::Cid; + } + ///State transition - sets the `item_count` field to Set + pub struct SetItemCount(PhantomData S>); + impl sealed::Sealed for SetItemCount {} + impl State for SetItemCount { + type Name = S::Name; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; - type Creator = Set; + type Creator = S::Creator; + type Uri = S::Uri; + type ItemCount = 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 Name = S::Name; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Uri = S::Uri; + type ItemCount = S::ItemCount; + 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 `name` field pub struct name(()); - ///Marker type for the `item_count` field - pub struct item_count(()); - ///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 `creator` field pub struct creator(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `item_count` field + pub struct item_count(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -1576,13 +1576,13 @@ impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, - S::Uri: list_view_state::IsSet, S::Name: list_view_state::IsSet, - S::ItemCount: list_view_state::IsSet, - S::Cid: list_view_state::IsSet, S::Purpose: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, S::Creator: list_view_state::IsSet, + S::Uri: list_view_state::IsSet, + S::ItemCount: list_view_state::IsSet, + S::Cid: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { @@ -1696,51 +1696,51 @@ pub mod resource_tags_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CommunityTags; - type Resource; type AuthorTags; + type Resource; + type CommunityTags; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CommunityTags = Unset; - type Resource = Unset; type AuthorTags = Unset; + type Resource = Unset; + type CommunityTags = Unset; } - ///State transition - sets the `community_tags` field to Set - pub struct SetCommunityTags(PhantomData S>); - impl sealed::Sealed for SetCommunityTags {} - impl State for SetCommunityTags { - type CommunityTags = Set; + ///State transition - sets the `author_tags` field to Set + pub struct SetAuthorTags(PhantomData S>); + impl sealed::Sealed for SetAuthorTags {} + impl State for SetAuthorTags { + type AuthorTags = Set; type Resource = S::Resource; - type AuthorTags = S::AuthorTags; + type CommunityTags = S::CommunityTags; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type CommunityTags = S::CommunityTags; - type Resource = Set; type AuthorTags = S::AuthorTags; - } - ///State transition - sets the `author_tags` field to Set - pub struct SetAuthorTags(PhantomData S>); - impl sealed::Sealed for SetAuthorTags {} - impl State for SetAuthorTags { + type Resource = Set; type CommunityTags = S::CommunityTags; + } + ///State transition - sets the `community_tags` field to Set + pub struct SetCommunityTags(PhantomData S>); + impl sealed::Sealed for SetCommunityTags {} + impl State for SetCommunityTags { + type AuthorTags = S::AuthorTags; type Resource = S::Resource; - type AuthorTags = Set; + type CommunityTags = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `community_tags` field - pub struct community_tags(()); - ///Marker type for the `resource` field - pub struct resource(()); ///Marker type for the `author_tags` field pub struct author_tags(()); + ///Marker type for the `resource` field + pub struct resource(()); + ///Marker type for the `community_tags` field + pub struct community_tags(()); } } @@ -1853,9 +1853,9 @@ impl<'a, S: resource_tags_view_state::State> ResourceTagsViewBuilder<'a, S> { impl<'a, S> ResourceTagsViewBuilder<'a, S> where S: resource_tags_view_state::State, - S::CommunityTags: resource_tags_view_state::IsSet, - S::Resource: resource_tags_view_state::IsSet, S::AuthorTags: resource_tags_view_state::IsSet, + S::Resource: resource_tags_view_state::IsSet, + S::CommunityTags: resource_tags_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ResourceTagsView<'a> { @@ -1952,67 +1952,67 @@ pub mod tag_application_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Tag; + type Uri; type CreatedAt; type AppliedBy; - type Uri; - type Tag; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Tag = Unset; + type Uri = Unset; type CreatedAt = Unset; type AppliedBy = Unset; - type Uri = Unset; - type Tag = Unset; + } + ///State transition - sets the `tag` field to Set + pub struct SetTag(PhantomData S>); + impl sealed::Sealed for SetTag {} + impl State for SetTag { + type Tag = Set; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; + type AppliedBy = S::AppliedBy; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Tag = S::Tag; + type Uri = Set; + type CreatedAt = S::CreatedAt; + type AppliedBy = S::AppliedBy; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Tag = S::Tag; + type Uri = S::Uri; type CreatedAt = Set; type AppliedBy = S::AppliedBy; - type Uri = S::Uri; - type Tag = S::Tag; } ///State transition - sets the `applied_by` field to Set pub struct SetAppliedBy(PhantomData S>); impl sealed::Sealed for SetAppliedBy {} impl State for SetAppliedBy { - type CreatedAt = S::CreatedAt; - type AppliedBy = Set; - type Uri = S::Uri; - type Tag = S::Tag; - } - ///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 AppliedBy = S::AppliedBy; - type Uri = Set; type Tag = S::Tag; - } - ///State transition - sets the `tag` field to Set - pub struct SetTag(PhantomData S>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type CreatedAt = S::CreatedAt; - type AppliedBy = S::AppliedBy; type Uri = S::Uri; - type Tag = Set; + type CreatedAt = S::CreatedAt; + type AppliedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `tag` field + pub struct tag(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `applied_by` field pub struct applied_by(()); - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `tag` field - pub struct tag(()); } } @@ -2125,10 +2125,10 @@ where impl<'a, S> TagApplicationViewBuilder<'a, S> where S: tag_application_view_state::State, + S::Tag: tag_application_view_state::IsSet, + S::Uri: tag_application_view_state::IsSet, S::CreatedAt: tag_application_view_state::IsSet, S::AppliedBy: tag_application_view_state::IsSet, - S::Uri: tag_application_view_state::IsSet, - S::Tag: tag_application_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TagApplicationView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs index 3df9e50..e4116a5 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 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(()); } } @@ -158,8 +158,8 @@ where impl<'a, S> BookmarkBuilder<'a, S> where S: bookmark_state::State, - S::CreatedAt: bookmark_state::IsSet, S::Subject: bookmark_state::IsSet, + S::CreatedAt: bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> Bookmark<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/like.rs b/crates/weaver-api/src/sh_weaver/graph/like.rs index e26326d..2732a88 100644 --- a/crates/weaver-api/src/sh_weaver/graph/like.rs +++ b/crates/weaver-api/src/sh_weaver/graph/like.rs @@ -34,37 +34,37 @@ pub mod like_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> LikeBuilder<'a, S> where S: like_state::State, - S::Subject: like_state::IsSet, S::CreatedAt: like_state::IsSet, + S::Subject: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/list.rs b/crates/weaver-api/src/sh_weaver/graph/list.rs index f71b814..8ef67d5 100644 --- a/crates/weaver-api/src/sh_weaver/graph/list.rs +++ b/crates/weaver-api/src/sh_weaver/graph/list.rs @@ -130,50 +130,50 @@ pub mod list_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type CreatedAt; type Purpose; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Name = Unset; - type CreatedAt = Unset; type Purpose = Unset; + type CreatedAt = 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 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 CreatedAt = 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 CreatedAt = S::CreatedAt; 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; } /// 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 `created_at` field - pub struct created_at(()); ///Marker type for the `purpose` field pub struct purpose(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -307,8 +307,8 @@ impl<'a, S> ListBuilder<'a, S> where S: list_state::State, S::Name: list_state::IsSet, - S::CreatedAt: 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/sh_weaver/graph/listitem.rs b/crates/weaver-api/src/sh_weaver/graph/listitem.rs index 5910dc7..a04b57d 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 Subject; - type List; type CreatedAt; + type List; + 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 List = Unset; type CreatedAt = Unset; + type List = 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 `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type List = S::List; - type CreatedAt = S::CreatedAt; + type Subject = S::Subject; } ///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 List = 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 List = 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 List = S::List; - type CreatedAt = 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 `list` field - pub struct list(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `list` field + pub struct list(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, - S::Subject: listitem_state::IsSet, - S::List: listitem_state::IsSet, S::CreatedAt: listitem_state::IsSet, + S::List: listitem_state::IsSet, + S::Subject: listitem_state::IsSet, { /// Build the final struct pub fn build(self) -> Listitem<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/tag.rs b/crates/weaver-api/src/sh_weaver/graph/tag.rs index 7461c85..58c5ed7 100644 --- a/crates/weaver-api/src/sh_weaver/graph/tag.rs +++ b/crates/weaver-api/src/sh_weaver/graph/tag.rs @@ -38,50 +38,50 @@ pub mod tag_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Tag; - 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 Tag = Unset; - type CreatedAt = Unset; type Subject = Unset; + type CreatedAt = Unset; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData S>); impl sealed::Sealed for SetTag {} impl State for SetTag { type Tag = Set; - type CreatedAt = S::CreatedAt; - 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 Tag = S::Tag; - type CreatedAt = 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 Tag = S::Tag; - 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 Tag = S::Tag; + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `tag` field pub struct tag(()); - ///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(()); } } @@ -175,8 +175,8 @@ impl<'a, S> TagBuilder<'a, S> where S: tag_state::State, S::Tag: tag_state::IsSet, - S::CreatedAt: tag_state::IsSet, S::Subject: tag_state::IsSet, + S::CreatedAt: tag_state::IsSet, { /// Build the final struct pub fn build(self) -> Tag<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook.rs b/crates/weaver-api/src/sh_weaver/notebook.rs index 788fa9e..24da6f5 100644 --- a/crates/weaver-api/src/sh_weaver/notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook.rs @@ -30,6 +30,7 @@ pub mod get_similar_notebooks; pub mod get_suggested_notebooks; pub mod page; pub mod resolve_entry; +pub mod resolve_global_notebook; pub mod resolve_notebook; pub mod resolve_version_conflict; pub mod search_entries; @@ -2398,37 +2399,37 @@ pub mod chapter_entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Entry; type Index; + type Entry; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Entry = Unset; type Index = Unset; - } - ///State transition - sets the `entry` field to Set - pub struct SetEntry(PhantomData S>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Entry = Set; - type Index = S::Index; + type Entry = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Entry = S::Entry; type Index = Set; + type Entry = S::Entry; + } + ///State transition - sets the `entry` field to Set + pub struct SetEntry(PhantomData S>); + impl sealed::Sealed for SetEntry {} + impl State for SetEntry { + type Index = S::Index; + type Entry = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `entry` field - pub struct entry(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `entry` field + pub struct entry(()); } } @@ -2541,8 +2542,8 @@ impl<'a, S: chapter_entry_view_state::State> ChapterEntryViewBuilder<'a, S> { impl<'a, S> ChapterEntryViewBuilder<'a, S> where S: chapter_entry_view_state::State, - S::Entry: chapter_entry_view_state::IsSet, S::Index: chapter_entry_view_state::IsSet, + S::Entry: chapter_entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterEntryView<'a> { @@ -2634,104 +2635,104 @@ pub mod chapter_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; - type Notebook; type Authors; - type Uri; - type IndexedAt; type Record; + type IndexedAt; + type Uri; + type Notebook; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; - type Notebook = Unset; type Authors = Unset; - type Uri = Unset; - type IndexedAt = Unset; type Record = Unset; + type IndexedAt = Unset; + type Uri = Unset; + type Notebook = 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 Notebook = S::Notebook; type Authors = S::Authors; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Record = S::Record; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Cid = S::Cid; - type Notebook = Set; - type Authors = S::Authors; - type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Record = S::Record; + type Uri = S::Uri; + type Notebook = S::Notebook; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData S>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { type Cid = S::Cid; - type Notebook = S::Notebook; type Authors = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Record = S::Record; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Notebook = S::Notebook; } - ///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 `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type Cid = S::Cid; - type Notebook = S::Notebook; type Authors = S::Authors; - type Uri = Set; + type Record = Set; type IndexedAt = S::IndexedAt; - type Record = S::Record; + type Uri = S::Uri; + type Notebook = S::Notebook; } ///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 Notebook = S::Notebook; type Authors = S::Authors; - type Uri = S::Uri; - type IndexedAt = Set; type Record = S::Record; + type IndexedAt = Set; + type Uri = S::Uri; + type Notebook = S::Notebook; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + ///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 Authors = S::Authors; + type Record = S::Record; + type IndexedAt = S::IndexedAt; + type Uri = 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 Cid = S::Cid; type Authors = S::Authors; - type Uri = S::Uri; + type Record = S::Record; type IndexedAt = S::IndexedAt; - type Record = Set; + type Uri = S::Uri; + type Notebook = 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 `notebook` field - pub struct notebook(()); ///Marker type for the `authors` field pub struct authors(()); - ///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(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -2949,11 +2950,11 @@ impl<'a, S> ChapterViewBuilder<'a, S> where S: chapter_view_state::State, S::Cid: chapter_view_state::IsSet, - S::Notebook: chapter_view_state::IsSet, S::Authors: chapter_view_state::IsSet, - S::Uri: chapter_view_state::IsSet, - S::IndexedAt: chapter_view_state::IsSet, S::Record: chapter_view_state::IsSet, + S::IndexedAt: chapter_view_state::IsSet, + S::Uri: chapter_view_state::IsSet, + S::Notebook: chapter_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterView<'a> { @@ -3337,85 +3338,85 @@ pub mod entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Uri; - type Record; type IndexedAt; type Authors; + type Record; + 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 Record = Unset; type IndexedAt = Unset; type Authors = Unset; + type Record = 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 `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type Authors = S::Authors; + type Record = S::Record; type Uri = S::Uri; + type Cid = S::Cid; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type IndexedAt = S::IndexedAt; + type Authors = Set; type Record = S::Record; + 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 Authors = S::Authors; + type Record = Set; + type Uri = S::Uri; + 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 Record = S::Record; type IndexedAt = S::IndexedAt; type Authors = S::Authors; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + type Record = S::Record; + type Uri = Set; type Cid = S::Cid; - type Uri = S::Uri; - type Record = Set; + } + ///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 Authors = S::Authors; - } - ///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 Uri = S::Uri; type Record = S::Record; - type IndexedAt = Set; - type Authors = S::Authors; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Cid = S::Cid; type Uri = S::Uri; - type Record = S::Record; - type IndexedAt = S::IndexedAt; - type Authors = 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 `record` field - pub struct record(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `authors` field pub struct authors(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -3752,11 +3753,11 @@ impl<'a, S: entry_view_state::State> EntryViewBuilder<'a, S> { impl<'a, S> EntryViewBuilder<'a, S> where S: entry_view_state::State, - S::Cid: entry_view_state::IsSet, - S::Uri: entry_view_state::IsSet, - S::Record: entry_view_state::IsSet, S::IndexedAt: entry_view_state::IsSet, S::Authors: entry_view_state::IsSet, + S::Record: entry_view_state::IsSet, + S::Uri: entry_view_state::IsSet, + S::Cid: entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> EntryView<'a> { @@ -4307,83 +4308,83 @@ pub mod notebook_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Authors; type Record; + type Cid; type Uri; + type Authors; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Authors = Unset; type Record = Unset; + type Cid = Unset; type Uri = Unset; + type Authors = Unset; type IndexedAt = 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 Authors = S::Authors; - type Record = S::Record; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Cid = S::Cid; - type Authors = Set; - type Record = S::Record; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - } ///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 Record = Set; + 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 Record = S::Record; + type Cid = Set; type Uri = S::Uri; + type Authors = S::Authors; 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 Record = S::Record; type Cid = S::Cid; + type Uri = Set; type Authors = S::Authors; + type IndexedAt = S::IndexedAt; + } + ///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 Uri = Set; + type Cid = S::Cid; + type Uri = S::Uri; + type Authors = 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 Authors = S::Authors; type Record = S::Record; + type Cid = S::Cid; type Uri = S::Uri; + type Authors = S::Authors; type IndexedAt = 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 `authors` field - pub struct authors(()); + 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 pub struct uri(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } @@ -4752,10 +4753,10 @@ impl<'a, S: notebook_view_state::State> NotebookViewBuilder<'a, S> { impl<'a, S> NotebookViewBuilder<'a, S> where S: notebook_view_state::State, - S::Cid: notebook_view_state::IsSet, - S::Authors: notebook_view_state::IsSet, 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, { /// Build the final struct @@ -4871,85 +4872,85 @@ pub mod page_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Uri; type Notebook; - type Cid; + type Uri; type Record; + type Cid; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; - type Uri = Unset; type Notebook = Unset; - type Cid = Unset; + type Uri = Unset; type Record = Unset; + type Cid = Unset; + type IndexedAt = 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; + ///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 Uri = S::Uri; - type Notebook = S::Notebook; - type Cid = S::Cid; type Record = S::Record; + type Cid = S::Cid; + 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 IndexedAt = S::IndexedAt; - type Uri = Set; type Notebook = S::Notebook; - type Cid = S::Cid; + type Uri = Set; type Record = S::Record; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Notebook = S::Notebook; type Uri = S::Uri; - type Notebook = Set; + type Record = Set; type Cid = S::Cid; - type Record = S::Record; + 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 IndexedAt = S::IndexedAt; - type Uri = S::Uri; type Notebook = S::Notebook; - type Cid = Set; + type Uri = S::Uri; 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 = Set; type IndexedAt = S::IndexedAt; - 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 Notebook = S::Notebook; + type Uri = S::Uri; + type Record = S::Record; type Cid = S::Cid; - type Record = Set; + type IndexedAt = 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 `uri` field - pub struct uri(()); ///Marker type for the `notebook` field pub struct notebook(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///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(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -5136,11 +5137,11 @@ where impl<'a, S> PageViewBuilder<'a, S> where S: page_view_state::State, - S::IndexedAt: page_view_state::IsSet, - S::Uri: page_view_state::IsSet, S::Notebook: page_view_state::IsSet, - S::Cid: page_view_state::IsSet, + S::Uri: page_view_state::IsSet, S::Record: page_view_state::IsSet, + S::Cid: page_view_state::IsSet, + S::IndexedAt: page_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PageView<'a> { @@ -5232,67 +5233,67 @@ pub mod permission_grant_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; - type Scope; type GrantedAt; + type Scope; type Did; + type Source; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Source = Unset; - type Scope = Unset; type GrantedAt = Unset; + type Scope = Unset; type Did = Unset; + type Source = Unset; } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData S>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; + ///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 GrantedAt = S::GrantedAt; type Did = S::Did; + type Source = S::Source; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type Source = S::Source; - type Scope = Set; type GrantedAt = S::GrantedAt; + type Scope = Set; type Did = S::Did; - } - ///State transition - sets the `granted_at` field to Set - pub struct SetGrantedAt(PhantomData S>); - impl sealed::Sealed for SetGrantedAt {} - impl State for SetGrantedAt { type Source = S::Source; - type Scope = S::Scope; - type GrantedAt = 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 Source = S::Source; - type Scope = S::Scope; type GrantedAt = S::GrantedAt; + type Scope = S::Scope; type Did = Set; + type Source = S::Source; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `source` field - pub struct source(()); - ///Marker type for the `scope` field - pub struct scope(()); ///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(()); } } @@ -5405,10 +5406,10 @@ where impl<'a, S> PermissionGrantBuilder<'a, S> where S: permission_grant_state::State, - S::Source: permission_grant_state::IsSet, - S::Scope: permission_grant_state::IsSet, S::GrantedAt: permission_grant_state::IsSet, + S::Scope: permission_grant_state::IsSet, S::Did: permission_grant_state::IsSet, + S::Source: permission_grant_state::IsSet, { /// Build the final struct pub fn build(self) -> PermissionGrant<'a> { @@ -5757,67 +5758,67 @@ pub mod published_version_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; + type Publisher; type PublishedAt; + type Cid; type Uri; - type Publisher; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; + type Publisher = Unset; type PublishedAt = Unset; + type Cid = Unset; type Uri = Unset; - type Publisher = 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 `publisher` field to Set + pub struct SetPublisher(PhantomData S>); + impl sealed::Sealed for SetPublisher {} + impl State for SetPublisher { + type Publisher = Set; type PublishedAt = S::PublishedAt; + type Cid = S::Cid; type Uri = S::Uri; - type Publisher = S::Publisher; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData S>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Cid = S::Cid; + type Publisher = S::Publisher; type PublishedAt = 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 Publisher = S::Publisher; + type PublishedAt = S::PublishedAt; + 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 PublishedAt = S::PublishedAt; - type Uri = Set; type Publisher = S::Publisher; - } - ///State transition - sets the `publisher` field to Set - pub struct SetPublisher(PhantomData S>); - impl sealed::Sealed for SetPublisher {} - impl State for SetPublisher { - type Cid = S::Cid; type PublishedAt = S::PublishedAt; - type Uri = S::Uri; - type Publisher = Set; + type Cid = S::Cid; + type Uri = 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 `publisher` field + pub struct publisher(()); ///Marker type for the `published_at` field pub struct published_at(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `publisher` field - pub struct publisher(()); } } @@ -5990,10 +5991,10 @@ where impl<'a, S> PublishedVersionViewBuilder<'a, S> where S: published_version_view_state::State, - S::Cid: published_version_view_state::IsSet, + S::Publisher: published_version_view_state::IsSet, S::PublishedAt: published_version_view_state::IsSet, + S::Cid: published_version_view_state::IsSet, S::Uri: published_version_view_state::IsSet, - S::Publisher: published_version_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PublishedVersionView<'a> { @@ -6243,37 +6244,37 @@ pub mod reason_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; 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 IndexedAt = Set; - type By = S::By; + 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 IndexedAt = S::IndexedAt; type By = 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 By = S::By; + type IndexedAt = 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 `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6346,8 +6347,8 @@ where impl<'a, S> ReasonBookmarkBuilder<'a, S> where S: reason_bookmark_state::State, - S::IndexedAt: reason_bookmark_state::IsSet, S::By: reason_bookmark_state::IsSet, + S::IndexedAt: reason_bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonBookmark<'a> { @@ -6417,37 +6418,37 @@ pub mod reason_like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; 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 IndexedAt = Set; - type By = S::By; + 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 IndexedAt = S::IndexedAt; type By = 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 By = S::By; + type IndexedAt = 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 `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6520,8 +6521,8 @@ where impl<'a, S> ReasonLikeBuilder<'a, S> where S: reason_like_state::State, - S::IndexedAt: reason_like_state::IsSet, S::By: reason_like_state::IsSet, + S::IndexedAt: reason_like_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonLike<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs index a54908b..5694806 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs @@ -54,49 +54,49 @@ pub mod chapter_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EntryList; type Notebook; + type EntryList; type Authors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type EntryList = Unset; type Notebook = Unset; + type EntryList = Unset; type Authors = Unset; } - ///State transition - sets the `entry_list` field to Set - pub struct SetEntryList(PhantomData S>); - impl sealed::Sealed for SetEntryList {} - impl State for SetEntryList { - type EntryList = Set; - type Notebook = S::Notebook; - type Authors = S::Authors; - } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type EntryList = S::EntryList; type Notebook = Set; + type EntryList = S::EntryList; + type Authors = S::Authors; + } + ///State transition - sets the `entry_list` field to Set + pub struct SetEntryList(PhantomData S>); + impl sealed::Sealed for SetEntryList {} + impl State for SetEntryList { + type Notebook = S::Notebook; + type EntryList = Set; type Authors = S::Authors; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData S>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { - type EntryList = S::EntryList; type Notebook = S::Notebook; + type EntryList = S::EntryList; type Authors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); ///Marker type for the `authors` field pub struct authors(()); } @@ -291,8 +291,8 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { impl<'a, S> ChapterBuilder<'a, S> where S: chapter_state::State, - S::EntryList: chapter_state::IsSet, S::Notebook: chapter_state::IsSet, + S::EntryList: chapter_state::IsSet, S::Authors: chapter_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/notebook/entry.rs b/crates/weaver-api/src/sh_weaver/notebook/entry.rs index a036428..3edc016 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/entry.rs @@ -60,67 +60,67 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Content; - type Title; type Path; + type Title; + type Content; + 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 Content = Unset; - type Title = Unset; type Path = Unset; + type Title = Unset; + type Content = 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 Content = S::Content; + ///State transition - sets the `path` field to Set + pub struct SetPath(PhantomData S>); + impl sealed::Sealed for SetPath {} + impl State for SetPath { + type Path = Set; type Title = S::Title; - type Path = S::Path; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { + type Content = S::Content; type CreatedAt = S::CreatedAt; - type Content = Set; - type Title = S::Title; - type Path = S::Path; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = S::CreatedAt; - type Content = S::Content; - type Title = Set; type Path = S::Path; + type Title = Set; + type Content = S::Content; + type CreatedAt = S::CreatedAt; } - ///State transition - sets the `path` field to Set - pub struct SetPath(PhantomData S>); - impl sealed::Sealed for SetPath {} - impl State for SetPath { + ///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 Content = 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 Path = Set; + type Content = S::Content; + 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 `content` field - pub struct content(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `path` field pub struct path(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -358,10 +358,10 @@ impl<'a, S: entry_state::State> EntryBuilder<'a, S> { impl<'a, S> EntryBuilder<'a, S> where S: entry_state::State, - S::CreatedAt: entry_state::IsSet, - S::Content: entry_state::IsSet, - S::Title: entry_state::IsSet, S::Path: entry_state::IsSet, + S::Title: entry_state::IsSet, + S::Content: entry_state::IsSet, + S::CreatedAt: 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_notebooks.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs index c44c50b..10e5538 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs @@ -188,37 +188,37 @@ pub mod notebook_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; 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; - } - ///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 Uri = S::Uri; + 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 Cid = S::Cid; 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 Uri = S::Uri; + 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 `cid` field + pub struct cid(()); } } @@ -328,8 +328,8 @@ where impl<'a, S> NotebookRefBuilder<'a, S> where S: notebook_ref_state::State, - S::Cid: notebook_ref_state::IsSet, S::Uri: notebook_ref_state::IsSet, + S::Cid: notebook_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookRef<'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 94d2695..bc519e4 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 Actor; type Title; + 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 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 Actor = Set; - type Title = S::Title; + 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 Actor = S::Actor; type Title = 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 Title = S::Title; + type Actor = 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 `title` field pub struct title(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetNotebookByTitleBuilder<'a, S> where S: get_notebook_by_title_state::State, - S::Actor: get_notebook_by_title_state::IsSet, S::Title: get_notebook_by_title_state::IsSet, + S::Actor: 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/get_reading_history.rs b/crates/weaver-api/src/sh_weaver/notebook/get_reading_history.rs index 0b24542..ff8988d 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_reading_history.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_reading_history.rs @@ -214,37 +214,37 @@ pub mod reading_history_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Progress; + 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 Progress = 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 Progress = S::Progress; + type Notebook = Unset; } ///State transition - sets the `progress` field to Set pub struct SetProgress(PhantomData S>); impl sealed::Sealed for SetProgress {} impl State for SetProgress { - type Notebook = S::Notebook; type Progress = 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 Progress = S::Progress; + 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 `progress` field pub struct progress(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -337,8 +337,8 @@ where impl<'a, S> ReadingHistoryItemBuilder<'a, S> where S: reading_history_item_state::State, - S::Notebook: reading_history_item_state::IsSet, S::Progress: reading_history_item_state::IsSet, + S::Notebook: reading_history_item_state::IsSet, { /// Build the final struct pub fn build(self) -> ReadingHistoryItem<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/page.rs b/crates/weaver-api/src/sh_weaver/notebook/page.rs index c212080..7d3cead 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/page.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/page.rs @@ -44,51 +44,51 @@ pub mod page_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; - type EntryList; type Authors; + type EntryList; + 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 EntryList = Unset; type Authors = Unset; + type EntryList = Unset; + type Notebook = 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; + ///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 Authors = S::Authors; + 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 Notebook = S::Notebook; - type EntryList = Set; type Authors = S::Authors; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { + type EntryList = 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 Authors = S::Authors; type EntryList = S::EntryList; - type Authors = Set; + 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 `entry_list` field - pub struct entry_list(()); ///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(()); } } @@ -221,9 +221,9 @@ impl<'a, S: page_state::State> PageBuilder<'a, S> { impl<'a, S> PageBuilder<'a, S> where S: page_state::State, - S::Notebook: page_state::IsSet, - S::EntryList: page_state::IsSet, S::Authors: page_state::IsSet, + S::EntryList: page_state::IsSet, + S::Notebook: page_state::IsSet, { /// Build the final struct pub fn build(self) -> Page<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs index afce772..c3a33bf 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs @@ -34,51 +34,51 @@ pub mod resolve_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Actor; - type Entry; type Notebook; + type Entry; + 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 Entry = Unset; type Notebook = Unset; + type Entry = 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; + ///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 Entry = S::Entry; - type Notebook = S::Notebook; + type Actor = S::Actor; } ///State transition - sets the `entry` field to Set pub struct SetEntry(PhantomData S>); impl sealed::Sealed for SetEntry {} impl State for SetEntry { - type Actor = S::Actor; - type Entry = 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 Entry = 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 Notebook = S::Notebook; type Entry = S::Entry; - type Notebook = Set; + type Actor = 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 `entry` field - pub struct entry(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `entry` field + pub struct entry(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -171,9 +171,9 @@ where impl<'a, S> ResolveEntryBuilder<'a, S> where S: resolve_entry_state::State, - S::Actor: resolve_entry_state::IsSet, - S::Entry: resolve_entry_state::IsSet, S::Notebook: resolve_entry_state::IsSet, + S::Entry: resolve_entry_state::IsSet, + S::Actor: resolve_entry_state::IsSet, { /// Build the final struct pub fn build(self) -> ResolveEntry<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_global_notebook.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_global_notebook.rs new file mode 100644 index 0000000..8b747b7 --- /dev/null +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_global_notebook.rs @@ -0,0 +1,189 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.weaver.notebook.resolveGlobalNotebook +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ResolveGlobalNotebook<'a> { + #[serde(borrow)] + pub path: jacquard_common::CowStr<'a>, +} + +pub mod resolve_global_notebook_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 Path; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Path = Unset; + } + ///State transition - sets the `path` field to Set + pub struct SetPath(PhantomData S>); + impl sealed::Sealed for SetPath {} + impl State for SetPath { + type Path = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `path` field + pub struct path(()); + } +} + +/// Builder for constructing an instance of this type +pub struct ResolveGlobalNotebookBuilder<'a, S: resolve_global_notebook_state::State> { + _phantom_state: ::core::marker::PhantomData S>, + __unsafe_private_named: (::core::option::Option>,), + _phantom: ::core::marker::PhantomData<&'a ()>, +} + +impl<'a> ResolveGlobalNotebook<'a> { + /// Create a new builder for this type + pub fn new() -> ResolveGlobalNotebookBuilder< + 'a, + resolve_global_notebook_state::Empty, + > { + ResolveGlobalNotebookBuilder::new() + } +} + +impl<'a> ResolveGlobalNotebookBuilder<'a, resolve_global_notebook_state::Empty> { + /// Create a new builder with all fields unset + pub fn new() -> Self { + ResolveGlobalNotebookBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: (None,), + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> ResolveGlobalNotebookBuilder<'a, S> +where + S: resolve_global_notebook_state::State, + S::Path: resolve_global_notebook_state::IsUnset, +{ + /// Set the `path` field (required) + pub fn path( + mut self, + value: impl Into>, + ) -> ResolveGlobalNotebookBuilder<'a, resolve_global_notebook_state::SetPath> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); + ResolveGlobalNotebookBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> ResolveGlobalNotebookBuilder<'a, S> +where + S: resolve_global_notebook_state::State, + S::Path: resolve_global_notebook_state::IsSet, +{ + /// Build the final struct + pub fn build(self) -> ResolveGlobalNotebook<'a> { + ResolveGlobalNotebook { + path: self.__unsafe_private_named.0.unwrap(), + } + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct ResolveGlobalNotebookOutput<'a> { + #[serde(borrow)] + pub notebook: crate::sh_weaver::notebook::NotebookView<'a>, +} + +#[jacquard_derive::open_union] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + thiserror::Error, + miette::Diagnostic, + jacquard_derive::IntoStatic +)] +#[serde(tag = "error", content = "message")] +#[serde(bound(deserialize = "'de: 'a"))] +pub enum ResolveGlobalNotebookError<'a> { + #[serde(rename = "NotFound")] + NotFound(std::option::Option>), +} + +impl core::fmt::Display for ResolveGlobalNotebookError<'_> { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::NotFound(msg) => { + write!(f, "NotFound")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), + } + } +} + +/// Response type for +///sh.weaver.notebook.resolveGlobalNotebook +pub struct ResolveGlobalNotebookResponse; +impl jacquard_common::xrpc::XrpcResp for ResolveGlobalNotebookResponse { + const NSID: &'static str = "sh.weaver.notebook.resolveGlobalNotebook"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = ResolveGlobalNotebookOutput<'de>; + type Err<'de> = ResolveGlobalNotebookError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for ResolveGlobalNotebook<'a> { + const NSID: &'static str = "sh.weaver.notebook.resolveGlobalNotebook"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = ResolveGlobalNotebookResponse; +} + +/// Endpoint type for +///sh.weaver.notebook.resolveGlobalNotebook +pub struct ResolveGlobalNotebookRequest; +impl jacquard_common::xrpc::XrpcEndpoint for ResolveGlobalNotebookRequest { + const PATH: &'static str = "/xrpc/sh.weaver.notebook.resolveGlobalNotebook"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = ResolveGlobalNotebook<'de>; + type Response = ResolveGlobalNotebookResponse; +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs index baed045..d0d9b2f 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs @@ -38,37 +38,37 @@ pub mod resolve_notebook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Actor; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Actor = 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 Actor = S::Actor; + type Name = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Name = S::Name; type Actor = 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 Actor = S::Actor; + type Name = 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 `actor` field pub struct actor(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -175,8 +175,8 @@ where impl<'a, S> ResolveNotebookBuilder<'a, S> where S: resolve_notebook_state::State, - S::Name: resolve_notebook_state::IsSet, S::Actor: resolve_notebook_state::IsSet, + S::Name: resolve_notebook_state::IsSet, { /// Build the final struct pub fn build(self) -> ResolveNotebook<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/theme.rs b/crates/weaver-api/src/sh_weaver/notebook/theme.rs index 5ecdc5a..059a5ab 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 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; - } - ///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; + type Content = Unset; } ///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 Content = S::Content; 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; } /// 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(()); } } @@ -173,9 +173,9 @@ where impl<'a, S> CodeThemeFileBuilder<'a, S> where S: code_theme_file_state::State, - S::Content: code_theme_file_state::IsSet, S::Name: code_theme_file_state::IsSet, S::Did: code_theme_file_state::IsSet, + S::Content: code_theme_file_state::IsSet, { /// Build the final struct pub fn build(self) -> CodeThemeFile<'a> { @@ -838,50 +838,50 @@ pub mod font_file_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Content; - type Did; type Name; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Content = Unset; - type Did = Unset; type Name = Unset; + type Did = 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 Did = S::Did; - type Name = S::Name; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Content = S::Content; - type Did = 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 Did = S::Did; type Name = 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 Content = S::Content; + type Name = S::Name; + 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 `did` field - pub struct did(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -975,8 +975,8 @@ impl<'a, S> FontFileBuilder<'a, S> where S: font_file_state::State, S::Content: font_file_state::IsSet, - S::Did: font_file_state::IsSet, S::Name: font_file_state::IsSet, + S::Did: 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 LightScheme; - type Spacing; - type LightCodeTheme; type DarkScheme; type DarkCodeTheme; + type Spacing; + type LightScheme; type Fonts; + type LightCodeTheme; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type LightScheme = Unset; - type Spacing = Unset; - type LightCodeTheme = Unset; type DarkScheme = Unset; type DarkCodeTheme = Unset; + type Spacing = Unset; + type LightScheme = Unset; type Fonts = Unset; + type LightCodeTheme = Unset; } - ///State transition - sets the `light_scheme` field to Set - pub struct SetLightScheme(PhantomData S>); - impl sealed::Sealed for SetLightScheme {} - impl State for SetLightScheme { - type LightScheme = Set; + ///State transition - sets the `dark_scheme` field to Set + pub struct SetDarkScheme(PhantomData S>); + impl sealed::Sealed for SetDarkScheme {} + impl State for SetDarkScheme { + type DarkScheme = Set; + type DarkCodeTheme = S::DarkCodeTheme; type Spacing = S::Spacing; + type LightScheme = S::LightScheme; + type Fonts = S::Fonts; type LightCodeTheme = S::LightCodeTheme; + } + ///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 DarkScheme = S::DarkScheme; - type DarkCodeTheme = S::DarkCodeTheme; + type DarkCodeTheme = Set; + type Spacing = S::Spacing; + type LightScheme = S::LightScheme; type Fonts = S::Fonts; + type LightCodeTheme = S::LightCodeTheme; } ///State transition - sets the `spacing` field to Set pub struct SetSpacing(PhantomData S>); impl sealed::Sealed for SetSpacing {} impl State for SetSpacing { - type LightScheme = S::LightScheme; - type Spacing = Set; - type LightCodeTheme = S::LightCodeTheme; type DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; + type Spacing = Set; + type LightScheme = S::LightScheme; type Fonts = S::Fonts; + type LightCodeTheme = S::LightCodeTheme; } - ///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 LightScheme = S::LightScheme; - type Spacing = S::Spacing; - type LightCodeTheme = Set; + ///State transition - sets the `light_scheme` field to Set + pub struct SetLightScheme(PhantomData S>); + impl sealed::Sealed for SetLightScheme {} + impl State for SetLightScheme { type DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; - type Fonts = S::Fonts; - } - ///State transition - sets the `dark_scheme` field to Set - pub struct SetDarkScheme(PhantomData S>); - impl sealed::Sealed for SetDarkScheme {} - impl State for SetDarkScheme { - type LightScheme = S::LightScheme; type Spacing = S::Spacing; - type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = Set; - type DarkCodeTheme = S::DarkCodeTheme; + type LightScheme = Set; type Fonts = S::Fonts; - } - ///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 LightScheme = S::LightScheme; - type Spacing = S::Spacing; type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = S::DarkScheme; - type DarkCodeTheme = Set; - type Fonts = S::Fonts; } ///State transition - sets the `fonts` field to Set pub struct SetFonts(PhantomData S>); impl sealed::Sealed for SetFonts {} impl State for SetFonts { - type LightScheme = S::LightScheme; + type DarkScheme = S::DarkScheme; + type DarkCodeTheme = S::DarkCodeTheme; type Spacing = S::Spacing; + type LightScheme = S::LightScheme; + type Fonts = Set; type LightCodeTheme = S::LightCodeTheme; + } + ///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 DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; - type Fonts = Set; + type Spacing = S::Spacing; + type LightScheme = S::LightScheme; + type Fonts = S::Fonts; + type LightCodeTheme = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `light_scheme` field - pub struct light_scheme(()); - ///Marker type for the `spacing` field - pub struct spacing(()); - ///Marker type for the `light_code_theme` field - pub struct light_code_theme(()); ///Marker type for the `dark_scheme` field pub struct dark_scheme(()); ///Marker type for the `dark_code_theme` field pub struct dark_code_theme(()); + ///Marker type for the `spacing` field + pub struct spacing(()); + ///Marker type for the `light_scheme` field + pub struct light_scheme(()); ///Marker type for the `fonts` field pub struct fonts(()); + ///Marker type for the `light_code_theme` field + pub struct light_code_theme(()); } } @@ -1338,12 +1338,12 @@ where impl<'a, S> ThemeBuilder<'a, S> where S: theme_state::State, - S::LightScheme: theme_state::IsSet, - S::Spacing: theme_state::IsSet, - S::LightCodeTheme: theme_state::IsSet, S::DarkScheme: theme_state::IsSet, S::DarkCodeTheme: theme_state::IsSet, + S::Spacing: theme_state::IsSet, + S::LightScheme: theme_state::IsSet, S::Fonts: theme_state::IsSet, + S::LightCodeTheme: theme_state::IsSet, { /// Build the final struct pub fn build(self) -> Theme<'a> { @@ -1442,51 +1442,51 @@ pub mod theme_fonts_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Body; - type Heading; type Monospace; + type Heading; + type Body; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Body = Unset; - type Heading = Unset; type Monospace = Unset; + type Heading = Unset; + type Body = Unset; } - ///State transition - sets the `body` field to Set - pub struct SetBody(PhantomData S>); - impl sealed::Sealed for SetBody {} - impl State for SetBody { - type Body = Set; + ///State transition - sets the `monospace` field to Set + pub struct SetMonospace(PhantomData S>); + impl sealed::Sealed for SetMonospace {} + impl State for SetMonospace { + type Monospace = Set; type Heading = S::Heading; - type Monospace = S::Monospace; + type Body = S::Body; } ///State transition - sets the `heading` field to Set pub struct SetHeading(PhantomData S>); impl sealed::Sealed for SetHeading {} impl State for SetHeading { - type Body = S::Body; - type Heading = Set; type Monospace = S::Monospace; - } - ///State transition - sets the `monospace` field to Set - pub struct SetMonospace(PhantomData S>); - impl sealed::Sealed for SetMonospace {} - impl State for SetMonospace { + type Heading = Set; type Body = S::Body; + } + ///State transition - sets the `body` field to Set + pub struct SetBody(PhantomData S>); + impl sealed::Sealed for SetBody {} + impl State for SetBody { + type Monospace = S::Monospace; type Heading = S::Heading; - type Monospace = Set; + type Body = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `body` field - pub struct body(()); - ///Marker type for the `heading` field - pub struct heading(()); ///Marker type for the `monospace` field pub struct monospace(()); + ///Marker type for the `heading` field + pub struct heading(()); + ///Marker type for the `body` field + pub struct body(()); } } @@ -1579,9 +1579,9 @@ where impl<'a, S> ThemeFontsBuilder<'a, S> where S: theme_fonts_state::State, - S::Body: theme_fonts_state::IsSet, - S::Heading: theme_fonts_state::IsSet, S::Monospace: theme_fonts_state::IsSet, + S::Heading: theme_fonts_state::IsSet, + S::Body: theme_fonts_state::IsSet, { /// Build the final struct pub fn build(self) -> ThemeFonts<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notification.rs b/crates/weaver-api/src/sh_weaver/notification.rs index 811e8f7..db9b656 100644 --- a/crates/weaver-api/src/sh_weaver/notification.rs +++ b/crates/weaver-api/src/sh_weaver/notification.rs @@ -52,105 +52,105 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Reason; + type Uri; type Cid; + type Author; type IndexedAt; type IsRead; - type Author; - type Reason; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Reason = Unset; + type Uri = Unset; type Cid = Unset; + type Author = Unset; type IndexedAt = Unset; type IsRead = Unset; - type Author = Unset; - type Reason = Unset; - type Uri = 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 Uri = S::Uri; + type Cid = S::Cid; + type Author = S::Author; + type IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Reason = S::Reason; + type Uri = Set; + type Cid = S::Cid; + type Author = S::Author; + type IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Reason = S::Reason; + type Uri = S::Uri; type Cid = Set; + type Author = S::Author; type IndexedAt = S::IndexedAt; type IsRead = S::IsRead; - 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 Reason = S::Reason; type Uri = S::Uri; + type Cid = S::Cid; + type Author = Set; + type IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Reason = S::Reason; + type Uri = S::Uri; type Cid = S::Cid; + type Author = S::Author; type IndexedAt = Set; type IsRead = S::IsRead; - type Author = S::Author; - type Reason = S::Reason; - type Uri = S::Uri; } ///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 IndexedAt = S::IndexedAt; - type IsRead = Set; - type Author = S::Author; - 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 IndexedAt = S::IndexedAt; - type IsRead = S::IsRead; - type Author = Set; type Reason = S::Reason; type Uri = S::Uri; - } - ///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 IndexedAt = S::IndexedAt; - type IsRead = S::IsRead; type Author = S::Author; - 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 IndexedAt = S::IndexedAt; - type IsRead = S::IsRead; - type Author = S::Author; - type Reason = S::Reason; - type Uri = Set; + type IsRead = 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 `uri` field + pub struct uri(()); ///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 `is_read` field pub struct is_read(()); - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `reason` field - pub struct reason(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -343,12 +343,12 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, + S::Reason: notification_state::IsSet, + S::Uri: notification_state::IsSet, S::Cid: notification_state::IsSet, + S::Author: notification_state::IsSet, S::IndexedAt: notification_state::IsSet, S::IsRead: notification_state::IsSet, - S::Author: notification_state::IsSet, - S::Reason: notification_state::IsSet, - S::Uri: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { @@ -801,85 +801,85 @@ pub mod notification_group_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; - type Actors; type Subject; - type Count; + type Actors; type MostRecentAt; + type Reason; + type Count; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; - type Actors = Unset; type Subject = Unset; - type Count = Unset; + type Actors = Unset; type MostRecentAt = Unset; + type Reason = Unset; + type Count = 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; + ///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 Actors = S::Actors; - type Subject = S::Subject; - type Count = S::Count; type MostRecentAt = S::MostRecentAt; + type Reason = S::Reason; + type Count = S::Count; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData S>); impl sealed::Sealed for SetActors {} impl State for SetActors { - type Reason = S::Reason; - type Actors = Set; type Subject = S::Subject; - type Count = S::Count; + type Actors = Set; type MostRecentAt = S::MostRecentAt; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { type Reason = S::Reason; + type Count = S::Count; + } + ///State transition - sets the `most_recent_at` field to Set + pub struct SetMostRecentAt(PhantomData S>); + impl sealed::Sealed for SetMostRecentAt {} + impl State for SetMostRecentAt { + type Subject = S::Subject; type Actors = S::Actors; - type Subject = Set; + type MostRecentAt = Set; + type Reason = S::Reason; type Count = S::Count; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Subject = S::Subject; + type Actors = S::Actors; type MostRecentAt = S::MostRecentAt; + type Reason = 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 Reason = S::Reason; - type Actors = S::Actors; type Subject = S::Subject; - type Count = Set; + type Actors = S::Actors; type MostRecentAt = S::MostRecentAt; - } - ///State transition - sets the `most_recent_at` field to Set - pub struct SetMostRecentAt(PhantomData S>); - impl sealed::Sealed for SetMostRecentAt {} - impl State for SetMostRecentAt { type Reason = S::Reason; - type Actors = S::Actors; - type Subject = S::Subject; - type Count = S::Count; - type MostRecentAt = Set; + type Count = 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 `actors` field - pub struct actors(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `count` field - pub struct count(()); + ///Marker type for the `actors` field + pub struct actors(()); ///Marker type for the `most_recent_at` field pub struct most_recent_at(()); + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `count` field + pub struct count(()); } } @@ -1026,11 +1026,11 @@ where impl<'a, S> NotificationGroupBuilder<'a, S> where S: notification_group_state::State, - S::Reason: notification_group_state::IsSet, - S::Actors: notification_group_state::IsSet, S::Subject: notification_group_state::IsSet, - S::Count: notification_group_state::IsSet, + S::Actors: notification_group_state::IsSet, S::MostRecentAt: notification_group_state::IsSet, + S::Reason: notification_group_state::IsSet, + S::Count: notification_group_state::IsSet, { /// Build the final struct pub fn build(self) -> NotificationGroup<'a> { @@ -1293,50 +1293,50 @@ pub mod subscription_update_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type NewEntries; - type Notebook; type UpdatedAt; + type Notebook; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type NewEntries = Unset; - type Notebook = Unset; type UpdatedAt = Unset; + type Notebook = Unset; } ///State transition - sets the `new_entries` field to Set pub struct SetNewEntries(PhantomData S>); impl sealed::Sealed for SetNewEntries {} impl State for SetNewEntries { type NewEntries = Set; - type Notebook = S::Notebook; - type UpdatedAt = S::UpdatedAt; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type NewEntries = S::NewEntries; - type Notebook = Set; type UpdatedAt = S::UpdatedAt; + type Notebook = S::Notebook; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { type NewEntries = S::NewEntries; - type Notebook = S::Notebook; type UpdatedAt = 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 NewEntries = S::NewEntries; + type UpdatedAt = S::UpdatedAt; + type Notebook = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `new_entries` field pub struct new_entries(()); - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `updated_at` field pub struct updated_at(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -1462,8 +1462,8 @@ impl<'a, S> SubscriptionUpdateViewBuilder<'a, S> where S: subscription_update_view_state::State, S::NewEntries: subscription_update_view_state::IsSet, - S::Notebook: subscription_update_view_state::IsSet, S::UpdatedAt: subscription_update_view_state::IsSet, + S::Notebook: subscription_update_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscriptionUpdateView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/publish/blob.rs b/crates/weaver-api/src/sh_weaver/publish/blob.rs index b122ec2..51c6b5e 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 Path; type Upload; + type Path; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Path = Unset; 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 Path = Set; - type Upload = S::Upload; + 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 Path = S::Path; type Upload = Set; + type Path = S::Path; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `path` field - pub struct path(()); ///Marker type for the `upload` field pub struct upload(()); + ///Marker type for the `path` field + pub struct path(()); } } @@ -139,8 +139,8 @@ where impl<'a, S> BlobBuilder<'a, S> where S: blob_state::State, - S::Path: blob_state::IsSet, S::Upload: blob_state::IsSet, + S::Path: blob_state::IsSet, { /// Build the final struct pub fn build(self) -> Blob<'a> { diff --git a/crates/weaver-api/src/site_standard/document.rs b/crates/weaver-api/src/site_standard/document.rs index ece9fe0..f440d2f 100644 --- a/crates/weaver-api/src/site_standard/document.rs +++ b/crates/weaver-api/src/site_standard/document.rs @@ -60,51 +60,51 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; - type Publication; type PublishedAt; + type Publication; + 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 Publication = Unset; type PublishedAt = Unset; + type Publication = Unset; + type Title = 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; + ///State transition - sets the `published_at` field to Set + pub struct SetPublishedAt(PhantomData S>); + impl sealed::Sealed for SetPublishedAt {} + impl State for SetPublishedAt { + type PublishedAt = Set; type Publication = S::Publication; - type PublishedAt = S::PublishedAt; + type Title = S::Title; } ///State transition - sets the `publication` field to Set pub struct SetPublication(PhantomData S>); impl sealed::Sealed for SetPublication {} impl State for SetPublication { - type Title = S::Title; - type Publication = Set; type PublishedAt = S::PublishedAt; - } - ///State transition - sets the `published_at` field to Set - pub struct SetPublishedAt(PhantomData S>); - impl sealed::Sealed for SetPublishedAt {} - impl State for SetPublishedAt { + type Publication = 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 PublishedAt = S::PublishedAt; type Publication = S::Publication; - type PublishedAt = Set; + 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 `publication` field - pub struct publication(()); ///Marker type for the `published_at` field pub struct published_at(()); + ///Marker type for the `publication` field + pub struct publication(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -366,9 +366,9 @@ impl<'a, S: document_state::State> DocumentBuilder<'a, S> { impl<'a, S> DocumentBuilder<'a, S> where S: document_state::State, - S::Title: document_state::IsSet, - S::Publication: document_state::IsSet, S::PublishedAt: document_state::IsSet, + S::Publication: document_state::IsSet, + S::Title: document_state::IsSet, { /// Build the final struct pub fn build(self) -> Document<'a> { diff --git a/crates/weaver-api/src/site_standard/theme/basic.rs b/crates/weaver-api/src/site_standard/theme/basic.rs index 67c916c..8bee0cb 100644 --- a/crates/weaver-api/src/site_standard/theme/basic.rs +++ b/crates/weaver-api/src/site_standard/theme/basic.rs @@ -37,67 +37,67 @@ pub mod basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Background; - type Foreground; type AccentForeground; type Accent; + type Background; + type Foreground; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Background = Unset; - type Foreground = Unset; type AccentForeground = Unset; type Accent = Unset; - } - ///State transition - sets the `background` field to Set - pub struct SetBackground(PhantomData S>); - impl sealed::Sealed for SetBackground {} - impl State for SetBackground { - type Background = Set; - type Foreground = S::Foreground; - type AccentForeground = S::AccentForeground; - type Accent = S::Accent; - } - ///State transition - sets the `foreground` field to Set - pub struct SetForeground(PhantomData S>); - impl sealed::Sealed for SetForeground {} - impl State for SetForeground { - type Background = S::Background; - type Foreground = Set; - type AccentForeground = S::AccentForeground; - type Accent = S::Accent; + type Background = Unset; + type Foreground = Unset; } ///State transition - sets the `accent_foreground` field to Set pub struct SetAccentForeground(PhantomData S>); impl sealed::Sealed for SetAccentForeground {} impl State for SetAccentForeground { - type Background = S::Background; - type Foreground = S::Foreground; type AccentForeground = Set; type Accent = S::Accent; + type Background = S::Background; + type Foreground = S::Foreground; } ///State transition - sets the `accent` field to Set pub struct SetAccent(PhantomData S>); impl sealed::Sealed for SetAccent {} impl State for SetAccent { + type AccentForeground = S::AccentForeground; + type Accent = Set; type Background = S::Background; type Foreground = S::Foreground; + } + ///State transition - sets the `background` field to Set + pub struct SetBackground(PhantomData S>); + impl sealed::Sealed for SetBackground {} + impl State for SetBackground { type AccentForeground = S::AccentForeground; - type Accent = Set; + type Accent = S::Accent; + type Background = Set; + type Foreground = S::Foreground; + } + ///State transition - sets the `foreground` field to Set + pub struct SetForeground(PhantomData S>); + impl sealed::Sealed for SetForeground {} + impl State for SetForeground { + type AccentForeground = S::AccentForeground; + type Accent = S::Accent; + type Background = S::Background; + type Foreground = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `background` field - pub struct background(()); - ///Marker type for the `foreground` field - pub struct foreground(()); ///Marker type for the `accent_foreground` field pub struct accent_foreground(()); ///Marker type for the `accent` field pub struct accent(()); + ///Marker type for the `background` field + pub struct background(()); + ///Marker type for the `foreground` field + pub struct foreground(()); } } @@ -210,10 +210,10 @@ where impl<'a, S> BasicBuilder<'a, S> where S: basic_state::State, - S::Background: basic_state::IsSet, - S::Foreground: basic_state::IsSet, S::AccentForeground: basic_state::IsSet, S::Accent: basic_state::IsSet, + S::Background: basic_state::IsSet, + S::Foreground: basic_state::IsSet, { /// Build the final struct pub fn build(self) -> Basic<'a> { diff --git a/crates/weaver-api/src/site_standard/theme/color.rs b/crates/weaver-api/src/site_standard/theme/color.rs index 66cf485..0810645 100644 --- a/crates/weaver-api/src/site_standard/theme/color.rs +++ b/crates/weaver-api/src/site_standard/theme/color.rs @@ -438,67 +438,67 @@ pub mod rgba_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type A; + type G; type R; + type A; type B; - type G; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type A = Unset; + type G = Unset; type R = Unset; + type A = Unset; type B = Unset; - type G = Unset; } - ///State transition - sets the `a` field to Set - pub struct SetA(PhantomData S>); - impl sealed::Sealed for SetA {} - impl State for SetA { - type A = Set; + ///State transition - sets the `g` field to Set + pub struct SetG(PhantomData S>); + impl sealed::Sealed for SetG {} + impl State for SetG { + type G = Set; type R = S::R; + type A = S::A; type B = S::B; - type G = S::G; } ///State transition - sets the `r` field to Set pub struct SetR(PhantomData S>); impl sealed::Sealed for SetR {} impl State for SetR { - type A = S::A; + type G = S::G; type R = Set; + type A = S::A; type B = S::B; + } + ///State transition - sets the `a` field to Set + pub struct SetA(PhantomData S>); + impl sealed::Sealed for SetA {} + impl State for SetA { type G = S::G; + type R = S::R; + type A = Set; + type B = S::B; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData S>); impl sealed::Sealed for SetB {} impl State for SetB { - type A = S::A; - type R = S::R; - type B = Set; type G = S::G; - } - ///State transition - sets the `g` field to Set - pub struct SetG(PhantomData S>); - impl sealed::Sealed for SetG {} - impl State for SetG { - type A = S::A; type R = S::R; - type B = S::B; - type G = Set; + type A = S::A; + type B = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `a` field - pub struct a(()); + ///Marker type for the `g` field + pub struct g(()); ///Marker type for the `r` field pub struct r(()); + ///Marker type for the `a` field + pub struct a(()); ///Marker type for the `b` field pub struct b(()); - ///Marker type for the `g` field - pub struct g(()); } } @@ -599,10 +599,10 @@ where impl<'a, S> RgbaBuilder<'a, S> where S: rgba_state::State, - S::A: rgba_state::IsSet, + S::G: rgba_state::IsSet, S::R: rgba_state::IsSet, + S::A: rgba_state::IsSet, S::B: rgba_state::IsSet, - S::G: rgba_state::IsSet, { /// Build the final struct pub fn build(self) -> Rgba<'a> { diff --git a/crates/weaver-api/src/tools_ozone/communication.rs b/crates/weaver-api/src/tools_ozone/communication.rs index b70a78f..1fde3b9 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 CreatedAt; type ContentMarkdown; - type Id; + type Disabled; type LastUpdatedBy; - type UpdatedAt; + type CreatedAt; type Name; - type Disabled; + type UpdatedAt; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type ContentMarkdown = Unset; - type Id = Unset; + type Disabled = Unset; type LastUpdatedBy = Unset; - type UpdatedAt = Unset; + type CreatedAt = Unset; type Name = Unset; - type Disabled = 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 ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; - type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; - type Name = S::Name; - type Disabled = S::Disabled; + type UpdatedAt = Unset; + type Id = Unset; } ///State transition - sets the `content_markdown` field to Set pub struct SetContentMarkdown(PhantomData S>); impl sealed::Sealed for SetContentMarkdown {} impl State for SetContentMarkdown { - type CreatedAt = S::CreatedAt; type ContentMarkdown = Set; - type Id = S::Id; + type Disabled = S::Disabled; type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; type Name = S::Name; - type Disabled = S::Disabled; + type UpdatedAt = S::UpdatedAt; + 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 CreatedAt = S::CreatedAt; + ///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 = Set; + type Disabled = Set; type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; type Name = S::Name; - type Disabled = S::Disabled; + type UpdatedAt = S::UpdatedAt; + 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 { - type CreatedAt = S::CreatedAt; type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; + type Disabled = S::Disabled; type LastUpdatedBy = Set; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; type Name = S::Name; - type Disabled = S::Disabled; + type UpdatedAt = S::UpdatedAt; + type Id = S::Id; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - 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 ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; + type Disabled = S::Disabled; type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = Set; + type CreatedAt = Set; type Name = S::Name; - type Disabled = S::Disabled; + type UpdatedAt = S::UpdatedAt; + 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 CreatedAt = S::CreatedAt; type ContentMarkdown = S::ContentMarkdown; - type Id = S::Id; + type Disabled = S::Disabled; type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; type Name = Set; - type Disabled = S::Disabled; + type UpdatedAt = S::UpdatedAt; + 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 CreatedAt = S::CreatedAt; + ///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 Disabled = S::Disabled; + type LastUpdatedBy = S::LastUpdatedBy; + type CreatedAt = S::CreatedAt; + type Name = S::Name; + type UpdatedAt = 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 ContentMarkdown = S::ContentMarkdown; + type Disabled = S::Disabled; type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; type Name = S::Name; - type Disabled = Set; + type UpdatedAt = S::UpdatedAt; + type Id = 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 `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 `last_updated_by` field pub struct last_updated_by(()); - ///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 `name` field pub struct name(()); - ///Marker type for the `disabled` field - pub struct disabled(()); + ///Marker type for the `updated_at` field + pub struct updated_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::CreatedAt: template_view_state::IsSet, S::ContentMarkdown: template_view_state::IsSet, - S::Id: template_view_state::IsSet, + S::Disabled: template_view_state::IsSet, S::LastUpdatedBy: template_view_state::IsSet, - S::UpdatedAt: template_view_state::IsSet, + S::CreatedAt: template_view_state::IsSet, S::Name: template_view_state::IsSet, - S::Disabled: template_view_state::IsSet, + S::UpdatedAt: 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/moderation.rs b/crates/weaver-api/src/tools_ozone/moderation.rs index b72c7c2..e38bf42 100644 --- a/crates/weaver-api/src/tools_ozone/moderation.rs +++ b/crates/weaver-api/src/tools_ozone/moderation.rs @@ -5307,51 +5307,51 @@ 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; + type AttemptId; } /// 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; + type AttemptId = 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; + ///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 CreatedAt = S::CreatedAt; + 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 AttemptId = S::AttemptId; - type Status = 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 = Set; type AttemptId = S::AttemptId; + } + ///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 Status = S::Status; - type CreatedAt = Set; + type AttemptId = 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(()); + ///Marker type for the `attempt_id` field + pub struct attempt_id(()); } } @@ -5589,9 +5589,9 @@ where 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, + S::AttemptId: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -5926,65 +5926,65 @@ pub mod blob_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type MimeType; type Size; + type MimeType; + type Cid; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type MimeType = Unset; type Size = Unset; + type MimeType = Unset; + type Cid = Unset; type CreatedAt = 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 `size` field to Set + pub struct SetSize(PhantomData S>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Size = Set; type MimeType = S::MimeType; - type Size = S::Size; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; } ///State transition - sets the `mime_type` field to Set pub struct SetMimeType(PhantomData S>); impl sealed::Sealed for SetMimeType {} impl State for SetMimeType { - type Cid = S::Cid; - type MimeType = Set; type Size = S::Size; + type MimeType = Set; + type Cid = S::Cid; type CreatedAt = S::CreatedAt; } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData S>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - 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 Size = S::Size; type MimeType = S::MimeType; - type Size = Set; + type Cid = 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 Cid = S::Cid; - type MimeType = S::MimeType; type Size = S::Size; + type MimeType = S::MimeType; + type Cid = S::Cid; type CreatedAt = 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 `mime_type` field - pub struct mime_type(()); ///Marker type for the `size` field pub struct size(()); + ///Marker type for the `mime_type` field + pub struct mime_type(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -6133,9 +6133,9 @@ where impl<'a, S> BlobViewBuilder<'a, S> where S: blob_view_state::State, - S::Cid: blob_view_state::IsSet, - S::MimeType: blob_view_state::IsSet, S::Size: blob_view_state::IsSet, + S::MimeType: blob_view_state::IsSet, + S::Cid: blob_view_state::IsSet, S::CreatedAt: blob_view_state::IsSet, { /// Build the final struct @@ -6496,37 +6496,37 @@ pub mod image_details_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(()); } } @@ -6596,8 +6596,8 @@ where impl<'a, S> ImageDetailsBuilder<'a, S> where S: image_details_state::State, - S::Height: image_details_state::IsSet, S::Width: image_details_state::IsSet, + S::Height: image_details_state::IsSet, { /// Build the final struct pub fn build(self) -> ImageDetails<'a> { @@ -6896,37 +6896,37 @@ pub mod mod_event_label_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type NegateLabelVals; type CreateLabelVals; + type NegateLabelVals; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type NegateLabelVals = Unset; type CreateLabelVals = Unset; - } - ///State transition - sets the `negate_label_vals` field to Set - pub struct SetNegateLabelVals(PhantomData S>); - impl sealed::Sealed for SetNegateLabelVals {} - impl State for SetNegateLabelVals { - type NegateLabelVals = Set; - type CreateLabelVals = S::CreateLabelVals; + type NegateLabelVals = Unset; } ///State transition - sets the `create_label_vals` field to Set pub struct SetCreateLabelVals(PhantomData S>); impl sealed::Sealed for SetCreateLabelVals {} impl State for SetCreateLabelVals { - type NegateLabelVals = S::NegateLabelVals; type CreateLabelVals = Set; + type NegateLabelVals = S::NegateLabelVals; + } + ///State transition - sets the `negate_label_vals` field to Set + pub struct SetNegateLabelVals(PhantomData S>); + impl sealed::Sealed for SetNegateLabelVals {} + impl State for SetNegateLabelVals { + type CreateLabelVals = S::CreateLabelVals; + type NegateLabelVals = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `negate_label_vals` field - pub struct negate_label_vals(()); ///Marker type for the `create_label_vals` field pub struct create_label_vals(()); + ///Marker type for the `negate_label_vals` field + pub struct negate_label_vals(()); } } @@ -7030,8 +7030,8 @@ where impl<'a, S> ModEventLabelBuilder<'a, S> where S: mod_event_label_state::State, - S::NegateLabelVals: mod_event_label_state::IsSet, S::CreateLabelVals: mod_event_label_state::IsSet, + S::NegateLabelVals: mod_event_label_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventLabel<'a> { @@ -7777,37 +7777,37 @@ pub mod mod_event_tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Remove; type Add; + type Remove; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Remove = Unset; type Add = Unset; - } - ///State transition - sets the `remove` field to Set - pub struct SetRemove(PhantomData S>); - impl sealed::Sealed for SetRemove {} - impl State for SetRemove { - type Remove = Set; - type Add = S::Add; + type Remove = Unset; } ///State transition - sets the `add` field to Set pub struct SetAdd(PhantomData S>); impl sealed::Sealed for SetAdd {} impl State for SetAdd { - type Remove = S::Remove; type Add = Set; + type Remove = S::Remove; + } + ///State transition - sets the `remove` field to Set + pub struct SetRemove(PhantomData S>); + impl sealed::Sealed for SetRemove {} + impl State for SetRemove { + type Add = S::Add; + type Remove = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `remove` field - pub struct remove(()); ///Marker type for the `add` field pub struct add(()); + ///Marker type for the `remove` field + pub struct remove(()); } } @@ -7897,8 +7897,8 @@ where impl<'a, S> ModEventTagBuilder<'a, S> where S: mod_event_tag_state::State, - S::Remove: mod_event_tag_state::IsSet, S::Add: mod_event_tag_state::IsSet, + S::Remove: mod_event_tag_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventTag<'a> { @@ -8132,105 +8132,105 @@ pub mod mod_event_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Event; - type Subject; type SubjectBlobCids; - type Id; - type CreatedAt; type CreatedBy; + type CreatedAt; + type Id; + type Event; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Event = Unset; - type Subject = Unset; type SubjectBlobCids = Unset; - type Id = Unset; - type CreatedAt = Unset; type CreatedBy = Unset; - } - ///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 SubjectBlobCids = S::SubjectBlobCids; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - 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 Event = S::Event; - type Subject = Set; - type SubjectBlobCids = S::SubjectBlobCids; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; + type CreatedAt = Unset; + type Id = Unset; + type Event = Unset; + type Subject = Unset; } ///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 Event = S::Event; - type Subject = S::Subject; type SubjectBlobCids = Set; - type Id = S::Id; - type CreatedAt = S::CreatedAt; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { + type CreatedAt = S::CreatedAt; + type Id = S::Id; type Event = S::Event; type Subject = S::Subject; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { type SubjectBlobCids = S::SubjectBlobCids; - type Id = Set; + type CreatedBy = Set; type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; + type Id = S::Id; + type Event = S::Event; + 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 Event = S::Event; - type Subject = S::Subject; type SubjectBlobCids = S::SubjectBlobCids; - type Id = S::Id; - type CreatedAt = 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 = Set; + type Id = S::Id; type Event = S::Event; type Subject = S::Subject; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { type SubjectBlobCids = S::SubjectBlobCids; - type Id = S::Id; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; - type CreatedBy = Set; + type Id = Set; + type Event = S::Event; + type Subject = S::Subject; + } + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData S>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type SubjectBlobCids = S::SubjectBlobCids; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Event = 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 SubjectBlobCids = S::SubjectBlobCids; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Event = S::Event; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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 `id` field - pub struct id(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///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(()); } } @@ -8453,12 +8453,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::Event: mod_event_view_state::IsSet, - S::Subject: mod_event_view_state::IsSet, S::SubjectBlobCids: mod_event_view_state::IsSet, - S::Id: mod_event_view_state::IsSet, - S::CreatedAt: 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, { /// Build the final struct pub fn build(self) -> ModEventView<'a> { @@ -8652,105 +8652,105 @@ pub mod mod_event_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedBy; + type CreatedAt; + type Id; type Subject; type Event; - type Id; type SubjectBlobs; - type CreatedAt; - 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 Id = Unset; type Subject = Unset; type Event = Unset; - type Id = Unset; type SubjectBlobs = Unset; - type CreatedAt = Unset; - type CreatedBy = 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 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 CreatedBy = Set; + type CreatedAt = S::CreatedAt; type Id = S::Id; + type Subject = S::Subject; + type Event = S::Event; type SubjectBlobs = S::SubjectBlobs; - type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData S>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { - type Subject = S::Subject; - type Event = 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 CreatedBy = S::CreatedBy; + type CreatedAt = Set; type Id = S::Id; + type Subject = S::Subject; + type Event = S::Event; type SubjectBlobs = S::SubjectBlobs; - type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; } ///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 Subject = S::Subject; type Event = S::Event; - type Id = Set; type SubjectBlobs = S::SubjectBlobs; + } + ///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 CreatedAt = S::CreatedAt; + type Id = S::Id; + type Subject = Set; + type Event = S::Event; + type SubjectBlobs = S::SubjectBlobs; + } + ///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 Subject = S::Subject; + type Event = Set; + type SubjectBlobs = S::SubjectBlobs; } ///State transition - sets the `subject_blobs` field to Set pub struct SetSubjectBlobs(PhantomData S>); impl sealed::Sealed for SetSubjectBlobs {} impl State for SetSubjectBlobs { - type Subject = S::Subject; - type Event = S::Event; - type Id = S::Id; - type SubjectBlobs = Set; - type CreatedAt = S::CreatedAt; type CreatedBy = S::CreatedBy; - } - ///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 Event = S::Event; + type CreatedAt = S::CreatedAt; type Id = S::Id; - type SubjectBlobs = S::SubjectBlobs; - type CreatedAt = 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 Subject = S::Subject; type Event = S::Event; - type Id = S::Id; - type SubjectBlobs = S::SubjectBlobs; - type CreatedAt = S::CreatedAt; - type CreatedBy = Set; + type SubjectBlobs = 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 `id` field + pub struct id(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `event` field pub struct event(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `subject_blobs` field pub struct subject_blobs(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `created_by` field - pub struct created_by(()); } } @@ -8923,12 +8923,12 @@ where impl<'a, S> ModEventViewDetailBuilder<'a, S> where S: mod_event_view_detail_state::State, + S::CreatedBy: 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, S::SubjectBlobs: mod_event_view_detail_state::IsSet, - S::CreatedAt: mod_event_view_detail_state::IsSet, - S::CreatedBy: mod_event_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventViewDetail<'a> { @@ -9677,125 +9677,125 @@ pub mod record_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Moderation; type Repo; type Uri; - type BlobCids; + type Moderation; type IndexedAt; + type Cid; + type BlobCids; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Moderation = Unset; type Repo = Unset; type Uri = Unset; - type BlobCids = Unset; + type Moderation = Unset; type IndexedAt = Unset; + type Cid = Unset; + type BlobCids = Unset; type Value = 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 Moderation = S::Moderation; - type Repo = S::Repo; - type Uri = S::Uri; - type BlobCids = S::BlobCids; - type IndexedAt = S::IndexedAt; - type Value = S::Value; - } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData S>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { - type Cid = S::Cid; - type Moderation = Set; - type Repo = S::Repo; - type Uri = S::Uri; - type BlobCids = S::BlobCids; - type IndexedAt = S::IndexedAt; - type Value = S::Value; - } ///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 Moderation = S::Moderation; type Repo = Set; type Uri = S::Uri; - type BlobCids = S::BlobCids; + type Moderation = S::Moderation; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type BlobCids = S::BlobCids; type Value = S::Value; } ///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 Moderation = S::Moderation; type Repo = S::Repo; type Uri = Set; - type BlobCids = S::BlobCids; + type Moderation = S::Moderation; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type BlobCids = S::BlobCids; type Value = S::Value; } - ///State transition - sets the `blob_cids` field to Set - pub struct SetBlobCids(PhantomData S>); - impl sealed::Sealed for SetBlobCids {} - impl State for SetBlobCids { - type Cid = S::Cid; - 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 Repo = S::Repo; type Uri = S::Uri; - type BlobCids = Set; + type Moderation = Set; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type BlobCids = S::BlobCids; 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 Cid = S::Cid; + type Repo = S::Repo; + type Uri = S::Uri; type Moderation = S::Moderation; + type IndexedAt = Set; + type Cid = S::Cid; + type BlobCids = S::BlobCids; + 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 Repo = S::Repo; type Uri = S::Uri; + type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type Cid = Set; type BlobCids = S::BlobCids; - type IndexedAt = Set; + type Value = S::Value; + } + ///State transition - sets the `blob_cids` field to Set + pub struct SetBlobCids(PhantomData S>); + impl sealed::Sealed for SetBlobCids {} + impl State for SetBlobCids { + type Repo = S::Repo; + type Uri = S::Uri; + type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type BlobCids = 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 Cid = S::Cid; - type Moderation = S::Moderation; type Repo = S::Repo; type Uri = S::Uri; - type BlobCids = S::BlobCids; + type Moderation = S::Moderation; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type BlobCids = S::BlobCids; type Value = 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 `moderation` field - pub struct moderation(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `uri` field pub struct uri(()); - ///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 `cid` field + pub struct cid(()); + ///Marker type for the `blob_cids` field + pub struct blob_cids(()); ///Marker type for the `value` field pub struct value(()); } @@ -9970,12 +9970,12 @@ where impl<'a, S> RecordViewBuilder<'a, S> where S: record_view_state::State, - S::Cid: record_view_state::IsSet, - S::Moderation: record_view_state::IsSet, S::Repo: record_view_state::IsSet, S::Uri: record_view_state::IsSet, - S::BlobCids: record_view_state::IsSet, + S::Moderation: record_view_state::IsSet, S::IndexedAt: record_view_state::IsSet, + S::Cid: record_view_state::IsSet, + S::BlobCids: record_view_state::IsSet, S::Value: record_view_state::IsSet, { /// Build the final struct @@ -10069,127 +10069,127 @@ pub mod record_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type Repo; type Blobs; - type Uri; - type Cid; type IndexedAt; + type Repo; + type Value; type Moderation; + type Uri; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; - type Repo = Unset; type Blobs = Unset; - type Uri = Unset; - type Cid = Unset; type IndexedAt = Unset; + type Repo = Unset; + type Value = Unset; type Moderation = Unset; + type Uri = 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; + ///State transition - sets the `blobs` field to Set + pub struct SetBlobs(PhantomData S>); + impl sealed::Sealed for SetBlobs {} + impl State for SetBlobs { + type Blobs = Set; + type IndexedAt = S::IndexedAt; type Repo = S::Repo; - type Blobs = S::Blobs; + type Value = S::Value; + type Moderation = S::Moderation; type Uri = S::Uri; type Cid = S::Cid; - 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 Blobs = S::Blobs; + type IndexedAt = Set; + type Repo = S::Repo; + type Value = S::Value; type Moderation = S::Moderation; + type Uri = S::Uri; + 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 Repo = Set; type Blobs = S::Blobs; + type IndexedAt = S::IndexedAt; + type Repo = Set; + type Value = S::Value; + type Moderation = S::Moderation; type Uri = S::Uri; type Cid = S::Cid; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Blobs = S::Blobs; type IndexedAt = S::IndexedAt; + type Repo = S::Repo; + type Value = Set; type Moderation = S::Moderation; + type Uri = S::Uri; + type Cid = S::Cid; } - ///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; + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData S>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { + type Blobs = S::Blobs; + type IndexedAt = S::IndexedAt; type Repo = S::Repo; - type Blobs = Set; + type Value = S::Value; + type Moderation = Set; type Uri = S::Uri; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; } ///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 Repo = S::Repo; type Blobs = S::Blobs; - type Uri = Set; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Repo = S::Repo; + type Value = S::Value; type Moderation = S::Moderation; + 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 Repo = S::Repo; type Blobs = S::Blobs; - type Uri = S::Uri; - type Cid = Set; type IndexedAt = S::IndexedAt; - 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 Value = S::Value; type Repo = S::Repo; - type Blobs = S::Blobs; - type Uri = S::Uri; - type Cid = S::Cid; - type IndexedAt = 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 Value = S::Value; - type Repo = S::Repo; - type Blobs = S::Blobs; + type Moderation = S::Moderation; type Uri = S::Uri; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Moderation = Set; + type Cid = 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 `repo` field - pub struct repo(()); ///Marker type for the `blobs` field pub struct blobs(()); - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `value` field + pub struct value(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -10382,13 +10382,13 @@ where impl<'a, S> RecordViewDetailBuilder<'a, S> where S: record_view_detail_state::State, - S::Value: record_view_detail_state::IsSet, - S::Repo: record_view_detail_state::IsSet, S::Blobs: record_view_detail_state::IsSet, - S::Uri: record_view_detail_state::IsSet, - S::Cid: record_view_detail_state::IsSet, S::IndexedAt: record_view_detail_state::IsSet, + S::Repo: record_view_detail_state::IsSet, + S::Value: record_view_detail_state::IsSet, S::Moderation: record_view_detail_state::IsSet, + S::Uri: record_view_detail_state::IsSet, + S::Cid: record_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordViewDetail<'a> { @@ -10689,85 +10689,85 @@ pub mod repo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type RelatedRecords; type Handle; - type Did; type IndexedAt; type Moderation; - type RelatedRecords; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type RelatedRecords = Unset; type Handle = Unset; - type Did = Unset; type IndexedAt = Unset; type Moderation = Unset; - type RelatedRecords = Unset; + type Did = Unset; + } + ///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 Handle = S::Handle; + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + 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 Handle = Set; - type Did = S::Did; - type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; type RelatedRecords = S::RelatedRecords; - } - ///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 = Set; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type RelatedRecords = S::RelatedRecords; + 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 RelatedRecords = S::RelatedRecords; type Handle = S::Handle; - type Did = S::Did; type IndexedAt = Set; type Moderation = S::Moderation; - type RelatedRecords = S::RelatedRecords; + type Did = S::Did; } ///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 Handle = S::Handle; - type Did = S::Did; type IndexedAt = S::IndexedAt; type Moderation = Set; - type RelatedRecords = S::RelatedRecords; + type Did = S::Did; } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData S>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type RelatedRecords = S::RelatedRecords; type Handle = S::Handle; - type Did = S::Did; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type RelatedRecords = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `related_records` field + pub struct related_records(()); ///Marker type for the `handle` field pub struct handle(()); - ///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 `related_records` field - pub struct related_records(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -11023,11 +11023,11 @@ impl<'a, S: repo_view_state::State> RepoViewBuilder<'a, S> { impl<'a, S> RepoViewBuilder<'a, S> where S: repo_view_state::State, + S::RelatedRecords: repo_view_state::IsSet, S::Handle: repo_view_state::IsSet, - S::Did: repo_view_state::IsSet, S::IndexedAt: repo_view_state::IsSet, S::Moderation: repo_view_state::IsSet, - S::RelatedRecords: repo_view_state::IsSet, + S::Did: repo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoView<'a> { @@ -11149,85 +11149,85 @@ pub mod repo_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RelatedRecords; type IndexedAt; - type Handle; - type Did; + type RelatedRecords; type Moderation; + type Did; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RelatedRecords = Unset; type IndexedAt = Unset; - type Handle = Unset; - type Did = Unset; + type RelatedRecords = Unset; type Moderation = Unset; - } - ///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 IndexedAt = S::IndexedAt; - type Handle = S::Handle; - type Did = S::Did; - type Moderation = S::Moderation; + type Did = 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 RelatedRecords = S::RelatedRecords; type IndexedAt = Set; - type Handle = S::Handle; + type RelatedRecords = S::RelatedRecords; + type Moderation = S::Moderation; type Did = S::Did; + 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 IndexedAt = S::IndexedAt; + type RelatedRecords = Set; type Moderation = S::Moderation; + type Did = S::Did; + 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 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 { type IndexedAt = S::IndexedAt; - type Handle = Set; + type RelatedRecords = S::RelatedRecords; + type Moderation = Set; type Did = S::Did; - 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 RelatedRecords = S::RelatedRecords; type IndexedAt = S::IndexedAt; - type Handle = S::Handle; - type Did = Set; + type RelatedRecords = S::RelatedRecords; type Moderation = S::Moderation; + type Did = Set; + 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; + ///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 = S::Handle; + type RelatedRecords = S::RelatedRecords; + type Moderation = S::Moderation; type Did = S::Did; - type Moderation = Set; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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 `did` field - pub struct did(()); + ///Marker type for the `related_records` field + pub struct related_records(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -11546,11 +11546,11 @@ impl<'a, S: repo_view_detail_state::State> RepoViewDetailBuilder<'a, S> { impl<'a, S> RepoViewDetailBuilder<'a, S> where S: repo_view_detail_state::State, - S::RelatedRecords: repo_view_detail_state::IsSet, S::IndexedAt: repo_view_detail_state::IsSet, - S::Handle: repo_view_detail_state::IsSet, - S::Did: repo_view_detail_state::IsSet, + S::RelatedRecords: repo_view_detail_state::IsSet, S::Moderation: repo_view_detail_state::IsSet, + S::Did: repo_view_detail_state::IsSet, + S::Handle: repo_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoViewDetail<'a> { @@ -11797,177 +11797,177 @@ pub mod reporter_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ReportedRecordCount; - type RecordReportCount; - type TakendownRecordCount; - type TakendownAccountCount; - type ReportedAccountCount; - type LabeledRecordCount; type Did; + type LabeledRecordCount; + type ReportedAccountCount; + type RecordReportCount; + type ReportedRecordCount; type LabeledAccountCount; type AccountReportCount; + type TakendownRecordCount; + type TakendownAccountCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ReportedRecordCount = Unset; - type RecordReportCount = Unset; - type TakendownRecordCount = Unset; - type TakendownAccountCount = Unset; - type ReportedAccountCount = Unset; - type LabeledRecordCount = Unset; type Did = Unset; + type LabeledRecordCount = Unset; + type ReportedAccountCount = Unset; + type RecordReportCount = Unset; + type ReportedRecordCount = Unset; type LabeledAccountCount = Unset; type AccountReportCount = Unset; + type TakendownRecordCount = Unset; + type TakendownAccountCount = Unset; } - ///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 RecordReportCount = S::RecordReportCount; - type TakendownRecordCount = S::TakendownRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; + ///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 LabeledRecordCount = S::LabeledRecordCount; - type Did = S::Did; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = S::LabeledAccountCount; type AccountReportCount = S::AccountReportCount; - } - ///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 RecordReportCount = Set; type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; - type Did = S::Did; - type LabeledAccountCount = S::LabeledAccountCount; - type AccountReportCount = S::AccountReportCount; } - ///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 RecordReportCount = S::RecordReportCount; - type TakendownRecordCount = Set; - type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; - 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 Did = S::Did; - type LabeledAccountCount = S::LabeledAccountCount; - type AccountReportCount = S::AccountReportCount; - } - ///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 ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type TakendownRecordCount = S::TakendownRecordCount; - type TakendownAccountCount = Set; + type LabeledRecordCount = Set; type ReportedAccountCount = S::ReportedAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; - type Did = S::Did; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = S::LabeledAccountCount; type AccountReportCount = S::AccountReportCount; + type TakendownRecordCount = S::TakendownRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; } ///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 ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type TakendownRecordCount = S::TakendownRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = Set; - type LabeledRecordCount = S::LabeledRecordCount; type Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = Set; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = S::LabeledAccountCount; type AccountReportCount = S::AccountReportCount; - } - ///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 RecordReportCount = S::RecordReportCount; type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; - type LabeledRecordCount = Set; + } + ///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 Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = Set; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = S::LabeledAccountCount; type AccountReportCount = S::AccountReportCount; - } - ///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 RecordReportCount = S::RecordReportCount; type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; + } + ///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 Did = S::Did; type LabeledRecordCount = S::LabeledRecordCount; - type Did = Set; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = Set; type LabeledAccountCount = S::LabeledAccountCount; type AccountReportCount = S::AccountReportCount; + type TakendownRecordCount = S::TakendownRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; } ///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 ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type TakendownRecordCount = S::TakendownRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; - type LabeledRecordCount = S::LabeledRecordCount; type Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = Set; type AccountReportCount = S::AccountReportCount; + type TakendownRecordCount = S::TakendownRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; } ///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 Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; + type LabeledAccountCount = S::LabeledAccountCount; + type AccountReportCount = Set; type TakendownRecordCount = S::TakendownRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type ReportedAccountCount = S::ReportedAccountCount; - 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 Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; + type LabeledAccountCount = S::LabeledAccountCount; + type AccountReportCount = S::AccountReportCount; + type TakendownRecordCount = Set; + type TakendownAccountCount = S::TakendownAccountCount; + } + ///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 Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type RecordReportCount = S::RecordReportCount; + type ReportedRecordCount = S::ReportedRecordCount; type LabeledAccountCount = S::LabeledAccountCount; - type AccountReportCount = Set; + type AccountReportCount = S::AccountReportCount; + type TakendownRecordCount = S::TakendownRecordCount; + type TakendownAccountCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reported_record_count` field - pub struct reported_record_count(()); - ///Marker type for the `record_report_count` field - pub struct record_report_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 `reported_account_count` field - pub struct reported_account_count(()); - ///Marker type for the `labeled_record_count` field - pub struct labeled_record_count(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `labeled_record_count` field + pub struct labeled_record_count(()); + ///Marker type for the `reported_account_count` field + pub struct reported_account_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 `labeled_account_count` field pub struct labeled_account_count(()); ///Marker type for the `account_report_count` field pub struct account_report_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(()); } } @@ -12190,15 +12190,15 @@ where impl<'a, S> ReporterStatsBuilder<'a, S> where S: reporter_stats_state::State, - S::ReportedRecordCount: reporter_stats_state::IsSet, - S::RecordReportCount: reporter_stats_state::IsSet, - S::TakendownRecordCount: reporter_stats_state::IsSet, - S::TakendownAccountCount: reporter_stats_state::IsSet, - S::ReportedAccountCount: reporter_stats_state::IsSet, - S::LabeledRecordCount: reporter_stats_state::IsSet, S::Did: reporter_stats_state::IsSet, + S::LabeledRecordCount: reporter_stats_state::IsSet, + S::ReportedAccountCount: reporter_stats_state::IsSet, + S::RecordReportCount: reporter_stats_state::IsSet, + S::ReportedRecordCount: reporter_stats_state::IsSet, S::LabeledAccountCount: reporter_stats_state::IsSet, S::AccountReportCount: reporter_stats_state::IsSet, + S::TakendownRecordCount: reporter_stats_state::IsSet, + S::TakendownAccountCount: reporter_stats_state::IsSet, { /// Build the final struct pub fn build(self) -> ReporterStats<'a> { @@ -12476,105 +12476,105 @@ pub mod scheduled_action_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; + type CreatedBy; type CreatedAt; type Status; - type Action; + type Id; type Did; - type CreatedBy; + 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 CreatedBy = Unset; type CreatedAt = Unset; type Status = Unset; - type Action = Unset; + type Id = Unset; type Did = Unset; - type CreatedBy = Unset; + type Action = 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; + ///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 Status = S::Status; - type Action = S::Action; + type Id = S::Id; type Did = S::Did; - type CreatedBy = S::CreatedBy; + 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 CreatedBy = S::CreatedBy; type CreatedAt = Set; type Status = S::Status; - type Action = S::Action; + type Id = S::Id; type Did = S::Did; - type CreatedBy = S::CreatedBy; + type Action = S::Action; } ///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 CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Status = Set; - type Action = S::Action; + type Id = S::Id; type Did = S::Did; - type CreatedBy = S::CreatedBy; + 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 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 CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Action = Set; + type Id = Set; type Did = S::Did; - type CreatedBy = S::CreatedBy; + 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 CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Action = S::Action; + type Id = S::Id; type Did = Set; - type CreatedBy = S::CreatedBy; + 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; + ///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 CreatedAt = S::CreatedAt; type Status = S::Status; - type Action = S::Action; + type Id = S::Id; type Did = S::Did; - type CreatedBy = Set; + 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 `created_by` field + pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `status` field pub struct status(()); - ///Marker type for the `action` field - pub struct action(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `created_by` field - pub struct created_by(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -12911,12 +12911,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::CreatedBy: scheduled_action_view_state::IsSet, S::CreatedAt: scheduled_action_view_state::IsSet, S::Status: scheduled_action_view_state::IsSet, - S::Action: scheduled_action_view_state::IsSet, + S::Id: scheduled_action_view_state::IsSet, S::Did: scheduled_action_view_state::IsSet, - S::CreatedBy: scheduled_action_view_state::IsSet, + S::Action: scheduled_action_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduledActionView<'a> { @@ -13401,85 +13401,85 @@ pub mod subject_status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type UpdatedAt; + type Id; type Subject; + type UpdatedAt; type ReviewState; - type Id; + 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 UpdatedAt = Unset; + type Id = Unset; type Subject = Unset; + type UpdatedAt = Unset; type ReviewState = Unset; - type Id = 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 UpdatedAt = S::UpdatedAt; + ///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 Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; type ReviewState = S::ReviewState; - type Id = S::Id; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { type CreatedAt = S::CreatedAt; - type UpdatedAt = Set; - type Subject = S::Subject; - type ReviewState = S::ReviewState; - 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 CreatedAt = S::CreatedAt; - type UpdatedAt = S::UpdatedAt; + type Id = S::Id; type Subject = Set; + type UpdatedAt = S::UpdatedAt; type ReviewState = S::ReviewState; + type CreatedAt = S::CreatedAt; + } + ///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 Subject = S::Subject; + type UpdatedAt = Set; + type ReviewState = S::ReviewState; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `review_state` field to Set pub struct SetReviewState(PhantomData S>); impl sealed::Sealed for SetReviewState {} impl State for SetReviewState { - type CreatedAt = S::CreatedAt; - type UpdatedAt = S::UpdatedAt; + type Id = S::Id; type Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; type ReviewState = 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 CreatedAt = S::CreatedAt; - type UpdatedAt = S::UpdatedAt; + } + ///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 Subject = S::Subject; + type UpdatedAt = S::UpdatedAt; type ReviewState = S::ReviewState; - type Id = 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 `updated_at` field - pub struct updated_at(()); + ///Marker type for the `id` field + pub struct id(()); ///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(()); - ///Marker type for the `id` field - pub struct id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -14014,11 +14014,11 @@ where impl<'a, S> SubjectStatusViewBuilder<'a, S> where S: subject_status_view_state::State, - S::CreatedAt: subject_status_view_state::IsSet, - S::UpdatedAt: subject_status_view_state::IsSet, + S::Id: 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, - S::Id: subject_status_view_state::IsSet, + S::CreatedAt: subject_status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectStatusView<'a> { @@ -14741,49 +14741,49 @@ pub mod video_details_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Length; + type Width; type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Length = Unset; + 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 Length = S::Length; - type Height = S::Height; - } ///State transition - sets the `length` field to Set pub struct SetLength(PhantomData S>); impl sealed::Sealed for SetLength {} impl State for SetLength { - type Width = S::Width; type Length = Set; + type Width = S::Width; + type Height = S::Height; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Length = S::Length; + 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 Length = S::Length; + type Width = S::Width; type Height = 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 `length` field pub struct length(()); + ///Marker type for the `width` field + pub struct width(()); ///Marker type for the `height` field pub struct height(()); } @@ -14878,8 +14878,8 @@ where impl<'a, S> VideoDetailsBuilder<'a, S> where S: video_details_state::State, - S::Width: video_details_state::IsSet, S::Length: video_details_state::IsSet, + S::Width: video_details_state::IsSet, S::Height: video_details_state::IsSet, { /// Build the final struct 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 4c81045..fac0362 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 Event; type Subject; type CreatedBy; - type Event; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Event = Unset; type Subject = Unset; type CreatedBy = Unset; - type Event = Unset; + } + ///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 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 Event = S::Event; type Subject = Set; type CreatedBy = S::CreatedBy; - 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 Subject = S::Subject; - type CreatedBy = 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 = S::Subject; - type CreatedBy = S::CreatedBy; - type Event = Set; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///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(()); - ///Marker type for the `event` field - pub struct event(()); } } @@ -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::Event: emit_event_state::IsSet, S::Subject: emit_event_state::IsSet, S::CreatedBy: emit_event_state::IsSet, - S::Event: 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 0079811..09f354b 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 Summary; type Day; + type Summary; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Summary = Unset; 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 Summary = Set; - type Day = S::Day; + 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 Summary = S::Summary; type Day = Set; + type Summary = S::Summary; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `summary` field - pub struct summary(()); ///Marker type for the `day` field pub struct day(()); + ///Marker type for the `summary` field + pub struct summary(()); } } @@ -334,8 +334,8 @@ where impl<'a, S> TimelineItemBuilder<'a, S> where S: timeline_item_state::State, - S::Summary: timeline_item_state::IsSet, S::Day: timeline_item_state::IsSet, + S::Summary: 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 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; - } - ///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; - type EventSubjectType = S::EventSubjectType; - type EventType = S::EventType; + type Count = Unset; } ///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; + type Count = S::Count; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData S>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type Count = S::Count; type EventSubjectType = S::EventSubjectType; type EventType = 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 EventSubjectType = S::EventSubjectType; + type EventType = S::EventType; + 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 `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::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 c44d959..334fff3 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs @@ -761,67 +761,67 @@ pub mod schedule_action_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subjects; - type CreatedBy; type Action; type Scheduling; + type Subjects; + type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subjects = Unset; - type CreatedBy = Unset; type Action = Unset; type Scheduling = Unset; - } - ///State transition - sets the `subjects` field to Set - pub struct SetSubjects(PhantomData S>); - impl sealed::Sealed for SetSubjects {} - impl State for SetSubjects { - type Subjects = Set; - type CreatedBy = S::CreatedBy; - type Action = S::Action; - type Scheduling = S::Scheduling; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type Subjects = S::Subjects; - type CreatedBy = Set; - type Action = S::Action; - type Scheduling = S::Scheduling; + type Subjects = Unset; + type CreatedBy = Unset; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type Subjects = S::Subjects; - type CreatedBy = S::CreatedBy; type Action = Set; type Scheduling = S::Scheduling; + type Subjects = S::Subjects; + type CreatedBy = S::CreatedBy; } ///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 Scheduling = Set; type Subjects = S::Subjects; type CreatedBy = S::CreatedBy; + } + ///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 Scheduling = Set; + type Scheduling = S::Scheduling; + type Subjects = 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 Action = S::Action; + type Scheduling = S::Scheduling; + type Subjects = S::Subjects; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subjects` field - pub struct subjects(()); - ///Marker type for the `created_by` field - pub struct created_by(()); ///Marker type for the `action` field pub struct action(()); ///Marker type for the `scheduling` field pub struct scheduling(()); + ///Marker type for the `subjects` field + pub struct subjects(()); + ///Marker type for the `created_by` field + pub struct created_by(()); } } @@ -960,10 +960,10 @@ where impl<'a, S> ScheduleActionBuilder<'a, S> where S: schedule_action_state::State, - S::Subjects: schedule_action_state::IsSet, - S::CreatedBy: schedule_action_state::IsSet, S::Action: schedule_action_state::IsSet, S::Scheduling: schedule_action_state::IsSet, + S::Subjects: schedule_action_state::IsSet, + S::CreatedBy: 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 ee28db1..cd97179 100644 --- a/crates/weaver-api/src/tools_ozone/safelink.rs +++ b/crates/weaver-api/src/tools_ozone/safelink.rs @@ -144,151 +144,151 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Pattern; - type Url; - type CreatedAt; + type CreatedBy; type Action; type Id; + type CreatedAt; type EventType; + type Url; type Reason; - type CreatedBy; + 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; - type CreatedAt = Unset; + type CreatedBy = Unset; type Action = Unset; type Id = Unset; + type CreatedAt = Unset; type EventType = Unset; + type Url = Unset; type Reason = Unset; - type CreatedBy = Unset; + type Pattern = 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 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 Id = S::Id; - type EventType = S::EventType; - type Reason = S::Reason; - type CreatedBy = S::CreatedBy; - } - ///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 CreatedAt = S::CreatedAt; - type Action = S::Action; - type Id = S::Id; type EventType = S::EventType; - type Reason = S::Reason; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Pattern = S::Pattern; type Url = S::Url; - type CreatedAt = Set; - type Action = S::Action; - type Id = S::Id; - type EventType = S::EventType; type Reason = S::Reason; - type CreatedBy = S::CreatedBy; + 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 Pattern = S::Pattern; - type Url = S::Url; - type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; type Action = Set; type Id = S::Id; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; + type Url = S::Url; type Reason = S::Reason; - type CreatedBy = S::CreatedBy; + type Pattern = S::Pattern; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Pattern = S::Pattern; - type Url = S::Url; - type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; type Action = S::Action; type Id = Set; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; + type Url = S::Url; type Reason = S::Reason; + type Pattern = S::Pattern; + } + ///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 Action = S::Action; + type Id = S::Id; + type CreatedAt = Set; + type EventType = S::EventType; + type Url = S::Url; + type Reason = S::Reason; + type Pattern = S::Pattern; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData S>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type Pattern = S::Pattern; - type Url = S::Url; - type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; type Action = S::Action; type Id = S::Id; + type CreatedAt = S::CreatedAt; type EventType = Set; + type Url = S::Url; type Reason = S::Reason; + 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 CreatedBy = S::CreatedBy; + type Action = S::Action; + type Id = S::Id; + type CreatedAt = S::CreatedAt; + type EventType = S::EventType; + type Url = Set; + type Reason = S::Reason; + type Pattern = S::Pattern; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Pattern = S::Pattern; - type Url = S::Url; - type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; type Action = S::Action; type Id = S::Id; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; + type Url = S::Url; type Reason = 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 Pattern = S::Pattern; - type Url = S::Url; - type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `pattern` field to Set + pub struct SetPattern(PhantomData S>); + impl sealed::Sealed for SetPattern {} + impl State for SetPattern { + type CreatedBy = S::CreatedBy; type Action = S::Action; type Id = S::Id; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; + type Url = S::Url; type Reason = S::Reason; - type CreatedBy = Set; + 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 `created_at` field - pub struct created_at(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `action` field pub struct action(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `event_type` field pub struct event_type(()); + ///Marker type for the `url` field + pub struct url(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `created_by` field - pub struct created_by(()); + ///Marker type for the `pattern` field + pub struct pattern(()); } } @@ -508,14 +508,14 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::Pattern: event_state::IsSet, - S::Url: event_state::IsSet, - S::CreatedAt: event_state::IsSet, + S::CreatedBy: event_state::IsSet, S::Action: event_state::IsSet, S::Id: event_state::IsSet, + S::CreatedAt: event_state::IsSet, S::EventType: event_state::IsSet, + S::Url: event_state::IsSet, S::Reason: event_state::IsSet, - S::CreatedBy: event_state::IsSet, + S::Pattern: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -1257,127 +1257,127 @@ pub mod url_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; - type CreatedBy; - type CreatedAt; - type Pattern; type Reason; + type CreatedBy; type UpdatedAt; + type CreatedAt; + type Url; type Action; + type Pattern; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Url = Unset; - type CreatedBy = Unset; - type CreatedAt = Unset; - type Pattern = Unset; type Reason = Unset; + type CreatedBy = Unset; type UpdatedAt = Unset; + type CreatedAt = Unset; + type Url = Unset; type Action = Unset; + 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 Url = Set; + ///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 CreatedAt = S::CreatedAt; - type Pattern = S::Pattern; - type Reason = S::Reason; type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type Action = S::Action; + 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 Url = S::Url; + type Reason = S::Reason; type CreatedBy = Set; + type UpdatedAt = S::UpdatedAt; type CreatedAt = S::CreatedAt; + type Url = S::Url; + type Action = S::Action; type Pattern = S::Pattern; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { type Reason = S::Reason; - type UpdatedAt = S::UpdatedAt; + type CreatedBy = S::CreatedBy; + type UpdatedAt = Set; + type CreatedAt = S::CreatedAt; + type Url = S::Url; type Action = S::Action; + type Pattern = S::Pattern; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Url = S::Url; - type CreatedBy = S::CreatedBy; - type CreatedAt = Set; - type Pattern = S::Pattern; type Reason = S::Reason; - type UpdatedAt = S::UpdatedAt; - 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 CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Pattern = Set; - type Reason = S::Reason; type UpdatedAt = S::UpdatedAt; - 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 CreatedAt = Set; type Url = S::Url; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - type Pattern = S::Pattern; - type Reason = Set; - type UpdatedAt = S::UpdatedAt; type Action = S::Action; + type Pattern = S::Pattern; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - 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 Reason = S::Reason; type CreatedBy = S::CreatedBy; + type UpdatedAt = S::UpdatedAt; type CreatedAt = S::CreatedAt; - type Pattern = S::Pattern; - type Reason = S::Reason; - type UpdatedAt = Set; + type Url = Set; type Action = S::Action; + 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 Url = S::Url; + type Reason = S::Reason; type CreatedBy = S::CreatedBy; + type UpdatedAt = S::UpdatedAt; type CreatedAt = S::CreatedAt; + type Url = S::Url; + type Action = 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 Reason = S::Reason; + type CreatedBy = S::CreatedBy; type UpdatedAt = S::UpdatedAt; - type Action = Set; + type CreatedAt = S::CreatedAt; + type Url = S::Url; + type Action = S::Action; + type Pattern = 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 `created_by` field - pub struct created_by(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `pattern` field - pub struct pattern(()); ///Marker type for the `reason` field pub struct reason(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///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 `url` field + pub struct url(()); ///Marker type for the `action` field pub struct action(()); + ///Marker type for the `pattern` field + pub struct pattern(()); } } @@ -1567,13 +1567,13 @@ where impl<'a, S> UrlRuleBuilder<'a, S> where S: url_rule_state::State, - S::Url: url_rule_state::IsSet, - S::CreatedBy: url_rule_state::IsSet, - S::CreatedAt: url_rule_state::IsSet, - S::Pattern: url_rule_state::IsSet, S::Reason: url_rule_state::IsSet, + S::CreatedBy: url_rule_state::IsSet, S::UpdatedAt: url_rule_state::IsSet, + S::CreatedAt: url_rule_state::IsSet, + S::Url: url_rule_state::IsSet, S::Action: url_rule_state::IsSet, + S::Pattern: url_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> UrlRule<'a> { 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 945ae73..62a26d6 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 Action; + type Reason; type Url; + type Action; type Pattern; - type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Action = Unset; + type Reason = Unset; type Url = Unset; + type Action = Unset; type Pattern = Unset; - type Reason = 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; + ///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 Action = S::Action; type Pattern = S::Pattern; - type Reason = S::Reason; } ///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 Reason = S::Reason; type Url = Set; + type Action = S::Action; 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; + type Action = 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 Action = S::Action; - type Url = S::Url; - type Pattern = Set; type Reason = S::Reason; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Action = S::Action; type Url = S::Url; - type Pattern = S::Pattern; - type Reason = Set; + type Action = S::Action; + type Pattern = 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 `reason` field + pub struct reason(()); ///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(()); } } @@ -256,10 +256,10 @@ where impl<'a, S> AddRuleBuilder<'a, S> where S: add_rule_state::State, - S::Action: add_rule_state::IsSet, + S::Reason: add_rule_state::IsSet, S::Url: add_rule_state::IsSet, + S::Action: add_rule_state::IsSet, S::Pattern: add_rule_state::IsSet, - S::Reason: add_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> AddRule<'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 6473a09..53e8f53 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs @@ -48,8 +48,8 @@ pub mod update_rule_state { pub trait State: sealed::Sealed { type Action; type Pattern; - type Reason; type Url; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -57,8 +57,8 @@ pub mod update_rule_state { impl State for Empty { type Action = Unset; type Pattern = Unset; - type Reason = Unset; type Url = Unset; + type Reason = Unset; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); @@ -66,8 +66,8 @@ pub mod update_rule_state { impl State for SetAction { type Action = Set; type Pattern = S::Pattern; - type Reason = S::Reason; type Url = S::Url; + type Reason = S::Reason; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); @@ -75,17 +75,8 @@ pub mod update_rule_state { impl State for SetPattern { type Action = S::Action; type Pattern = Set; - type Reason = S::Reason; - 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 Action = S::Action; - type Pattern = S::Pattern; - type Reason = Set; type Url = S::Url; + type Reason = S::Reason; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); @@ -93,8 +84,17 @@ pub mod update_rule_state { impl State for SetUrl { type Action = S::Action; type Pattern = S::Pattern; - type Reason = S::Reason; type Url = Set; + type Reason = S::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Action = S::Action; + type Pattern = S::Pattern; + type Url = S::Url; + type Reason = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -103,10 +103,10 @@ pub mod update_rule_state { 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 `url` field pub struct url(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -258,8 +258,8 @@ where S: update_rule_state::State, S::Action: update_rule_state::IsSet, S::Pattern: update_rule_state::IsSet, - S::Reason: update_rule_state::IsSet, S::Url: update_rule_state::IsSet, + S::Reason: update_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set.rs b/crates/weaver-api/src/tools_ozone/set.rs index 974fde5..a1c7cef 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 Name; - type UpdatedAt; + type SetSize; type CreatedAt; + type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SetSize = Unset; type Name = Unset; - type UpdatedAt = Unset; + type SetSize = Unset; type CreatedAt = 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; - type Name = S::Name; - type UpdatedAt = S::UpdatedAt; - type CreatedAt = S::CreatedAt; + type UpdatedAt = Unset; } ///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 Name = Set; - type UpdatedAt = S::UpdatedAt; + type SetSize = S::SetSize; type CreatedAt = S::CreatedAt; + type UpdatedAt = S::UpdatedAt; } - ///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; + ///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 = Set; + type SetSize = Set; type CreatedAt = S::CreatedAt; + type UpdatedAt = S::UpdatedAt; } ///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 Name = S::Name; - type UpdatedAt = S::UpdatedAt; + type SetSize = S::SetSize; type CreatedAt = Set; + type UpdatedAt = S::UpdatedAt; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type Name = S::Name; + type SetSize = S::SetSize; + type CreatedAt = S::CreatedAt; + type UpdatedAt = 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 `name` field pub struct name(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); + ///Marker type for the `set_size` field + pub struct set_size(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); } } @@ -493,10 +493,10 @@ where impl<'a, S> SetViewBuilder<'a, S> where S: set_view_state::State, - S::SetSize: set_view_state::IsSet, S::Name: set_view_state::IsSet, - S::UpdatedAt: set_view_state::IsSet, + S::SetSize: set_view_state::IsSet, S::CreatedAt: set_view_state::IsSet, + S::UpdatedAt: 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 06c548b..426fd0d 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 Name; type Values; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; 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 Name = Set; - type Values = S::Values; + 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 Name = S::Name; type Values = 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 Values = S::Values; + type Name = 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 `values` field pub struct values(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AddValuesBuilder<'a, S> where S: add_values_state::State, - S::Name: add_values_state::IsSet, S::Values: add_values_state::IsSet, + S::Name: 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 ffc11bb..cedfa40 100644 --- a/crates/weaver-api/src/tools_ozone/setting.rs +++ b/crates/weaver-api/src/tools_ozone/setting.rs @@ -55,105 +55,105 @@ pub mod defs_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Scope; + type LastUpdatedBy; type Key; + type Value; type Did; - type LastUpdatedBy; + type Scope; type CreatedBy; - type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Scope = Unset; + type LastUpdatedBy = Unset; type Key = Unset; + type Value = Unset; type Did = Unset; - type LastUpdatedBy = Unset; + type Scope = Unset; type CreatedBy = Unset; - type Value = Unset; } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData S>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { - type Scope = Set; + ///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 Key = S::Key; + type Value = S::Value; type Did = S::Did; - type LastUpdatedBy = S::LastUpdatedBy; + type Scope = S::Scope; type CreatedBy = S::CreatedBy; - type Value = S::Value; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData S>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type Scope = S::Scope; + type LastUpdatedBy = S::LastUpdatedBy; type Key = Set; + type Value = S::Value; type Did = S::Did; + type Scope = S::Scope; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type LastUpdatedBy = S::LastUpdatedBy; + type Key = S::Key; + type Value = Set; + type Did = S::Did; + type Scope = S::Scope; type CreatedBy = S::CreatedBy; - type Value = S::Value; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Scope = S::Scope; + type LastUpdatedBy = S::LastUpdatedBy; type Key = S::Key; + type Value = S::Value; type Did = Set; - type LastUpdatedBy = S::LastUpdatedBy; + type Scope = S::Scope; type CreatedBy = S::CreatedBy; - type Value = S::Value; } - ///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 Scope = S::Scope; + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData S>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type LastUpdatedBy = S::LastUpdatedBy; type Key = S::Key; + type Value = S::Value; type Did = S::Did; - type LastUpdatedBy = Set; + type Scope = Set; type CreatedBy = S::CreatedBy; - 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 Scope = S::Scope; - type Key = S::Key; - type Did = S::Did; type LastUpdatedBy = S::LastUpdatedBy; - type CreatedBy = 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 Scope = S::Scope; type Key = S::Key; + type Value = S::Value; type Did = S::Did; - type LastUpdatedBy = S::LastUpdatedBy; - type CreatedBy = S::CreatedBy; - type Value = Set; + type Scope = S::Scope; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `scope` field - pub struct scope(()); + ///Marker type for the `last_updated_by` field + pub struct last_updated_by(()); ///Marker type for the `key` field pub struct key(()); + ///Marker type for the `value` field + pub struct value(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `last_updated_by` field - pub struct last_updated_by(()); + ///Marker type for the `scope` field + pub struct scope(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `value` field - pub struct value(()); } } @@ -397,12 +397,12 @@ where impl<'a, S> DefsOptionBuilder<'a, S> where S: defs_option_state::State, - S::Scope: defs_option_state::IsSet, + S::LastUpdatedBy: defs_option_state::IsSet, S::Key: defs_option_state::IsSet, + S::Value: defs_option_state::IsSet, S::Did: defs_option_state::IsSet, - S::LastUpdatedBy: defs_option_state::IsSet, + S::Scope: defs_option_state::IsSet, S::CreatedBy: defs_option_state::IsSet, - S::Value: defs_option_state::IsSet, { /// Build the final struct pub fn build(self) -> DefsOption<'a> { 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 4da22d4..ac50570 100644 --- a/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs @@ -41,51 +41,51 @@ pub mod upsert_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Value; type Key; type Scope; - 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 Key = Unset; type Scope = 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; + type Key = S::Key; + type Scope = S::Scope; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData S>); impl sealed::Sealed for SetKey {} impl State for SetKey { + type Value = S::Value; type Key = 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 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; + type Scope = 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 `key` field pub struct key(()); ///Marker type for the `scope` field pub struct scope(()); - ///Marker type for the `value` field - pub struct value(()); } } @@ -218,9 +218,9 @@ where impl<'a, S> UpsertOptionBuilder<'a, S> where S: upsert_option_state::State, + S::Value: upsert_option_state::IsSet, S::Key: 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/team/add_member.rs b/crates/weaver-api/src/tools_ozone/team/add_member.rs index e2de037..94b3e75 100644 --- a/crates/weaver-api/src/tools_ozone/team/add_member.rs +++ b/crates/weaver-api/src/tools_ozone/team/add_member.rs @@ -33,37 +33,37 @@ pub mod add_member_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Role; + 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 Role = 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 Role = S::Role; + type Did = Unset; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData S>); impl sealed::Sealed for SetRole {} impl State for SetRole { - type Did = S::Did; type Role = 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 Role = S::Role; + 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 `role` field pub struct role(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> AddMemberBuilder<'a, S> where S: add_member_state::State, - S::Did: add_member_state::IsSet, S::Role: add_member_state::IsSet, + S::Did: add_member_state::IsSet, { /// Build the final struct pub fn build(self) -> AddMember<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification.rs b/crates/weaver-api/src/tools_ozone/verification.rs index ab3a9ba..1b70bd8 100644 --- a/crates/weaver-api/src/tools_ozone/verification.rs +++ b/crates/weaver-api/src/tools_ozone/verification.rs @@ -74,103 +74,103 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Issuer; type Subject; - type Handle; - type Uri; type DisplayName; - type Issuer; + type Uri; + type Handle; 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 Subject = Unset; - type Handle = Unset; - type Uri = Unset; type DisplayName = Unset; - type Issuer = Unset; + type Uri = Unset; + type Handle = 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; + type Subject = S::Subject; + type DisplayName = S::DisplayName; + type Uri = S::Uri; + type Handle = S::Handle; + 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 Issuer = S::Issuer; type Subject = Set; - type Handle = S::Handle; - type Uri = S::Uri; type DisplayName = S::DisplayName; - type Issuer = S::Issuer; + type Uri = S::Uri; + 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 { + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type Issuer = S::Issuer; type Subject = S::Subject; - type Handle = Set; + type DisplayName = Set; type Uri = S::Uri; - type DisplayName = S::DisplayName; - type Issuer = S::Issuer; + type Handle = S::Handle; 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 Subject = S::Subject; - type Handle = S::Handle; - type Uri = Set; - type DisplayName = S::DisplayName; type Issuer = S::Issuer; - 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 DisplayName = S::DisplayName; + type Uri = Set; type Handle = S::Handle; - type Uri = S::Uri; - type DisplayName = Set; - type Issuer = S::Issuer; 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 { + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Issuer = S::Issuer; type Subject = S::Subject; - type Handle = S::Handle; - type Uri = S::Uri; type DisplayName = S::DisplayName; - type Issuer = Set; + type Uri = S::Uri; + type Handle = 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 Subject = S::Subject; - type Handle = S::Handle; - type Uri = S::Uri; type DisplayName = S::DisplayName; - type Issuer = S::Issuer; + type Uri = S::Uri; + type Handle = S::Handle; type CreatedAt = 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 `subject` field pub struct subject(()); - ///Marker type for the `handle` field - pub struct handle(()); - ///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 `uri` field + pub struct uri(()); + ///Marker type for the `handle` field + pub struct handle(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -479,11 +479,11 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, + S::Issuer: verification_view_state::IsSet, S::Subject: verification_view_state::IsSet, - S::Handle: verification_view_state::IsSet, - S::Uri: verification_view_state::IsSet, S::DisplayName: verification_view_state::IsSet, - S::Issuer: verification_view_state::IsSet, + S::Uri: verification_view_state::IsSet, + S::Handle: verification_view_state::IsSet, S::CreatedAt: verification_view_state::IsSet, { /// Build the final struct 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 e4159ca..104d617 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 DisplayName; type Handle; + type DisplayName; + 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 DisplayName = Unset; type Handle = Unset; + type DisplayName = 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 `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Handle = Set; type DisplayName = S::DisplayName; - type Handle = S::Handle; + type Subject = S::Subject; } ///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 DisplayName = 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 DisplayName = 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 Handle = S::Handle; type DisplayName = S::DisplayName; - type Handle = 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 `display_name` field - pub struct display_name(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///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::DisplayName: verification_input_state::IsSet, S::Handle: verification_input_state::IsSet, + S::DisplayName: 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 4df939a..5ccad00 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/.env-prod b/crates/weaver-app/.env-prod index 9b544f2..e1a4b06 100644 --- a/crates/weaver-app/.env-prod +++ b/crates/weaver-app/.env-prod @@ -1,13 +1,13 @@ WEAVER_APP_ENV="prod" -WEAVER_APP_HOST="https://alpha.weaver.sh" -WEAVER_APP_DOMAIN="https://alpha.weaver.sh" +WEAVER_APP_HOST="https://weaver.sh" +WEAVER_APP_DOMAIN="weaver.sh" WEAVER_PORT=8080 WEAVER_APP_SCOPES="atproto transition:generic" WEAVER_CLIENT_NAME="Weaver" -WEAVER_LOGO_URI="https://alpha.weaver.sh/favicon.ico" -WEAVER_TOS_URI="https://alpha.weaver.sh/tos" -WEAVER_PRIVACY_POLICY_URI="https://alpha.weaver.sh/privacy" +WEAVER_LOGO_URI="https://weaver.sh/favicon.ico" +WEAVER_TOS_URI="https://weaver.sh/tos" +WEAVER_PRIVACY_POLICY_URI="https://weaver.sh/privacy" WEAVER_OWNER_DID="did:plc:yfvwmnlztr4dwkb7hwz55r2g" WEAVER_INDEXER_URL="https://index.weaver.sh" WEAVER_INDEXER_DID="did:web:index.weaver.sh" diff --git a/crates/weaver-app/Cargo.toml b/crates/weaver-app/Cargo.toml index bd64729..9cffc00 100644 --- a/crates/weaver-app/Cargo.toml +++ b/crates/weaver-app/Cargo.toml @@ -39,7 +39,7 @@ use-index = ["weaver-common/use-index"] web = ["dioxus/web", "dioxus-primitives/web"] desktop = ["dioxus/desktop"] mobile = ["dioxus/mobile"] -server = [ "dioxus/server", "dep:jacquard-axum", "dep:axum", "dep:resvg", "dep:usvg", "dep:tiny-skia", "dep:textwrap", "dep:askama", "dep:fontdb", "dep:lightningcss"] +server = [ "dioxus/server", "dep:jacquard-axum", "dep:axum", "dep:axum-extra", "dep:tower", "dep:resvg", "dep:usvg", "dep:tiny-skia", "dep:textwrap", "dep:askama", "dep:fontdb", "dep:lightningcss"] collab-worker = ["weaver-common/iroh"] @@ -60,7 +60,9 @@ markdown-weaver = { workspace = true } weaver-renderer = { path = "../weaver-renderer" } n0-future = { workspace = true } dioxus-primitives = { git = "https://github.com/DioxusLabs/components", version = "0.0.1", default-features = false, features = ["router"] } -axum = {version = "0.8.6", optional = true} +axum = { version = "0.8.6", optional = true } +axum-extra = { version = "0.10", optional = true, features = ["typed-header"] } +tower = { version = "0.5", optional = true } mime-sniffer = {version = "^0.1"} chrono = { version = "0.4" } serde = { version = "1.0" } diff --git a/crates/weaver-app/assets/styling/layouts.css b/crates/weaver-app/assets/styling/layouts.css index 4a550a6..845fd27 100644 --- a/crates/weaver-app/assets/styling/layouts.css +++ b/crates/weaver-app/assets/styling/layouts.css @@ -94,11 +94,11 @@ .notebook-layout { display: grid; grid-template-columns: - minmax(280px, 1fr) - minmax(0, 90rem) - minmax(280px, 1fr); - gap: 2rem; - max-width: calc(90rem + 560px + 4rem); + minmax(240px, 1fr) + minmax(0, 95ch) + minmax(240px, 1fr); + gap: 1rem; + max-width: calc(95ch + 480px + 4rem); margin: 0 auto; padding: 2.5rem 1.25rem 2.5rem 0; } @@ -119,7 +119,7 @@ @media (max-width: 1400px) { .notebook-layout { - grid-template-columns: minmax(1rem, 1fr) minmax(0, 90rem) minmax(1rem, 1fr) !important; + grid-template-columns: minmax(1rem, 1fr) minmax(0, 95ch) minmax(1rem, 1fr) !important; gap: 0 !important; max-width: 100vw !important; box-sizing: border-box !important; diff --git a/crates/weaver-app/src/components/app_link.rs b/crates/weaver-app/src/components/app_link.rs new file mode 100644 index 0000000..8e49ab6 --- /dev/null +++ b/crates/weaver-app/src/components/app_link.rs @@ -0,0 +1,339 @@ +//! Router-agnostic link and navigation for shared components. +//! +//! AppLink dispatches to either `Link` or `Link` based on +//! the current LinkMode context, preserving proper client-side navigation semantics. +//! +//! AppNavigate provides programmatic navigation that dispatches similarly. + +use crate::env::WEAVER_APP_HOST; +use crate::host_mode::LinkMode; +use crate::{Route, SubdomainRoute}; +use dioxus::prelude::*; +use jacquard::smol_str::SmolStr; +use jacquard::types::string::AtIdentifier; + +/// Target for router-agnostic links. +#[derive(Clone, PartialEq)] +pub enum AppLinkTarget { + /// Entry by title path: /:ident/:book/:title or /:title + Entry { + ident: AtIdentifier<'static>, + book_title: SmolStr, + entry_path: SmolStr, + }, + /// Entry by rkey: /:ident/:book/e/:rkey or /e/:rkey + EntryByRkey { + ident: AtIdentifier<'static>, + book_title: SmolStr, + rkey: SmolStr, + }, + /// Entry edit: /:ident/:book/e/:rkey/edit or /e/:rkey/edit + EntryEdit { + ident: AtIdentifier<'static>, + book_title: SmolStr, + rkey: SmolStr, + }, + /// Notebook index: /:ident/:book or / + Notebook { + ident: AtIdentifier<'static>, + book_title: SmolStr, + }, + /// Profile/repository: /:ident or /u/:ident + Profile { ident: AtIdentifier<'static> }, + /// Standalone entry: /:ident/e/:rkey (always main domain in subdomain mode) + StandaloneEntry { + ident: AtIdentifier<'static>, + rkey: SmolStr, + }, + /// Standalone entry edit: /:ident/e/:rkey/edit + StandaloneEntryEdit { + ident: AtIdentifier<'static>, + rkey: SmolStr, + }, + /// New draft: /:ident/new?notebook=... + NewDraft { + ident: AtIdentifier<'static>, + notebook: Option, + }, + /// Drafts list: /:ident/drafts + Drafts { ident: AtIdentifier<'static> }, + /// Invites page: /:ident/invites + Invites { ident: AtIdentifier<'static> }, +} + +#[derive(Props, Clone, PartialEq)] +pub struct AppLinkProps { + pub to: AppLinkTarget, + #[props(default)] + pub class: Option, + pub children: Element, +} + +/// Router-agnostic link component. +/// +/// Renders the appropriate `Link` or `Link` based on LinkMode context. +#[component] +pub fn AppLink(props: AppLinkProps) -> Element { + let link_mode = use_context::(); + let class = props.class.clone().unwrap_or_default(); + + match link_mode { + LinkMode::MainDomain => { + let route = match props.to.clone() { + AppLinkTarget::Entry { + ident, + book_title, + entry_path, + } => Route::EntryPage { + ident, + book_title, + title: entry_path, + }, + AppLinkTarget::EntryByRkey { + ident, + book_title, + rkey, + } => Route::NotebookEntryByRkey { + ident, + book_title, + rkey, + }, + AppLinkTarget::EntryEdit { + ident, + book_title, + rkey, + } => Route::NotebookEntryEdit { + ident, + book_title, + rkey, + }, + AppLinkTarget::Notebook { ident, book_title } => { + Route::NotebookIndex { ident, book_title } + } + AppLinkTarget::Profile { ident } => Route::RepositoryIndex { ident }, + AppLinkTarget::StandaloneEntry { ident, rkey } => { + Route::StandaloneEntry { ident, rkey } + } + AppLinkTarget::StandaloneEntryEdit { ident, rkey } => { + Route::StandaloneEntryEdit { ident, rkey } + } + AppLinkTarget::NewDraft { ident, notebook } => Route::NewDraft { ident, notebook }, + AppLinkTarget::Drafts { ident } => Route::DraftsList { ident }, + AppLinkTarget::Invites { ident } => Route::InvitesPage { ident }, + }; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + LinkMode::Subdomain => { + // For subdomain mode, some links go to SubdomainRoute, others to main domain + match props.to.clone() { + AppLinkTarget::Entry { entry_path, .. } => { + let route = SubdomainRoute::SubdomainEntry { title: entry_path }; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + AppLinkTarget::EntryByRkey { rkey, .. } => { + let route = SubdomainRoute::SubdomainEntryByRkey { rkey }; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + AppLinkTarget::EntryEdit { rkey, .. } => { + let route = SubdomainRoute::SubdomainEntryEdit { rkey }; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + AppLinkTarget::Notebook { .. } => { + let route = SubdomainRoute::SubdomainLanding {}; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + AppLinkTarget::Profile { ident } => { + let route = SubdomainRoute::SubdomainProfile { ident }; + rsx! { + Link { to: route, class: "{class}", {props.children} } + } + } + // These go to main domain in subdomain mode + AppLinkTarget::StandaloneEntry { ident, rkey } => { + let href = format!("{}/{}/e/{}", WEAVER_APP_HOST, ident, rkey); + rsx! { + a { href: "{href}", class: "{class}", {props.children} } + } + } + AppLinkTarget::StandaloneEntryEdit { ident, rkey } => { + let href = format!("{}/{}/e/{}/edit", WEAVER_APP_HOST, ident, rkey); + rsx! { + a { href: "{href}", class: "{class}", {props.children} } + } + } + AppLinkTarget::NewDraft { ident, notebook } => { + let href = match notebook { + Some(nb) => format!("{}/{}/new?notebook={}", WEAVER_APP_HOST, ident, nb), + None => format!("{}/{}/new", WEAVER_APP_HOST, ident), + }; + rsx! { + a { href: "{href}", class: "{class}", {props.children} } + } + } + AppLinkTarget::Drafts { ident } => { + let href = format!("{}/{}/drafts", WEAVER_APP_HOST, ident); + rsx! { + a { href: "{href}", class: "{class}", {props.children} } + } + } + AppLinkTarget::Invites { ident } => { + let href = format!("{}/{}/invites", WEAVER_APP_HOST, ident); + rsx! { + a { href: "{href}", class: "{class}", {props.children} } + } + } + } + } + } +} + +/// Navigation function type for programmatic routing. +pub type NavigateFn = std::rc::Rc; + +/// Hook to get the app-wide navigation function. +/// Must be used with AppNavigatorProvider in context. +pub fn use_app_navigate() -> NavigateFn { + use_context::() +} + +/// Provides the main domain navigation function. +/// Call this in App to set up navigation context. +pub fn use_main_navigator_provider() { + let navigator = use_navigator(); + use_context_provider(move || { + let navigator = navigator.clone(); + std::rc::Rc::new(move |target: AppLinkTarget| { + let route = match target { + AppLinkTarget::Entry { + ident, + book_title, + entry_path, + } => Route::EntryPage { + ident, + book_title, + title: entry_path, + }, + AppLinkTarget::EntryByRkey { + ident, + book_title, + rkey, + } => Route::NotebookEntryByRkey { + ident, + book_title, + rkey, + }, + AppLinkTarget::EntryEdit { + ident, + book_title, + rkey, + } => Route::NotebookEntryEdit { + ident, + book_title, + rkey, + }, + AppLinkTarget::Notebook { ident, book_title } => { + Route::NotebookIndex { ident, book_title } + } + AppLinkTarget::Profile { ident } => Route::RepositoryIndex { ident }, + AppLinkTarget::StandaloneEntry { ident, rkey } => { + Route::StandaloneEntry { ident, rkey } + } + AppLinkTarget::StandaloneEntryEdit { ident, rkey } => { + Route::StandaloneEntryEdit { ident, rkey } + } + AppLinkTarget::NewDraft { ident, notebook } => Route::NewDraft { ident, notebook }, + AppLinkTarget::Drafts { ident } => Route::DraftsList { ident }, + AppLinkTarget::Invites { ident } => Route::InvitesPage { ident }, + }; + navigator.push(route); + }) as NavigateFn + }); +} + +/// Provides the subdomain navigation function. +/// Call this in SubdomainApp to set up navigation context. +pub fn use_subdomain_navigator_provider() { + let navigator = use_navigator(); + use_context_provider(move || { + let navigator = navigator.clone(); + std::rc::Rc::new(move |target: AppLinkTarget| { + match target { + // These navigate within subdomain + AppLinkTarget::Entry { entry_path, .. } => { + navigator.push(SubdomainRoute::SubdomainEntry { title: entry_path }); + } + AppLinkTarget::EntryByRkey { rkey, .. } => { + navigator.push(SubdomainRoute::SubdomainEntryByRkey { rkey }); + } + AppLinkTarget::EntryEdit { rkey, .. } => { + navigator.push(SubdomainRoute::SubdomainEntryEdit { rkey }); + } + AppLinkTarget::Notebook { .. } => { + navigator.push(SubdomainRoute::SubdomainLanding {}); + } + AppLinkTarget::Profile { ident } => { + navigator.push(SubdomainRoute::SubdomainProfile { ident }); + } + // These go to main domain - use window.location + AppLinkTarget::StandaloneEntry { ident, rkey } + | AppLinkTarget::StandaloneEntryEdit { ident, rkey } => { + #[cfg(target_arch = "wasm32")] + if let Some(window) = web_sys::window() { + let path = format!("{}/{}/e/{}", WEAVER_APP_HOST, ident, rkey); + let _ = window.location().set_href(&path); + } + #[cfg(not(target_arch = "wasm32"))] + { + let _ = ident; + let _ = rkey; + } + } + AppLinkTarget::NewDraft { ident, notebook } => { + #[cfg(target_arch = "wasm32")] + if let Some(window) = web_sys::window() { + let path = match notebook { + Some(nb) => { + format!("{}/{}/new?notebook={}", WEAVER_APP_HOST, ident, nb) + } + None => format!("{}/{}/new", WEAVER_APP_HOST, ident), + }; + let _ = window.location().set_href(&path); + } + #[cfg(not(target_arch = "wasm32"))] + { + let _ = notebook; + let _ = ident; + } + } + AppLinkTarget::Drafts { ident } => { + #[cfg(target_arch = "wasm32")] + if let Some(window) = web_sys::window() { + let path = format!("{}/{}/drafts", WEAVER_APP_HOST, ident); + let _ = window.location().set_href(&path); + } + #[cfg(not(target_arch = "wasm32"))] + let _ = ident; + } + AppLinkTarget::Invites { ident } => { + #[cfg(target_arch = "wasm32")] + if let Some(window) = web_sys::window() { + let path = format!("{}/{}/invites", WEAVER_APP_HOST, ident); + let _ = window.location().set_href(&path); + } + #[cfg(not(target_arch = "wasm32"))] + let _ = ident; + } + } + }) as NavigateFn + }); +} diff --git a/crates/weaver-app/src/components/author_list/component.rs b/crates/weaver-app/src/components/author_list/component.rs index b5cbe2b..84ea5d3 100644 --- a/crates/weaver-app/src/components/author_list/component.rs +++ b/crates/weaver-app/src/components/author_list/component.rs @@ -1,6 +1,6 @@ //! AuthorList component for displaying multiple authors with progressive disclosure. -use crate::Route; +use crate::components::{AppLink, AppLinkTarget}; use dioxus::prelude::*; use jacquard::IntoStatic; use jacquard::types::ident::AtIdentifier; @@ -210,11 +210,11 @@ fn AuthorBlock(info: AuthorInfo, avatar_size: u32) -> Element { let handle_display = info.handle.as_ref(); rsx! { - Link { - to: Route::RepositoryIndex { + AppLink { + to: AppLinkTarget::Profile { ident: AtIdentifier::Handle(info.handle.clone()) }, - class: "embed-author author-block", + class: Some("embed-author author-block".to_string()), if let Some(ref avatar) = info.avatar_url { img { class: "embed-avatar", @@ -241,11 +241,11 @@ fn AuthorInline(info: AuthorInfo) -> Element { .unwrap_or_else(|| info.handle.as_ref()); rsx! { - Link { - to: Route::RepositoryIndex { + AppLink { + to: AppLinkTarget::Profile { ident: AtIdentifier::Handle(info.handle.clone()) }, - class: "author-inline", + class: Some("author-inline".to_string()), "{display}" } } diff --git a/crates/weaver-app/src/components/entry.rs b/crates/weaver-app/src/components/entry.rs index fae6a54..b6045c1 100644 --- a/crates/weaver-app/src/components/entry.rs +++ b/crates/weaver-app/src/components/entry.rs @@ -1,5 +1,6 @@ #![allow(non_snake_case)] +use crate::components::{AppLink, AppLinkTarget}; use crate::Route; #[cfg(feature = "server")] use crate::blobcache::BlobCache; @@ -305,7 +306,6 @@ pub fn EntryCard( author_count: usize, ident: AtIdentifier<'static>, ) -> Element { - use crate::Route; use crate::auth::AuthState; use jacquard::from_data; use weaver_api::sh_weaver::notebook::entry::Entry; @@ -384,13 +384,13 @@ pub fn EntryCard( div { class: "entry-card", div { class: "entry-card-meta", div { class: "entry-card-header", - Link { - to: Route::EntryPage { + AppLink { + to: AppLinkTarget::Entry { ident: ident.clone(), book_title: book_title.clone(), - title: entry_path.clone().into() + entry_path: entry_path.clone().into(), }, - class: "entry-card-title-link", + class: Some("entry-card-title-link".to_string()), h3 { class: "entry-card-title", "{title}" } } div { class: "entry-card-date", @@ -453,7 +453,6 @@ pub fn FeedEntryCard( profile_ident: Option>, #[props(default)] on_pinned_changed: Option>, ) -> Element { - use crate::Route; use crate::auth::AuthState; let title = entry_view @@ -517,12 +516,12 @@ pub fn FeedEntryCard( div { class: "entry-card feed-entry-card", // Header: title (and date if no author) div { class: "entry-card-header", - Link { - to: Route::StandaloneEntry { + AppLink { + to: AppLinkTarget::StandaloneEntry { ident: ident.clone(), - rkey: rkey.clone().into() + rkey: rkey.clone(), }, - class: "entry-card-title-link", + class: Some("entry-card-title-link".to_string()), h3 { class: "entry-card-title", "{title}" } } // Date inline with title when no author shown @@ -588,7 +587,9 @@ pub fn EntryMetadata( #[props(default)] word_count: Option, #[props(default)] reading_time_mins: Option, ) -> Element { - let navigator = use_navigator(); + use crate::components::use_app_navigate; + + let navigate = use_app_navigate(); let title = entry_view .title @@ -603,7 +604,7 @@ pub fn EntryMetadata( let nav_ident = ident.clone(); let on_removed = move |_| { if let Some(ref title) = nav_book_title { - navigator.push(Route::NotebookIndex { + navigate(AppLinkTarget::Notebook { ident: nav_ident.clone(), book_title: title.clone(), }); @@ -697,13 +698,13 @@ pub fn NavButton( }; rsx! { - Link { - to: Route::EntryPage { + AppLink { + to: AppLinkTarget::Entry { ident: ident.clone(), book_title: book_title.clone(), - title: entry_path.into() + entry_path: entry_path.into(), }, - class: "nav-button nav-button-{direction}", + class: Some(format!("nav-button nav-button-{}", direction)), if title_first { span { class: "nav-title", "{entry_title}" } span { class: "nav-arrow", "{arrow}" } diff --git a/crates/weaver-app/src/components/entry_actions.rs b/crates/weaver-app/src/components/entry_actions.rs index d8910f5..af06015 100644 --- a/crates/weaver-app/src/components/entry_actions.rs +++ b/crates/weaver-app/src/components/entry_actions.rs @@ -1,6 +1,6 @@ //! Action buttons for entries (edit, delete, remove from notebook, pin/unpin). -use crate::Route; +use crate::components::{AppLink, AppLinkTarget, use_app_navigate}; use crate::auth::AuthState; use crate::components::button::{Button, ButtonVariant}; use crate::components::dialog::{DialogContent, DialogDescription, DialogRoot, DialogTitle}; @@ -52,7 +52,6 @@ pub struct EntryActionsProps { pub fn EntryActions(props: EntryActionsProps) -> Element { let auth_state = use_context::>(); let fetcher = use_context::(); - let navigator = use_navigator(); let mut show_delete_confirm = use_signal(|| false); let mut show_remove_confirm = use_signal(|| false); @@ -90,28 +89,31 @@ pub fn EntryActions(props: EntryActionsProps) -> Element { None => return rsx! {}, // Can't edit without rkey }; - // Build edit route based on whether entry is in a notebook + // Build edit link target based on whether entry is in a notebook let ident = props.entry_uri.authority().clone(); - let edit_route = if props.in_notebook { + let edit_target = if props.in_notebook { if let Some(ref notebook) = props.notebook_title { - Route::NotebookEntryEdit { - ident: ident.into_static(), + AppLinkTarget::EntryEdit { + ident: ident.clone().into_static(), book_title: notebook.clone(), rkey: rkey.clone().into(), } } else { - Route::StandaloneEntryEdit { - ident: ident.into_static(), + AppLinkTarget::StandaloneEntryEdit { + ident: ident.clone().into_static(), rkey: rkey.clone().into(), } } } else { - Route::StandaloneEntryEdit { - ident: ident.into_static(), + AppLinkTarget::StandaloneEntryEdit { + ident: ident.clone().into_static(), rkey: rkey.clone().into(), } }; + // Get navigation function for post-delete redirect + let navigate = use_app_navigate(); + let entry_uri_for_delete = props.entry_uri.clone(); let entry_title = props.entry_title.clone(); @@ -119,7 +121,7 @@ pub fn EntryActions(props: EntryActionsProps) -> Element { let handle_delete = move |_| { let fetcher = delete_fetcher.clone(); let uri = entry_uri_for_delete.clone(); - let navigator = navigator.clone(); + let navigate = navigate.clone(); spawn(async move { use jacquard::prelude::*; @@ -142,7 +144,7 @@ pub fn EntryActions(props: EntryActionsProps) -> Element { }; let request = DeleteRecord::new() - .repo(AtIdentifier::Did(did)) + .repo(AtIdentifier::Did(did.clone())) .collection(collection.clone()) .rkey(rkey.clone()) .build(); @@ -150,8 +152,10 @@ pub fn EntryActions(props: EntryActionsProps) -> Element { match client.send(request).await { Ok(_) => { show_delete_confirm.set(false); - // Navigate back to home after delete - navigator.push(Route::Home {}); + // Navigate to profile after delete + navigate(AppLinkTarget::Profile { + ident: AtIdentifier::Did(did), + }); } Err(e) => { error.set(Some(format!("Delete failed: {:?}", e))); @@ -435,9 +439,9 @@ pub fn EntryActions(props: EntryActionsProps) -> Element { div { class: "entry-actions", // Edit button (always visible for owner) - Link { - to: edit_route, - class: "entry-action-link", + AppLink { + to: edit_target, + class: Some("entry-action-link".to_string()), Button { variant: ButtonVariant::Ghost, "Edit" diff --git a/crates/weaver-app/src/components/mod.rs b/crates/weaver-app/src/components/mod.rs index cc9883b..d5d73ea 100644 --- a/crates/weaver-app/src/components/mod.rs +++ b/crates/weaver-app/src/components/mod.rs @@ -2,6 +2,12 @@ //! They can be used to defined common UI elements like buttons, forms, and modals. In this template, we define a Hero //! component and an Echo component for fullstack apps to be used in our app. +pub mod app_link; +pub use app_link::{ + AppLink, AppLinkTarget, use_app_navigate, use_main_navigator_provider, + use_subdomain_navigator_provider, +}; + pub mod css; pub use css::NotebookCss; diff --git a/crates/weaver-app/src/components/notebook_cover.rs b/crates/weaver-app/src/components/notebook_cover.rs index 1280909..1a0bec4 100644 --- a/crates/weaver-app/src/components/notebook_cover.rs +++ b/crates/weaver-app/src/components/notebook_cover.rs @@ -1,6 +1,6 @@ #![allow(non_snake_case)] -use crate::Route; +use crate::components::{AppLink, AppLinkTarget}; use crate::components::AuthorList; use crate::components::button::{Button, ButtonVariant}; use dioxus::prelude::*; @@ -93,12 +93,12 @@ pub fn NotebookCover( if is_owner { if let Some(ref owner_ident) = ident { div { class: "notebook-cover-actions", - Link { - to: Route::NewDraft { + AppLink { + to: AppLinkTarget::NewDraft { ident: owner_ident.clone(), notebook: Some(SmolStr::from(title.as_str())) }, - class: "notebook-cover-action-link", + class: Some("notebook-cover-action-link".to_string()), Button { variant: ButtonVariant::Outline, "+ Add Entry" diff --git a/crates/weaver-app/src/components/record_editor.rs b/crates/weaver-app/src/components/record_editor.rs index 7e3628a..9fa1da3 100644 --- a/crates/weaver-app/src/components/record_editor.rs +++ b/crates/weaver-app/src/components/record_editor.rs @@ -1327,7 +1327,7 @@ pub fn EditableRecordContent( Ok(response) => { if let Ok(output) = response.into_output() { tracing::info!("Record created: {}", output.uri); - let link = format!("{}/record/{}", crate::env::WEAVER_APP_DOMAIN, output.uri); + let link = format!("{}/record/{}", crate::env::WEAVER_APP_HOST, output.uri); nav.push(link); } } @@ -1378,7 +1378,7 @@ pub fn EditableRecordContent( } tracing::info!("Record replaced: {}", create_output.uri); - let link = format!("{}/record/{}", crate::env::WEAVER_APP_DOMAIN, create_output.uri); + let link = format!("{}/record/{}", crate::env::WEAVER_APP_HOST, create_output.uri); nav.push(link); } } diff --git a/crates/weaver-app/src/components/record_view.rs b/crates/weaver-app/src/components/record_view.rs index 2b08cde..3566b77 100644 --- a/crates/weaver-app/src/components/record_view.rs +++ b/crates/weaver-app/src/components/record_view.rs @@ -398,7 +398,7 @@ pub fn DataView( #[component] pub fn HighlightedUri(uri: AtUri<'static>) -> Element { let s = uri.as_str(); - let link = format!("{}/record/{}", crate::env::WEAVER_APP_DOMAIN, s); + let link = format!("{}/record/{}", crate::env::WEAVER_APP_HOST, s); if let Some(rest) = s.strip_prefix("at://") { let parts: Vec<&str> = rest.splitn(3, '/').collect(); diff --git a/crates/weaver-app/src/host_mode.rs b/crates/weaver-app/src/host_mode.rs new file mode 100644 index 0000000..dec6147 --- /dev/null +++ b/crates/weaver-app/src/host_mode.rs @@ -0,0 +1,160 @@ +//! Host mode context for subdomain and custom domain routing. + +use crate::env::WEAVER_APP_HOST; +use jacquard::smol_str::{SmolStr, format_smolstr}; +use jacquard::types::string::AtIdentifier; +use serde::{Deserialize, Serialize}; + +/// Context for subdomain routing - identifies the notebook being served. +#[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize)] +#[serde(bound(deserialize = ""))] +pub struct SubdomainContext { + /// DID of the notebook owner. + #[serde(deserialize_with = "deserialize_static_ident")] + pub owner: AtIdentifier<'static>, + /// Notebook path (same as subdomain). + pub notebook_path: SmolStr, + + /// Notebook title. + pub notebook_title: SmolStr, + /// Notebook rkey for direct lookups. + pub notebook_rkey: SmolStr, +} + +fn deserialize_static_ident<'de, D>(deserializer: D) -> Result, D::Error> +where + D: serde::Deserializer<'de>, +{ + use jacquard::IntoStatic; + let did: AtIdentifier<'de> = Deserialize::deserialize(deserializer)?; + Ok(did.into_static()) +} + +impl SubdomainContext { + /// Get the owner as an AtIdentifier for route parameters. + pub fn owner_ident(&self) -> AtIdentifier<'static> { + self.owner.clone() + } +} + +/// Link mode for generating appropriate URLs based on host context. +/// +/// Components use this context to generate links that work on both +/// the main domain and subdomain hosting. +#[derive(Clone, Debug, Default, PartialEq, Eq)] +pub enum LinkMode { + /// Main domain - full paths with /:ident/:notebook/:entry + #[default] + MainDomain, + /// Subdomain - simplified paths like /:entry + Subdomain, +} + +impl LinkMode { + /// Check if we're in subdomain mode. + pub fn is_subdomain(&self) -> bool { + matches!(self, LinkMode::Subdomain) + } + + /// Generate link to a notebook entry by title. + pub fn entry_link( + &self, + ident: &AtIdentifier<'_>, + book_title: &str, + entry_title: &str, + ) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/{}/{}", ident, book_title, entry_title), + LinkMode::Subdomain => format_smolstr!("/{}", entry_title), + } + } + + /// Generate link to a notebook entry by rkey. + pub fn entry_rkey_link( + &self, + ident: &AtIdentifier<'_>, + book_title: &str, + rkey: &str, + ) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/{}/e/{}", ident, book_title, rkey), + LinkMode::Subdomain => format_smolstr!("/e/{}", rkey), + } + } + + /// Generate link to edit a notebook entry by rkey. + pub fn entry_edit_link( + &self, + ident: &AtIdentifier<'_>, + book_title: &str, + rkey: &str, + ) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/{}/e/{}/edit", ident, book_title, rkey), + LinkMode::Subdomain => format_smolstr!("/e/{}/edit", rkey), + } + } + + /// Generate link to a notebook index. + pub fn notebook_link(&self, ident: &AtIdentifier<'_>, book_title: &str) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/{}", ident, book_title), + LinkMode::Subdomain => SmolStr::new_static("/"), + } + } + + /// Generate link to a profile/repository. + pub fn profile_link(&self, ident: &AtIdentifier<'_>) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}", ident), + LinkMode::Subdomain => format_smolstr!("/u/{}", ident), + } + } + + /// Generate link to a standalone entry. + pub fn standalone_entry_link(&self, ident: &AtIdentifier<'_>, rkey: &str) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/e/{}", ident, rkey), + // Standalone entries don't exist in subdomain mode - link to main domain + LinkMode::Subdomain => format_smolstr!("{}/{}/e/{}", WEAVER_APP_HOST, ident, rkey), + } + } + + /// Generate link to edit a standalone entry. + pub fn standalone_entry_edit_link(&self, ident: &AtIdentifier<'_>, rkey: &str) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/e/{}/edit", ident, rkey), + // Edit on main domain + LinkMode::Subdomain => format_smolstr!("{}/{}/e/{}/edit", WEAVER_APP_HOST, ident, rkey), + } + } + + /// Generate link to create a new draft. + pub fn new_draft_link(&self, ident: &AtIdentifier<'_>, notebook: Option<&str>) -> SmolStr { + match (self, notebook) { + (LinkMode::MainDomain, Some(nb)) => format_smolstr!("/{}/new?notebook={}", ident, nb), + (LinkMode::MainDomain, None) => format_smolstr!("/{}/new", ident), + // Drafts are on main domain + (LinkMode::Subdomain, Some(nb)) => { + format_smolstr!("{}/{}/new?notebook={}", WEAVER_APP_HOST, ident, nb) + } + (LinkMode::Subdomain, None) => format_smolstr!("{}/{}/new", WEAVER_APP_HOST, ident), + } + } + + /// Generate link to drafts list. + pub fn drafts_link(&self, ident: &AtIdentifier<'_>) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/drafts", ident), + LinkMode::Subdomain => format_smolstr!("{}/{}/drafts", WEAVER_APP_HOST, ident), + } + } + + /// Generate link to invites page. + pub fn invites_link(&self, ident: &AtIdentifier<'_>) -> SmolStr { + match self { + LinkMode::MainDomain => format_smolstr!("/{}/invites", ident), + LinkMode::Subdomain => format_smolstr!("{}/{}/invites", WEAVER_APP_HOST, ident), + } + } +} diff --git a/crates/weaver-app/src/lib.rs b/crates/weaver-app/src/lib.rs index a5d6df8..4dcfc07 100644 --- a/crates/weaver-app/src/lib.rs +++ b/crates/weaver-app/src/lib.rs @@ -22,13 +22,20 @@ pub mod config; pub mod data; pub mod env; pub mod fetch; +pub mod host_mode; #[cfg(feature = "server")] pub mod og; pub mod perf; pub mod record_utils; pub mod service_worker; + +pub mod subdomain_app; pub mod views; +pub use host_mode::{LinkMode, SubdomainContext}; +pub use subdomain_app::SubdomainApp; +pub use subdomain_app::SubdomainRoute; + use auth::{AuthState, AuthStore}; use components::{EntryPage, Repository, RepositoryIndex}; use config::{Config, OAuthConfig}; @@ -41,6 +48,11 @@ use views::{ WhiteWindEntry, WhiteWindEntryNsid, }; +use crate::{ + env::WEAVER_APP_DOMAIN, + subdomain_app::{extract_subdomain, lookup_subdomain_context}, +}; + #[derive(Debug, Clone, Routable, PartialEq)] #[rustfmt::skip] pub enum Route { @@ -133,9 +145,72 @@ pub fn App() -> Element { ClientData::new_public(CONFIG.oauth.clone()), )) }); + + #[cfg(feature = "fullstack-server")] + let ctx_resource = use_server_future({ + let fetcher = fetcher.clone(); + move || { + let fetcher = fetcher.clone(); + async move { + use dioxus::fullstack::FullstackContext; + use http::header::HOST; + + // Get host header from request + let Some(ctx) = FullstackContext::current() else { + tracing::warn!("No FullstackContext available"); + return None; + }; + let parts = ctx.parts_mut(); + + let Some(host_header) = parts.headers.get(HOST) else { + tracing::warn!("No Host header in request"); + return None; + }; + let Ok(host) = host_header.to_str() else { + tracing::warn!("Host header not valid UTF-8"); + return None; + }; + tracing::info!(host, "Subdomain detection: got host"); + + let host_str = host.split(':').next().unwrap_or(host); + let Some(subdomain) = extract_subdomain(host_str, WEAVER_APP_DOMAIN) else { + tracing::info!(host_str, domain = WEAVER_APP_DOMAIN, "Not a subdomain request"); + return None; + }; + tracing::info!(subdomain, "Subdomain detection: extracted subdomain"); + + // Look up notebook by global path + let result = lookup_subdomain_context(&fetcher, &subdomain).await; + if result.is_none() { + tracing::warn!(subdomain, "Notebook lookup failed for subdomain"); + } + result + } + } + })?; + + #[cfg(feature = "fullstack-server")] + let ctx = match &*ctx_resource.read() { + Some(ctx) => ctx.clone(), + None => return rsx! { div { "Loading..." } }, + }; + + #[cfg(not(feature = "fullstack-server"))] + let ctx = None::; + let auth_state = use_signal(|| AuthState::default()); #[allow(unused)] let auth_state = use_context_provider(|| auth_state); + + // Provide link mode for router-agnostic link generation (subdomain mode) + let sub = use_context_provider(|| { + if ctx.is_some() { + LinkMode::Subdomain + } else { + LinkMode::MainDomain + } + }); + #[cfg(all(target_family = "wasm", target_os = "unknown"))] let restore_result = { let fetcher = fetcher.clone(); @@ -152,6 +227,8 @@ pub fn App() -> Element { use_effect(move || { let fetcher = fetcher.clone(); spawn(async move { + use crate::service_worker; + tracing::info!("Registering service worker"); let _ = service_worker::register_service_worker().await; }); @@ -161,6 +238,20 @@ pub fn App() -> Element { #[cfg(all(target_family = "wasm", target_os = "unknown"))] use_context_provider(|| restore_result); + if sub == LinkMode::Subdomain { + use_context_provider(|| ctx.unwrap()); + rsx! { + SubdomainApp {} + } + } else { + rsx! { + MainDomainApp {} + } + } +} + +#[component] +pub fn MainDomainApp() -> Element { rsx! { document::Link { rel: "icon", href: FAVICON } // Preconnect for external fonts (before loading them) diff --git a/crates/weaver-app/src/main.rs b/crates/weaver-app/src/main.rs index ff627c0..ab17e8e 100644 --- a/crates/weaver-app/src/main.rs +++ b/crates/weaver-app/src/main.rs @@ -1,9 +1,18 @@ //! Weaver App main binary. use dioxus::prelude::*; + +#[cfg(feature = "server")] use std::sync::Arc; -use weaver_app::{App, CONFIG, components, fetch}; +#[cfg(feature = "server")] +use tower::Service; + +#[cfg(feature = "server")] +use weaver_app::{App, CONFIG, SubdomainApp, SubdomainContext, fetch}; + +#[cfg(not(feature = "server"))] +use weaver_app::{App, SubdomainApp}; #[cfg(target_arch = "wasm32")] use lol_alloc::{FreeListAllocator, LockedAllocator}; @@ -13,6 +22,16 @@ use lol_alloc::{FreeListAllocator, LockedAllocator}; static ALLOCATOR: LockedAllocator = LockedAllocator::new(FreeListAllocator::new()); +/// Base domain for subdomain extraction. +#[cfg(feature = "server")] +const BASE_DOMAIN: &str = weaver_app::env::WEAVER_APP_DOMAIN; + +/// Reserved subdomains that should not be used for notebooks. +#[cfg(feature = "server")] +const RESERVED_SUBDOMAINS: &[&str] = &[ + "www", "api", "admin", "app", "auth", "cdn", "alpha", "beta", "staging", "index", +]; + fn main() { // Set up better panic messages for wasm #[cfg(target_arch = "wasm32")] @@ -49,7 +68,7 @@ fn main() { let reg = Registry::default() .with(filter) .with(wasm_layer) - .with(components::editor::LogCaptureLayer); + .with(weaver_app::components::editor::LogCaptureLayer); let _ = set_global_default(reg); } @@ -62,19 +81,18 @@ fn main() { // Run `serve()` on the server only #[cfg(feature = "server")] dioxus::serve(|| async move { - use axum::{ - extract::{Extension, Request}, - middleware, - middleware::Next, - routing::get, - }; + #[cfg(feature = "fullstack-server")] + use axum::middleware; + use axum::middleware::Next; + use axum::{Router, body::Body, extract::Request, response::Response, routing::get}; + use axum_extra::extract::Host; use jacquard::oauth::{client::OAuthClient, session::ClientData}; use std::convert::Infallible; use weaver_app::auth::AuthStore; use weaver_app::blobcache::BlobCache; #[cfg(not(feature = "fullstack-server"))] - let router = { axum::Router::new().merge(dioxus::server::router(App)) }; + let router = { Router::new().merge(dioxus::server::router(App)) }; #[cfg(feature = "fullstack-server")] let router = { @@ -107,3 +125,57 @@ fn main() { #[cfg(not(feature = "server"))] dioxus::launch(App); } + +/// Extract subdomain from host if it matches base domain pattern. +#[cfg(feature = "server")] +fn extract_subdomain<'a>(host: &'a str, base: &str) -> Option<&'a str> { + let suffix = format!(".{}", base); + if host.ends_with(&suffix) && host.len() > suffix.len() { + Some(&host[..host.len() - suffix.len()]) + } else { + None + } +} + +/// Look up notebook by global path. +/// +/// Returns SubdomainContext if a notebook with publishGlobal=true exists for this path. +#[cfg(feature = "server")] +async fn lookup_global_notebook( + fetcher: &Arc, + path: &str, +) -> Option { + use jacquard::IntoStatic; + use jacquard::smol_str::SmolStr; + use jacquard::smol_str::ToSmolStr; + use jacquard::types::string::Did; + use jacquard::xrpc::XrpcClient; + use weaver_api::sh_weaver::notebook::resolve_global_notebook::ResolveGlobalNotebook; + + let request = ResolveGlobalNotebook::new().path(path).build(); + + match fetcher.send(request).await { + Ok(response) => { + let output = response.into_output().ok()?; + let notebook = output.notebook; + + let owner = notebook.uri.authority().clone().into_static(); + let rkey = notebook.uri.rkey()?.0.to_smolstr(); + let notebook_path = notebook + .path + .map(|p| SmolStr::new(p.as_ref())) + .unwrap_or_else(|| SmolStr::new(path)); + + Some(SubdomainContext { + owner, + notebook_path, + notebook_rkey: rkey, + notebook_title: notebook.title.clone().unwrap_or_default().to_smolstr(), + }) + } + Err(e) => { + tracing::debug!(path = path, error = %e, "Global notebook lookup failed"); + None + } + } +} diff --git a/crates/weaver-app/src/record_utils.rs b/crates/weaver-app/src/record_utils.rs index c30e691..4dfc757 100644 --- a/crates/weaver-app/src/record_utils.rs +++ b/crates/weaver-app/src/record_utils.rs @@ -82,6 +82,8 @@ pub fn get_errors_at_exact_path( StructuralError::UnresolvedRef { path, .. } => Some(path), StructuralError::RefCycle { path, .. } => Some(path), StructuralError::MaxDepthExceeded { path, .. } => Some(path), + + _ => None, }, ValidationError::Constraint(c) => match c { ConstraintError::MaxLength { path, .. } => Some(path), @@ -90,7 +92,11 @@ pub fn get_errors_at_exact_path( ConstraintError::MinGraphemes { path, .. } => Some(path), ConstraintError::Maximum { path, .. } => Some(path), ConstraintError::Minimum { path, .. } => Some(path), + + _ => None, }, + + _ => None, }; if let Some(path) = validation_path { diff --git a/crates/weaver-app/src/subdomain_app.rs b/crates/weaver-app/src/subdomain_app.rs new file mode 100644 index 0000000..b5acc4c --- /dev/null +++ b/crates/weaver-app/src/subdomain_app.rs @@ -0,0 +1,199 @@ +//! Subdomain Dioxus application. +//! +//! Separate router for subdomain hosting with simpler route structure. + +use dioxus::prelude::*; +use jacquard::oauth::client::OAuthClient; +use jacquard::oauth::session::ClientData; +use jacquard::smol_str::{SmolStr, ToSmolStr}; +use jacquard::types::string::AtIdentifier; + +use crate::auth; +use crate::auth::{AuthState, AuthStore}; +use crate::components::identity::RepositoryIndex; +use crate::components::{EntryPage, NotebookCss}; +use crate::host_mode::{LinkMode, SubdomainContext}; +use crate::views::{NotebookEntryByRkey, NotebookEntryEdit, NotebookIndex, SubdomainNavbar}; +use crate::{CONFIG, fetch}; + +/// Subdomain route enum - simpler paths without /:ident/:notebook prefix. +#[derive(Debug, Clone, Routable, PartialEq)] +#[rustfmt::skip] +pub enum SubdomainRoute { + #[layout(SubdomainNavbar)] + /// Landing page - custom entry or notebook index. + #[route("/")] + SubdomainLanding {}, + /// Explicit notebook index. + #[route("/index")] + SubdomainIndexPage {}, + /// Entry by title. + #[route("/:title")] + SubdomainEntry { title: SmolStr }, + /// Entry by rkey. + #[route("/e/:rkey")] + SubdomainEntryByRkey { rkey: SmolStr }, + /// Entry edit by rkey. + #[route("/e/:rkey/edit")] + SubdomainEntryEdit { rkey: SmolStr }, + /// Profile/repository view. + #[route("/u/:ident")] + SubdomainProfile { ident: AtIdentifier<'static> }, +} + +/// Look up notebook by global path and build SubdomainContext. +pub async fn lookup_subdomain_context( + fetcher: &crate::fetch::Fetcher, + path: &str, +) -> Option { + use jacquard::IntoStatic; + use jacquard::smol_str::SmolStr; + use jacquard::xrpc::XrpcClient; + use weaver_api::sh_weaver::notebook::resolve_global_notebook::ResolveGlobalNotebook; + + let request = ResolveGlobalNotebook::new().path(path).build(); + + match fetcher.send(request).await { + Ok(response) => { + let output = response.into_output().ok()?; + let notebook = output.notebook; + + let owner = notebook.uri.authority().clone().into_static(); + let rkey = notebook.uri.rkey()?.0.to_smolstr(); + let notebook_path = notebook + .path + .map(|p| SmolStr::new(p.as_ref())) + .unwrap_or_else(|| SmolStr::new(path)); + + Some(SubdomainContext { + owner, + notebook_path, + notebook_rkey: rkey, + notebook_title: notebook.title.clone().unwrap_or_default().to_smolstr(), + }) + } + Err(e) => { + tracing::debug!(path = path, error = %e, "Global notebook lookup failed"); + None + } + } +} + +/// Extract subdomain from host if it matches base domain pattern. +pub fn extract_subdomain(host: &str, base: &str) -> Option { + let suffix = format!(".{}", base); + if host.ends_with(&suffix) && host.len() > suffix.len() { + Some(host[..host.len() - suffix.len()].to_string()) + } else { + None + } +} + +const ENTRY_CSS: Asset = asset!("/assets/styling/entry.css"); +const LAYOUTS_CSS: Asset = asset!("/assets/styling/layouts.css"); + +/// Root component for subdomain app. +#[component] +pub fn SubdomainApp() -> Element { + rsx! { + document::Link { rel: "icon", href: crate::FAVICON } + document::Link { rel: "preconnect", href: "https://fonts.googleapis.com" } + document::Link { rel: "preconnect", href: "https://fonts.gstatic.com" } + document::Link { rel: "stylesheet", href: crate::THEME_DEFAULTS_CSS } + 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" } + document::Link { rel: "stylesheet", href: crate::MAIN_CSS } + document::Link { rel: "stylesheet", href: LAYOUTS_CSS } + document::Link { rel: "stylesheet", href: ENTRY_CSS } + crate::components::toast::ToastProvider { + Router:: {} + } + } +} + +/// Landing page - check for custom "/" entry, else show notebook index. +#[component] +fn SubdomainLanding() -> Element { + let ctx = use_context::(); + + // TODO: Check for entry with custom path "/" for this notebook. + // For now, just render the notebook index. + rsx! { + + NotebookCss { ident: ctx.owner_ident().to_smolstr(), notebook: ctx.notebook_path.clone() } + NotebookIndex { + ident: ctx.owner_ident(), + book_title: ctx.notebook_title.clone(), + } + } +} + +/// Explicit notebook index route. +#[component] +fn SubdomainIndexPage() -> Element { + let ctx = use_context::(); + + rsx! { + + NotebookCss { ident: ctx.owner_ident().to_smolstr(), notebook: ctx.notebook_path.clone() } + NotebookIndex { + ident: ctx.owner_ident(), + book_title: ctx.notebook_title.clone(), + } + } +} + +/// Entry by title. +#[component] +fn SubdomainEntry(title: SmolStr) -> Element { + let ctx = use_context::(); + + rsx! { + + NotebookCss { ident: ctx.owner_ident().to_smolstr(), notebook: ctx.notebook_path.clone() } + EntryPage { + ident: ctx.owner_ident(), + book_title: ctx.notebook_title.clone(), + title: title, + } + } +} + +/// Entry by rkey. +#[component] +fn SubdomainEntryByRkey(rkey: SmolStr) -> Element { + let ctx = use_context::(); + + rsx! { + + NotebookCss { ident: ctx.owner_ident().to_smolstr(), notebook: ctx.notebook_path.clone() } + NotebookEntryByRkey { + ident: ctx.owner_ident(), + book_title: ctx.notebook_title.clone(), + rkey: rkey, + } + } +} + +/// Entry edit by rkey. +#[component] +fn SubdomainEntryEdit(rkey: SmolStr) -> Element { + let ctx = use_context::(); + + rsx! { + + NotebookCss { ident: ctx.owner_ident().to_smolstr(), notebook: ctx.notebook_path.clone() } + NotebookEntryEdit { + ident: ctx.owner_ident(), + book_title: ctx.notebook_title.clone(), + rkey: rkey, + } + } +} + +/// Profile/repository view for an identity. +#[component] +fn SubdomainProfile(ident: AtIdentifier<'static>) -> Element { + rsx! { + RepositoryIndex { ident } + } +} diff --git a/crates/weaver-app/src/views/mod.rs b/crates/weaver-app/src/views/mod.rs index 28c6a96..4f3eea9 100644 --- a/crates/weaver-app/src/views/mod.rs +++ b/crates/weaver-app/src/views/mod.rs @@ -49,3 +49,6 @@ pub use external::{ LeafletEntry, LeafletEntryNsid, PcktEntry, PcktEntryBlogNsid, PcktEntryNsid, WhiteWindEntry, WhiteWindEntryNsid, }; + +mod subdomain_navbar; +pub use subdomain_navbar::{SubdomainErrorLayout, SubdomainNavbar}; diff --git a/crates/weaver-app/src/views/navbar.rs b/crates/weaver-app/src/views/navbar.rs index de2be6e..69b861a 100644 --- a/crates/weaver-app/src/views/navbar.rs +++ b/crates/weaver-app/src/views/navbar.rs @@ -22,6 +22,9 @@ const NOTEBOOK_CARD_CSS: Asset = asset!("/assets/styling/notebook-card.css"); /// routes will be rendered under the outlet inside this component #[component] pub fn Navbar() -> Element { + // Provide navigator for programmatic navigation in shared components + crate::components::use_main_navigator_provider(); + let route = use_route::(); tracing::trace!("Route: {:?}", route); diff --git a/crates/weaver-app/src/views/record.rs b/crates/weaver-app/src/views/record.rs index bb6d7e8..6adc204 100644 --- a/crates/weaver-app/src/views/record.rs +++ b/crates/weaver-app/src/views/record.rs @@ -24,7 +24,7 @@ pub fn RecordIndex() -> Element { let input_uri = uri_input.read().clone(); if !input_uri.is_empty() { if let Ok(parsed) = AtUri::new(&input_uri) { - let link = format!("{}/record/{}", crate::env::WEAVER_APP_DOMAIN, parsed); + let link = format!("{}/record/{}", crate::env::WEAVER_APP_HOST, parsed); navigator.push(link); } } diff --git a/crates/weaver-app/src/views/subdomain_navbar.rs b/crates/weaver-app/src/views/subdomain_navbar.rs new file mode 100644 index 0000000..3aceab0 --- /dev/null +++ b/crates/weaver-app/src/views/subdomain_navbar.rs @@ -0,0 +1,201 @@ +//! Subdomain navbar component with auth support. + +use dioxus::prelude::*; +use jacquard::types::string::{AtIdentifier, Did}; + +use crate::SubdomainRoute; +use crate::auth::{AuthState, RestoreResult}; +use crate::components::button::{Button, ButtonVariant}; +use crate::components::login::LoginModal; +use crate::data::{use_get_handle, use_handle}; +use crate::fetch::Fetcher; +use crate::host_mode::SubdomainContext; +use crate::views::Footer; + +#[cfg(feature = "fullstack-server")] +use {dioxus::fullstack::FullstackContext, http::StatusCode}; + +const NAVBAR_CSS: Asset = asset!("/assets/styling/navbar.css"); +const BUTTON_CSS: Asset = asset!("/assets/styling/button.css"); +const CARDS_BASE_CSS: Asset = asset!("/assets/styling/cards-base.css"); +const ENTRY_CARD_CSS: Asset = asset!("/assets/styling/entry-card.css"); +const NOTEBOOK_CARD_CSS: Asset = asset!("/assets/styling/notebook-card.css"); + +#[component] +pub fn SubdomainNavbar() -> Element { + let ctx = use_context::(); + let route = use_route::(); + let auth_state = use_context::>(); + let fetcher = use_context::(); + let mut show_login_modal = use_signal(|| false); + + // Show toast if session expired + #[cfg(all(target_family = "wasm", target_os = "unknown"))] + { + use dioxus_primitives::toast::{ToastOptions, use_toast}; + + let restore_result = use_context::>(); + let toast = use_toast(); + let mut shown = use_signal(|| false); + + if !shown() && restore_result() == Some(RestoreResult::SessionExpired) { + shown.set(true); + toast.warning( + "Session Expired".to_string(), + ToastOptions::new().description("Please sign in again"), + ); + } + } + + // Provide navigator for programmatic navigation in shared components + crate::components::use_subdomain_navigator_provider(); + + rsx! { + document::Link { rel: "stylesheet", href: NAVBAR_CSS } + document::Link { rel: "stylesheet", href: BUTTON_CSS } + document::Link { rel: "stylesheet", href: CARDS_BASE_CSS } + document::Link { rel: "stylesheet", href: ENTRY_CARD_CSS } + document::Link { rel: "stylesheet", href: NOTEBOOK_CARD_CSS } + + div { class: "app-shell", + div { + id: "navbar", + nav { class: "breadcrumbs", + // Notebook title links to index + Link { + to: SubdomainRoute::SubdomainLanding {}, + class: "breadcrumb", + "{ctx.notebook_title}" + } + + // Show current location breadcrumb based on route + match &route { + SubdomainRoute::SubdomainLanding {} | SubdomainRoute::SubdomainIndexPage {} => { + rsx! {} + } + SubdomainRoute::SubdomainEntry { title } => { + rsx! { + span { class: "breadcrumb-separator", " > " } + span { class: "breadcrumb breadcrumb-current", "{title}" } + } + } + SubdomainRoute::SubdomainEntryByRkey { rkey } => { + rsx! { + span { class: "breadcrumb-separator", " > " } + span { class: "breadcrumb breadcrumb-current", "{rkey}" } + } + } + SubdomainRoute::SubdomainEntryEdit { rkey } => { + rsx! { + span { class: "breadcrumb-separator", " > " } + Link { + to: SubdomainRoute::SubdomainEntryByRkey { rkey: rkey.clone() }, + class: "breadcrumb", + "{rkey}" + } + span { class: "breadcrumb-separator", " > " } + span { class: "breadcrumb breadcrumb-current", "Edit" } + } + } + SubdomainRoute::SubdomainProfile { ident } => { + rsx! { + span { class: "breadcrumb-separator", " > " } + span { class: "breadcrumb breadcrumb-current", "@{ident}" } + } + } + } + } + + // Author profile link + nav { class: "nav-tools", + AuthorProfileLink { ident: ctx.owner.clone() } + } + + // Auth button + if auth_state.read().is_authenticated() { + if let Some(did) = &auth_state.read().did { + SubdomainAuthButton { did: did.clone() } + } + } else { + div { + class: "auth-button", + Button { + variant: ButtonVariant::Ghost, + onclick: move |_| show_login_modal.set(true), + span { class: "auth-handle", "Sign In" } + } + } + LoginModal { + open: show_login_modal + } + } + } + + main { class: "app-main", + Outlet:: {} + } + + Footer {} + } + } +} + +#[component] +pub fn SubdomainErrorLayout() -> Element { + rsx! { + ErrorBoundary { + handle_error: move |_err: ErrorContext| { + #[cfg(feature = "fullstack-server")] + { + let http_error = FullstackContext::commit_error_status(_err.error().unwrap()); + match http_error.status { + StatusCode::NOT_FOUND => rsx! { div { "404 - Page not found" } }, + _ => rsx! { div { "An unknown error occurred" } }, + } + } + #[cfg(not(feature = "fullstack-server"))] + { + rsx! { div { "An error occurred" } } + } + }, + Outlet:: {} + } + } +} + +#[component] +fn SubdomainAuthButton(did: Did<'static>) -> Element { + let auth_handle = use_get_handle(did); + let fetcher = use_context::(); + let mut auth_state = use_context::>(); + + rsx! { + Button { + variant: ButtonVariant::Ghost, + onclick: move |_| { + let fetcher = fetcher.clone(); + auth_state.write().clear(); + async move { + fetcher.downgrade_to_unauthenticated().await; + } + }, + span { class: "auth-handle", "@{auth_handle()}" } + } + } +} + +#[component] +fn AuthorProfileLink(ident: ReadSignal>) -> Element { + let (handle_res, handle) = use_handle(ident); + + #[cfg(feature = "fullstack-server")] + let mut handle_res = handle_res?; + + rsx! { + Link { + to: SubdomainRoute::SubdomainProfile { ident: ident() }, + class: "nav-tool-link", + "@{handle()}" + } + } +} diff --git a/crates/weaver-index/package-lock.json b/crates/weaver-index/package-lock.json new file mode 100644 index 0000000..af94a42 --- /dev/null +++ b/crates/weaver-index/package-lock.json @@ -0,0 +1,329 @@ +{ + "name": "weaver-index", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.2.3" + } + }, + "node_modules/@anthropic-ai/claude-agent-sdk": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@anthropic-ai/claude-agent-sdk/-/claude-agent-sdk-0.2.3.tgz", + "integrity": "sha512-6h54MzD4R5S15esMiK7sPKwotwoYd3qxXdqzRWqSkYo96IwvtSoK5yb0jbWEdDKSW71jjEctFJZBkonGalmTAQ==", + "license": "SEE LICENSE IN README.md", + "engines": { + "node": ">=18.0.0" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "^0.33.5", + "@img/sharp-darwin-x64": "^0.33.5", + "@img/sharp-linux-arm": "^0.33.5", + "@img/sharp-linux-arm64": "^0.33.5", + "@img/sharp-linux-x64": "^0.33.5", + "@img/sharp-linuxmusl-arm64": "^0.33.5", + "@img/sharp-linuxmusl-x64": "^0.33.5", + "@img/sharp-win32-x64": "^0.33.5" + }, + "peerDependencies": { + "zod": "^4.0.0" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.5.tgz", + "integrity": "sha512-UT4p+iz/2H4twwAoLCqfA9UH5pI6DggwKEGuaPy7nCVQ8ZsiY5PIcrRvD1DzuY3qYL07NtIQcWnBSY/heikIFQ==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.5.tgz", + "integrity": "sha512-fyHac4jIc1ANYGRDxtiqelIbdWkIuQaI84Mv45KvGRRxSAa7o7d1ZKAOBaYbnepLC1WqxfpimdeWfvqqSGwR2Q==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.4.tgz", + "integrity": "sha512-XblONe153h0O2zuFfTAbQYAX2JhYmDHeWikp1LM9Hul9gVPjFY427k6dFEcOL72O01QxQsWi761svJ/ev9xEDg==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.4.tgz", + "integrity": "sha512-xnGR8YuZYfJGmWPvmlunFaWJsb9T/AO2ykoP3Fz/0X5XV2aoYBPkX6xqCQvUTKKiLddarLaxpzNe+b1hjeWHAQ==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.5.tgz", + "integrity": "sha512-gvcC4ACAOPRNATg/ov8/MnbxFDJqf/pDePbBnuBDcjsI8PssmjoKMAz4LtLaVi+OnSb5FK/yIOamqDwGmXW32g==", + "cpu": [ + "arm" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.4.tgz", + "integrity": "sha512-9B+taZ8DlyyqzZQnoeIvDVR/2F4EbMepXMc/NdVbkzsJbzkUjhXv/70GQJ7tdLA4YJgNP25zukcxpX2/SueNrA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.4.tgz", + "integrity": "sha512-MmWmQ3iPFZr0Iev+BAgVMb3ZyC4KeFc3jFxnNbEPas60e1cIfevbtuyf9nDGIzOaW9PdnDciJm+wFFaTlj5xYw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.4.tgz", + "integrity": "sha512-9Ti+BbTYDcsbp4wfYib8Ctm1ilkugkA/uscUn6UXK1ldpC1JjiXbLfFZtRlBhjPZ5o1NCLiDbg8fhUPKStHoTA==", + "cpu": [ + "arm64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.4.tgz", + "integrity": "sha512-viYN1KX9m+/hGkJtvYYp+CCLgnJXwiQB39damAO7WMdKWlIhmYTfHjwSbQeUK/20vY154mwezd9HflVFM1wVSw==", + "cpu": [ + "x64" + ], + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.5.tgz", + "integrity": "sha512-JTS1eldqZbJxjvKaAkxhZmBqPRGmxgu+qFKSInv8moZ2AmT5Yib3EQ1c6gp493HvrvV8QgdOXdyaIBrhvFhBMQ==", + "cpu": [ + "arm" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.0.5" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.5.tgz", + "integrity": "sha512-JMVv+AMRyGOHtO1RFBiJy/MBsgz0x4AWrT6QoEVVTyh1E39TrCUpTRI7mx9VksGX4awWASxqCYLCV4wBZHAYxA==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.5.tgz", + "integrity": "sha512-opC+Ok5pRNAzuvq1AG0ar+1owsu842/Ab+4qvU879ippJBHvyY5n2mxF1izXqkPYlGuP/M556uh53jRLJmzTWA==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.5.tgz", + "integrity": "sha512-XrHMZwGQGvJg2V/oRSUfSAfjfPxO+4DkiRh6p2AFjLQztWUuY/o8Mq0eMQVIY7HJ1CDQUJlxGGZRw1a5bqmd1g==", + "cpu": [ + "arm64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.0.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.5.tgz", + "integrity": "sha512-WT+d/cgqKkkKySYmqoZ8y3pxx7lx9vVejxW/W4DOFMYVSkErR+w7mf2u8m/y4+xHe7yY9DAXQMWQhpnMuFfScw==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.0.4" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.33.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.5.tgz", + "integrity": "sha512-MpY/o8/8kj+EcnxwvrP4aTJSWw/aZ7JIGR4aBeZkZw5B7/Jn+tY9/VNwtcoGmdT7GfggGIU4kygOMSbYnOrAbg==", + "cpu": [ + "x64" + ], + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/zod": { + "version": "4.3.5", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.3.5.tgz", + "integrity": "sha512-k7Nwx6vuWx1IJ9Bjuf4Zt1PEllcwe7cls3VNzm4CQ1/hgtFUK2bRNG3rvnpPUhFjmqJKAKtjV576KnUkHocg/g==", + "license": "MIT", + "peer": true, + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/crates/weaver-index/package.json b/crates/weaver-index/package.json new file mode 100644 index 0000000..aac99a6 --- /dev/null +++ b/crates/weaver-index/package.json @@ -0,0 +1,5 @@ +{ + "dependencies": { + "@anthropic-ai/claude-agent-sdk": "^0.2.3" + } +} diff --git a/crates/weaver-index/src/clickhouse/queries/notebooks.rs b/crates/weaver-index/src/clickhouse/queries/notebooks.rs index dbd65ac..89b1d47 100644 --- a/crates/weaver-index/src/clickhouse/queries/notebooks.rs +++ b/crates/weaver-index/src/clickhouse/queries/notebooks.rs @@ -774,4 +774,47 @@ impl Client { Ok(current.map(|c| (c, prev, next))) } } + + /// Resolve a notebook by global path (for publishGlobal notebooks). + /// + /// Returns the winning notebook when multiple claim the same path. + /// Winner is determined by: created_at ASC, then TID rkey ASC. + pub async fn resolve_notebook_by_global_path( + &self, + path: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + created_at, + indexed_at, + record + FROM notebooks FINAL + WHERE path = ? + AND deleted_at = toDateTime64(0, 3) + AND publish_global = 1 + ORDER BY created_at ASC, rkey ASC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(path) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to resolve notebook by global path".into(), + source: e, + })?; + + Ok(row) + } } diff --git a/crates/weaver-index/src/endpoints/notebook.rs b/crates/weaver-index/src/endpoints/notebook.rs index 9b1ce7f..23f01ac 100644 --- a/crates/weaver-index/src/endpoints/notebook.rs +++ b/crates/weaver-index/src/endpoints/notebook.rs @@ -21,6 +21,7 @@ use weaver_api::sh_weaver::notebook::{ get_notebook::{GetNotebookOutput, GetNotebookRequest}, get_notebook_feed::{GetNotebookFeedOutput, GetNotebookFeedRequest}, resolve_entry::{ResolveEntryOutput, ResolveEntryRequest}, + resolve_global_notebook::{ResolveGlobalNotebookOutput, ResolveGlobalNotebookRequest}, resolve_notebook::{ResolveNotebookOutput, ResolveNotebookRequest}, }; @@ -1150,3 +1151,86 @@ pub async fn get_entry_notebooks( .into_static(), )) } + +/// Handle sh.weaver.notebook.resolveGlobalNotebook +/// +/// Resolves a notebook by global path for subdomain routing. +pub async fn resolve_global_notebook( + State(state): State, + ExtractXrpc(args): ExtractXrpc, +) -> Result>, XrpcErrorResponse> { + let path = args.path.as_ref(); + + let notebook_row = state + .clickhouse + .resolve_notebook_by_global_path(path) + .await + .map_err(|e| { + tracing::error!("Failed to resolve global notebook: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })? + .ok_or_else(|| XrpcErrorResponse::not_found("Notebook not found"))?; + + // Fetch contributors for author hydration + let notebook_contributors = state + .clickhouse + .get_notebook_contributors(¬ebook_row.did, ¬ebook_row.rkey) + .await + .map_err(|e| { + tracing::error!("Failed to get notebook contributors: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + // Collect author DIDs + let mut all_author_dids: HashSet<&str> = + notebook_contributors.iter().map(|s| s.as_str()).collect(); + for did in ¬ebook_row.author_dids { + all_author_dids.insert(did.as_str()); + } + + // Batch fetch profiles + let author_dids_vec: Vec<&str> = all_author_dids.into_iter().collect(); + let profiles = state + .clickhouse + .get_profiles_batch(&author_dids_vec) + .await + .map_err(|e| { + tracing::error!("Failed to batch fetch profiles: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + let profile_map: HashMap<&str, &ProfileRow> = + profiles.iter().map(|p| (p.did.as_str(), p)).collect(); + + // Build NotebookView + let notebook_uri = AtUri::new(¬ebook_row.uri).map_err(|e| { + tracing::error!("Invalid notebook URI in db: {}", e); + XrpcErrorResponse::internal_error("Invalid URI stored") + })?; + + let notebook_cid = Cid::new(notebook_row.cid.as_bytes()).map_err(|e| { + tracing::error!("Invalid notebook CID in db: {}", e); + XrpcErrorResponse::internal_error("Invalid CID stored") + })?; + + let authors = hydrate_authors(¬ebook_contributors, &profile_map)?; + let record = parse_record_json(¬ebook_row.record)?; + + let notebook = NotebookView::new() + .uri(notebook_uri.into_static()) + .cid(notebook_cid.into_static()) + .authors(authors) + .record(record) + .indexed_at(notebook_row.indexed_at.fixed_offset()) + .maybe_title(non_empty_cowstr(¬ebook_row.title)) + .maybe_path(non_empty_cowstr(¬ebook_row.path)) + .build(); + + Ok(Json( + ResolveGlobalNotebookOutput { + notebook, + extra_data: None, + } + .into_static(), + )) +} diff --git a/crates/weaver-index/src/server.rs b/crates/weaver-index/src/server.rs index b1bd826..12c3753 100644 --- a/crates/weaver-index/src/server.rs +++ b/crates/weaver-index/src/server.rs @@ -39,7 +39,8 @@ use weaver_api::sh_weaver::notebook::{ get_book_entry::GetBookEntryRequest, get_entry::GetEntryRequest, get_entry_feed::GetEntryFeedRequest, get_entry_notebooks::GetEntryNotebooksRequest, get_notebook::GetNotebookRequest, get_notebook_feed::GetNotebookFeedRequest, - resolve_entry::ResolveEntryRequest, resolve_notebook::ResolveNotebookRequest, + resolve_entry::ResolveEntryRequest, + resolve_global_notebook::ResolveGlobalNotebookRequest, resolve_notebook::ResolveNotebookRequest, }; use crate::clickhouse::Client; @@ -136,6 +137,9 @@ pub fn router(state: AppState, did_doc: DidDocument<'static>) -> Router { .merge(GetEntryNotebooksRequest::into_router( notebook::get_entry_notebooks, )) + .merge(ResolveGlobalNotebookRequest::into_router( + notebook::resolve_global_notebook, + )) // sh.weaver.collab.* endpoints .merge(GetResourceParticipantsRequest::into_router( collab::get_resource_participants, -- knotmirror 0.0.1