From 82b45764a7f12c0fb4c3c5177127ce1c47ee07a7 Mon Sep 17 00:00:00 2001 From: Orual Date: Mon, 23 Mar 2026 10:39:04 -0400 Subject: [PATCH] further regen after lex-fetch --- crates/jacquard-api/Cargo.toml | 12 +- .../lexicons/at_youandme_connection.json | 29 + .../lexicons/dev_keytrace_claim.json | 128 ++ .../lexicons/dev_keytrace_profile.json | 30 + .../dev_keytrace_serverPublicKey.json | 41 + .../lexicons/dev_keytrace_signature.json | 54 + .../lexicons/dev_keytrace_statement.json | 52 + .../lexicons/dev_keytrace_userPublicKey.json | 66 + .../sh_tangled_knot_subscribeRepos.json | 96 ++ .../sh_tangled_sync_requestCrawl.json | 35 + .../jacquard-api/lexicons/to_atpr_link.json | 29 + .../lexicons/world_ptah_temp_action.json | 85 ++ .../lexicons/world_ptah_temp_character.json | 131 ++ .../world_ptah_temp_contribution.json | 86 ++ .../lexicons/world_ptah_temp_declaration.json | 37 + .../lexicons/world_ptah_temp_defs.json | 35 + .../lexicons/world_ptah_temp_event.json | 125 ++ .../lexicons/world_ptah_temp_location.json | 120 ++ .../lexicons/world_ptah_temp_lore.json | 94 ++ .../lexicons/world_ptah_temp_role.json | 101 ++ .../lexicons/world_ptah_temp_world.json | 112 ++ ...e_stratos_identity_resolveEnrollments.json | 51 + crates/jacquard-api/src/actor_rpg/master.rs | 48 +- crates/jacquard-api/src/actor_rpg/stats.rs | 78 +- crates/jacquard-api/src/ai_syui/at/link.rs | 26 +- crates/jacquard-api/src/ai_syui/log/chat.rs | 30 +- crates/jacquard-api/src/ai_syui/log/post.rs | 30 +- .../jacquard-api/src/app_beaconbits/beacon.rs | 34 +- .../src/app_beaconbits/beacon/like.rs | 26 +- .../src/app_beaconbits/bookmark/item.rs | 48 +- .../jacquard-api/src/app_beaconbits/report.rs | 30 +- crates/jacquard-api/src/app_bsky/actor.rs | 174 +-- .../jacquard-api/src/app_bsky/actor/status.rs | 26 +- .../jacquard-api/src/app_bsky/ageassurance.rs | 222 +-- crates/jacquard-api/src/app_bsky/bookmark.rs | 26 +- .../src/app_bsky/contact/send_notification.rs | 26 +- crates/jacquard-api/src/app_bsky/draft.rs | 110 +- crates/jacquard-api/src/app_bsky/embed.rs | 26 +- .../src/app_bsky/embed/external.rs | 60 +- .../jacquard-api/src/app_bsky/embed/images.rs | 26 +- .../jacquard-api/src/app_bsky/embed/record.rs | 170 +-- .../src/app_bsky/embed/record_with_media.rs | 26 +- .../jacquard-api/src/app_bsky/embed/video.rs | 52 +- crates/jacquard-api/src/app_bsky/feed.rs | 228 +-- .../src/app_bsky/feed/generator.rs | 30 +- .../src/app_bsky/feed/get_likes.rs | 30 +- crates/jacquard-api/src/app_bsky/feed/like.rs | 26 +- crates/jacquard-api/src/app_bsky/feed/post.rs | 108 +- crates/jacquard-api/src/app_bsky/graph.rs | 310 ++--- .../jacquard-api/src/app_bsky/graph/follow.rs | 26 +- .../jacquard-api/src/app_bsky/graph/list.rs | 30 +- .../src/app_bsky/graph/listitem.rs | 30 +- .../src/app_bsky/graph/starterpack.rs | 30 +- .../src/app_bsky/graph/verification.rs | 34 +- crates/jacquard-api/src/app_bsky/labeler.rs | 152 +- .../src/app_bsky/labeler/service.rs | 26 +- .../jacquard-api/src/app_bsky/notification.rs | 440 +++--- .../notification/list_notifications.rs | 104 +- .../notification/put_activity_subscription.rs | 26 +- .../app_bsky/notification/register_push.rs | 34 +- .../app_bsky/notification/unregister_push.rs | 34 +- .../src/app_bsky/richtext/facet.rs | 26 +- crates/jacquard-api/src/app_bsky/unspecced.rs | 354 ++--- .../unspecced/get_post_thread_other_v2.rs | 48 +- .../app_bsky/unspecced/get_post_thread_v2.rs | 30 +- .../unspecced/get_tagged_suggestions.rs | 48 +- crates/jacquard-api/src/app_bsky/video.rs | 30 +- .../src/app_certified/badge/award.rs | 30 +- .../src/app_certified/badge/definition.rs | 34 +- .../src/app_certified/badge/response.rs | 30 +- .../src/app_certified/location.rs | 72 +- .../jacquard-api/src/app_chavatar/avatar.rs | 26 +- .../jacquard-api/src/app_chavatar/settings.rs | 34 +- crates/jacquard-api/src/app_chavatar/state.rs | 26 +- .../src/app_chronosky/plan/get_assignment.rs | 96 +- .../src/app_chronosky/plan/get_usage.rs | 296 ++-- .../src/app_chronosky/plan/redeem_ticket.rs | 88 +- .../src/app_chronosky/schedule/create_post.rs | 26 +- .../src/app_chronosky/schedule/list_posts.rs | 232 +-- .../src/app_dropanchor/checkin.rs | 90 +- .../src/app_dropanchor/comment.rs | 30 +- .../jacquard-api/src/app_dropanchor/like.rs | 26 +- .../src/app_fitsky/bluesky_post.rs | 48 +- crates/jacquard-api/src/app_fitsky/goal.rs | 62 +- crates/jacquard-api/src/app_fitsky/trend.rs | 96 +- crates/jacquard-api/src/app_fitsky/workout.rs | 112 +- .../src/app_fitsky/workout_plan.rs | 30 +- .../src/app_gainforest/dwc/event.rs | 30 +- .../src/app_gainforest/dwc/measurement.rs | 34 +- .../src/app_gainforest/dwc/occurrence.rs | 34 +- .../src/app_gainforest/evaluator.rs | 30 +- .../organization/default_site.rs | 26 +- .../src/app_gainforest/organization/info.rs | 112 +- .../src/app_gainforest/organization/layer.rs | 78 +- .../organization/observations/fauna.rs | 26 +- .../observations/measured_trees_cluster.rs | 26 +- .../organization/predictions/fauna.rs | 26 +- .../organization/predictions/flora.rs | 26 +- .../src/app_greengale/document.rs | 94 +- .../src/app_greengale/publication.rs | 26 +- .../src/app_juttu/article_link.rs | 30 +- .../src/app_mathr/leaderboard/entry.rs | 90 +- crates/jacquard-api/src/app_mathr/score.rs | 34 +- .../src/app_nblr/feed/collection.rs | 26 +- crates/jacquard-api/src/app_nblr/feed/link.rs | 30 +- crates/jacquard-api/src/app_ocho/auth.rs | 34 +- .../src/app_ocho/auth/at_proto_callback.rs | 30 +- .../src/app_ocho/auth/authorize.rs | 26 +- .../src/app_ocho/edu/google_callback.rs | 26 +- .../src/app_ocho/edu/verification.rs | 30 +- .../src/app_ocho/payment/get_stripe_intent.rs | 48 +- crates/jacquard-api/src/app_ocho/plugin.rs | 130 +- .../src/app_offprint/block/image.rs | 26 +- .../src/app_offprint/block/web_bookmark.rs | 26 +- .../src/app_openmkt/marketplace/listing.rs | 88 +- .../src/app_protoimsg/chat/allowlist.rs | 30 +- .../src/app_protoimsg/chat/auth_verify.rs | 26 +- .../src/app_protoimsg/chat/ban.rs | 30 +- .../src/app_protoimsg/chat/channel.rs | 30 +- .../src/app_protoimsg/chat/message.rs | 82 +- .../src/app_protoimsg/chat/poll.rs | 52 +- .../src/app_protoimsg/chat/role.rs | 58 +- .../src/app_protoimsg/chat/room.rs | 56 +- .../src/app_protoimsg/chat/vote.rs | 30 +- crates/jacquard-api/src/app_rocksky/album.rs | 30 +- crates/jacquard-api/src/app_rocksky/artist.rs | 26 +- .../src/app_rocksky/feed/generator.rs | 48 +- crates/jacquard-api/src/app_rocksky/like.rs | 26 +- crates/jacquard-api/src/app_rocksky/radio.rs | 48 +- .../jacquard-api/src/app_rocksky/scrobble.rs | 42 +- crates/jacquard-api/src/app_rocksky/shout.rs | 48 +- crates/jacquard-api/src/app_rocksky/song.rs | 100 +- .../src/app_rocksky/song/match_song.rs | 26 +- .../src/art_cllctv/embed/external.rs | 30 +- .../src/art_cllctv/embed/images.rs | 48 +- .../jacquard-api/src/art_cllctv/feed/pin.rs | 26 +- crates/jacquard-api/src/at_inlay.rs | 26 +- crates/jacquard-api/src/at_inlay/component.rs | 26 +- crates/jacquard-api/src/at_inlay/pack.rs | 26 +- .../jacquard-api/src/at_inlay/placeholder.rs | 26 +- .../jacquard-api/src/at_margin/annotation.rs | 52 +- crates/jacquard-api/src/at_margin/apikey.rs | 30 +- .../src/at_margin/collection_item.rs | 48 +- crates/jacquard-api/src/at_margin/reply.rs | 60 +- crates/jacquard-api/src/at_noted/link.rs | 26 +- .../src/at_podping/records/podping.rs | 64 +- .../src/at_podping/records/startup.rs | 30 +- .../src/at_unthread/document/put_draft.rs | 34 +- crates/jacquard-api/src/at_youandme.rs | 6 + .../src/at_youandme/connection.rs | 297 ++++ .../src/beauty_cybernetic/trustcow/review.rs | 30 +- .../beauty_cybernetic/trustcow/transaction.rs | 52 +- crates/jacquard-api/src/blog_pckt/post.rs | 34 +- .../src/blog_pckt/richtext/facet.rs | 26 +- crates/jacquard-api/src/blue__2048.rs | 58 +- crates/jacquard-api/src/blue__2048/game.rs | 42 +- crates/jacquard-api/src/blue__2048/key.rs | 74 +- .../src/blue__2048/key/player/stats.rs | 26 +- .../src/blue__2048/player/profile.rs | 30 +- .../src/blue__2048/player/stats.rs | 168 +-- .../src/blue__2048/verification.rs | 86 +- .../src/blue_atroom/room/layout.rs | 122 +- .../src/blue_atroom/room/object.rs | 34 +- .../src/blue_backyard/feed/comment.rs | 58 +- .../src/blue_backyard/feed/post.rs | 26 +- .../src/blue_backyard/graph/block.rs | 26 +- crates/jacquard-api/src/blue_recipes/feed.rs | 38 +- .../src/blue_recipes/feed/recipe.rs | 48 +- .../src/blue_rito/feed/bookmark.rs | 48 +- .../jacquard-api/src/blue_rito/feed/like.rs | 26 +- .../src/blue_rito/label/auto/post.rs | 62 +- .../src/blue_skytalk/talk/comment.rs | 30 +- .../src/blue_skytalk/talk/thread.rs | 30 +- crates/jacquard-api/src/bond_biblio/book.rs | 48 +- crates/jacquard-api/src/bond_biblio/list.rs | 64 +- crates/jacquard-api/src/bond_biblio/stamp.rs | 30 +- crates/jacquard-api/src/buzz_bookhive.rs | 324 ++--- crates/jacquard-api/src/buzz_bookhive/book.rs | 64 +- crates/jacquard-api/src/buzz_bookhive/buzz.rs | 34 +- .../src/buzz_bookhive/hive_book.rs | 100 +- .../src/buzz_bookhive/list_genres.rs | 26 +- .../src/ca_jmaingot/board_game_play.rs | 30 +- .../src/cat_vt3e/gallery/group_item.rs | 30 +- .../src/cat_vt3e/gallery/image.rs | 26 +- .../src/ch_indiemusi/alpha/grant.rs | 30 +- .../src/ch_indiemusi/alpha/recording.rs | 26 +- .../src/ch_indiemusi/alpha/release.rs | 30 +- .../src/ch_indiemusi/alpha/song.rs | 26 +- .../src/ch_indiemusi/alpha/track.rs | 52 +- crates/jacquard-api/src/chat_bsky/convo.rs | 376 ++--- .../src/chat_bsky/convo/send_message.rs | 26 +- .../src/chat_bsky/convo/send_message_batch.rs | 26 +- .../moderation/get_actor_metadata.rs | 34 +- .../src/club_stellz/evm/address_control.rs | 150 +- .../src/com__5jiji/test/videos.rs | 30 +- crates/jacquard-api/src/com_atproto/admin.rs | 30 +- .../com_atproto/admin/update_account_email.rs | 26 +- .../admin/update_account_handle.rs | 26 +- .../admin/update_account_signing_key.rs | 26 +- .../jacquard-api/src/com_atproto/identity.rs | 30 +- crates/jacquard-api/src/com_atproto/label.rs | 122 +- crates/jacquard-api/src/com_atproto/repo.rs | 26 +- .../src/com_atproto/repo/apply_writes.rs | 56 +- .../src/com_atproto/repo/delete_record.rs | 30 +- .../src/com_atproto/repo/get_record.rs | 48 +- .../src/com_atproto/repo/list_records.rs | 56 +- .../src/com_atproto/repo/put_record.rs | 52 +- crates/jacquard-api/src/com_atproto/server.rs | 122 +- .../com_atproto/server/create_app_password.rs | 30 +- .../com_atproto/server/create_invite_codes.rs | 26 +- .../src/com_atproto/server/delete_account.rs | 48 +- .../com_atproto/server/list_app_passwords.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 | 400 +++--- .../src/com_chrisvanderloo/project.rs | 34 +- .../src/com_deckbelcher/collection/list.rs | 56 +- .../src/com_deckbelcher/deck/list.rs | 60 +- .../src/com_deckbelcher/richtext/facet.rs | 52 +- .../src/com_deckbelcher/social/comment.rs | 30 +- .../src/com_deckbelcher/social/reply.rs | 58 +- .../src/com_germnetwork/declaration.rs | 26 +- .../src/com_kipclip/annotation.rs | 26 +- crates/jacquard-api/src/com_kipclip/tag.rs | 26 +- .../com_shinolabs/pinksea/app_view_defs.rs | 106 +- .../pinksea/get_parent_for_reply.rs | 26 +- .../src/com_shinolabs/pinksea/oekaki.rs | 26 +- .../src/com_shinolabs/pinksea/profile.rs | 26 +- .../src/com_suibari/atsumeat/sticker.rs | 98 +- .../src/com_suibari/atsumeat/transaction.rs | 26 +- .../blog/get_entry_metadata_by_name.rs | 26 +- .../src/com_yuna0x0/guestbook/sign.rs | 30 +- .../src/community_lexicon/calendar/event.rs | 26 +- .../community_lexicon/calendar/get_event.rs | 26 +- .../community_lexicon/calendar/get_rsvp.rs | 26 +- .../calendar/search_events.rs | 56 +- .../src/community_lexicon/interaction/like.rs | 26 +- .../src/computer_aesthetic/kidlisp.rs | 60 +- .../src/computer_aesthetic/mood.rs | 30 +- .../src/computer_aesthetic/painting.rs | 90 +- .../src/computer_aesthetic/piece.rs | 30 +- .../src/computer_aesthetic/tape.rs | 30 +- .../src/coop_hypha/pollen/claim.rs | 58 +- .../src/coop_hypha/spores/content/text.rs | 26 +- .../coop_hypha/spores/item/special_spore.rs | 26 +- .../src/coop_hypha/spores/social/flower.rs | 26 +- .../src/dev_baileytownsend/demo/example.rs | 26 +- .../src/dev_baileytownsend/health/rings.rs | 86 +- .../src/dev_baileytownsend/health/steps.rs | 26 +- .../src/dev_baileytownsend/health/workout.rs | 76 +- .../experimental/atforumv1/feed/post.rs | 94 +- .../experimental/atforumv1/feed/question.rs | 78 +- .../experimental/atforumv1/feed/reply.rs | 30 +- .../atforumv1/forum/announcement.rs | 34 +- .../experimental/atforumv1/forum/category.rs | 48 +- .../example_cat_lexicon.rs | 26 +- crates/jacquard-api/src/dev_keytrace.rs | 11 + crates/jacquard-api/src/dev_keytrace/claim.rs | 1000 +++++++++++++ .../jacquard-api/src/dev_keytrace/profile.rs | 307 ++++ .../src/dev_keytrace/server_public_key.rs | 407 ++++++ .../src/dev_keytrace/signature.rs | 485 +++++++ .../src/dev_keytrace/statement.rs | 509 +++++++ .../src/dev_keytrace/user_public_key.rs | 650 +++++++++ .../src/dev_ocbwoy3/blueboard/board.rs | 56 +- .../src/dev_sensorthings/datastream.rs | 138 +- .../dev_sensorthings/feature_of_interest.rs | 34 +- .../src/dev_sensorthings/multi_observation.rs | 48 +- .../src/dev_sensorthings/observation_batch.rs | 58 +- .../src/dev_sensorthings/sensor.rs | 48 +- .../jacquard-api/src/dev_tsunagite/chart.rs | 64 +- crates/jacquard-api/src/dev_tsunagite/game.rs | 150 +- crates/jacquard-api/src/dev_tsunagite/song.rs | 30 +- .../jacquard-api/src/dev_tsunagite/types.rs | 48 +- .../src/dev_vielle/guestbook/entry.rs | 26 +- .../jacquard-api/src/directory_evnt/event.rs | 86 +- .../src/diy_razorgirl/winter/fact.rs | 48 +- .../src/diy_razorgirl/winter/job.rs | 58 +- .../src/diy_razorgirl/winter/note.rs | 64 +- .../src/diy_razorgirl/winter/thought.rs | 30 +- .../src/diy_razorgirl/winter/tool.rs | 86 +- .../src/diy_razorgirl/winter/wiki_entry.rs | 38 +- .../src/diy_razorgirl/winter/wiki_link.rs | 58 +- .../src/download_darkworld/site/get_state.rs | 138 +- .../src/download_darkworld/state.rs | 34 +- crates/jacquard-api/src/eu_atchef/recipe.rs | 30 +- .../src/events_smokesignal/lfg.rs | 108 +- .../src/fm_teal/alpha/actor/status.rs | 26 +- .../jacquard-api/src/fm_teal/alpha/stats.rs | 90 +- .../src/fyi_frontpage/feed/post.rs | 30 +- .../src/fyi_questionable/answer.rs | 30 +- .../src/fyi_questionable/question.rs | 30 +- .../src/fyi_questionable/richtext/facet.rs | 26 +- .../src/fyi_questionable/richtext/header.rs | 26 +- .../src/fyi_questionable/richtext/image.rs | 52 +- .../src/fyi_unravel/frontpage/comment.rs | 30 +- .../src/fyi_unravel/frontpage/post.rs | 30 +- .../barklesheep/place_sheeps.rs | 30 +- .../games_firehose/barklesheep/reaction.rs | 30 +- .../src/games_gamesgamesgamesgames.rs | 246 ++-- .../games_gamesgamesgamesgames/actor/game.rs | 30 +- .../actor/profile.rs | 26 +- .../claim_review.rs | 34 +- .../games_gamesgamesgamesgames/collection.rs | 26 +- .../feed/generator.rs | 30 +- .../src/games_gamesgamesgamesgames/game.rs | 30 +- .../games_gamesgamesgamesgames/get_claim.rs | 98 +- .../games_gamesgamesgamesgames/get_reviews.rs | 34 +- .../games_gamesgamesgamesgames/graph/like.rs | 26 +- .../migrate_claim.rs | 52 +- .../games_gamesgamesgamesgames/org/profile.rs | 26 +- .../games_gamesgamesgamesgames/platform.rs | 26 +- .../games_gamesgamesgamesgames/redirect.rs | 56 +- .../richtext/facet.rs | 26 +- .../jacquard-api/src/garden_goals/category.rs | 30 +- .../src/garden_goals/completion.rs | 72 +- .../src/garden_goals/completion_details.rs | 64 +- crates/jacquard-api/src/garden_goals/goal.rs | 56 +- .../src/garden_lexicon/documentation.rs | 26 +- .../exultant_zebra/distribution.rs | 26 +- crates/jacquard-api/src/haus_opn/mic/show.rs | 34 +- .../src/haus_opn/mic/show/episode/favorite.rs | 26 +- .../src/haus_opn/mic/show/favorite.rs | 26 +- .../jacquard-api/src/io_atcr/hold/captain.rs | 56 +- .../src/io_atcr/hold/complete_upload.rs | 56 +- crates/jacquard-api/src/io_atcr/hold/crew.rs | 64 +- .../src/io_atcr/hold/get_part_upload_url.rs | 26 +- crates/jacquard-api/src/io_atcr/hold/layer.rs | 122 +- .../src/io_atcr/hold/notify_manifest.rs | 58 +- crates/jacquard-api/src/io_atcr/hold/scan.rs | 222 +-- .../src/io_atcr/hold/set_stats.rs | 26 +- crates/jacquard-api/src/io_atcr/hold/stats.rs | 68 +- .../src/io_atcr/hold/subscribe_scan_jobs.rs | 248 ++-- .../src/io_atcr/hold/update_crew_tier.rs | 26 +- crates/jacquard-api/src/io_atcr/manifest.rs | 102 +- crates/jacquard-api/src/io_atcr/repo/page.rs | 30 +- .../src/io_atcr/sailor/webhook.rs | 52 +- crates/jacquard-api/src/io_atcr/tag.rs | 26 +- crates/jacquard-api/src/io_kich/cookinglog.rs | 26 +- .../jacquard-api/src/io_kich/graph/follow.rs | 26 +- .../src/io_kich/recipe/collectionitem.rs | 30 +- .../jacquard-api/src/io_kich/recipe/like.rs | 26 +- .../jacquard-api/src/io_kich/recipe/recipe.rs | 48 +- .../jacquard-api/src/io_kich/recipe/review.rs | 30 +- .../src/io_livewire/p3k/podping00.rs | 26 +- .../jacquard-api/src/io_whiteley/ATlas/pin.rs | 86 +- .../src/io_whiteley/luke/ATlas/pin.rs | 62 +- .../src/io_whiteside/linked_account.rs | 30 +- .../jacquard-api/src/io_whiteside/profile.rs | 48 +- crates/jacquard-api/src/lib.rs | 16 + .../src/link_bridgebeats/lookup.rs | 94 +- crates/jacquard-api/src/me_linkna/lastfm.rs | 30 +- .../jacquard-api/src/me_linkna/linkinbio.rs | 228 +-- .../src/media_ionosphere/group.rs | 48 +- .../jacquard-api/src/media_ionosphere/log.rs | 30 +- .../src/media_ionosphere/programme.rs | 30 +- .../src/moe_karashiiro/kpaste/paste.rs | 26 +- crates/jacquard-api/src/my_skylights/rel.rs | 26 +- .../src/net_alternativeproto/review.rs | 34 +- .../src/net_alternativeproto/submission.rs | 68 +- .../src/net_alternativeproto/vote.rs | 30 +- crates/jacquard-api/src/net_altq/aqfile.rs | 26 +- .../src/net_anisota/beta/game/collection.rs | 58 +- .../src/net_anisota/beta/game/inventory.rs | 34 +- .../src/net_anisota/beta/game/log.rs | 30 +- .../src/net_anisota/beta/game/pack.rs | 58 +- .../src/net_anisota/beta/game/progress.rs | 70 +- .../src/net_anisota/beta/game/session.rs | 58 +- .../src/net_anisota/feed/draft.rs | 26 +- .../jacquard-api/src/net_anisota/feed/like.rs | 26 +- .../src/net_anisota/feed/list_item.rs | 30 +- .../jacquard-api/src/net_anisota/feed/post.rs | 26 +- .../src/net_anisota/graph/mute.rs | 26 +- .../src/net_anisota/harvest/minigame.rs | 62 +- .../src/net_asadaame5121/at_circle/banner.rs | 30 +- .../src/net_asadaame5121/at_circle/block.rs | 48 +- .../src/net_asadaame5121/at_circle/member.rs | 34 +- .../src/net_asadaame5121/at_circle/request.rs | 34 +- .../src/net_asadaame5121/at_circle/ring.rs | 48 +- .../jacquard-api/src/net_jbsm/jb/reminder.rs | 34 +- .../jacquard-api/src/net_mmatt/right/now.rs | 26 +- .../jacquard-api/src/net_mmatt/vitals/car.rs | 96 +- .../src/net_shwilliam/hyphae/note.rs | 26 +- .../jacquard-api/src/network_cosmik/card.rs | 26 +- .../src/network_cosmik/collection.rs | 26 +- .../src/network_cosmik/collection_link.rs | 34 +- .../network_cosmik/collection_link_removal.rs | 30 +- .../jacquard-api/src/network_slices/actor.rs | 26 +- .../src/network_slices/lexicon.rs | 58 +- .../jacquard-api/src/network_slices/slice.rs | 162 +-- .../slice/create_o_auth_client.rs | 30 +- .../src/network_slices/slice/get_actors.rs | 48 +- .../src/network_slices/slice/get_job_logs.rs | 64 +- .../network_slices/slice/get_job_status.rs | 124 +- .../slice/get_o_auth_clients.rs | 136 +- .../network_slices/slice/get_slice_records.rs | 90 +- .../network_slices/slice/get_sync_summary.rs | 30 +- .../src/network_slices/slice/stats.rs | 30 +- .../jacquard-api/src/network_slices/tools.rs | 26 +- .../src/network_slices/tools/bug.rs | 122 +- .../src/network_slices/tools/bug/comment.rs | 30 +- .../src/network_slices/tools/bug/issue.rs | 30 +- .../src/network_slices/tools/bug/response.rs | 30 +- .../src/network_slices/tools/document.rs | 60 +- .../src/network_slices/waitlist.rs | 56 +- .../src/network_slices/waitlist/request.rs | 26 +- .../src/ooo_bsky/authfetch/fetch_records.rs | 30 +- .../src/ooo_bsky/authfetch/list_records.rs | 30 +- .../src/ooo_bsky/authfetch/put_record.rs | 34 +- .../src/org_atpodcasting/episode.rs | 134 +- .../src/org_atpodcasting/follow.rs | 26 +- .../src/org_atpodcasting/podcast.rs | 144 +- crates/jacquard-api/src/org_atsui/blob.rs | 52 +- crates/jacquard-api/src/org_atsui/tabs.rs | 48 +- .../jacquard-api/src/org_devcon/event/test.rs | 30 +- .../src/org_farmapps/temp/ecrop.rs | 26 +- .../jacquard-api/src/org_hyperboards/board.rs | 26 +- .../src/org_hyperboards/contributor.rs | 26 +- .../src/org_hypercerts/claim/activity.rs | 30 +- .../src/org_hypercerts/claim/rights.rs | 34 +- .../org_hypercerts/context/acknowledgement.rs | 30 +- .../src/org_hypercerts/context/evaluation.rs | 60 +- .../src/org_hypercerts/context/measurement.rs | 60 +- .../src/org_hypercerts/funding/receipt.rs | 38 +- .../org_hypercerts/helper/work_scope_tag.rs | 30 +- .../src/org_hypercerts/workscope/cel.rs | 52 +- .../src/org_hypercerts/workscope/tag.rs | 30 +- .../src/org_impactindexer/link/attestation.rs | 102 +- .../src/org_impactindexer/review/comment.rs | 30 +- .../src/org_impactindexer/review/like.rs | 26 +- .../src/org_okazu_diary/embed/external.rs | 26 +- .../org_okazu_diary/feed/collection_item.rs | 30 +- .../material/collection_item.rs | 30 +- .../jacquard-api/src/org_passingreads/book.rs | 238 ++-- .../src/org_passingreads/book/event.rs | 98 +- .../src/org_passingreads/book/registration.rs | 122 +- .../jacquard-api/src/org_simocracy/agents.rs | 48 +- .../jacquard-api/src/org_simocracy/event.rs | 34 +- .../src/org_simocracy/interview.rs | 34 +- crates/jacquard-api/src/org_simocracy/sim.rs | 30 +- .../jacquard-api/src/org_simocracy/skill.rs | 30 +- .../jacquard-api/src/org_simocracy/style.rs | 30 +- .../src/org_stormlightlabs/malfestio/deck.rs | 26 +- .../malfestio/thread/comment.rs | 30 +- .../jacquard-api/src/pink_vase/pod/comment.rs | 30 +- .../jacquard-api/src/pink_vase/pod/episode.rs | 34 +- .../src/pink_vase/pod/playlist.rs | 30 +- .../src/place_atwork/endorsement.rs | 34 +- .../src/place_atwork/get_listing.rs | 26 +- .../jacquard-api/src/place_atwork/listing.rs | 64 +- crates/jacquard-api/src/place_stream.rs | 64 +- .../src/place_stream/broadcast.rs | 64 +- .../src/place_stream/broadcast/origin.rs | 30 +- crates/jacquard-api/src/place_stream/chat.rs | 68 +- .../src/place_stream/chat/message.rs | 56 +- .../src/place_stream/chat/profile.rs | 48 +- crates/jacquard-api/src/place_stream/key.rs | 26 +- .../place_stream/live/get_recommendations.rs | 26 +- .../src/place_stream/live/recommendations.rs | 26 +- .../src/place_stream/livestream.rs | 158 +-- .../src/place_stream/moderation.rs | 56 +- .../place_stream/moderation/create_gate.rs | 26 +- .../place_stream/moderation/delete_gate.rs | 26 +- .../src/place_stream/moderation/permission.rs | 30 +- .../src/place_stream/multistream.rs | 60 +- .../place_stream/multistream/list_targets.rs | 30 +- .../src/place_stream/playback/whep.rs | 26 +- .../jacquard-api/src/place_stream/segment.rs | 114 +- .../jacquard-api/src/place_stream/server.rs | 94 +- .../src/place_stream/server/create_webhook.rs | 26 +- crates/jacquard-api/src/place_wisp/fs.rs | 48 +- .../jacquard-api/src/pub_leaflet/comment.rs | 30 +- .../src/pub_leaflet/interactions/recommend.rs | 26 +- .../src/pub_leaflet/pages/canvas.rs | 60 +- .../src/pub_leaflet/pages/linear_document.rs | 26 +- .../src/pub_leaflet/poll/definition.rs | 26 +- .../src/pub_leaflet/richtext/facet.rs | 26 +- .../src/pub_leaflet/theme/color.rs | 82 +- crates/jacquard-api/src/pub_quizzy/answer.rs | 56 +- crates/jacquard-api/src/pub_quizzy/league.rs | 30 +- crates/jacquard-api/src/pub_quizzy/quiz.rs | 34 +- .../jacquard-api/src/pub_quizzy/quiz_begin.rs | 34 +- .../jacquard-api/src/pub_quizzy/team_score.rs | 74 +- .../src/science_alt/dataset/entry.rs | 64 +- .../src/science_alt/dataset/label.rs | 30 +- .../src/science_alt/dataset/lens.rs | 70 +- .../science_alt/dataset/lens_verification.rs | 56 +- .../src/science_alt/dataset/resolve_schema.rs | 26 +- .../src/science_alt/dataset/storage_http.rs | 26 +- .../src/science_alt/dataset/storage_s3.rs | 52 +- .../scot_comhairle/testing_polis_poll_v1.rs | 26 +- .../testing_polis_statement_v1.rs | 30 +- .../scot_comhairle/testing_polis_vote_v1.rs | 78 +- crates/jacquard-api/src/sh_tangled.rs | 3 +- .../src/sh_tangled/feed/reaction.rs | 48 +- .../jacquard-api/src/sh_tangled/feed/star.rs | 26 +- .../src/sh_tangled/git/ref_update.rs | 146 +- .../jacquard-api/src/sh_tangled/git/temp.rs | 210 +-- .../src/sh_tangled/git/temp/analyze_merge.rs | 30 +- .../src/sh_tangled/git/temp/get_commit.rs | 26 +- .../src/sh_tangled/git/temp/get_diff.rs | 30 +- .../src/sh_tangled/git/temp/get_tree.rs | 90 +- .../src/sh_tangled/git/temp/list_languages.rs | 30 +- .../src/sh_tangled/graph/follow.rs | 26 +- crates/jacquard-api/src/sh_tangled/knot.rs | 4 + .../src/sh_tangled/knot/list_keys.rs | 30 +- .../src/sh_tangled/knot/subscribe_repos.rs | 865 ++++++++++++ .../src/sh_tangled/label/definition.rs | 60 +- .../jacquard-api/src/sh_tangled/label/op.rs | 60 +- .../jacquard-api/src/sh_tangled/pipeline.rs | 174 +-- .../sh_tangled/pipeline/cancel_pipeline.rs | 30 +- .../src/sh_tangled/pipeline/status.rs | 58 +- .../jacquard-api/src/sh_tangled/public_key.rs | 48 +- crates/jacquard-api/src/sh_tangled/repo.rs | 30 +- .../src/sh_tangled/repo/add_secret.rs | 48 +- .../src/sh_tangled/repo/artifact.rs | 62 +- .../jacquard-api/src/sh_tangled/repo/blob.rs | 90 +- .../src/sh_tangled/repo/branch.rs | 56 +- .../src/sh_tangled/repo/collaborator.rs | 30 +- .../src/sh_tangled/repo/compare.rs | 48 +- .../src/sh_tangled/repo/delete.rs | 30 +- .../jacquard-api/src/sh_tangled/repo/diff.rs | 26 +- .../src/sh_tangled/repo/fork_status.rs | 62 +- .../src/sh_tangled/repo/fork_sync.rs | 64 +- .../src/sh_tangled/repo/hidden_ref.rs | 30 +- .../src/sh_tangled/repo/issue/comment.rs | 30 +- .../src/sh_tangled/repo/languages.rs | 30 +- .../src/sh_tangled/repo/list_secrets.rs | 34 +- .../jacquard-api/src/sh_tangled/repo/log.rs | 26 +- .../jacquard-api/src/sh_tangled/repo/merge.rs | 64 +- .../src/sh_tangled/repo/merge_check.rs | 60 +- .../jacquard-api/src/sh_tangled/repo/pull.rs | 90 +- .../src/sh_tangled/repo/pull/comment.rs | 30 +- .../jacquard-api/src/sh_tangled/repo/tag.rs | 26 +- .../jacquard-api/src/sh_tangled/repo/tree.rs | 90 +- .../src/sh_tangled/spindle/member.rs | 30 +- crates/jacquard-api/src/sh_tangled/string.rs | 52 +- crates/jacquard-api/src/sh_tangled/sync.rs | 6 + .../src/sh_tangled/sync/request_crawl.rs | 100 ++ crates/jacquard-api/src/sh_weaver/actor.rs | 82 +- crates/jacquard-api/src/sh_weaver/collab.rs | 282 ++-- .../src/sh_weaver/collab/accept.rs | 30 +- .../src/sh_weaver/collab/invite.rs | 30 +- crates/jacquard-api/src/sh_weaver/edit.rs | 128 +- .../jacquard-api/src/sh_weaver/edit/cursor.rs | 30 +- .../jacquard-api/src/sh_weaver/edit/diff.rs | 26 +- crates/jacquard-api/src/sh_weaver/embed.rs | 26 +- .../src/sh_weaver/embed/external.rs | 60 +- .../src/sh_weaver/embed/record_with_media.rs | 26 +- .../src/sh_weaver/embed/records.rs | 120 +- crates/jacquard-api/src/sh_weaver/graph.rs | 250 ++-- .../jacquard-api/src/sh_weaver/graph/like.rs | 26 +- .../jacquard-api/src/sh_weaver/graph/list.rs | 30 +- .../src/sh_weaver/graph/listitem.rs | 30 +- .../src/sh_weaver/graph/subscribe.rs | 26 +- .../src/sh_weaver/graph/subscribe_accept.rs | 26 +- .../jacquard-api/src/sh_weaver/graph/tag.rs | 30 +- crates/jacquard-api/src/sh_weaver/notebook.rs | 542 +++---- .../src/sh_weaver/notebook/book.rs | 26 +- .../src/sh_weaver/notebook/chapter.rs | 30 +- .../src/sh_weaver/notebook/colour_scheme.rs | 30 +- .../src/sh_weaver/notebook/entry.rs | 60 +- .../sh_weaver/notebook/get_entry_notebooks.rs | 26 +- .../notebook/get_notebook_by_title.rs | 26 +- .../notebook/get_suggested_notebooks.rs | 26 +- .../src/sh_weaver/notebook/page.rs | 30 +- .../src/sh_weaver/notebook/resolve_entry.rs | 48 +- .../sh_weaver/notebook/resolve_notebook.rs | 26 +- .../src/sh_weaver/notebook/theme.rs | 182 +-- .../src/sh_weaver/notification.rs | 224 +-- .../src/sh_weaver/publish/blob.rs | 26 +- .../src/site_standard/document.rs | 30 +- .../src/site_standard/publication.rs | 26 +- .../src/site_standard/theme/basic.rs | 34 +- .../src/site_standard/theme/color.rs | 82 +- .../src/social_clippr/actor/profile.rs | 26 +- crates/jacquard-api/src/social_clippr/feed.rs | 120 +- .../src/social_clippr/feed/clip.rs | 62 +- .../src/social_clippr/feed/tag.rs | 26 +- .../src/social_colibri/approval.rs | 30 +- .../src/social_drydown/fragrance.rs | 30 +- .../jacquard-api/src/social_drydown/house.rs | 26 +- .../jacquard-api/src/social_drydown/review.rs | 26 +- crates/jacquard-api/src/social_grain/actor.rs | 26 +- .../jacquard-api/src/social_grain/favorite.rs | 26 +- .../jacquard-api/src/social_grain/gallery.rs | 98 +- .../src/social_grain/gallery/item.rs | 30 +- crates/jacquard-api/src/social_grain/photo.rs | 68 +- .../src/social_grain/photo/exif.rs | 26 +- .../src/social_lexical/works/collection.rs | 26 +- .../social_lexical/works/collectionitem.rs | 30 +- .../src/social_lexical/works/identifiers.rs | 26 +- .../src/social_octosphere/publication.rs | 368 ++--- .../src/social_pace/daily/ring.rs | 86 +- .../src/social_pace/daily/step.rs | 30 +- crates/jacquard-api/src/social_pace/feed.rs | 30 +- .../src/social_pace/feed/activity.rs | 34 +- .../jacquard-api/src/social_pace/goal/ring.rs | 118 +- .../jacquard-api/src/social_pace/goal/step.rs | 30 +- .../jacquard-api/src/social_pmsky/proposal.rs | 68 +- crates/jacquard-api/src/social_pmsky/vote.rs | 34 +- .../src/social_psky/chat/message.rs | 26 +- .../jacquard-api/src/social_psky/chat/room.rs | 26 +- .../src/social_psky/richtext/facet.rs | 26 +- crates/jacquard-api/src/social_showcase.rs | 512 +++---- .../src/social_showcase/feed/reaction.rs | 30 +- .../social_showcase/library/create_item.rs | 34 +- .../src/social_showcase/library/item.rs | 88 +- .../social_showcase/profile/preferences.rs | 86 +- .../src/social_showcase/profile/profile.rs | 34 +- .../src/social_tophhie/profile.rs | 26 +- crates/jacquard-api/src/st_lifepo/profile.rs | 26 +- crates/jacquard-api/src/st_snowpo/post.rs | 26 +- .../src/systems_timker/hawlt/list_notes.rs | 34 +- .../src/systems_timker/hawlt/note.rs | 52 +- .../tech_lenooby09/didgit/signature_proof.rs | 100 +- .../src/tech_manos/twmirror/post.rs | 34 +- crates/jacquard-api/src/tech_tokimeki/kaku.rs | 430 +++--- .../src/tech_tokimeki/kaku/collection.rs | 26 +- .../src/tech_tokimeki/kaku/collection_item.rs | 30 +- .../src/tech_tokimeki/kaku/post.rs | 30 +- .../src/tech_tokimeki/kaku/reaction.rs | 30 +- .../src/tech_tokimeki/kaku/request.rs | 26 +- .../tech_tokimeki/kaku/request_response.rs | 30 +- .../src/tech_tokimeki/kaku/room_gate.rs | 26 +- .../src/tech_tokimeki/poll/poll.rs | 48 +- .../src/tech_tokimeki/takibi/spark.rs | 26 +- crates/jacquard-api/src/to_atpr.rs | 6 + crates/jacquard-api/src/to_atpr/link.rs | 297 ++++ .../src/tools_ozone/communication.rs | 102 +- .../hosting/get_account_history.rs | 48 +- .../src/tools_ozone/moderation.rs | 1208 ++++++++-------- .../moderation/cancel_scheduled_actions.rs | 26 +- .../src/tools_ozone/moderation/emit_event.rs | 30 +- .../moderation/get_account_timeline.rs | 56 +- .../tools_ozone/moderation/schedule_action.rs | 64 +- .../jacquard-api/src/tools_ozone/safelink.rs | 302 ++-- .../src/tools_ozone/safelink/add_rule.rs | 58 +- .../src/tools_ozone/safelink/remove_rule.rs | 26 +- .../src/tools_ozone/safelink/update_rule.rs | 34 +- crates/jacquard-api/src/tools_ozone/set.rs | 78 +- .../src/tools_ozone/set/delete_values.rs | 26 +- .../jacquard-api/src/tools_ozone/setting.rs | 106 +- .../src/tools_ozone/setting/upsert_option.rs | 48 +- crates/jacquard-api/src/tools_ozone/team.rs | 26 +- .../src/tools_ozone/verification.rs | 78 +- .../verification/grant_verifications.rs | 30 +- .../src/top_launchpadx/agent/ack.rs | 26 +- .../src/top_launchpadx/agent/thought.rs | 26 +- crates/jacquard-api/src/uk_ewancroft/now.rs | 26 +- crates/jacquard-api/src/uk_skyblur/post.rs | 34 +- .../src/uk_skyblur/post/decrypt_by_cid.rs | 58 +- .../src/us_polhem/blog/content.rs | 30 +- .../jacquard-api/src/us_polhem/blog/post.rs | 52 +- crates/jacquard-api/src/us_polhem/blog/tag.rs | 56 +- crates/jacquard-api/src/win_tomo_x/pushat.rs | 30 +- .../src/win_tomo_x/pushat/push_notify.rs | 26 +- crates/jacquard-api/src/world_ptah.rs | 6 + crates/jacquard-api/src/world_ptah/temp.rs | 89 ++ .../src/world_ptah/temp/action.rs | 793 +++++++++++ .../src/world_ptah/temp/character.rs | 1239 +++++++++++++++++ .../src/world_ptah/temp/contribution.rs | 876 ++++++++++++ .../src/world_ptah/temp/declaration.rs | 358 +++++ .../jacquard-api/src/world_ptah/temp/event.rs | 1199 ++++++++++++++++ .../src/world_ptah/temp/location.rs | 1082 ++++++++++++++ .../jacquard-api/src/world_ptah/temp/lore.rs | 889 ++++++++++++ .../jacquard-api/src/world_ptah/temp/role.rs | 1112 +++++++++++++++ .../jacquard-api/src/world_ptah/temp/world.rs | 1084 ++++++++++++++ .../jacquard-api/src/xyz_atpoke/graph/poke.rs | 26 +- .../src/za_co/ciaran/cumulus/bet.rs | 30 +- .../src/za_co/ciaran/cumulus/market.rs | 60 +- .../src/za_co/ciaran/cumulus/resolution.rs | 30 +- .../src/zip_viruus/chat/message.rs | 30 +- crates/jacquard-api/src/zone_stratos.rs | 31 +- .../src/zone_stratos/actor/enrollment.rs | 60 +- .../jacquard-api/src/zone_stratos/identity.rs | 6 + .../identity/resolve_enrollments.rs | 150 ++ .../src/zone_stratos/repo/hydrate_records.rs | 30 +- .../zone_stratos/sync/subscribe_records.rs | 86 +- 679 files changed, 33681 insertions(+), 18289 deletions(-) create mode 100644 crates/jacquard-api/lexicons/at_youandme_connection.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_claim.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_profile.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_serverPublicKey.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_signature.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_statement.json create mode 100644 crates/jacquard-api/lexicons/dev_keytrace_userPublicKey.json create mode 100644 crates/jacquard-api/lexicons/sh_tangled_knot_subscribeRepos.json create mode 100644 crates/jacquard-api/lexicons/sh_tangled_sync_requestCrawl.json create mode 100644 crates/jacquard-api/lexicons/to_atpr_link.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_action.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_character.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_contribution.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_declaration.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_defs.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_event.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_location.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_lore.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_role.json create mode 100644 crates/jacquard-api/lexicons/world_ptah_temp_world.json create mode 100644 crates/jacquard-api/lexicons/zone_stratos_identity_resolveEnrollments.json create mode 100644 crates/jacquard-api/src/at_youandme.rs create mode 100644 crates/jacquard-api/src/at_youandme/connection.rs create mode 100644 crates/jacquard-api/src/dev_keytrace.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/claim.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/profile.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/server_public_key.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/signature.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/statement.rs create mode 100644 crates/jacquard-api/src/dev_keytrace/user_public_key.rs create mode 100644 crates/jacquard-api/src/sh_tangled/knot/subscribe_repos.rs create mode 100644 crates/jacquard-api/src/sh_tangled/sync.rs create mode 100644 crates/jacquard-api/src/sh_tangled/sync/request_crawl.rs create mode 100644 crates/jacquard-api/src/to_atpr.rs create mode 100644 crates/jacquard-api/src/to_atpr/link.rs create mode 100644 crates/jacquard-api/src/world_ptah.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/action.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/character.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/contribution.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/declaration.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/event.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/location.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/lore.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/role.rs create mode 100644 crates/jacquard-api/src/world_ptah/temp/world.rs create mode 100644 crates/jacquard-api/src/zone_stratos/identity.rs create mode 100644 crates/jacquard-api/src/zone_stratos/identity/resolve_enrollments.rs diff --git a/crates/jacquard-api/Cargo.toml b/crates/jacquard-api/Cargo.toml index 61632b5a3..d9916bcfe 100644 --- a/crates/jacquard-api/Cargo.toml +++ b/crates/jacquard-api/Cargo.toml @@ -61,7 +61,7 @@ app_juttu = ["com_atproto"] app_mathr = [] app_nblr = [] app_ocho = [] -app_offprint = ["com_atproto", "site_standard"] +app_offprint = ["com_atproto"] app_openmkt = [] app_protoimsg = [] app_rocksky = ["com_atproto"] @@ -73,8 +73,9 @@ at_noted = [] at_pasteb = [] at_podping = [] at_unthread = [] +at_youandme = [] beauty_cybernetic = [] -blog_pckt = ["com_atproto", "site_standard"] +blog_pckt = ["com_atproto"] blue__2048 = [] blue_atplane = [] blue_atplay = [] @@ -114,6 +115,7 @@ coop_hypha = ["com_atproto"] dev_baileytownsend = [] dev_fudgeu = [] dev_kanad = [] +dev_keytrace = [] dev_ocbwoy3 = [] dev_regnault = [] dev_sensorthings = [] @@ -179,12 +181,12 @@ pink_vase = ["com_atproto"] place_atwork = [] place_stream = ["app_bsky", "com_atproto"] place_wisp = [] -pub_leaflet = ["com_atproto", "site_standard"] +pub_leaflet = ["com_atproto"] pub_quizzy = ["com_atproto"] science_alt = [] scot_comhairle = [] sh_tangled = [] -sh_weaver = ["app_bsky", "com_atproto", "site_standard"] +sh_weaver = ["app_bsky", "com_atproto"] site_standard = ["com_atproto", "pub_leaflet"] social_clippr = [] social_colibri = [] @@ -208,6 +210,7 @@ systems_timker = [] tech_lenooby09 = [] tech_manos = ["com_atproto"] tech_tokimeki = ["app_bsky", "com_atproto"] +to_atpr = [] tools_ozone = ["app_bsky", "chat_bsky", "com_atproto"] tools_smokesignal = [] top_launchpadx = [] @@ -215,6 +218,7 @@ uk_ewancroft = [] uk_skyblur = [] us_polhem = ["app_bsky"] win_tomo_x = [] +world_ptah = [] xyz_atpoke = ["com_atproto"] za_co = ["com_atproto"] zip_viruus = [] diff --git a/crates/jacquard-api/lexicons/at_youandme_connection.json b/crates/jacquard-api/lexicons/at_youandme_connection.json new file mode 100644 index 000000000..621e1a57b --- /dev/null +++ b/crates/jacquard-api/lexicons/at_youandme_connection.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "at.youandme.connection", + "defs": { + "main": { + "type": "record", + "description": "A connection created by scanning someone's QR code", + "key": "tid", + "record": { + "type": "object", + "required": [ + "subject", + "createdAt" + ], + "properties": { + "createdAt": { + "type": "string", + "format": "datetime" + }, + "subject": { + "type": "string", + "description": "DID of the connected user", + "format": "did" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_claim.json b/crates/jacquard-api/lexicons/dev_keytrace_claim.json new file mode 100644 index 000000000..e2a35b6c1 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_claim.json @@ -0,0 +1,128 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.claim", + "defs": { + "identity": { + "type": "object", + "description": "Generic identity data for the claimed account", + "required": [ + "subject" + ], + "properties": { + "avatarUrl": { + "type": "string", + "description": "Avatar/profile image URL", + "format": "uri" + }, + "displayName": { + "type": "string", + "description": "Display name if different from subject" + }, + "profileUrl": { + "type": "string", + "description": "Profile page URL", + "format": "uri" + }, + "subject": { + "type": "string", + "description": "Primary identifier (username, domain, handle, etc.)" + } + } + }, + "main": { + "type": "record", + "description": "An identity claim linking this DID to an external account", + "key": "tid", + "record": { + "type": "object", + "required": [ + "type", + "claimUri", + "identity", + "sigs", + "createdAt" + ], + "properties": { + "claimUri": { + "type": "string", + "description": "The identity claim URI (e.g., for github: https://gist.github.com/username/id, dns:example.com)" + }, + "comment": { + "type": "string", + "description": "Optional user-provided label for this claim", + "maxLength": 256 + }, + "createdAt": { + "type": "string", + "description": "Datetime when this claim was created (ISO 8601).", + "format": "datetime" + }, + "failedAt": { + "type": "string", + "description": "Timestamp when the claim last failed re-verification or was retracted", + "format": "datetime" + }, + "identity": { + "type": "ref", + "description": "Structured data about the claimed identity, derived from the claimUri and knowledge inside the verification process. This is not the raw claim data, but a normalized set of fields that can be used for display and more.", + "ref": "#identity" + }, + "lastVerifiedAt": { + "type": "string", + "description": "Timestamp of the most recent successful re-verification by the system", + "format": "datetime" + }, + "nonce": { + "type": "string", + "description": "Random one-time value embedded in the challenge text posted to the external service. Used by verifiers to confirm the proof was created specifically for this claim session. Keytrace itself does not use this, but other services making claims may require it for their verification process.", + "maxGraphemes": 128 + }, + "prerelease": { + "type": "boolean", + "description": "Whether this claim was created during the prerelease/alpha period" + }, + "retractedAt": { + "type": "string", + "description": "Datetime when this claim was retracted. Present only if the claim has been retracted (ISO 8601).", + "format": "datetime" + }, + "sigs": { + "type": "array", + "description": "Cryptographic attestation signatures from verification services, for example from @keytrace.dev. These are optional, and so you can pass an empty array. Keytrace will place its attestation signature in the claim here so that the library @keytrace/claims can be used by external developers to not have to implement their own verification logic.", + "items": { + "type": "ref", + "ref": "dev.keytrace.signature#main" + } + }, + "status": { + "type": "string", + "description": "Current verification status of this claim. Absent on legacy records, treated as 'verified'.", + "knownValues": [ + "verified", + "failed", + "retracted" + ] + }, + "type": { + "type": "string", + "description": "The claim type identifier", + "knownValues": [ + "github", + "dns", + "activitypub", + "bsky", + "npm", + "tangled", + "pgp", + "twitter", + "linkedin", + "instagram", + "reddit", + "hackernews" + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_profile.json b/crates/jacquard-api/lexicons/dev_keytrace_profile.json new file mode 100644 index 000000000..d26233d63 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_profile.json @@ -0,0 +1,30 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.profile", + "defs": { + "main": { + "type": "record", + "description": "Keytrace profile settings. Singleton record stored in the user's ATProto repo.", + "key": "literal:self", + "record": { + "type": "object", + "properties": { + "bio": { + "type": "string", + "description": "Bio or description shown on the keytrace profile page.", + "maxGraphemes": 1024 + }, + "createdAt": { + "type": "string", + "format": "datetime" + }, + "displayName": { + "type": "string", + "description": "Display name override for the keytrace profile. Falls back to Bluesky display name if absent.", + "maxGraphemes": 128 + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_serverPublicKey.json b/crates/jacquard-api/lexicons/dev_keytrace_serverPublicKey.json new file mode 100644 index 000000000..e887dc0d9 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_serverPublicKey.json @@ -0,0 +1,41 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.serverPublicKey", + "defs": { + "main": { + "type": "record", + "description": "A signing key for claim attestations. It effectively hosts a JWK on a user's ATProto repo.", + "key": "any", + "record": { + "type": "object", + "required": [ + "publicJwk", + "validFrom", + "validUntil" + ], + "properties": { + "comment": { + "type": "string", + "description": "Optional comment or description.", + "maxGraphemes": 512 + }, + "publicJwk": { + "type": "string", + "description": "JWK public key as a JSON string (RFC 7517 format)", + "maxLength": 512 + }, + "validFrom": { + "type": "string", + "description": "Datetime from which this key is valid (ISO 8601).", + "format": "datetime" + }, + "validUntil": { + "type": "string", + "description": "Datetime until which this key is valid (ISO 8601).", + "format": "datetime" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_signature.json b/crates/jacquard-api/lexicons/dev_keytrace_signature.json new file mode 100644 index 000000000..e676ed0d6 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_signature.json @@ -0,0 +1,54 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.signature", + "defs": { + "main": { + "type": "object", + "description": "A cryptographic signature attesting to a claim", + "required": [ + "kid", + "src", + "signedAt", + "attestation", + "signedFields" + ], + "properties": { + "attestation": { + "type": "string", + "description": "The cryptographic signature (base64-encoded)." + }, + "comment": { + "type": "string", + "description": "Optional comment or description.", + "maxGraphemes": 512 + }, + "kid": { + "type": "string", + "description": "Key identifier (e.g., date in YYYY-MM-DD format)." + }, + "retractedAt": { + "type": "string", + "description": "Datetime when this signature was retracted. Present only if the signature has been retracted (ISO 8601).", + "format": "datetime" + }, + "signedAt": { + "type": "string", + "description": "Datetime when the signature was created (ISO 8601).", + "format": "datetime" + }, + "signedFields": { + "type": "array", + "description": "Ordered list of field names included in the signed payload (e.g., ['did', 'subject', 'type', 'verifiedAt'])", + "items": { + "type": "string" + } + }, + "src": { + "type": "string", + "description": "AT URI reference to the signing key record published by the verification service (e.g., at://did:plc:serviceaccount/dev.keytrace.serverPublicKey/2024-01-15).", + "format": "at-uri" + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_statement.json b/crates/jacquard-api/lexicons/dev_keytrace_statement.json new file mode 100644 index 000000000..d67156072 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_statement.json @@ -0,0 +1,52 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.statement", + "defs": { + "main": { + "type": "record", + "description": "A public statement signed by one of the user's own published public keys (dev.keytrace.userPublicKey).", + "key": "tid", + "record": { + "type": "object", + "required": [ + "content", + "keyRef", + "sig", + "createdAt" + ], + "properties": { + "content": { + "type": "string", + "description": "The statement text that was signed.", + "maxLength": 10000, + "maxGraphemes": 10000 + }, + "createdAt": { + "type": "string", + "description": "Datetime when this statement was created (ISO 8601).", + "format": "datetime" + }, + "keyRef": { + "type": "string", + "description": "AT URI of the dev.keytrace.userPublicKey record whose private key produced this signature (e.g., at://did:plc:xxx/dev.keytrace.userPublicKey/3k4...)", + "format": "at-uri" + }, + "retractedAt": { + "type": "string", + "description": "Datetime when this statement was retracted. Present only if the statement has been retracted (ISO 8601).", + "format": "datetime" + }, + "sig": { + "type": "string", + "description": "Cryptographic signature of the content field, produced by the key referenced in keyRef (PGP cleartext or detached, base64-encoded binary signature)." + }, + "subject": { + "type": "string", + "description": "Optional short subject or title for the statement.", + "maxGraphemes": 256 + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/dev_keytrace_userPublicKey.json b/crates/jacquard-api/lexicons/dev_keytrace_userPublicKey.json new file mode 100644 index 000000000..c4e40ad06 --- /dev/null +++ b/crates/jacquard-api/lexicons/dev_keytrace_userPublicKey.json @@ -0,0 +1,66 @@ +{ + "lexicon": 1, + "id": "dev.keytrace.userPublicKey", + "defs": { + "main": { + "type": "record", + "description": "A user-published public key.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "keyType", + "publicKeyArmored", + "createdAt" + ], + "properties": { + "comment": { + "type": "string", + "description": "Optional comment or description.", + "maxGraphemes": 512 + }, + "createdAt": { + "type": "string", + "description": "Datetime when this key was created (ISO 8601).", + "format": "datetime" + }, + "expiresAt": { + "type": "string", + "description": "Datetime when this key expires (ISO 8601).", + "format": "datetime" + }, + "fingerprint": { + "type": "string", + "description": "Key fingerprint.", + "maxGraphemes": 256 + }, + "keyType": { + "type": "string", + "description": "Format of the public key.", + "knownValues": [ + "pgp", + "ssh-ed25519", + "ssh-ecdsa" + ] + }, + "label": { + "type": "string", + "description": "Human-readable label for this key (e.g., 'work laptop', 'signing key').", + "maxGraphemes": 128 + }, + "publicKeyArmored": { + "type": "string", + "description": "Full public key in standard text armored format.", + "maxLength": 16384, + "maxGraphemes": 16384 + }, + "retractedAt": { + "type": "string", + "description": "Datetime when this key was retracted. Present only if the key has been retracted (ISO 8601).", + "format": "datetime" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/sh_tangled_knot_subscribeRepos.json b/crates/jacquard-api/lexicons/sh_tangled_knot_subscribeRepos.json new file mode 100644 index 000000000..314520814 --- /dev/null +++ b/crates/jacquard-api/lexicons/sh_tangled_knot_subscribeRepos.json @@ -0,0 +1,96 @@ +{ + "lexicon": 1, + "id": "sh.tangled.knot.subscribeRepos", + "defs": { + "gitSync1": { + "type": "object", + "required": [ + "seq", + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "Repository DID identifier", + "format": "did" + }, + "seq": { + "type": "integer", + "description": "The stream sequence number of this message." + } + } + }, + "gitSync2": { + "type": "object", + "required": [ + "seq", + "repo" + ], + "properties": { + "did": { + "type": "string", + "description": "Repository AT-URI identifier", + "format": "at-uri" + }, + "seq": { + "type": "integer", + "description": "The stream sequence number of this message." + } + } + }, + "identity": { + "type": "object", + "required": [ + "seq", + "did", + "time" + ], + "properties": { + "did": { + "type": "string", + "description": "Repository DID identifier", + "format": "did" + }, + "seq": { + "type": "integer", + "description": "The stream sequence number of this message." + }, + "time": { + "type": "string", + "format": "datetime" + } + } + }, + "main": { + "type": "subscription", + "description": "Repository event stream, aka Firehose endpoint. Outputs repo commits with diff data, and identity update events, for all repositories on the current server. See the atproto specifications for details around stream sequencing, repo versioning, CAR diff format, and more. Public and does not require auth; implemented by PDS and Relay.", + "parameters": { + "type": "params", + "properties": { + "cursor": { + "type": "integer", + "description": "The last known event seq number to backfill from." + } + } + }, + "message": { + "schema": { + "type": "union", + "refs": [ + "#identity", + "gitRefUpdate" + ] + } + }, + "errors": [ + { + "name": "FutureCursor" + }, + { + "description": "If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection.", + "name": "ConsumerTooSlow" + } + ] + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/sh_tangled_sync_requestCrawl.json b/crates/jacquard-api/lexicons/sh_tangled_sync_requestCrawl.json new file mode 100644 index 000000000..286b35b42 --- /dev/null +++ b/crates/jacquard-api/lexicons/sh_tangled_sync_requestCrawl.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "sh.tangled.sync.requestCrawl", + "defs": { + "main": { + "type": "procedure", + "description": "Request a service to persistently crawl hosted repos. Does not require auth.", + "input": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "hostname" + ], + "properties": { + "ensureRepo": { + "type": "string", + "description": "specific repository to ensure crawling", + "format": "at-uri" + }, + "hostname": { + "type": "string", + "description": "Hostname of the current service (eg, Knot) that is requesting to be crawled." + } + } + } + }, + "errors": [ + { + "name": "HostBanned" + } + ] + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/to_atpr_link.json b/crates/jacquard-api/lexicons/to_atpr_link.json new file mode 100644 index 000000000..84aaedb2c --- /dev/null +++ b/crates/jacquard-api/lexicons/to_atpr_link.json @@ -0,0 +1,29 @@ +{ + "lexicon": 1, + "id": "to.atpr.link", + "defs": { + "main": { + "type": "record", + "description": "A shortened URL mapping", + "key": "any", + "record": { + "type": "object", + "required": [ + "url", + "updatedAt" + ], + "properties": { + "updatedAt": { + "type": "string", + "format": "datetime" + }, + "url": { + "type": "string", + "format": "uri", + "maxLength": 2048 + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_action.json b/crates/jacquard-api/lexicons/world_ptah_temp_action.json new file mode 100644 index 000000000..ab3d561c7 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_action.json @@ -0,0 +1,85 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.action", + "description": "An action record in The Ptah Protocol. The heartbeat of the protocol — every time someone acts inside a world, they create one of these. It is what makes the world alive rather than static.", + "defs": { + "main": { + "type": "record", + "description": "An entry in a ship's log. Something happened. Someone did it. The Opening of the Mouth ceremony — Ptah opens the mouth and the statue breathes, speaks, acts. The action record is the breath.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "actorDID", + "worldReference", + "createdAt" + ], + "properties": { + "actionType": { + "type": "string", + "description": "What kind of action. Open-ended.", + "maxLength": 640, + "maxGraphemes": 64, + "knownValues": [ + "movement", + "speech", + "conflict", + "creation", + "witness" + ] + }, + "actorDID": { + "type": "string", + "description": "Who performed the action — the person behind the character.", + "format": "did" + }, + "characterReference": { + "type": "string", + "description": "The AT URI of the character performing the action. Not the person — the character.", + "format": "at-uri" + }, + "content": { + "type": "string", + "description": "What actually happened. The text of the action.", + "maxLength": 30720, + "maxGraphemes": 3000 + }, + "createdAt": { + "type": "string", + "description": "Timestamp of the action.", + "format": "datetime" + }, + "locationReference": { + "type": "string", + "description": "The AT URI of the location record where this action took place.", + "format": "at-uri" + }, + "narrativeWeight": { + "type": "integer", + "description": "Optional importance scoring hook. Null by default. Populated by the AppView or by originator designation when needed. Does not change v1 behavior — all actions are structurally flat by default.", + "minimum": 0 + }, + "targetReference": { + "type": "string", + "description": "If this action was directed at another character or object, the AT URI of the target.", + "format": "at-uri" + }, + "visibility": { + "type": "string", + "description": "The narrative visibility tier of this action.", + "knownValues": [ + "canon", + "community", + "experimental" + ] + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world this action happened in.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_character.json b/crates/jacquard-api/lexicons/world_ptah_temp_character.json new file mode 100644 index 000000000..758774959 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_character.json @@ -0,0 +1,131 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.character", + "description": "A character record in The Ptah Protocol. A person, creature, or entity that exists inside a specific world. The character is not the user — the character is the world's inhabitant.", + "defs": { + "characterProperties": { + "type": "object", + "description": "Flexible key-value properties for any kind of world. All fields optional — worlds define what matters.", + "properties": { + "abilities": { + "type": "string", + "description": "Notable abilities or powers.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "affiliation": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "age": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + }, + "role": { + "type": "string", + "description": "Narrative or social role within the world.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "species": { + "type": "string", + "maxLength": 640, + "maxGraphemes": 64 + } + } + }, + "main": { + "type": "record", + "description": "A birth certificate crossed with a passport. Ptah speaks the name and the thing exists — the character exists because it was named and the naming is permanent.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "creatorDID", + "worldReference", + "createdAt" + ], + "properties": { + "authorshipRecord": { + "type": "string", + "description": "Permanent, immutable link back to the creator. This never changes even if the character gets contributed to, built on, or rendered a thousand different ways.", + "format": "did" + }, + "canonicalStatus": { + "type": "string", + "description": "The canonical standing of this character within its world.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "controlType": { + "type": "string", + "description": "How control of this character is governed. Solves the Ghost Character problem in public domain worlds.", + "knownValues": [ + "exclusive", + "open", + "delegated" + ] + }, + "createdAt": { + "type": "string", + "description": "Timestamp of character creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "Who created this character. This never changes — it is the provenance that travels.", + "format": "did" + }, + "description": { + "type": "string", + "description": "Who this character is, in plain language.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "name": { + "type": "string", + "description": "What the character is called.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "originType": { + "type": "string", + "description": "The intellectual property origin of this character.", + "knownValues": [ + "world.ptah.temp.defs#sourceTypeOriginalIP", + "world.ptah.temp.defs#sourceTypePublicDomain", + "contributed" + ] + }, + "properties": { + "type": "ref", + "description": "Flexible fields — species, age, role, affiliation, abilities. Open-ended so any kind of world can use the same record type.", + "ref": "#characterProperties" + }, + "roleReference": { + "type": "string", + "description": "The AT URI of the Role record this character is an instance of. If present, this character is a specific performance of a shared role rather than a wholly original character.", + "format": "at-uri" + }, + "sourceReference": { + "type": "string", + "description": "If originType is publicDomain, the specific source.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world record this character belongs to.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_contribution.json b/crates/jacquard-api/lexicons/world_ptah_temp_contribution.json new file mode 100644 index 000000000..ce571e356 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_contribution.json @@ -0,0 +1,86 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.contribution", + "description": "A contribution record in The Ptah Protocol. The permission and attribution layer — governs how someone who did not create a world adds something to it, and ensures that addition is attributed, traceable, and governed by whatever rules the world originator set.", + "defs": { + "main": { + "type": "record", + "description": "A deed of addition. Imhotep — the most famous architect in history, deified as the Son of Ptah. Every contributor to a world is an Imhotep. They build within the tradition of the master. Their work is attributed. The lineage is unbroken.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "contributorDID", + "worldReference", + "createdAt" + ], + "properties": { + "attributionChain": { + "type": "array", + "description": "An array tracing every hand this contribution passed through. AT URIs of prior contribution records or DIDs. This is the Carryforward logic expressed at the protocol layer.", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "canonicalStatus": { + "type": "string", + "description": "The canonical standing of this contribution within the world.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "contributionType": { + "type": "string", + "description": "What kind of contribution and which record type it links to.", + "maxLength": 640, + "maxGraphemes": 64, + "knownValues": [ + "character", + "role", + "action", + "event", + "lore", + "location" + ] + }, + "contributorDID": { + "type": "string", + "description": "Who is making the contribution.", + "format": "did" + }, + "createdAt": { + "type": "string", + "description": "Timestamp of the contribution.", + "format": "datetime" + }, + "originatorApproval": { + "type": "string", + "description": "The approval status of this contribution.", + "knownValues": [ + "approved", + "preApproved", + "communityCanon" + ] + }, + "publicDomainCompliance": { + "type": "boolean", + "description": "Whether this contribution complies with public domain sourcing requirements. Relevant for catalog worlds." + }, + "recordReference": { + "type": "string", + "description": "The AT URI of the primary record being contributed. The Contribution record is the anchor of attribution — not the exhaustive list of every record the contributor touched. The full scope is discoverable via DID query across record types.", + "format": "at-uri" + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world being contributed to.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_declaration.json b/crates/jacquard-api/lexicons/world_ptah_temp_declaration.json new file mode 100644 index 000000000..40f3e6469 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_declaration.json @@ -0,0 +1,37 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.declaration", + "description": "A signaling record indicating that an account is participating in The Ptah Protocol. One per account, fixed record key. The AppView uses this record to discover and enumerate participating accounts across the network.", + "defs": { + "main": { + "type": "record", + "description": "Declaration of participation in The Ptah Protocol. Create this record to signal that your account is active in the Ptah ecosystem. Delete it to deactivate.", + "key": "literal:self", + "record": { + "type": "object", + "required": [ + "createdAt" + ], + "properties": { + "createdAt": { + "type": "string", + "description": "Timestamp of when this account first declared participation.", + "format": "datetime" + }, + "description": { + "type": "string", + "description": "Short description of the participant's role or interests in the Ptah ecosystem.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "displayName": { + "type": "string", + "description": "Human-readable name for this participant. Not a character name — the person behind the characters.", + "maxLength": 640, + "maxGraphemes": 64 + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_defs.json b/crates/jacquard-api/lexicons/world_ptah_temp_defs.json new file mode 100644 index 000000000..64432aa60 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_defs.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.defs", + "description": "Shared definitions for The Ptah Protocol — reusable types referenced across record schemas.", + "defs": { + "canonicalStatusApocryphal": { + "type": "token", + "description": "Record exists but is not recognized as part of any canonical timeline." + }, + "canonicalStatusCommunity": { + "type": "token", + "description": "Record is community-contributed canon — valid but not originator-designated." + }, + "canonicalStatusOfficial": { + "type": "token", + "description": "Record is recognized as official canon within its world." + }, + "sourceType": { + "type": "token", + "description": "Content originates as original intellectual property." + }, + "sourceTypeCollaborativeCommons": { + "type": "token", + "description": "Content is created under a collaborative commons framework." + }, + "sourceTypeOriginalIP": { + "type": "token", + "description": "Content originates as original intellectual property." + }, + "sourceTypePublicDomain": { + "type": "token", + "description": "Content is derived from public domain source material." + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_event.json b/crates/jacquard-api/lexicons/world_ptah_temp_event.json new file mode 100644 index 000000000..280f817bf --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_event.json @@ -0,0 +1,125 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.event", + "description": "An event record in The Ptah Protocol. Where competition becomes history. A tournament, battle, gathering, or any occasion where people compete or convene inside a world.", + "defs": { + "main": { + "type": "record", + "description": "A boxing match program combined with a history book entry. Before the fight it is a schedule. After the fight it is a permanent record. Ptah-Seker-Osiris — creation, shadow, rebirth. The event holds all three phases simultaneously.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "creatorDID", + "worldReference", + "createdAt" + ], + "properties": { + "completedAt": { + "type": "string", + "description": "Timestamp of when the event concluded.", + "format": "datetime" + }, + "createdAt": { + "type": "string", + "description": "Timestamp of event creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "Who organized this event.", + "format": "did" + }, + "eventType": { + "type": "string", + "description": "What kind of event. Open-ended.", + "maxLength": 640, + "maxGraphemes": 64, + "knownValues": [ + "tournament", + "battle", + "gathering", + "contest", + "ritual" + ] + }, + "format": { + "type": "string", + "description": "The competitive or structural format of the event.", + "maxLength": 640, + "maxGraphemes": 64, + "knownValues": [ + "bracket", + "roundRobin", + "openChallenge", + "singleElimination" + ] + }, + "locationReference": { + "type": "string", + "description": "The AT URI of the location where this event happened.", + "format": "at-uri" + }, + "loreStatus": { + "type": "string", + "description": "The narrative standing of this event in the world's timeline.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "pending" + ] + }, + "name": { + "type": "string", + "description": "What this event is called.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "participants": { + "type": "array", + "description": "AT URIs of the character records participating. Not people — characters.", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "result": { + "type": "string", + "description": "The outcome. Populated when status moves to completed.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "stakes": { + "type": "string", + "description": "What is at risk or being contested.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "status": { + "type": "string", + "description": "The current phase of the event.", + "knownValues": [ + "upcoming", + "active", + "completed" + ] + }, + "witnesses": { + "type": "array", + "description": "AT URIs of individual witness action records. Each witness action is a real record created by a real DID at a real timestamp. Witnessing is a verifiable technical contribution, not just a tally.", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world this event occurred in.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_location.json b/crates/jacquard-api/lexicons/world_ptah_temp_location.json new file mode 100644 index 000000000..08b492bdb --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_location.json @@ -0,0 +1,120 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.location", + "description": "A location record in The Ptah Protocol. A place inside a world — what gives events and actions an address. Without it, things happen in the world but they happen nowhere specific. With it, history accumulates in places and places develop gravity over time.", + "defs": { + "locationProperties": { + "type": "object", + "description": "Flexible properties for any kind of world geography. All fields optional — worlds define what matters.", + "properties": { + "climate": { + "type": "string", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "controllingFaction": { + "type": "string", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "notableHistory": { + "type": "string", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "population": { + "type": "string", + "maxLength": 2560, + "maxGraphemes": 256 + } + } + }, + "main": { + "type": "record", + "description": "A pin dropped on a map that does not exist yet. The pin creates the place. Hwt-ka-Ptah — the House of the Ka of Ptah — gave Egypt its name. A place becomes so significant that it names everything around it.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "creatorDID", + "worldReference", + "createdAt" + ], + "properties": { + "authorshipRecord": { + "type": "string", + "description": "Permanent link to the creator. Provenance travels.", + "format": "did" + }, + "canonicalStatus": { + "type": "string", + "description": "The canonical standing of this location within its world.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "createdAt": { + "type": "string", + "description": "Timestamp of location creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "Who named and defined this place.", + "format": "did" + }, + "depthIndex": { + "type": "integer", + "description": "How deep in the geographic hierarchy this location sits. World-level is 0, continent is 1, country is 2, city is 3, and so on. Any rendering layer can read this single number and decide how much geographic context it needs without traversing the full parent chain.", + "minimum": 0 + }, + "description": { + "type": "string", + "description": "What kind of place this is, in plain language.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "locationType": { + "type": "string", + "description": "The geographic or spatial classification. Open-ended so any kind of world geography works.", + "maxLength": 640, + "maxGraphemes": 64, + "knownValues": [ + "city", + "region", + "building", + "territory", + "landmark", + "vessel", + "abstractSpace" + ] + }, + "name": { + "type": "string", + "description": "What this place is called.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "parentLocation": { + "type": "string", + "description": "If this location exists inside a larger location — a tavern inside a city, a room inside a building. Lets geography nest infinitely. Places come into existence as people need them.", + "format": "at-uri" + }, + "properties": { + "type": "ref", + "description": "Flexible fields — climate, population, controlling faction, notable history. Whatever the world requires.", + "ref": "#locationProperties" + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world this location exists in.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_lore.json b/crates/jacquard-api/lexicons/world_ptah_temp_lore.json new file mode 100644 index 000000000..8d06c2263 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_lore.json @@ -0,0 +1,94 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.lore", + "description": "A lore record in The Ptah Protocol. The world's history book — the accumulated narrative of what has happened. This is what separates the protocol from a game or a social feed. Games have scores. Social feeds have posts. A world has history.", + "defs": { + "main": { + "type": "record", + "description": "The Shabaka Stone of the world. It preserves what happened. It cannot be erased. It names who made it. It is the theological text of a world that anyone can read and nobody can alter.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "title", + "creatorDID", + "worldReference", + "createdAt" + ], + "properties": { + "authorshipRecord": { + "type": "string", + "description": "Permanent link to the creator. Provenance travels with every piece of history.", + "format": "did" + }, + "canonicalStatus": { + "type": "string", + "description": "The canonical standing of this lore within its world.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "characters": { + "type": "array", + "description": "AT URIs of the character records involved in this lore.", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "content": { + "type": "string", + "description": "The actual narrative. The history.", + "maxLength": 102400, + "maxGraphemes": 10000 + }, + "contributionType": { + "type": "string", + "description": "Whether this lore was written by the world originator or a community contributor.", + "knownValues": [ + "originator", + "community" + ] + }, + "createdAt": { + "type": "string", + "description": "Real-world timestamp of creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "Who authored this lore entry.", + "format": "did" + }, + "sourceReferences": { + "type": "array", + "description": "AT URIs of the action and event records this lore was generated from. Lore does not appear from nowhere — it traces back to things that actually happened. This is the most important field in this record.", + "items": { + "type": "string", + "format": "at-uri" + } + }, + "timelinePosition": { + "type": "string", + "description": "Where this sits in the world's chronology. In-world time, era, epoch, cycle — whatever the world uses.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "title": { + "type": "string", + "description": "The name of this piece of lore.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world this lore belongs to.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_role.json b/crates/jacquard-api/lexicons/world_ptah_temp_role.json new file mode 100644 index 000000000..287c85136 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_role.json @@ -0,0 +1,101 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.role", + "description": "A role record in The Ptah Protocol. The template that sits between the World and the Character. A shared identity that multiple Character instances can embody. Hamlet is a Role — each performance of Hamlet is a Character instance.", + "defs": { + "main": { + "type": "record", + "description": "A stage role vs a performance of that role. The Opening of the Mouth was performed on a type of figure — the Role is the type. The Character instance is the specific statue that gets its mouth opened.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "creatorDID", + "worldReference", + "createdAt" + ], + "properties": { + "authorshipRecord": { + "type": "string", + "description": "Permanent link to the role's creator. Provenance travels.", + "format": "did" + }, + "canonicalCharacterReference": { + "type": "string", + "description": "The AT URI of the single Character record designated as the authoritative expression of this role. When present, this is the canonical instance.", + "format": "at-uri" + }, + "canonicalReferencePolicy": { + "type": "string", + "description": "Governs how the canonicalCharacterReference behaves over time.", + "knownValues": [ + "fixed", + "updatable", + "community" + ] + }, + "canonicalStatus": { + "type": "string", + "description": "The canonical standing of this role within its world.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "createdAt": { + "type": "string", + "description": "Timestamp of role creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "Who defined this role in the protocol.", + "format": "did" + }, + "description": { + "type": "string", + "description": "What this role is in the world's context — its narrative function, its archetypal weight.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "instancePolicy": { + "type": "string", + "description": "How instances of this role are governed.", + "knownValues": [ + "openInstance", + "approvedInstance", + "singleInstance" + ] + }, + "name": { + "type": "string", + "description": "What this role is called.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "sourceReference": { + "type": "string", + "description": "If sourceType is publicDomain, the specific source material.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "sourceType": { + "type": "string", + "description": "The intellectual property origin of this role.", + "knownValues": [ + "world.ptah.temp.defs#sourceTypeOriginalIP", + "world.ptah.temp.defs#sourceTypePublicDomain" + ] + }, + "worldReference": { + "type": "string", + "description": "The AT URI of the world record this role exists in.", + "format": "at-uri" + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/world_ptah_temp_world.json b/crates/jacquard-api/lexicons/world_ptah_temp_world.json new file mode 100644 index 000000000..bb980e867 --- /dev/null +++ b/crates/jacquard-api/lexicons/world_ptah_temp_world.json @@ -0,0 +1,112 @@ +{ + "lexicon": 1, + "id": "world.ptah.temp.world", + "description": "A world record in The Ptah Protocol. The foundational record — everything else references it. A world must exist before characters, events, or lore can exist inside it.", + "defs": { + "main": { + "type": "record", + "description": "The deed. Establishes that a world exists, who created it, and what its basic properties are. Ptah conceives the world in his heart — this record is that conception made permanent.", + "key": "tid", + "record": { + "type": "object", + "required": [ + "name", + "creatorDID", + "createdAt" + ], + "properties": { + "canonicalStatus": { + "type": "string", + "description": "Whether this world is open for contribution, controlled by the originator, or governed by community consensus.", + "knownValues": [ + "world.ptah.temp.defs#canonicalStatusOfficial", + "world.ptah.temp.defs#canonicalStatusCommunity", + "world.ptah.temp.defs#canonicalStatusApocryphal" + ] + }, + "createdAt": { + "type": "string", + "description": "Timestamp of world creation.", + "format": "datetime" + }, + "creatorDID": { + "type": "string", + "description": "The permanent identity of whoever seeded this world. This never changes.", + "format": "did" + }, + "description": { + "type": "string", + "description": "What kind of world this is, in plain language.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "governanceMode": { + "type": "string", + "description": "The constitutional posture of the world. Signals how contributions and canon are governed before anyone contributes.", + "knownValues": [ + "sandbox", + "governed", + "constitutional" + ] + }, + "name": { + "type": "string", + "description": "What the world is called.", + "maxLength": 640, + "maxGraphemes": 64 + }, + "renderingHints": { + "type": "ref", + "description": "Loose metadata telling visual rendering layers what kind of world this is — tone, era, genre, aesthetic.", + "ref": "#renderingHints" + }, + "sourceReference": { + "type": "string", + "description": "If sourceType is publicDomain, the specific source material this world is derived from.", + "maxLength": 10240, + "maxGraphemes": 1024 + }, + "sourceType": { + "type": "string", + "description": "The intellectual property origin of this world.", + "knownValues": [ + "world.ptah.temp.defs#sourceTypeOriginalIP", + "world.ptah.temp.defs#sourceTypePublicDomain", + "world.ptah.temp.defs#sourceTypeCollaborativeCommons" + ] + } + } + } + }, + "renderingHints": { + "type": "object", + "description": "Visual and tonal metadata for rendering layers. The world has to feel like something before anything has happened in it yet.", + "properties": { + "aesthetic": { + "type": "string", + "description": "Visual texture, materials, atmosphere.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "era": { + "type": "string", + "description": "The temporal setting or period.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "genre": { + "type": "string", + "description": "The narrative genre.", + "maxLength": 2560, + "maxGraphemes": 256 + }, + "tone": { + "type": "string", + "description": "The emotional register of the world.", + "maxLength": 2560, + "maxGraphemes": 256 + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/lexicons/zone_stratos_identity_resolveEnrollments.json b/crates/jacquard-api/lexicons/zone_stratos_identity_resolveEnrollments.json new file mode 100644 index 000000000..cd33e6e40 --- /dev/null +++ b/crates/jacquard-api/lexicons/zone_stratos_identity_resolveEnrollments.json @@ -0,0 +1,51 @@ +{ + "lexicon": 1, + "id": "zone.stratos.identity.resolveEnrollments", + "defs": { + "main": { + "type": "query", + "description": "Resolve enrollment boundaries for a DID. Returns the boundary domains the user is enrolled in.", + "parameters": { + "type": "params", + "required": [ + "did" + ], + "properties": { + "did": { + "type": "string", + "description": "The DID to resolve enrollment boundaries for.", + "format": "did" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "object", + "required": [ + "did", + "enrolled", + "boundaries" + ], + "properties": { + "boundaries": { + "type": "array", + "description": "Boundary domains the user is enrolled in. Empty if not enrolled.", + "items": { + "type": "string" + } + }, + "did": { + "type": "string", + "format": "did" + }, + "enrolled": { + "type": "boolean", + "description": "Whether the DID is enrolled in this Stratos service." + } + } + } + } + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/actor_rpg/master.rs b/crates/jacquard-api/src/actor_rpg/master.rs index ddf06e4fd..5d6a7ca5b 100644 --- a/crates/jacquard-api/src/actor_rpg/master.rs +++ b/crates/jacquard-api/src/actor_rpg/master.rs @@ -233,51 +233,51 @@ pub mod master_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Player; - type System; type CreatedAt; + type System; + type Player; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Player = Unset; - type System = Unset; type CreatedAt = Unset; + type System = Unset; + type Player = Unset; } - ///State transition - sets the `player` field to Set - pub struct SetPlayer(PhantomData St>); - impl sealed::Sealed for SetPlayer {} - impl State for SetPlayer { - type Player = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type System = St::System; - type CreatedAt = St::CreatedAt; + type Player = St::Player; } ///State transition - sets the `system` field to Set pub struct SetSystem(PhantomData St>); impl sealed::Sealed for SetSystem {} impl State for SetSystem { - type Player = St::Player; - type System = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type System = Set; type Player = St::Player; + } + ///State transition - sets the `player` field to Set + pub struct SetPlayer(PhantomData St>); + impl sealed::Sealed for SetPlayer {} + impl State for SetPlayer { + type CreatedAt = St::CreatedAt; type System = St::System; - type CreatedAt = Set; + type Player = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `player` field - pub struct player(()); - ///Marker type for the `system` field - pub struct system(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `system` field + pub struct system(()); + ///Marker type for the `player` field + pub struct player(()); } } @@ -446,9 +446,9 @@ impl MasterBuilder { impl MasterBuilder where St: master_state::State, - St::Player: master_state::IsSet, - St::System: master_state::IsSet, St::CreatedAt: master_state::IsSet, + St::System: master_state::IsSet, + St::Player: master_state::IsSet, { /// Build the final struct. pub fn build(self) -> Master { diff --git a/crates/jacquard-api/src/actor_rpg/stats.rs b/crates/jacquard-api/src/actor_rpg/stats.rs index 72a6fcb7a..ecf01c8ad 100644 --- a/crates/jacquard-api/src/actor_rpg/stats.rs +++ b/crates/jacquard-api/src/actor_rpg/stats.rs @@ -6926,37 +6926,37 @@ pub mod custom_stat_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Name; + 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 Name = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Name = St::Name; + type Value = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Value = St::Value; type Name = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Name = St::Name; + 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 `name` field pub struct name(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -7065,8 +7065,8 @@ where impl CustomStatBuilder where St: custom_stat_state::State, - St::Value: custom_stat_state::IsSet, St::Name: custom_stat_state::IsSet, + St::Value: custom_stat_state::IsSet, { /// Build the final struct. pub fn build(self) -> CustomStat { @@ -7105,37 +7105,37 @@ pub mod dcc_cleric_spell_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Level; type Name; + type Level; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Level = Unset; type Name = Unset; - } - ///State transition - sets the `level` field to Set - pub struct SetLevel(PhantomData St>); - impl sealed::Sealed for SetLevel {} - impl State for SetLevel { - type Level = Set; - type Name = St::Name; + type Level = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Level = St::Level; type Name = Set; + type Level = St::Level; + } + ///State transition - sets the `level` field to Set + pub struct SetLevel(PhantomData St>); + impl sealed::Sealed for SetLevel {} + impl State for SetLevel { + type Name = St::Name; + type Level = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `level` field - pub struct level(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `level` field + pub struct level(()); } } @@ -7231,8 +7231,8 @@ impl DccClericSpellBuilder impl DccClericSpellBuilder where St: dcc_cleric_spell_state::State, - St::Level: dcc_cleric_spell_state::IsSet, St::Name: dcc_cleric_spell_state::IsSet, + St::Level: dcc_cleric_spell_state::IsSet, { /// Build the final struct. pub fn build(self) -> DccClericSpell { @@ -7658,37 +7658,37 @@ pub mod spellslot_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Total; type Level; + type Total; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Total = Unset; type Level = Unset; - } - ///State transition - sets the `total` field to Set - pub struct SetTotal(PhantomData St>); - impl sealed::Sealed for SetTotal {} - impl State for SetTotal { - type Total = Set; - type Level = St::Level; + type Total = Unset; } ///State transition - sets the `level` field to Set pub struct SetLevel(PhantomData St>); impl sealed::Sealed for SetLevel {} impl State for SetLevel { - type Total = St::Total; type Level = Set; + type Total = St::Total; + } + ///State transition - sets the `total` field to Set + pub struct SetTotal(PhantomData St>); + impl sealed::Sealed for SetTotal {} + impl State for SetTotal { + type Level = St::Level; + type Total = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `total` field - pub struct total(()); ///Marker type for the `level` field pub struct level(()); + ///Marker type for the `total` field + pub struct total(()); } } @@ -7771,8 +7771,8 @@ impl SpellslotBuilder { impl SpellslotBuilder where St: spellslot_state::State, - St::Total: spellslot_state::IsSet, St::Level: spellslot_state::IsSet, + St::Total: spellslot_state::IsSet, { /// Build the final struct. pub fn build(self) -> Spellslot { diff --git a/crates/jacquard-api/src/ai_syui/at/link.rs b/crates/jacquard-api/src/ai_syui/at/link.rs index 423cd2af0..6e1a2b93f 100644 --- a/crates/jacquard-api/src/ai_syui/at/link.rs +++ b/crates/jacquard-api/src/ai_syui/at/link.rs @@ -354,37 +354,37 @@ pub mod link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Links; type CreatedAt; + type Links; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Links = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `links` field to Set - pub struct SetLinks(PhantomData St>); - impl sealed::Sealed for SetLinks {} - impl State for SetLinks { - type Links = Set; - type CreatedAt = St::CreatedAt; + type Links = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Links = St::Links; type CreatedAt = Set; + type Links = St::Links; + } + ///State transition - sets the `links` field to Set + pub struct SetLinks(PhantomData St>); + impl sealed::Sealed for SetLinks {} + impl State for SetLinks { + type CreatedAt = St::CreatedAt; + type Links = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `links` field - pub struct links(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `links` field + pub struct links(()); } } @@ -467,8 +467,8 @@ impl LinkBuilder { impl LinkBuilder where St: link_state::State, - St::Links: link_state::IsSet, St::CreatedAt: link_state::IsSet, + St::Links: link_state::IsSet, { /// Build the final struct. pub fn build(self) -> Link { diff --git a/crates/jacquard-api/src/ai_syui/log/chat.rs b/crates/jacquard-api/src/ai_syui/log/chat.rs index 35fcd7055..14410a802 100644 --- a/crates/jacquard-api/src/ai_syui/log/chat.rs +++ b/crates/jacquard-api/src/ai_syui/log/chat.rs @@ -399,51 +399,51 @@ pub mod chat_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Site; type Title; type PublishedAt; - type Site; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Site = Unset; type Title = Unset; type PublishedAt = Unset; - type Site = Unset; + } + ///State transition - sets the `site` field to Set + pub struct SetSite(PhantomData St>); + impl sealed::Sealed for SetSite {} + impl State for SetSite { + type Site = Set; + type Title = St::Title; + type PublishedAt = St::PublishedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type Site = St::Site; type Title = Set; type PublishedAt = St::PublishedAt; - type Site = St::Site; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData St>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Title = St::Title; - type PublishedAt = Set; type Site = St::Site; - } - ///State transition - sets the `site` field to Set - pub struct SetSite(PhantomData St>); - impl sealed::Sealed for SetSite {} - impl State for SetSite { type Title = St::Title; - type PublishedAt = St::PublishedAt; - type Site = Set; + type PublishedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `site` field + pub struct site(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `published_at` field pub struct published_at(()); - ///Marker type for the `site` field - pub struct site(()); } } @@ -723,9 +723,9 @@ impl ChatBuilder { impl ChatBuilder where St: chat_state::State, + St::Site: chat_state::IsSet, St::Title: chat_state::IsSet, St::PublishedAt: chat_state::IsSet, - St::Site: chat_state::IsSet, { /// Build the final struct. pub fn build(self) -> Chat { diff --git a/crates/jacquard-api/src/ai_syui/log/post.rs b/crates/jacquard-api/src/ai_syui/log/post.rs index 4a7466848..2a49bccad 100644 --- a/crates/jacquard-api/src/ai_syui/log/post.rs +++ b/crates/jacquard-api/src/ai_syui/log/post.rs @@ -399,49 +399,49 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Site; type PublishedAt; + type Site; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Site = Unset; type PublishedAt = Unset; + type Site = Unset; type Title = Unset; } - ///State transition - sets the `site` field to Set - pub struct SetSite(PhantomData St>); - impl sealed::Sealed for SetSite {} - impl State for SetSite { - type Site = Set; - type PublishedAt = St::PublishedAt; - type Title = St::Title; - } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData St>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Site = St::Site; type PublishedAt = Set; + type Site = St::Site; + type Title = St::Title; + } + ///State transition - sets the `site` field to Set + pub struct SetSite(PhantomData St>); + impl sealed::Sealed for SetSite {} + impl State for SetSite { + type PublishedAt = St::PublishedAt; + type Site = Set; type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Site = St::Site; type PublishedAt = St::PublishedAt; + type Site = St::Site; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `site` field - pub struct site(()); ///Marker type for the `published_at` field pub struct published_at(()); + ///Marker type for the `site` field + pub struct site(()); ///Marker type for the `title` field pub struct title(()); } @@ -723,8 +723,8 @@ impl PostBuilder { impl PostBuilder where St: post_state::State, - St::Site: post_state::IsSet, St::PublishedAt: post_state::IsSet, + St::Site: post_state::IsSet, St::Title: post_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/app_beaconbits/beacon.rs b/crates/jacquard-api/src/app_beaconbits/beacon.rs index 7ed0f3f8d..14a7648f2 100644 --- a/crates/jacquard-api/src/app_beaconbits/beacon.rs +++ b/crates/jacquard-api/src/app_beaconbits/beacon.rs @@ -367,8 +367,8 @@ pub mod beacon_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type VenueUri; type CreatedAt; + type VenueUri; type Visibility; type VenueName; } @@ -376,26 +376,26 @@ pub mod beacon_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type VenueUri = Unset; type CreatedAt = Unset; + type VenueUri = Unset; type Visibility = Unset; type VenueName = Unset; } - ///State transition - sets the `venue_uri` field to Set - pub struct SetVenueUri(PhantomData St>); - impl sealed::Sealed for SetVenueUri {} - impl State for SetVenueUri { - type VenueUri = Set; - type CreatedAt = St::CreatedAt; - type Visibility = St::Visibility; - type VenueName = St::VenueName; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type VenueUri = St::VenueUri; type CreatedAt = Set; + type VenueUri = St::VenueUri; + type Visibility = St::Visibility; + type VenueName = St::VenueName; + } + ///State transition - sets the `venue_uri` field to Set + pub struct SetVenueUri(PhantomData St>); + impl sealed::Sealed for SetVenueUri {} + impl State for SetVenueUri { + type CreatedAt = St::CreatedAt; + type VenueUri = Set; type Visibility = St::Visibility; type VenueName = St::VenueName; } @@ -403,8 +403,8 @@ pub mod beacon_state { pub struct SetVisibility(PhantomData St>); impl sealed::Sealed for SetVisibility {} impl State for SetVisibility { - type VenueUri = St::VenueUri; type CreatedAt = St::CreatedAt; + type VenueUri = St::VenueUri; type Visibility = Set; type VenueName = St::VenueName; } @@ -412,18 +412,18 @@ pub mod beacon_state { pub struct SetVenueName(PhantomData St>); impl sealed::Sealed for SetVenueName {} impl State for SetVenueName { - type VenueUri = St::VenueUri; type CreatedAt = St::CreatedAt; + type VenueUri = St::VenueUri; type Visibility = St::Visibility; type VenueName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `venue_uri` field - pub struct venue_uri(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `venue_uri` field + pub struct venue_uri(()); ///Marker type for the `visibility` field pub struct visibility(()); ///Marker type for the `venue_name` field @@ -740,8 +740,8 @@ where impl BeaconBuilder where St: beacon_state::State, - St::VenueUri: beacon_state::IsSet, St::CreatedAt: beacon_state::IsSet, + St::VenueUri: beacon_state::IsSet, St::Visibility: beacon_state::IsSet, St::VenueName: beacon_state::IsSet, { diff --git a/crates/jacquard-api/src/app_beaconbits/beacon/like.rs b/crates/jacquard-api/src/app_beaconbits/beacon/like.rs index 0d8ca909e..063f80b3d 100644 --- a/crates/jacquard-api/src/app_beaconbits/beacon/like.rs +++ b/crates/jacquard-api/src/app_beaconbits/beacon/like.rs @@ -117,37 +117,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -230,8 +230,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/app_beaconbits/bookmark/item.rs b/crates/jacquard-api/src/app_beaconbits/bookmark/item.rs index 1c659ad53..80a339ec8 100644 --- a/crates/jacquard-api/src/app_beaconbits/bookmark/item.rs +++ b/crates/jacquard-api/src/app_beaconbits/bookmark/item.rs @@ -198,51 +198,51 @@ pub mod item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type VenueName; - type CreatedAt; type VenueUri; + type CreatedAt; + type VenueName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type VenueName = Unset; - type CreatedAt = Unset; type VenueUri = Unset; + type CreatedAt = Unset; + type VenueName = Unset; } - ///State transition - sets the `venue_name` field to Set - pub struct SetVenueName(PhantomData St>); - impl sealed::Sealed for SetVenueName {} - impl State for SetVenueName { - type VenueName = Set; + ///State transition - sets the `venue_uri` field to Set + pub struct SetVenueUri(PhantomData St>); + impl sealed::Sealed for SetVenueUri {} + impl State for SetVenueUri { + type VenueUri = Set; type CreatedAt = St::CreatedAt; - type VenueUri = St::VenueUri; + type VenueName = St::VenueName; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type VenueName = St::VenueName; - type CreatedAt = Set; type VenueUri = St::VenueUri; - } - ///State transition - sets the `venue_uri` field to Set - pub struct SetVenueUri(PhantomData St>); - impl sealed::Sealed for SetVenueUri {} - impl State for SetVenueUri { + type CreatedAt = Set; type VenueName = St::VenueName; + } + ///State transition - sets the `venue_name` field to Set + pub struct SetVenueName(PhantomData St>); + impl sealed::Sealed for SetVenueName {} + impl State for SetVenueName { + type VenueUri = St::VenueUri; type CreatedAt = St::CreatedAt; - type VenueUri = Set; + type VenueName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `venue_name` field - pub struct venue_name(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `venue_uri` field pub struct venue_uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `venue_name` field + pub struct venue_name(()); } } @@ -419,9 +419,9 @@ where impl ItemBuilder where St: item_state::State, - St::VenueName: item_state::IsSet, - St::CreatedAt: item_state::IsSet, St::VenueUri: item_state::IsSet, + St::CreatedAt: item_state::IsSet, + St::VenueName: item_state::IsSet, { /// Build the final struct. pub fn build(self) -> Item { diff --git a/crates/jacquard-api/src/app_beaconbits/report.rs b/crates/jacquard-api/src/app_beaconbits/report.rs index 0ca49b09a..bdae4998e 100644 --- a/crates/jacquard-api/src/app_beaconbits/report.rs +++ b/crates/jacquard-api/src/app_beaconbits/report.rs @@ -240,50 +240,50 @@ pub mod report_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type BeaconUri; - type Reason; type CreatedAt; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type BeaconUri = Unset; - type Reason = Unset; type CreatedAt = Unset; + type Reason = Unset; } ///State transition - sets the `beacon_uri` field to Set pub struct SetBeaconUri(PhantomData St>); impl sealed::Sealed for SetBeaconUri {} impl State for SetBeaconUri { type BeaconUri = Set; - type Reason = St::Reason; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type BeaconUri = St::BeaconUri; - type Reason = Set; type CreatedAt = St::CreatedAt; + type Reason = St::Reason; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type BeaconUri = St::BeaconUri; - type Reason = St::Reason; type CreatedAt = Set; + type Reason = St::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type BeaconUri = St::BeaconUri; + type CreatedAt = St::CreatedAt; + type Reason = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `beacon_uri` field pub struct beacon_uri(()); - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -386,8 +386,8 @@ impl ReportBuilder where St: report_state::State, St::BeaconUri: report_state::IsSet, - St::Reason: report_state::IsSet, St::CreatedAt: report_state::IsSet, + St::Reason: report_state::IsSet, { /// Build the final struct. pub fn build(self) -> Report { diff --git a/crates/jacquard-api/src/app_bsky/actor.rs b/crates/jacquard-api/src/app_bsky/actor.rs index 814f1f26f..f080f18d9 100644 --- a/crates/jacquard-api/src/app_bsky/actor.rs +++ b/crates/jacquard-api/src/app_bsky/actor.rs @@ -5212,37 +5212,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 St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = St::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = St::Handle; type Did = Set; + type Handle = St::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = St::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(()); } } @@ -5510,8 +5510,8 @@ impl ProfileViewBuilder { impl ProfileViewBuilder where St: profile_view_state::State, - St::Handle: profile_view_state::IsSet, St::Did: profile_view_state::IsSet, + St::Handle: profile_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileView { @@ -6431,67 +6431,67 @@ pub mod saved_feed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Type; type Value; type Id; type Pinned; - type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Type = Unset; type Value = Unset; type Id = Unset; type Pinned = Unset; - type Type = Unset; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Type = Set; + type Value = St::Value; + type Id = St::Id; + type Pinned = St::Pinned; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { + type Type = St::Type; type Value = Set; type Id = St::Id; type Pinned = St::Pinned; - type Type = St::Type; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { + type Type = St::Type; type Value = St::Value; type Id = Set; type Pinned = St::Pinned; - type Type = St::Type; } ///State transition - sets the `pinned` field to Set pub struct SetPinned(PhantomData St>); impl sealed::Sealed for SetPinned {} impl State for SetPinned { - type Value = St::Value; - type Id = St::Id; - type Pinned = Set; type Type = St::Type; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { type Value = St::Value; type Id = St::Id; - type Pinned = St::Pinned; - type Type = Set; + type Pinned = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `type` field + pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `pinned` field pub struct pinned(()); - ///Marker type for the `type` field - pub struct r#type(()); } } @@ -6599,10 +6599,10 @@ where impl SavedFeedBuilder where St: saved_feed_state::State, + St::Type: saved_feed_state::IsSet, St::Value: saved_feed_state::IsSet, St::Id: saved_feed_state::IsSet, St::Pinned: saved_feed_state::IsSet, - St::Type: saved_feed_state::IsSet, { /// Build the final struct. pub fn build(self) -> SavedFeed { @@ -6888,37 +6888,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 St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type Record = St::Record; + type Status = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Status = St::Status; type Record = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Record = St::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(()); } } @@ -7075,8 +7075,8 @@ impl StatusViewBuilder { impl StatusViewBuilder where St: status_view_state::State, - St::Status: status_view_state::IsSet, St::Record: status_view_state::IsSet, + St::Status: status_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> StatusView { @@ -7134,51 +7134,51 @@ pub mod verification_state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type VerifiedStatus; type TrustedVerifierStatus; type Verifications; - type VerifiedStatus; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type VerifiedStatus = Unset; type TrustedVerifierStatus = Unset; type Verifications = Unset; - type VerifiedStatus = Unset; + } + ///State transition - sets the `verified_status` field to Set + pub struct SetVerifiedStatus(PhantomData St>); + impl sealed::Sealed for SetVerifiedStatus {} + impl State for SetVerifiedStatus { + type VerifiedStatus = Set; + type TrustedVerifierStatus = St::TrustedVerifierStatus; + type Verifications = St::Verifications; } ///State transition - sets the `trusted_verifier_status` field to Set pub struct SetTrustedVerifierStatus(PhantomData St>); impl sealed::Sealed for SetTrustedVerifierStatus {} impl State for SetTrustedVerifierStatus { + type VerifiedStatus = St::VerifiedStatus; type TrustedVerifierStatus = Set; type Verifications = St::Verifications; - type VerifiedStatus = St::VerifiedStatus; } ///State transition - sets the `verifications` field to Set pub struct SetVerifications(PhantomData St>); impl sealed::Sealed for SetVerifications {} impl State for SetVerifications { - type TrustedVerifierStatus = St::TrustedVerifierStatus; - type Verifications = Set; type VerifiedStatus = St::VerifiedStatus; - } - ///State transition - sets the `verified_status` field to Set - pub struct SetVerifiedStatus(PhantomData St>); - impl sealed::Sealed for SetVerifiedStatus {} - impl State for SetVerifiedStatus { type TrustedVerifierStatus = St::TrustedVerifierStatus; - type Verifications = St::Verifications; - type VerifiedStatus = Set; + type Verifications = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `verified_status` field + pub struct verified_status(()); ///Marker type for the `trusted_verifier_status` field pub struct trusted_verifier_status(()); ///Marker type for the `verifications` field pub struct verifications(()); - ///Marker type for the `verified_status` field - pub struct verified_status(()); } } @@ -7274,9 +7274,9 @@ where impl VerificationStateBuilder where St: verification_state_state::State, + St::VerifiedStatus: verification_state_state::IsSet, St::TrustedVerifierStatus: verification_state_state::IsSet, St::Verifications: verification_state_state::IsSet, - St::VerifiedStatus: verification_state_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationState { @@ -7311,67 +7311,67 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Uri; - type IsValid; type Issuer; + type IsValid; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Uri = Unset; - type IsValid = Unset; type Issuer = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Uri = St::Uri; - type IsValid = St::IsValid; - type Issuer = St::Issuer; + type IsValid = Unset; + type CreatedAt = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type CreatedAt = St::CreatedAt; type Uri = Set; - type IsValid = St::IsValid; type Issuer = St::Issuer; + type IsValid = St::IsValid; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData St>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { + type Uri = St::Uri; + type Issuer = Set; + type IsValid = St::IsValid; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `is_valid` field to Set pub struct SetIsValid(PhantomData St>); impl sealed::Sealed for SetIsValid {} impl State for SetIsValid { - type CreatedAt = St::CreatedAt; type Uri = St::Uri; - type IsValid = Set; type Issuer = St::Issuer; - } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData St>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { + type IsValid = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Uri = St::Uri; + type Issuer = St::Issuer; type IsValid = St::IsValid; - type Issuer = 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 `uri` field pub struct uri(()); - ///Marker type for the `is_valid` field - pub struct is_valid(()); ///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(()); } } @@ -7479,10 +7479,10 @@ where impl VerificationViewBuilder where St: verification_view_state::State, - St::CreatedAt: verification_view_state::IsSet, St::Uri: verification_view_state::IsSet, - St::IsValid: verification_view_state::IsSet, St::Issuer: verification_view_state::IsSet, + St::IsValid: verification_view_state::IsSet, + St::CreatedAt: verification_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationView { diff --git a/crates/jacquard-api/src/app_bsky/actor/status.rs b/crates/jacquard-api/src/app_bsky/actor/status.rs index d24fe1ac8..f4d9fa422 100644 --- a/crates/jacquard-api/src/app_bsky/actor/status.rs +++ b/crates/jacquard-api/src/app_bsky/actor/status.rs @@ -214,37 +214,37 @@ pub mod status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Status; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Status = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Status = St::Status; + type CreatedAt = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CreatedAt = St::CreatedAt; type Status = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Status = St::Status; + 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 `status` field pub struct status(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -345,8 +345,8 @@ where impl StatusBuilder where St: status_state::State, - St::CreatedAt: status_state::IsSet, St::Status: status_state::IsSet, + St::CreatedAt: status_state::IsSet, { /// Build the final struct. pub fn build(self) -> Status { diff --git a/crates/jacquard-api/src/app_bsky/ageassurance.rs b/crates/jacquard-api/src/app_bsky/ageassurance.rs index a2258e846..8386aaf31 100644 --- a/crates/jacquard-api/src/app_bsky/ageassurance.rs +++ b/crates/jacquard-api/src/app_bsky/ageassurance.rs @@ -1460,49 +1460,49 @@ pub mod config_region_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CountryCode; type Rules; + type CountryCode; type MinAccessAge; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CountryCode = Unset; type Rules = Unset; + type CountryCode = Unset; type MinAccessAge = Unset; } - ///State transition - sets the `country_code` field to Set - pub struct SetCountryCode(PhantomData St>); - impl sealed::Sealed for SetCountryCode {} - impl State for SetCountryCode { - type CountryCode = Set; - type Rules = St::Rules; - type MinAccessAge = St::MinAccessAge; - } ///State transition - sets the `rules` field to Set pub struct SetRules(PhantomData St>); impl sealed::Sealed for SetRules {} impl State for SetRules { - type CountryCode = St::CountryCode; type Rules = Set; + type CountryCode = St::CountryCode; + type MinAccessAge = St::MinAccessAge; + } + ///State transition - sets the `country_code` field to Set + pub struct SetCountryCode(PhantomData St>); + impl sealed::Sealed for SetCountryCode {} + impl State for SetCountryCode { + type Rules = St::Rules; + type CountryCode = Set; type MinAccessAge = St::MinAccessAge; } ///State transition - sets the `min_access_age` field to Set pub struct SetMinAccessAge(PhantomData St>); impl sealed::Sealed for SetMinAccessAge {} impl State for SetMinAccessAge { - type CountryCode = St::CountryCode; type Rules = St::Rules; + type CountryCode = St::CountryCode; type MinAccessAge = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `country_code` field - pub struct country_code(()); ///Marker type for the `rules` field pub struct rules(()); + ///Marker type for the `country_code` field + pub struct country_code(()); ///Marker type for the `min_access_age` field pub struct min_access_age(()); } @@ -1606,8 +1606,8 @@ where impl ConfigRegionBuilder where St: config_region_state::State, - St::CountryCode: config_region_state::IsSet, St::Rules: config_region_state::IsSet, + St::CountryCode: config_region_state::IsSet, St::MinAccessAge: config_region_state::IsSet, { /// Build the final struct. @@ -2058,37 +2058,37 @@ pub mod config_region_rule_if_assured_over_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData St>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = St::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData St>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = St::Access; type Age = Set; + type Access = St::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData St>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = St::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(()); } } @@ -2175,8 +2175,8 @@ where impl ConfigRegionRuleIfAssuredOverAgeBuilder where St: config_region_rule_if_assured_over_age_state::State, - St::Access: config_region_rule_if_assured_over_age_state::IsSet, St::Age: config_region_rule_if_assured_over_age_state::IsSet, + St::Access: config_region_rule_if_assured_over_age_state::IsSet, { /// Build the final struct. pub fn build(self) -> ConfigRegionRuleIfAssuredOverAge { @@ -2360,37 +2360,37 @@ pub mod config_region_rule_if_declared_over_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData St>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = St::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData St>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = St::Access; type Age = Set; + type Access = St::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData St>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = St::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(()); } } @@ -2477,8 +2477,8 @@ where impl ConfigRegionRuleIfDeclaredOverAgeBuilder where St: config_region_rule_if_declared_over_age_state::State, - St::Access: config_region_rule_if_declared_over_age_state::IsSet, St::Age: config_region_rule_if_declared_over_age_state::IsSet, + St::Access: config_region_rule_if_declared_over_age_state::IsSet, { /// Build the final struct. pub fn build(self) -> ConfigRegionRuleIfDeclaredOverAge { @@ -2511,37 +2511,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 St>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = St::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData St>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = St::Access; type Age = Set; + type Access = St::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData St>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = St::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(()); } } @@ -2628,8 +2628,8 @@ where impl ConfigRegionRuleIfDeclaredUnderAgeBuilder where St: config_region_rule_if_declared_under_age_state::State, - St::Access: config_region_rule_if_declared_under_age_state::IsSet, St::Age: config_region_rule_if_declared_under_age_state::IsSet, + St::Access: config_region_rule_if_declared_under_age_state::IsSet, { /// Build the final struct. pub fn build(self) -> ConfigRegionRuleIfDeclaredUnderAge { @@ -2662,85 +2662,85 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CountryCode; - type Access; + type CreatedAt; type AttemptId; + type Access; + type CountryCode; type Status; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CountryCode = Unset; - type Access = Unset; + type CreatedAt = Unset; type AttemptId = Unset; + type Access = Unset; + type CountryCode = Unset; type Status = Unset; - type CreatedAt = Unset; } - ///State transition - sets the `country_code` field to Set - pub struct SetCountryCode(PhantomData St>); - impl sealed::Sealed for SetCountryCode {} - impl State for SetCountryCode { - type CountryCode = Set; - type Access = St::Access; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type AttemptId = St::AttemptId; + type Access = St::Access; + type CountryCode = St::CountryCode; type Status = St::Status; + } + ///State transition - sets the `attempt_id` field to Set + pub struct SetAttemptId(PhantomData St>); + impl sealed::Sealed for SetAttemptId {} + impl State for SetAttemptId { type CreatedAt = St::CreatedAt; + type AttemptId = Set; + type Access = St::Access; + type CountryCode = St::CountryCode; + type Status = St::Status; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData St>); impl sealed::Sealed for SetAccess {} impl State for SetAccess { - type CountryCode = St::CountryCode; - type Access = Set; + type CreatedAt = St::CreatedAt; type AttemptId = St::AttemptId; + type Access = Set; + type CountryCode = St::CountryCode; type Status = St::Status; - type CreatedAt = St::CreatedAt; } - ///State transition - sets the `attempt_id` field to Set - pub struct SetAttemptId(PhantomData St>); - impl sealed::Sealed for SetAttemptId {} - impl State for SetAttemptId { - type CountryCode = St::CountryCode; + ///State transition - sets the `country_code` field to Set + pub struct SetCountryCode(PhantomData St>); + impl sealed::Sealed for SetCountryCode {} + impl State for SetCountryCode { + type CreatedAt = St::CreatedAt; + type AttemptId = St::AttemptId; type Access = St::Access; - type AttemptId = Set; + type CountryCode = Set; type Status = St::Status; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CountryCode = St::CountryCode; - type Access = St::Access; - type AttemptId = St::AttemptId; - type Status = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CountryCode = St::CountryCode; - type Access = St::Access; type AttemptId = St::AttemptId; - type Status = St::Status; - type CreatedAt = Set; + type Access = St::Access; + type CountryCode = St::CountryCode; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `country_code` field - pub struct country_code(()); - ///Marker type for the `access` field - pub struct access(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); + ///Marker type for the `access` field + pub struct access(()); + ///Marker type for the `country_code` field + pub struct country_code(()); ///Marker type for the `status` field pub struct status(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -2957,11 +2957,11 @@ where impl EventBuilder where St: event_state::State, - St::CountryCode: event_state::IsSet, - St::Access: event_state::IsSet, + St::CreatedAt: event_state::IsSet, St::AttemptId: event_state::IsSet, + St::Access: event_state::IsSet, + St::CountryCode: event_state::IsSet, St::Status: event_state::IsSet, - St::CreatedAt: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { @@ -3009,37 +3009,37 @@ pub mod state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type Access; + 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 Access = Unset; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type Access = St::Access; + type Status = Unset; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData St>); impl sealed::Sealed for SetAccess {} impl State for SetAccess { - type Status = St::Status; type Access = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Access = St::Access; + 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 `access` field pub struct access(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -3126,8 +3126,8 @@ where impl StateBuilder where St: state_state::State, - St::Status: state_state::IsSet, St::Access: state_state::IsSet, + St::Status: state_state::IsSet, { /// Build the final struct. pub fn build(self) -> State { diff --git a/crates/jacquard-api/src/app_bsky/bookmark.rs b/crates/jacquard-api/src/app_bsky/bookmark.rs index b01a9858a..867072a87 100644 --- a/crates/jacquard-api/src/app_bsky/bookmark.rs +++ b/crates/jacquard-api/src/app_bsky/bookmark.rs @@ -286,37 +286,37 @@ pub mod bookmark_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Item; type Subject; + type Item; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Item = Unset; type Subject = Unset; - } - ///State transition - sets the `item` field to Set - pub struct SetItem(PhantomData St>); - impl sealed::Sealed for SetItem {} - impl State for SetItem { - type Item = Set; - type Subject = St::Subject; + type Item = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Item = St::Item; type Subject = Set; + type Item = St::Item; + } + ///State transition - sets the `item` field to Set + pub struct SetItem(PhantomData St>); + impl sealed::Sealed for SetItem {} + impl State for SetItem { + type Subject = St::Subject; + type Item = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `item` field - pub struct item(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `item` field + pub struct item(()); } } @@ -399,8 +399,8 @@ where impl BookmarkViewBuilder where St: bookmark_view_state::State, - St::Item: bookmark_view_state::IsSet, St::Subject: bookmark_view_state::IsSet, + St::Item: bookmark_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> BookmarkView { diff --git a/crates/jacquard-api/src/app_bsky/contact/send_notification.rs b/crates/jacquard-api/src/app_bsky/contact/send_notification.rs index a52afc9a0..ee78c343f 100644 --- a/crates/jacquard-api/src/app_bsky/contact/send_notification.rs +++ b/crates/jacquard-api/src/app_bsky/contact/send_notification.rs @@ -74,37 +74,37 @@ pub mod send_notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type To; type From; + type To; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type To = Unset; type From = Unset; - } - ///State transition - sets the `to` field to Set - pub struct SetTo(PhantomData St>); - impl sealed::Sealed for SetTo {} - impl State for SetTo { - type To = Set; - type From = St::From; + type To = Unset; } ///State transition - sets the `from` field to Set pub struct SetFrom(PhantomData St>); impl sealed::Sealed for SetFrom {} impl State for SetFrom { - type To = St::To; type From = Set; + type To = St::To; + } + ///State transition - sets the `to` field to Set + pub struct SetTo(PhantomData St>); + impl sealed::Sealed for SetTo {} + impl State for SetTo { + type From = St::From; + type To = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `to` field - pub struct to(()); ///Marker type for the `from` field pub struct from(()); + ///Marker type for the `to` field + pub struct to(()); } } @@ -174,8 +174,8 @@ where impl SendNotificationBuilder where St: send_notification_state::State, - St::To: send_notification_state::IsSet, St::From: send_notification_state::IsSet, + St::To: send_notification_state::IsSet, { /// Build the final struct. pub fn build(self) -> SendNotification { diff --git a/crates/jacquard-api/src/app_bsky/draft.rs b/crates/jacquard-api/src/app_bsky/draft.rs index 6e0b0d983..c1addbb77 100644 --- a/crates/jacquard-api/src/app_bsky/draft.rs +++ b/crates/jacquard-api/src/app_bsky/draft.rs @@ -1210,37 +1210,37 @@ pub mod draft_embed_caption_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Lang; type Content; + type Lang; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Lang = Unset; type Content = Unset; - } - ///State transition - sets the `lang` field to Set - pub struct SetLang(PhantomData St>); - impl sealed::Sealed for SetLang {} - impl State for SetLang { - type Lang = Set; - type Content = St::Content; + type Lang = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Lang = St::Lang; type Content = Set; + type Lang = St::Lang; + } + ///State transition - sets the `lang` field to Set + pub struct SetLang(PhantomData St>); + impl sealed::Sealed for SetLang {} + impl State for SetLang { + type Content = St::Content; + type Lang = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `lang` field - pub struct lang(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `lang` field + pub struct lang(()); } } @@ -1310,8 +1310,8 @@ where impl DraftEmbedCaptionBuilder where St: draft_embed_caption_state::State, - St::Lang: draft_embed_caption_state::IsSet, St::Content: draft_embed_caption_state::IsSet, + St::Lang: draft_embed_caption_state::IsSet, { /// Build the final struct. pub fn build(self) -> DraftEmbedCaption { @@ -1799,67 +1799,67 @@ pub mod draft_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type CreatedAt; - type UpdatedAt; + type Id; type Draft; + type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type CreatedAt = Unset; - type UpdatedAt = Unset; + type Id = Unset; type Draft = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Draft = St::Draft; + type UpdatedAt = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Id = St::Id; type CreatedAt = Set; - type UpdatedAt = St::UpdatedAt; + type Id = St::Id; type Draft = St::Draft; + type UpdatedAt = St::UpdatedAt; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type Id = St::Id; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { type CreatedAt = St::CreatedAt; - type UpdatedAt = Set; + type Id = Set; type Draft = St::Draft; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `draft` field to Set pub struct SetDraft(PhantomData St>); impl sealed::Sealed for SetDraft {} impl State for SetDraft { - type Id = St::Id; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; + type Id = St::Id; type Draft = Set; + type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type CreatedAt = St::CreatedAt; + type Id = St::Id; + type Draft = St::Draft; + type UpdatedAt = 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_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 `draft` field pub struct draft(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); } } @@ -1967,10 +1967,10 @@ where impl DraftViewBuilder where St: draft_view_state::State, - St::Id: draft_view_state::IsSet, St::CreatedAt: draft_view_state::IsSet, - St::UpdatedAt: draft_view_state::IsSet, + St::Id: draft_view_state::IsSet, St::Draft: draft_view_state::IsSet, + St::UpdatedAt: draft_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> DraftView { @@ -2007,37 +2007,37 @@ pub mod draft_with_id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Draft; type Id; + type Draft; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Draft = Unset; type Id = Unset; - } - ///State transition - sets the `draft` field to Set - pub struct SetDraft(PhantomData St>); - impl sealed::Sealed for SetDraft {} - impl State for SetDraft { - type Draft = Set; - type Id = St::Id; + type Draft = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Draft = St::Draft; type Id = Set; + type Draft = St::Draft; + } + ///State transition - sets the `draft` field to Set + pub struct SetDraft(PhantomData St>); + impl sealed::Sealed for SetDraft {} + impl State for SetDraft { + type Id = St::Id; + type Draft = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `draft` field - pub struct draft(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `draft` field + pub struct draft(()); } } @@ -2107,8 +2107,8 @@ where impl DraftWithIdBuilder where St: draft_with_id_state::State, - St::Draft: draft_with_id_state::IsSet, St::Id: draft_with_id_state::IsSet, + St::Draft: draft_with_id_state::IsSet, { /// Build the final struct. pub fn build(self) -> DraftWithId { diff --git a/crates/jacquard-api/src/app_bsky/embed.rs b/crates/jacquard-api/src/app_bsky/embed.rs index b1efa9ff8..93a842944 100644 --- a/crates/jacquard-api/src/app_bsky/embed.rs +++ b/crates/jacquard-api/src/app_bsky/embed.rs @@ -86,37 +86,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 St>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = St::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData St>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = St::Height; type Width = Set; + type Height = St::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData St>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = St::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(()); } } @@ -186,8 +186,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Height: aspect_ratio_state::IsSet, St::Width: aspect_ratio_state::IsSet, + St::Height: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { diff --git a/crates/jacquard-api/src/app_bsky/embed/external.rs b/crates/jacquard-api/src/app_bsky/embed/external.rs index fca4eb5a9..db0d1122c 100644 --- a/crates/jacquard-api/src/app_bsky/embed/external.rs +++ b/crates/jacquard-api/src/app_bsky/embed/external.rs @@ -179,51 +179,51 @@ pub mod external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Title; type Description; type Uri; - type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Title = Unset; type Description = Unset; type Uri = Unset; - type Title = Unset; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; + type Description = St::Description; + type Uri = St::Uri; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { + type Title = St::Title; type Description = Set; type Uri = St::Uri; - type Title = St::Title; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Description = St::Description; - type Uri = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { type Description = St::Description; - type Uri = St::Uri; - type Title = Set; + 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 `description` field pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `title` field - pub struct title(()); } } @@ -325,9 +325,9 @@ where impl ExternalBuilder where St: external_state::State, + St::Title: external_state::IsSet, St::Description: external_state::IsSet, St::Uri: external_state::IsSet, - St::Title: external_state::IsSet, { /// Build the final struct. pub fn build(self) -> External { @@ -692,51 +692,51 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; 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 Uri = Unset; type Description = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Uri = St::Uri; - type Description = St::Description; + type Title = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = St::Title; type Uri = Set; type Description = St::Description; + type Title = St::Title; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Title = St::Title; type Uri = St::Uri; type Description = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Uri = St::Uri; + type Description = St::Description; + 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 `uri` field pub struct uri(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -838,9 +838,9 @@ where impl ViewExternalBuilder where St: view_external_state::State, - St::Title: view_external_state::IsSet, St::Uri: view_external_state::IsSet, St::Description: view_external_state::IsSet, + St::Title: view_external_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewExternal { diff --git a/crates/jacquard-api/src/app_bsky/embed/images.rs b/crates/jacquard-api/src/app_bsky/embed/images.rs index 2f337f427..1ce4ed005 100644 --- a/crates/jacquard-api/src/app_bsky/embed/images.rs +++ b/crates/jacquard-api/src/app_bsky/embed/images.rs @@ -206,37 +206,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 St>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Alt = Set; - type Image = St::Image; + type Alt = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Alt = St::Alt; type Image = Set; + type Alt = St::Alt; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData St>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Image = St::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(()); } } @@ -319,8 +319,8 @@ where impl ImageBuilder where St: image_state::State, - St::Alt: image_state::IsSet, St::Image: image_state::IsSet, + St::Alt: image_state::IsSet, { /// Build the final struct. pub fn build(self) -> Image { diff --git a/crates/jacquard-api/src/app_bsky/embed/record.rs b/crates/jacquard-api/src/app_bsky/embed/record.rs index 7234c965d..7e546ef53 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record.rs @@ -706,51 +706,51 @@ 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; + 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 Blocked = Unset; type Uri = Unset; + type Blocked = Unset; + type Author = Unset; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Blocked = St::Blocked; - type Uri = St::Uri; + type Author = St::Author; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData St>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Author = St::Author; - type Blocked = Set; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Blocked = Set; type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Uri = St::Uri; type Blocked = St::Blocked; - type Uri = Set; + 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 `blocked` field - pub struct blocked(()); ///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(()); } } @@ -839,9 +839,9 @@ where impl ViewBlockedBuilder where St: view_blocked_state::State, - St::Author: view_blocked_state::IsSet, - St::Blocked: view_blocked_state::IsSet, St::Uri: view_blocked_state::IsSet, + St::Blocked: view_blocked_state::IsSet, + St::Author: view_blocked_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewBlocked { @@ -876,37 +876,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 St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Detached = St::Detached; + type Uri = Unset; } ///State transition - sets the `detached` field to Set pub struct SetDetached(PhantomData St>); impl sealed::Sealed for SetDetached {} impl State for SetDetached { - type Uri = St::Uri; type Detached = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Detached = St::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(()); } } @@ -976,8 +976,8 @@ where impl ViewDetachedBuilder where St: view_detached_state::State, - St::Uri: view_detached_state::IsSet, St::Detached: view_detached_state::IsSet, + St::Uri: view_detached_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewDetached { @@ -1010,37 +1010,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 St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = St::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData St>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = St::Uri; type NotFound = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = St::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(()); } } @@ -1110,8 +1110,8 @@ where impl ViewNotFoundBuilder where St: view_not_found_state::State, - St::Uri: view_not_found_state::IsSet, St::NotFound: view_not_found_state::IsSet, + St::Uri: view_not_found_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewNotFound { @@ -1144,85 +1144,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 Uri; type IndexedAt; - type Author; } /// 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 Uri = Unset; type IndexedAt = Unset; - type Author = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = St::Cid; - type Value = St::Value; - type IndexedAt = St::IndexedAt; - type Author = St::Author; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; type Cid = Set; + type Author = St::Author; type Value = St::Value; + type Uri = St::Uri; + type IndexedAt = St::IndexedAt; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Cid = St::Cid; + type Author = Set; + type Value = St::Value; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; - type Author = St::Author; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Uri = St::Uri; type Cid = St::Cid; + type Author = St::Author; type Value = Set; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; type Author = St::Author; + type Value = St::Value; + type Uri = Set; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Uri = St::Uri; type Cid = St::Cid; - type Value = St::Value; - type IndexedAt = Set; type Author = St::Author; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Uri = St::Uri; - type Cid = St::Cid; type Value = St::Value; - type IndexedAt = St::IndexedAt; - type Author = Set; + type Uri = St::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 `author` field + pub struct author(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `author` field - pub struct author(()); } } @@ -1442,11 +1442,11 @@ where impl ViewRecordBuilder where St: view_record_state::State, - St::Uri: view_record_state::IsSet, St::Cid: view_record_state::IsSet, + St::Author: view_record_state::IsSet, St::Value: view_record_state::IsSet, + St::Uri: view_record_state::IsSet, St::IndexedAt: view_record_state::IsSet, - St::Author: view_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewRecord { diff --git a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs index f69749044..515d1eca2 100644 --- a/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs +++ b/crates/jacquard-api/src/app_bsky/embed/record_with_media.rs @@ -331,37 +331,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = St::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData St>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = St::Record; type Media = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = St::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(()); } } @@ -431,8 +431,8 @@ where impl ViewBuilder where St: view_state::State, - St::Record: view_state::IsSet, St::Media: view_state::IsSet, + St::Record: view_state::IsSet, { /// Build the final struct. pub fn build(self) -> View { diff --git a/crates/jacquard-api/src/app_bsky/embed/video.rs b/crates/jacquard-api/src/app_bsky/embed/video.rs index cd5e9b3e6..ff4a74cb7 100644 --- a/crates/jacquard-api/src/app_bsky/embed/video.rs +++ b/crates/jacquard-api/src/app_bsky/embed/video.rs @@ -423,37 +423,37 @@ pub mod caption_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type File; type Lang; + type File; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type File = Unset; type Lang = Unset; - } - ///State transition - sets the `file` field to Set - pub struct SetFile(PhantomData St>); - impl sealed::Sealed for SetFile {} - impl State for SetFile { - type File = Set; - type Lang = St::Lang; + type File = Unset; } ///State transition - sets the `lang` field to Set pub struct SetLang(PhantomData St>); impl sealed::Sealed for SetLang {} impl State for SetLang { - type File = St::File; type Lang = Set; + type File = St::File; + } + ///State transition - sets the `file` field to Set + pub struct SetFile(PhantomData St>); + impl sealed::Sealed for SetFile {} + impl State for SetFile { + type Lang = St::Lang; + type File = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `file` field - pub struct file(()); ///Marker type for the `lang` field pub struct lang(()); + ///Marker type for the `file` field + pub struct file(()); } } @@ -523,8 +523,8 @@ where impl CaptionBuilder where St: caption_state::State, - St::File: caption_state::IsSet, St::Lang: caption_state::IsSet, + St::File: caption_state::IsSet, { /// Build the final struct. pub fn build(self) -> Caption { @@ -884,37 +884,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 St>); - impl sealed::Sealed for SetPlaylist {} - impl State for SetPlaylist { - type Playlist = Set; - type Cid = St::Cid; + type Playlist = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Playlist = St::Playlist; type Cid = Set; + type Playlist = St::Playlist; + } + ///State transition - sets the `playlist` field to Set + pub struct SetPlaylist(PhantomData St>); + impl sealed::Sealed for SetPlaylist {} + impl State for SetPlaylist { + type Cid = St::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(()); } } @@ -1046,8 +1046,8 @@ impl ViewBuilder { impl ViewBuilder where St: view_state::State, - St::Playlist: view_state::IsSet, St::Cid: view_state::IsSet, + St::Playlist: view_state::IsSet, { /// Build the final struct. pub fn build(self) -> View { diff --git a/crates/jacquard-api/src/app_bsky/feed.rs b/crates/jacquard-api/src/app_bsky/feed.rs index 278a3a26d..a9e42654a 100644 --- a/crates/jacquard-api/src/app_bsky/feed.rs +++ b/crates/jacquard-api/src/app_bsky/feed.rs @@ -2130,49 +2130,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 St>); - impl sealed::Sealed for SetBlocked {} - impl State for SetBlocked { - type Blocked = Set; - type Author = St::Author; - type Uri = St::Uri; - } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Blocked = St::Blocked; type Author = Set; + type Blocked = St::Blocked; + type Uri = St::Uri; + } + ///State transition - sets the `blocked` field to Set + pub struct SetBlocked(PhantomData St>); + impl sealed::Sealed for SetBlocked {} + impl State for SetBlocked { + type Author = St::Author; + type Blocked = Set; type Uri = St::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Blocked = St::Blocked; type Author = St::Author; + type Blocked = St::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(()); } @@ -2263,8 +2263,8 @@ where impl BlockedPostBuilder where St: blocked_post_state::State, - St::Blocked: blocked_post_state::IsSet, St::Author: blocked_post_state::IsSet, + St::Blocked: blocked_post_state::IsSet, St::Uri: blocked_post_state::IsSet, { /// Build the final struct. @@ -2467,104 +2467,104 @@ pub mod generator_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Cid; - type IndexedAt; type Uri; type DisplayName; + type IndexedAt; type Creator; + type Cid; } /// 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; - type IndexedAt = Unset; type Uri = Unset; type DisplayName = Unset; + type IndexedAt = Unset; type Creator = Unset; + type Cid = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; type Uri = St::Uri; type DisplayName = St::DisplayName; - type Creator = St::Creator; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Did = St::Did; - type Cid = Set; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type DisplayName = St::DisplayName; type Creator = St::Creator; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Did = St::Did; type Cid = St::Cid; - type IndexedAt = Set; - type Uri = St::Uri; - type DisplayName = St::DisplayName; - type Creator = St::Creator; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Did = St::Did; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; type Uri = Set; type DisplayName = St::DisplayName; + type IndexedAt = St::IndexedAt; type Creator = St::Creator; + type Cid = St::Cid; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type Did = St::Did; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; type Uri = St::Uri; type DisplayName = Set; + type IndexedAt = St::IndexedAt; type Creator = St::Creator; + type Cid = St::Cid; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Did = St::Did; + type Uri = St::Uri; + type DisplayName = St::DisplayName; + type IndexedAt = Set; + type Creator = St::Creator; + type Cid = St::Cid; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Did = St::Did; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; type Uri = St::Uri; type DisplayName = St::DisplayName; + type IndexedAt = St::IndexedAt; type Creator = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Did = St::Did; + type Uri = St::Uri; + type DisplayName = St::DisplayName; + type IndexedAt = St::IndexedAt; + type Creator = St::Creator; + type Cid = 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 `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `creator` field pub struct creator(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -2857,11 +2857,11 @@ impl GeneratorViewBuilder where St: generator_view_state::State, St::Did: generator_view_state::IsSet, - St::Cid: generator_view_state::IsSet, - St::IndexedAt: generator_view_state::IsSet, St::Uri: generator_view_state::IsSet, St::DisplayName: generator_view_state::IsSet, + St::IndexedAt: generator_view_state::IsSet, St::Creator: generator_view_state::IsSet, + St::Cid: generator_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> GeneratorView { @@ -2918,37 +2918,37 @@ pub mod not_found_post_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 St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = St::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData St>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = St::Uri; type NotFound = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = St::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(()); } } @@ -3018,8 +3018,8 @@ where impl NotFoundPostBuilder where St: not_found_post_state::State, - St::Uri: not_found_post_state::IsSet, St::NotFound: not_found_post_state::IsSet, + St::Uri: not_found_post_state::IsSet, { /// Build the final struct. pub fn build(self) -> NotFoundPost { @@ -3052,85 +3052,85 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Author; type Cid; + type Uri; type Record; type IndexedAt; - type Uri; - 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 Cid = Unset; + type Uri = Unset; type Record = Unset; type IndexedAt = Unset; - type Uri = Unset; - type Author = Unset; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Author = Set; + type Cid = St::Cid; + type Uri = St::Uri; + type Record = St::Record; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Author = St::Author; type Cid = Set; + type Uri = St::Uri; type Record = St::Record; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Author = St::Author; + type Cid = St::Cid; + type Uri = Set; + type Record = St::Record; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { + type Author = St::Author; type Cid = St::Cid; + type Uri = St::Uri; type Record = Set; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type Author = St::Author; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = Set; - type Uri = St::Uri; - type Author = St::Author; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = St::IndexedAt; - type Uri = Set; type Author = St::Author; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = Set; + type Record = St::Record; + type IndexedAt = 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 `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 `uri` field - pub struct uri(()); - ///Marker type for the `author` field - pub struct author(()); } } @@ -3422,11 +3422,11 @@ impl PostViewBuilder { impl PostViewBuilder where St: post_view_state::State, + St::Author: post_view_state::IsSet, St::Cid: post_view_state::IsSet, + St::Uri: post_view_state::IsSet, St::Record: post_view_state::IsSet, St::IndexedAt: post_view_state::IsSet, - St::Uri: post_view_state::IsSet, - St::Author: post_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PostView { @@ -3651,37 +3651,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 St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Parent = St::Parent; + type Root = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Root = St::Root; type Parent = Set; + type Root = St::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = St::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(()); } } @@ -3774,8 +3774,8 @@ where impl ReplyRefBuilder where St: reply_ref_state::State, - St::Root: reply_ref_state::IsSet, St::Parent: reply_ref_state::IsSet, + St::Root: reply_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReplyRef { diff --git a/crates/jacquard-api/src/app_bsky/feed/generator.rs b/crates/jacquard-api/src/app_bsky/feed/generator.rs index d377b536e..b1328b331 100644 --- a/crates/jacquard-api/src/app_bsky/feed/generator.rs +++ b/crates/jacquard-api/src/app_bsky/feed/generator.rs @@ -300,49 +300,49 @@ pub mod generator_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DisplayName; type Did; + type DisplayName; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DisplayName = Unset; type Did = Unset; + type DisplayName = Unset; type CreatedAt = Unset; } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData St>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type DisplayName = Set; - type Did = St::Did; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type DisplayName = St::DisplayName; type Did = Set; + type DisplayName = St::DisplayName; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData St>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type Did = St::Did; + type DisplayName = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type DisplayName = St::DisplayName; type Did = St::Did; + type DisplayName = St::DisplayName; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `display_name` field + pub struct display_name(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -527,8 +527,8 @@ impl GeneratorBuilder { impl GeneratorBuilder where St: generator_state::State, - St::DisplayName: generator_state::IsSet, St::Did: generator_state::IsSet, + St::DisplayName: generator_state::IsSet, St::CreatedAt: generator_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs index 37791e248..95471c816 100644 --- a/crates/jacquard-api/src/app_bsky/feed/get_likes.rs +++ b/crates/jacquard-api/src/app_bsky/feed/get_likes.rs @@ -115,51 +115,51 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Actor; type IndexedAt; type CreatedAt; - 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 IndexedAt = Unset; type CreatedAt = Unset; - type Actor = Unset; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData St>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type Actor = Set; + type IndexedAt = St::IndexedAt; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Actor = St::Actor; type IndexedAt = Set; type CreatedAt = St::CreatedAt; - type Actor = St::Actor; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type IndexedAt = St::IndexedAt; - type CreatedAt = Set; type Actor = St::Actor; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData St>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { type IndexedAt = St::IndexedAt; - type CreatedAt = St::CreatedAt; - type Actor = Set; + type CreatedAt = 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 `indexed_at` field pub struct indexed_at(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `actor` field - pub struct actor(()); } } @@ -248,9 +248,9 @@ where impl LikeBuilder where St: like_state::State, + St::Actor: like_state::IsSet, St::IndexedAt: like_state::IsSet, St::CreatedAt: like_state::IsSet, - St::Actor: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/app_bsky/feed/like.rs b/crates/jacquard-api/src/app_bsky/feed/like.rs index 9d0345921..2e5dde111 100644 --- a/crates/jacquard-api/src/app_bsky/feed/like.rs +++ b/crates/jacquard-api/src/app_bsky/feed/like.rs @@ -115,37 +115,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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -228,8 +228,8 @@ impl LikeBuilder { impl LikeBuilder where St: like_state::State, - St::Subject: like_state::IsSet, St::CreatedAt: like_state::IsSet, + St::Subject: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/app_bsky/feed/post.rs b/crates/jacquard-api/src/app_bsky/feed/post.rs index 8592d1f55..2318fbdff 100644 --- a/crates/jacquard-api/src/app_bsky/feed/post.rs +++ b/crates/jacquard-api/src/app_bsky/feed/post.rs @@ -302,51 +302,51 @@ pub mod entity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Type; type Index; + 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 Type = Unset; type Index = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Type = St::Type; - type Index = St::Index; + type Value = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Value = St::Value; type Type = Set; type Index = St::Index; + type Value = St::Value; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData St>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Value = St::Value; type Type = St::Type; type Index = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Type = St::Type; + type Index = St::Index; + 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 `type` field pub struct r#type(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -435,9 +435,9 @@ where impl EntityBuilder where St: entity_state::State, - St::Value: entity_state::IsSet, St::Type: entity_state::IsSet, St::Index: entity_state::IsSet, + St::Value: entity_state::IsSet, { /// Build the final struct. pub fn build(self) -> Entity { @@ -734,37 +734,37 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -935,8 +935,8 @@ where impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, St::Text: post_state::IsSet, + St::CreatedAt: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { @@ -980,37 +980,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 St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Parent = St::Parent; + type Root = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Root = St::Root; type Parent = Set; + type Root = St::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = St::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(()); } } @@ -1080,8 +1080,8 @@ where impl ReplyRefBuilder where St: reply_ref_state::State, - St::Root: reply_ref_state::IsSet, St::Parent: reply_ref_state::IsSet, + St::Root: reply_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReplyRef { @@ -1111,37 +1111,37 @@ pub mod text_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Start; type End; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Start = Unset; type End = Unset; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData St>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Start = Set; - type End = St::End; + type Start = Unset; } ///State transition - sets the `end` field to Set pub struct SetEnd(PhantomData St>); impl sealed::Sealed for SetEnd {} impl State for SetEnd { - type Start = St::Start; type End = Set; + type Start = St::Start; + } + ///State transition - sets the `start` field to Set + pub struct SetStart(PhantomData St>); + impl sealed::Sealed for SetStart {} + impl State for SetStart { + type End = St::End; + type Start = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `end` field pub struct end(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -1211,8 +1211,8 @@ where impl TextSliceBuilder where St: text_slice_state::State, - St::Start: text_slice_state::IsSet, St::End: text_slice_state::IsSet, + St::Start: text_slice_state::IsSet, { /// Build the final struct. pub fn build(self) -> TextSlice { diff --git a/crates/jacquard-api/src/app_bsky/graph.rs b/crates/jacquard-api/src/app_bsky/graph.rs index cf4191a79..bf4f022ae 100644 --- a/crates/jacquard-api/src/app_bsky/graph.rs +++ b/crates/jacquard-api/src/app_bsky/graph.rs @@ -1350,105 +1350,105 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; - type Name; - type Uri; type Cid; - type IndexedAt; type Purpose; + type Name; + type IndexedAt; + type Creator; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; - type Name = Unset; - type Uri = Unset; type Cid = Unset; - type IndexedAt = Unset; type Purpose = Unset; + type Name = Unset; + type IndexedAt = Unset; + type Creator = Unset; + type Uri = Unset; } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData St>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Creator = Set; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Purpose = St::Purpose; type Name = St::Name; + type IndexedAt = St::IndexedAt; + type Creator = St::Creator; type Uri = St::Uri; + } + ///State transition - sets the `purpose` field to Set + pub struct SetPurpose(PhantomData St>); + impl sealed::Sealed for SetPurpose {} + impl State for SetPurpose { type Cid = St::Cid; + type Purpose = Set; + type Name = St::Name; type IndexedAt = St::IndexedAt; - type Purpose = St::Purpose; + type Creator = St::Creator; + type Uri = St::Uri; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Creator = St::Creator; - type Name = Set; - type Uri = St::Uri; type Cid = St::Cid; - type IndexedAt = St::IndexedAt; type Purpose = St::Purpose; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Creator = St::Creator; - type Name = St::Name; - type Uri = Set; - type Cid = St::Cid; + type Name = Set; type IndexedAt = St::IndexedAt; - type Purpose = St::Purpose; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Creator = St::Creator; - type Name = St::Name; type Uri = St::Uri; - type Cid = Set; - type IndexedAt = St::IndexedAt; - type Purpose = St::Purpose; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Creator = St::Creator; + type Cid = St::Cid; + type Purpose = St::Purpose; type Name = St::Name; + type IndexedAt = Set; + type Creator = St::Creator; type Uri = St::Uri; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData St>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Cid = St::Cid; - type IndexedAt = Set; type Purpose = St::Purpose; - } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData St>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { - type Creator = St::Creator; type Name = St::Name; + type IndexedAt = St::IndexedAt; + type Creator = Set; type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Cid = St::Cid; + type Purpose = St::Purpose; + type Name = St::Name; type IndexedAt = St::IndexedAt; - type Purpose = Set; + type Creator = St::Creator; + type Uri = 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 `name` field - pub struct name(()); - ///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 `purpose` field pub struct purpose(()); + ///Marker type for the `name` field + pub struct name(()); + ///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(()); } } @@ -1704,12 +1704,12 @@ impl ListViewBuilder { impl ListViewBuilder where St: list_view_state::State, - St::Creator: list_view_state::IsSet, - St::Name: list_view_state::IsSet, - St::Uri: list_view_state::IsSet, St::Cid: list_view_state::IsSet, - St::IndexedAt: list_view_state::IsSet, St::Purpose: list_view_state::IsSet, + St::Name: list_view_state::IsSet, + St::IndexedAt: list_view_state::IsSet, + St::Creator: list_view_state::IsSet, + St::Uri: list_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ListView { @@ -1759,65 +1759,65 @@ pub mod list_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Purpose; type Uri; + type Cid; type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Purpose = Unset; type Uri = Unset; + type Cid = Unset; type Name = Unset; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Purpose = St::Purpose; - type Uri = St::Uri; - type Name = St::Name; - } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData St>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Cid = St::Cid; type Purpose = Set; type Uri = St::Uri; + type Cid = St::Cid; type Name = St::Name; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; type Purpose = St::Purpose; type Uri = Set; + type Cid = St::Cid; + type Name = St::Name; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Purpose = St::Purpose; + type Uri = St::Uri; + type Cid = Set; type Name = St::Name; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Cid = St::Cid; type Purpose = St::Purpose; type Uri = St::Uri; + type Cid = St::Cid; type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `name` field pub struct name(()); } @@ -2005,9 +2005,9 @@ impl ListViewBasicBuilder { impl ListViewBasicBuilder where St: list_view_basic_state::State, - St::Cid: list_view_basic_state::IsSet, St::Purpose: list_view_basic_state::IsSet, St::Uri: list_view_basic_state::IsSet, + St::Cid: list_view_basic_state::IsSet, St::Name: list_view_basic_state::IsSet, { /// Build the final struct. @@ -2387,85 +2387,85 @@ pub mod starter_pack_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Cid; type IndexedAt; type Uri; + type Cid; type Creator; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; - type Cid = Unset; type IndexedAt = Unset; type Uri = Unset; + type Cid = Unset; type Creator = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type Creator = St::Creator; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Record = St::Record; - type Cid = Set; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type Creator = St::Creator; + type Record = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Record = St::Record; - type Cid = St::Cid; type IndexedAt = Set; type Uri = St::Uri; + type Cid = St::Cid; type Creator = St::Creator; + type Record = St::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = St::Record; - type Cid = St::Cid; type IndexedAt = St::IndexedAt; type Uri = Set; + type Cid = St::Cid; + type Creator = St::Creator; + type Record = St::Record; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Cid = Set; type Creator = St::Creator; + type Record = St::Record; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Record = St::Record; - type Cid = St::Cid; type IndexedAt = St::IndexedAt; type Uri = St::Uri; + type Cid = St::Cid; type Creator = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Cid = St::Cid; + type Creator = St::Creator; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `creator` field pub struct creator(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -2688,11 +2688,11 @@ where impl StarterPackViewBuilder where St: starter_pack_view_state::State, - St::Record: starter_pack_view_state::IsSet, - St::Cid: starter_pack_view_state::IsSet, St::IndexedAt: starter_pack_view_state::IsSet, St::Uri: starter_pack_view_state::IsSet, + St::Cid: starter_pack_view_state::IsSet, St::Creator: starter_pack_view_state::IsSet, + St::Record: starter_pack_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> StarterPackView { @@ -2743,85 +2743,85 @@ pub mod starter_pack_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type IndexedAt; - type Cid; - type Creator; type Record; + 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 IndexedAt = Unset; - type Cid = Unset; - type Creator = Unset; type Record = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - type Creator = St::Creator; - type Record = St::Record; + type Creator = Unset; + type Uri = Unset; + type Cid = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Uri = St::Uri; type IndexedAt = Set; - type Cid = St::Cid; - type Creator = St::Creator; type Record = St::Record; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Creator = St::Creator; type Uri = St::Uri; + type Cid = St::Cid; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type IndexedAt = St::IndexedAt; - type Cid = Set; + type Record = Set; type Creator = St::Creator; - type Record = St::Record; + type Uri = St::Uri; + type Cid = St::Cid; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Uri = St::Uri; type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - type Creator = Set; type Record = St::Record; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + type Creator = Set; type Uri = St::Uri; + type Cid = St::Cid; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type IndexedAt = St::IndexedAt; + type Record = St::Record; + type Creator = St::Creator; + type Uri = Set; type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = St::IndexedAt; + type Record = St::Record; type Creator = St::Creator; - type Record = Set; + type Uri = St::Uri; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `creator` field + pub struct creator(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -3031,11 +3031,11 @@ where impl StarterPackViewBasicBuilder where St: starter_pack_view_basic_state::State, - St::Uri: starter_pack_view_basic_state::IsSet, St::IndexedAt: starter_pack_view_basic_state::IsSet, - St::Cid: starter_pack_view_basic_state::IsSet, - St::Creator: starter_pack_view_basic_state::IsSet, St::Record: starter_pack_view_basic_state::IsSet, + St::Creator: starter_pack_view_basic_state::IsSet, + St::Uri: starter_pack_view_basic_state::IsSet, + St::Cid: starter_pack_view_basic_state::IsSet, { /// Build the final struct. pub fn build(self) -> StarterPackViewBasic { diff --git a/crates/jacquard-api/src/app_bsky/graph/follow.rs b/crates/jacquard-api/src/app_bsky/graph/follow.rs index e8ed05ee4..f5eb90a7f 100644 --- a/crates/jacquard-api/src/app_bsky/graph/follow.rs +++ b/crates/jacquard-api/src/app_bsky/graph/follow.rs @@ -115,37 +115,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -228,8 +228,8 @@ impl FollowBuilder { impl FollowBuilder where St: follow_state::State, - St::Subject: follow_state::IsSet, St::CreatedAt: follow_state::IsSet, + St::Subject: follow_state::IsSet, { /// Build the final struct. pub fn build(self) -> Follow { diff --git a/crates/jacquard-api/src/app_bsky/graph/list.rs b/crates/jacquard-api/src/app_bsky/graph/list.rs index 1e19d183c..15ad1ce72 100644 --- a/crates/jacquard-api/src/app_bsky/graph/list.rs +++ b/crates/jacquard-api/src/app_bsky/graph/list.rs @@ -212,50 +212,50 @@ pub mod list_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Name; type Purpose; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Name = Unset; type Purpose = Unset; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Name = St::Name; - type Purpose = St::Purpose; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type CreatedAt = St::CreatedAt; - type Name = Set; type Purpose = St::Purpose; + type Name = St::Name; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData St>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { type CreatedAt = St::CreatedAt; - type Name = St::Name; type Purpose = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + type Purpose = St::Purpose; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -408,8 +408,8 @@ impl ListBuilder where St: list_state::State, St::CreatedAt: list_state::IsSet, - St::Name: list_state::IsSet, St::Purpose: list_state::IsSet, + St::Name: list_state::IsSet, { /// Build the final struct. pub fn build(self) -> List { diff --git a/crates/jacquard-api/src/app_bsky/graph/listitem.rs b/crates/jacquard-api/src/app_bsky/graph/listitem.rs index 2d4df6557..4549c1f16 100644 --- a/crates/jacquard-api/src/app_bsky/graph/listitem.rs +++ b/crates/jacquard-api/src/app_bsky/graph/listitem.rs @@ -115,51 +115,51 @@ pub mod listitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type List; type CreatedAt; type Subject; - type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type List = Unset; type CreatedAt = Unset; type Subject = Unset; - type List = Unset; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData St>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type List = Set; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type List = St::List; type CreatedAt = Set; type Subject = St::Subject; - type List = St::List; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; - type Subject = Set; type List = St::List; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData St>); - impl sealed::Sealed for SetList {} - impl State for SetList { type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - type List = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `list` field + pub struct list(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `list` field - pub struct list(()); } } @@ -248,9 +248,9 @@ where impl ListitemBuilder where St: listitem_state::State, + St::List: listitem_state::IsSet, St::CreatedAt: listitem_state::IsSet, St::Subject: listitem_state::IsSet, - St::List: listitem_state::IsSet, { /// Build the final struct. pub fn build(self) -> Listitem { diff --git a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs index 4b4cf04ad..1b200764f 100644 --- a/crates/jacquard-api/src/app_bsky/graph/starterpack.rs +++ b/crates/jacquard-api/src/app_bsky/graph/starterpack.rs @@ -433,50 +433,50 @@ pub mod starterpack_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type CreatedAt; type List; + 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 List = Unset; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { type Name = Set; - type CreatedAt = St::CreatedAt; - type List = St::List; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Name = St::Name; - type CreatedAt = Set; type List = St::List; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData St>); impl sealed::Sealed for SetList {} impl State for SetList { type Name = St::Name; - type CreatedAt = St::CreatedAt; type List = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type List = St::List; + 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 `list` field pub struct list(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -618,8 +618,8 @@ impl StarterpackBuilder where St: starterpack_state::State, St::Name: starterpack_state::IsSet, - St::CreatedAt: starterpack_state::IsSet, St::List: starterpack_state::IsSet, + St::CreatedAt: starterpack_state::IsSet, { /// Build the final struct. pub fn build(self) -> Starterpack { diff --git a/crates/jacquard-api/src/app_bsky/graph/verification.rs b/crates/jacquard-api/src/app_bsky/graph/verification.rs index da4a3d5bc..d4eb0f824 100644 --- a/crates/jacquard-api/src/app_bsky/graph/verification.rs +++ b/crates/jacquard-api/src/app_bsky/graph/verification.rs @@ -119,66 +119,66 @@ pub mod verification_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type DisplayName; + type CreatedAt; type Subject; type Handle; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type DisplayName = Unset; + type CreatedAt = Unset; type Subject = Unset; type Handle = Unset; - type CreatedAt = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type DisplayName = Set; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; + type Handle = St::Handle; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type DisplayName = St::DisplayName; + type CreatedAt = Set; type Subject = St::Subject; type Handle = St::Handle; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type DisplayName = St::DisplayName; + type CreatedAt = St::CreatedAt; type Subject = Set; type Handle = St::Handle; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type DisplayName = St::DisplayName; - type Subject = St::Subject; - type Handle = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type DisplayName = St::DisplayName; type Subject = St::Subject; - type Handle = St::Handle; - type CreatedAt = Set; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -287,9 +287,9 @@ impl VerificationBuilder where St: verification_state::State, St::DisplayName: verification_state::IsSet, + St::CreatedAt: verification_state::IsSet, St::Subject: verification_state::IsSet, St::Handle: verification_state::IsSet, - St::CreatedAt: verification_state::IsSet, { /// Build the final struct. pub fn build(self) -> Verification { diff --git a/crates/jacquard-api/src/app_bsky/labeler.rs b/crates/jacquard-api/src/app_bsky/labeler.rs index 457bb3f00..18d0a29a2 100644 --- a/crates/jacquard-api/src/app_bsky/labeler.rs +++ b/crates/jacquard-api/src/app_bsky/labeler.rs @@ -596,67 +596,67 @@ pub mod labeler_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Creator; type IndexedAt; type Uri; + type Creator; + 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 Creator = Unset; type IndexedAt = Unset; type Uri = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Creator = St::Creator; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData St>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Cid = St::Cid; - type Creator = Set; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; + type Creator = Unset; + type Cid = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Cid = St::Cid; - type Creator = St::Creator; type IndexedAt = Set; type Uri = St::Uri; + type Creator = St::Creator; + type Cid = St::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; - type Creator = St::Creator; type IndexedAt = St::IndexedAt; type Uri = Set; + type Creator = St::Creator; + type Cid = St::Cid; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData St>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Creator = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Creator = St::Creator; + 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 `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 `creator` field + pub struct creator(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -817,10 +817,10 @@ impl LabelerViewBuilder { impl LabelerViewBuilder where St: labeler_view_state::State, - St::Cid: labeler_view_state::IsSet, - St::Creator: labeler_view_state::IsSet, St::IndexedAt: labeler_view_state::IsSet, St::Uri: labeler_view_state::IsSet, + St::Creator: labeler_view_state::IsSet, + St::Cid: labeler_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> LabelerView { @@ -863,85 +863,85 @@ pub mod labeler_view_detailed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Creator; + type Cid; type Policies; + type Creator; + type IndexedAt; type Uri; - 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 Creator = Unset; + type Cid = Unset; type Policies = Unset; + type Creator = Unset; + type IndexedAt = Unset; type Uri = Unset; - type Cid = Unset; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Creator = St::Creator; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; type Policies = St::Policies; + type Creator = St::Creator; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; + } + ///State transition - sets the `policies` field to Set + pub struct SetPolicies(PhantomData St>); + impl sealed::Sealed for SetPolicies {} + impl State for SetPolicies { type Cid = St::Cid; + type Policies = Set; + type Creator = St::Creator; + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type IndexedAt = St::IndexedAt; - type Creator = Set; + type Cid = St::Cid; type Policies = St::Policies; + type Creator = Set; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Cid = St::Cid; } - ///State transition - sets the `policies` field to Set - pub struct SetPolicies(PhantomData St>); - impl sealed::Sealed for SetPolicies {} - impl State for SetPolicies { - type IndexedAt = St::IndexedAt; + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Cid = St::Cid; + type Policies = St::Policies; type Creator = St::Creator; - type Policies = Set; + type IndexedAt = Set; type Uri = St::Uri; - type Cid = St::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type IndexedAt = St::IndexedAt; - type Creator = St::Creator; - type Policies = St::Policies; - type Uri = Set; type Cid = St::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type IndexedAt = St::IndexedAt; - type Creator = St::Creator; type Policies = St::Policies; - type Uri = St::Uri; - type Cid = Set; + type Creator = St::Creator; + type IndexedAt = St::IndexedAt; + type Uri = 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 `policies` field pub struct policies(()); + ///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 `cid` field - pub struct cid(()); } } @@ -1191,11 +1191,11 @@ impl< impl LabelerViewDetailedBuilder where St: labeler_view_detailed_state::State, - St::IndexedAt: labeler_view_detailed_state::IsSet, - St::Creator: labeler_view_detailed_state::IsSet, + St::Cid: labeler_view_detailed_state::IsSet, St::Policies: labeler_view_detailed_state::IsSet, + St::Creator: labeler_view_detailed_state::IsSet, + St::IndexedAt: labeler_view_detailed_state::IsSet, St::Uri: labeler_view_detailed_state::IsSet, - St::Cid: labeler_view_detailed_state::IsSet, { /// Build the final struct. pub fn build(self) -> LabelerViewDetailed { diff --git a/crates/jacquard-api/src/app_bsky/labeler/service.rs b/crates/jacquard-api/src/app_bsky/labeler/service.rs index 933966ebc..3f5e94cce 100644 --- a/crates/jacquard-api/src/app_bsky/labeler/service.rs +++ b/crates/jacquard-api/src/app_bsky/labeler/service.rs @@ -127,37 +127,37 @@ pub mod service_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Policies; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Policies = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Policies = St::Policies; + type CreatedAt = Unset; } ///State transition - sets the `policies` field to Set pub struct SetPolicies(PhantomData St>); impl sealed::Sealed for SetPolicies {} impl State for SetPolicies { - type CreatedAt = St::CreatedAt; type Policies = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Policies = St::Policies; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `policies` field pub struct policies(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -292,8 +292,8 @@ impl ServiceBuilder { impl ServiceBuilder where St: service_state::State, - St::CreatedAt: service_state::IsSet, St::Policies: service_state::IsSet, + St::CreatedAt: service_state::IsSet, { /// Build the final struct. pub fn build(self) -> Service { diff --git a/crates/jacquard-api/src/app_bsky/notification.rs b/crates/jacquard-api/src/app_bsky/notification.rs index c04e10703..0ece76a1a 100644 --- a/crates/jacquard-api/src/app_bsky/notification.rs +++ b/crates/jacquard-api/src/app_bsky/notification.rs @@ -395,37 +395,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 St>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type Reply = St::Reply; + type Post = Unset; } ///State transition - sets the `reply` field to Set pub struct SetReply(PhantomData St>); impl sealed::Sealed for SetReply {} impl State for SetReply { - type Post = St::Post; type Reply = Set; + type Post = St::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData St>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type Reply = St::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(()); } } @@ -498,8 +498,8 @@ where impl ActivitySubscriptionBuilder where St: activity_subscription_state::State, - St::Post: activity_subscription_state::IsSet, St::Reply: activity_subscription_state::IsSet, + St::Post: activity_subscription_state::IsSet, { /// Build the final struct. pub fn build(self) -> ActivitySubscription { @@ -954,51 +954,51 @@ pub mod filterable_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Include; - type Push; type List; + 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; type List = Unset; + type Push = Unset; + type Include = Unset; } - ///State transition - sets the `include` field to Set - pub struct SetInclude(PhantomData St>); - impl sealed::Sealed for SetInclude {} - impl State for SetInclude { - type Include = Set; + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData St>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type List = Set; type Push = St::Push; - type List = St::List; + type Include = St::Include; } ///State transition - sets the `push` field to Set pub struct SetPush(PhantomData St>); impl sealed::Sealed for SetPush {} impl State for SetPush { - type Include = St::Include; - type Push = Set; type List = St::List; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData St>); - impl sealed::Sealed for SetList {} - impl State for SetList { + type Push = Set; type Include = St::Include; + } + ///State transition - sets the `include` field to Set + pub struct SetInclude(PhantomData St>); + impl sealed::Sealed for SetInclude {} + impl State for SetInclude { + type List = St::List; type Push = St::Push; - type List = Set; + 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 `list` field pub struct list(()); + ///Marker type for the `push` field + pub struct push(()); + ///Marker type for the `include` field + pub struct include(()); } } @@ -1090,9 +1090,9 @@ where impl FilterablePreferenceBuilder where St: filterable_preference_state::State, - St::Include: filterable_preference_state::IsSet, - St::Push: filterable_preference_state::IsSet, St::List: filterable_preference_state::IsSet, + St::Push: filterable_preference_state::IsSet, + St::Include: filterable_preference_state::IsSet, { /// Build the final struct. pub fn build(self) -> FilterablePreference { @@ -1262,300 +1262,300 @@ pub mod preferences_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type StarterpackJoined; - type SubscribedPost; + type Like; + type Chat; + type Follow; + type Mention; type Repost; type RepostViaRepost; - type LikeViaRepost; + type SubscribedPost; type Unverified; - type Reply; - type Mention; - type Verified; - type Follow; - type Chat; - type Like; type Quote; + type LikeViaRepost; + type Verified; + type Reply; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type StarterpackJoined = Unset; - type SubscribedPost = Unset; + type Like = Unset; + type Chat = Unset; + type Follow = Unset; + type Mention = Unset; type Repost = Unset; type RepostViaRepost = Unset; - type LikeViaRepost = Unset; + type SubscribedPost = Unset; type Unverified = Unset; - type Reply = Unset; - type Mention = Unset; - type Verified = Unset; - type Follow = Unset; - type Chat = Unset; - type Like = Unset; type Quote = Unset; + type LikeViaRepost = Unset; + type Verified = Unset; + type Reply = Unset; } ///State transition - sets the `starterpack_joined` field to Set pub struct SetStarterpackJoined(PhantomData St>); impl sealed::Sealed for SetStarterpackJoined {} impl State for SetStarterpackJoined { type StarterpackJoined = Set; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; + type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; type Verified = St::Verified; - type Follow = St::Follow; + type Reply = St::Reply; + } + ///State transition - sets the `like` field to Set + pub struct SetLike(PhantomData St>); + impl sealed::Sealed for SetLike {} + impl State for SetLike { + type StarterpackJoined = St::StarterpackJoined; + type Like = Set; type Chat = St::Chat; - type Like = St::Like; + type Follow = St::Follow; + type Mention = St::Mention; + type Repost = St::Repost; + type RepostViaRepost = St::RepostViaRepost; + type SubscribedPost = St::SubscribedPost; + type Unverified = St::Unverified; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } - ///State transition - sets the `subscribed_post` field to Set - pub struct SetSubscribedPost(PhantomData St>); - impl sealed::Sealed for SetSubscribedPost {} - impl State for SetSubscribedPost { + ///State transition - sets the `chat` field to Set + pub struct SetChat(PhantomData St>); + impl sealed::Sealed for SetChat {} + impl State for SetChat { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = Set; + type Like = St::Like; + type Chat = Set; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; + type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; type Reply = St::Reply; + } + ///State transition - sets the `follow` field to Set + pub struct SetFollow(PhantomData St>); + impl sealed::Sealed for SetFollow {} + impl State for SetFollow { + type StarterpackJoined = St::StarterpackJoined; + type Like = St::Like; + type Chat = St::Chat; + type Follow = Set; type Mention = St::Mention; + type Repost = St::Repost; + type RepostViaRepost = St::RepostViaRepost; + type SubscribedPost = St::SubscribedPost; + type Unverified = St::Unverified; + type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; + type Reply = St::Reply; + } + ///State transition - sets the `mention` field to Set + pub struct SetMention(PhantomData St>); + impl sealed::Sealed for SetMention {} + impl State for SetMention { + type StarterpackJoined = St::StarterpackJoined; type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = Set; + type Repost = St::Repost; + type RepostViaRepost = St::RepostViaRepost; + type SubscribedPost = St::SubscribedPost; + type Unverified = St::Unverified; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } ///State transition - sets the `repost` field to Set pub struct SetRepost(PhantomData St>); impl sealed::Sealed for SetRepost {} impl State for SetRepost { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = Set; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } ///State transition - sets the `repost_via_repost` field to Set pub struct SetRepostViaRepost(PhantomData St>); impl sealed::Sealed for SetRepostViaRepost {} impl State for SetRepostViaRepost { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = Set; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } - ///State transition - sets the `like_via_repost` field to Set - pub struct SetLikeViaRepost(PhantomData St>); - impl sealed::Sealed for SetLikeViaRepost {} - impl State for SetLikeViaRepost { + ///State transition - sets the `subscribed_post` field to Set + pub struct SetSubscribedPost(PhantomData St>); + impl sealed::Sealed for SetSubscribedPost {} + impl State for SetSubscribedPost { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = Set; + type SubscribedPost = Set; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } ///State transition - sets the `unverified` field to Set pub struct SetUnverified(PhantomData St>); impl sealed::Sealed for SetUnverified {} impl State for SetUnverified { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = Set; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; + type LikeViaRepost = St::LikeViaRepost; + type Verified = St::Verified; + type Reply = St::Reply; } - ///State transition - sets the `reply` field to Set - pub struct SetReply(PhantomData St>); - impl sealed::Sealed for SetReply {} - impl State for SetReply { + ///State transition - sets the `quote` field to Set + pub struct SetQuote(PhantomData St>); + impl sealed::Sealed for SetQuote {} + impl State for SetQuote { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = Set; - type Mention = St::Mention; + type Quote = Set; + type LikeViaRepost = St::LikeViaRepost; type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; - type Quote = St::Quote; + type Reply = St::Reply; } - ///State transition - sets the `mention` field to Set - pub struct SetMention(PhantomData St>); - impl sealed::Sealed for SetMention {} - impl State for SetMention { + ///State transition - sets the `like_via_repost` field to Set + pub struct SetLikeViaRepost(PhantomData St>); + impl sealed::Sealed for SetLikeViaRepost {} + impl State for SetLikeViaRepost { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = Set; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; + type LikeViaRepost = Set; + type Verified = St::Verified; + type Reply = St::Reply; } ///State transition - sets the `verified` field to Set pub struct SetVerified(PhantomData St>); impl sealed::Sealed for SetVerified {} impl State for SetVerified { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; - type Repost = St::Repost; - type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; - type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = Set; - type Follow = St::Follow; - type Chat = St::Chat; type Like = St::Like; - type Quote = St::Quote; - } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData St>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { - type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = Set; - type Chat = St::Chat; - type Like = St::Like; type Quote = St::Quote; - } - ///State transition - sets the `chat` field to Set - pub struct SetChat(PhantomData St>); - impl sealed::Sealed for SetChat {} - impl State for SetChat { - type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; - type Repost = St::Repost; - type RepostViaRepost = St::RepostViaRepost; type LikeViaRepost = St::LikeViaRepost; - type Unverified = St::Unverified; + type Verified = Set; type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = Set; - type Like = St::Like; - type Quote = St::Quote; } - ///State transition - sets the `like` field to Set - pub struct SetLike(PhantomData St>); - impl sealed::Sealed for SetLike {} - impl State for SetLike { + ///State transition - sets the `reply` field to Set + pub struct SetReply(PhantomData St>); + impl sealed::Sealed for SetReply {} + impl State for SetReply { type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; + type Like = St::Like; + type Chat = St::Chat; + type Follow = St::Follow; + type Mention = St::Mention; type Repost = St::Repost; type RepostViaRepost = St::RepostViaRepost; - type LikeViaRepost = St::LikeViaRepost; + type SubscribedPost = St::SubscribedPost; type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; - type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = Set; type Quote = St::Quote; - } - ///State transition - sets the `quote` field to Set - pub struct SetQuote(PhantomData St>); - impl sealed::Sealed for SetQuote {} - impl State for SetQuote { - type StarterpackJoined = St::StarterpackJoined; - type SubscribedPost = St::SubscribedPost; - type Repost = St::Repost; - type RepostViaRepost = St::RepostViaRepost; type LikeViaRepost = St::LikeViaRepost; - type Unverified = St::Unverified; - type Reply = St::Reply; - type Mention = St::Mention; type Verified = St::Verified; - type Follow = St::Follow; - type Chat = St::Chat; - type Like = St::Like; - type Quote = Set; + type Reply = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `starterpack_joined` field pub struct starterpack_joined(()); - ///Marker type for the `subscribed_post` field - pub struct subscribed_post(()); + ///Marker type for the `like` field + pub struct like(()); + ///Marker type for the `chat` field + pub struct chat(()); + ///Marker type for the `follow` field + pub struct follow(()); + ///Marker type for the `mention` field + pub struct mention(()); ///Marker type for the `repost` field pub struct repost(()); ///Marker type for the `repost_via_repost` field pub struct repost_via_repost(()); - ///Marker type for the `like_via_repost` field - pub struct like_via_repost(()); + ///Marker type for the `subscribed_post` field + pub struct subscribed_post(()); ///Marker type for the `unverified` field pub struct unverified(()); - ///Marker type for the `reply` field - pub struct reply(()); - ///Marker type for the `mention` field - pub struct mention(()); - ///Marker type for the `verified` field - pub struct verified(()); - ///Marker type for the `follow` field - pub struct follow(()); - ///Marker type for the `chat` field - pub struct chat(()); - ///Marker type for the `like` field - pub struct like(()); ///Marker type for the `quote` field pub struct quote(()); + ///Marker type for the `like_via_repost` field + pub struct like_via_repost(()); + ///Marker type for the `verified` field + pub struct verified(()); + ///Marker type for the `reply` field + pub struct reply(()); } } @@ -1863,18 +1863,18 @@ impl PreferencesBuilder where St: preferences_state::State, St::StarterpackJoined: preferences_state::IsSet, - St::SubscribedPost: preferences_state::IsSet, + St::Like: preferences_state::IsSet, + St::Chat: preferences_state::IsSet, + St::Follow: preferences_state::IsSet, + St::Mention: preferences_state::IsSet, St::Repost: preferences_state::IsSet, St::RepostViaRepost: preferences_state::IsSet, - St::LikeViaRepost: preferences_state::IsSet, + St::SubscribedPost: preferences_state::IsSet, St::Unverified: preferences_state::IsSet, - St::Reply: preferences_state::IsSet, - St::Mention: preferences_state::IsSet, - St::Verified: preferences_state::IsSet, - St::Follow: preferences_state::IsSet, - St::Chat: preferences_state::IsSet, - St::Like: preferences_state::IsSet, St::Quote: preferences_state::IsSet, + St::LikeViaRepost: preferences_state::IsSet, + St::Verified: preferences_state::IsSet, + St::Reply: preferences_state::IsSet, { /// Build the final struct. pub fn build(self) -> Preferences { diff --git a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs index 3bc313b65..985a3005c 100644 --- a/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/jacquard-api/src/app_bsky/notification/list_notifications.rs @@ -383,127 +383,127 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type Cid; + type IndexedAt; type Uri; - type Author; + type Reason; type Record; type IsRead; - type Reason; + type Author; } /// 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 IndexedAt = Unset; type Uri = Unset; - type Author = Unset; + type Reason = Unset; type Record = Unset; type IsRead = Unset; - type Reason = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Cid = St::Cid; - type Uri = St::Uri; - type Author = St::Author; - type Record = St::Record; - type IsRead = St::IsRead; - type Reason = St::Reason; + type Author = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type IndexedAt = St::IndexedAt; type Cid = Set; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = St::Author; + type Reason = St::Reason; type Record = St::Record; type IsRead = St::IsRead; + type Author = St::Author; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Cid = St::Cid; + type IndexedAt = Set; + type Uri = St::Uri; type Reason = St::Reason; + type Record = St::Record; + type IsRead = St::IsRead; + type Author = St::Author; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type IndexedAt = St::IndexedAt; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = Set; - type Author = St::Author; + type Reason = St::Reason; type Record = St::Record; type IsRead = St::IsRead; - type Reason = St::Reason; + type Author = St::Author; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type IndexedAt = St::IndexedAt; + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = Set; + type Reason = Set; type Record = St::Record; type IsRead = St::IsRead; - type Reason = St::Reason; + type Author = St::Author; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type IndexedAt = St::IndexedAt; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = St::Author; + type Reason = St::Reason; type Record = Set; type IsRead = St::IsRead; - type Reason = St::Reason; + type Author = St::Author; } ///State transition - sets the `is_read` field to Set pub struct SetIsRead(PhantomData St>); impl sealed::Sealed for SetIsRead {} impl State for SetIsRead { - type IndexedAt = St::IndexedAt; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = St::Author; + type Reason = St::Reason; type Record = St::Record; type IsRead = Set; - type Reason = St::Reason; + type Author = St::Author; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type IndexedAt = St::IndexedAt; + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Author = St::Author; + type Reason = St::Reason; type Record = St::Record; type IsRead = St::IsRead; - type Reason = Set; + type Author = 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 `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `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 `author` field + pub struct author(()); } } @@ -704,13 +704,13 @@ where impl NotificationBuilder where St: notification_state::State, - St::IndexedAt: notification_state::IsSet, St::Cid: notification_state::IsSet, + St::IndexedAt: notification_state::IsSet, St::Uri: notification_state::IsSet, - St::Author: notification_state::IsSet, + St::Reason: notification_state::IsSet, St::Record: notification_state::IsSet, St::IsRead: notification_state::IsSet, - St::Reason: notification_state::IsSet, + St::Author: notification_state::IsSet, { /// Build the final struct. pub fn build(self) -> Notification { diff --git a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs index c1fe54900..172ee7a9a 100644 --- a/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs +++ b/crates/jacquard-api/src/app_bsky/notification/put_activity_subscription.rs @@ -76,37 +76,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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type ActivitySubscription = St::ActivitySubscription; + type Subject = Unset; } ///State transition - sets the `activity_subscription` field to Set pub struct SetActivitySubscription(PhantomData St>); impl sealed::Sealed for SetActivitySubscription {} impl State for SetActivitySubscription { - type Subject = St::Subject; type ActivitySubscription = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type ActivitySubscription = St::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(()); } } @@ -190,8 +190,8 @@ where impl PutActivitySubscriptionBuilder where St: put_activity_subscription_state::State, - St::Subject: put_activity_subscription_state::IsSet, St::ActivitySubscription: put_activity_subscription_state::IsSet, + St::Subject: put_activity_subscription_state::IsSet, { /// Build the final struct. pub fn build(self) -> PutActivitySubscription { diff --git a/crates/jacquard-api/src/app_bsky/notification/register_push.rs b/crates/jacquard-api/src/app_bsky/notification/register_push.rs index 2fc505053..7e74e64ff 100644 --- a/crates/jacquard-api/src/app_bsky/notification/register_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/register_push.rs @@ -154,66 +154,66 @@ pub mod register_push_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Platform; + type Token; type ServiceDid; type AppId; - type Token; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Platform = Unset; + type Token = Unset; type ServiceDid = Unset; type AppId = Unset; - type Token = Unset; } ///State transition - sets the `platform` field to Set pub struct SetPlatform(PhantomData St>); impl sealed::Sealed for SetPlatform {} impl State for SetPlatform { type Platform = Set; + type Token = St::Token; + type ServiceDid = St::ServiceDid; + type AppId = St::AppId; + } + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData St>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Platform = St::Platform; + type Token = Set; type ServiceDid = St::ServiceDid; type AppId = St::AppId; - type Token = St::Token; } ///State transition - sets the `service_did` field to Set pub struct SetServiceDid(PhantomData St>); impl sealed::Sealed for SetServiceDid {} impl State for SetServiceDid { type Platform = St::Platform; + type Token = St::Token; type ServiceDid = Set; type AppId = St::AppId; - type Token = St::Token; } ///State transition - sets the `app_id` field to Set pub struct SetAppId(PhantomData St>); impl sealed::Sealed for SetAppId {} impl State for SetAppId { type Platform = St::Platform; - type ServiceDid = St::ServiceDid; - type AppId = Set; type Token = St::Token; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData St>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { - type Platform = St::Platform; type ServiceDid = St::ServiceDid; - type AppId = St::AppId; - type Token = Set; + type AppId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `platform` field pub struct platform(()); + ///Marker type for the `token` field + pub struct token(()); ///Marker type for the `service_did` field pub struct service_did(()); ///Marker type for the `app_id` field pub struct app_id(()); - ///Marker type for the `token` field - pub struct token(()); } } @@ -341,9 +341,9 @@ impl RegisterPushBuilder where St: register_push_state::State, St::Platform: register_push_state::IsSet, + St::Token: register_push_state::IsSet, St::ServiceDid: register_push_state::IsSet, St::AppId: register_push_state::IsSet, - St::Token: register_push_state::IsSet, { /// Build the final struct. pub fn build(self) -> RegisterPush { diff --git a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs index 812d02e0d..c7e18f9b9 100644 --- a/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs +++ b/crates/jacquard-api/src/app_bsky/notification/unregister_push.rs @@ -150,8 +150,8 @@ pub mod unregister_push_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AppId; type Platform; + type AppId; type ServiceDid; type Token; } @@ -159,26 +159,26 @@ pub mod unregister_push_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AppId = Unset; type Platform = Unset; + type AppId = Unset; type ServiceDid = Unset; type Token = Unset; } - ///State transition - sets the `app_id` field to Set - pub struct SetAppId(PhantomData St>); - impl sealed::Sealed for SetAppId {} - impl State for SetAppId { - type AppId = Set; - type Platform = St::Platform; - type ServiceDid = St::ServiceDid; - type Token = St::Token; - } ///State transition - sets the `platform` field to Set pub struct SetPlatform(PhantomData St>); impl sealed::Sealed for SetPlatform {} impl State for SetPlatform { - type AppId = St::AppId; type Platform = Set; + type AppId = St::AppId; + type ServiceDid = St::ServiceDid; + type Token = St::Token; + } + ///State transition - sets the `app_id` field to Set + pub struct SetAppId(PhantomData St>); + impl sealed::Sealed for SetAppId {} + impl State for SetAppId { + type Platform = St::Platform; + type AppId = Set; type ServiceDid = St::ServiceDid; type Token = St::Token; } @@ -186,8 +186,8 @@ pub mod unregister_push_state { pub struct SetServiceDid(PhantomData St>); impl sealed::Sealed for SetServiceDid {} impl State for SetServiceDid { - type AppId = St::AppId; type Platform = St::Platform; + type AppId = St::AppId; type ServiceDid = Set; type Token = St::Token; } @@ -195,18 +195,18 @@ pub mod unregister_push_state { pub struct SetToken(PhantomData St>); impl sealed::Sealed for SetToken {} impl State for SetToken { - type AppId = St::AppId; type Platform = St::Platform; + type AppId = St::AppId; type ServiceDid = St::ServiceDid; type Token = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `app_id` field - pub struct app_id(()); ///Marker type for the `platform` field pub struct platform(()); + ///Marker type for the `app_id` field + pub struct app_id(()); ///Marker type for the `service_did` field pub struct service_did(()); ///Marker type for the `token` field @@ -318,8 +318,8 @@ where impl UnregisterPushBuilder where St: unregister_push_state::State, - St::AppId: unregister_push_state::IsSet, St::Platform: unregister_push_state::IsSet, + St::AppId: unregister_push_state::IsSet, St::ServiceDid: unregister_push_state::IsSet, St::Token: unregister_push_state::IsSet, { diff --git a/crates/jacquard-api/src/app_bsky/richtext/facet.rs b/crates/jacquard-api/src/app_bsky/richtext/facet.rs index fe3a7172c..b1f6a1342 100644 --- a/crates/jacquard-api/src/app_bsky/richtext/facet.rs +++ b/crates/jacquard-api/src/app_bsky/richtext/facet.rs @@ -616,37 +616,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 St>); - impl sealed::Sealed for SetFeatures {} - impl State for SetFeatures { - type Features = Set; - type Index = St::Index; + type Features = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData St>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Features = St::Features; type Index = Set; + type Features = St::Features; + } + ///State transition - sets the `features` field to Set + pub struct SetFeatures(PhantomData St>); + impl sealed::Sealed for SetFeatures {} + impl State for SetFeatures { + type Index = St::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(()); } } @@ -716,8 +716,8 @@ where impl FacetBuilder where St: facet_state::State, - St::Features: facet_state::IsSet, St::Index: facet_state::IsSet, + St::Features: facet_state::IsSet, { /// Build the final struct. pub fn build(self) -> Facet { diff --git a/crates/jacquard-api/src/app_bsky/unspecced.rs b/crates/jacquard-api/src/app_bsky/unspecced.rs index 262438c42..4d1eef35e 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced.rs @@ -730,51 +730,51 @@ pub mod age_assurance_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Status; type AttemptId; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Status = Unset; type AttemptId = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Status = St::Status; - type AttemptId = St::AttemptId; + type CreatedAt = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CreatedAt = St::CreatedAt; type Status = Set; type AttemptId = St::AttemptId; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData St>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type CreatedAt = St::CreatedAt; type Status = St::Status; type AttemptId = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Status = St::Status; + type AttemptId = St::AttemptId; + 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 `status` field pub struct status(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -937,9 +937,9 @@ where impl AgeAssuranceEventBuilder where St: age_assurance_event_state::State, - St::CreatedAt: age_assurance_event_state::IsSet, St::Status: age_assurance_event_state::IsSet, St::AttemptId: age_assurance_event_state::IsSet, + St::CreatedAt: age_assurance_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> AgeAssuranceEvent { @@ -1781,105 +1781,105 @@ pub mod skeleton_trend_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type StartedAt; - type PostCount; - type Topic; - type DisplayName; type Link; + type Topic; + type PostCount; type Dids; + type StartedAt; + type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type StartedAt = Unset; - type PostCount = Unset; - type Topic = Unset; - type DisplayName = Unset; type Link = Unset; + type Topic = Unset; + type PostCount = Unset; type Dids = Unset; + type StartedAt = Unset; + type DisplayName = Unset; } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData St>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type StartedAt = Set; - type PostCount = St::PostCount; + ///State transition - sets the `link` field to Set + pub struct SetLink(PhantomData St>); + impl sealed::Sealed for SetLink {} + impl State for SetLink { + type Link = Set; type Topic = St::Topic; - type DisplayName = St::DisplayName; - type Link = St::Link; + type PostCount = St::PostCount; type Dids = St::Dids; - } - ///State transition - sets the `post_count` field to Set - pub struct SetPostCount(PhantomData St>); - impl sealed::Sealed for SetPostCount {} - impl State for SetPostCount { type StartedAt = St::StartedAt; - type PostCount = Set; - type Topic = St::Topic; type DisplayName = St::DisplayName; - type Link = St::Link; - type Dids = St::Dids; } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData St>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { - type StartedAt = St::StartedAt; - type PostCount = St::PostCount; - type Topic = Set; - type DisplayName = St::DisplayName; type Link = St::Link; + type Topic = Set; + type PostCount = St::PostCount; type Dids = St::Dids; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData St>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { type StartedAt = St::StartedAt; - type PostCount = St::PostCount; - type Topic = St::Topic; - type DisplayName = Set; + type DisplayName = St::DisplayName; + } + ///State transition - sets the `post_count` field to Set + pub struct SetPostCount(PhantomData St>); + impl sealed::Sealed for SetPostCount {} + impl State for SetPostCount { type Link = St::Link; + type Topic = St::Topic; + type PostCount = Set; type Dids = St::Dids; - } - ///State transition - sets the `link` field to Set - pub struct SetLink(PhantomData St>); - impl sealed::Sealed for SetLink {} - impl State for SetLink { type StartedAt = St::StartedAt; - type PostCount = St::PostCount; - type Topic = St::Topic; type DisplayName = St::DisplayName; - type Link = Set; - type Dids = St::Dids; } ///State transition - sets the `dids` field to Set pub struct SetDids(PhantomData St>); impl sealed::Sealed for SetDids {} impl State for SetDids { - type StartedAt = St::StartedAt; + type Link = St::Link; + type Topic = St::Topic; type PostCount = St::PostCount; + type Dids = Set; + type StartedAt = St::StartedAt; + type DisplayName = St::DisplayName; + } + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData St>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type Link = St::Link; type Topic = St::Topic; + type PostCount = St::PostCount; + type Dids = St::Dids; + type StartedAt = Set; type DisplayName = St::DisplayName; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData St>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { type Link = St::Link; - type Dids = Set; + type Topic = St::Topic; + type PostCount = St::PostCount; + type Dids = St::Dids; + type StartedAt = St::StartedAt; + type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `started_at` field - pub struct started_at(()); - ///Marker type for the `post_count` field - pub struct post_count(()); - ///Marker type for the `topic` field - pub struct topic(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `link` field pub struct link(()); + ///Marker type for the `topic` field + pub struct topic(()); + ///Marker type for the `post_count` field + pub struct post_count(()); ///Marker type for the `dids` field pub struct dids(()); + ///Marker type for the `started_at` field + pub struct started_at(()); + ///Marker type for the `display_name` field + pub struct display_name(()); } } @@ -2060,12 +2060,12 @@ where impl SkeletonTrendBuilder where St: skeleton_trend_state::State, - St::StartedAt: skeleton_trend_state::IsSet, - St::PostCount: skeleton_trend_state::IsSet, - St::Topic: skeleton_trend_state::IsSet, - St::DisplayName: skeleton_trend_state::IsSet, St::Link: skeleton_trend_state::IsSet, + St::Topic: skeleton_trend_state::IsSet, + St::PostCount: skeleton_trend_state::IsSet, St::Dids: skeleton_trend_state::IsSet, + St::StartedAt: skeleton_trend_state::IsSet, + St::DisplayName: skeleton_trend_state::IsSet, { /// Build the final struct. pub fn build(self) -> SkeletonTrend { @@ -2211,104 +2211,104 @@ pub mod thread_item_post_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type MoreParents; - type MoreReplies; - type OpThread; - type MutedByViewer; type HiddenByThreadgate; type Post; + type OpThread; + type MoreReplies; + type MutedByViewer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type MoreParents = Unset; - type MoreReplies = Unset; - type OpThread = Unset; - type MutedByViewer = Unset; type HiddenByThreadgate = Unset; type Post = Unset; + type OpThread = Unset; + type MoreReplies = Unset; + type MutedByViewer = Unset; } ///State transition - sets the `more_parents` field to Set pub struct SetMoreParents(PhantomData St>); impl sealed::Sealed for SetMoreParents {} impl State for SetMoreParents { type MoreParents = Set; - type MoreReplies = St::MoreReplies; - type OpThread = St::OpThread; - type MutedByViewer = St::MutedByViewer; type HiddenByThreadgate = St::HiddenByThreadgate; type Post = St::Post; + type OpThread = St::OpThread; + type MoreReplies = St::MoreReplies; + type MutedByViewer = St::MutedByViewer; } - ///State transition - sets the `more_replies` field to Set - pub struct SetMoreReplies(PhantomData St>); - impl sealed::Sealed for SetMoreReplies {} - impl State for SetMoreReplies { + ///State transition - sets the `hidden_by_threadgate` field to Set + pub struct SetHiddenByThreadgate(PhantomData St>); + impl sealed::Sealed for SetHiddenByThreadgate {} + impl State for SetHiddenByThreadgate { type MoreParents = St::MoreParents; - type MoreReplies = Set; + type HiddenByThreadgate = Set; + type Post = St::Post; type OpThread = St::OpThread; + type MoreReplies = St::MoreReplies; type MutedByViewer = St::MutedByViewer; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData St>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type MoreParents = St::MoreParents; type HiddenByThreadgate = St::HiddenByThreadgate; - type Post = St::Post; + type Post = Set; + type OpThread = St::OpThread; + type MoreReplies = St::MoreReplies; + type MutedByViewer = St::MutedByViewer; } ///State transition - sets the `op_thread` field to Set pub struct SetOpThread(PhantomData St>); impl sealed::Sealed for SetOpThread {} impl State for SetOpThread { type MoreParents = St::MoreParents; - type MoreReplies = St::MoreReplies; + type HiddenByThreadgate = St::HiddenByThreadgate; + type Post = St::Post; type OpThread = Set; + type MoreReplies = St::MoreReplies; type MutedByViewer = St::MutedByViewer; + } + ///State transition - sets the `more_replies` field to Set + pub struct SetMoreReplies(PhantomData St>); + impl sealed::Sealed for SetMoreReplies {} + impl State for SetMoreReplies { + type MoreParents = St::MoreParents; type HiddenByThreadgate = St::HiddenByThreadgate; type Post = St::Post; + type OpThread = St::OpThread; + type MoreReplies = Set; + type MutedByViewer = St::MutedByViewer; } ///State transition - sets the `muted_by_viewer` field to Set pub struct SetMutedByViewer(PhantomData St>); impl sealed::Sealed for SetMutedByViewer {} impl State for SetMutedByViewer { type MoreParents = St::MoreParents; - type MoreReplies = St::MoreReplies; - type OpThread = St::OpThread; - type MutedByViewer = Set; type HiddenByThreadgate = St::HiddenByThreadgate; type Post = St::Post; - } - ///State transition - sets the `hidden_by_threadgate` field to Set - pub struct SetHiddenByThreadgate(PhantomData St>); - impl sealed::Sealed for SetHiddenByThreadgate {} - impl State for SetHiddenByThreadgate { - type MoreParents = St::MoreParents; - type MoreReplies = St::MoreReplies; type OpThread = St::OpThread; - type MutedByViewer = St::MutedByViewer; - type HiddenByThreadgate = Set; - type Post = St::Post; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData St>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type MoreParents = St::MoreParents; type MoreReplies = St::MoreReplies; - type OpThread = St::OpThread; - type MutedByViewer = St::MutedByViewer; - type HiddenByThreadgate = St::HiddenByThreadgate; - type Post = Set; + type MutedByViewer = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///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 `muted_by_viewer` field - pub struct muted_by_viewer(()); ///Marker type for the `hidden_by_threadgate` field pub struct hidden_by_threadgate(()); ///Marker type for the `post` field pub struct post(()); + ///Marker type for the `op_thread` field + pub struct op_thread(()); + ///Marker type for the `more_replies` field + pub struct more_replies(()); + ///Marker type for the `muted_by_viewer` field + pub struct muted_by_viewer(()); } } @@ -2462,11 +2462,11 @@ impl ThreadItemPostBuilder where St: thread_item_post_state::State, St::MoreParents: thread_item_post_state::IsSet, - St::MoreReplies: thread_item_post_state::IsSet, - St::OpThread: thread_item_post_state::IsSet, - St::MutedByViewer: thread_item_post_state::IsSet, St::HiddenByThreadgate: thread_item_post_state::IsSet, St::Post: thread_item_post_state::IsSet, + St::OpThread: thread_item_post_state::IsSet, + St::MoreReplies: thread_item_post_state::IsSet, + St::MutedByViewer: thread_item_post_state::IsSet, { /// Build the final struct. pub fn build(self) -> ThreadItemPost { @@ -2507,105 +2507,105 @@ pub mod trend_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PostCount; - type Topic; type StartedAt; - type DisplayName; type Actors; type Link; + type Topic; + type DisplayName; + type PostCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PostCount = Unset; - type Topic = Unset; type StartedAt = Unset; - type DisplayName = Unset; type Actors = Unset; type Link = Unset; + type Topic = Unset; + type DisplayName = Unset; + type PostCount = Unset; } - ///State transition - sets the `post_count` field to Set - pub struct SetPostCount(PhantomData St>); - impl sealed::Sealed for SetPostCount {} - impl State for SetPostCount { - type PostCount = Set; + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData St>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type StartedAt = Set; + type Actors = St::Actors; + type Link = St::Link; type Topic = St::Topic; + type DisplayName = St::DisplayName; + type PostCount = St::PostCount; + } + ///State transition - sets the `actors` field to Set + pub struct SetActors(PhantomData St>); + impl sealed::Sealed for SetActors {} + impl State for SetActors { type StartedAt = St::StartedAt; + type Actors = Set; + type Link = St::Link; + type Topic = St::Topic; type DisplayName = St::DisplayName; + type PostCount = St::PostCount; + } + ///State transition - sets the `link` field to Set + pub struct SetLink(PhantomData St>); + impl sealed::Sealed for SetLink {} + impl State for SetLink { + type StartedAt = St::StartedAt; type Actors = St::Actors; - type Link = St::Link; + type Link = Set; + type Topic = St::Topic; + type DisplayName = St::DisplayName; + type PostCount = St::PostCount; } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData St>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { - type PostCount = St::PostCount; - type Topic = Set; type StartedAt = St::StartedAt; - type DisplayName = St::DisplayName; type Actors = St::Actors; type Link = St::Link; - } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData St>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type PostCount = St::PostCount; - type Topic = St::Topic; - type StartedAt = Set; + type Topic = Set; type DisplayName = St::DisplayName; - type Actors = St::Actors; - type Link = St::Link; + type PostCount = St::PostCount; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type PostCount = St::PostCount; - type Topic = St::Topic; type StartedAt = St::StartedAt; - type DisplayName = Set; type Actors = St::Actors; type Link = St::Link; - } - ///State transition - sets the `actors` field to Set - pub struct SetActors(PhantomData St>); - impl sealed::Sealed for SetActors {} - impl State for SetActors { - type PostCount = St::PostCount; type Topic = St::Topic; + type DisplayName = Set; + type PostCount = St::PostCount; + } + ///State transition - sets the `post_count` field to Set + pub struct SetPostCount(PhantomData St>); + impl sealed::Sealed for SetPostCount {} + impl State for SetPostCount { type StartedAt = St::StartedAt; - type DisplayName = St::DisplayName; - type Actors = Set; + type Actors = St::Actors; type Link = St::Link; - } - ///State transition - sets the `link` field to Set - pub struct SetLink(PhantomData St>); - impl sealed::Sealed for SetLink {} - impl State for SetLink { - type PostCount = St::PostCount; type Topic = St::Topic; - type StartedAt = St::StartedAt; type DisplayName = St::DisplayName; - type Actors = St::Actors; - type Link = Set; + type PostCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `post_count` field - pub struct post_count(()); - ///Marker type for the `topic` field - pub struct topic(()); ///Marker type for the `started_at` field pub struct started_at(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `actors` field pub struct actors(()); ///Marker type for the `link` field pub struct link(()); + ///Marker type for the `topic` field + pub struct topic(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `post_count` field + pub struct post_count(()); } } @@ -2786,12 +2786,12 @@ where impl TrendViewBuilder where St: trend_view_state::State, - St::PostCount: trend_view_state::IsSet, - St::Topic: trend_view_state::IsSet, St::StartedAt: trend_view_state::IsSet, - St::DisplayName: trend_view_state::IsSet, St::Actors: trend_view_state::IsSet, St::Link: trend_view_state::IsSet, + St::Topic: trend_view_state::IsSet, + St::DisplayName: trend_view_state::IsSet, + St::PostCount: trend_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TrendView { diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index 94cf329e3..2ab47c35d 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -199,51 +199,51 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type Depth; type Uri; + type Depth; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; - type Depth = Unset; type Uri = Unset; + type Depth = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Depth = St::Depth; - type Uri = St::Uri; + type Value = St::Value; } ///State transition - sets the `depth` field to Set pub struct SetDepth(PhantomData St>); impl sealed::Sealed for SetDepth {} impl State for SetDepth { - type Value = St::Value; - type Depth = Set; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Depth = Set; type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Uri = St::Uri; type Depth = St::Depth; - type Uri = Set; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); - ///Marker type for the `depth` field - pub struct depth(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `depth` field + pub struct depth(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -332,9 +332,9 @@ where impl ThreadItemBuilder where St: thread_item_state::State, - St::Value: thread_item_state::IsSet, - St::Depth: thread_item_state::IsSet, St::Uri: thread_item_state::IsSet, + St::Depth: thread_item_state::IsSet, + St::Value: thread_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> ThreadItem { diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs index 92118c92d..36aaadb15 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_post_thread_v2.rs @@ -304,51 +304,51 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Depth; type Uri; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; type Depth = Unset; type Uri = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Depth = St::Depth; - type Uri = St::Uri; + type Value = Unset; } ///State transition - sets the `depth` field to Set pub struct SetDepth(PhantomData St>); impl sealed::Sealed for SetDepth {} impl State for SetDepth { - type Value = St::Value; type Depth = Set; type Uri = St::Uri; + type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Value = St::Value; type Depth = St::Depth; type Uri = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Depth = St::Depth; + type Uri = St::Uri; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `depth` field pub struct depth(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -437,9 +437,9 @@ where impl ThreadItemBuilder where St: thread_item_state::State, - St::Value: thread_item_state::IsSet, St::Depth: thread_item_state::IsSet, St::Uri: thread_item_state::IsSet, + St::Value: thread_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> ThreadItem { diff --git a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs index 78a64ed38..5a8c2327b 100644 --- a/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs +++ b/crates/jacquard-api/src/app_bsky/unspecced/get_tagged_suggestions.rs @@ -178,51 +178,51 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Tag; - type SubjectType; type Subject; + type SubjectType; + 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 SubjectType = Unset; type Subject = Unset; + type SubjectType = Unset; + type Tag = Unset; } - ///State transition - sets the `tag` field to Set - pub struct SetTag(PhantomData St>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type Tag = Set; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; type SubjectType = St::SubjectType; - type Subject = St::Subject; + type Tag = St::Tag; } ///State transition - sets the `subject_type` field to Set pub struct SetSubjectType(PhantomData St>); impl sealed::Sealed for SetSubjectType {} impl State for SetSubjectType { - type Tag = St::Tag; - type SubjectType = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + type SubjectType = Set; type Tag = St::Tag; + } + ///State transition - sets the `tag` field to Set + pub struct SetTag(PhantomData St>); + impl sealed::Sealed for SetTag {} + impl State for SetTag { + type Subject = St::Subject; type SubjectType = St::SubjectType; - type Subject = Set; + type Tag = 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 `subject` field pub struct subject(()); + ///Marker type for the `subject_type` field + pub struct subject_type(()); + ///Marker type for the `tag` field + pub struct tag(()); } } @@ -311,9 +311,9 @@ where impl SuggestionBuilder where St: suggestion_state::State, - St::Tag: suggestion_state::IsSet, - St::SubjectType: suggestion_state::IsSet, St::Subject: suggestion_state::IsSet, + St::SubjectType: suggestion_state::IsSet, + St::Tag: suggestion_state::IsSet, { /// Build the final struct. pub fn build(self) -> Suggestion { diff --git a/crates/jacquard-api/src/app_bsky/video.rs b/crates/jacquard-api/src/app_bsky/video.rs index 3ce747e8c..ddd6edb50 100644 --- a/crates/jacquard-api/src/app_bsky/video.rs +++ b/crates/jacquard-api/src/app_bsky/video.rs @@ -173,51 +173,51 @@ pub mod job_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type JobId; 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 JobId = Unset; type Did = Unset; type State = Unset; - type JobId = Unset; + } + ///State transition - sets the `job_id` field to Set + pub struct SetJobId(PhantomData St>); + impl sealed::Sealed for SetJobId {} + impl State for SetJobId { + type JobId = Set; + type Did = St::Did; + type State = St::State; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type JobId = St::JobId; type Did = Set; type State = St::State; - type JobId = St::JobId; } ///State transition - sets the `state` field to Set pub struct SetState(PhantomData St>); impl sealed::Sealed for SetState {} impl State for SetState { - type Did = St::Did; - type State = Set; type JobId = St::JobId; - } - ///State transition - sets the `job_id` field to Set - pub struct SetJobId(PhantomData St>); - impl sealed::Sealed for SetJobId {} - impl State for SetJobId { type Did = St::Did; - type State = St::State; - type JobId = Set; + type State = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `job_id` field + pub struct job_id(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `state` field pub struct state(()); - ///Marker type for the `job_id` field - pub struct job_id(()); } } @@ -366,9 +366,9 @@ where impl JobStatusBuilder where St: job_status_state::State, + St::JobId: job_status_state::IsSet, St::Did: job_status_state::IsSet, St::State: job_status_state::IsSet, - St::JobId: job_status_state::IsSet, { /// Build the final struct. pub fn build(self) -> JobStatus { diff --git a/crates/jacquard-api/src/app_certified/badge/award.rs b/crates/jacquard-api/src/app_certified/badge/award.rs index b113dd2fd..4027b11ba 100644 --- a/crates/jacquard-api/src/app_certified/badge/award.rs +++ b/crates/jacquard-api/src/app_certified/badge/award.rs @@ -157,50 +157,50 @@ pub mod award_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Subject; type Badge; + type Subject; } /// 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; type Badge = Unset; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Subject = St::Subject; - type Badge = St::Badge; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type CreatedAt = St::CreatedAt; - type Subject = Set; type Badge = St::Badge; + type Subject = St::Subject; } ///State transition - sets the `badge` field to Set pub struct SetBadge(PhantomData St>); impl sealed::Sealed for SetBadge {} impl State for SetBadge { type CreatedAt = St::CreatedAt; - type Subject = St::Subject; type Badge = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::CreatedAt; + type Badge = St::Badge; + 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 `subject` field - pub struct subject(()); ///Marker type for the `badge` field pub struct badge(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -322,8 +322,8 @@ impl AwardBuilder where St: award_state::State, St::CreatedAt: award_state::IsSet, - St::Subject: award_state::IsSet, St::Badge: award_state::IsSet, + St::Subject: award_state::IsSet, { /// Build the final struct. pub fn build(self) -> Award { diff --git a/crates/jacquard-api/src/app_certified/badge/definition.rs b/crates/jacquard-api/src/app_certified/badge/definition.rs index 5ae63d3f8..118607004 100644 --- a/crates/jacquard-api/src/app_certified/badge/definition.rs +++ b/crates/jacquard-api/src/app_certified/badge/definition.rs @@ -230,8 +230,8 @@ pub mod definition_state { pub trait State: sealed::Sealed { type BadgeType; type Title; - type Icon; type CreatedAt; + type Icon; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -239,8 +239,8 @@ pub mod definition_state { impl State for Empty { type BadgeType = Unset; type Title = Unset; - type Icon = Unset; type CreatedAt = Unset; + type Icon = Unset; } ///State transition - sets the `badge_type` field to Set pub struct SetBadgeType(PhantomData St>); @@ -248,8 +248,8 @@ pub mod definition_state { impl State for SetBadgeType { type BadgeType = Set; type Title = St::Title; - type Icon = St::Icon; type CreatedAt = St::CreatedAt; + type Icon = St::Icon; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); @@ -257,17 +257,8 @@ pub mod definition_state { impl State for SetTitle { type BadgeType = St::BadgeType; type Title = Set; - type Icon = St::Icon; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `icon` field to Set - pub struct SetIcon(PhantomData St>); - impl sealed::Sealed for SetIcon {} - impl State for SetIcon { - type BadgeType = St::BadgeType; - type Title = St::Title; - type Icon = Set; type CreatedAt = St::CreatedAt; + type Icon = St::Icon; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); @@ -275,8 +266,17 @@ pub mod definition_state { impl State for SetCreatedAt { type BadgeType = St::BadgeType; type Title = St::Title; - type Icon = St::Icon; type CreatedAt = Set; + type Icon = St::Icon; + } + ///State transition - sets the `icon` field to Set + pub struct SetIcon(PhantomData St>); + impl sealed::Sealed for SetIcon {} + impl State for SetIcon { + type BadgeType = St::BadgeType; + type Title = St::Title; + type CreatedAt = St::CreatedAt; + type Icon = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -285,10 +285,10 @@ pub mod definition_state { pub struct badge_type(()); ///Marker type for the `title` field pub struct title(()); - ///Marker type for the `icon` field - pub struct icon(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `icon` field + pub struct icon(()); } } @@ -431,8 +431,8 @@ where St: definition_state::State, St::BadgeType: definition_state::IsSet, St::Title: definition_state::IsSet, - St::Icon: definition_state::IsSet, St::CreatedAt: definition_state::IsSet, + St::Icon: definition_state::IsSet, { /// Build the final struct. pub fn build(self) -> Definition { diff --git a/crates/jacquard-api/src/app_certified/badge/response.rs b/crates/jacquard-api/src/app_certified/badge/response.rs index 047a4e7df..a02b131c3 100644 --- a/crates/jacquard-api/src/app_certified/badge/response.rs +++ b/crates/jacquard-api/src/app_certified/badge/response.rs @@ -209,51 +209,51 @@ pub mod response_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type BadgeAward; type Response; type CreatedAt; - type BadgeAward; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type BadgeAward = Unset; type Response = Unset; type CreatedAt = Unset; - type BadgeAward = Unset; + } + ///State transition - sets the `badge_award` field to Set + pub struct SetBadgeAward(PhantomData St>); + impl sealed::Sealed for SetBadgeAward {} + impl State for SetBadgeAward { + type BadgeAward = Set; + type Response = St::Response; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `response` field to Set pub struct SetResponse(PhantomData St>); impl sealed::Sealed for SetResponse {} impl State for SetResponse { + type BadgeAward = St::BadgeAward; type Response = Set; type CreatedAt = St::CreatedAt; - type BadgeAward = St::BadgeAward; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Response = St::Response; - type CreatedAt = Set; type BadgeAward = St::BadgeAward; - } - ///State transition - sets the `badge_award` field to Set - pub struct SetBadgeAward(PhantomData St>); - impl sealed::Sealed for SetBadgeAward {} - impl State for SetBadgeAward { type Response = St::Response; - type CreatedAt = St::CreatedAt; - type BadgeAward = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `badge_award` field + pub struct badge_award(()); ///Marker type for the `response` field pub struct response(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `badge_award` field - pub struct badge_award(()); } } @@ -360,9 +360,9 @@ impl ResponseBuilder { impl ResponseBuilder where St: response_state::State, + St::BadgeAward: response_state::IsSet, St::Response: response_state::IsSet, St::CreatedAt: response_state::IsSet, - St::BadgeAward: response_state::IsSet, { /// Build the final struct. pub fn build(self) -> Response { diff --git a/crates/jacquard-api/src/app_certified/location.rs b/crates/jacquard-api/src/app_certified/location.rs index 5148d3470..eb00f28ba 100644 --- a/crates/jacquard-api/src/app_certified/location.rs +++ b/crates/jacquard-api/src/app_certified/location.rs @@ -378,85 +378,85 @@ pub mod location_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Location; - type Srs; type CreatedAt; type LpVersion; + type Srs; type LocationType; + type Location; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Location = Unset; - type Srs = Unset; type CreatedAt = Unset; type LpVersion = Unset; + type Srs = Unset; type LocationType = Unset; - } - ///State transition - sets the `location` field to Set - pub struct SetLocation(PhantomData St>); - impl sealed::Sealed for SetLocation {} - impl State for SetLocation { - type Location = Set; - type Srs = St::Srs; - type CreatedAt = St::CreatedAt; - type LpVersion = St::LpVersion; - type LocationType = St::LocationType; - } - ///State transition - sets the `srs` field to Set - pub struct SetSrs(PhantomData St>); - impl sealed::Sealed for SetSrs {} - impl State for SetSrs { - type Location = St::Location; - type Srs = Set; - type CreatedAt = St::CreatedAt; - type LpVersion = St::LpVersion; - type LocationType = St::LocationType; + type Location = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Location = St::Location; - type Srs = St::Srs; type CreatedAt = Set; type LpVersion = St::LpVersion; + type Srs = St::Srs; type LocationType = St::LocationType; + type Location = St::Location; } ///State transition - sets the `lp_version` field to Set pub struct SetLpVersion(PhantomData St>); impl sealed::Sealed for SetLpVersion {} impl State for SetLpVersion { - type Location = St::Location; - type Srs = St::Srs; type CreatedAt = St::CreatedAt; type LpVersion = Set; + type Srs = St::Srs; + type LocationType = St::LocationType; + type Location = St::Location; + } + ///State transition - sets the `srs` field to Set + pub struct SetSrs(PhantomData St>); + impl sealed::Sealed for SetSrs {} + impl State for SetSrs { + type CreatedAt = St::CreatedAt; + type LpVersion = St::LpVersion; + type Srs = Set; type LocationType = St::LocationType; + type Location = St::Location; } ///State transition - sets the `location_type` field to Set pub struct SetLocationType(PhantomData St>); impl sealed::Sealed for SetLocationType {} impl State for SetLocationType { - type Location = St::Location; - type Srs = St::Srs; type CreatedAt = St::CreatedAt; type LpVersion = St::LpVersion; + type Srs = St::Srs; type LocationType = Set; + type Location = St::Location; + } + ///State transition - sets the `location` field to Set + pub struct SetLocation(PhantomData St>); + impl sealed::Sealed for SetLocation {} + impl State for SetLocation { + type CreatedAt = St::CreatedAt; + type LpVersion = St::LpVersion; + type Srs = St::Srs; + type LocationType = St::LocationType; + type Location = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `location` field - pub struct location(()); - ///Marker type for the `srs` field - pub struct srs(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `lp_version` field pub struct lp_version(()); + ///Marker type for the `srs` field + pub struct srs(()); ///Marker type for the `location_type` field pub struct location_type(()); + ///Marker type for the `location` field + pub struct location(()); } } @@ -617,11 +617,11 @@ where impl LocationBuilder where St: location_state::State, - St::Location: location_state::IsSet, - St::Srs: location_state::IsSet, St::CreatedAt: location_state::IsSet, St::LpVersion: location_state::IsSet, + St::Srs: location_state::IsSet, St::LocationType: location_state::IsSet, + St::Location: location_state::IsSet, { /// Build the final struct. pub fn build(self) -> Location { diff --git a/crates/jacquard-api/src/app_chavatar/avatar.rs b/crates/jacquard-api/src/app_chavatar/avatar.rs index c705ee8ba..420723624 100644 --- a/crates/jacquard-api/src/app_chavatar/avatar.rs +++ b/crates/jacquard-api/src/app_chavatar/avatar.rs @@ -156,37 +156,37 @@ pub mod avatar_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Avatar; type CreatedAt; + type Avatar; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Avatar = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `avatar` field to Set - pub struct SetAvatar(PhantomData St>); - impl sealed::Sealed for SetAvatar {} - impl State for SetAvatar { - type Avatar = Set; - type CreatedAt = St::CreatedAt; + type Avatar = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Avatar = St::Avatar; type CreatedAt = Set; + type Avatar = St::Avatar; + } + ///State transition - sets the `avatar` field to Set + pub struct SetAvatar(PhantomData St>); + impl sealed::Sealed for SetAvatar {} + impl State for SetAvatar { + type CreatedAt = St::CreatedAt; + type Avatar = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `avatar` field - pub struct avatar(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `avatar` field + pub struct avatar(()); } } @@ -256,8 +256,8 @@ where impl AvatarBuilder where St: avatar_state::State, - St::Avatar: avatar_state::IsSet, St::CreatedAt: avatar_state::IsSet, + St::Avatar: avatar_state::IsSet, { /// Build the final struct. pub fn build(self) -> Avatar { diff --git a/crates/jacquard-api/src/app_chavatar/settings.rs b/crates/jacquard-api/src/app_chavatar/settings.rs index 6576cf733..81ece5d61 100644 --- a/crates/jacquard-api/src/app_chavatar/settings.rs +++ b/crates/jacquard-api/src/app_chavatar/settings.rs @@ -583,67 +583,67 @@ pub mod settings_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Interval; type Avatars; type Enabled; type Mode; + type Interval; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Interval = Unset; type Avatars = Unset; type Enabled = Unset; type Mode = Unset; - } - ///State transition - sets the `interval` field to Set - pub struct SetInterval(PhantomData St>); - impl sealed::Sealed for SetInterval {} - impl State for SetInterval { - type Interval = Set; - type Avatars = St::Avatars; - type Enabled = St::Enabled; - type Mode = St::Mode; + type Interval = Unset; } ///State transition - sets the `avatars` field to Set pub struct SetAvatars(PhantomData St>); impl sealed::Sealed for SetAvatars {} impl State for SetAvatars { - type Interval = St::Interval; type Avatars = Set; type Enabled = St::Enabled; type Mode = St::Mode; + type Interval = St::Interval; } ///State transition - sets the `enabled` field to Set pub struct SetEnabled(PhantomData St>); impl sealed::Sealed for SetEnabled {} impl State for SetEnabled { - type Interval = St::Interval; type Avatars = St::Avatars; type Enabled = Set; type Mode = St::Mode; + type Interval = St::Interval; } ///State transition - sets the `mode` field to Set pub struct SetMode(PhantomData St>); impl sealed::Sealed for SetMode {} impl State for SetMode { - type Interval = St::Interval; type Avatars = St::Avatars; type Enabled = St::Enabled; type Mode = Set; + type Interval = St::Interval; + } + ///State transition - sets the `interval` field to Set + pub struct SetInterval(PhantomData St>); + impl sealed::Sealed for SetInterval {} + impl State for SetInterval { + type Avatars = St::Avatars; + type Enabled = St::Enabled; + type Mode = St::Mode; + type Interval = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `interval` field - pub struct interval(()); ///Marker type for the `avatars` field pub struct avatars(()); ///Marker type for the `enabled` field pub struct enabled(()); ///Marker type for the `mode` field pub struct mode(()); + ///Marker type for the `interval` field + pub struct interval(()); } } @@ -756,10 +756,10 @@ where impl SettingsBuilder where St: settings_state::State, - St::Interval: settings_state::IsSet, St::Avatars: settings_state::IsSet, St::Enabled: settings_state::IsSet, St::Mode: settings_state::IsSet, + St::Interval: settings_state::IsSet, { /// Build the final struct. pub fn build(self) -> Settings { diff --git a/crates/jacquard-api/src/app_chavatar/state.rs b/crates/jacquard-api/src/app_chavatar/state.rs index d8567a48a..3315a54bf 100644 --- a/crates/jacquard-api/src/app_chavatar/state.rs +++ b/crates/jacquard-api/src/app_chavatar/state.rs @@ -125,37 +125,37 @@ pub mod state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cursor; type LastUpdated; + type Cursor; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cursor = Unset; type LastUpdated = Unset; - } - ///State transition - sets the `cursor` field to Set - pub struct SetCursor(PhantomData St>); - impl sealed::Sealed for SetCursor {} - impl State for SetCursor { - type Cursor = Set; - type LastUpdated = St::LastUpdated; + type Cursor = Unset; } ///State transition - sets the `last_updated` field to Set pub struct SetLastUpdated(PhantomData St>); impl sealed::Sealed for SetLastUpdated {} impl State for SetLastUpdated { - type Cursor = St::Cursor; type LastUpdated = Set; + type Cursor = St::Cursor; + } + ///State transition - sets the `cursor` field to Set + pub struct SetCursor(PhantomData St>); + impl sealed::Sealed for SetCursor {} + impl State for SetCursor { + type LastUpdated = St::LastUpdated; + type Cursor = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cursor` field - pub struct cursor(()); ///Marker type for the `last_updated` field pub struct last_updated(()); + ///Marker type for the `cursor` field + pub struct cursor(()); } } @@ -225,8 +225,8 @@ where impl StateBuilder where St: state_state::State, - St::Cursor: state_state::IsSet, St::LastUpdated: state_state::IsSet, + St::Cursor: state_state::IsSet, { /// Build the final struct. pub fn build(self) -> State { diff --git a/crates/jacquard-api/src/app_chronosky/plan/get_assignment.rs b/crates/jacquard-api/src/app_chronosky/plan/get_assignment.rs index b37087454..0a6bca569 100644 --- a/crates/jacquard-api/src/app_chronosky/plan/get_assignment.rs +++ b/crates/jacquard-api/src/app_chronosky/plan/get_assignment.rs @@ -279,103 +279,103 @@ pub mod plan_assignment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ActivatedAt; - type Status; - type ExpiresAt; type Id; + type ActivatedAt; type PlanId; + type ExpiresAt; + type Status; type Plan; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ActivatedAt = Unset; - type Status = Unset; - type ExpiresAt = Unset; type Id = Unset; + type ActivatedAt = Unset; type PlanId = Unset; + type ExpiresAt = Unset; + type Status = Unset; type Plan = Unset; } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; + type ActivatedAt = St::ActivatedAt; + type PlanId = St::PlanId; + type ExpiresAt = St::ExpiresAt; + type Status = St::Status; + type Plan = St::Plan; + } ///State transition - sets the `activated_at` field to Set pub struct SetActivatedAt(PhantomData St>); impl sealed::Sealed for SetActivatedAt {} impl State for SetActivatedAt { - type ActivatedAt = Set; - type Status = St::Status; - type ExpiresAt = St::ExpiresAt; type Id = St::Id; + type ActivatedAt = Set; type PlanId = St::PlanId; + type ExpiresAt = St::ExpiresAt; + type Status = St::Status; type Plan = St::Plan; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { + ///State transition - sets the `plan_id` field to Set + pub struct SetPlanId(PhantomData St>); + impl sealed::Sealed for SetPlanId {} + impl State for SetPlanId { + type Id = St::Id; type ActivatedAt = St::ActivatedAt; - type Status = Set; + type PlanId = Set; type ExpiresAt = St::ExpiresAt; - type Id = St::Id; - type PlanId = St::PlanId; + type Status = St::Status; type Plan = St::Plan; } ///State transition - sets the `expires_at` field to Set pub struct SetExpiresAt(PhantomData St>); impl sealed::Sealed for SetExpiresAt {} impl State for SetExpiresAt { - type ActivatedAt = St::ActivatedAt; - type Status = St::Status; - type ExpiresAt = Set; type Id = St::Id; - type PlanId = St::PlanId; - type Plan = St::Plan; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { type ActivatedAt = St::ActivatedAt; - type Status = St::Status; - type ExpiresAt = St::ExpiresAt; - type Id = Set; type PlanId = St::PlanId; + type ExpiresAt = Set; + type Status = St::Status; type Plan = St::Plan; } - ///State transition - sets the `plan_id` field to Set - pub struct SetPlanId(PhantomData St>); - impl sealed::Sealed for SetPlanId {} - impl State for SetPlanId { + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Id = St::Id; type ActivatedAt = St::ActivatedAt; - type Status = St::Status; + type PlanId = St::PlanId; type ExpiresAt = St::ExpiresAt; - type Id = St::Id; - type PlanId = Set; + type Status = Set; type Plan = St::Plan; } ///State transition - sets the `plan` field to Set pub struct SetPlan(PhantomData St>); impl sealed::Sealed for SetPlan {} impl State for SetPlan { - type ActivatedAt = St::ActivatedAt; - type Status = St::Status; - type ExpiresAt = St::ExpiresAt; type Id = St::Id; + type ActivatedAt = St::ActivatedAt; type PlanId = St::PlanId; + type ExpiresAt = St::ExpiresAt; + type Status = St::Status; type Plan = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `activated_at` field - pub struct activated_at(()); - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `expires_at` field - pub struct expires_at(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `activated_at` field + pub struct activated_at(()); ///Marker type for the `plan_id` field pub struct plan_id(()); + ///Marker type for the `expires_at` field + pub struct expires_at(()); + ///Marker type for the `status` field + pub struct status(()); ///Marker type for the `plan` field pub struct plan(()); } @@ -547,11 +547,11 @@ impl PlanAssignmentBuilder { impl PlanAssignmentBuilder where St: plan_assignment_state::State, - St::ActivatedAt: plan_assignment_state::IsSet, - St::Status: plan_assignment_state::IsSet, - St::ExpiresAt: plan_assignment_state::IsSet, St::Id: plan_assignment_state::IsSet, + St::ActivatedAt: plan_assignment_state::IsSet, St::PlanId: plan_assignment_state::IsSet, + St::ExpiresAt: plan_assignment_state::IsSet, + St::Status: plan_assignment_state::IsSet, St::Plan: plan_assignment_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/app_chronosky/plan/get_usage.rs b/crates/jacquard-api/src/app_chronosky/plan/get_usage.rs index f22c90c3c..f8ea63910 100644 --- a/crates/jacquard-api/src/app_chronosky/plan/get_usage.rs +++ b/crates/jacquard-api/src/app_chronosky/plan/get_usage.rs @@ -238,85 +238,85 @@ pub mod current_plan_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; - type Id; - type Tier; type DisplayName; + type Id; + type Name; type IsActive; + type Tier; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; - type Id = Unset; - type Tier = Unset; type DisplayName = Unset; + type Id = Unset; + type Name = Unset; type IsActive = Unset; + type Tier = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData St>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type DisplayName = Set; type Id = St::Id; - type Tier = St::Tier; - type DisplayName = St::DisplayName; + type Name = St::Name; type IsActive = St::IsActive; + type Tier = St::Tier; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Name = St::Name; - type Id = Set; - type Tier = St::Tier; type DisplayName = St::DisplayName; - type IsActive = St::IsActive; - } - ///State transition - sets the `tier` field to Set - pub struct SetTier(PhantomData St>); - impl sealed::Sealed for SetTier {} - impl State for SetTier { + type Id = Set; type Name = St::Name; - type Id = St::Id; - type Tier = Set; - type DisplayName = St::DisplayName; type IsActive = St::IsActive; + type Tier = St::Tier; } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData St>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type Name = St::Name; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type DisplayName = St::DisplayName; type Id = St::Id; - type Tier = St::Tier; - type DisplayName = Set; + type Name = Set; type IsActive = St::IsActive; + type Tier = St::Tier; } ///State transition - sets the `is_active` field to Set pub struct SetIsActive(PhantomData St>); impl sealed::Sealed for SetIsActive {} impl State for SetIsActive { - type Name = St::Name; + type DisplayName = St::DisplayName; type Id = St::Id; + type Name = St::Name; + type IsActive = Set; type Tier = St::Tier; + } + ///State transition - sets the `tier` field to Set + pub struct SetTier(PhantomData St>); + impl sealed::Sealed for SetTier {} + impl State for SetTier { type DisplayName = St::DisplayName; - type IsActive = Set; + type Id = St::Id; + type Name = St::Name; + type IsActive = St::IsActive; + type Tier = 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 `id` field - pub struct id(()); - ///Marker type for the `tier` field - pub struct tier(()); ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `is_active` field pub struct is_active(()); + ///Marker type for the `tier` field + pub struct tier(()); } } @@ -463,11 +463,11 @@ impl CurrentPlanBuilder { impl CurrentPlanBuilder where St: current_plan_state::State, - St::Name: current_plan_state::IsSet, - St::Id: current_plan_state::IsSet, - St::Tier: current_plan_state::IsSet, St::DisplayName: current_plan_state::IsSet, + St::Id: current_plan_state::IsSet, + St::Name: current_plan_state::IsSet, St::IsActive: current_plan_state::IsSet, + St::Tier: current_plan_state::IsSet, { /// Build the final struct. pub fn build(self) -> CurrentPlan { @@ -778,105 +778,105 @@ pub mod plan_limits_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PendingPostsLimit; type MaxScheduleDays; - type MonthlyPostsLimit; - type ScheduleIntervalMinutes; - type MaxImagesPerPost; type ThreadPostsLimit; + type MaxImagesPerPost; + type ScheduleIntervalMinutes; + type PendingPostsLimit; + type MonthlyPostsLimit; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PendingPostsLimit = Unset; type MaxScheduleDays = Unset; - type MonthlyPostsLimit = Unset; - type ScheduleIntervalMinutes = Unset; - type MaxImagesPerPost = Unset; type ThreadPostsLimit = Unset; - } - ///State transition - sets the `pending_posts_limit` field to Set - pub struct SetPendingPostsLimit(PhantomData St>); - impl sealed::Sealed for SetPendingPostsLimit {} - impl State for SetPendingPostsLimit { - type PendingPostsLimit = Set; - type MaxScheduleDays = St::MaxScheduleDays; - type MonthlyPostsLimit = St::MonthlyPostsLimit; - type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; - type MaxImagesPerPost = St::MaxImagesPerPost; - type ThreadPostsLimit = St::ThreadPostsLimit; + type MaxImagesPerPost = Unset; + type ScheduleIntervalMinutes = Unset; + type PendingPostsLimit = Unset; + type MonthlyPostsLimit = Unset; } ///State transition - sets the `max_schedule_days` field to Set pub struct SetMaxScheduleDays(PhantomData St>); impl sealed::Sealed for SetMaxScheduleDays {} impl State for SetMaxScheduleDays { - type PendingPostsLimit = St::PendingPostsLimit; type MaxScheduleDays = Set; - type MonthlyPostsLimit = St::MonthlyPostsLimit; - type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; - type MaxImagesPerPost = St::MaxImagesPerPost; type ThreadPostsLimit = St::ThreadPostsLimit; - } - ///State transition - sets the `monthly_posts_limit` field to Set - pub struct SetMonthlyPostsLimit(PhantomData St>); - impl sealed::Sealed for SetMonthlyPostsLimit {} - impl State for SetMonthlyPostsLimit { + type MaxImagesPerPost = St::MaxImagesPerPost; + type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; type PendingPostsLimit = St::PendingPostsLimit; + type MonthlyPostsLimit = St::MonthlyPostsLimit; + } + ///State transition - sets the `thread_posts_limit` field to Set + pub struct SetThreadPostsLimit(PhantomData St>); + impl sealed::Sealed for SetThreadPostsLimit {} + impl State for SetThreadPostsLimit { type MaxScheduleDays = St::MaxScheduleDays; - type MonthlyPostsLimit = Set; - type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; + type ThreadPostsLimit = Set; type MaxImagesPerPost = St::MaxImagesPerPost; - type ThreadPostsLimit = St::ThreadPostsLimit; - } - ///State transition - sets the `schedule_interval_minutes` field to Set - pub struct SetScheduleIntervalMinutes(PhantomData St>); - impl sealed::Sealed for SetScheduleIntervalMinutes {} - impl State for SetScheduleIntervalMinutes { + type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; type PendingPostsLimit = St::PendingPostsLimit; - type MaxScheduleDays = St::MaxScheduleDays; type MonthlyPostsLimit = St::MonthlyPostsLimit; - type ScheduleIntervalMinutes = Set; - type MaxImagesPerPost = St::MaxImagesPerPost; - type ThreadPostsLimit = St::ThreadPostsLimit; } ///State transition - sets the `max_images_per_post` field to Set pub struct SetMaxImagesPerPost(PhantomData St>); impl sealed::Sealed for SetMaxImagesPerPost {} impl State for SetMaxImagesPerPost { - type PendingPostsLimit = St::PendingPostsLimit; type MaxScheduleDays = St::MaxScheduleDays; - type MonthlyPostsLimit = St::MonthlyPostsLimit; - type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; - type MaxImagesPerPost = Set; type ThreadPostsLimit = St::ThreadPostsLimit; - } - ///State transition - sets the `thread_posts_limit` field to Set - pub struct SetThreadPostsLimit(PhantomData St>); - impl sealed::Sealed for SetThreadPostsLimit {} - impl State for SetThreadPostsLimit { + type MaxImagesPerPost = Set; + type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; type PendingPostsLimit = St::PendingPostsLimit; + type MonthlyPostsLimit = St::MonthlyPostsLimit; + } + ///State transition - sets the `schedule_interval_minutes` field to Set + pub struct SetScheduleIntervalMinutes(PhantomData St>); + impl sealed::Sealed for SetScheduleIntervalMinutes {} + impl State for SetScheduleIntervalMinutes { type MaxScheduleDays = St::MaxScheduleDays; + type ThreadPostsLimit = St::ThreadPostsLimit; + type MaxImagesPerPost = St::MaxImagesPerPost; + type ScheduleIntervalMinutes = Set; + type PendingPostsLimit = St::PendingPostsLimit; type MonthlyPostsLimit = St::MonthlyPostsLimit; + } + ///State transition - sets the `pending_posts_limit` field to Set + pub struct SetPendingPostsLimit(PhantomData St>); + impl sealed::Sealed for SetPendingPostsLimit {} + impl State for SetPendingPostsLimit { + type MaxScheduleDays = St::MaxScheduleDays; + type ThreadPostsLimit = St::ThreadPostsLimit; + type MaxImagesPerPost = St::MaxImagesPerPost; type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; + type PendingPostsLimit = Set; + type MonthlyPostsLimit = St::MonthlyPostsLimit; + } + ///State transition - sets the `monthly_posts_limit` field to Set + pub struct SetMonthlyPostsLimit(PhantomData St>); + impl sealed::Sealed for SetMonthlyPostsLimit {} + impl State for SetMonthlyPostsLimit { + type MaxScheduleDays = St::MaxScheduleDays; + type ThreadPostsLimit = St::ThreadPostsLimit; type MaxImagesPerPost = St::MaxImagesPerPost; - type ThreadPostsLimit = Set; + type ScheduleIntervalMinutes = St::ScheduleIntervalMinutes; + type PendingPostsLimit = St::PendingPostsLimit; + type MonthlyPostsLimit = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `pending_posts_limit` field - pub struct pending_posts_limit(()); ///Marker type for the `max_schedule_days` field pub struct max_schedule_days(()); - ///Marker type for the `monthly_posts_limit` field - pub struct monthly_posts_limit(()); - ///Marker type for the `schedule_interval_minutes` field - pub struct schedule_interval_minutes(()); - ///Marker type for the `max_images_per_post` field - pub struct max_images_per_post(()); ///Marker type for the `thread_posts_limit` field pub struct thread_posts_limit(()); + ///Marker type for the `max_images_per_post` field + pub struct max_images_per_post(()); + ///Marker type for the `schedule_interval_minutes` field + pub struct schedule_interval_minutes(()); + ///Marker type for the `pending_posts_limit` field + pub struct pending_posts_limit(()); + ///Marker type for the `monthly_posts_limit` field + pub struct monthly_posts_limit(()); } } @@ -1129,12 +1129,12 @@ impl PlanLimitsBuilder { impl PlanLimitsBuilder where St: plan_limits_state::State, - St::PendingPostsLimit: plan_limits_state::IsSet, St::MaxScheduleDays: plan_limits_state::IsSet, - St::MonthlyPostsLimit: plan_limits_state::IsSet, - St::ScheduleIntervalMinutes: plan_limits_state::IsSet, - St::MaxImagesPerPost: plan_limits_state::IsSet, St::ThreadPostsLimit: plan_limits_state::IsSet, + St::MaxImagesPerPost: plan_limits_state::IsSet, + St::ScheduleIntervalMinutes: plan_limits_state::IsSet, + St::PendingPostsLimit: plan_limits_state::IsSet, + St::MonthlyPostsLimit: plan_limits_state::IsSet, { /// Build the final struct. pub fn build(self) -> PlanLimits { @@ -1187,85 +1187,85 @@ pub mod usage_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MonthlyPostsCount; - type MonthlyPeriodEnd; - type LastUpdated; type PendingPostsCount; + type LastUpdated; + type MonthlyPostsCount; type MonthlyPeriodStart; + type MonthlyPeriodEnd; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MonthlyPostsCount = Unset; - type MonthlyPeriodEnd = Unset; - type LastUpdated = Unset; type PendingPostsCount = Unset; + type LastUpdated = Unset; + type MonthlyPostsCount = Unset; type MonthlyPeriodStart = Unset; + type MonthlyPeriodEnd = Unset; } - ///State transition - sets the `monthly_posts_count` field to Set - pub struct SetMonthlyPostsCount(PhantomData St>); - impl sealed::Sealed for SetMonthlyPostsCount {} - impl State for SetMonthlyPostsCount { - type MonthlyPostsCount = Set; - type MonthlyPeriodEnd = St::MonthlyPeriodEnd; + ///State transition - sets the `pending_posts_count` field to Set + pub struct SetPendingPostsCount(PhantomData St>); + impl sealed::Sealed for SetPendingPostsCount {} + impl State for SetPendingPostsCount { + type PendingPostsCount = Set; type LastUpdated = St::LastUpdated; - type PendingPostsCount = St::PendingPostsCount; - type MonthlyPeriodStart = St::MonthlyPeriodStart; - } - ///State transition - sets the `monthly_period_end` field to Set - pub struct SetMonthlyPeriodEnd(PhantomData St>); - impl sealed::Sealed for SetMonthlyPeriodEnd {} - impl State for SetMonthlyPeriodEnd { type MonthlyPostsCount = St::MonthlyPostsCount; - type MonthlyPeriodEnd = Set; - type LastUpdated = St::LastUpdated; - type PendingPostsCount = St::PendingPostsCount; type MonthlyPeriodStart = St::MonthlyPeriodStart; + type MonthlyPeriodEnd = St::MonthlyPeriodEnd; } ///State transition - sets the `last_updated` field to Set pub struct SetLastUpdated(PhantomData St>); impl sealed::Sealed for SetLastUpdated {} impl State for SetLastUpdated { - type MonthlyPostsCount = St::MonthlyPostsCount; - type MonthlyPeriodEnd = St::MonthlyPeriodEnd; - type LastUpdated = Set; type PendingPostsCount = St::PendingPostsCount; - type MonthlyPeriodStart = St::MonthlyPeriodStart; - } - ///State transition - sets the `pending_posts_count` field to Set - pub struct SetPendingPostsCount(PhantomData St>); - impl sealed::Sealed for SetPendingPostsCount {} - impl State for SetPendingPostsCount { + type LastUpdated = Set; type MonthlyPostsCount = St::MonthlyPostsCount; + type MonthlyPeriodStart = St::MonthlyPeriodStart; type MonthlyPeriodEnd = St::MonthlyPeriodEnd; + } + ///State transition - sets the `monthly_posts_count` field to Set + pub struct SetMonthlyPostsCount(PhantomData St>); + impl sealed::Sealed for SetMonthlyPostsCount {} + impl State for SetMonthlyPostsCount { + type PendingPostsCount = St::PendingPostsCount; type LastUpdated = St::LastUpdated; - type PendingPostsCount = Set; + type MonthlyPostsCount = Set; type MonthlyPeriodStart = St::MonthlyPeriodStart; + type MonthlyPeriodEnd = St::MonthlyPeriodEnd; } ///State transition - sets the `monthly_period_start` field to Set pub struct SetMonthlyPeriodStart(PhantomData St>); impl sealed::Sealed for SetMonthlyPeriodStart {} impl State for SetMonthlyPeriodStart { + type PendingPostsCount = St::PendingPostsCount; + type LastUpdated = St::LastUpdated; type MonthlyPostsCount = St::MonthlyPostsCount; + type MonthlyPeriodStart = Set; type MonthlyPeriodEnd = St::MonthlyPeriodEnd; - type LastUpdated = St::LastUpdated; + } + ///State transition - sets the `monthly_period_end` field to Set + pub struct SetMonthlyPeriodEnd(PhantomData St>); + impl sealed::Sealed for SetMonthlyPeriodEnd {} + impl State for SetMonthlyPeriodEnd { type PendingPostsCount = St::PendingPostsCount; - type MonthlyPeriodStart = Set; + type LastUpdated = St::LastUpdated; + type MonthlyPostsCount = St::MonthlyPostsCount; + type MonthlyPeriodStart = St::MonthlyPeriodStart; + type MonthlyPeriodEnd = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `monthly_posts_count` field - pub struct monthly_posts_count(()); - ///Marker type for the `monthly_period_end` field - pub struct monthly_period_end(()); - ///Marker type for the `last_updated` field - pub struct last_updated(()); ///Marker type for the `pending_posts_count` field pub struct pending_posts_count(()); + ///Marker type for the `last_updated` field + pub struct last_updated(()); + ///Marker type for the `monthly_posts_count` field + pub struct monthly_posts_count(()); ///Marker type for the `monthly_period_start` field pub struct monthly_period_start(()); + ///Marker type for the `monthly_period_end` field + pub struct monthly_period_end(()); } } @@ -1426,11 +1426,11 @@ impl UsageStatsBuilder { impl UsageStatsBuilder where St: usage_stats_state::State, - St::MonthlyPostsCount: usage_stats_state::IsSet, - St::MonthlyPeriodEnd: usage_stats_state::IsSet, - St::LastUpdated: usage_stats_state::IsSet, St::PendingPostsCount: usage_stats_state::IsSet, + St::LastUpdated: usage_stats_state::IsSet, + St::MonthlyPostsCount: usage_stats_state::IsSet, St::MonthlyPeriodStart: usage_stats_state::IsSet, + St::MonthlyPeriodEnd: usage_stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> UsageStats { diff --git a/crates/jacquard-api/src/app_chronosky/plan/redeem_ticket.rs b/crates/jacquard-api/src/app_chronosky/plan/redeem_ticket.rs index 307b388ae..c6d8131bc 100644 --- a/crates/jacquard-api/src/app_chronosky/plan/redeem_ticket.rs +++ b/crates/jacquard-api/src/app_chronosky/plan/redeem_ticket.rs @@ -214,85 +214,85 @@ pub mod redeemed_assignment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type ExpiresAt; type ActivatedAt; - type Status; - type PlanId; type Id; - type ExpiresAt; + type PlanId; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type ExpiresAt = Unset; type ActivatedAt = Unset; - type Status = Unset; - type PlanId = Unset; type Id = Unset; - type ExpiresAt = Unset; + type PlanId = Unset; + type Status = Unset; + } + ///State transition - sets the `expires_at` field to Set + pub struct SetExpiresAt(PhantomData St>); + impl sealed::Sealed for SetExpiresAt {} + impl State for SetExpiresAt { + type ExpiresAt = Set; + type ActivatedAt = St::ActivatedAt; + type Id = St::Id; + type PlanId = St::PlanId; + type Status = St::Status; } ///State transition - sets the `activated_at` field to Set pub struct SetActivatedAt(PhantomData St>); impl sealed::Sealed for SetActivatedAt {} impl State for SetActivatedAt { + type ExpiresAt = St::ExpiresAt; type ActivatedAt = Set; - type Status = St::Status; - type PlanId = St::PlanId; type Id = St::Id; - type ExpiresAt = St::ExpiresAt; + type PlanId = St::PlanId; + type Status = St::Status; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type ExpiresAt = St::ExpiresAt; type ActivatedAt = St::ActivatedAt; - type Status = Set; + type Id = Set; type PlanId = St::PlanId; - type Id = St::Id; - type ExpiresAt = St::ExpiresAt; + type Status = St::Status; } ///State transition - sets the `plan_id` field to Set pub struct SetPlanId(PhantomData St>); impl sealed::Sealed for SetPlanId {} impl State for SetPlanId { - type ActivatedAt = St::ActivatedAt; - type Status = St::Status; - type PlanId = Set; - type Id = St::Id; type ExpiresAt = St::ExpiresAt; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { type ActivatedAt = St::ActivatedAt; + type Id = St::Id; + type PlanId = Set; type Status = St::Status; - type PlanId = St::PlanId; - type Id = Set; - type ExpiresAt = St::ExpiresAt; } - ///State transition - sets the `expires_at` field to Set - pub struct SetExpiresAt(PhantomData St>); - impl sealed::Sealed for SetExpiresAt {} - impl State for SetExpiresAt { + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type ExpiresAt = St::ExpiresAt; type ActivatedAt = St::ActivatedAt; - type Status = St::Status; - type PlanId = St::PlanId; type Id = St::Id; - type ExpiresAt = Set; + type PlanId = St::PlanId; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `expires_at` field + pub struct expires_at(()); ///Marker type for the `activated_at` field pub struct activated_at(()); - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `plan_id` field - pub struct plan_id(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `expires_at` field - pub struct expires_at(()); + ///Marker type for the `plan_id` field + pub struct plan_id(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -419,11 +419,11 @@ where impl RedeemedAssignmentBuilder where St: redeemed_assignment_state::State, + St::ExpiresAt: redeemed_assignment_state::IsSet, St::ActivatedAt: redeemed_assignment_state::IsSet, - St::Status: redeemed_assignment_state::IsSet, - St::PlanId: redeemed_assignment_state::IsSet, St::Id: redeemed_assignment_state::IsSet, - St::ExpiresAt: redeemed_assignment_state::IsSet, + St::PlanId: redeemed_assignment_state::IsSet, + St::Status: redeemed_assignment_state::IsSet, { /// Build the final struct. pub fn build(self) -> RedeemedAssignment { diff --git a/crates/jacquard-api/src/app_chronosky/schedule/create_post.rs b/crates/jacquard-api/src/app_chronosky/schedule/create_post.rs index c89b717c0..cc27eb330 100644 --- a/crates/jacquard-api/src/app_chronosky/schedule/create_post.rs +++ b/crates/jacquard-api/src/app_chronosky/schedule/create_post.rs @@ -226,37 +226,37 @@ pub mod create_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ScheduledAt; type Posts; + type ScheduledAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ScheduledAt = Unset; type Posts = Unset; - } - ///State transition - sets the `scheduled_at` field to Set - pub struct SetScheduledAt(PhantomData St>); - impl sealed::Sealed for SetScheduledAt {} - impl State for SetScheduledAt { - type ScheduledAt = Set; - type Posts = St::Posts; + type ScheduledAt = Unset; } ///State transition - sets the `posts` field to Set pub struct SetPosts(PhantomData St>); impl sealed::Sealed for SetPosts {} impl State for SetPosts { - type ScheduledAt = St::ScheduledAt; type Posts = Set; + type ScheduledAt = St::ScheduledAt; + } + ///State transition - sets the `scheduled_at` field to Set + pub struct SetScheduledAt(PhantomData St>); + impl sealed::Sealed for SetScheduledAt {} + impl State for SetScheduledAt { + type Posts = St::Posts; + type ScheduledAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `scheduled_at` field - pub struct scheduled_at(()); ///Marker type for the `posts` field pub struct posts(()); + ///Marker type for the `scheduled_at` field + pub struct scheduled_at(()); } } @@ -377,8 +377,8 @@ impl CreatePostBuilder { impl CreatePostBuilder where St: create_post_state::State, - St::ScheduledAt: create_post_state::IsSet, St::Posts: create_post_state::IsSet, + St::ScheduledAt: create_post_state::IsSet, { /// Build the final struct. pub fn build(self) -> CreatePost { diff --git a/crates/jacquard-api/src/app_chronosky/schedule/list_posts.rs b/crates/jacquard-api/src/app_chronosky/schedule/list_posts.rs index a0c73509a..fc3cdc2ab 100644 --- a/crates/jacquard-api/src/app_chronosky/schedule/list_posts.rs +++ b/crates/jacquard-api/src/app_chronosky/schedule/list_posts.rs @@ -1296,8 +1296,8 @@ pub mod pagination_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Limit; - type Page; type Total; + type Page; type TotalPages; } /// Empty state - all required fields are unset @@ -1305,8 +1305,8 @@ pub mod pagination_state { impl sealed::Sealed for Empty {} impl State for Empty { type Limit = Unset; - type Page = Unset; type Total = Unset; + type Page = Unset; type TotalPages = Unset; } ///State transition - sets the `limit` field to Set @@ -1314,17 +1314,8 @@ pub mod pagination_state { impl sealed::Sealed for SetLimit {} impl State for SetLimit { type Limit = Set; - type Page = St::Page; - type Total = St::Total; - type TotalPages = St::TotalPages; - } - ///State transition - sets the `page` field to Set - pub struct SetPage(PhantomData St>); - impl sealed::Sealed for SetPage {} - impl State for SetPage { - type Limit = St::Limit; - type Page = Set; type Total = St::Total; + type Page = St::Page; type TotalPages = St::TotalPages; } ///State transition - sets the `total` field to Set @@ -1332,8 +1323,17 @@ pub mod pagination_state { impl sealed::Sealed for SetTotal {} impl State for SetTotal { type Limit = St::Limit; - type Page = St::Page; type Total = Set; + type Page = St::Page; + type TotalPages = St::TotalPages; + } + ///State transition - sets the `page` field to Set + pub struct SetPage(PhantomData St>); + impl sealed::Sealed for SetPage {} + impl State for SetPage { + type Limit = St::Limit; + type Total = St::Total; + type Page = Set; type TotalPages = St::TotalPages; } ///State transition - sets the `total_pages` field to Set @@ -1341,8 +1341,8 @@ pub mod pagination_state { impl sealed::Sealed for SetTotalPages {} impl State for SetTotalPages { type Limit = St::Limit; - type Page = St::Page; type Total = St::Total; + type Page = St::Page; type TotalPages = Set; } /// Marker types for field names @@ -1350,10 +1350,10 @@ pub mod pagination_state { pub mod members { ///Marker type for the `limit` field pub struct limit(()); - ///Marker type for the `page` field - pub struct page(()); ///Marker type for the `total` field pub struct total(()); + ///Marker type for the `page` field + pub struct page(()); ///Marker type for the `total_pages` field pub struct total_pages(()); } @@ -1464,8 +1464,8 @@ impl PaginationBuilder where St: pagination_state::State, St::Limit: pagination_state::IsSet, - St::Page: pagination_state::IsSet, St::Total: pagination_state::IsSet, + St::Page: pagination_state::IsSet, St::TotalPages: pagination_state::IsSet, { /// Build the final struct. @@ -1503,177 +1503,177 @@ pub mod scheduled_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RetryCount; - type CreatedAt; + type UserId; type Text; type ScheduledAt; - type Status; + type Id; + type CreatedAt; type UpdatedAt; + type Status; + type RetryCount; type Langs; - type Id; - type UserId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RetryCount = Unset; - type CreatedAt = Unset; + type UserId = Unset; type Text = Unset; type ScheduledAt = Unset; - type Status = Unset; + type Id = Unset; + type CreatedAt = Unset; type UpdatedAt = Unset; + type Status = Unset; + type RetryCount = Unset; type Langs = Unset; - type Id = Unset; - type UserId = Unset; } - ///State transition - sets the `retry_count` field to Set - pub struct SetRetryCount(PhantomData St>); - impl sealed::Sealed for SetRetryCount {} - impl State for SetRetryCount { - type RetryCount = Set; - type CreatedAt = St::CreatedAt; + ///State transition - sets the `user_id` field to Set + pub struct SetUserId(PhantomData St>); + impl sealed::Sealed for SetUserId {} + impl State for SetUserId { + type UserId = Set; type Text = St::Text; type ScheduledAt = St::ScheduledAt; - type Status = St::Status; - type UpdatedAt = St::UpdatedAt; - type Langs = St::Langs; type Id = St::Id; - type UserId = St::UserId; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type RetryCount = St::RetryCount; - type CreatedAt = Set; - type Text = St::Text; - type ScheduledAt = St::ScheduledAt; - type Status = St::Status; + type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = St::Id; - type UserId = St::UserId; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + type UserId = St::UserId; type Text = Set; type ScheduledAt = St::ScheduledAt; - type Status = St::Status; + type Id = St::Id; + type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = St::Id; - type UserId = St::UserId; } ///State transition - sets the `scheduled_at` field to Set pub struct SetScheduledAt(PhantomData St>); impl sealed::Sealed for SetScheduledAt {} impl State for SetScheduledAt { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + type UserId = St::UserId; type Text = St::Text; type ScheduledAt = Set; - type Status = St::Status; + type Id = St::Id; + type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = St::Id; - type UserId = St::UserId; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type UserId = St::UserId; type Text = St::Text; type ScheduledAt = St::ScheduledAt; - type Status = Set; + type Id = Set; + type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = St::Id; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type UserId = St::UserId; + type Text = St::Text; + type ScheduledAt = St::ScheduledAt; + type Id = St::Id; + type CreatedAt = Set; + type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; + type Langs = St::Langs; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + type UserId = St::UserId; type Text = St::Text; type ScheduledAt = St::ScheduledAt; - type Status = St::Status; + type Id = St::Id; + type CreatedAt = St::CreatedAt; type UpdatedAt = Set; + type Status = St::Status; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = St::Id; - type UserId = St::UserId; } - ///State transition - sets the `langs` field to Set - pub struct SetLangs(PhantomData St>); - impl sealed::Sealed for SetLangs {} - impl State for SetLangs { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type UserId = St::UserId; type Text = St::Text; type ScheduledAt = St::ScheduledAt; - type Status = St::Status; - type UpdatedAt = St::UpdatedAt; - type Langs = Set; type Id = St::Id; - type UserId = St::UserId; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type RetryCount = St::RetryCount; type CreatedAt = St::CreatedAt; - type Text = St::Text; - type ScheduledAt = St::ScheduledAt; - type Status = St::Status; type UpdatedAt = St::UpdatedAt; + type Status = Set; + type RetryCount = St::RetryCount; type Langs = St::Langs; - type Id = Set; - type UserId = St::UserId; } - ///State transition - sets the `user_id` field to Set - pub struct SetUserId(PhantomData St>); - impl sealed::Sealed for SetUserId {} - impl State for SetUserId { - type RetryCount = St::RetryCount; - type CreatedAt = St::CreatedAt; + ///State transition - sets the `retry_count` field to Set + pub struct SetRetryCount(PhantomData St>); + impl sealed::Sealed for SetRetryCount {} + impl State for SetRetryCount { + type UserId = St::UserId; type Text = St::Text; type ScheduledAt = St::ScheduledAt; - type Status = St::Status; + type Id = St::Id; + type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = Set; type Langs = St::Langs; + } + ///State transition - sets the `langs` field to Set + pub struct SetLangs(PhantomData St>); + impl sealed::Sealed for SetLangs {} + impl State for SetLangs { + type UserId = St::UserId; + type Text = St::Text; + type ScheduledAt = St::ScheduledAt; type Id = St::Id; - type UserId = Set; + type CreatedAt = St::CreatedAt; + type UpdatedAt = St::UpdatedAt; + type Status = St::Status; + type RetryCount = St::RetryCount; + type Langs = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `retry_count` field - pub struct retry_count(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `user_id` field + pub struct user_id(()); ///Marker type for the `text` field pub struct text(()); ///Marker type for the `scheduled_at` field pub struct scheduled_at(()); - ///Marker type for the `status` field - pub struct status(()); + ///Marker type for the `id` field + pub struct id(()); + ///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 `status` field + pub struct status(()); + ///Marker type for the `retry_count` field + pub struct retry_count(()); ///Marker type for the `langs` field pub struct langs(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `user_id` field - pub struct user_id(()); } } @@ -2163,15 +2163,15 @@ where impl ScheduledPostBuilder where St: scheduled_post_state::State, - St::RetryCount: scheduled_post_state::IsSet, - St::CreatedAt: scheduled_post_state::IsSet, + St::UserId: scheduled_post_state::IsSet, St::Text: scheduled_post_state::IsSet, St::ScheduledAt: scheduled_post_state::IsSet, - St::Status: scheduled_post_state::IsSet, + St::Id: scheduled_post_state::IsSet, + St::CreatedAt: scheduled_post_state::IsSet, St::UpdatedAt: scheduled_post_state::IsSet, + St::Status: scheduled_post_state::IsSet, + St::RetryCount: scheduled_post_state::IsSet, St::Langs: scheduled_post_state::IsSet, - St::Id: scheduled_post_state::IsSet, - St::UserId: scheduled_post_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScheduledPost { diff --git a/crates/jacquard-api/src/app_dropanchor/checkin.rs b/crates/jacquard-api/src/app_dropanchor/checkin.rs index 24a4d274f..5232655bf 100644 --- a/crates/jacquard-api/src/app_dropanchor/checkin.rs +++ b/crates/jacquard-api/src/app_dropanchor/checkin.rs @@ -931,37 +931,37 @@ pub mod checkin_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Thumb; type Fullsize; + type Thumb; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Thumb = Unset; type Fullsize = Unset; - } - ///State transition - sets the `thumb` field to Set - pub struct SetThumb(PhantomData St>); - impl sealed::Sealed for SetThumb {} - impl State for SetThumb { - type Thumb = Set; - type Fullsize = St::Fullsize; + type Thumb = Unset; } ///State transition - sets the `fullsize` field to Set pub struct SetFullsize(PhantomData St>); impl sealed::Sealed for SetFullsize {} impl State for SetFullsize { - type Thumb = St::Thumb; type Fullsize = Set; + type Thumb = St::Thumb; + } + ///State transition - sets the `thumb` field to Set + pub struct SetThumb(PhantomData St>); + impl sealed::Sealed for SetThumb {} + impl State for SetThumb { + type Fullsize = St::Fullsize; + type Thumb = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `thumb` field - pub struct thumb(()); ///Marker type for the `fullsize` field pub struct fullsize(()); + ///Marker type for the `thumb` field + pub struct thumb(()); } } @@ -1044,8 +1044,8 @@ where impl CheckinImageBuilder where St: checkin_image_state::State, - St::Thumb: checkin_image_state::IsSet, St::Fullsize: checkin_image_state::IsSet, + St::Thumb: checkin_image_state::IsSet, { /// Build the final struct. pub fn build(self) -> CheckinImage { @@ -1080,67 +1080,67 @@ pub mod checkin_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Geo; - type Address; type Text; type CreatedAt; + type Address; + type Geo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Geo = Unset; - type Address = Unset; type Text = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `geo` field to Set - pub struct SetGeo(PhantomData St>); - impl sealed::Sealed for SetGeo {} - impl State for SetGeo { - type Geo = Set; - type Address = St::Address; - type Text = St::Text; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `address` field to Set - pub struct SetAddress(PhantomData St>); - impl sealed::Sealed for SetAddress {} - impl State for SetAddress { - type Geo = St::Geo; - type Address = Set; - type Text = St::Text; - type CreatedAt = St::CreatedAt; + type Address = Unset; + type Geo = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Geo = St::Geo; - type Address = St::Address; type Text = Set; type CreatedAt = St::CreatedAt; + type Address = St::Address; + type Geo = St::Geo; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Geo = St::Geo; - type Address = St::Address; type Text = St::Text; type CreatedAt = Set; + type Address = St::Address; + type Geo = St::Geo; + } + ///State transition - sets the `address` field to Set + pub struct SetAddress(PhantomData St>); + impl sealed::Sealed for SetAddress {} + impl State for SetAddress { + type Text = St::Text; + type CreatedAt = St::CreatedAt; + type Address = Set; + type Geo = St::Geo; + } + ///State transition - sets the `geo` field to Set + pub struct SetGeo(PhantomData St>); + impl sealed::Sealed for SetGeo {} + impl State for SetGeo { + type Text = St::Text; + type CreatedAt = St::CreatedAt; + type Address = St::Address; + type Geo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `geo` field - pub struct geo(()); - ///Marker type for the `address` field - pub struct address(()); ///Marker type for the `text` field pub struct text(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `address` field + pub struct address(()); + ///Marker type for the `geo` field + pub struct geo(()); } } @@ -1323,10 +1323,10 @@ where impl CheckinBuilder where St: checkin_state::State, - St::Geo: checkin_state::IsSet, - St::Address: checkin_state::IsSet, St::Text: checkin_state::IsSet, St::CreatedAt: checkin_state::IsSet, + St::Address: checkin_state::IsSet, + St::Geo: checkin_state::IsSet, { /// Build the final struct. pub fn build(self) -> Checkin { diff --git a/crates/jacquard-api/src/app_dropanchor/comment.rs b/crates/jacquard-api/src/app_dropanchor/comment.rs index 8862f17a3..1433945e2 100644 --- a/crates/jacquard-api/src/app_dropanchor/comment.rs +++ b/crates/jacquard-api/src/app_dropanchor/comment.rs @@ -156,51 +156,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; type CheckinRef; 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 CheckinRef = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type CheckinRef = St::CheckinRef; - type CreatedAt = St::CreatedAt; + type Text = Unset; } ///State transition - sets the `checkin_ref` field to Set pub struct SetCheckinRef(PhantomData St>); impl sealed::Sealed for SetCheckinRef {} impl State for SetCheckinRef { - type Text = St::Text; type CheckinRef = Set; type CreatedAt = St::CreatedAt; + type Text = St::Text; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Text = St::Text; type CheckinRef = St::CheckinRef; type CreatedAt = Set; + type Text = St::Text; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type CheckinRef = St::CheckinRef; + type CreatedAt = St::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 `checkin_ref` field pub struct checkin_ref(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `text` field + pub struct text(()); } } @@ -289,9 +289,9 @@ where impl CommentBuilder where St: comment_state::State, - St::Text: comment_state::IsSet, St::CheckinRef: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, + St::Text: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/app_dropanchor/like.rs b/crates/jacquard-api/src/app_dropanchor/like.rs index b191d534d..3a00d849d 100644 --- a/crates/jacquard-api/src/app_dropanchor/like.rs +++ b/crates/jacquard-api/src/app_dropanchor/like.rs @@ -143,37 +143,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type CheckinRef; + 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 CheckinRef = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type CheckinRef = St::CheckinRef; + type CreatedAt = Unset; } ///State transition - sets the `checkin_ref` field to Set pub struct SetCheckinRef(PhantomData St>); impl sealed::Sealed for SetCheckinRef {} impl State for SetCheckinRef { - type CreatedAt = St::CreatedAt; type CheckinRef = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CheckinRef = St::CheckinRef; + 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 `checkin_ref` field pub struct checkin_ref(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -243,8 +243,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::CheckinRef: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/app_fitsky/bluesky_post.rs b/crates/jacquard-api/src/app_fitsky/bluesky_post.rs index a1f7fc566..21541d312 100644 --- a/crates/jacquard-api/src/app_fitsky/bluesky_post.rs +++ b/crates/jacquard-api/src/app_fitsky/bluesky_post.rs @@ -113,51 +113,51 @@ pub mod bluesky_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type WorkoutUri; - type CreatedAt; type PostUri; + type CreatedAt; + type WorkoutUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type WorkoutUri = Unset; - type CreatedAt = Unset; type PostUri = Unset; + type CreatedAt = Unset; + type WorkoutUri = Unset; } - ///State transition - sets the `workout_uri` field to Set - pub struct SetWorkoutUri(PhantomData St>); - impl sealed::Sealed for SetWorkoutUri {} - impl State for SetWorkoutUri { - type WorkoutUri = Set; + ///State transition - sets the `post_uri` field to Set + pub struct SetPostUri(PhantomData St>); + impl sealed::Sealed for SetPostUri {} + impl State for SetPostUri { + type PostUri = Set; type CreatedAt = St::CreatedAt; - type PostUri = St::PostUri; + type WorkoutUri = St::WorkoutUri; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type WorkoutUri = St::WorkoutUri; - type CreatedAt = Set; type PostUri = St::PostUri; - } - ///State transition - sets the `post_uri` field to Set - pub struct SetPostUri(PhantomData St>); - impl sealed::Sealed for SetPostUri {} - impl State for SetPostUri { + type CreatedAt = Set; type WorkoutUri = St::WorkoutUri; + } + ///State transition - sets the `workout_uri` field to Set + pub struct SetWorkoutUri(PhantomData St>); + impl sealed::Sealed for SetWorkoutUri {} + impl State for SetWorkoutUri { + type PostUri = St::PostUri; type CreatedAt = St::CreatedAt; - type PostUri = Set; + type WorkoutUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `workout_uri` field - pub struct workout_uri(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `post_uri` field pub struct post_uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `workout_uri` field + pub struct workout_uri(()); } } @@ -246,9 +246,9 @@ where impl BlueskyPostBuilder where St: bluesky_post_state::State, - St::WorkoutUri: bluesky_post_state::IsSet, - St::CreatedAt: bluesky_post_state::IsSet, St::PostUri: bluesky_post_state::IsSet, + St::CreatedAt: bluesky_post_state::IsSet, + St::WorkoutUri: bluesky_post_state::IsSet, { /// Build the final struct. pub fn build(self) -> BlueskyPost { diff --git a/crates/jacquard-api/src/app_fitsky/goal.rs b/crates/jacquard-api/src/app_fitsky/goal.rs index d52a0152d..af4395f8e 100644 --- a/crates/jacquard-api/src/app_fitsky/goal.rs +++ b/crates/jacquard-api/src/app_fitsky/goal.rs @@ -319,84 +319,84 @@ pub mod goal_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type TargetValue; type Metric; - type StartDate; type Period; + type StartDate; + type TargetValue; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type TargetValue = Unset; type Metric = Unset; - type StartDate = Unset; type Period = Unset; + type StartDate = Unset; + type TargetValue = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type TargetValue = St::TargetValue; type Metric = St::Metric; - type StartDate = St::StartDate; type Period = St::Period; - } - ///State transition - sets the `target_value` field to Set - pub struct SetTargetValue(PhantomData St>); - impl sealed::Sealed for SetTargetValue {} - impl State for SetTargetValue { - type CreatedAt = St::CreatedAt; - type TargetValue = Set; - type Metric = St::Metric; type StartDate = St::StartDate; - type Period = St::Period; + type TargetValue = St::TargetValue; } ///State transition - sets the `metric` field to Set pub struct SetMetric(PhantomData St>); impl sealed::Sealed for SetMetric {} impl State for SetMetric { type CreatedAt = St::CreatedAt; - type TargetValue = St::TargetValue; type Metric = Set; - type StartDate = St::StartDate; type Period = St::Period; + type StartDate = St::StartDate; + type TargetValue = St::TargetValue; + } + ///State transition - sets the `period` field to Set + pub struct SetPeriod(PhantomData St>); + impl sealed::Sealed for SetPeriod {} + impl State for SetPeriod { + type CreatedAt = St::CreatedAt; + type Metric = St::Metric; + type Period = Set; + type StartDate = St::StartDate; + type TargetValue = St::TargetValue; } ///State transition - sets the `start_date` field to Set pub struct SetStartDate(PhantomData St>); impl sealed::Sealed for SetStartDate {} impl State for SetStartDate { type CreatedAt = St::CreatedAt; - type TargetValue = St::TargetValue; type Metric = St::Metric; - type StartDate = Set; type Period = St::Period; + type StartDate = Set; + type TargetValue = St::TargetValue; } - ///State transition - sets the `period` field to Set - pub struct SetPeriod(PhantomData St>); - impl sealed::Sealed for SetPeriod {} - impl State for SetPeriod { + ///State transition - sets the `target_value` field to Set + pub struct SetTargetValue(PhantomData St>); + impl sealed::Sealed for SetTargetValue {} + impl State for SetTargetValue { type CreatedAt = St::CreatedAt; - type TargetValue = St::TargetValue; type Metric = St::Metric; + type Period = St::Period; type StartDate = St::StartDate; - type Period = Set; + type TargetValue = 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 `target_value` field - pub struct target_value(()); ///Marker type for the `metric` field pub struct metric(()); - ///Marker type for the `start_date` field - pub struct start_date(()); ///Marker type for the `period` field pub struct period(()); + ///Marker type for the `start_date` field + pub struct start_date(()); + ///Marker type for the `target_value` field + pub struct target_value(()); } } @@ -544,10 +544,10 @@ impl GoalBuilder where St: goal_state::State, St::CreatedAt: goal_state::IsSet, - St::TargetValue: goal_state::IsSet, St::Metric: goal_state::IsSet, - St::StartDate: goal_state::IsSet, St::Period: goal_state::IsSet, + St::StartDate: goal_state::IsSet, + St::TargetValue: goal_state::IsSet, { /// Build the final struct. pub fn build(self) -> Goal { diff --git a/crates/jacquard-api/src/app_fitsky/trend.rs b/crates/jacquard-api/src/app_fitsky/trend.rs index c2386dfd2..dc483b6aa 100644 --- a/crates/jacquard-api/src/app_fitsky/trend.rs +++ b/crates/jacquard-api/src/app_fitsky/trend.rs @@ -637,37 +637,37 @@ pub mod data_point_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Date; + 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 Date = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Date = St::Date; + type Value = Unset; } ///State transition - sets the `date` field to Set pub struct SetDate(PhantomData St>); impl sealed::Sealed for SetDate {} impl State for SetDate { - type Value = St::Value; type Date = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Date = St::Date; + 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 `date` field pub struct date(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -737,8 +737,8 @@ where impl DataPointBuilder where St: data_point_state::State, - St::Value: data_point_state::IsSet, St::Date: data_point_state::IsSet, + St::Value: data_point_state::IsSet, { /// Build the final struct. pub fn build(self) -> DataPoint { @@ -947,85 +947,85 @@ pub mod trend_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Period; type WidgetType; + type CreatedAt; type Metric; + type Period; type Summary; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Period = Unset; type WidgetType = Unset; + type CreatedAt = Unset; type Metric = Unset; + type Period = Unset; type Summary = Unset; - type CreatedAt = Unset; - } - ///State transition - sets the `period` field to Set - pub struct SetPeriod(PhantomData St>); - impl sealed::Sealed for SetPeriod {} - impl State for SetPeriod { - type Period = Set; - type WidgetType = St::WidgetType; - type Metric = St::Metric; - type Summary = St::Summary; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `widget_type` field to Set pub struct SetWidgetType(PhantomData St>); impl sealed::Sealed for SetWidgetType {} impl State for SetWidgetType { - type Period = St::Period; type WidgetType = Set; + type CreatedAt = St::CreatedAt; type Metric = St::Metric; + type Period = St::Period; + type Summary = St::Summary; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type WidgetType = St::WidgetType; + type CreatedAt = Set; + type Metric = St::Metric; + type Period = St::Period; type Summary = St::Summary; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `metric` field to Set pub struct SetMetric(PhantomData St>); impl sealed::Sealed for SetMetric {} impl State for SetMetric { - type Period = St::Period; type WidgetType = St::WidgetType; + type CreatedAt = St::CreatedAt; type Metric = Set; + type Period = St::Period; type Summary = St::Summary; + } + ///State transition - sets the `period` field to Set + pub struct SetPeriod(PhantomData St>); + impl sealed::Sealed for SetPeriod {} + impl State for SetPeriod { + type WidgetType = St::WidgetType; type CreatedAt = St::CreatedAt; + type Metric = St::Metric; + type Period = Set; + type Summary = St::Summary; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData St>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { - type Period = St::Period; type WidgetType = St::WidgetType; - type Metric = St::Metric; - type Summary = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Period = St::Period; - type WidgetType = St::WidgetType; type Metric = St::Metric; - type Summary = St::Summary; - type CreatedAt = Set; + type Period = St::Period; + type Summary = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `period` field - pub struct period(()); ///Marker type for the `widget_type` field pub struct widget_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `metric` field pub struct metric(()); + ///Marker type for the `period` field + pub struct period(()); ///Marker type for the `summary` field pub struct summary(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -1217,11 +1217,11 @@ where impl TrendBuilder where St: trend_state::State, - St::Period: trend_state::IsSet, St::WidgetType: trend_state::IsSet, + St::CreatedAt: trend_state::IsSet, St::Metric: trend_state::IsSet, + St::Period: trend_state::IsSet, St::Summary: trend_state::IsSet, - St::CreatedAt: trend_state::IsSet, { /// Build the final struct. pub fn build(self) -> Trend { diff --git a/crates/jacquard-api/src/app_fitsky/workout.rs b/crates/jacquard-api/src/app_fitsky/workout.rs index 22d3af2e2..989bfd3c9 100644 --- a/crates/jacquard-api/src/app_fitsky/workout.rs +++ b/crates/jacquard-api/src/app_fitsky/workout.rs @@ -2783,85 +2783,85 @@ pub mod workout_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Duration; - type Type; type StartedAt; - type Title; type CreatedAt; + type Type; + type Title; + type Duration; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Duration = Unset; - type Type = Unset; type StartedAt = Unset; - type Title = Unset; type CreatedAt = Unset; + type Type = Unset; + type Title = Unset; + type Duration = Unset; } - ///State transition - sets the `duration` field to Set - pub struct SetDuration(PhantomData St>); - impl sealed::Sealed for SetDuration {} - impl State for SetDuration { - type Duration = Set; + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData St>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type StartedAt = Set; + type CreatedAt = St::CreatedAt; type Type = St::Type; + type Title = St::Title; + type Duration = St::Duration; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type StartedAt = St::StartedAt; + type CreatedAt = Set; + type Type = St::Type; type Title = St::Title; - type CreatedAt = St::CreatedAt; + type Duration = St::Duration; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Duration = St::Duration; - type Type = Set; type StartedAt = St::StartedAt; - type Title = St::Title; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData St>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type Duration = St::Duration; - type Type = St::Type; - type StartedAt = Set; + type Type = Set; type Title = St::Title; - type CreatedAt = St::CreatedAt; + type Duration = St::Duration; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Duration = St::Duration; - type Type = St::Type; type StartedAt = St::StartedAt; - type Title = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Duration = St::Duration; type Type = St::Type; + type Title = Set; + type Duration = St::Duration; + } + ///State transition - sets the `duration` field to Set + pub struct SetDuration(PhantomData St>); + impl sealed::Sealed for SetDuration {} + impl State for SetDuration { type StartedAt = St::StartedAt; + type CreatedAt = St::CreatedAt; + type Type = St::Type; type Title = St::Title; - type CreatedAt = Set; + type Duration = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `duration` field - pub struct duration(()); - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `started_at` field pub struct started_at(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `type` field + pub struct r#type(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `duration` field + pub struct duration(()); } } @@ -3132,11 +3132,11 @@ impl WorkoutBuilder { impl WorkoutBuilder where St: workout_state::State, - St::Duration: workout_state::IsSet, - St::Type: workout_state::IsSet, St::StartedAt: workout_state::IsSet, - St::Title: workout_state::IsSet, St::CreatedAt: workout_state::IsSet, + St::Type: workout_state::IsSet, + St::Title: workout_state::IsSet, + St::Duration: workout_state::IsSet, { /// Build the final struct. pub fn build(self) -> Workout { @@ -3188,37 +3188,37 @@ pub mod milestone_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Timestamp; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Timestamp = Unset; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Timestamp = St::Timestamp; + type Type = Unset; } ///State transition - sets the `timestamp` field to Set pub struct SetTimestamp(PhantomData St>); impl sealed::Sealed for SetTimestamp {} impl State for SetTimestamp { - type Type = St::Type; type Timestamp = Set; + type Type = St::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Timestamp = St::Timestamp; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `timestamp` field pub struct timestamp(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -3314,8 +3314,8 @@ impl MilestoneBuilder { impl MilestoneBuilder where St: milestone_state::State, - St::Type: milestone_state::IsSet, St::Timestamp: milestone_state::IsSet, + St::Type: milestone_state::IsSet, { /// Build the final struct. pub fn build(self) -> Milestone { diff --git a/crates/jacquard-api/src/app_fitsky/workout_plan.rs b/crates/jacquard-api/src/app_fitsky/workout_plan.rs index 9a70b3b8e..a65ead287 100644 --- a/crates/jacquard-api/src/app_fitsky/workout_plan.rs +++ b/crates/jacquard-api/src/app_fitsky/workout_plan.rs @@ -688,51 +688,51 @@ pub mod plan_exercise_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type TargetSets; type Name; type TargetReps; - type TargetSets; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type TargetSets = Unset; type Name = Unset; type TargetReps = Unset; - type TargetSets = Unset; + } + ///State transition - sets the `target_sets` field to Set + pub struct SetTargetSets(PhantomData St>); + impl sealed::Sealed for SetTargetSets {} + impl State for SetTargetSets { + type TargetSets = Set; + type Name = St::Name; + type TargetReps = St::TargetReps; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type TargetSets = St::TargetSets; type Name = Set; type TargetReps = St::TargetReps; - type TargetSets = St::TargetSets; } ///State transition - sets the `target_reps` field to Set pub struct SetTargetReps(PhantomData St>); impl sealed::Sealed for SetTargetReps {} impl State for SetTargetReps { - type Name = St::Name; - type TargetReps = Set; type TargetSets = St::TargetSets; - } - ///State transition - sets the `target_sets` field to Set - pub struct SetTargetSets(PhantomData St>); - impl sealed::Sealed for SetTargetSets {} - impl State for SetTargetSets { type Name = St::Name; - type TargetReps = St::TargetReps; - type TargetSets = Set; + type TargetReps = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `target_sets` field + pub struct target_sets(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `target_reps` field pub struct target_reps(()); - ///Marker type for the `target_sets` field - pub struct target_sets(()); } } @@ -834,9 +834,9 @@ where impl PlanExerciseBuilder where St: plan_exercise_state::State, + St::TargetSets: plan_exercise_state::IsSet, St::Name: plan_exercise_state::IsSet, St::TargetReps: plan_exercise_state::IsSet, - St::TargetSets: plan_exercise_state::IsSet, { /// Build the final struct. pub fn build(self) -> PlanExercise { diff --git a/crates/jacquard-api/src/app_gainforest/dwc/event.rs b/crates/jacquard-api/src/app_gainforest/dwc/event.rs index 3da3c7798..8441eb93b 100644 --- a/crates/jacquard-api/src/app_gainforest/dwc/event.rs +++ b/crates/jacquard-api/src/app_gainforest/dwc/event.rs @@ -472,50 +472,50 @@ pub mod event_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type EventDate; - type EventId; type CreatedAt; + type EventId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type EventDate = Unset; - type EventId = Unset; type CreatedAt = Unset; + type EventId = Unset; } ///State transition - sets the `event_date` field to Set pub struct SetEventDate(PhantomData St>); impl sealed::Sealed for SetEventDate {} impl State for SetEventDate { type EventDate = Set; - type EventId = St::EventId; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `event_id` field to Set - pub struct SetEventId(PhantomData St>); - impl sealed::Sealed for SetEventId {} - impl State for SetEventId { - type EventDate = St::EventDate; - type EventId = Set; type CreatedAt = St::CreatedAt; + type EventId = St::EventId; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type EventDate = St::EventDate; - type EventId = St::EventId; type CreatedAt = Set; + type EventId = St::EventId; + } + ///State transition - sets the `event_id` field to Set + pub struct SetEventId(PhantomData St>); + impl sealed::Sealed for SetEventId {} + impl State for SetEventId { + type EventDate = St::EventDate; + type CreatedAt = St::CreatedAt; + type EventId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `event_date` field pub struct event_date(()); - ///Marker type for the `event_id` field - pub struct event_id(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `event_id` field + pub struct event_id(()); } } @@ -976,8 +976,8 @@ impl EventBuilder where St: event_state::State, St::EventDate: event_state::IsSet, - St::EventId: event_state::IsSet, St::CreatedAt: event_state::IsSet, + St::EventId: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { diff --git a/crates/jacquard-api/src/app_gainforest/dwc/measurement.rs b/crates/jacquard-api/src/app_gainforest/dwc/measurement.rs index a0c6130d2..c92588247 100644 --- a/crates/jacquard-api/src/app_gainforest/dwc/measurement.rs +++ b/crates/jacquard-api/src/app_gainforest/dwc/measurement.rs @@ -264,67 +264,67 @@ pub mod measurement_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type OccurrenceRef; type MeasurementType; type MeasurementValue; - 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 OccurrenceRef = Unset; type MeasurementType = Unset; type MeasurementValue = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type OccurrenceRef = St::OccurrenceRef; + type MeasurementType = St::MeasurementType; + type MeasurementValue = St::MeasurementValue; } ///State transition - sets the `occurrence_ref` field to Set pub struct SetOccurrenceRef(PhantomData St>); impl sealed::Sealed for SetOccurrenceRef {} impl State for SetOccurrenceRef { + type CreatedAt = St::CreatedAt; type OccurrenceRef = Set; type MeasurementType = St::MeasurementType; type MeasurementValue = St::MeasurementValue; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `measurement_type` field to Set pub struct SetMeasurementType(PhantomData St>); impl sealed::Sealed for SetMeasurementType {} impl State for SetMeasurementType { + type CreatedAt = St::CreatedAt; type OccurrenceRef = St::OccurrenceRef; type MeasurementType = Set; type MeasurementValue = St::MeasurementValue; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `measurement_value` field to Set pub struct SetMeasurementValue(PhantomData St>); impl sealed::Sealed for SetMeasurementValue {} impl State for SetMeasurementValue { - type OccurrenceRef = St::OccurrenceRef; - type MeasurementType = St::MeasurementType; - type MeasurementValue = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type OccurrenceRef = St::OccurrenceRef; type MeasurementType = St::MeasurementType; - type MeasurementValue = St::MeasurementValue; - type CreatedAt = Set; + type MeasurementValue = 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 `occurrence_ref` field pub struct occurrence_ref(()); ///Marker type for the `measurement_type` field pub struct measurement_type(()); ///Marker type for the `measurement_value` field pub struct measurement_value(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -562,10 +562,10 @@ where impl MeasurementBuilder where St: measurement_state::State, + St::CreatedAt: measurement_state::IsSet, St::OccurrenceRef: measurement_state::IsSet, St::MeasurementType: measurement_state::IsSet, St::MeasurementValue: measurement_state::IsSet, - St::CreatedAt: measurement_state::IsSet, { /// Build the final struct. pub fn build(self) -> Measurement { diff --git a/crates/jacquard-api/src/app_gainforest/dwc/occurrence.rs b/crates/jacquard-api/src/app_gainforest/dwc/occurrence.rs index eeb50ed62..58eae96fb 100644 --- a/crates/jacquard-api/src/app_gainforest/dwc/occurrence.rs +++ b/crates/jacquard-api/src/app_gainforest/dwc/occurrence.rs @@ -1183,66 +1183,66 @@ pub mod occurrence_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type BasisOfRecord; - type EventDate; type ScientificName; type CreatedAt; + type EventDate; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type BasisOfRecord = Unset; - type EventDate = Unset; type ScientificName = Unset; type CreatedAt = Unset; + type EventDate = Unset; } ///State transition - sets the `basis_of_record` field to Set pub struct SetBasisOfRecord(PhantomData St>); impl sealed::Sealed for SetBasisOfRecord {} impl State for SetBasisOfRecord { type BasisOfRecord = Set; - type EventDate = St::EventDate; - type ScientificName = St::ScientificName; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `event_date` field to Set - pub struct SetEventDate(PhantomData St>); - impl sealed::Sealed for SetEventDate {} - impl State for SetEventDate { - type BasisOfRecord = St::BasisOfRecord; - type EventDate = Set; type ScientificName = St::ScientificName; type CreatedAt = St::CreatedAt; + type EventDate = St::EventDate; } ///State transition - sets the `scientific_name` field to Set pub struct SetScientificName(PhantomData St>); impl sealed::Sealed for SetScientificName {} impl State for SetScientificName { type BasisOfRecord = St::BasisOfRecord; - type EventDate = St::EventDate; type ScientificName = Set; type CreatedAt = St::CreatedAt; + type EventDate = St::EventDate; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type BasisOfRecord = St::BasisOfRecord; - type EventDate = St::EventDate; type ScientificName = St::ScientificName; type CreatedAt = Set; + type EventDate = St::EventDate; + } + ///State transition - sets the `event_date` field to Set + pub struct SetEventDate(PhantomData St>); + impl sealed::Sealed for SetEventDate {} + impl State for SetEventDate { + type BasisOfRecord = St::BasisOfRecord; + type ScientificName = St::ScientificName; + type CreatedAt = St::CreatedAt; + type EventDate = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `basis_of_record` field pub struct basis_of_record(()); - ///Marker type for the `event_date` field - pub struct event_date(()); ///Marker type for the `scientific_name` field pub struct scientific_name(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `event_date` field + pub struct event_date(()); } } @@ -2489,9 +2489,9 @@ impl OccurrenceBuilder where St: occurrence_state::State, St::BasisOfRecord: occurrence_state::IsSet, - St::EventDate: occurrence_state::IsSet, St::ScientificName: occurrence_state::IsSet, St::CreatedAt: occurrence_state::IsSet, + St::EventDate: occurrence_state::IsSet, { /// Build the final struct. pub fn build(self) -> Occurrence { diff --git a/crates/jacquard-api/src/app_gainforest/evaluator.rs b/crates/jacquard-api/src/app_gainforest/evaluator.rs index dfad18ab9..bab402e7d 100644 --- a/crates/jacquard-api/src/app_gainforest/evaluator.rs +++ b/crates/jacquard-api/src/app_gainforest/evaluator.rs @@ -967,50 +967,50 @@ pub mod candidate_taxon_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Confidence; - type Rank; type ScientificName; + type Rank; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Confidence = Unset; - type Rank = Unset; type ScientificName = Unset; + type Rank = Unset; } ///State transition - sets the `confidence` field to Set pub struct SetConfidence(PhantomData St>); impl sealed::Sealed for SetConfidence {} impl State for SetConfidence { type Confidence = Set; - type Rank = St::Rank; - type ScientificName = St::ScientificName; - } - ///State transition - sets the `rank` field to Set - pub struct SetRank(PhantomData St>); - impl sealed::Sealed for SetRank {} - impl State for SetRank { - type Confidence = St::Confidence; - type Rank = Set; type ScientificName = St::ScientificName; + type Rank = St::Rank; } ///State transition - sets the `scientific_name` field to Set pub struct SetScientificName(PhantomData St>); impl sealed::Sealed for SetScientificName {} impl State for SetScientificName { type Confidence = St::Confidence; - type Rank = St::Rank; type ScientificName = Set; + type Rank = St::Rank; + } + ///State transition - sets the `rank` field to Set + pub struct SetRank(PhantomData St>); + impl sealed::Sealed for SetRank {} + impl State for SetRank { + type Confidence = St::Confidence; + type ScientificName = St::ScientificName; + type Rank = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `confidence` field pub struct confidence(()); - ///Marker type for the `rank` field - pub struct rank(()); ///Marker type for the `scientific_name` field pub struct scientific_name(()); + ///Marker type for the `rank` field + pub struct rank(()); } } @@ -1160,8 +1160,8 @@ impl CandidateTaxonBuilder where St: candidate_taxon_state::State, St::Confidence: candidate_taxon_state::IsSet, - St::Rank: candidate_taxon_state::IsSet, St::ScientificName: candidate_taxon_state::IsSet, + St::Rank: candidate_taxon_state::IsSet, { /// Build the final struct. pub fn build(self) -> CandidateTaxon { diff --git a/crates/jacquard-api/src/app_gainforest/organization/default_site.rs b/crates/jacquard-api/src/app_gainforest/organization/default_site.rs index 256cfc17c..3454d8396 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/default_site.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/default_site.rs @@ -114,37 +114,37 @@ pub mod default_site_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Site; + 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 Site = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Site = St::Site; + type CreatedAt = Unset; } ///State transition - sets the `site` field to Set pub struct SetSite(PhantomData St>); impl sealed::Sealed for SetSite {} impl State for SetSite { - type CreatedAt = St::CreatedAt; type Site = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Site = St::Site; + 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 `site` field pub struct site(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,8 +214,8 @@ where impl DefaultSiteBuilder where St: default_site_state::State, - St::CreatedAt: default_site_state::IsSet, St::Site: default_site_state::IsSet, + St::CreatedAt: default_site_state::IsSet, { /// Build the final struct. pub fn build(self) -> DefaultSite { diff --git a/crates/jacquard-api/src/app_gainforest/organization/info.rs b/crates/jacquard-api/src/app_gainforest/organization/info.rs index ef3b07c5e..2ad333a72 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/info.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/info.rs @@ -202,127 +202,127 @@ pub mod info_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Visibility; type CreatedAt; - type Objectives; + type LongDescription; type Country; type DisplayName; + type Objectives; type ShortDescription; - type LongDescription; - type Visibility; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Visibility = Unset; type CreatedAt = Unset; - type Objectives = Unset; + type LongDescription = Unset; type Country = Unset; type DisplayName = Unset; + type Objectives = Unset; type ShortDescription = Unset; - type LongDescription = Unset; - type Visibility = Unset; + } + ///State transition - sets the `visibility` field to Set + pub struct SetVisibility(PhantomData St>); + impl sealed::Sealed for SetVisibility {} + impl State for SetVisibility { + type Visibility = Set; + type CreatedAt = St::CreatedAt; + type LongDescription = St::LongDescription; + type Country = St::Country; + type DisplayName = St::DisplayName; + type Objectives = St::Objectives; + type ShortDescription = St::ShortDescription; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Visibility = St::Visibility; type CreatedAt = Set; - type Objectives = St::Objectives; + type LongDescription = St::LongDescription; type Country = St::Country; type DisplayName = St::DisplayName; + type Objectives = St::Objectives; type ShortDescription = St::ShortDescription; - type LongDescription = St::LongDescription; - type Visibility = St::Visibility; } - ///State transition - sets the `objectives` field to Set - pub struct SetObjectives(PhantomData St>); - impl sealed::Sealed for SetObjectives {} - impl State for SetObjectives { + ///State transition - sets the `long_description` field to Set + pub struct SetLongDescription(PhantomData St>); + impl sealed::Sealed for SetLongDescription {} + impl State for SetLongDescription { + type Visibility = St::Visibility; type CreatedAt = St::CreatedAt; - type Objectives = Set; + type LongDescription = Set; type Country = St::Country; type DisplayName = St::DisplayName; + type Objectives = St::Objectives; type ShortDescription = St::ShortDescription; - type LongDescription = St::LongDescription; - type Visibility = St::Visibility; } ///State transition - sets the `country` field to Set pub struct SetCountry(PhantomData St>); impl sealed::Sealed for SetCountry {} impl State for SetCountry { + type Visibility = St::Visibility; type CreatedAt = St::CreatedAt; - type Objectives = St::Objectives; + type LongDescription = St::LongDescription; type Country = Set; type DisplayName = St::DisplayName; + type Objectives = St::Objectives; type ShortDescription = St::ShortDescription; - type LongDescription = St::LongDescription; - type Visibility = St::Visibility; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type Visibility = St::Visibility; type CreatedAt = St::CreatedAt; - type Objectives = St::Objectives; + type LongDescription = St::LongDescription; type Country = St::Country; type DisplayName = Set; + type Objectives = St::Objectives; type ShortDescription = St::ShortDescription; - type LongDescription = St::LongDescription; + } + ///State transition - sets the `objectives` field to Set + pub struct SetObjectives(PhantomData St>); + impl sealed::Sealed for SetObjectives {} + impl State for SetObjectives { type Visibility = St::Visibility; + type CreatedAt = St::CreatedAt; + type LongDescription = St::LongDescription; + type Country = St::Country; + type DisplayName = St::DisplayName; + type Objectives = Set; + type ShortDescription = St::ShortDescription; } ///State transition - sets the `short_description` field to Set pub struct SetShortDescription(PhantomData St>); impl sealed::Sealed for SetShortDescription {} impl State for SetShortDescription { - type CreatedAt = St::CreatedAt; - type Objectives = St::Objectives; - type Country = St::Country; - type DisplayName = St::DisplayName; - type ShortDescription = Set; - type LongDescription = St::LongDescription; type Visibility = St::Visibility; - } - ///State transition - sets the `long_description` field to Set - pub struct SetLongDescription(PhantomData St>); - impl sealed::Sealed for SetLongDescription {} - impl State for SetLongDescription { type CreatedAt = St::CreatedAt; - type Objectives = St::Objectives; + type LongDescription = St::LongDescription; type Country = St::Country; type DisplayName = St::DisplayName; - type ShortDescription = St::ShortDescription; - type LongDescription = Set; - type Visibility = St::Visibility; - } - ///State transition - sets the `visibility` field to Set - pub struct SetVisibility(PhantomData St>); - impl sealed::Sealed for SetVisibility {} - impl State for SetVisibility { - type CreatedAt = St::CreatedAt; type Objectives = St::Objectives; - type Country = St::Country; - type DisplayName = St::DisplayName; - type ShortDescription = St::ShortDescription; - type LongDescription = St::LongDescription; - type Visibility = Set; + type ShortDescription = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `visibility` field + pub struct visibility(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `objectives` field - pub struct objectives(()); + ///Marker type for the `long_description` field + pub struct long_description(()); ///Marker type for the `country` field pub struct country(()); ///Marker type for the `display_name` field pub struct display_name(()); + ///Marker type for the `objectives` field + pub struct objectives(()); ///Marker type for the `short_description` field pub struct short_description(()); - ///Marker type for the `long_description` field - pub struct long_description(()); - ///Marker type for the `visibility` field - pub struct visibility(()); } } @@ -551,13 +551,13 @@ impl InfoBuilder { impl InfoBuilder where St: info_state::State, + St::Visibility: info_state::IsSet, St::CreatedAt: info_state::IsSet, - St::Objectives: info_state::IsSet, + St::LongDescription: info_state::IsSet, St::Country: info_state::IsSet, St::DisplayName: info_state::IsSet, + St::Objectives: info_state::IsSet, St::ShortDescription: info_state::IsSet, - St::LongDescription: info_state::IsSet, - St::Visibility: info_state::IsSet, { /// Build the final struct. pub fn build(self) -> Info { diff --git a/crates/jacquard-api/src/app_gainforest/organization/layer.rs b/crates/jacquard-api/src/app_gainforest/organization/layer.rs index 5f32155e5..40c6ea7d7 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/layer.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/layer.rs @@ -121,67 +121,67 @@ pub mod layer_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Uri; - type Name; type Type; + type Name; + type Uri; + 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 Uri = Unset; - type Name = Unset; type Type = Unset; + type Name = Unset; + type Uri = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Uri = St::Uri; + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Type = Set; type Name = St::Name; - type Type = St::Type; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Uri = St::Uri; type CreatedAt = St::CreatedAt; - type Uri = Set; - type Name = St::Name; - type Type = St::Type; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; - type Uri = St::Uri; - type Name = Set; type Type = St::Type; + type Name = Set; + type Uri = St::Uri; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Type = St::Type; + type Name = St::Name; + type Uri = Set; type CreatedAt = St::CreatedAt; - type Uri = St::Uri; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Type = St::Type; type Name = St::Name; - type Type = Set; + type Uri = St::Uri; + 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 `uri` field - pub struct uri(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -302,10 +302,10 @@ where impl LayerBuilder where St: layer_state::State, - St::CreatedAt: layer_state::IsSet, - St::Uri: layer_state::IsSet, - St::Name: layer_state::IsSet, St::Type: layer_state::IsSet, + St::Name: layer_state::IsSet, + St::Uri: layer_state::IsSet, + St::CreatedAt: layer_state::IsSet, { /// Build the final struct. pub fn build(self) -> Layer { diff --git a/crates/jacquard-api/src/app_gainforest/organization/observations/fauna.rs b/crates/jacquard-api/src/app_gainforest/organization/observations/fauna.rs index 6d21ed35e..b02dd0720 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/observations/fauna.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/observations/fauna.rs @@ -114,37 +114,37 @@ pub mod fauna_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GbifTaxonKeys; type CreatedAt; + type GbifTaxonKeys; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GbifTaxonKeys = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `gbif_taxon_keys` field to Set - pub struct SetGbifTaxonKeys(PhantomData St>); - impl sealed::Sealed for SetGbifTaxonKeys {} - impl State for SetGbifTaxonKeys { - type GbifTaxonKeys = Set; - type CreatedAt = St::CreatedAt; + type GbifTaxonKeys = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type GbifTaxonKeys = St::GbifTaxonKeys; type CreatedAt = Set; + type GbifTaxonKeys = St::GbifTaxonKeys; + } + ///State transition - sets the `gbif_taxon_keys` field to Set + pub struct SetGbifTaxonKeys(PhantomData St>); + impl sealed::Sealed for SetGbifTaxonKeys {} + impl State for SetGbifTaxonKeys { + type CreatedAt = St::CreatedAt; + type GbifTaxonKeys = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `gbif_taxon_keys` field - pub struct gbif_taxon_keys(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `gbif_taxon_keys` field + pub struct gbif_taxon_keys(()); } } @@ -214,8 +214,8 @@ where impl FaunaBuilder where St: fauna_state::State, - St::GbifTaxonKeys: fauna_state::IsSet, St::CreatedAt: fauna_state::IsSet, + St::GbifTaxonKeys: fauna_state::IsSet, { /// Build the final struct. pub fn build(self) -> Fauna { diff --git a/crates/jacquard-api/src/app_gainforest/organization/observations/measured_trees_cluster.rs b/crates/jacquard-api/src/app_gainforest/organization/observations/measured_trees_cluster.rs index 33dcefa8d..63ad77e83 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/observations/measured_trees_cluster.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/observations/measured_trees_cluster.rs @@ -115,37 +115,37 @@ pub mod measured_trees_cluster_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Shapefile; + 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 Shapefile = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Shapefile = St::Shapefile; + type CreatedAt = Unset; } ///State transition - sets the `shapefile` field to Set pub struct SetShapefile(PhantomData St>); impl sealed::Sealed for SetShapefile {} impl State for SetShapefile { - type CreatedAt = St::CreatedAt; type Shapefile = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Shapefile = St::Shapefile; + 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 `shapefile` field pub struct shapefile(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -218,8 +218,8 @@ where impl MeasuredTreesClusterBuilder where St: measured_trees_cluster_state::State, - St::CreatedAt: measured_trees_cluster_state::IsSet, St::Shapefile: measured_trees_cluster_state::IsSet, + St::CreatedAt: measured_trees_cluster_state::IsSet, { /// Build the final struct. pub fn build(self) -> MeasuredTreesCluster { diff --git a/crates/jacquard-api/src/app_gainforest/organization/predictions/fauna.rs b/crates/jacquard-api/src/app_gainforest/organization/predictions/fauna.rs index fadeb6f5a..9f4c2dd4a 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/predictions/fauna.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/predictions/fauna.rs @@ -114,37 +114,37 @@ pub mod fauna_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type GbifTaxonKeys; + 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 GbifTaxonKeys = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type GbifTaxonKeys = St::GbifTaxonKeys; + type CreatedAt = Unset; } ///State transition - sets the `gbif_taxon_keys` field to Set pub struct SetGbifTaxonKeys(PhantomData St>); impl sealed::Sealed for SetGbifTaxonKeys {} impl State for SetGbifTaxonKeys { - type CreatedAt = St::CreatedAt; type GbifTaxonKeys = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type GbifTaxonKeys = St::GbifTaxonKeys; + 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 `gbif_taxon_keys` field pub struct gbif_taxon_keys(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,8 +214,8 @@ where impl FaunaBuilder where St: fauna_state::State, - St::CreatedAt: fauna_state::IsSet, St::GbifTaxonKeys: fauna_state::IsSet, + St::CreatedAt: fauna_state::IsSet, { /// Build the final struct. pub fn build(self) -> Fauna { diff --git a/crates/jacquard-api/src/app_gainforest/organization/predictions/flora.rs b/crates/jacquard-api/src/app_gainforest/organization/predictions/flora.rs index c32781047..a8e448fdf 100644 --- a/crates/jacquard-api/src/app_gainforest/organization/predictions/flora.rs +++ b/crates/jacquard-api/src/app_gainforest/organization/predictions/flora.rs @@ -114,37 +114,37 @@ pub mod flora_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type GbifTaxonKeys; + 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 GbifTaxonKeys = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type GbifTaxonKeys = St::GbifTaxonKeys; + type CreatedAt = Unset; } ///State transition - sets the `gbif_taxon_keys` field to Set pub struct SetGbifTaxonKeys(PhantomData St>); impl sealed::Sealed for SetGbifTaxonKeys {} impl State for SetGbifTaxonKeys { - type CreatedAt = St::CreatedAt; type GbifTaxonKeys = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type GbifTaxonKeys = St::GbifTaxonKeys; + 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 `gbif_taxon_keys` field pub struct gbif_taxon_keys(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,8 +214,8 @@ where impl FloraBuilder where St: flora_state::State, - St::CreatedAt: flora_state::IsSet, St::GbifTaxonKeys: flora_state::IsSet, + St::CreatedAt: flora_state::IsSet, { /// Build the final struct. pub fn build(self) -> Flora { diff --git a/crates/jacquard-api/src/app_greengale/document.rs b/crates/jacquard-api/src/app_greengale/document.rs index 9747ab98f..60b556296 100644 --- a/crates/jacquard-api/src/app_greengale/document.rs +++ b/crates/jacquard-api/src/app_greengale/document.rs @@ -541,85 +541,85 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Title; + type PublishedAt; type Content; - type Url; type Path; - type PublishedAt; - type Title; + type Url; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Title = Unset; + type PublishedAt = Unset; type Content = Unset; - type Url = Unset; type Path = Unset; - type PublishedAt = Unset; - type Title = Unset; + type Url = Unset; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; + type PublishedAt = St::PublishedAt; + type Content = St::Content; + type Path = St::Path; + type Url = St::Url; + } + ///State transition - sets the `published_at` field to Set + pub struct SetPublishedAt(PhantomData St>); + impl sealed::Sealed for SetPublishedAt {} + impl State for SetPublishedAt { + type Title = St::Title; + type PublishedAt = Set; + type Content = St::Content; + type Path = St::Path; + type Url = St::Url; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Content = Set; - type Url = St::Url; - type Path = St::Path; - type PublishedAt = St::PublishedAt; type Title = St::Title; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Content = St::Content; - type Url = Set; - type Path = St::Path; type PublishedAt = St::PublishedAt; - type Title = St::Title; + type Content = Set; + type Path = St::Path; + type Url = St::Url; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData St>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Content = St::Content; - type Url = St::Url; - type Path = Set; - type PublishedAt = St::PublishedAt; type Title = St::Title; - } - ///State transition - sets the `published_at` field to Set - pub struct SetPublishedAt(PhantomData St>); - impl sealed::Sealed for SetPublishedAt {} - impl State for SetPublishedAt { + type PublishedAt = St::PublishedAt; type Content = St::Content; + type Path = Set; type Url = St::Url; - type Path = St::Path; - type PublishedAt = Set; - type Title = St::Title; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Title = St::Title; + type PublishedAt = St::PublishedAt; type Content = St::Content; - type Url = St::Url; type Path = St::Path; - type PublishedAt = St::PublishedAt; - type Title = Set; + type Url = 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 `published_at` field + pub struct published_at(()); ///Marker type for the `content` field pub struct content(()); - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `path` field pub struct path(()); - ///Marker type for the `published_at` field - pub struct published_at(()); - ///Marker type for the `title` field - pub struct title(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -863,11 +863,11 @@ impl DocumentBuilder { impl DocumentBuilder where St: document_state::State, + St::Title: document_state::IsSet, + St::PublishedAt: document_state::IsSet, St::Content: document_state::IsSet, - St::Url: document_state::IsSet, St::Path: document_state::IsSet, - St::PublishedAt: document_state::IsSet, - St::Title: document_state::IsSet, + St::Url: document_state::IsSet, { /// Build the final struct. pub fn build(self) -> Document { diff --git a/crates/jacquard-api/src/app_greengale/publication.rs b/crates/jacquard-api/src/app_greengale/publication.rs index df269b205..cf0cfac96 100644 --- a/crates/jacquard-api/src/app_greengale/publication.rs +++ b/crates/jacquard-api/src/app_greengale/publication.rs @@ -165,37 +165,37 @@ pub mod publication_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Name; + 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 Name = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Name = St::Name; + type Url = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Url = St::Url; type Name = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Name = St::Name; + 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 `name` field pub struct name(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -324,8 +324,8 @@ impl PublicationBuilder { impl PublicationBuilder where St: publication_state::State, - St::Url: publication_state::IsSet, St::Name: publication_state::IsSet, + St::Url: publication_state::IsSet, { /// Build the final struct. pub fn build(self) -> Publication { diff --git a/crates/jacquard-api/src/app_juttu/article_link.rs b/crates/jacquard-api/src/app_juttu/article_link.rs index 45aa576ba..353781f75 100644 --- a/crates/jacquard-api/src/app_juttu/article_link.rs +++ b/crates/jacquard-api/src/app_juttu/article_link.rs @@ -131,51 +131,51 @@ pub mod article_link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ArticleId; type CreatedAt; type CommentsThread; + type ArticleId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ArticleId = Unset; type CreatedAt = Unset; type CommentsThread = Unset; - } - ///State transition - sets the `article_id` field to Set - pub struct SetArticleId(PhantomData St>); - impl sealed::Sealed for SetArticleId {} - impl State for SetArticleId { - type ArticleId = Set; - type CreatedAt = St::CreatedAt; - type CommentsThread = St::CommentsThread; + type ArticleId = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type ArticleId = St::ArticleId; type CreatedAt = Set; type CommentsThread = St::CommentsThread; + type ArticleId = St::ArticleId; } ///State transition - sets the `comments_thread` field to Set pub struct SetCommentsThread(PhantomData St>); impl sealed::Sealed for SetCommentsThread {} impl State for SetCommentsThread { - type ArticleId = St::ArticleId; type CreatedAt = St::CreatedAt; type CommentsThread = Set; + type ArticleId = St::ArticleId; + } + ///State transition - sets the `article_id` field to Set + pub struct SetArticleId(PhantomData St>); + impl sealed::Sealed for SetArticleId {} + impl State for SetArticleId { + type CreatedAt = St::CreatedAt; + type CommentsThread = St::CommentsThread; + type ArticleId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `article_id` field - pub struct article_id(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `comments_thread` field pub struct comments_thread(()); + ///Marker type for the `article_id` field + pub struct article_id(()); } } @@ -277,9 +277,9 @@ where impl ArticleLinkBuilder where St: article_link_state::State, - St::ArticleId: article_link_state::IsSet, St::CreatedAt: article_link_state::IsSet, St::CommentsThread: article_link_state::IsSet, + St::ArticleId: article_link_state::IsSet, { /// Build the final struct. pub fn build(self) -> ArticleLink { diff --git a/crates/jacquard-api/src/app_mathr/leaderboard/entry.rs b/crates/jacquard-api/src/app_mathr/leaderboard/entry.rs index 8fb2a19a2..8dac137fb 100644 --- a/crates/jacquard-api/src/app_mathr/leaderboard/entry.rs +++ b/crates/jacquard-api/src/app_mathr/leaderboard/entry.rs @@ -183,85 +183,85 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PlayerDid; - type CreatedAt; - type TotalChallenges; type Level; type TotalSuccesses; + type PlayerDid; + type TotalChallenges; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PlayerDid = Unset; - type CreatedAt = Unset; - type TotalChallenges = Unset; type Level = Unset; type TotalSuccesses = Unset; + type PlayerDid = Unset; + type TotalChallenges = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `level` field to Set + pub struct SetLevel(PhantomData St>); + impl sealed::Sealed for SetLevel {} + impl State for SetLevel { + type Level = Set; + type TotalSuccesses = St::TotalSuccesses; + type PlayerDid = St::PlayerDid; + type TotalChallenges = St::TotalChallenges; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `total_successes` field to Set + pub struct SetTotalSuccesses(PhantomData St>); + impl sealed::Sealed for SetTotalSuccesses {} + impl State for SetTotalSuccesses { + type Level = St::Level; + type TotalSuccesses = Set; + type PlayerDid = St::PlayerDid; + type TotalChallenges = St::TotalChallenges; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `player_did` field to Set pub struct SetPlayerDid(PhantomData St>); impl sealed::Sealed for SetPlayerDid {} impl State for SetPlayerDid { - type PlayerDid = Set; - type CreatedAt = St::CreatedAt; - type TotalChallenges = St::TotalChallenges; type Level = St::Level; type TotalSuccesses = St::TotalSuccesses; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type PlayerDid = St::PlayerDid; - type CreatedAt = Set; + type PlayerDid = Set; type TotalChallenges = St::TotalChallenges; - type Level = St::Level; - type TotalSuccesses = St::TotalSuccesses; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `total_challenges` field to Set pub struct SetTotalChallenges(PhantomData St>); impl sealed::Sealed for SetTotalChallenges {} impl State for SetTotalChallenges { - type PlayerDid = St::PlayerDid; - type CreatedAt = St::CreatedAt; - type TotalChallenges = Set; type Level = St::Level; type TotalSuccesses = St::TotalSuccesses; - } - ///State transition - sets the `level` field to Set - pub struct SetLevel(PhantomData St>); - impl sealed::Sealed for SetLevel {} - impl State for SetLevel { type PlayerDid = St::PlayerDid; + type TotalChallenges = Set; type CreatedAt = St::CreatedAt; - type TotalChallenges = St::TotalChallenges; - type Level = Set; - type TotalSuccesses = St::TotalSuccesses; } - ///State transition - sets the `total_successes` field to Set - pub struct SetTotalSuccesses(PhantomData St>); - impl sealed::Sealed for SetTotalSuccesses {} - impl State for SetTotalSuccesses { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Level = St::Level; + type TotalSuccesses = St::TotalSuccesses; type PlayerDid = St::PlayerDid; - type CreatedAt = St::CreatedAt; type TotalChallenges = St::TotalChallenges; - type Level = St::Level; - type TotalSuccesses = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `player_did` field - pub struct player_did(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `total_challenges` field - pub struct total_challenges(()); ///Marker type for the `level` field pub struct level(()); ///Marker type for the `total_successes` field pub struct total_successes(()); + ///Marker type for the `player_did` field + pub struct player_did(()); + ///Marker type for the `total_challenges` field + pub struct total_challenges(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -464,11 +464,11 @@ where impl EntryBuilder where St: entry_state::State, - St::PlayerDid: entry_state::IsSet, - St::CreatedAt: entry_state::IsSet, - St::TotalChallenges: entry_state::IsSet, St::Level: entry_state::IsSet, St::TotalSuccesses: entry_state::IsSet, + St::PlayerDid: entry_state::IsSet, + St::TotalChallenges: entry_state::IsSet, + St::CreatedAt: entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> Entry { diff --git a/crates/jacquard-api/src/app_mathr/score.rs b/crates/jacquard-api/src/app_mathr/score.rs index 7a4b3a7b7..9eba7c04c 100644 --- a/crates/jacquard-api/src/app_mathr/score.rs +++ b/crates/jacquard-api/src/app_mathr/score.rs @@ -170,66 +170,66 @@ pub mod score_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Level; + type TotalSuccesses; type CreatedAt; type TotalChallenges; - type TotalSuccesses; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Level = Unset; + type TotalSuccesses = Unset; type CreatedAt = Unset; type TotalChallenges = Unset; - type TotalSuccesses = Unset; } ///State transition - sets the `level` field to Set pub struct SetLevel(PhantomData St>); impl sealed::Sealed for SetLevel {} impl State for SetLevel { type Level = Set; + type TotalSuccesses = St::TotalSuccesses; + type CreatedAt = St::CreatedAt; + type TotalChallenges = St::TotalChallenges; + } + ///State transition - sets the `total_successes` field to Set + pub struct SetTotalSuccesses(PhantomData St>); + impl sealed::Sealed for SetTotalSuccesses {} + impl State for SetTotalSuccesses { + type Level = St::Level; + type TotalSuccesses = Set; type CreatedAt = St::CreatedAt; type TotalChallenges = St::TotalChallenges; - type TotalSuccesses = St::TotalSuccesses; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Level = St::Level; + type TotalSuccesses = St::TotalSuccesses; type CreatedAt = Set; type TotalChallenges = St::TotalChallenges; - type TotalSuccesses = St::TotalSuccesses; } ///State transition - sets the `total_challenges` field to Set pub struct SetTotalChallenges(PhantomData St>); impl sealed::Sealed for SetTotalChallenges {} impl State for SetTotalChallenges { type Level = St::Level; - type CreatedAt = St::CreatedAt; - type TotalChallenges = Set; type TotalSuccesses = St::TotalSuccesses; - } - ///State transition - sets the `total_successes` field to Set - pub struct SetTotalSuccesses(PhantomData St>); - impl sealed::Sealed for SetTotalSuccesses {} - impl State for SetTotalSuccesses { - type Level = St::Level; type CreatedAt = St::CreatedAt; - type TotalChallenges = St::TotalChallenges; - type TotalSuccesses = Set; + type TotalChallenges = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `level` field pub struct level(()); + ///Marker type for the `total_successes` field + pub struct total_successes(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `total_challenges` field pub struct total_challenges(()); - ///Marker type for the `total_successes` field - pub struct total_successes(()); } } @@ -351,9 +351,9 @@ impl ScoreBuilder where St: score_state::State, St::Level: score_state::IsSet, + St::TotalSuccesses: score_state::IsSet, St::CreatedAt: score_state::IsSet, St::TotalChallenges: score_state::IsSet, - St::TotalSuccesses: score_state::IsSet, { /// Build the final struct. pub fn build(self) -> Score { diff --git a/crates/jacquard-api/src/app_nblr/feed/collection.rs b/crates/jacquard-api/src/app_nblr/feed/collection.rs index 87794834c..874277ba2 100644 --- a/crates/jacquard-api/src/app_nblr/feed/collection.rs +++ b/crates/jacquard-api/src/app_nblr/feed/collection.rs @@ -137,37 +137,37 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -237,8 +237,8 @@ where impl CollectionBuilder where St: collection_state::State, - St::Name: collection_state::IsSet, St::CreatedAt: collection_state::IsSet, + St::Name: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/app_nblr/feed/link.rs b/crates/jacquard-api/src/app_nblr/feed/link.rs index 78b3d39bb..fe81cbcfa 100644 --- a/crates/jacquard-api/src/app_nblr/feed/link.rs +++ b/crates/jacquard-api/src/app_nblr/feed/link.rs @@ -115,51 +115,51 @@ pub mod link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Uri; type Collection; + 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 Uri = Unset; type Collection = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Uri = St::Uri; - type Collection = St::Collection; + type CreatedAt = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type CreatedAt = St::CreatedAt; type Uri = Set; type Collection = St::Collection; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type CreatedAt = St::CreatedAt; type Uri = St::Uri; type Collection = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Uri = St::Uri; + type Collection = St::Collection; + 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 `uri` field pub struct uri(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -248,9 +248,9 @@ where impl LinkBuilder where St: link_state::State, - St::CreatedAt: link_state::IsSet, St::Uri: link_state::IsSet, St::Collection: link_state::IsSet, + St::CreatedAt: link_state::IsSet, { /// Build the final struct. pub fn build(self) -> Link { diff --git a/crates/jacquard-api/src/app_ocho/auth.rs b/crates/jacquard-api/src/app_ocho/auth.rs index 596eb022b..8981d6834 100644 --- a/crates/jacquard-api/src/app_ocho/auth.rs +++ b/crates/jacquard-api/src/app_ocho/auth.rs @@ -72,66 +72,66 @@ pub mod auth_callback_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type AccessJwt; - type Handle; type Did; type RefreshJwt; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type AccessJwt = Unset; - type Handle = Unset; type Did = Unset; type RefreshJwt = Unset; + type Handle = Unset; } ///State transition - sets the `access_jwt` field to Set pub struct SetAccessJwt(PhantomData St>); impl sealed::Sealed for SetAccessJwt {} impl State for SetAccessJwt { type AccessJwt = Set; - type Handle = St::Handle; - type Did = St::Did; - type RefreshJwt = St::RefreshJwt; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type AccessJwt = St::AccessJwt; - type Handle = Set; type Did = St::Did; type RefreshJwt = St::RefreshJwt; + type Handle = St::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type AccessJwt = St::AccessJwt; - type Handle = St::Handle; type Did = Set; type RefreshJwt = St::RefreshJwt; + type Handle = St::Handle; } ///State transition - sets the `refresh_jwt` field to Set pub struct SetRefreshJwt(PhantomData St>); impl sealed::Sealed for SetRefreshJwt {} impl State for SetRefreshJwt { type AccessJwt = St::AccessJwt; - type Handle = St::Handle; type Did = St::Did; type RefreshJwt = Set; + type Handle = St::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type AccessJwt = St::AccessJwt; + type Did = St::Did; + type RefreshJwt = St::RefreshJwt; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `access_jwt` field pub struct access_jwt(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `refresh_jwt` field pub struct refresh_jwt(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -240,9 +240,9 @@ impl AuthCallbackBuilder where St: auth_callback_state::State, St::AccessJwt: auth_callback_state::IsSet, - St::Handle: auth_callback_state::IsSet, St::Did: auth_callback_state::IsSet, St::RefreshJwt: auth_callback_state::IsSet, + St::Handle: auth_callback_state::IsSet, { /// Build the final struct. pub fn build(self) -> AuthCallback { diff --git a/crates/jacquard-api/src/app_ocho/auth/at_proto_callback.rs b/crates/jacquard-api/src/app_ocho/auth/at_proto_callback.rs index aa106ba9e..7a33340f5 100644 --- a/crates/jacquard-api/src/app_ocho/auth/at_proto_callback.rs +++ b/crates/jacquard-api/src/app_ocho/auth/at_proto_callback.rs @@ -59,50 +59,50 @@ pub mod at_proto_callback_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type State; - type Iss; type Code; + type Iss; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type State = Unset; - type Iss = Unset; type Code = Unset; + type Iss = Unset; } ///State transition - sets the `state` field to Set pub struct SetState(PhantomData St>); impl sealed::Sealed for SetState {} impl State for SetState { type State = Set; - type Iss = St::Iss; - type Code = St::Code; - } - ///State transition - sets the `iss` field to Set - pub struct SetIss(PhantomData St>); - impl sealed::Sealed for SetIss {} - impl State for SetIss { - type State = St::State; - type Iss = Set; type Code = St::Code; + type Iss = St::Iss; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData St>); impl sealed::Sealed for SetCode {} impl State for SetCode { type State = St::State; - type Iss = St::Iss; type Code = Set; + type Iss = St::Iss; + } + ///State transition - sets the `iss` field to Set + pub struct SetIss(PhantomData St>); + impl sealed::Sealed for SetIss {} + impl State for SetIss { + type State = St::State; + type Code = St::Code; + type Iss = 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 `iss` field - pub struct iss(()); ///Marker type for the `code` field pub struct code(()); + ///Marker type for the `iss` field + pub struct iss(()); } } @@ -192,8 +192,8 @@ impl AtProtoCallbackBuilder where St: at_proto_callback_state::State, St::State: at_proto_callback_state::IsSet, - St::Iss: at_proto_callback_state::IsSet, St::Code: at_proto_callback_state::IsSet, + St::Iss: at_proto_callback_state::IsSet, { /// Build the final struct. pub fn build(self) -> AtProtoCallback { diff --git a/crates/jacquard-api/src/app_ocho/auth/authorize.rs b/crates/jacquard-api/src/app_ocho/auth/authorize.rs index c37746c34..541d7092e 100644 --- a/crates/jacquard-api/src/app_ocho/auth/authorize.rs +++ b/crates/jacquard-api/src/app_ocho/auth/authorize.rs @@ -72,37 +72,37 @@ pub mod authorize_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AuthorizeOptions; type Input; + type AuthorizeOptions; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AuthorizeOptions = Unset; type Input = Unset; - } - ///State transition - sets the `authorize_options` field to Set - pub struct SetAuthorizeOptions(PhantomData St>); - impl sealed::Sealed for SetAuthorizeOptions {} - impl State for SetAuthorizeOptions { - type AuthorizeOptions = Set; - type Input = St::Input; + type AuthorizeOptions = Unset; } ///State transition - sets the `input` field to Set pub struct SetInput(PhantomData St>); impl sealed::Sealed for SetInput {} impl State for SetInput { - type AuthorizeOptions = St::AuthorizeOptions; type Input = Set; + type AuthorizeOptions = St::AuthorizeOptions; + } + ///State transition - sets the `authorize_options` field to Set + pub struct SetAuthorizeOptions(PhantomData St>); + impl sealed::Sealed for SetAuthorizeOptions {} + impl State for SetAuthorizeOptions { + type Input = St::Input; + type AuthorizeOptions = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `authorize_options` field - pub struct authorize_options(()); ///Marker type for the `input` field pub struct input(()); + ///Marker type for the `authorize_options` field + pub struct authorize_options(()); } } @@ -172,8 +172,8 @@ where impl AuthorizeBuilder where St: authorize_state::State, - St::AuthorizeOptions: authorize_state::IsSet, St::Input: authorize_state::IsSet, + St::AuthorizeOptions: authorize_state::IsSet, { /// Build the final struct. pub fn build(self) -> Authorize { diff --git a/crates/jacquard-api/src/app_ocho/edu/google_callback.rs b/crates/jacquard-api/src/app_ocho/edu/google_callback.rs index b07e81aba..dd56cfa2a 100644 --- a/crates/jacquard-api/src/app_ocho/edu/google_callback.rs +++ b/crates/jacquard-api/src/app_ocho/edu/google_callback.rs @@ -57,37 +57,37 @@ pub mod google_callback_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Code; type State; + type Code; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Code = Unset; type State = Unset; - } - ///State transition - sets the `code` field to Set - pub struct SetCode(PhantomData St>); - impl sealed::Sealed for SetCode {} - impl State for SetCode { - type Code = Set; - type State = St::State; + type Code = Unset; } ///State transition - sets the `state` field to Set pub struct SetState(PhantomData St>); impl sealed::Sealed for SetState {} impl State for SetState { - type Code = St::Code; type State = Set; + type Code = St::Code; + } + ///State transition - sets the `code` field to Set + pub struct SetCode(PhantomData St>); + impl sealed::Sealed for SetCode {} + impl State for SetCode { + type State = St::State; + type Code = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `code` field - pub struct code(()); ///Marker type for the `state` field pub struct state(()); + ///Marker type for the `code` field + pub struct code(()); } } @@ -157,8 +157,8 @@ where impl GoogleCallbackBuilder where St: google_callback_state::State, - St::Code: google_callback_state::IsSet, St::State: google_callback_state::IsSet, + St::Code: google_callback_state::IsSet, { /// Build the final struct. pub fn build(self) -> GoogleCallback { diff --git a/crates/jacquard-api/src/app_ocho/edu/verification.rs b/crates/jacquard-api/src/app_ocho/edu/verification.rs index 2486fdd4c..2ae0ee5e1 100644 --- a/crates/jacquard-api/src/app_ocho/edu/verification.rs +++ b/crates/jacquard-api/src/app_ocho/edu/verification.rs @@ -116,51 +116,51 @@ pub mod verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subject; type Domain; 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 Domain = Unset; type CreatedAt = Unset; - type Subject = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type Domain = St::Domain; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `domain` field to Set pub struct SetDomain(PhantomData St>); impl sealed::Sealed for SetDomain {} impl State for SetDomain { + type Subject = St::Subject; type Domain = Set; type CreatedAt = St::CreatedAt; - type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Domain = St::Domain; - type CreatedAt = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { type Domain = St::Domain; - type CreatedAt = St::CreatedAt; - type Subject = Set; + 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 `domain` field pub struct domain(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `subject` field - pub struct subject(()); } } @@ -249,9 +249,9 @@ where impl VerificationBuilder where St: verification_state::State, + St::Subject: verification_state::IsSet, St::Domain: verification_state::IsSet, St::CreatedAt: verification_state::IsSet, - St::Subject: verification_state::IsSet, { /// Build the final struct. pub fn build(self) -> Verification { diff --git a/crates/jacquard-api/src/app_ocho/payment/get_stripe_intent.rs b/crates/jacquard-api/src/app_ocho/payment/get_stripe_intent.rs index 1567b2db1..cc22f6081 100644 --- a/crates/jacquard-api/src/app_ocho/payment/get_stripe_intent.rs +++ b/crates/jacquard-api/src/app_ocho/payment/get_stripe_intent.rs @@ -80,51 +80,51 @@ pub mod get_stripe_intent_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Iss; - type Amount; type Id; + type Amount; + type Iss; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Iss = Unset; - type Amount = Unset; type Id = Unset; + type Amount = Unset; + type Iss = Unset; } - ///State transition - sets the `iss` field to Set - pub struct SetIss(PhantomData St>); - impl sealed::Sealed for SetIss {} - impl State for SetIss { - type Iss = Set; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; type Amount = St::Amount; - type Id = St::Id; + type Iss = St::Iss; } ///State transition - sets the `amount` field to Set pub struct SetAmount(PhantomData St>); impl sealed::Sealed for SetAmount {} impl State for SetAmount { - type Iss = St::Iss; - type Amount = Set; type Id = St::Id; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { + type Amount = Set; type Iss = St::Iss; + } + ///State transition - sets the `iss` field to Set + pub struct SetIss(PhantomData St>); + impl sealed::Sealed for SetIss {} + impl State for SetIss { + type Id = St::Id; type Amount = St::Amount; - type Id = Set; + type Iss = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `iss` field - pub struct iss(()); - ///Marker type for the `amount` field - pub struct amount(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `amount` field + pub struct amount(()); + ///Marker type for the `iss` field + pub struct iss(()); } } @@ -226,9 +226,9 @@ impl GetStripeIntentBuilder GetStripeIntentBuilder where St: get_stripe_intent_state::State, - St::Iss: get_stripe_intent_state::IsSet, - St::Amount: get_stripe_intent_state::IsSet, St::Id: get_stripe_intent_state::IsSet, + St::Amount: get_stripe_intent_state::IsSet, + St::Iss: get_stripe_intent_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetStripeIntent { diff --git a/crates/jacquard-api/src/app_ocho/plugin.rs b/crates/jacquard-api/src/app_ocho/plugin.rs index eeefa4034..467751336 100644 --- a/crates/jacquard-api/src/app_ocho/plugin.rs +++ b/crates/jacquard-api/src/app_ocho/plugin.rs @@ -1099,51 +1099,51 @@ pub mod asset_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Hash; type Blob; type Type; + type Hash; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Hash = Unset; type Blob = Unset; type Type = Unset; - } - ///State transition - sets the `hash` field to Set - pub struct SetHash(PhantomData St>); - impl sealed::Sealed for SetHash {} - impl State for SetHash { - type Hash = Set; - type Blob = St::Blob; - type Type = St::Type; + type Hash = Unset; } ///State transition - sets the `blob` field to Set pub struct SetBlob(PhantomData St>); impl sealed::Sealed for SetBlob {} impl State for SetBlob { - type Hash = St::Hash; type Blob = Set; type Type = St::Type; + type Hash = St::Hash; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Hash = St::Hash; type Blob = St::Blob; type Type = Set; + type Hash = St::Hash; + } + ///State transition - sets the `hash` field to Set + pub struct SetHash(PhantomData St>); + impl sealed::Sealed for SetHash {} + impl State for SetHash { + type Blob = St::Blob; + type Type = St::Type; + type Hash = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `hash` field - pub struct hash(()); ///Marker type for the `blob` field pub struct blob(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `hash` field + pub struct hash(()); } } @@ -1245,9 +1245,9 @@ impl AssetBuilder { impl AssetBuilder where St: asset_state::State, - St::Hash: asset_state::IsSet, St::Blob: asset_state::IsSet, St::Type: asset_state::IsSet, + St::Hash: asset_state::IsSet, { /// Build the final struct. pub fn build(self) -> Asset { @@ -1548,105 +1548,105 @@ pub mod manifest_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RuntimeVersion; type LaunchAsset; - type Extra; - type CreatedAt; type Metadata; + type Extra; type Id; + type CreatedAt; + type RuntimeVersion; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RuntimeVersion = Unset; type LaunchAsset = Unset; - type Extra = Unset; - type CreatedAt = Unset; type Metadata = Unset; + type Extra = Unset; type Id = Unset; - } - ///State transition - sets the `runtime_version` field to Set - pub struct SetRuntimeVersion(PhantomData St>); - impl sealed::Sealed for SetRuntimeVersion {} - impl State for SetRuntimeVersion { - type RuntimeVersion = Set; - type LaunchAsset = St::LaunchAsset; - type Extra = St::Extra; - type CreatedAt = St::CreatedAt; - type Metadata = St::Metadata; - type Id = St::Id; + type CreatedAt = Unset; + type RuntimeVersion = Unset; } ///State transition - sets the `launch_asset` field to Set pub struct SetLaunchAsset(PhantomData St>); impl sealed::Sealed for SetLaunchAsset {} impl State for SetLaunchAsset { - type RuntimeVersion = St::RuntimeVersion; type LaunchAsset = Set; + type Metadata = St::Metadata; type Extra = St::Extra; + type Id = St::Id; type CreatedAt = St::CreatedAt; - type Metadata = St::Metadata; + type RuntimeVersion = St::RuntimeVersion; + } + ///State transition - sets the `metadata` field to Set + pub struct SetMetadata(PhantomData St>); + impl sealed::Sealed for SetMetadata {} + impl State for SetMetadata { + type LaunchAsset = St::LaunchAsset; + type Metadata = Set; + type Extra = St::Extra; type Id = St::Id; + type CreatedAt = St::CreatedAt; + type RuntimeVersion = St::RuntimeVersion; } ///State transition - sets the `extra` field to Set pub struct SetExtra(PhantomData St>); impl sealed::Sealed for SetExtra {} impl State for SetExtra { - type RuntimeVersion = St::RuntimeVersion; type LaunchAsset = St::LaunchAsset; + type Metadata = St::Metadata; type Extra = Set; + type Id = St::Id; type CreatedAt = St::CreatedAt; + type RuntimeVersion = St::RuntimeVersion; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type LaunchAsset = St::LaunchAsset; type Metadata = St::Metadata; - type Id = St::Id; + type Extra = St::Extra; + type Id = Set; + type CreatedAt = St::CreatedAt; + type RuntimeVersion = St::RuntimeVersion; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type RuntimeVersion = St::RuntimeVersion; type LaunchAsset = St::LaunchAsset; - type Extra = St::Extra; - type CreatedAt = Set; type Metadata = St::Metadata; - type Id = St::Id; - } - ///State transition - sets the `metadata` field to Set - pub struct SetMetadata(PhantomData St>); - impl sealed::Sealed for SetMetadata {} - impl State for SetMetadata { - type RuntimeVersion = St::RuntimeVersion; - type LaunchAsset = St::LaunchAsset; type Extra = St::Extra; - type CreatedAt = St::CreatedAt; - type Metadata = Set; type Id = St::Id; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { + type CreatedAt = Set; type RuntimeVersion = St::RuntimeVersion; + } + ///State transition - sets the `runtime_version` field to Set + pub struct SetRuntimeVersion(PhantomData St>); + impl sealed::Sealed for SetRuntimeVersion {} + impl State for SetRuntimeVersion { type LaunchAsset = St::LaunchAsset; + type Metadata = St::Metadata; type Extra = St::Extra; + type Id = St::Id; type CreatedAt = St::CreatedAt; - type Metadata = St::Metadata; - type Id = Set; + type RuntimeVersion = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `runtime_version` field - pub struct runtime_version(()); ///Marker type for the `launch_asset` field pub struct launch_asset(()); - ///Marker type for the `extra` field - pub struct extra(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `metadata` field pub struct metadata(()); + ///Marker type for the `extra` field + pub struct extra(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `runtime_version` field + pub struct runtime_version(()); } } @@ -1799,12 +1799,12 @@ where impl ManifestBuilder where St: manifest_state::State, - St::RuntimeVersion: manifest_state::IsSet, St::LaunchAsset: manifest_state::IsSet, - St::Extra: manifest_state::IsSet, - St::CreatedAt: manifest_state::IsSet, St::Metadata: manifest_state::IsSet, + St::Extra: manifest_state::IsSet, St::Id: manifest_state::IsSet, + St::CreatedAt: manifest_state::IsSet, + St::RuntimeVersion: manifest_state::IsSet, { /// Build the final struct. pub fn build(self) -> Manifest { diff --git a/crates/jacquard-api/src/app_offprint/block/image.rs b/crates/jacquard-api/src/app_offprint/block/image.rs index d11f17066..6e3d0de32 100644 --- a/crates/jacquard-api/src/app_offprint/block/image.rs +++ b/crates/jacquard-api/src/app_offprint/block/image.rs @@ -173,37 +173,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = St::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = St::Width; type Height = Set; + type Width = St::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = St::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(()); } } @@ -273,8 +273,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Width: aspect_ratio_state::IsSet, St::Height: aspect_ratio_state::IsSet, + St::Width: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { diff --git a/crates/jacquard-api/src/app_offprint/block/web_bookmark.rs b/crates/jacquard-api/src/app_offprint/block/web_bookmark.rs index b87ed9da3..3ad17c40f 100644 --- a/crates/jacquard-api/src/app_offprint/block/web_bookmark.rs +++ b/crates/jacquard-api/src/app_offprint/block/web_bookmark.rs @@ -146,37 +146,37 @@ pub mod web_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Href; type Title; + type Href; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Href = Unset; type Title = Unset; - } - ///State transition - sets the `href` field to Set - pub struct SetHref(PhantomData St>); - impl sealed::Sealed for SetHref {} - impl State for SetHref { - type Href = Set; - type Title = St::Title; + type Href = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Href = St::Href; type Title = Set; + type Href = St::Href; + } + ///State transition - sets the `href` field to Set + pub struct SetHref(PhantomData St>); + impl sealed::Sealed for SetHref {} + impl State for SetHref { + type Title = St::Title; + type Href = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `href` field - pub struct href(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `href` field + pub struct href(()); } } @@ -285,8 +285,8 @@ where impl WebBookmarkBuilder where St: web_bookmark_state::State, - St::Href: web_bookmark_state::IsSet, St::Title: web_bookmark_state::IsSet, + St::Href: web_bookmark_state::IsSet, { /// Build the final struct. pub fn build(self) -> WebBookmark { diff --git a/crates/jacquard-api/src/app_openmkt/marketplace/listing.rs b/crates/jacquard-api/src/app_openmkt/marketplace/listing.rs index b24eea5cb..070436cea 100644 --- a/crates/jacquard-api/src/app_openmkt/marketplace/listing.rs +++ b/crates/jacquard-api/src/app_openmkt/marketplace/listing.rs @@ -379,85 +379,85 @@ pub mod listing_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Category; - type CreatedAt; - type Title; type Price; + type Category; type Location; + type Title; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Category = Unset; - type CreatedAt = Unset; - type Title = Unset; type Price = Unset; + type Category = Unset; type Location = Unset; + type Title = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `price` field to Set + pub struct SetPrice(PhantomData St>); + impl sealed::Sealed for SetPrice {} + impl State for SetPrice { + type Price = Set; + type Category = St::Category; + type Location = St::Location; + type Title = St::Title; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `category` field to Set pub struct SetCategory(PhantomData St>); impl sealed::Sealed for SetCategory {} impl State for SetCategory { - type Category = Set; - type CreatedAt = St::CreatedAt; - type Title = St::Title; type Price = St::Price; + type Category = Set; type Location = St::Location; + type Title = St::Title; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `location` field to Set + pub struct SetLocation(PhantomData St>); + impl sealed::Sealed for SetLocation {} + impl State for SetLocation { + type Price = St::Price; type Category = St::Category; - type CreatedAt = Set; + type Location = Set; type Title = St::Title; - type Price = St::Price; - type Location = St::Location; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Category = St::Category; - type CreatedAt = St::CreatedAt; - type Title = Set; type Price = St::Price; - type Location = St::Location; - } - ///State transition - sets the `price` field to Set - pub struct SetPrice(PhantomData St>); - impl sealed::Sealed for SetPrice {} - impl State for SetPrice { type Category = St::Category; - type CreatedAt = St::CreatedAt; - type Title = St::Title; - type Price = Set; type Location = St::Location; + type Title = Set; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `location` field to Set - pub struct SetLocation(PhantomData St>); - impl sealed::Sealed for SetLocation {} - impl State for SetLocation { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Price = St::Price; type Category = St::Category; - type CreatedAt = St::CreatedAt; + type Location = St::Location; type Title = St::Title; - type Price = St::Price; - type Location = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `category` field - pub struct category(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `price` field pub struct price(()); + ///Marker type for the `category` field + pub struct category(()); ///Marker type for the `location` field pub struct location(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -677,11 +677,11 @@ where impl ListingBuilder where St: listing_state::State, - St::Category: listing_state::IsSet, - St::CreatedAt: listing_state::IsSet, - St::Title: listing_state::IsSet, St::Price: listing_state::IsSet, + St::Category: listing_state::IsSet, St::Location: listing_state::IsSet, + St::Title: listing_state::IsSet, + St::CreatedAt: listing_state::IsSet, { /// Build the final struct. pub fn build(self) -> Listing { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/allowlist.rs b/crates/jacquard-api/src/app_protoimsg/chat/allowlist.rs index 7b11ebb54..c94b15e54 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/allowlist.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/allowlist.rs @@ -116,51 +116,51 @@ pub mod allowlist_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; type Room; + 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; type Room = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; - type Room = St::Room; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; type Room = St::Room; + type Subject = St::Subject; } ///State transition - sets the `room` field to Set pub struct SetRoom(PhantomData St>); impl sealed::Sealed for SetRoom {} impl State for SetRoom { - type Subject = St::Subject; type CreatedAt = St::CreatedAt; type Room = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::CreatedAt; + type Room = St::Room; + 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 `room` field pub struct room(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -249,9 +249,9 @@ where impl AllowlistBuilder where St: allowlist_state::State, - St::Subject: allowlist_state::IsSet, St::CreatedAt: allowlist_state::IsSet, St::Room: allowlist_state::IsSet, + St::Subject: allowlist_state::IsSet, { /// Build the final struct. pub fn build(self) -> Allowlist { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/auth_verify.rs b/crates/jacquard-api/src/app_protoimsg/chat/auth_verify.rs index d4ee81734..122b224cb 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/auth_verify.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/auth_verify.rs @@ -114,37 +114,37 @@ pub mod auth_verify_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Nonce; type CreatedAt; + type Nonce; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Nonce = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `nonce` field to Set - pub struct SetNonce(PhantomData St>); - impl sealed::Sealed for SetNonce {} - impl State for SetNonce { - type Nonce = Set; - type CreatedAt = St::CreatedAt; + type Nonce = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Nonce = St::Nonce; type CreatedAt = Set; + type Nonce = St::Nonce; + } + ///State transition - sets the `nonce` field to Set + pub struct SetNonce(PhantomData St>); + impl sealed::Sealed for SetNonce {} + impl State for SetNonce { + type CreatedAt = St::CreatedAt; + type Nonce = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `nonce` field - pub struct nonce(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `nonce` field + pub struct nonce(()); } } @@ -214,8 +214,8 @@ where impl AuthVerifyBuilder where St: auth_verify_state::State, - St::Nonce: auth_verify_state::IsSet, St::CreatedAt: auth_verify_state::IsSet, + St::Nonce: auth_verify_state::IsSet, { /// Build the final struct. pub fn build(self) -> AuthVerify { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/ban.rs b/crates/jacquard-api/src/app_protoimsg/chat/ban.rs index 1f783dab6..24c922291 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/ban.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/ban.rs @@ -130,50 +130,50 @@ pub mod ban_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Room; - 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 Room = Unset; - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; } ///State transition - sets the `room` field to Set pub struct SetRoom(PhantomData St>); impl sealed::Sealed for SetRoom {} impl State for SetRoom { type Room = Set; - type Subject = St::Subject; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Room = St::Room; - type Subject = Set; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Room = St::Room; - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Room = St::Room; + type CreatedAt = St::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `room` field pub struct room(()); - ///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(()); } } @@ -276,8 +276,8 @@ impl BanBuilder where St: ban_state::State, St::Room: ban_state::IsSet, - St::Subject: ban_state::IsSet, St::CreatedAt: ban_state::IsSet, + St::Subject: ban_state::IsSet, { /// Build the final struct. pub fn build(self) -> Ban { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/channel.rs b/crates/jacquard-api/src/app_protoimsg/chat/channel.rs index 4214e9cf5..5515429a4 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/channel.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/channel.rs @@ -238,51 +238,51 @@ pub mod channel_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Room; type Name; type CreatedAt; - type Room; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Room = Unset; type Name = Unset; type CreatedAt = Unset; - type Room = Unset; + } + ///State transition - sets the `room` field to Set + pub struct SetRoom(PhantomData St>); + impl sealed::Sealed for SetRoom {} + impl State for SetRoom { + type Room = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Room = St::Room; type Name = Set; type CreatedAt = St::CreatedAt; - type Room = St::Room; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; - type CreatedAt = Set; type Room = St::Room; - } - ///State transition - sets the `room` field to Set - pub struct SetRoom(PhantomData St>); - impl sealed::Sealed for SetRoom {} - impl State for SetRoom { type Name = St::Name; - type CreatedAt = St::CreatedAt; - type Room = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `room` field + pub struct room(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `room` field - pub struct room(()); } } @@ -420,9 +420,9 @@ where impl ChannelBuilder where St: channel_state::State, + St::Room: channel_state::IsSet, St::Name: channel_state::IsSet, St::CreatedAt: channel_state::IsSet, - St::Room: channel_state::IsSet, { /// Build the final struct. pub fn build(self) -> Channel { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/message.rs b/crates/jacquard-api/src/app_protoimsg/chat/message.rs index 7bda2f6f6..15f602859 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/message.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/message.rs @@ -937,37 +937,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 St>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = St::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData St>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = St::Height; type Width = Set; + type Height = St::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData St>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = St::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(()); } } @@ -1037,8 +1037,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Height: aspect_ratio_state::IsSet, St::Width: aspect_ratio_state::IsSet, + St::Height: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { @@ -1792,37 +1792,37 @@ pub mod external_embed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Uri; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Uri = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Uri = St::Uri; + type Title = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = St::Title; type Uri = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Uri = St::Uri; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -1918,8 +1918,8 @@ where impl ExternalEmbedBuilder where St: external_embed_state::State, - St::Title: external_embed_state::IsSet, St::Uri: external_embed_state::IsSet, + St::Title: external_embed_state::IsSet, { /// Build the final struct. pub fn build(self) -> ExternalEmbed { @@ -2305,49 +2305,49 @@ pub mod message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Channel; type Text; + type Channel; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Channel = Unset; type Text = Unset; + type Channel = Unset; type CreatedAt = Unset; } - ///State transition - sets the `channel` field to Set - pub struct SetChannel(PhantomData St>); - impl sealed::Sealed for SetChannel {} - impl State for SetChannel { - type Channel = Set; - type Text = St::Text; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Channel = St::Channel; type Text = Set; + type Channel = St::Channel; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `channel` field to Set + pub struct SetChannel(PhantomData St>); + impl sealed::Sealed for SetChannel {} + impl State for SetChannel { + type Text = St::Text; + type Channel = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Channel = St::Channel; type Text = St::Text; + type Channel = St::Channel; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `channel` field - pub struct channel(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `channel` field + pub struct channel(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -2490,8 +2490,8 @@ where impl MessageBuilder where St: message_state::State, - St::Channel: message_state::IsSet, St::Text: message_state::IsSet, + St::Channel: message_state::IsSet, St::CreatedAt: message_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/app_protoimsg/chat/poll.rs b/crates/jacquard-api/src/app_protoimsg/chat/poll.rs index a6294d038..3f499fc7a 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/poll.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/poll.rs @@ -162,65 +162,65 @@ pub mod poll_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Channel; - type Question; type Options; + type Question; + type Channel; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Channel = Unset; - type Question = Unset; type Options = Unset; + type Question = Unset; + type Channel = Unset; type CreatedAt = Unset; } - ///State transition - sets the `channel` field to Set - pub struct SetChannel(PhantomData St>); - impl sealed::Sealed for SetChannel {} - impl State for SetChannel { - type Channel = Set; + ///State transition - sets the `options` field to Set + pub struct SetOptions(PhantomData St>); + impl sealed::Sealed for SetOptions {} + impl State for SetOptions { + type Options = Set; type Question = St::Question; - type Options = St::Options; + type Channel = St::Channel; type CreatedAt = St::CreatedAt; } ///State transition - sets the `question` field to Set pub struct SetQuestion(PhantomData St>); impl sealed::Sealed for SetQuestion {} impl State for SetQuestion { - type Channel = St::Channel; - type Question = Set; type Options = St::Options; + type Question = Set; + type Channel = St::Channel; type CreatedAt = St::CreatedAt; } - ///State transition - sets the `options` field to Set - pub struct SetOptions(PhantomData St>); - impl sealed::Sealed for SetOptions {} - impl State for SetOptions { - type Channel = St::Channel; + ///State transition - sets the `channel` field to Set + pub struct SetChannel(PhantomData St>); + impl sealed::Sealed for SetChannel {} + impl State for SetChannel { + type Options = St::Options; type Question = St::Question; - type Options = Set; + type Channel = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Channel = St::Channel; - type Question = St::Question; type Options = St::Options; + type Question = St::Question; + type Channel = St::Channel; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `channel` field - pub struct channel(()); - ///Marker type for the `question` field - pub struct question(()); ///Marker type for the `options` field pub struct options(()); + ///Marker type for the `question` field + pub struct question(()); + ///Marker type for the `channel` field + pub struct channel(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -363,9 +363,9 @@ where impl PollBuilder where St: poll_state::State, - St::Channel: poll_state::IsSet, - St::Question: poll_state::IsSet, St::Options: poll_state::IsSet, + St::Question: poll_state::IsSet, + St::Channel: poll_state::IsSet, St::CreatedAt: poll_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/app_protoimsg/chat/role.rs b/crates/jacquard-api/src/app_protoimsg/chat/role.rs index 5099e3f67..174d73176 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/role.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/role.rs @@ -197,67 +197,67 @@ pub mod role_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Subject; - type Role; type Room; - type CreatedAt; + type Role; } /// 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; - type Role = Unset; type Room = Unset; - type CreatedAt = Unset; + type Role = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Subject = St::Subject; + type Room = St::Room; + type Role = St::Role; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Subject = Set; - type Role = St::Role; - type Room = St::Room; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `role` field to Set - pub struct SetRole(PhantomData St>); - impl sealed::Sealed for SetRole {} - impl State for SetRole { - type Subject = St::Subject; - type Role = Set; + type Subject = Set; type Room = St::Room; - type CreatedAt = St::CreatedAt; + type Role = St::Role; } ///State transition - sets the `room` field to Set pub struct SetRoom(PhantomData St>); impl sealed::Sealed for SetRoom {} impl State for SetRoom { + type CreatedAt = St::CreatedAt; type Subject = St::Subject; - type Role = St::Role; type Room = Set; - type CreatedAt = St::CreatedAt; + type Role = St::Role; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `role` field to Set + pub struct SetRole(PhantomData St>); + impl sealed::Sealed for SetRole {} + impl State for SetRole { + type CreatedAt = St::CreatedAt; type Subject = St::Subject; - type Role = St::Role; type Room = St::Room; - type CreatedAt = Set; + type Role = 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 `role` field - pub struct role(()); ///Marker type for the `room` field pub struct room(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `role` field + pub struct role(()); } } @@ -365,10 +365,10 @@ where impl RoleBuilder where St: role_state::State, + St::CreatedAt: role_state::IsSet, St::Subject: role_state::IsSet, - St::Role: role_state::IsSet, St::Room: role_state::IsSet, - St::CreatedAt: role_state::IsSet, + St::Role: role_state::IsSet, { /// Build the final struct. pub fn build(self) -> Role { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/room.rs b/crates/jacquard-api/src/app_protoimsg/chat/room.rs index cc2e76b78..ffa5c4a25 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/room.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/room.rs @@ -398,67 +398,67 @@ pub mod room_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; + type Topic; type CreatedAt; + type Name; type Purpose; - type Topic; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; + type Topic = Unset; type CreatedAt = Unset; + type Name = Unset; type Purpose = Unset; - type Topic = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; + ///State transition - sets the `topic` field to Set + pub struct SetTopic(PhantomData St>); + impl sealed::Sealed for SetTopic {} + impl State for SetTopic { + type Topic = Set; type CreatedAt = St::CreatedAt; + type Name = St::Name; type Purpose = St::Purpose; - type Topic = St::Topic; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; + type Topic = St::Topic; type CreatedAt = Set; + type Name = St::Name; type Purpose = St::Purpose; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { type Topic = St::Topic; + type CreatedAt = St::CreatedAt; + type Name = Set; + type Purpose = St::Purpose; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData St>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Name = St::Name; - type CreatedAt = St::CreatedAt; - type Purpose = Set; type Topic = St::Topic; - } - ///State transition - sets the `topic` field to Set - pub struct SetTopic(PhantomData St>); - impl sealed::Sealed for SetTopic {} - impl State for SetTopic { - type Name = St::Name; type CreatedAt = St::CreatedAt; - type Purpose = St::Purpose; - type Topic = Set; + type Name = St::Name; + 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 `topic` field + pub struct topic(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); - ///Marker type for the `topic` field - pub struct topic(()); } } @@ -613,10 +613,10 @@ where impl RoomBuilder where St: room_state::State, - St::Name: room_state::IsSet, + St::Topic: room_state::IsSet, St::CreatedAt: room_state::IsSet, + St::Name: room_state::IsSet, St::Purpose: room_state::IsSet, - St::Topic: room_state::IsSet, { /// Build the final struct. pub fn build(self) -> Room { diff --git a/crates/jacquard-api/src/app_protoimsg/chat/vote.rs b/crates/jacquard-api/src/app_protoimsg/chat/vote.rs index 8b26dc707..c17e1f1e9 100644 --- a/crates/jacquard-api/src/app_protoimsg/chat/vote.rs +++ b/crates/jacquard-api/src/app_protoimsg/chat/vote.rs @@ -128,50 +128,50 @@ pub mod vote_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type SelectedOptions; - type CreatedAt; type Poll; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type SelectedOptions = Unset; - type CreatedAt = Unset; type Poll = Unset; + type CreatedAt = Unset; } ///State transition - sets the `selected_options` field to Set pub struct SetSelectedOptions(PhantomData St>); impl sealed::Sealed for SetSelectedOptions {} impl State for SetSelectedOptions { type SelectedOptions = Set; - type CreatedAt = St::CreatedAt; - type Poll = St::Poll; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type SelectedOptions = St::SelectedOptions; - type CreatedAt = Set; type Poll = St::Poll; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `poll` field to Set pub struct SetPoll(PhantomData St>); impl sealed::Sealed for SetPoll {} impl State for SetPoll { type SelectedOptions = St::SelectedOptions; - type CreatedAt = St::CreatedAt; type Poll = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type SelectedOptions = St::SelectedOptions; + type Poll = St::Poll; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `selected_options` field pub struct selected_options(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `poll` field pub struct poll(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -261,8 +261,8 @@ impl VoteBuilder where St: vote_state::State, St::SelectedOptions: vote_state::IsSet, - St::CreatedAt: vote_state::IsSet, St::Poll: vote_state::IsSet, + St::CreatedAt: vote_state::IsSet, { /// Build the final struct. pub fn build(self) -> Vote { diff --git a/crates/jacquard-api/src/app_rocksky/album.rs b/crates/jacquard-api/src/app_rocksky/album.rs index e4f1e3a5c..544ff4f2a 100644 --- a/crates/jacquard-api/src/app_rocksky/album.rs +++ b/crates/jacquard-api/src/app_rocksky/album.rs @@ -401,51 +401,51 @@ pub mod album_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type CreatedAt; type Artist; + 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 CreatedAt = Unset; type Artist = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type CreatedAt = St::CreatedAt; - type Artist = St::Artist; + type Title = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Title = St::Title; type CreatedAt = Set; type Artist = St::Artist; + type Title = St::Title; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { - type Title = St::Title; type CreatedAt = St::CreatedAt; type Artist = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + type Artist = St::Artist; + 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 `created_at` field pub struct created_at(()); ///Marker type for the `artist` field pub struct artist(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -707,9 +707,9 @@ impl AlbumBuilder { impl AlbumBuilder where St: album_state::State, - St::Title: album_state::IsSet, St::CreatedAt: album_state::IsSet, St::Artist: album_state::IsSet, + St::Title: album_state::IsSet, { /// Build the final struct. pub fn build(self) -> Album { diff --git a/crates/jacquard-api/src/app_rocksky/artist.rs b/crates/jacquard-api/src/app_rocksky/artist.rs index 0c857647e..9c978e194 100644 --- a/crates/jacquard-api/src/app_rocksky/artist.rs +++ b/crates/jacquard-api/src/app_rocksky/artist.rs @@ -507,37 +507,37 @@ pub mod artist_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Name = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + 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 `created_at` field + pub struct created_at(()); } } @@ -708,8 +708,8 @@ impl ArtistBuilder { impl ArtistBuilder where St: artist_state::State, - St::CreatedAt: artist_state::IsSet, St::Name: artist_state::IsSet, + St::CreatedAt: artist_state::IsSet, { /// Build the final struct. pub fn build(self) -> Artist { diff --git a/crates/jacquard-api/src/app_rocksky/feed/generator.rs b/crates/jacquard-api/src/app_rocksky/feed/generator.rs index 2f48301f2..0a17690a6 100644 --- a/crates/jacquard-api/src/app_rocksky/feed/generator.rs +++ b/crates/jacquard-api/src/app_rocksky/feed/generator.rs @@ -204,51 +204,51 @@ pub mod generator_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type DisplayName; type CreatedAt; + type DisplayName; + 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 DisplayName = Unset; type CreatedAt = Unset; + type DisplayName = Unset; + type Did = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type DisplayName = St::DisplayName; - type CreatedAt = St::CreatedAt; + type Did = St::Did; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Did = St::Did; - type DisplayName = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type DisplayName = Set; type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type CreatedAt = St::CreatedAt; type DisplayName = St::DisplayName; - type CreatedAt = 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 `display_name` field - pub struct display_name(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -369,9 +369,9 @@ where impl GeneratorBuilder where St: generator_state::State, - St::Did: generator_state::IsSet, - St::DisplayName: generator_state::IsSet, St::CreatedAt: generator_state::IsSet, + St::DisplayName: generator_state::IsSet, + St::Did: generator_state::IsSet, { /// Build the final struct. pub fn build(self) -> Generator { diff --git a/crates/jacquard-api/src/app_rocksky/like.rs b/crates/jacquard-api/src/app_rocksky/like.rs index ffd26742b..5b8c59d72 100644 --- a/crates/jacquard-api/src/app_rocksky/like.rs +++ b/crates/jacquard-api/src/app_rocksky/like.rs @@ -120,37 +120,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -220,8 +220,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/app_rocksky/radio.rs b/crates/jacquard-api/src/app_rocksky/radio.rs index d0a449c5a..9b8034692 100644 --- a/crates/jacquard-api/src/app_rocksky/radio.rs +++ b/crates/jacquard-api/src/app_rocksky/radio.rs @@ -313,51 +313,51 @@ pub mod radio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; - type Url; type CreatedAt; + type Url; + 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 Url = Unset; type CreatedAt = Unset; + type Url = Unset; + type Name = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Url = St::Url; - type CreatedAt = St::CreatedAt; + type Name = St::Name; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Name = St::Name; - type Url = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Url = Set; type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; type Url = St::Url; - type CreatedAt = Set; + 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 `url` field - pub struct url(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `url` field + pub struct url(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -506,9 +506,9 @@ impl RadioBuilder { impl RadioBuilder where St: radio_state::State, - St::Name: radio_state::IsSet, - St::Url: radio_state::IsSet, St::CreatedAt: radio_state::IsSet, + St::Url: radio_state::IsSet, + St::Name: radio_state::IsSet, { /// Build the final struct. pub fn build(self) -> Radio { diff --git a/crates/jacquard-api/src/app_rocksky/scrobble.rs b/crates/jacquard-api/src/app_rocksky/scrobble.rs index 5d31c6dd8..d9385d158 100644 --- a/crates/jacquard-api/src/app_rocksky/scrobble.rs +++ b/crates/jacquard-api/src/app_rocksky/scrobble.rs @@ -536,9 +536,9 @@ pub mod scrobble_state { type Title; type Duration; type CreatedAt; + type AlbumArtist; type Album; type Artist; - type AlbumArtist; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -547,9 +547,9 @@ pub mod scrobble_state { type Title = Unset; type Duration = Unset; type CreatedAt = Unset; + type AlbumArtist = Unset; type Album = Unset; type Artist = Unset; - type AlbumArtist = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); @@ -558,9 +558,9 @@ pub mod scrobble_state { type Title = Set; type Duration = St::Duration; type CreatedAt = St::CreatedAt; + type AlbumArtist = St::AlbumArtist; type Album = St::Album; type Artist = St::Artist; - type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `duration` field to Set pub struct SetDuration(PhantomData St>); @@ -569,9 +569,9 @@ pub mod scrobble_state { type Title = St::Title; type Duration = Set; type CreatedAt = St::CreatedAt; + type AlbumArtist = St::AlbumArtist; type Album = St::Album; type Artist = St::Artist; - type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); @@ -580,9 +580,20 @@ pub mod scrobble_state { type Title = St::Title; type Duration = St::Duration; type CreatedAt = Set; + type AlbumArtist = St::AlbumArtist; + type Album = St::Album; + type Artist = St::Artist; + } + ///State transition - sets the `album_artist` field to Set + pub struct SetAlbumArtist(PhantomData St>); + impl sealed::Sealed for SetAlbumArtist {} + impl State for SetAlbumArtist { + type Title = St::Title; + type Duration = St::Duration; + type CreatedAt = St::CreatedAt; + type AlbumArtist = Set; type Album = St::Album; type Artist = St::Artist; - type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `album` field to Set pub struct SetAlbum(PhantomData St>); @@ -591,9 +602,9 @@ pub mod scrobble_state { type Title = St::Title; type Duration = St::Duration; type CreatedAt = St::CreatedAt; + type AlbumArtist = St::AlbumArtist; type Album = Set; type Artist = St::Artist; - type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); @@ -602,20 +613,9 @@ pub mod scrobble_state { type Title = St::Title; type Duration = St::Duration; type CreatedAt = St::CreatedAt; - type Album = St::Album; - type Artist = Set; type AlbumArtist = St::AlbumArtist; - } - ///State transition - sets the `album_artist` field to Set - pub struct SetAlbumArtist(PhantomData St>); - impl sealed::Sealed for SetAlbumArtist {} - impl State for SetAlbumArtist { - type Title = St::Title; - type Duration = St::Duration; - type CreatedAt = St::CreatedAt; type Album = St::Album; - type Artist = St::Artist; - type AlbumArtist = Set; + type Artist = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -626,12 +626,12 @@ pub mod scrobble_state { pub struct duration(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `album_artist` field + pub struct album_artist(()); ///Marker type for the `album` field pub struct album(()); ///Marker type for the `artist` field pub struct artist(()); - ///Marker type for the `album_artist` field - pub struct album_artist(()); } } @@ -1079,9 +1079,9 @@ where St::Title: scrobble_state::IsSet, St::Duration: scrobble_state::IsSet, St::CreatedAt: scrobble_state::IsSet, + St::AlbumArtist: scrobble_state::IsSet, St::Album: scrobble_state::IsSet, St::Artist: scrobble_state::IsSet, - St::AlbumArtist: scrobble_state::IsSet, { /// Build the final struct. pub fn build(self) -> Scrobble { diff --git a/crates/jacquard-api/src/app_rocksky/shout.rs b/crates/jacquard-api/src/app_rocksky/shout.rs index 0c8f155f1..f7ddeaf78 100644 --- a/crates/jacquard-api/src/app_rocksky/shout.rs +++ b/crates/jacquard-api/src/app_rocksky/shout.rs @@ -229,51 +229,51 @@ pub mod shout_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Message; type Subject; + type Message; + 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 Message = Unset; type Subject = Unset; + type Message = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; type Message = St::Message; - type Subject = St::Subject; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type CreatedAt = St::CreatedAt; - type Message = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + type Message = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::Subject; type Message = St::Message; - type Subject = 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 `message` field - pub struct message(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `message` field + pub struct message(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -375,9 +375,9 @@ where impl ShoutBuilder where St: shout_state::State, - St::CreatedAt: shout_state::IsSet, - St::Message: shout_state::IsSet, St::Subject: shout_state::IsSet, + St::Message: shout_state::IsSet, + St::CreatedAt: shout_state::IsSet, { /// Build the final struct. pub fn build(self) -> Shout { diff --git a/crates/jacquard-api/src/app_rocksky/song.rs b/crates/jacquard-api/src/app_rocksky/song.rs index 29f3d4450..24851c8fd 100644 --- a/crates/jacquard-api/src/app_rocksky/song.rs +++ b/crates/jacquard-api/src/app_rocksky/song.rs @@ -595,105 +595,105 @@ pub mod song_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Artist; - type Album; - type AlbumArtist; + type CreatedAt; type Duration; + type Album; type Title; + type AlbumArtist; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Artist = Unset; - type Album = Unset; - type AlbumArtist = Unset; + type CreatedAt = Unset; type Duration = Unset; + type Album = Unset; type Title = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Artist = St::Artist; - type Album = St::Album; - type AlbumArtist = St::AlbumArtist; - type Duration = St::Duration; - type Title = St::Title; + type AlbumArtist = Unset; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { - type CreatedAt = St::CreatedAt; type Artist = Set; - type Album = St::Album; - type AlbumArtist = St::AlbumArtist; - type Duration = St::Duration; - type Title = St::Title; - } - ///State transition - sets the `album` field to Set - pub struct SetAlbum(PhantomData St>); - impl sealed::Sealed for SetAlbum {} - impl State for SetAlbum { type CreatedAt = St::CreatedAt; - type Artist = St::Artist; - type Album = Set; - type AlbumArtist = St::AlbumArtist; type Duration = St::Duration; + type Album = St::Album; type Title = St::Title; + type AlbumArtist = St::AlbumArtist; } - ///State transition - sets the `album_artist` field to Set - pub struct SetAlbumArtist(PhantomData St>); - impl sealed::Sealed for SetAlbumArtist {} - impl State for SetAlbumArtist { - type CreatedAt = St::CreatedAt; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Artist = St::Artist; - type Album = St::Album; - type AlbumArtist = Set; + type CreatedAt = Set; type Duration = St::Duration; + type Album = St::Album; type Title = St::Title; + type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `duration` field to Set pub struct SetDuration(PhantomData St>); impl sealed::Sealed for SetDuration {} impl State for SetDuration { - type CreatedAt = St::CreatedAt; type Artist = St::Artist; + type CreatedAt = St::CreatedAt; + type Duration = Set; type Album = St::Album; + type Title = St::Title; type AlbumArtist = St::AlbumArtist; - type Duration = Set; + } + ///State transition - sets the `album` field to Set + pub struct SetAlbum(PhantomData St>); + impl sealed::Sealed for SetAlbum {} + impl State for SetAlbum { + type Artist = St::Artist; + type CreatedAt = St::CreatedAt; + type Duration = St::Duration; + type Album = Set; type Title = St::Title; + type AlbumArtist = St::AlbumArtist; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = St::CreatedAt; type Artist = St::Artist; + type CreatedAt = St::CreatedAt; + type Duration = St::Duration; type Album = St::Album; + type Title = Set; type AlbumArtist = St::AlbumArtist; + } + ///State transition - sets the `album_artist` field to Set + pub struct SetAlbumArtist(PhantomData St>); + impl sealed::Sealed for SetAlbumArtist {} + impl State for SetAlbumArtist { + type Artist = St::Artist; + type CreatedAt = St::CreatedAt; type Duration = St::Duration; - type Title = Set; + type Album = St::Album; + type Title = St::Title; + type AlbumArtist = 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 `artist` field pub struct artist(()); - ///Marker type for the `album` field - pub struct album(()); - ///Marker type for the `album_artist` field - pub struct album_artist(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `duration` field pub struct duration(()); + ///Marker type for the `album` field + pub struct album(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `album_artist` field + pub struct album_artist(()); } } @@ -1138,12 +1138,12 @@ impl SongBuilder { impl SongBuilder where St: song_state::State, - St::CreatedAt: song_state::IsSet, St::Artist: song_state::IsSet, - St::Album: song_state::IsSet, - St::AlbumArtist: song_state::IsSet, + St::CreatedAt: song_state::IsSet, St::Duration: song_state::IsSet, + St::Album: song_state::IsSet, St::Title: song_state::IsSet, + St::AlbumArtist: song_state::IsSet, { /// Build the final struct. pub fn build(self) -> Song { diff --git a/crates/jacquard-api/src/app_rocksky/song/match_song.rs b/crates/jacquard-api/src/app_rocksky/song/match_song.rs index 102bd5e73..74b69d3aa 100644 --- a/crates/jacquard-api/src/app_rocksky/song/match_song.rs +++ b/crates/jacquard-api/src/app_rocksky/song/match_song.rs @@ -68,37 +68,37 @@ pub mod match_song_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Artist; + 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 Artist = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Artist = St::Artist; + type Title = Unset; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { - type Title = St::Title; type Artist = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Artist = St::Artist; + 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 `artist` field pub struct artist(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -168,8 +168,8 @@ where impl MatchSongBuilder where St: match_song_state::State, - St::Title: match_song_state::IsSet, St::Artist: match_song_state::IsSet, + St::Title: match_song_state::IsSet, { /// Build the final struct. pub fn build(self) -> MatchSong { diff --git a/crates/jacquard-api/src/art_cllctv/embed/external.rs b/crates/jacquard-api/src/art_cllctv/embed/external.rs index 6128d44bd..da5750a5a 100644 --- a/crates/jacquard-api/src/art_cllctv/embed/external.rs +++ b/crates/jacquard-api/src/art_cllctv/embed/external.rs @@ -153,49 +153,49 @@ pub mod external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; type Uri; + type Description; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; type Uri = Unset; + type Description = Unset; type Title = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; - type Uri = St::Uri; - type Title = St::Title; - } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Description = St::Description; type Uri = Set; + type Description = St::Description; + type Title = St::Title; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Uri = St::Uri; + type Description = Set; type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = St::Description; type Uri = St::Uri; + type Description = St::Description; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `title` field pub struct title(()); } @@ -312,8 +312,8 @@ where impl ExternalBuilder where St: external_state::State, - St::Description: external_state::IsSet, St::Uri: external_state::IsSet, + St::Description: external_state::IsSet, St::Title: external_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/art_cllctv/embed/images.rs b/crates/jacquard-api/src/art_cllctv/embed/images.rs index 77e6c84f5..f7c3b6770 100644 --- a/crates/jacquard-api/src/art_cllctv/embed/images.rs +++ b/crates/jacquard-api/src/art_cllctv/embed/images.rs @@ -798,51 +798,51 @@ pub mod view_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Fullsize; - type Alt; type Thumb; + type Alt; + type Fullsize; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Fullsize = Unset; - type Alt = Unset; type Thumb = Unset; + type Alt = Unset; + type Fullsize = Unset; } - ///State transition - sets the `fullsize` field to Set - pub struct SetFullsize(PhantomData St>); - impl sealed::Sealed for SetFullsize {} - impl State for SetFullsize { - type Fullsize = Set; + ///State transition - sets the `thumb` field to Set + pub struct SetThumb(PhantomData St>); + impl sealed::Sealed for SetThumb {} + impl State for SetThumb { + type Thumb = Set; type Alt = St::Alt; - type Thumb = St::Thumb; + type Fullsize = St::Fullsize; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData St>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Fullsize = St::Fullsize; - type Alt = Set; type Thumb = St::Thumb; - } - ///State transition - sets the `thumb` field to Set - pub struct SetThumb(PhantomData St>); - impl sealed::Sealed for SetThumb {} - impl State for SetThumb { + type Alt = Set; type Fullsize = St::Fullsize; + } + ///State transition - sets the `fullsize` field to Set + pub struct SetFullsize(PhantomData St>); + impl sealed::Sealed for SetFullsize {} + impl State for SetFullsize { + type Thumb = St::Thumb; type Alt = St::Alt; - type Thumb = Set; + type Fullsize = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `fullsize` field - pub struct fullsize(()); - ///Marker type for the `alt` field - pub struct alt(()); ///Marker type for the `thumb` field pub struct thumb(()); + ///Marker type for the `alt` field + pub struct alt(()); + ///Marker type for the `fullsize` field + pub struct fullsize(()); } } @@ -963,9 +963,9 @@ impl ViewImageBuilder { impl ViewImageBuilder where St: view_image_state::State, - St::Fullsize: view_image_state::IsSet, - St::Alt: view_image_state::IsSet, St::Thumb: view_image_state::IsSet, + St::Alt: view_image_state::IsSet, + St::Fullsize: view_image_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewImage { diff --git a/crates/jacquard-api/src/art_cllctv/feed/pin.rs b/crates/jacquard-api/src/art_cllctv/feed/pin.rs index a7a263884..0cb70b92a 100644 --- a/crates/jacquard-api/src/art_cllctv/feed/pin.rs +++ b/crates/jacquard-api/src/art_cllctv/feed/pin.rs @@ -112,37 +112,37 @@ pub mod pin_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -212,8 +212,8 @@ where impl PinBuilder where St: pin_state::State, - St::Subject: pin_state::IsSet, St::CreatedAt: pin_state::IsSet, + St::Subject: pin_state::IsSet, { /// Build the final struct. pub fn build(self) -> Pin { diff --git a/crates/jacquard-api/src/at_inlay.rs b/crates/jacquard-api/src/at_inlay.rs index 18340c8c9..9df6e963b 100644 --- a/crates/jacquard-api/src/at_inlay.rs +++ b/crates/jacquard-api/src/at_inlay.rs @@ -697,37 +697,37 @@ pub mod response_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Node; type Cache; + type Node; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Node = Unset; type Cache = Unset; - } - ///State transition - sets the `node` field to Set - pub struct SetNode(PhantomData St>); - impl sealed::Sealed for SetNode {} - impl State for SetNode { - type Node = Set; - type Cache = St::Cache; + type Node = Unset; } ///State transition - sets the `cache` field to Set pub struct SetCache(PhantomData St>); impl sealed::Sealed for SetCache {} impl State for SetCache { - type Node = St::Node; type Cache = Set; + type Node = St::Node; + } + ///State transition - sets the `node` field to Set + pub struct SetNode(PhantomData St>); + impl sealed::Sealed for SetNode {} + impl State for SetNode { + type Cache = St::Cache; + type Node = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `node` field - pub struct node(()); ///Marker type for the `cache` field pub struct cache(()); + ///Marker type for the `node` field + pub struct node(()); } } @@ -797,8 +797,8 @@ where impl ResponseBuilder where St: response_state::State, - St::Node: response_state::IsSet, St::Cache: response_state::IsSet, + St::Node: response_state::IsSet, { /// Build the final struct. pub fn build(self) -> Response { diff --git a/crates/jacquard-api/src/at_inlay/component.rs b/crates/jacquard-api/src/at_inlay/component.rs index 983c8ab5d..c82fc5719 100644 --- a/crates/jacquard-api/src/at_inlay/component.rs +++ b/crates/jacquard-api/src/at_inlay/component.rs @@ -1293,37 +1293,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Accepts; type Prop; + type Accepts; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Accepts = Unset; type Prop = Unset; - } - ///State transition - sets the `accepts` field to Set - pub struct SetAccepts(PhantomData St>); - impl sealed::Sealed for SetAccepts {} - impl State for SetAccepts { - type Accepts = Set; - type Prop = St::Prop; + type Accepts = Unset; } ///State transition - sets the `prop` field to Set pub struct SetProp(PhantomData St>); impl sealed::Sealed for SetProp {} impl State for SetProp { - type Accepts = St::Accepts; type Prop = Set; + type Accepts = St::Accepts; + } + ///State transition - sets the `accepts` field to Set + pub struct SetAccepts(PhantomData St>); + impl sealed::Sealed for SetAccepts {} + impl State for SetAccepts { + type Prop = St::Prop; + type Accepts = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `accepts` field - pub struct accepts(()); ///Marker type for the `prop` field pub struct prop(()); + ///Marker type for the `accepts` field + pub struct accepts(()); } } @@ -1393,8 +1393,8 @@ where impl ViewBuilder where St: view_state::State, - St::Accepts: view_state::IsSet, St::Prop: view_state::IsSet, + St::Accepts: view_state::IsSet, { /// Build the final struct. pub fn build(self) -> View { diff --git a/crates/jacquard-api/src/at_inlay/pack.rs b/crates/jacquard-api/src/at_inlay/pack.rs index 0357daae7..a7bc299c1 100644 --- a/crates/jacquard-api/src/at_inlay/pack.rs +++ b/crates/jacquard-api/src/at_inlay/pack.rs @@ -155,37 +155,37 @@ pub mod export_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Component; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Component = Unset; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Component = St::Component; + type Type = Unset; } ///State transition - sets the `component` field to Set pub struct SetComponent(PhantomData St>); impl sealed::Sealed for SetComponent {} impl State for SetComponent { - type Type = St::Type; type Component = Set; + type Type = St::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Component = St::Component; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `component` field pub struct component(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -255,8 +255,8 @@ where impl ExportBuilder where St: export_state::State, - St::Type: export_state::IsSet, St::Component: export_state::IsSet, + St::Type: export_state::IsSet, { /// Build the final struct. pub fn build(self) -> Export { diff --git a/crates/jacquard-api/src/at_inlay/placeholder.rs b/crates/jacquard-api/src/at_inlay/placeholder.rs index 228bce2d2..26fc3b945 100644 --- a/crates/jacquard-api/src/at_inlay/placeholder.rs +++ b/crates/jacquard-api/src/at_inlay/placeholder.rs @@ -75,37 +75,37 @@ pub mod placeholder_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Fallback; type Children; + type Fallback; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Fallback = Unset; type Children = Unset; - } - ///State transition - sets the `fallback` field to Set - pub struct SetFallback(PhantomData St>); - impl sealed::Sealed for SetFallback {} - impl State for SetFallback { - type Fallback = Set; - type Children = St::Children; + type Fallback = Unset; } ///State transition - sets the `children` field to Set pub struct SetChildren(PhantomData St>); impl sealed::Sealed for SetChildren {} impl State for SetChildren { - type Fallback = St::Fallback; type Children = Set; + type Fallback = St::Fallback; + } + ///State transition - sets the `fallback` field to Set + pub struct SetFallback(PhantomData St>); + impl sealed::Sealed for SetFallback {} + impl State for SetFallback { + type Children = St::Children; + type Fallback = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `fallback` field - pub struct fallback(()); ///Marker type for the `children` field pub struct children(()); + ///Marker type for the `fallback` field + pub struct fallback(()); } } @@ -175,8 +175,8 @@ where impl PlaceholderBuilder where St: placeholder_state::State, - St::Fallback: placeholder_state::IsSet, St::Children: placeholder_state::IsSet, + St::Fallback: placeholder_state::IsSet, { /// Build the final struct. pub fn build(self) -> Placeholder { diff --git a/crates/jacquard-api/src/at_margin/annotation.rs b/crates/jacquard-api/src/at_margin/annotation.rs index 21473dcfc..b89e298dc 100644 --- a/crates/jacquard-api/src/at_margin/annotation.rs +++ b/crates/jacquard-api/src/at_margin/annotation.rs @@ -1348,37 +1348,37 @@ pub mod annotation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Target; type CreatedAt; + type Target; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Target = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `target` field to Set - pub struct SetTarget(PhantomData St>); - impl sealed::Sealed for SetTarget {} - impl State for SetTarget { - type Target = Set; - type CreatedAt = St::CreatedAt; + type Target = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Target = St::Target; type CreatedAt = Set; + type Target = St::Target; + } + ///State transition - sets the `target` field to Set + pub struct SetTarget(PhantomData St>); + impl sealed::Sealed for SetTarget {} + impl State for SetTarget { + type CreatedAt = St::CreatedAt; + type Target = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `target` field - pub struct target(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `target` field + pub struct target(()); } } @@ -1541,8 +1541,8 @@ where impl AnnotationBuilder where St: annotation_state::State, - St::Target: annotation_state::IsSet, St::CreatedAt: annotation_state::IsSet, + St::Target: annotation_state::IsSet, { /// Build the final struct. pub fn build(self) -> Annotation { @@ -1587,37 +1587,37 @@ pub mod range_selector_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type StartSelector; type EndSelector; + type StartSelector; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type StartSelector = Unset; type EndSelector = Unset; - } - ///State transition - sets the `start_selector` field to Set - pub struct SetStartSelector(PhantomData St>); - impl sealed::Sealed for SetStartSelector {} - impl State for SetStartSelector { - type StartSelector = Set; - type EndSelector = St::EndSelector; + type StartSelector = Unset; } ///State transition - sets the `end_selector` field to Set pub struct SetEndSelector(PhantomData St>); impl sealed::Sealed for SetEndSelector {} impl State for SetEndSelector { - type StartSelector = St::StartSelector; type EndSelector = Set; + type StartSelector = St::StartSelector; + } + ///State transition - sets the `start_selector` field to Set + pub struct SetStartSelector(PhantomData St>); + impl sealed::Sealed for SetStartSelector {} + impl State for SetStartSelector { + type EndSelector = St::EndSelector; + type StartSelector = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start_selector` field - pub struct start_selector(()); ///Marker type for the `end_selector` field pub struct end_selector(()); + ///Marker type for the `start_selector` field + pub struct start_selector(()); } } @@ -1704,8 +1704,8 @@ impl RangeSelectorBuilder { impl RangeSelectorBuilder where St: range_selector_state::State, - St::StartSelector: range_selector_state::IsSet, St::EndSelector: range_selector_state::IsSet, + St::StartSelector: range_selector_state::IsSet, { /// Build the final struct. pub fn build(self) -> RangeSelector { diff --git a/crates/jacquard-api/src/at_margin/apikey.rs b/crates/jacquard-api/src/at_margin/apikey.rs index 01a24445d..d3caf73ba 100644 --- a/crates/jacquard-api/src/at_margin/apikey.rs +++ b/crates/jacquard-api/src/at_margin/apikey.rs @@ -126,51 +126,51 @@ pub mod apikey_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; type KeyHash; + 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 CreatedAt = Unset; type KeyHash = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; - type KeyHash = St::KeyHash; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; type KeyHash = St::KeyHash; + type Name = St::Name; } ///State transition - sets the `key_hash` field to Set pub struct SetKeyHash(PhantomData St>); impl sealed::Sealed for SetKeyHash {} impl State for SetKeyHash { - type Name = St::Name; type CreatedAt = St::CreatedAt; type KeyHash = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + type KeyHash = St::KeyHash; + 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 `created_at` field pub struct created_at(()); ///Marker type for the `key_hash` field pub struct key_hash(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -259,9 +259,9 @@ where impl ApikeyBuilder where St: apikey_state::State, - St::Name: apikey_state::IsSet, St::CreatedAt: apikey_state::IsSet, St::KeyHash: apikey_state::IsSet, + St::Name: apikey_state::IsSet, { /// Build the final struct. pub fn build(self) -> Apikey { diff --git a/crates/jacquard-api/src/at_margin/collection_item.rs b/crates/jacquard-api/src/at_margin/collection_item.rs index ed6f61e0a..abe02d5d7 100644 --- a/crates/jacquard-api/src/at_margin/collection_item.rs +++ b/crates/jacquard-api/src/at_margin/collection_item.rs @@ -127,51 +127,51 @@ pub mod collection_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; - type Annotation; type CreatedAt; + type Annotation; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; - type Annotation = Unset; type CreatedAt = Unset; + type Annotation = Unset; + type Collection = Unset; } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData St>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Annotation = St::Annotation; - type CreatedAt = St::CreatedAt; + type Collection = St::Collection; } ///State transition - sets the `annotation` field to Set pub struct SetAnnotation(PhantomData St>); impl sealed::Sealed for SetAnnotation {} impl State for SetAnnotation { - type Collection = St::Collection; - type Annotation = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Annotation = Set; type Collection = St::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData St>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type CreatedAt = St::CreatedAt; type Annotation = St::Annotation; - type CreatedAt = Set; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); - ///Marker type for the `annotation` field - pub struct annotation(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `annotation` field + pub struct annotation(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -273,9 +273,9 @@ impl CollectionItemBuilder { impl CollectionItemBuilder where St: collection_item_state::State, - St::Collection: collection_item_state::IsSet, - St::Annotation: collection_item_state::IsSet, St::CreatedAt: collection_item_state::IsSet, + St::Annotation: collection_item_state::IsSet, + St::Collection: collection_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionItem { diff --git a/crates/jacquard-api/src/at_margin/reply.rs b/crates/jacquard-api/src/at_margin/reply.rs index 1d3a0072b..20db2bc8e 100644 --- a/crates/jacquard-api/src/at_margin/reply.rs +++ b/crates/jacquard-api/src/at_margin/reply.rs @@ -178,8 +178,8 @@ pub mod reply_state { pub trait State: sealed::Sealed { type Root; type CreatedAt; - type Text; type Parent; + type Text; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -187,8 +187,8 @@ pub mod reply_state { impl State for Empty { type Root = Unset; type CreatedAt = Unset; - type Text = Unset; type Parent = Unset; + type Text = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData St>); @@ -196,8 +196,8 @@ pub mod reply_state { impl State for SetRoot { type Root = Set; type CreatedAt = St::CreatedAt; - type Text = St::Text; type Parent = St::Parent; + type Text = St::Text; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); @@ -205,17 +205,8 @@ pub mod reply_state { impl State for SetCreatedAt { type Root = St::Root; type CreatedAt = Set; - type Text = St::Text; - type Parent = St::Parent; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Root = St::Root; - type CreatedAt = St::CreatedAt; - type Text = Set; type Parent = St::Parent; + type Text = St::Text; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); @@ -223,8 +214,17 @@ pub mod reply_state { impl State for SetParent { type Root = St::Root; type CreatedAt = St::CreatedAt; - type Text = St::Text; type Parent = Set; + type Text = St::Text; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type Root = St::Root; + type CreatedAt = St::CreatedAt; + type Parent = St::Parent; + type Text = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -233,10 +233,10 @@ pub mod reply_state { pub struct root(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `text` field - pub struct text(()); ///Marker type for the `parent` field pub struct parent(()); + ///Marker type for the `text` field + pub struct text(()); } } @@ -365,8 +365,8 @@ where St: reply_state::State, St::Root: reply_state::IsSet, St::CreatedAt: reply_state::IsSet, - St::Text: reply_state::IsSet, St::Parent: reply_state::IsSet, + St::Text: reply_state::IsSet, { /// Build the final struct. pub fn build(self) -> Reply { @@ -515,37 +515,37 @@ pub mod reply_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 St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Uri = St::Uri; + type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; type Uri = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = St::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(()); } } @@ -615,8 +615,8 @@ where impl ReplyRefBuilder where St: reply_ref_state::State, - St::Cid: reply_ref_state::IsSet, St::Uri: reply_ref_state::IsSet, + St::Cid: reply_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReplyRef { diff --git a/crates/jacquard-api/src/at_noted/link.rs b/crates/jacquard-api/src/at_noted/link.rs index 53b4669dc..a50be5433 100644 --- a/crates/jacquard-api/src/at_noted/link.rs +++ b/crates/jacquard-api/src/at_noted/link.rs @@ -117,37 +117,37 @@ pub mod link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type CreatedAt = St::CreatedAt; + type Url = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Url = St::Url; type CreatedAt = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -262,8 +262,8 @@ where impl LinkBuilder where St: link_state::State, - St::Url: link_state::IsSet, St::CreatedAt: link_state::IsSet, + St::Url: link_state::IsSet, { /// Build the final struct. pub fn build(self) -> Link { diff --git a/crates/jacquard-api/src/at_podping/records/podping.rs b/crates/jacquard-api/src/at_podping/records/podping.rs index 7554d3b4a..54a6f7ecc 100644 --- a/crates/jacquard-api/src/at_podping/records/podping.rs +++ b/crates/jacquard-api/src/at_podping/records/podping.rs @@ -126,85 +126,85 @@ pub mod podping_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Iris; type Version; - type Timestamp; type Medium; type Reason; - type Iris; + type Timestamp; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Iris = Unset; type Version = Unset; - type Timestamp = Unset; type Medium = Unset; type Reason = Unset; - type Iris = Unset; + type Timestamp = Unset; + } + ///State transition - sets the `iris` field to Set + pub struct SetIris(PhantomData St>); + impl sealed::Sealed for SetIris {} + impl State for SetIris { + type Iris = Set; + type Version = St::Version; + type Medium = St::Medium; + type Reason = St::Reason; + type Timestamp = St::Timestamp; } ///State transition - sets the `version` field to Set pub struct SetVersion(PhantomData St>); impl sealed::Sealed for SetVersion {} impl State for SetVersion { - type Version = Set; - type Timestamp = St::Timestamp; - type Medium = St::Medium; - type Reason = St::Reason; type Iris = St::Iris; - } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData St>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Version = St::Version; - type Timestamp = Set; + type Version = Set; type Medium = St::Medium; type Reason = St::Reason; - type Iris = St::Iris; + type Timestamp = St::Timestamp; } ///State transition - sets the `medium` field to Set pub struct SetMedium(PhantomData St>); impl sealed::Sealed for SetMedium {} impl State for SetMedium { + type Iris = St::Iris; type Version = St::Version; - type Timestamp = St::Timestamp; type Medium = Set; type Reason = St::Reason; - type Iris = St::Iris; + type Timestamp = St::Timestamp; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData St>); impl sealed::Sealed for SetReason {} impl State for SetReason { + type Iris = St::Iris; type Version = St::Version; - type Timestamp = St::Timestamp; type Medium = St::Medium; type Reason = Set; - type Iris = St::Iris; + type Timestamp = St::Timestamp; } - ///State transition - sets the `iris` field to Set - pub struct SetIris(PhantomData St>); - impl sealed::Sealed for SetIris {} - impl State for SetIris { + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData St>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { + type Iris = St::Iris; type Version = St::Version; - type Timestamp = St::Timestamp; type Medium = St::Medium; type Reason = St::Reason; - type Iris = Set; + type Timestamp = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `iris` field + pub struct iris(()); ///Marker type for the `version` field pub struct version(()); - ///Marker type for the `timestamp` field - pub struct timestamp(()); ///Marker type for the `medium` field pub struct medium(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `iris` field - pub struct iris(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); } } @@ -365,11 +365,11 @@ where impl PodpingBuilder where St: podping_state::State, + St::Iris: podping_state::IsSet, St::Version: podping_state::IsSet, - St::Timestamp: podping_state::IsSet, St::Medium: podping_state::IsSet, St::Reason: podping_state::IsSet, - St::Iris: podping_state::IsSet, + St::Timestamp: podping_state::IsSet, { /// Build the final struct. pub fn build(self) -> Podping { diff --git a/crates/jacquard-api/src/at_podping/records/startup.rs b/crates/jacquard-api/src/at_podping/records/startup.rs index f3dc3f641..a21f2d588 100644 --- a/crates/jacquard-api/src/at_podping/records/startup.rs +++ b/crates/jacquard-api/src/at_podping/records/startup.rs @@ -140,51 +140,51 @@ pub mod startup_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Timestamp; type ServerAccount; type Message; + type Timestamp; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Timestamp = Unset; type ServerAccount = Unset; type Message = Unset; - } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData St>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Timestamp = Set; - type ServerAccount = St::ServerAccount; - type Message = St::Message; + type Timestamp = Unset; } ///State transition - sets the `server_account` field to Set pub struct SetServerAccount(PhantomData St>); impl sealed::Sealed for SetServerAccount {} impl State for SetServerAccount { - type Timestamp = St::Timestamp; type ServerAccount = Set; type Message = St::Message; + type Timestamp = St::Timestamp; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Timestamp = St::Timestamp; type ServerAccount = St::ServerAccount; type Message = Set; + type Timestamp = St::Timestamp; + } + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData St>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { + type ServerAccount = St::ServerAccount; + type Message = St::Message; + type Timestamp = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `timestamp` field - pub struct timestamp(()); ///Marker type for the `server_account` field pub struct server_account(()); ///Marker type for the `message` field pub struct message(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); } } @@ -389,9 +389,9 @@ impl StartupBuilder { impl StartupBuilder where St: startup_state::State, - St::Timestamp: startup_state::IsSet, St::ServerAccount: startup_state::IsSet, St::Message: startup_state::IsSet, + St::Timestamp: startup_state::IsSet, { /// Build the final struct. pub fn build(self) -> Startup { diff --git a/crates/jacquard-api/src/at_unthread/document/put_draft.rs b/crates/jacquard-api/src/at_unthread/document/put_draft.rs index 8aa852860..d5a813cd3 100644 --- a/crates/jacquard-api/src/at_unthread/document/put_draft.rs +++ b/crates/jacquard-api/src/at_unthread/document/put_draft.rs @@ -154,67 +154,67 @@ pub mod draft_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Tid; type CreatedAt; type UpdatedAt; + 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 Tid = Unset; type CreatedAt = Unset; type UpdatedAt = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Tid = St::Tid; - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; + type Content = Unset; } ///State transition - sets the `tid` field to Set pub struct SetTid(PhantomData St>); impl sealed::Sealed for SetTid {} impl State for SetTid { - type Content = St::Content; type Tid = Set; type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; + type Content = St::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; type Tid = St::Tid; type CreatedAt = Set; type UpdatedAt = St::UpdatedAt; + type Content = St::Content; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Content = St::Content; type Tid = St::Tid; type CreatedAt = St::CreatedAt; type UpdatedAt = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Tid = St::Tid; + type CreatedAt = St::CreatedAt; + type UpdatedAt = St::UpdatedAt; + 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 `tid` field pub struct tid(()); ///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 `content` field + pub struct content(()); } } @@ -322,10 +322,10 @@ where impl DraftViewBuilder where St: draft_view_state::State, - St::Content: draft_view_state::IsSet, St::Tid: draft_view_state::IsSet, St::CreatedAt: draft_view_state::IsSet, St::UpdatedAt: draft_view_state::IsSet, + St::Content: draft_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> DraftView { diff --git a/crates/jacquard-api/src/at_youandme.rs b/crates/jacquard-api/src/at_youandme.rs new file mode 100644 index 000000000..645d1f18f --- /dev/null +++ b/crates/jacquard-api/src/at_youandme.rs @@ -0,0 +1,6 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod connection; \ No newline at end of file diff --git a/crates/jacquard-api/src/at_youandme/connection.rs b/crates/jacquard-api/src/at_youandme/connection.rs new file mode 100644 index 000000000..bf3feb82f --- /dev/null +++ b/crates/jacquard-api/src/at_youandme/connection.rs @@ -0,0 +1,297 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: at.youandme.connection +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A connection created by scanning someone's QR code + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "at.youandme.connection", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Connection { + pub created_at: Datetime, + ///DID of the connected user + pub subject: Did, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ConnectionGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Connection, +} + +impl Connection { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ConnectionRecord; +impl XrpcResp for ConnectionRecord { + const NSID: &'static str = "at.youandme.connection"; + const ENCODING: &'static str = "application/json"; + type Output = ConnectionGetRecordOutput; + type Err = RecordError; +} + +impl From> for Connection { + fn from(output: ConnectionGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Connection { + const NSID: &'static str = "at.youandme.connection"; + type Record = ConnectionRecord; +} + +impl Collection for ConnectionRecord { + const NSID: &'static str = "at.youandme.connection"; + type Record = ConnectionRecord; +} + +impl LexiconSchema for Connection { + fn nsid() -> &'static str { + "at.youandme.connection" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_at_youandme_connection() + } + fn validate(&self) -> Result<(), ConstraintError> { + Ok(()) + } +} + +pub mod connection_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 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 CreatedAt = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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 `created_at` field + pub struct created_at(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ConnectionBuilder { + _state: PhantomData St>, + _fields: (Option, Option>), + _type: PhantomData S>, +} + +impl Connection { + /// Create a new builder for this type. + pub fn new() -> ConnectionBuilder { + ConnectionBuilder::new() + } +} + +impl ConnectionBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ConnectionBuilder { + _state: PhantomData, + _fields: (None, None), + _type: PhantomData, + } + } +} + +impl ConnectionBuilder +where + St: connection_state::State, + St::CreatedAt: connection_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> ConnectionBuilder> { + self._fields.0 = Option::Some(value.into()); + ConnectionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ConnectionBuilder +where + St: connection_state::State, + St::Subject: connection_state::IsUnset, +{ + /// Set the `subject` field (required) + pub fn subject( + mut self, + value: impl Into>, + ) -> ConnectionBuilder> { + self._fields.1 = Option::Some(value.into()); + ConnectionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ConnectionBuilder +where + St: connection_state::State, + St::Subject: connection_state::IsSet, + St::CreatedAt: connection_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Connection { + Connection { + created_at: self._fields.0.unwrap(), + subject: self._fields.1.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Connection { + Connection { + created_at: self._fields.0.unwrap(), + subject: self._fields.1.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_at_youandme_connection() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("at.youandme.connection"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A connection created by scanning someone's QR code", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("subject"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("subject"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("DID of the connected user"), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs b/crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs index f871651ec..0e247e192 100644 --- a/crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs +++ b/crates/jacquard-api/src/beauty_cybernetic/trustcow/review.rs @@ -245,50 +245,50 @@ pub mod review_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Transaction; - type CreatedAt; type Rating; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Transaction = Unset; - type CreatedAt = Unset; type Rating = Unset; + type CreatedAt = Unset; } ///State transition - sets the `transaction` field to Set pub struct SetTransaction(PhantomData St>); impl sealed::Sealed for SetTransaction {} impl State for SetTransaction { type Transaction = Set; - type CreatedAt = St::CreatedAt; - type Rating = St::Rating; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Transaction = St::Transaction; - type CreatedAt = Set; type Rating = St::Rating; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `rating` field to Set pub struct SetRating(PhantomData St>); impl sealed::Sealed for SetRating {} impl State for SetRating { type Transaction = St::Transaction; - type CreatedAt = St::CreatedAt; type Rating = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Transaction = St::Transaction; + type Rating = St::Rating; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `transaction` field pub struct transaction(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `rating` field pub struct rating(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -427,8 +427,8 @@ impl ReviewBuilder where St: review_state::State, St::Transaction: review_state::IsSet, - St::CreatedAt: review_state::IsSet, St::Rating: review_state::IsSet, + St::CreatedAt: review_state::IsSet, { /// Build the final struct. pub fn build(self) -> Review { diff --git a/crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs b/crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs index 4e986b6e8..998651608 100644 --- a/crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs +++ b/crates/jacquard-api/src/beauty_cybernetic/trustcow/transaction.rs @@ -158,67 +158,67 @@ pub mod transaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ServiceConsumer; + type CreatedAt; type TransactionId; type ServiceProvider; - type CreatedAt; + type ServiceConsumer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ServiceConsumer = Unset; + type CreatedAt = Unset; type TransactionId = Unset; type ServiceProvider = Unset; - type CreatedAt = Unset; + type ServiceConsumer = Unset; } - ///State transition - sets the `service_consumer` field to Set - pub struct SetServiceConsumer(PhantomData St>); - impl sealed::Sealed for SetServiceConsumer {} - impl State for SetServiceConsumer { - type ServiceConsumer = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type TransactionId = St::TransactionId; type ServiceProvider = St::ServiceProvider; - type CreatedAt = St::CreatedAt; + type ServiceConsumer = St::ServiceConsumer; } ///State transition - sets the `transaction_id` field to Set pub struct SetTransactionId(PhantomData St>); impl sealed::Sealed for SetTransactionId {} impl State for SetTransactionId { - type ServiceConsumer = St::ServiceConsumer; + type CreatedAt = St::CreatedAt; type TransactionId = Set; type ServiceProvider = St::ServiceProvider; - type CreatedAt = St::CreatedAt; + type ServiceConsumer = St::ServiceConsumer; } ///State transition - sets the `service_provider` field to Set pub struct SetServiceProvider(PhantomData St>); impl sealed::Sealed for SetServiceProvider {} impl State for SetServiceProvider { - type ServiceConsumer = St::ServiceConsumer; + type CreatedAt = St::CreatedAt; type TransactionId = St::TransactionId; type ServiceProvider = Set; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type ServiceConsumer = St::ServiceConsumer; + } + ///State transition - sets the `service_consumer` field to Set + pub struct SetServiceConsumer(PhantomData St>); + impl sealed::Sealed for SetServiceConsumer {} + impl State for SetServiceConsumer { + type CreatedAt = St::CreatedAt; type TransactionId = St::TransactionId; type ServiceProvider = St::ServiceProvider; - type CreatedAt = Set; + type ServiceConsumer = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `service_consumer` field - pub struct service_consumer(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `transaction_id` field pub struct transaction_id(()); ///Marker type for the `service_provider` field pub struct service_provider(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `service_consumer` field + pub struct service_consumer(()); } } @@ -373,10 +373,10 @@ where impl TransactionBuilder where St: transaction_state::State, - St::ServiceConsumer: transaction_state::IsSet, + St::CreatedAt: transaction_state::IsSet, St::TransactionId: transaction_state::IsSet, St::ServiceProvider: transaction_state::IsSet, - St::CreatedAt: transaction_state::IsSet, + St::ServiceConsumer: transaction_state::IsSet, { /// Build the final struct. pub fn build(self) -> Transaction { diff --git a/crates/jacquard-api/src/blog_pckt/post.rs b/crates/jacquard-api/src/blog_pckt/post.rs index e298775d9..2da0bff70 100644 --- a/crates/jacquard-api/src/blog_pckt/post.rs +++ b/crates/jacquard-api/src/blog_pckt/post.rs @@ -153,65 +153,65 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - 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 Blog = Unset; type Blocks = Unset; type Url = Unset; + type Blog = Unset; type Title = Unset; } - ///State transition - sets the `blog` field to Set - pub struct SetBlog(PhantomData St>); - impl sealed::Sealed for SetBlog {} - impl State for SetBlog { - type Blog = Set; - type Blocks = St::Blocks; - type Url = St::Url; - type Title = St::Title; - } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData St>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { - type Blog = St::Blog; type Blocks = Set; type Url = St::Url; + type Blog = St::Blog; type Title = St::Title; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Blog = St::Blog; type Blocks = St::Blocks; type Url = Set; + type Blog = St::Blog; + type Title = St::Title; + } + ///State transition - sets the `blog` field to Set + pub struct SetBlog(PhantomData St>); + impl sealed::Sealed for SetBlog {} + impl State for SetBlog { + type Blocks = St::Blocks; + type Url = St::Url; + type Blog = Set; type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Blog = St::Blog; type Blocks = St::Blocks; type Url = St::Url; + type Blog = St::Blog; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); } @@ -410,9 +410,9 @@ where impl PostBuilder where St: post_state::State, - St::Blog: post_state::IsSet, St::Blocks: post_state::IsSet, St::Url: post_state::IsSet, + St::Blog: post_state::IsSet, St::Title: post_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/blog_pckt/richtext/facet.rs b/crates/jacquard-api/src/blog_pckt/richtext/facet.rs index 7391714c6..e832f36b2 100644 --- a/crates/jacquard-api/src/blog_pckt/richtext/facet.rs +++ b/crates/jacquard-api/src/blog_pckt/richtext/facet.rs @@ -740,37 +740,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 St>); - impl sealed::Sealed for SetByteStart {} - impl State for SetByteStart { - type ByteStart = Set; - type ByteEnd = St::ByteEnd; + type ByteStart = Unset; } ///State transition - sets the `byte_end` field to Set pub struct SetByteEnd(PhantomData St>); impl sealed::Sealed for SetByteEnd {} impl State for SetByteEnd { - type ByteStart = St::ByteStart; type ByteEnd = Set; + type ByteStart = St::ByteStart; + } + ///State transition - sets the `byte_start` field to Set + pub struct SetByteStart(PhantomData St>); + impl sealed::Sealed for SetByteStart {} + impl State for SetByteStart { + type ByteEnd = St::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(()); } } @@ -840,8 +840,8 @@ where impl ByteSliceBuilder where St: byte_slice_state::State, - St::ByteStart: byte_slice_state::IsSet, St::ByteEnd: byte_slice_state::IsSet, + St::ByteStart: byte_slice_state::IsSet, { /// Build the final struct. pub fn build(self) -> ByteSlice { diff --git a/crates/jacquard-api/src/blue__2048.rs b/crates/jacquard-api/src/blue__2048.rs index 675da8f31..2cf688569 100644 --- a/crates/jacquard-api/src/blue__2048.rs +++ b/crates/jacquard-api/src/blue__2048.rs @@ -75,67 +75,67 @@ pub mod sync_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Hash; - type SyncedWithAtRepo; type UpdatedAt; - type CreatedAt; + type SyncedWithAtRepo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Hash = Unset; - type SyncedWithAtRepo = Unset; type UpdatedAt = Unset; - type CreatedAt = Unset; + type SyncedWithAtRepo = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Hash = St::Hash; + type UpdatedAt = St::UpdatedAt; + type SyncedWithAtRepo = St::SyncedWithAtRepo; } ///State transition - sets the `hash` field to Set pub struct SetHash(PhantomData St>); impl sealed::Sealed for SetHash {} impl State for SetHash { - type Hash = Set; - type SyncedWithAtRepo = St::SyncedWithAtRepo; - type UpdatedAt = St::UpdatedAt; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `synced_with_at_repo` field to Set - pub struct SetSyncedWithAtRepo(PhantomData St>); - impl sealed::Sealed for SetSyncedWithAtRepo {} - impl State for SetSyncedWithAtRepo { - type Hash = St::Hash; - type SyncedWithAtRepo = Set; + type Hash = Set; type UpdatedAt = St::UpdatedAt; - type CreatedAt = St::CreatedAt; + type SyncedWithAtRepo = St::SyncedWithAtRepo; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { + type CreatedAt = St::CreatedAt; type Hash = St::Hash; - type SyncedWithAtRepo = St::SyncedWithAtRepo; type UpdatedAt = Set; - type CreatedAt = St::CreatedAt; + type SyncedWithAtRepo = St::SyncedWithAtRepo; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `synced_with_at_repo` field to Set + pub struct SetSyncedWithAtRepo(PhantomData St>); + impl sealed::Sealed for SetSyncedWithAtRepo {} + impl State for SetSyncedWithAtRepo { + type CreatedAt = St::CreatedAt; type Hash = St::Hash; - type SyncedWithAtRepo = St::SyncedWithAtRepo; type UpdatedAt = St::UpdatedAt; - type CreatedAt = Set; + type SyncedWithAtRepo = 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 `hash` field pub struct hash(()); - ///Marker type for the `synced_with_at_repo` field - pub struct synced_with_at_repo(()); ///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 `synced_with_at_repo` field + pub struct synced_with_at_repo(()); } } @@ -243,10 +243,10 @@ where impl SyncStatusBuilder where St: sync_status_state::State, + St::CreatedAt: sync_status_state::IsSet, St::Hash: sync_status_state::IsSet, - St::SyncedWithAtRepo: sync_status_state::IsSet, St::UpdatedAt: sync_status_state::IsSet, - St::CreatedAt: sync_status_state::IsSet, + St::SyncedWithAtRepo: sync_status_state::IsSet, { /// Build the final struct. pub fn build(self) -> SyncStatus { diff --git a/crates/jacquard-api/src/blue__2048/game.rs b/crates/jacquard-api/src/blue__2048/game.rs index 373191c85..01c207c19 100644 --- a/crates/jacquard-api/src/blue__2048/game.rs +++ b/crates/jacquard-api/src/blue__2048/game.rs @@ -141,8 +141,8 @@ pub mod game_state { type SeededRecording; type CurrentScore; type Won; - type Completed; type SyncStatus; + type Completed; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -152,8 +152,8 @@ pub mod game_state { type SeededRecording = Unset; type CurrentScore = Unset; type Won = Unset; - type Completed = Unset; type SyncStatus = Unset; + type Completed = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); @@ -163,8 +163,8 @@ pub mod game_state { type SeededRecording = St::SeededRecording; type CurrentScore = St::CurrentScore; type Won = St::Won; - type Completed = St::Completed; type SyncStatus = St::SyncStatus; + type Completed = St::Completed; } ///State transition - sets the `seeded_recording` field to Set pub struct SetSeededRecording(PhantomData St>); @@ -174,8 +174,8 @@ pub mod game_state { type SeededRecording = Set; type CurrentScore = St::CurrentScore; type Won = St::Won; - type Completed = St::Completed; type SyncStatus = St::SyncStatus; + type Completed = St::Completed; } ///State transition - sets the `current_score` field to Set pub struct SetCurrentScore(PhantomData St>); @@ -185,8 +185,8 @@ pub mod game_state { type SeededRecording = St::SeededRecording; type CurrentScore = Set; type Won = St::Won; - type Completed = St::Completed; type SyncStatus = St::SyncStatus; + type Completed = St::Completed; } ///State transition - sets the `won` field to Set pub struct SetWon(PhantomData St>); @@ -196,19 +196,8 @@ pub mod game_state { type SeededRecording = St::SeededRecording; type CurrentScore = St::CurrentScore; type Won = Set; - type Completed = St::Completed; - type SyncStatus = St::SyncStatus; - } - ///State transition - sets the `completed` field to Set - pub struct SetCompleted(PhantomData St>); - impl sealed::Sealed for SetCompleted {} - impl State for SetCompleted { - type CreatedAt = St::CreatedAt; - type SeededRecording = St::SeededRecording; - type CurrentScore = St::CurrentScore; - type Won = St::Won; - type Completed = Set; type SyncStatus = St::SyncStatus; + type Completed = St::Completed; } ///State transition - sets the `sync_status` field to Set pub struct SetSyncStatus(PhantomData St>); @@ -218,8 +207,19 @@ pub mod game_state { type SeededRecording = St::SeededRecording; type CurrentScore = St::CurrentScore; type Won = St::Won; - type Completed = St::Completed; type SyncStatus = Set; + type Completed = St::Completed; + } + ///State transition - sets the `completed` field to Set + pub struct SetCompleted(PhantomData St>); + impl sealed::Sealed for SetCompleted {} + impl State for SetCompleted { + type CreatedAt = St::CreatedAt; + type SeededRecording = St::SeededRecording; + type CurrentScore = St::CurrentScore; + type Won = St::Won; + type SyncStatus = St::SyncStatus; + type Completed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -232,10 +232,10 @@ pub mod game_state { pub struct current_score(()); ///Marker type for the `won` field pub struct won(()); - ///Marker type for the `completed` field - pub struct completed(()); ///Marker type for the `sync_status` field pub struct sync_status(()); + ///Marker type for the `completed` field + pub struct completed(()); } } @@ -392,8 +392,8 @@ where St::SeededRecording: game_state::IsSet, St::CurrentScore: game_state::IsSet, St::Won: game_state::IsSet, - St::Completed: game_state::IsSet, St::SyncStatus: game_state::IsSet, + St::Completed: game_state::IsSet, { /// Build the final struct. pub fn build(self) -> Game { diff --git a/crates/jacquard-api/src/blue__2048/key.rs b/crates/jacquard-api/src/blue__2048/key.rs index ef7694986..2b44a2368 100644 --- a/crates/jacquard-api/src/blue__2048/key.rs +++ b/crates/jacquard-api/src/blue__2048/key.rs @@ -94,37 +94,37 @@ pub mod key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Key; + 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 Key = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Key = St::Key; + type CreatedAt = Unset; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData St>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type CreatedAt = St::CreatedAt; type Key = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Key = St::Key; + 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 `key` field pub struct key(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -191,8 +191,8 @@ where impl KeyBuilder where St: key_state::State, - St::CreatedAt: key_state::IsSet, St::Key: key_state::IsSet, + St::CreatedAt: key_state::IsSet, { /// Build the final struct. pub fn build(self) -> Key { @@ -329,51 +329,51 @@ pub mod signature_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Signature; - type CreatedAt; type AtUri; + type CreatedAt; + type Signature; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Signature = Unset; - type CreatedAt = Unset; type AtUri = Unset; + type CreatedAt = Unset; + type Signature = Unset; } - ///State transition - sets the `signature` field to Set - pub struct SetSignature(PhantomData St>); - impl sealed::Sealed for SetSignature {} - impl State for SetSignature { - type Signature = Set; + ///State transition - sets the `at_uri` field to Set + pub struct SetAtUri(PhantomData St>); + impl sealed::Sealed for SetAtUri {} + impl State for SetAtUri { + type AtUri = Set; type CreatedAt = St::CreatedAt; - type AtUri = St::AtUri; + type Signature = St::Signature; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Signature = St::Signature; - type CreatedAt = Set; type AtUri = St::AtUri; - } - ///State transition - sets the `at_uri` field to Set - pub struct SetAtUri(PhantomData St>); - impl sealed::Sealed for SetAtUri {} - impl State for SetAtUri { + type CreatedAt = Set; type Signature = St::Signature; + } + ///State transition - sets the `signature` field to Set + pub struct SetSignature(PhantomData St>); + impl sealed::Sealed for SetSignature {} + impl State for SetSignature { + type AtUri = St::AtUri; type CreatedAt = St::CreatedAt; - type AtUri = Set; + type Signature = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signature` field - pub struct signature(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `at_uri` field pub struct at_uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `signature` field + pub struct signature(()); } } @@ -462,9 +462,9 @@ where impl SignatureRefBuilder where St: signature_ref_state::State, - St::Signature: signature_ref_state::IsSet, - St::CreatedAt: signature_ref_state::IsSet, St::AtUri: signature_ref_state::IsSet, + St::CreatedAt: signature_ref_state::IsSet, + St::Signature: signature_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> SignatureRef { diff --git a/crates/jacquard-api/src/blue__2048/key/player/stats.rs b/crates/jacquard-api/src/blue__2048/key/player/stats.rs index 1a1485345..3bb458d4f 100644 --- a/crates/jacquard-api/src/blue__2048/key/player/stats.rs +++ b/crates/jacquard-api/src/blue__2048/key/player/stats.rs @@ -114,37 +114,37 @@ pub mod stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Key; type CreatedAt; + type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Key = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { - type Key = Set; - type CreatedAt = St::CreatedAt; + type Key = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Key = St::Key; type CreatedAt = Set; + type Key = St::Key; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type CreatedAt = St::CreatedAt; + type Key = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `key` field - pub struct key(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `key` field + pub struct key(()); } } @@ -214,8 +214,8 @@ where impl StatsBuilder where St: stats_state::State, - St::Key: stats_state::IsSet, St::CreatedAt: stats_state::IsSet, + St::Key: stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> Stats { diff --git a/crates/jacquard-api/src/blue__2048/player/profile.rs b/crates/jacquard-api/src/blue__2048/player/profile.rs index 991f43bfe..69240a9df 100644 --- a/crates/jacquard-api/src/blue__2048/player/profile.rs +++ b/crates/jacquard-api/src/blue__2048/player/profile.rs @@ -122,50 +122,50 @@ pub mod profile_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type SyncStatus; - type CreatedAt; type SoloPlay; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type SyncStatus = Unset; - type CreatedAt = Unset; type SoloPlay = Unset; + type CreatedAt = Unset; } ///State transition - sets the `sync_status` field to Set pub struct SetSyncStatus(PhantomData St>); impl sealed::Sealed for SetSyncStatus {} impl State for SetSyncStatus { type SyncStatus = Set; - type CreatedAt = St::CreatedAt; - type SoloPlay = St::SoloPlay; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type SyncStatus = St::SyncStatus; - type CreatedAt = Set; type SoloPlay = St::SoloPlay; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `solo_play` field to Set pub struct SetSoloPlay(PhantomData St>); impl sealed::Sealed for SetSoloPlay {} impl State for SetSoloPlay { type SyncStatus = St::SyncStatus; - type CreatedAt = St::CreatedAt; type SoloPlay = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type SyncStatus = St::SyncStatus; + type SoloPlay = St::SoloPlay; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `sync_status` field pub struct sync_status(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `solo_play` field pub struct solo_play(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -255,8 +255,8 @@ impl ProfileBuilder where St: profile_state::State, St::SyncStatus: profile_state::IsSet, - St::CreatedAt: profile_state::IsSet, St::SoloPlay: profile_state::IsSet, + St::CreatedAt: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/blue__2048/player/stats.rs b/crates/jacquard-api/src/blue__2048/player/stats.rs index 600d9f962..268f91ff5 100644 --- a/crates/jacquard-api/src/blue__2048/player/stats.rs +++ b/crates/jacquard-api/src/blue__2048/player/stats.rs @@ -163,13 +163,13 @@ pub mod stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type HighestScore; + type AverageScore; type HighestNumberBlock; + type TimesTwentyFortyEightBeenFound; + type HighestScore; type LeastMovesToFindTwentyFortyEight; - type AverageScore; + type CreatedAt; type SyncStatus; - type TimesTwentyFortyEightBeenFound; type GamesPlayed; type TotalScore; } @@ -177,41 +177,27 @@ pub mod stats_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type HighestScore = Unset; + type AverageScore = Unset; type HighestNumberBlock = Unset; + type TimesTwentyFortyEightBeenFound = Unset; + type HighestScore = Unset; type LeastMovesToFindTwentyFortyEight = Unset; - type AverageScore = Unset; + type CreatedAt = Unset; type SyncStatus = Unset; - type TimesTwentyFortyEightBeenFound = Unset; type GamesPlayed = Unset; type TotalScore = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type HighestScore = St::HighestScore; + ///State transition - sets the `average_score` field to Set + pub struct SetAverageScore(PhantomData St>); + impl sealed::Sealed for SetAverageScore {} + impl State for SetAverageScore { + type AverageScore = Set; type HighestNumberBlock = St::HighestNumberBlock; - type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = St::AverageScore; - type SyncStatus = St::SyncStatus; type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; - type GamesPlayed = St::GamesPlayed; - type TotalScore = St::TotalScore; - } - ///State transition - sets the `highest_score` field to Set - pub struct SetHighestScore(PhantomData St>); - impl sealed::Sealed for SetHighestScore {} - impl State for SetHighestScore { - type CreatedAt = St::CreatedAt; - type HighestScore = Set; - type HighestNumberBlock = St::HighestNumberBlock; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = St::AverageScore; + type CreatedAt = St::CreatedAt; type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; type GamesPlayed = St::GamesPlayed; type TotalScore = St::TotalScore; } @@ -219,13 +205,45 @@ pub mod stats_state { pub struct SetHighestNumberBlock(PhantomData St>); impl sealed::Sealed for SetHighestNumberBlock {} impl State for SetHighestNumberBlock { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; + type AverageScore = St::AverageScore; type HighestNumberBlock = Set; + type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; + type CreatedAt = St::CreatedAt; + type SyncStatus = St::SyncStatus; + type GamesPlayed = St::GamesPlayed; + type TotalScore = St::TotalScore; + } + ///State transition - sets the `times_twenty_forty_eight_been_found` field to Set + pub struct SetTimesTwentyFortyEightBeenFound( + PhantomData St>, + ); + impl sealed::Sealed for SetTimesTwentyFortyEightBeenFound {} + impl State for SetTimesTwentyFortyEightBeenFound { type AverageScore = St::AverageScore; + type HighestNumberBlock = St::HighestNumberBlock; + type TimesTwentyFortyEightBeenFound = Set< + members::times_twenty_forty_eight_been_found, + >; + type HighestScore = St::HighestScore; + type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; + type CreatedAt = St::CreatedAt; type SyncStatus = St::SyncStatus; + type GamesPlayed = St::GamesPlayed; + type TotalScore = St::TotalScore; + } + ///State transition - sets the `highest_score` field to Set + pub struct SetHighestScore(PhantomData St>); + impl sealed::Sealed for SetHighestScore {} + impl State for SetHighestScore { + type AverageScore = St::AverageScore; + type HighestNumberBlock = St::HighestNumberBlock; type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = Set; + type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; + type CreatedAt = St::CreatedAt; + type SyncStatus = St::SyncStatus; type GamesPlayed = St::GamesPlayed; type TotalScore = St::TotalScore; } @@ -235,29 +253,29 @@ pub mod stats_state { ); impl sealed::Sealed for SetLeastMovesToFindTwentyFortyEight {} impl State for SetLeastMovesToFindTwentyFortyEight { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; + type AverageScore = St::AverageScore; type HighestNumberBlock = St::HighestNumberBlock; + type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = Set< members::least_moves_to_find_twenty_forty_eight, >; - type AverageScore = St::AverageScore; + type CreatedAt = St::CreatedAt; type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; type GamesPlayed = St::GamesPlayed; type TotalScore = St::TotalScore; } - ///State transition - sets the `average_score` field to Set - pub struct SetAverageScore(PhantomData St>); - impl sealed::Sealed for SetAverageScore {} - impl State for SetAverageScore { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type AverageScore = St::AverageScore; type HighestNumberBlock = St::HighestNumberBlock; + type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = Set; + type CreatedAt = Set; type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; type GamesPlayed = St::GamesPlayed; type TotalScore = St::TotalScore; } @@ -265,31 +283,13 @@ pub mod stats_state { pub struct SetSyncStatus(PhantomData St>); impl sealed::Sealed for SetSyncStatus {} impl State for SetSyncStatus { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; - type HighestNumberBlock = St::HighestNumberBlock; - type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; type AverageScore = St::AverageScore; - type SyncStatus = Set; + type HighestNumberBlock = St::HighestNumberBlock; type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; - type GamesPlayed = St::GamesPlayed; - type TotalScore = St::TotalScore; - } - ///State transition - sets the `times_twenty_forty_eight_been_found` field to Set - pub struct SetTimesTwentyFortyEightBeenFound( - PhantomData St>, - ); - impl sealed::Sealed for SetTimesTwentyFortyEightBeenFound {} - impl State for SetTimesTwentyFortyEightBeenFound { - type CreatedAt = St::CreatedAt; type HighestScore = St::HighestScore; - type HighestNumberBlock = St::HighestNumberBlock; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = St::AverageScore; - type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = Set< - members::times_twenty_forty_eight_been_found, - >; + type CreatedAt = St::CreatedAt; + type SyncStatus = Set; type GamesPlayed = St::GamesPlayed; type TotalScore = St::TotalScore; } @@ -297,13 +297,13 @@ pub mod stats_state { pub struct SetGamesPlayed(PhantomData St>); impl sealed::Sealed for SetGamesPlayed {} impl State for SetGamesPlayed { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; + type AverageScore = St::AverageScore; type HighestNumberBlock = St::HighestNumberBlock; + type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = St::AverageScore; + type CreatedAt = St::CreatedAt; type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; type GamesPlayed = Set; type TotalScore = St::TotalScore; } @@ -311,33 +311,33 @@ pub mod stats_state { pub struct SetTotalScore(PhantomData St>); impl sealed::Sealed for SetTotalScore {} impl State for SetTotalScore { - type CreatedAt = St::CreatedAt; - type HighestScore = St::HighestScore; + type AverageScore = St::AverageScore; type HighestNumberBlock = St::HighestNumberBlock; + type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; + type HighestScore = St::HighestScore; type LeastMovesToFindTwentyFortyEight = St::LeastMovesToFindTwentyFortyEight; - type AverageScore = St::AverageScore; + type CreatedAt = St::CreatedAt; type SyncStatus = St::SyncStatus; - type TimesTwentyFortyEightBeenFound = St::TimesTwentyFortyEightBeenFound; type GamesPlayed = St::GamesPlayed; type TotalScore = 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 `highest_score` field - pub struct highest_score(()); + ///Marker type for the `average_score` field + pub struct average_score(()); ///Marker type for the `highest_number_block` field pub struct highest_number_block(()); + ///Marker type for the `times_twenty_forty_eight_been_found` field + pub struct times_twenty_forty_eight_been_found(()); + ///Marker type for the `highest_score` field + pub struct highest_score(()); ///Marker type for the `least_moves_to_find_twenty_forty_eight` field pub struct least_moves_to_find_twenty_forty_eight(()); - ///Marker type for the `average_score` field - pub struct average_score(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `sync_status` field pub struct sync_status(()); - ///Marker type for the `times_twenty_forty_eight_been_found` field - pub struct times_twenty_forty_eight_been_found(()); ///Marker type for the `games_played` field pub struct games_played(()); ///Marker type for the `total_score` field @@ -554,13 +554,13 @@ where impl StatsBuilder where St: stats_state::State, - St::CreatedAt: stats_state::IsSet, - St::HighestScore: stats_state::IsSet, + St::AverageScore: stats_state::IsSet, St::HighestNumberBlock: stats_state::IsSet, + St::TimesTwentyFortyEightBeenFound: stats_state::IsSet, + St::HighestScore: stats_state::IsSet, St::LeastMovesToFindTwentyFortyEight: stats_state::IsSet, - St::AverageScore: stats_state::IsSet, + St::CreatedAt: stats_state::IsSet, St::SyncStatus: stats_state::IsSet, - St::TimesTwentyFortyEightBeenFound: stats_state::IsSet, St::GamesPlayed: stats_state::IsSet, St::TotalScore: stats_state::IsSet, { diff --git a/crates/jacquard-api/src/blue__2048/verification.rs b/crates/jacquard-api/src/blue__2048/verification.rs index 826fed5d8..918d485da 100644 --- a/crates/jacquard-api/src/blue__2048/verification.rs +++ b/crates/jacquard-api/src/blue__2048/verification.rs @@ -71,85 +71,85 @@ pub mod verification_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type KeyRef; - type RecordRef; type Signature; + type KeyRef; + type CreatedAt; type Subject; + type RecordRef; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type KeyRef = Unset; - type RecordRef = Unset; type Signature = Unset; + type KeyRef = Unset; + type CreatedAt = Unset; type Subject = Unset; + type RecordRef = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `signature` field to Set + pub struct SetSignature(PhantomData St>); + impl sealed::Sealed for SetSignature {} + impl State for SetSignature { + type Signature = Set; type KeyRef = St::KeyRef; - type RecordRef = St::RecordRef; - type Signature = St::Signature; + type CreatedAt = St::CreatedAt; type Subject = St::Subject; + type RecordRef = St::RecordRef; } ///State transition - sets the `key_ref` field to Set pub struct SetKeyRef(PhantomData St>); impl sealed::Sealed for SetKeyRef {} impl State for SetKeyRef { - type CreatedAt = St::CreatedAt; - type KeyRef = Set; - type RecordRef = St::RecordRef; type Signature = St::Signature; - type Subject = St::Subject; - } - ///State transition - sets the `record_ref` field to Set - pub struct SetRecordRef(PhantomData St>); - impl sealed::Sealed for SetRecordRef {} - impl State for SetRecordRef { + type KeyRef = Set; type CreatedAt = St::CreatedAt; - type KeyRef = St::KeyRef; - type RecordRef = Set; - type Signature = St::Signature; type Subject = St::Subject; + type RecordRef = St::RecordRef; } - ///State transition - sets the `signature` field to Set - pub struct SetSignature(PhantomData St>); - impl sealed::Sealed for SetSignature {} - impl State for SetSignature { - type CreatedAt = St::CreatedAt; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Signature = St::Signature; type KeyRef = St::KeyRef; - type RecordRef = St::RecordRef; - type Signature = Set; + type CreatedAt = Set; type Subject = St::Subject; + type RecordRef = St::RecordRef; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; + type Signature = St::Signature; type KeyRef = St::KeyRef; + type CreatedAt = St::CreatedAt; + type Subject = Set; type RecordRef = St::RecordRef; + } + ///State transition - sets the `record_ref` field to Set + pub struct SetRecordRef(PhantomData St>); + impl sealed::Sealed for SetRecordRef {} + impl State for SetRecordRef { type Signature = St::Signature; - type Subject = Set; + type KeyRef = St::KeyRef; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; + type RecordRef = 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 `key_ref` field - pub struct key_ref(()); - ///Marker type for the `record_ref` field - pub struct record_ref(()); ///Marker type for the `signature` field pub struct signature(()); + ///Marker type for the `key_ref` field + pub struct key_ref(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `record_ref` field + pub struct record_ref(()); } } @@ -282,11 +282,11 @@ where impl VerificationRefBuilder where St: verification_ref_state::State, - St::CreatedAt: verification_ref_state::IsSet, - St::KeyRef: verification_ref_state::IsSet, - St::RecordRef: verification_ref_state::IsSet, St::Signature: verification_ref_state::IsSet, + St::KeyRef: verification_ref_state::IsSet, + St::CreatedAt: verification_ref_state::IsSet, St::Subject: verification_ref_state::IsSet, + St::RecordRef: verification_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationRef { diff --git a/crates/jacquard-api/src/blue_atroom/room/layout.rs b/crates/jacquard-api/src/blue_atroom/room/layout.rs index 468863de3..b97274de9 100644 --- a/crates/jacquard-api/src/blue_atroom/room/layout.rs +++ b/crates/jacquard-api/src/blue_atroom/room/layout.rs @@ -958,51 +958,51 @@ pub mod furnishing_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Object; type Rotation; type Position; - type Object; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Object = Unset; type Rotation = Unset; type Position = Unset; - type Object = Unset; + } + ///State transition - sets the `object` field to Set + pub struct SetObject(PhantomData St>); + impl sealed::Sealed for SetObject {} + impl State for SetObject { + type Object = Set; + type Rotation = St::Rotation; + type Position = St::Position; } ///State transition - sets the `rotation` field to Set pub struct SetRotation(PhantomData St>); impl sealed::Sealed for SetRotation {} impl State for SetRotation { + type Object = St::Object; type Rotation = Set; type Position = St::Position; - type Object = St::Object; } ///State transition - sets the `position` field to Set pub struct SetPosition(PhantomData St>); impl sealed::Sealed for SetPosition {} impl State for SetPosition { - type Rotation = St::Rotation; - type Position = Set; type Object = St::Object; - } - ///State transition - sets the `object` field to Set - pub struct SetObject(PhantomData St>); - impl sealed::Sealed for SetObject {} - impl State for SetObject { type Rotation = St::Rotation; - type Position = St::Position; - type Object = Set; + type Position = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `object` field + pub struct object(()); ///Marker type for the `rotation` field pub struct rotation(()); ///Marker type for the `position` field pub struct position(()); - ///Marker type for the `object` field - pub struct object(()); } } @@ -1091,9 +1091,9 @@ where impl FurnishingBuilder where St: furnishing_state::State, + St::Object: furnishing_state::IsSet, St::Rotation: furnishing_state::IsSet, St::Position: furnishing_state::IsSet, - St::Object: furnishing_state::IsSet, { /// Build the final struct. pub fn build(self) -> Furnishing { @@ -1128,85 +1128,85 @@ pub mod layout_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; + type Floor; type Wall; type Size; - type Floor; type Furnishings; + 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 Floor = Unset; type Wall = Unset; type Size = Unset; - type Floor = Unset; type Furnishings = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `floor` field to Set + pub struct SetFloor(PhantomData St>); + impl sealed::Sealed for SetFloor {} + impl State for SetFloor { + type Floor = Set; type Wall = St::Wall; type Size = St::Size; - type Floor = St::Floor; type Furnishings = St::Furnishings; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `wall` field to Set pub struct SetWall(PhantomData St>); impl sealed::Sealed for SetWall {} impl State for SetWall { - type CreatedAt = St::CreatedAt; + type Floor = St::Floor; type Wall = Set; type Size = St::Size; - type Floor = St::Floor; type Furnishings = St::Furnishings; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { - type CreatedAt = St::CreatedAt; + type Floor = St::Floor; type Wall = St::Wall; type Size = Set; - type Floor = St::Floor; type Furnishings = St::Furnishings; - } - ///State transition - sets the `floor` field to Set - pub struct SetFloor(PhantomData St>); - impl sealed::Sealed for SetFloor {} - impl State for SetFloor { type CreatedAt = St::CreatedAt; - type Wall = St::Wall; - type Size = St::Size; - type Floor = Set; - type Furnishings = St::Furnishings; } ///State transition - sets the `furnishings` field to Set pub struct SetFurnishings(PhantomData St>); impl sealed::Sealed for SetFurnishings {} impl State for SetFurnishings { - type CreatedAt = St::CreatedAt; + type Floor = St::Floor; type Wall = St::Wall; type Size = St::Size; - type Floor = St::Floor; type Furnishings = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Floor = St::Floor; + type Wall = St::Wall; + type Size = St::Size; + type Furnishings = St::Furnishings; + 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 `floor` field + pub struct floor(()); ///Marker type for the `wall` field pub struct wall(()); ///Marker type for the `size` field pub struct size(()); - ///Marker type for the `floor` field - pub struct floor(()); ///Marker type for the `furnishings` field pub struct furnishings(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -1339,11 +1339,11 @@ where impl LayoutBuilder where St: layout_state::State, - St::CreatedAt: layout_state::IsSet, + St::Floor: layout_state::IsSet, St::Wall: layout_state::IsSet, St::Size: layout_state::IsSet, - St::Floor: layout_state::IsSet, St::Furnishings: layout_state::IsSet, + St::CreatedAt: layout_state::IsSet, { /// Build the final struct. pub fn build(self) -> Layout { @@ -1506,49 +1506,49 @@ pub mod wall_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Surface; type Thickness; + type Surface; type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Surface = Unset; type Thickness = Unset; + type Surface = Unset; type Height = Unset; } - ///State transition - sets the `surface` field to Set - pub struct SetSurface(PhantomData St>); - impl sealed::Sealed for SetSurface {} - impl State for SetSurface { - type Surface = Set; - type Thickness = St::Thickness; - type Height = St::Height; - } ///State transition - sets the `thickness` field to Set pub struct SetThickness(PhantomData St>); impl sealed::Sealed for SetThickness {} impl State for SetThickness { - type Surface = St::Surface; type Thickness = Set; + type Surface = St::Surface; + type Height = St::Height; + } + ///State transition - sets the `surface` field to Set + pub struct SetSurface(PhantomData St>); + impl sealed::Sealed for SetSurface {} + impl State for SetSurface { + type Thickness = St::Thickness; + type Surface = Set; type Height = St::Height; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Surface = St::Surface; type Thickness = St::Thickness; + type Surface = St::Surface; type Height = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `surface` field - pub struct surface(()); ///Marker type for the `thickness` field pub struct thickness(()); + ///Marker type for the `surface` field + pub struct surface(()); ///Marker type for the `height` field pub struct height(()); } @@ -1639,8 +1639,8 @@ where impl WallBuilder where St: wall_state::State, - St::Surface: wall_state::IsSet, St::Thickness: wall_state::IsSet, + St::Surface: wall_state::IsSet, St::Height: wall_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/blue_atroom/room/object.rs b/crates/jacquard-api/src/blue_atroom/room/object.rs index e7ac31829..821ba5c7d 100644 --- a/crates/jacquard-api/src/blue_atroom/room/object.rs +++ b/crates/jacquard-api/src/blue_atroom/room/object.rs @@ -341,65 +341,65 @@ pub mod object_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Model; type Name; type CreatedAt; - type Model; type Scale; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Model = Unset; type Name = Unset; type CreatedAt = Unset; - type Model = Unset; type Scale = Unset; } + ///State transition - sets the `model` field to Set + pub struct SetModel(PhantomData St>); + impl sealed::Sealed for SetModel {} + impl State for SetModel { + type Model = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type Scale = St::Scale; + } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Model = St::Model; type Name = Set; type CreatedAt = St::CreatedAt; - type Model = St::Model; type Scale = St::Scale; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; - type CreatedAt = Set; type Model = St::Model; - type Scale = St::Scale; - } - ///State transition - sets the `model` field to Set - pub struct SetModel(PhantomData St>); - impl sealed::Sealed for SetModel {} - impl State for SetModel { type Name = St::Name; - type CreatedAt = St::CreatedAt; - type Model = Set; + type CreatedAt = Set; type Scale = St::Scale; } ///State transition - sets the `scale` field to Set pub struct SetScale(PhantomData St>); impl sealed::Sealed for SetScale {} impl State for SetScale { + type Model = St::Model; type Name = St::Name; type CreatedAt = St::CreatedAt; - type Model = St::Model; type Scale = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `model` field + pub struct model(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `model` field - pub struct model(()); ///Marker type for the `scale` field pub struct scale(()); } @@ -534,9 +534,9 @@ where impl ObjectBuilder where St: object_state::State, + St::Model: object_state::IsSet, St::Name: object_state::IsSet, St::CreatedAt: object_state::IsSet, - St::Model: object_state::IsSet, St::Scale: object_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/blue_backyard/feed/comment.rs b/crates/jacquard-api/src/blue_backyard/feed/comment.rs index 3a7b94c06..8aad481e5 100644 --- a/crates/jacquard-api/src/blue_backyard/feed/comment.rs +++ b/crates/jacquard-api/src/blue_backyard/feed/comment.rs @@ -149,67 +149,67 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; - type Subject; type Root; + 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 Text = Unset; - type Subject = Unset; type Root = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; - type Subject = St::Subject; - type Root = St::Root; + type Subject = Unset; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; - type Subject = St::Subject; type Root = St::Root; + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Text = St::Text; + type Root = Set; + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Text = St::Text; - type Subject = Set; type Root = St::Root; - } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { + type Subject = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Text = St::Text; + type Root = St::Root; type Subject = St::Subject; - type Root = 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 `text` field pub struct text(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -350,10 +350,10 @@ where impl CommentBuilder where St: comment_state::State, - St::CreatedAt: comment_state::IsSet, St::Text: comment_state::IsSet, - St::Subject: comment_state::IsSet, St::Root: comment_state::IsSet, + St::Subject: comment_state::IsSet, + St::CreatedAt: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/blue_backyard/feed/post.rs b/crates/jacquard-api/src/blue_backyard/feed/post.rs index 7f8cf717d..2cc9d58f8 100644 --- a/crates/jacquard-api/src/blue_backyard/feed/post.rs +++ b/crates/jacquard-api/src/blue_backyard/feed/post.rs @@ -420,37 +420,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = St::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = St::Width; type Height = Set; + type Width = St::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = St::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(()); } } @@ -520,8 +520,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Width: aspect_ratio_state::IsSet, St::Height: aspect_ratio_state::IsSet, + St::Width: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { diff --git a/crates/jacquard-api/src/blue_backyard/graph/block.rs b/crates/jacquard-api/src/blue_backyard/graph/block.rs index 898de39ab..80aac4259 100644 --- a/crates/jacquard-api/src/blue_backyard/graph/block.rs +++ b/crates/jacquard-api/src/blue_backyard/graph/block.rs @@ -113,37 +113,37 @@ pub mod block_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -213,8 +213,8 @@ where impl BlockBuilder where St: block_state::State, - St::CreatedAt: block_state::IsSet, St::Subject: block_state::IsSet, + St::CreatedAt: block_state::IsSet, { /// Build the final struct. pub fn build(self) -> Block { diff --git a/crates/jacquard-api/src/blue_recipes/feed.rs b/crates/jacquard-api/src/blue_recipes/feed.rs index d053985e3..81506e016 100644 --- a/crates/jacquard-api/src/blue_recipes/feed.rs +++ b/crates/jacquard-api/src/blue_recipes/feed.rs @@ -334,9 +334,9 @@ pub mod recipe_view_state { pub trait State: sealed::Sealed { type Author; type Uri; - type Cid; type IndexedAt; type Record; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -344,9 +344,9 @@ pub mod recipe_view_state { impl State for Empty { type Author = Unset; type Uri = Unset; - type Cid = Unset; type IndexedAt = Unset; type Record = Unset; + type Cid = Unset; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); @@ -354,9 +354,9 @@ pub mod recipe_view_state { impl State for SetAuthor { type Author = Set; type Uri = St::Uri; - type Cid = St::Cid; type IndexedAt = St::IndexedAt; type Record = St::Record; + type Cid = St::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); @@ -364,19 +364,9 @@ pub mod recipe_view_state { impl State for SetUri { type Author = St::Author; type Uri = Set; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - type Record = St::Record; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Author = St::Author; - type Uri = St::Uri; - type Cid = Set; type IndexedAt = St::IndexedAt; type Record = St::Record; + type Cid = St::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); @@ -384,9 +374,9 @@ pub mod recipe_view_state { impl State for SetIndexedAt { type Author = St::Author; type Uri = St::Uri; - type Cid = St::Cid; type IndexedAt = Set; type Record = St::Record; + type Cid = St::Cid; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); @@ -394,9 +384,19 @@ pub mod recipe_view_state { impl State for SetRecord { type Author = St::Author; type Uri = St::Uri; - type Cid = St::Cid; type IndexedAt = St::IndexedAt; type Record = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Author = St::Author; + type Uri = St::Uri; + type IndexedAt = St::IndexedAt; + type Record = St::Record; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -405,12 +405,12 @@ pub mod recipe_view_state { pub struct author(()); ///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 `record` field pub struct record(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -545,9 +545,9 @@ where St: recipe_view_state::State, St::Author: recipe_view_state::IsSet, St::Uri: recipe_view_state::IsSet, - St::Cid: recipe_view_state::IsSet, St::IndexedAt: recipe_view_state::IsSet, St::Record: recipe_view_state::IsSet, + St::Cid: recipe_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecipeView { diff --git a/crates/jacquard-api/src/blue_recipes/feed/recipe.rs b/crates/jacquard-api/src/blue_recipes/feed/recipe.rs index 61c5638ff..401335345 100644 --- a/crates/jacquard-api/src/blue_recipes/feed/recipe.rs +++ b/crates/jacquard-api/src/blue_recipes/feed/recipe.rs @@ -472,51 +472,51 @@ pub mod recipe_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Steps; - type Ingredients; type Title; + type Ingredients; + type Steps; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Steps = Unset; - type Ingredients = Unset; type Title = Unset; + type Ingredients = Unset; + type Steps = Unset; } - ///State transition - sets the `steps` field to Set - pub struct SetSteps(PhantomData St>); - impl sealed::Sealed for SetSteps {} - impl State for SetSteps { - type Steps = Set; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type Ingredients = St::Ingredients; - type Title = St::Title; + type Steps = St::Steps; } ///State transition - sets the `ingredients` field to Set pub struct SetIngredients(PhantomData St>); impl sealed::Sealed for SetIngredients {} impl State for SetIngredients { - type Steps = St::Steps; - type Ingredients = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { + type Ingredients = Set; type Steps = St::Steps; + } + ///State transition - sets the `steps` field to Set + pub struct SetSteps(PhantomData St>); + impl sealed::Sealed for SetSteps {} + impl State for SetSteps { + type Title = St::Title; type Ingredients = St::Ingredients; - type Title = Set; + type Steps = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `steps` field - pub struct steps(()); - ///Marker type for the `ingredients` field - pub struct ingredients(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `ingredients` field + pub struct ingredients(()); + ///Marker type for the `steps` field + pub struct steps(()); } } @@ -679,9 +679,9 @@ where impl RecipeBuilder where St: recipe_state::State, - St::Steps: recipe_state::IsSet, - St::Ingredients: recipe_state::IsSet, St::Title: recipe_state::IsSet, + St::Ingredients: recipe_state::IsSet, + St::Steps: recipe_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recipe { diff --git a/crates/jacquard-api/src/blue_rito/feed/bookmark.rs b/crates/jacquard-api/src/blue_rito/feed/bookmark.rs index f00b746ef..522532e1d 100644 --- a/crates/jacquard-api/src/blue_rito/feed/bookmark.rs +++ b/crates/jacquard-api/src/blue_rito/feed/bookmark.rs @@ -389,51 +389,51 @@ pub mod bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Comments; type Subject; + type Comments; + 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 Comments = Unset; type Subject = Unset; + type Comments = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; type Comments = St::Comments; - type Subject = St::Subject; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `comments` field to Set pub struct SetComments(PhantomData St>); impl sealed::Sealed for SetComments {} impl State for SetComments { - type CreatedAt = St::CreatedAt; - type Comments = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + type Comments = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::Subject; type Comments = St::Comments; - type Subject = 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 `comments` field - pub struct comments(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `comments` field + pub struct comments(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -582,9 +582,9 @@ impl BookmarkBuilder { impl BookmarkBuilder where St: bookmark_state::State, - St::CreatedAt: bookmark_state::IsSet, - St::Comments: bookmark_state::IsSet, St::Subject: bookmark_state::IsSet, + St::Comments: bookmark_state::IsSet, + St::CreatedAt: bookmark_state::IsSet, { /// Build the final struct. pub fn build(self) -> Bookmark { diff --git a/crates/jacquard-api/src/blue_rito/feed/like.rs b/crates/jacquard-api/src/blue_rito/feed/like.rs index f35d4ebb1..7c7177c7b 100644 --- a/crates/jacquard-api/src/blue_rito/feed/like.rs +++ b/crates/jacquard-api/src/blue_rito/feed/like.rs @@ -112,37 +112,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -212,8 +212,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/blue_rito/label/auto/post.rs b/crates/jacquard-api/src/blue_rito/label/auto/post.rs index 6ac69437d..72a2e0b2a 100644 --- a/crates/jacquard-api/src/blue_rito/label/auto/post.rs +++ b/crates/jacquard-api/src/blue_rito/label/auto/post.rs @@ -123,84 +123,84 @@ pub mod post_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type AppliedTo; - type Label; + type Condition; type DurationInHours; + type Label; type CreatedAt; - type Condition; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type AppliedTo = Unset; - type Label = Unset; + type Condition = Unset; type DurationInHours = Unset; + type Label = Unset; type CreatedAt = Unset; - type Condition = Unset; } ///State transition - sets the `applied_to` field to Set pub struct SetAppliedTo(PhantomData St>); impl sealed::Sealed for SetAppliedTo {} impl State for SetAppliedTo { type AppliedTo = Set; - type Label = St::Label; + type Condition = St::Condition; type DurationInHours = St::DurationInHours; + type Label = St::Label; type CreatedAt = St::CreatedAt; - type Condition = St::Condition; } - ///State transition - sets the `label` field to Set - pub struct SetLabel(PhantomData St>); - impl sealed::Sealed for SetLabel {} - impl State for SetLabel { + ///State transition - sets the `condition` field to Set + pub struct SetCondition(PhantomData St>); + impl sealed::Sealed for SetCondition {} + impl State for SetCondition { type AppliedTo = St::AppliedTo; - type Label = Set; + type Condition = Set; type DurationInHours = St::DurationInHours; + type Label = St::Label; type CreatedAt = St::CreatedAt; - type Condition = St::Condition; } ///State transition - sets the `duration_in_hours` field to Set pub struct SetDurationInHours(PhantomData St>); impl sealed::Sealed for SetDurationInHours {} impl State for SetDurationInHours { type AppliedTo = St::AppliedTo; - type Label = St::Label; + type Condition = St::Condition; type DurationInHours = Set; + type Label = St::Label; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `label` field to Set + pub struct SetLabel(PhantomData St>); + impl sealed::Sealed for SetLabel {} + impl State for SetLabel { + type AppliedTo = St::AppliedTo; type Condition = St::Condition; + type DurationInHours = St::DurationInHours; + type Label = Set; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type AppliedTo = St::AppliedTo; - type Label = St::Label; - type DurationInHours = St::DurationInHours; - type CreatedAt = Set; type Condition = St::Condition; - } - ///State transition - sets the `condition` field to Set - pub struct SetCondition(PhantomData St>); - impl sealed::Sealed for SetCondition {} - impl State for SetCondition { - type AppliedTo = St::AppliedTo; - type Label = St::Label; type DurationInHours = St::DurationInHours; - type CreatedAt = St::CreatedAt; - type Condition = Set; + type Label = St::Label; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `applied_to` field pub struct applied_to(()); - ///Marker type for the `label` field - pub struct label(()); + ///Marker type for the `condition` field + pub struct condition(()); ///Marker type for the `duration_in_hours` field pub struct duration_in_hours(()); + ///Marker type for the `label` field + pub struct label(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `condition` field - pub struct condition(()); } } @@ -341,10 +341,10 @@ impl PostBuilder where St: post_state::State, St::AppliedTo: post_state::IsSet, - St::Label: post_state::IsSet, + St::Condition: post_state::IsSet, St::DurationInHours: post_state::IsSet, + St::Label: post_state::IsSet, St::CreatedAt: post_state::IsSet, - St::Condition: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/blue_skytalk/talk/comment.rs b/crates/jacquard-api/src/blue_skytalk/talk/comment.rs index 20124d667..bb6c08f76 100644 --- a/crates/jacquard-api/src/blue_skytalk/talk/comment.rs +++ b/crates/jacquard-api/src/blue_skytalk/talk/comment.rs @@ -154,51 +154,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type ThreadUri; type Text; + 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 ThreadUri = Unset; type Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type ThreadUri = St::ThreadUri; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `thread_uri` field to Set pub struct SetThreadUri(PhantomData St>); impl sealed::Sealed for SetThreadUri {} impl State for SetThreadUri { - type CreatedAt = St::CreatedAt; type ThreadUri = Set; type Text = St::Text; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type ThreadUri = St::ThreadUri; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type ThreadUri = St::ThreadUri; + type Text = St::Text; + 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 `thread_uri` field pub struct thread_uri(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -300,9 +300,9 @@ where impl CommentBuilder where St: comment_state::State, - St::CreatedAt: comment_state::IsSet, St::ThreadUri: comment_state::IsSet, St::Text: comment_state::IsSet, + St::CreatedAt: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/blue_skytalk/talk/thread.rs b/crates/jacquard-api/src/blue_skytalk/talk/thread.rs index 37a8bc0b1..d62d0b87a 100644 --- a/crates/jacquard-api/src/blue_skytalk/talk/thread.rs +++ b/crates/jacquard-api/src/blue_skytalk/talk/thread.rs @@ -180,50 +180,50 @@ pub mod thread_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type CreatedAt; type ChannelId; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type CreatedAt = Unset; type ChannelId = Unset; + type CreatedAt = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type CreatedAt = St::CreatedAt; - type ChannelId = St::ChannelId; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Title = St::Title; - type CreatedAt = Set; type ChannelId = St::ChannelId; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `channel_id` field to Set pub struct SetChannelId(PhantomData St>); impl sealed::Sealed for SetChannelId {} impl State for SetChannelId { type Title = St::Title; - type CreatedAt = St::CreatedAt; type ChannelId = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Title = St::Title; + type ChannelId = St::ChannelId; + type CreatedAt = 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 `created_at` field - pub struct created_at(()); ///Marker type for the `channel_id` field pub struct channel_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -345,8 +345,8 @@ impl ThreadBuilder where St: thread_state::State, St::Title: thread_state::IsSet, - St::CreatedAt: thread_state::IsSet, St::ChannelId: thread_state::IsSet, + St::CreatedAt: thread_state::IsSet, { /// Build the final struct. pub fn build(self) -> Thread { diff --git a/crates/jacquard-api/src/bond_biblio/book.rs b/crates/jacquard-api/src/bond_biblio/book.rs index 877dc02a7..22169f828 100644 --- a/crates/jacquard-api/src/bond_biblio/book.rs +++ b/crates/jacquard-api/src/bond_biblio/book.rs @@ -154,51 +154,51 @@ pub mod book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; - type CreatedAt; type Title; + type CreatedAt; + type Authors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; - type CreatedAt = Unset; type Title = Unset; + type CreatedAt = Unset; + type Authors = Unset; } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type CreatedAt = St::CreatedAt; - type Title = St::Title; + type Authors = St::Authors; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Authors = St::Authors; - type CreatedAt = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { + type CreatedAt = Set; type Authors = St::Authors; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Title = St::Title; type CreatedAt = St::CreatedAt; - type Title = Set; + type Authors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `authors` field - pub struct authors(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `authors` field + pub struct authors(()); } } @@ -300,9 +300,9 @@ where impl BookBuilder where St: book_state::State, - St::Authors: book_state::IsSet, - St::CreatedAt: book_state::IsSet, St::Title: book_state::IsSet, + St::CreatedAt: book_state::IsSet, + St::Authors: book_state::IsSet, { /// Build the final struct. pub fn build(self) -> Book { diff --git a/crates/jacquard-api/src/bond_biblio/list.rs b/crates/jacquard-api/src/bond_biblio/list.rs index 103997773..72edf0a87 100644 --- a/crates/jacquard-api/src/bond_biblio/list.rs +++ b/crates/jacquard-api/src/bond_biblio/list.rs @@ -170,85 +170,85 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Books; type CreatedAt; - type Librarians; + type Books; type Title; type Duedate; + type Librarians; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Books = Unset; type CreatedAt = Unset; - type Librarians = Unset; + type Books = Unset; type Title = Unset; type Duedate = Unset; - } - ///State transition - sets the `books` field to Set - pub struct SetBooks(PhantomData St>); - impl sealed::Sealed for SetBooks {} - impl State for SetBooks { - type Books = Set; - type CreatedAt = St::CreatedAt; - type Librarians = St::Librarians; - type Title = St::Title; - type Duedate = St::Duedate; + type Librarians = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Books = St::Books; type CreatedAt = Set; - type Librarians = St::Librarians; + type Books = St::Books; type Title = St::Title; type Duedate = St::Duedate; + type Librarians = St::Librarians; } - ///State transition - sets the `librarians` field to Set - pub struct SetLibrarians(PhantomData St>); - impl sealed::Sealed for SetLibrarians {} - impl State for SetLibrarians { - type Books = St::Books; + ///State transition - sets the `books` field to Set + pub struct SetBooks(PhantomData St>); + impl sealed::Sealed for SetBooks {} + impl State for SetBooks { type CreatedAt = St::CreatedAt; - type Librarians = Set; + type Books = Set; type Title = St::Title; type Duedate = St::Duedate; + type Librarians = St::Librarians; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Books = St::Books; type CreatedAt = St::CreatedAt; - type Librarians = St::Librarians; + type Books = St::Books; type Title = Set; type Duedate = St::Duedate; + type Librarians = St::Librarians; } ///State transition - sets the `duedate` field to Set pub struct SetDuedate(PhantomData St>); impl sealed::Sealed for SetDuedate {} impl State for SetDuedate { - type Books = St::Books; type CreatedAt = St::CreatedAt; - type Librarians = St::Librarians; + type Books = St::Books; type Title = St::Title; type Duedate = Set; + type Librarians = St::Librarians; + } + ///State transition - sets the `librarians` field to Set + pub struct SetLibrarians(PhantomData St>); + impl sealed::Sealed for SetLibrarians {} + impl State for SetLibrarians { + type CreatedAt = St::CreatedAt; + type Books = St::Books; + type Title = St::Title; + type Duedate = St::Duedate; + type Librarians = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `books` field - pub struct books(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `librarians` field - pub struct librarians(()); + ///Marker type for the `books` field + pub struct books(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `duedate` field pub struct duedate(()); + ///Marker type for the `librarians` field + pub struct librarians(()); } } @@ -395,11 +395,11 @@ where impl ListBuilder where St: list_state::State, - St::Books: list_state::IsSet, St::CreatedAt: list_state::IsSet, - St::Librarians: list_state::IsSet, + St::Books: list_state::IsSet, St::Title: list_state::IsSet, St::Duedate: list_state::IsSet, + St::Librarians: list_state::IsSet, { /// Build the final struct. pub fn build(self) -> List { diff --git a/crates/jacquard-api/src/bond_biblio/stamp.rs b/crates/jacquard-api/src/bond_biblio/stamp.rs index 9434fbf38..6c31e2d3b 100644 --- a/crates/jacquard-api/src/bond_biblio/stamp.rs +++ b/crates/jacquard-api/src/bond_biblio/stamp.rs @@ -117,50 +117,50 @@ pub mod stamp_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type List; - type Book; type CreatedAt; + type Book; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type List = Unset; - type Book = Unset; type CreatedAt = Unset; + type Book = Unset; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData St>); impl sealed::Sealed for SetList {} impl State for SetList { type List = Set; - type Book = St::Book; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `book` field to Set - pub struct SetBook(PhantomData St>); - impl sealed::Sealed for SetBook {} - impl State for SetBook { - type List = St::List; - type Book = Set; type CreatedAt = St::CreatedAt; + type Book = St::Book; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type List = St::List; - type Book = St::Book; type CreatedAt = Set; + type Book = St::Book; + } + ///State transition - sets the `book` field to Set + pub struct SetBook(PhantomData St>); + impl sealed::Sealed for SetBook {} + impl State for SetBook { + type List = St::List; + type CreatedAt = St::CreatedAt; + type Book = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `list` field pub struct list(()); - ///Marker type for the `book` field - pub struct book(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `book` field + pub struct book(()); } } @@ -250,8 +250,8 @@ impl StampBuilder where St: stamp_state::State, St::List: stamp_state::IsSet, - St::Book: stamp_state::IsSet, St::CreatedAt: stamp_state::IsSet, + St::Book: stamp_state::IsSet, { /// Build the final struct. pub fn build(self) -> Stamp { diff --git a/crates/jacquard-api/src/buzz_bookhive.rs b/crates/jacquard-api/src/buzz_bookhive.rs index dc34baa47..801c0a879 100644 --- a/crates/jacquard-api/src/buzz_bookhive.rs +++ b/crates/jacquard-api/src/buzz_bookhive.rs @@ -746,93 +746,95 @@ pub mod activity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Type; type CreatedAt; type HiveId; type Title; type UserDid; type UserHandle; - type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Type = Unset; type CreatedAt = Unset; type HiveId = Unset; type Title = Unset; type UserDid = Unset; type UserHandle = Unset; - type Type = Unset; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Type = Set; + type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + type Title = St::Title; + type UserDid = St::UserDid; + type UserHandle = St::UserHandle; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Type = St::Type; type CreatedAt = Set; type HiveId = St::HiveId; type Title = St::Title; type UserDid = St::UserDid; type UserHandle = St::UserHandle; - type Type = St::Type; } ///State transition - sets the `hive_id` field to Set pub struct SetHiveId(PhantomData St>); impl sealed::Sealed for SetHiveId {} impl State for SetHiveId { + type Type = St::Type; type CreatedAt = St::CreatedAt; type HiveId = Set; type Title = St::Title; type UserDid = St::UserDid; type UserHandle = St::UserHandle; - type Type = St::Type; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type Type = St::Type; type CreatedAt = St::CreatedAt; type HiveId = St::HiveId; type Title = Set; type UserDid = St::UserDid; type UserHandle = St::UserHandle; - type Type = St::Type; } ///State transition - sets the `user_did` field to Set pub struct SetUserDid(PhantomData St>); impl sealed::Sealed for SetUserDid {} impl State for SetUserDid { + type Type = St::Type; type CreatedAt = St::CreatedAt; type HiveId = St::HiveId; type Title = St::Title; type UserDid = Set; type UserHandle = St::UserHandle; - type Type = St::Type; } ///State transition - sets the `user_handle` field to Set pub struct SetUserHandle(PhantomData St>); impl sealed::Sealed for SetUserHandle {} impl State for SetUserHandle { - type CreatedAt = St::CreatedAt; - type HiveId = St::HiveId; - type Title = St::Title; - type UserDid = St::UserDid; - type UserHandle = Set; type Type = St::Type; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { type CreatedAt = St::CreatedAt; type HiveId = St::HiveId; type Title = St::Title; type UserDid = St::UserDid; - type UserHandle = St::UserHandle; - type Type = Set; + type UserHandle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `type` field + pub struct r#type(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `hive_id` field @@ -843,8 +845,6 @@ pub mod activity_state { pub struct user_did(()); ///Marker type for the `user_handle` field pub struct user_handle(()); - ///Marker type for the `type` field - pub struct r#type(()); } } @@ -997,12 +997,12 @@ where impl ActivityBuilder where St: activity_state::State, + St::Type: activity_state::IsSet, St::CreatedAt: activity_state::IsSet, St::HiveId: activity_state::IsSet, St::Title: activity_state::IsSet, St::UserDid: activity_state::IsSet, St::UserHandle: activity_state::IsSet, - St::Type: activity_state::IsSet, { /// Build the final struct. pub fn build(self) -> Activity { @@ -1799,105 +1799,105 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Handle; type Comment; - type Parent; - type Did; type CreatedAt; type Book; - type Handle; + type Parent; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Handle = Unset; type Comment = Unset; - type Parent = Unset; - type Did = Unset; type CreatedAt = Unset; type Book = Unset; - type Handle = Unset; + type Parent = Unset; + type Did = Unset; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Handle = Set; + type Comment = St::Comment; + type CreatedAt = St::CreatedAt; + type Book = St::Book; + type Parent = St::Parent; + type Did = St::Did; } ///State transition - sets the `comment` field to Set pub struct SetComment(PhantomData St>); impl sealed::Sealed for SetComment {} impl State for SetComment { - type Comment = Set; - type Parent = St::Parent; - type Did = St::Did; - type CreatedAt = St::CreatedAt; - type Book = St::Book; type Handle = St::Handle; - } - ///State transition - sets the `parent` field to Set - pub struct SetParent(PhantomData St>); - impl sealed::Sealed for SetParent {} - impl State for SetParent { - type Comment = St::Comment; - type Parent = Set; - type Did = St::Did; + type Comment = Set; type CreatedAt = St::CreatedAt; type Book = St::Book; - type Handle = St::Handle; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Comment = St::Comment; type Parent = St::Parent; - type Did = Set; - type CreatedAt = St::CreatedAt; - type Book = St::Book; - type Handle = St::Handle; + type Did = St::Did; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Handle = St::Handle; type Comment = St::Comment; - type Parent = St::Parent; - type Did = St::Did; type CreatedAt = Set; type Book = St::Book; - type Handle = St::Handle; + type Parent = St::Parent; + type Did = St::Did; } ///State transition - sets the `book` field to Set pub struct SetBook(PhantomData St>); impl sealed::Sealed for SetBook {} impl State for SetBook { + type Handle = St::Handle; type Comment = St::Comment; - type Parent = St::Parent; - type Did = St::Did; type CreatedAt = St::CreatedAt; type Book = Set; - type Handle = St::Handle; + type Parent = St::Parent; + type Did = St::Did; } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { + ///State transition - sets the `parent` field to Set + pub struct SetParent(PhantomData St>); + impl sealed::Sealed for SetParent {} + impl State for SetParent { + type Handle = St::Handle; type Comment = St::Comment; - type Parent = St::Parent; + type CreatedAt = St::CreatedAt; + type Book = St::Book; + type Parent = Set; type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = St::Handle; + type Comment = St::Comment; type CreatedAt = St::CreatedAt; type Book = St::Book; - type Handle = Set; + type Parent = St::Parent; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `handle` field + pub struct handle(()); ///Marker type for the `comment` field pub struct comment(()); - ///Marker type for the `parent` field - pub struct parent(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `book` field pub struct book(()); - ///Marker type for the `handle` field - pub struct handle(()); + ///Marker type for the `parent` field + pub struct parent(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -2050,12 +2050,12 @@ where impl CommentBuilder where St: comment_state::State, + St::Handle: comment_state::IsSet, St::Comment: comment_state::IsSet, - St::Parent: comment_state::IsSet, - St::Did: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, St::Book: comment_state::IsSet, - St::Handle: comment_state::IsSet, + St::Parent: comment_state::IsSet, + St::Did: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { @@ -2093,67 +2093,67 @@ pub mod profile_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Reviews; type DisplayName; type Handle; type BooksRead; - type Reviews; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Reviews = Unset; type DisplayName = Unset; type Handle = Unset; type BooksRead = Unset; - type Reviews = Unset; + } + ///State transition - sets the `reviews` field to Set + pub struct SetReviews(PhantomData St>); + impl sealed::Sealed for SetReviews {} + impl State for SetReviews { + type Reviews = Set; + type DisplayName = St::DisplayName; + type Handle = St::Handle; + type BooksRead = St::BooksRead; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type Reviews = St::Reviews; type DisplayName = Set; type Handle = St::Handle; type BooksRead = St::BooksRead; - type Reviews = St::Reviews; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { + type Reviews = St::Reviews; type DisplayName = St::DisplayName; type Handle = Set; type BooksRead = St::BooksRead; - type Reviews = St::Reviews; } ///State transition - sets the `books_read` field to Set pub struct SetBooksRead(PhantomData St>); impl sealed::Sealed for SetBooksRead {} impl State for SetBooksRead { - type DisplayName = St::DisplayName; - type Handle = St::Handle; - type BooksRead = Set; type Reviews = St::Reviews; - } - ///State transition - sets the `reviews` field to Set - pub struct SetReviews(PhantomData St>); - impl sealed::Sealed for SetReviews {} - impl State for SetReviews { type DisplayName = St::DisplayName; type Handle = St::Handle; - type BooksRead = St::BooksRead; - type Reviews = Set; + type BooksRead = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `reviews` field + pub struct reviews(()); ///Marker type for the `display_name` field pub struct display_name(()); ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `books_read` field pub struct books_read(()); - ///Marker type for the `reviews` field - pub struct reviews(()); } } @@ -2308,10 +2308,10 @@ where impl ProfileBuilder where St: profile_state::State, + St::Reviews: profile_state::IsSet, St::DisplayName: profile_state::IsSet, St::Handle: profile_state::IsSet, St::BooksRead: profile_state::IsSet, - St::Reviews: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { @@ -2352,66 +2352,66 @@ pub mod review_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Handle; - type Review; type Did; + type Review; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Handle = Unset; - type Review = Unset; type Did = Unset; + type Review = Unset; + type Handle = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Handle = St::Handle; - type Review = St::Review; type Did = St::Did; + type Review = St::Review; + type Handle = St::Handle; } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { type CreatedAt = St::CreatedAt; - type Handle = Set; + type Did = Set; type Review = St::Review; - type Did = St::Did; + type Handle = St::Handle; } ///State transition - sets the `review` field to Set pub struct SetReview(PhantomData St>); impl sealed::Sealed for SetReview {} impl State for SetReview { type CreatedAt = St::CreatedAt; - type Handle = St::Handle; - type Review = Set; type Did = St::Did; + type Review = Set; + type Handle = St::Handle; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { type CreatedAt = St::CreatedAt; - type Handle = St::Handle; + type Did = St::Did; type Review = St::Review; - type Did = Set; + type Handle = 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 `handle` field - pub struct handle(()); - ///Marker type for the `review` field - pub struct review(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `review` field + pub struct review(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -2533,9 +2533,9 @@ impl ReviewBuilder where St: review_state::State, St::CreatedAt: review_state::IsSet, - St::Handle: review_state::IsSet, - St::Review: review_state::IsSet, St::Did: review_state::IsSet, + St::Review: review_state::IsSet, + St::Handle: review_state::IsSet, { /// Build the final struct. pub fn build(self) -> Review { @@ -2571,105 +2571,105 @@ pub mod user_book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; + type CreatedAt; type Thumbnail; - type HiveId; type UserDid; type Title; - type CreatedAt; + type HiveId; + type Authors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; + type CreatedAt = Unset; type Thumbnail = Unset; - type HiveId = Unset; type UserDid = Unset; type Title = Unset; - type CreatedAt = Unset; + type HiveId = Unset; + type Authors = Unset; } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Thumbnail = St::Thumbnail; - type HiveId = St::HiveId; type UserDid = St::UserDid; type Title = St::Title; - type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + type Authors = St::Authors; } ///State transition - sets the `thumbnail` field to Set pub struct SetThumbnail(PhantomData St>); impl sealed::Sealed for SetThumbnail {} impl State for SetThumbnail { - type Authors = St::Authors; + type CreatedAt = St::CreatedAt; type Thumbnail = Set; - type HiveId = St::HiveId; type UserDid = St::UserDid; type Title = St::Title; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `hive_id` field to Set - pub struct SetHiveId(PhantomData St>); - impl sealed::Sealed for SetHiveId {} - impl State for SetHiveId { + type HiveId = St::HiveId; type Authors = St::Authors; - type Thumbnail = St::Thumbnail; - type HiveId = Set; - type UserDid = St::UserDid; - type Title = St::Title; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `user_did` field to Set pub struct SetUserDid(PhantomData St>); impl sealed::Sealed for SetUserDid {} impl State for SetUserDid { - type Authors = St::Authors; + type CreatedAt = St::CreatedAt; type Thumbnail = St::Thumbnail; - type HiveId = St::HiveId; type UserDid = Set; type Title = St::Title; - type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + type Authors = St::Authors; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Authors = St::Authors; + type CreatedAt = St::CreatedAt; type Thumbnail = St::Thumbnail; - type HiveId = St::HiveId; type UserDid = St::UserDid; type Title = Set; - type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + type Authors = St::Authors; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `hive_id` field to Set + pub struct SetHiveId(PhantomData St>); + impl sealed::Sealed for SetHiveId {} + impl State for SetHiveId { + type CreatedAt = St::CreatedAt; + type Thumbnail = St::Thumbnail; + type UserDid = St::UserDid; + type Title = St::Title; + type HiveId = Set; type Authors = St::Authors; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type CreatedAt = St::CreatedAt; type Thumbnail = St::Thumbnail; - type HiveId = St::HiveId; type UserDid = St::UserDid; type Title = St::Title; - type CreatedAt = Set; + type HiveId = St::HiveId; + type Authors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `authors` field - pub struct authors(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `thumbnail` field pub struct thumbnail(()); - ///Marker type for the `hive_id` field - pub struct hive_id(()); ///Marker type for the `user_did` field pub struct user_did(()); ///Marker type for the `title` field pub struct title(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `hive_id` field + pub struct hive_id(()); + ///Marker type for the `authors` field + pub struct authors(()); } } @@ -2985,12 +2985,12 @@ impl UserBookBuilder { impl UserBookBuilder where St: user_book_state::State, - St::Authors: user_book_state::IsSet, + St::CreatedAt: user_book_state::IsSet, St::Thumbnail: user_book_state::IsSet, - St::HiveId: user_book_state::IsSet, St::UserDid: user_book_state::IsSet, St::Title: user_book_state::IsSet, - St::CreatedAt: user_book_state::IsSet, + St::HiveId: user_book_state::IsSet, + St::Authors: user_book_state::IsSet, { /// Build the final struct. pub fn build(self) -> UserBook { diff --git a/crates/jacquard-api/src/buzz_bookhive/book.rs b/crates/jacquard-api/src/buzz_bookhive/book.rs index 6118382d2..cb394a34e 100644 --- a/crates/jacquard-api/src/buzz_bookhive/book.rs +++ b/crates/jacquard-api/src/buzz_bookhive/book.rs @@ -343,67 +343,67 @@ pub mod book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; - type HiveId; type Authors; type CreatedAt; + type HiveId; + 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 HiveId = Unset; type Authors = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type HiveId = St::HiveId; - type Authors = St::Authors; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `hive_id` field to Set - pub struct SetHiveId(PhantomData St>); - impl sealed::Sealed for SetHiveId {} - impl State for SetHiveId { - type Title = St::Title; - type HiveId = Set; - type Authors = St::Authors; - type CreatedAt = St::CreatedAt; + type HiveId = Unset; + type Title = Unset; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData St>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { - type Title = St::Title; - type HiveId = St::HiveId; type Authors = Set; type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + type Title = St::Title; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Title = St::Title; - type HiveId = St::HiveId; type Authors = St::Authors; type CreatedAt = Set; + type HiveId = St::HiveId; + type Title = St::Title; + } + ///State transition - sets the `hive_id` field to Set + pub struct SetHiveId(PhantomData St>); + impl sealed::Sealed for SetHiveId {} + impl State for SetHiveId { + type Authors = St::Authors; + type CreatedAt = St::CreatedAt; + type HiveId = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Authors = St::Authors; + type CreatedAt = St::CreatedAt; + type HiveId = St::HiveId; + 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 `hive_id` field - pub struct hive_id(()); ///Marker type for the `authors` field pub struct authors(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `hive_id` field + pub struct hive_id(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -614,10 +614,10 @@ where impl BookBuilder where St: book_state::State, - St::Title: book_state::IsSet, - St::HiveId: book_state::IsSet, St::Authors: book_state::IsSet, St::CreatedAt: book_state::IsSet, + St::HiveId: book_state::IsSet, + St::Title: book_state::IsSet, { /// Build the final struct. pub fn build(self) -> Book { diff --git a/crates/jacquard-api/src/buzz_bookhive/buzz.rs b/crates/jacquard-api/src/buzz_bookhive/buzz.rs index d57a0b661..a67008f0f 100644 --- a/crates/jacquard-api/src/buzz_bookhive/buzz.rs +++ b/crates/jacquard-api/src/buzz_bookhive/buzz.rs @@ -141,65 +141,65 @@ pub mod buzz_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Book; type Comment; - type CreatedAt; type Parent; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Book = Unset; type Comment = Unset; - type CreatedAt = Unset; type Parent = Unset; } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Book = St::Book; + type Comment = St::Comment; + type Parent = St::Parent; + } ///State transition - sets the `book` field to Set pub struct SetBook(PhantomData St>); impl sealed::Sealed for SetBook {} impl State for SetBook { + type CreatedAt = St::CreatedAt; type Book = Set; type Comment = St::Comment; - type CreatedAt = St::CreatedAt; type Parent = St::Parent; } ///State transition - sets the `comment` field to Set pub struct SetComment(PhantomData St>); impl sealed::Sealed for SetComment {} impl State for SetComment { - type Book = St::Book; - type Comment = Set; type CreatedAt = St::CreatedAt; - type Parent = St::Parent; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Book = St::Book; - type Comment = St::Comment; - type CreatedAt = Set; + type Comment = Set; type Parent = St::Parent; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); impl sealed::Sealed for SetParent {} impl State for SetParent { + type CreatedAt = St::CreatedAt; type Book = St::Book; type Comment = St::Comment; - type CreatedAt = St::CreatedAt; type Parent = 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 `book` field pub struct book(()); ///Marker type for the `comment` field pub struct comment(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `parent` field pub struct parent(()); } @@ -309,9 +309,9 @@ where impl BuzzBuilder where St: buzz_state::State, + St::CreatedAt: buzz_state::IsSet, St::Book: buzz_state::IsSet, St::Comment: buzz_state::IsSet, - St::CreatedAt: buzz_state::IsSet, St::Parent: buzz_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/buzz_bookhive/hive_book.rs b/crates/jacquard-api/src/buzz_bookhive/hive_book.rs index 6baf782b7..ec7fcf865 100644 --- a/crates/jacquard-api/src/buzz_bookhive/hive_book.rs +++ b/crates/jacquard-api/src/buzz_bookhive/hive_book.rs @@ -217,105 +217,105 @@ pub mod hive_book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Thumbnail; type Id; - type Title; type CreatedAt; - type UpdatedAt; - type Thumbnail; type Authors; + type UpdatedAt; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Thumbnail = Unset; type Id = Unset; - type Title = Unset; type CreatedAt = Unset; - type UpdatedAt = Unset; - type Thumbnail = Unset; type Authors = Unset; + type UpdatedAt = Unset; + type Title = Unset; + } + ///State transition - sets the `thumbnail` field to Set + pub struct SetThumbnail(PhantomData St>); + impl sealed::Sealed for SetThumbnail {} + impl State for SetThumbnail { + type Thumbnail = Set; + type Id = St::Id; + type CreatedAt = St::CreatedAt; + type Authors = St::Authors; + type UpdatedAt = St::UpdatedAt; + type Title = St::Title; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { + type Thumbnail = St::Thumbnail; type Id = Set; - type Title = St::Title; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Thumbnail = St::Thumbnail; type Authors = St::Authors; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Id = St::Id; - type Title = Set; - type CreatedAt = St::CreatedAt; type UpdatedAt = St::UpdatedAt; - type Thumbnail = St::Thumbnail; - type Authors = St::Authors; + type Title = St::Title; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Thumbnail = St::Thumbnail; type Id = St::Id; - type Title = St::Title; type CreatedAt = Set; + type Authors = St::Authors; type UpdatedAt = St::UpdatedAt; + type Title = St::Title; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { type Thumbnail = St::Thumbnail; - type Authors = St::Authors; + type Id = St::Id; + type CreatedAt = St::CreatedAt; + type Authors = Set; + type UpdatedAt = St::UpdatedAt; + type Title = St::Title; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Id = St::Id; - type Title = St::Title; - type CreatedAt = St::CreatedAt; - type UpdatedAt = Set; type Thumbnail = St::Thumbnail; - type Authors = St::Authors; - } - ///State transition - sets the `thumbnail` field to Set - pub struct SetThumbnail(PhantomData St>); - impl sealed::Sealed for SetThumbnail {} - impl State for SetThumbnail { type Id = St::Id; - type Title = St::Title; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Thumbnail = Set; type Authors = St::Authors; + type UpdatedAt = Set; + type Title = St::Title; } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Thumbnail = St::Thumbnail; type Id = St::Id; - type Title = St::Title; type CreatedAt = St::CreatedAt; + type Authors = St::Authors; type UpdatedAt = St::UpdatedAt; - type Thumbnail = St::Thumbnail; - type Authors = Set; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `thumbnail` field + pub struct thumbnail(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `title` field - pub struct title(()); ///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 `thumbnail` field - pub struct thumbnail(()); ///Marker type for the `authors` field pub struct authors(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -595,12 +595,12 @@ where impl HiveBookBuilder where St: hive_book_state::State, + St::Thumbnail: hive_book_state::IsSet, St::Id: hive_book_state::IsSet, - St::Title: hive_book_state::IsSet, St::CreatedAt: hive_book_state::IsSet, - St::UpdatedAt: hive_book_state::IsSet, - St::Thumbnail: hive_book_state::IsSet, St::Authors: hive_book_state::IsSet, + St::UpdatedAt: hive_book_state::IsSet, + St::Title: hive_book_state::IsSet, { /// Build the final struct. pub fn build(self) -> HiveBook { diff --git a/crates/jacquard-api/src/buzz_bookhive/list_genres.rs b/crates/jacquard-api/src/buzz_bookhive/list_genres.rs index 7043a4291..feef4f3f9 100644 --- a/crates/jacquard-api/src/buzz_bookhive/list_genres.rs +++ b/crates/jacquard-api/src/buzz_bookhive/list_genres.rs @@ -113,37 +113,37 @@ pub mod genre_with_count_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Count; type Genre; + 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 Genre = Unset; - } - ///State transition - sets the `count` field to Set - pub struct SetCount(PhantomData St>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { - type Count = Set; - type Genre = St::Genre; + type Count = Unset; } ///State transition - sets the `genre` field to Set pub struct SetGenre(PhantomData St>); impl sealed::Sealed for SetGenre {} impl State for SetGenre { - type Count = St::Count; type Genre = Set; + type Count = St::Count; + } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData St>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { + type Genre = St::Genre; + 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 `genre` field pub struct genre(()); + ///Marker type for the `count` field + pub struct count(()); } } @@ -213,8 +213,8 @@ where impl GenreWithCountBuilder where St: genre_with_count_state::State, - St::Count: genre_with_count_state::IsSet, St::Genre: genre_with_count_state::IsSet, + St::Count: genre_with_count_state::IsSet, { /// Build the final struct. pub fn build(self) -> GenreWithCount { diff --git a/crates/jacquard-api/src/ca_jmaingot/board_game_play.rs b/crates/jacquard-api/src/ca_jmaingot/board_game_play.rs index 02374d5a6..f5f904553 100644 --- a/crates/jacquard-api/src/ca_jmaingot/board_game_play.rs +++ b/crates/jacquard-api/src/ca_jmaingot/board_game_play.rs @@ -115,51 +115,51 @@ pub mod board_game_play_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type PlayedAt; type Name; type BggId; - type PlayedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type PlayedAt = Unset; type Name = Unset; type BggId = Unset; - type PlayedAt = Unset; + } + ///State transition - sets the `played_at` field to Set + pub struct SetPlayedAt(PhantomData St>); + impl sealed::Sealed for SetPlayedAt {} + impl State for SetPlayedAt { + type PlayedAt = Set; + type Name = St::Name; + type BggId = St::BggId; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type PlayedAt = St::PlayedAt; type Name = Set; type BggId = St::BggId; - type PlayedAt = St::PlayedAt; } ///State transition - sets the `bgg_id` field to Set pub struct SetBggId(PhantomData St>); impl sealed::Sealed for SetBggId {} impl State for SetBggId { - type Name = St::Name; - type BggId = Set; type PlayedAt = St::PlayedAt; - } - ///State transition - sets the `played_at` field to Set - pub struct SetPlayedAt(PhantomData St>); - impl sealed::Sealed for SetPlayedAt {} - impl State for SetPlayedAt { type Name = St::Name; - type BggId = St::BggId; - type PlayedAt = Set; + type BggId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `played_at` field + pub struct played_at(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `bgg_id` field pub struct bgg_id(()); - ///Marker type for the `played_at` field - pub struct played_at(()); } } @@ -248,9 +248,9 @@ where impl BoardGamePlayBuilder where St: board_game_play_state::State, + St::PlayedAt: board_game_play_state::IsSet, St::Name: board_game_play_state::IsSet, St::BggId: board_game_play_state::IsSet, - St::PlayedAt: board_game_play_state::IsSet, { /// Build the final struct. pub fn build(self) -> BoardGamePlay { diff --git a/crates/jacquard-api/src/cat_vt3e/gallery/group_item.rs b/crates/jacquard-api/src/cat_vt3e/gallery/group_item.rs index d147bfdcb..83a18b279 100644 --- a/crates/jacquard-api/src/cat_vt3e/gallery/group_item.rs +++ b/crates/jacquard-api/src/cat_vt3e/gallery/group_item.rs @@ -117,49 +117,49 @@ pub mod group_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Image; type Group; + type Image; type AddedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Image = Unset; type Group = Unset; + type Image = Unset; type AddedAt = Unset; } - ///State transition - sets the `image` field to Set - pub struct SetImage(PhantomData St>); - impl sealed::Sealed for SetImage {} - impl State for SetImage { - type Image = Set; - type Group = St::Group; - type AddedAt = St::AddedAt; - } ///State transition - sets the `group` field to Set pub struct SetGroup(PhantomData St>); impl sealed::Sealed for SetGroup {} impl State for SetGroup { - type Image = St::Image; type Group = Set; + type Image = St::Image; + type AddedAt = St::AddedAt; + } + ///State transition - sets the `image` field to Set + pub struct SetImage(PhantomData St>); + impl sealed::Sealed for SetImage {} + impl State for SetImage { + type Group = St::Group; + type Image = Set; type AddedAt = St::AddedAt; } ///State transition - sets the `added_at` field to Set pub struct SetAddedAt(PhantomData St>); impl sealed::Sealed for SetAddedAt {} impl State for SetAddedAt { - type Image = St::Image; type Group = St::Group; + type Image = St::Image; type AddedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `image` field - pub struct image(()); ///Marker type for the `group` field pub struct group(()); + ///Marker type for the `image` field + pub struct image(()); ///Marker type for the `added_at` field pub struct added_at(()); } @@ -263,8 +263,8 @@ impl GroupItemBuilder { impl GroupItemBuilder where St: group_item_state::State, - St::Image: group_item_state::IsSet, St::Group: group_item_state::IsSet, + St::Image: group_item_state::IsSet, St::AddedAt: group_item_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/cat_vt3e/gallery/image.rs b/crates/jacquard-api/src/cat_vt3e/gallery/image.rs index 859c5cbbd..4d14ac774 100644 --- a/crates/jacquard-api/src/cat_vt3e/gallery/image.rs +++ b/crates/jacquard-api/src/cat_vt3e/gallery/image.rs @@ -204,37 +204,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Image; type CreatedAt; + type Image; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Image = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `image` field to Set - pub struct SetImage(PhantomData St>); - impl sealed::Sealed for SetImage {} - impl State for SetImage { - type Image = Set; - type CreatedAt = St::CreatedAt; + type Image = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Image = St::Image; type CreatedAt = Set; + type Image = St::Image; + } + ///State transition - sets the `image` field to Set + pub struct SetImage(PhantomData St>); + impl sealed::Sealed for SetImage {} + impl State for SetImage { + type CreatedAt = St::CreatedAt; + type Image = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `image` field - pub struct image(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `image` field + pub struct image(()); } } @@ -460,8 +460,8 @@ impl ImageBuilder { impl ImageBuilder where St: image_state::State, - St::Image: image_state::IsSet, St::CreatedAt: image_state::IsSet, + St::Image: image_state::IsSet, { /// Build the final struct. pub fn build(self) -> Image { diff --git a/crates/jacquard-api/src/ch_indiemusi/alpha/grant.rs b/crates/jacquard-api/src/ch_indiemusi/alpha/grant.rs index 67ab192b1..11b4e8ac6 100644 --- a/crates/jacquard-api/src/ch_indiemusi/alpha/grant.rs +++ b/crates/jacquard-api/src/ch_indiemusi/alpha/grant.rs @@ -173,50 +173,50 @@ pub mod grant_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type WrappedMasterKey; - type ServiceDid; type CreatedAt; + type ServiceDid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type WrappedMasterKey = Unset; - type ServiceDid = Unset; type CreatedAt = Unset; + type ServiceDid = Unset; } ///State transition - sets the `wrapped_master_key` field to Set pub struct SetWrappedMasterKey(PhantomData St>); impl sealed::Sealed for SetWrappedMasterKey {} impl State for SetWrappedMasterKey { type WrappedMasterKey = Set; - type ServiceDid = St::ServiceDid; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `service_did` field to Set - pub struct SetServiceDid(PhantomData St>); - impl sealed::Sealed for SetServiceDid {} - impl State for SetServiceDid { - type WrappedMasterKey = St::WrappedMasterKey; - type ServiceDid = Set; type CreatedAt = St::CreatedAt; + type ServiceDid = St::ServiceDid; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type WrappedMasterKey = St::WrappedMasterKey; - type ServiceDid = St::ServiceDid; type CreatedAt = Set; + type ServiceDid = St::ServiceDid; + } + ///State transition - sets the `service_did` field to Set + pub struct SetServiceDid(PhantomData St>); + impl sealed::Sealed for SetServiceDid {} + impl State for SetServiceDid { + type WrappedMasterKey = St::WrappedMasterKey; + type CreatedAt = St::CreatedAt; + type ServiceDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `wrapped_master_key` field pub struct wrapped_master_key(()); - ///Marker type for the `service_did` field - pub struct service_did(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `service_did` field + pub struct service_did(()); } } @@ -352,8 +352,8 @@ impl GrantBuilder where St: grant_state::State, St::WrappedMasterKey: grant_state::IsSet, - St::ServiceDid: grant_state::IsSet, St::CreatedAt: grant_state::IsSet, + St::ServiceDid: grant_state::IsSet, { /// Build the final struct. pub fn build(self) -> Grant { diff --git a/crates/jacquard-api/src/ch_indiemusi/alpha/recording.rs b/crates/jacquard-api/src/ch_indiemusi/alpha/recording.rs index 6b5972a68..ea1825769 100644 --- a/crates/jacquard-api/src/ch_indiemusi/alpha/recording.rs +++ b/crates/jacquard-api/src/ch_indiemusi/alpha/recording.rs @@ -413,37 +413,37 @@ pub mod recording_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Artists; + 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 Artists = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Artists = St::Artists; + type Title = Unset; } ///State transition - sets the `artists` field to Set pub struct SetArtists(PhantomData St>); impl sealed::Sealed for SetArtists {} impl State for SetArtists { - type Title = St::Title; type Artists = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Artists = St::Artists; + 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 `artists` field pub struct artists(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -592,8 +592,8 @@ where impl RecordingBuilder where St: recording_state::State, - St::Title: recording_state::IsSet, St::Artists: recording_state::IsSet, + St::Title: recording_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recording { diff --git a/crates/jacquard-api/src/ch_indiemusi/alpha/release.rs b/crates/jacquard-api/src/ch_indiemusi/alpha/release.rs index 2791e7517..1aea7607d 100644 --- a/crates/jacquard-api/src/ch_indiemusi/alpha/release.rs +++ b/crates/jacquard-api/src/ch_indiemusi/alpha/release.rs @@ -348,51 +348,51 @@ pub mod release_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Artists; type Recordings; type Title; + type Artists; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Artists = Unset; type Recordings = Unset; type Title = Unset; - } - ///State transition - sets the `artists` field to Set - pub struct SetArtists(PhantomData St>); - impl sealed::Sealed for SetArtists {} - impl State for SetArtists { - type Artists = Set; - type Recordings = St::Recordings; - type Title = St::Title; + type Artists = Unset; } ///State transition - sets the `recordings` field to Set pub struct SetRecordings(PhantomData St>); impl sealed::Sealed for SetRecordings {} impl State for SetRecordings { - type Artists = St::Artists; type Recordings = Set; type Title = St::Title; + type Artists = St::Artists; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Artists = St::Artists; type Recordings = St::Recordings; type Title = Set; + type Artists = St::Artists; + } + ///State transition - sets the `artists` field to Set + pub struct SetArtists(PhantomData St>); + impl sealed::Sealed for SetArtists {} + impl State for SetArtists { + type Recordings = St::Recordings; + type Title = St::Title; + type Artists = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `artists` field - pub struct artists(()); ///Marker type for the `recordings` field pub struct recordings(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `artists` field + pub struct artists(()); } } @@ -527,9 +527,9 @@ where impl ReleaseBuilder where St: release_state::State, - St::Artists: release_state::IsSet, St::Recordings: release_state::IsSet, St::Title: release_state::IsSet, + St::Artists: release_state::IsSet, { /// Build the final struct. pub fn build(self) -> Release { diff --git a/crates/jacquard-api/src/ch_indiemusi/alpha/song.rs b/crates/jacquard-api/src/ch_indiemusi/alpha/song.rs index 8841298db..b71fa3316 100644 --- a/crates/jacquard-api/src/ch_indiemusi/alpha/song.rs +++ b/crates/jacquard-api/src/ch_indiemusi/alpha/song.rs @@ -387,37 +387,37 @@ pub mod song_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type InterestedParties; type Title; + type InterestedParties; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type InterestedParties = Unset; type Title = Unset; - } - ///State transition - sets the `interested_parties` field to Set - pub struct SetInterestedParties(PhantomData St>); - impl sealed::Sealed for SetInterestedParties {} - impl State for SetInterestedParties { - type InterestedParties = Set; - type Title = St::Title; + type InterestedParties = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type InterestedParties = St::InterestedParties; type Title = Set; + type InterestedParties = St::InterestedParties; + } + ///State transition - sets the `interested_parties` field to Set + pub struct SetInterestedParties(PhantomData St>); + impl sealed::Sealed for SetInterestedParties {} + impl State for SetInterestedParties { + type Title = St::Title; + type InterestedParties = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `interested_parties` field - pub struct interested_parties(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `interested_parties` field + pub struct interested_parties(()); } } @@ -500,8 +500,8 @@ where impl SongBuilder where St: song_state::State, - St::InterestedParties: song_state::IsSet, St::Title: song_state::IsSet, + St::InterestedParties: song_state::IsSet, { /// Build the final struct. pub fn build(self) -> Song { diff --git a/crates/jacquard-api/src/ch_indiemusi/alpha/track.rs b/crates/jacquard-api/src/ch_indiemusi/alpha/track.rs index 31c5c1fcf..b6e3eb9d5 100644 --- a/crates/jacquard-api/src/ch_indiemusi/alpha/track.rs +++ b/crates/jacquard-api/src/ch_indiemusi/alpha/track.rs @@ -190,66 +190,66 @@ pub mod track_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type EncryptedContentIv; - type AudioBlob; type CreatedAt; + type AudioBlob; + type EncryptedContentIv; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type EncryptedContentIv = Unset; - type AudioBlob = Unset; type CreatedAt = Unset; + type AudioBlob = Unset; + type EncryptedContentIv = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type EncryptedContentIv = St::EncryptedContentIv; - type AudioBlob = St::AudioBlob; type CreatedAt = St::CreatedAt; + type AudioBlob = St::AudioBlob; + type EncryptedContentIv = St::EncryptedContentIv; } - ///State transition - sets the `encrypted_content_iv` field to Set - pub struct SetEncryptedContentIv(PhantomData St>); - impl sealed::Sealed for SetEncryptedContentIv {} - impl State for SetEncryptedContentIv { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Title = St::Title; - type EncryptedContentIv = Set; + type CreatedAt = Set; type AudioBlob = St::AudioBlob; - type CreatedAt = St::CreatedAt; + type EncryptedContentIv = St::EncryptedContentIv; } ///State transition - sets the `audio_blob` field to Set pub struct SetAudioBlob(PhantomData St>); impl sealed::Sealed for SetAudioBlob {} impl State for SetAudioBlob { type Title = St::Title; - type EncryptedContentIv = St::EncryptedContentIv; - type AudioBlob = Set; type CreatedAt = St::CreatedAt; + type AudioBlob = Set; + type EncryptedContentIv = St::EncryptedContentIv; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `encrypted_content_iv` field to Set + pub struct SetEncryptedContentIv(PhantomData St>); + impl sealed::Sealed for SetEncryptedContentIv {} + impl State for SetEncryptedContentIv { type Title = St::Title; - type EncryptedContentIv = St::EncryptedContentIv; + type CreatedAt = St::CreatedAt; type AudioBlob = St::AudioBlob; - type CreatedAt = Set; + type EncryptedContentIv = 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 `encrypted_content_iv` field - pub struct encrypted_content_iv(()); - ///Marker type for the `audio_blob` field - pub struct audio_blob(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `audio_blob` field + pub struct audio_blob(()); + ///Marker type for the `encrypted_content_iv` field + pub struct encrypted_content_iv(()); } } @@ -371,9 +371,9 @@ impl TrackBuilder where St: track_state::State, St::Title: track_state::IsSet, - St::EncryptedContentIv: track_state::IsSet, - St::AudioBlob: track_state::IsSet, St::CreatedAt: track_state::IsSet, + St::AudioBlob: track_state::IsSet, + St::EncryptedContentIv: track_state::IsSet, { /// Build the final struct. pub fn build(self) -> Track { diff --git a/crates/jacquard-api/src/chat_bsky/convo.rs b/crates/jacquard-api/src/chat_bsky/convo.rs index 4e601c708..af4f493c4 100644 --- a/crates/jacquard-api/src/chat_bsky/convo.rs +++ b/crates/jacquard-api/src/chat_bsky/convo.rs @@ -758,85 +758,85 @@ pub mod convo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UnreadCount; type Members; - type Rev; - type Id; type Muted; + type Id; + type UnreadCount; + type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UnreadCount = Unset; type Members = Unset; - type Rev = Unset; - type Id = Unset; type Muted = Unset; - } - ///State transition - sets the `unread_count` field to Set - pub struct SetUnreadCount(PhantomData St>); - impl sealed::Sealed for SetUnreadCount {} - impl State for SetUnreadCount { - type UnreadCount = Set; - type Members = St::Members; - type Rev = St::Rev; - type Id = St::Id; - type Muted = St::Muted; + type Id = Unset; + type UnreadCount = Unset; + type Rev = Unset; } ///State transition - sets the `members` field to Set pub struct SetMembers(PhantomData St>); impl sealed::Sealed for SetMembers {} impl State for SetMembers { - type UnreadCount = St::UnreadCount; type Members = Set; - type Rev = St::Rev; - type Id = St::Id; type Muted = St::Muted; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData St>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { + type Id = St::Id; type UnreadCount = St::UnreadCount; + type Rev = St::Rev; + } + ///State transition - sets the `muted` field to Set + pub struct SetMuted(PhantomData St>); + impl sealed::Sealed for SetMuted {} + impl State for SetMuted { type Members = St::Members; - type Rev = Set; + type Muted = Set; type Id = St::Id; - type Muted = St::Muted; + type UnreadCount = St::UnreadCount; + type Rev = St::Rev; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type UnreadCount = St::UnreadCount; type Members = St::Members; - type Rev = St::Rev; - type Id = Set; type Muted = St::Muted; - } - ///State transition - sets the `muted` field to Set - pub struct SetMuted(PhantomData St>); - impl sealed::Sealed for SetMuted {} - impl State for SetMuted { + type Id = Set; type UnreadCount = St::UnreadCount; + type Rev = St::Rev; + } + ///State transition - sets the `unread_count` field to Set + pub struct SetUnreadCount(PhantomData St>); + impl sealed::Sealed for SetUnreadCount {} + impl State for SetUnreadCount { type Members = St::Members; + type Muted = St::Muted; + type Id = St::Id; + type UnreadCount = Set; type Rev = St::Rev; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData St>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Members = St::Members; + type Muted = St::Muted; type Id = St::Id; - type Muted = Set; + type UnreadCount = St::UnreadCount; + type Rev = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `unread_count` field - pub struct unread_count(()); ///Marker type for the `members` field pub struct members(()); - ///Marker type for the `rev` field - pub struct rev(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `muted` field pub struct muted(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `unread_count` field + pub struct unread_count(()); + ///Marker type for the `rev` field + pub struct rev(()); } } @@ -1020,11 +1020,11 @@ where impl ConvoViewBuilder where St: convo_view_state::State, - St::UnreadCount: convo_view_state::IsSet, St::Members: convo_view_state::IsSet, - St::Rev: convo_view_state::IsSet, - St::Id: convo_view_state::IsSet, St::Muted: convo_view_state::IsSet, + St::Id: convo_view_state::IsSet, + St::UnreadCount: convo_view_state::IsSet, + St::Rev: convo_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ConvoView { @@ -1762,66 +1762,66 @@ pub mod deleted_message_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rev; - type Id; type SentAt; type Sender; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; - type Id = Unset; type SentAt = Unset; type Sender = Unset; + type Id = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Rev = Set; - type Id = St::Id; - type SentAt = St::SentAt; - type Sender = St::Sender; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Rev = St::Rev; - type Id = Set; type SentAt = St::SentAt; type Sender = St::Sender; + type Id = St::Id; } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData St>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { type Rev = St::Rev; - type Id = St::Id; type SentAt = Set; type Sender = St::Sender; + type Id = St::Id; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData St>); impl sealed::Sealed for SetSender {} impl State for SetSender { type Rev = St::Rev; - type Id = St::Id; type SentAt = St::SentAt; type Sender = Set; + type Id = St::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Rev = St::Rev; + type SentAt = St::SentAt; + type Sender = St::Sender; + type Id = 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 `id` field - pub struct id(()); ///Marker type for the `sent_at` field pub struct sent_at(()); ///Marker type for the `sender` field pub struct sender(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -1935,9 +1935,9 @@ impl DeletedMessageViewBuilder where St: deleted_message_view_state::State, St::Rev: deleted_message_view_state::IsSet, - St::Id: deleted_message_view_state::IsSet, St::SentAt: deleted_message_view_state::IsSet, St::Sender: deleted_message_view_state::IsSet, + St::Id: deleted_message_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeletedMessageView { @@ -1974,8 +1974,8 @@ pub mod log_add_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type Rev; + type Message; type ConvoId; type Reaction; } @@ -1983,26 +1983,26 @@ pub mod log_add_reaction_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type Rev = Unset; + type Message = Unset; type ConvoId = Unset; type Reaction = Unset; } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type Rev = St::Rev; - type ConvoId = St::ConvoId; - type Reaction = St::Reaction; - } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Message = St::Message; type Rev = Set; + type Message = St::Message; + type ConvoId = St::ConvoId; + type Reaction = St::Reaction; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type Rev = St::Rev; + type Message = Set; type ConvoId = St::ConvoId; type Reaction = St::Reaction; } @@ -2010,8 +2010,8 @@ pub mod log_add_reaction_state { pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = St::Message; type Rev = St::Rev; + type Message = St::Message; type ConvoId = Set; type Reaction = St::Reaction; } @@ -2019,18 +2019,18 @@ pub mod log_add_reaction_state { pub struct SetReaction(PhantomData St>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { - type Message = St::Message; type Rev = St::Rev; + type Message = St::Message; type ConvoId = St::ConvoId; type Reaction = 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 `message` field + pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); ///Marker type for the `reaction` field @@ -2147,8 +2147,8 @@ where impl LogAddReactionBuilder where St: log_add_reaction_state::State, - St::Message: log_add_reaction_state::IsSet, St::Rev: log_add_reaction_state::IsSet, + St::Message: log_add_reaction_state::IsSet, St::ConvoId: log_add_reaction_state::IsSet, St::Reaction: log_add_reaction_state::IsSet, { @@ -2187,51 +2187,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 St>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Rev = Set; + type ConvoId = St::ConvoId; + type Message = St::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { + type Rev = St::Rev; type ConvoId = Set; type Message = St::Message; - type Rev = St::Rev; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = St::ConvoId; - type Message = Set; type Rev = St::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData St>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type ConvoId = St::ConvoId; - type Message = St::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(()); } } @@ -2320,9 +2320,9 @@ where impl LogCreateMessageBuilder where St: log_create_message_state::State, + St::Rev: log_create_message_state::IsSet, St::ConvoId: log_create_message_state::IsSet, St::Message: log_create_message_state::IsSet, - St::Rev: log_create_message_state::IsSet, { /// Build the final struct. pub fn build(self) -> LogCreateMessage { @@ -2528,50 +2528,50 @@ 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 Rev; } /// 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 Rev = Unset; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type ConvoId = Set; - type Rev = St::Rev; - type Message = St::Message; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData St>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { - type ConvoId = St::ConvoId; - type Rev = Set; type Message = St::Message; + type Rev = St::Rev; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type ConvoId = St::ConvoId; - type Rev = St::Rev; type Message = Set; + type Rev = St::Rev; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData St>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type ConvoId = St::ConvoId; + type Message = St::Message; + type Rev = 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 `rev` field + pub struct rev(()); } } @@ -2661,8 +2661,8 @@ impl LogReadMessageBuilder where St: log_read_message_state::State, St::ConvoId: log_read_message_state::IsSet, - St::Rev: log_read_message_state::IsSet, St::Message: log_read_message_state::IsSet, + St::Rev: log_read_message_state::IsSet, { /// Build the final struct. pub fn build(self) -> LogReadMessage { @@ -2697,8 +2697,8 @@ pub mod log_remove_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type ConvoId; + type Message; type Rev; type Reaction; } @@ -2706,26 +2706,26 @@ pub mod log_remove_reaction_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type ConvoId = Unset; + type Message = Unset; type Rev = Unset; type Reaction = Unset; } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type ConvoId = St::ConvoId; - type Rev = St::Rev; - type Reaction = St::Reaction; - } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = St::Message; type ConvoId = Set; + type Message = St::Message; + type Rev = St::Rev; + type Reaction = St::Reaction; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type ConvoId = St::ConvoId; + type Message = Set; type Rev = St::Rev; type Reaction = St::Reaction; } @@ -2733,8 +2733,8 @@ pub mod log_remove_reaction_state { pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Message = St::Message; type ConvoId = St::ConvoId; + type Message = St::Message; type Rev = Set; type Reaction = St::Reaction; } @@ -2742,18 +2742,18 @@ pub mod log_remove_reaction_state { pub struct SetReaction(PhantomData St>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { - type Message = St::Message; type ConvoId = St::ConvoId; + type Message = St::Message; type Rev = St::Rev; type Reaction = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `message` field + pub struct message(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `reaction` field @@ -2870,8 +2870,8 @@ where impl LogRemoveReactionBuilder where St: log_remove_reaction_state::State, - St::Message: log_remove_reaction_state::IsSet, St::ConvoId: log_remove_reaction_state::IsSet, + St::Message: log_remove_reaction_state::IsSet, St::Rev: log_remove_reaction_state::IsSet, St::Reaction: log_remove_reaction_state::IsSet, { @@ -2910,37 +2910,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 St>); - impl sealed::Sealed for SetReaction {} - impl State for SetReaction { - type Reaction = Set; - type Message = St::Message; + type Reaction = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Reaction = St::Reaction; type Message = Set; + type Reaction = St::Reaction; + } + ///State transition - sets the `reaction` field to Set + pub struct SetReaction(PhantomData St>); + impl sealed::Sealed for SetReaction {} + impl State for SetReaction { + type Message = St::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(()); } } @@ -3024,8 +3024,8 @@ where impl MessageAndReactionViewBuilder where St: message_and_reaction_view_state::State, - St::Reaction: message_and_reaction_view_state::IsSet, St::Message: message_and_reaction_view_state::IsSet, + St::Reaction: message_and_reaction_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> MessageAndReactionView { @@ -3228,83 +3228,83 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; - type Sender; type SentAt; type Id; + type Text; + type Sender; type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Text = Unset; - type Sender = Unset; type SentAt = Unset; type Id = Unset; + type Text = Unset; + type Sender = Unset; type Rev = Unset; } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type Sender = St::Sender; - type SentAt = St::SentAt; - type Id = St::Id; - type Rev = St::Rev; - } - ///State transition - sets the `sender` field to Set - pub struct SetSender(PhantomData St>); - impl sealed::Sealed for SetSender {} - impl State for SetSender { - type Text = St::Text; - type Sender = Set; - type SentAt = St::SentAt; - type Id = St::Id; - type Rev = St::Rev; - } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData St>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { - type Text = St::Text; - type Sender = St::Sender; type SentAt = Set; type Id = St::Id; + type Text = St::Text; + type Sender = St::Sender; type Rev = St::Rev; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { + type SentAt = St::SentAt; + type Id = Set; type Text = St::Text; type Sender = St::Sender; + type Rev = St::Rev; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { type SentAt = St::SentAt; - type Id = Set; + type Id = St::Id; + type Text = Set; + type Sender = St::Sender; + type Rev = St::Rev; + } + ///State transition - sets the `sender` field to Set + pub struct SetSender(PhantomData St>); + impl sealed::Sealed for SetSender {} + impl State for SetSender { + type SentAt = St::SentAt; + type Id = St::Id; + type Text = St::Text; + type Sender = Set; type Rev = St::Rev; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Text = St::Text; - type Sender = St::Sender; type SentAt = St::SentAt; type Id = St::Id; + type Text = St::Text; + type Sender = St::Sender; type Rev = 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 `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 `text` field + pub struct text(()); + ///Marker type for the `sender` field + pub struct sender(()); ///Marker type for the `rev` field pub struct rev(()); } @@ -3487,10 +3487,10 @@ where impl MessageViewBuilder where St: message_view_state::State, - St::Text: message_view_state::IsSet, - St::Sender: message_view_state::IsSet, St::SentAt: message_view_state::IsSet, St::Id: message_view_state::IsSet, + St::Text: message_view_state::IsSet, + St::Sender: message_view_state::IsSet, St::Rev: message_view_state::IsSet, { /// Build the final struct. @@ -3636,51 +3636,51 @@ pub mod reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Value; type Sender; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Value = Unset; type Sender = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Value = St::Value; + type Sender = St::Sender; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { + type CreatedAt = St::CreatedAt; type Value = Set; type Sender = St::Sender; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData St>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type Value = St::Value; - type Sender = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Value = St::Value; - type Sender = St::Sender; - type CreatedAt = Set; + type Sender = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `sender` field pub struct sender(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -3769,9 +3769,9 @@ where impl ReactionViewBuilder where St: reaction_view_state::State, + St::CreatedAt: reaction_view_state::IsSet, St::Value: reaction_view_state::IsSet, St::Sender: reaction_view_state::IsSet, - St::CreatedAt: reaction_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReactionView { diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs index f809b3440..4ca030304 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message.rs @@ -75,37 +75,37 @@ pub mod send_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type ConvoId; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type ConvoId = Unset; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type ConvoId = St::ConvoId; + type Message = Unset; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = St::Message; type ConvoId = Set; + type Message = St::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type ConvoId = St::ConvoId; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -175,8 +175,8 @@ where impl SendMessageBuilder where St: send_message_state::State, - St::Message: send_message_state::IsSet, St::ConvoId: send_message_state::IsSet, + St::Message: send_message_state::IsSet, { /// Build the final struct. pub fn build(self) -> SendMessage { diff --git a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs index 33d3f7a63..f85ec877e 100644 --- a/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs +++ b/crates/jacquard-api/src/chat_bsky/convo/send_message_batch.rs @@ -107,37 +107,37 @@ pub mod batch_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; type ConvoId; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; type ConvoId = Unset; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; - type ConvoId = St::ConvoId; + type Message = Unset; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData St>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = St::Message; type ConvoId = Set; + type Message = St::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type ConvoId = St::ConvoId; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -207,8 +207,8 @@ where impl BatchItemBuilder where St: batch_item_state::State, - St::Message: batch_item_state::IsSet, St::ConvoId: batch_item_state::IsSet, + St::Message: batch_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> BatchItem { diff --git a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs index 90a5d7df1..6c5d5a4bf 100644 --- a/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs +++ b/crates/jacquard-api/src/chat_bsky/moderation/get_actor_metadata.rs @@ -194,8 +194,8 @@ pub mod metadata_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type MessagesSent; - type MessagesReceived; type Convos; + type MessagesReceived; type ConvosStarted; } /// Empty state - all required fields are unset @@ -203,8 +203,8 @@ pub mod metadata_state { impl sealed::Sealed for Empty {} impl State for Empty { type MessagesSent = Unset; - type MessagesReceived = Unset; type Convos = Unset; + type MessagesReceived = Unset; type ConvosStarted = Unset; } ///State transition - sets the `messages_sent` field to Set @@ -212,17 +212,8 @@ pub mod metadata_state { impl sealed::Sealed for SetMessagesSent {} impl State for SetMessagesSent { type MessagesSent = Set; - type MessagesReceived = St::MessagesReceived; - type Convos = St::Convos; - type ConvosStarted = St::ConvosStarted; - } - ///State transition - sets the `messages_received` field to Set - pub struct SetMessagesReceived(PhantomData St>); - impl sealed::Sealed for SetMessagesReceived {} - impl State for SetMessagesReceived { - type MessagesSent = St::MessagesSent; - type MessagesReceived = Set; type Convos = St::Convos; + type MessagesReceived = St::MessagesReceived; type ConvosStarted = St::ConvosStarted; } ///State transition - sets the `convos` field to Set @@ -230,8 +221,17 @@ pub mod metadata_state { impl sealed::Sealed for SetConvos {} impl State for SetConvos { type MessagesSent = St::MessagesSent; - type MessagesReceived = St::MessagesReceived; type Convos = Set; + type MessagesReceived = St::MessagesReceived; + type ConvosStarted = St::ConvosStarted; + } + ///State transition - sets the `messages_received` field to Set + pub struct SetMessagesReceived(PhantomData St>); + impl sealed::Sealed for SetMessagesReceived {} + impl State for SetMessagesReceived { + type MessagesSent = St::MessagesSent; + type Convos = St::Convos; + type MessagesReceived = Set; type ConvosStarted = St::ConvosStarted; } ///State transition - sets the `convos_started` field to Set @@ -239,8 +239,8 @@ pub mod metadata_state { impl sealed::Sealed for SetConvosStarted {} impl State for SetConvosStarted { type MessagesSent = St::MessagesSent; - type MessagesReceived = St::MessagesReceived; type Convos = St::Convos; + type MessagesReceived = St::MessagesReceived; type ConvosStarted = Set; } /// Marker types for field names @@ -248,10 +248,10 @@ pub mod metadata_state { pub mod members { ///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` field pub struct convos(()); + ///Marker type for the `messages_received` field + pub struct messages_received(()); ///Marker type for the `convos_started` field pub struct convos_started(()); } @@ -362,8 +362,8 @@ impl MetadataBuilder where St: metadata_state::State, St::MessagesSent: metadata_state::IsSet, - St::MessagesReceived: metadata_state::IsSet, St::Convos: metadata_state::IsSet, + St::MessagesReceived: metadata_state::IsSet, St::ConvosStarted: metadata_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/club_stellz/evm/address_control.rs b/crates/jacquard-api/src/club_stellz/evm/address_control.rs index 2373c17ce..9ae2da32e 100644 --- a/crates/jacquard-api/src/club_stellz/evm/address_control.rs +++ b/crates/jacquard-api/src/club_stellz/evm/address_control.rs @@ -163,51 +163,51 @@ pub mod address_control_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Siwe; type Address; type Signature; + type Siwe; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Siwe = Unset; type Address = Unset; type Signature = Unset; - } - ///State transition - sets the `siwe` field to Set - pub struct SetSiwe(PhantomData St>); - impl sealed::Sealed for SetSiwe {} - impl State for SetSiwe { - type Siwe = Set; - type Address = St::Address; - type Signature = St::Signature; + type Siwe = Unset; } ///State transition - sets the `address` field to Set pub struct SetAddress(PhantomData St>); impl sealed::Sealed for SetAddress {} impl State for SetAddress { - type Siwe = St::Siwe; type Address = Set; type Signature = St::Signature; + type Siwe = St::Siwe; } ///State transition - sets the `signature` field to Set pub struct SetSignature(PhantomData St>); impl sealed::Sealed for SetSignature {} impl State for SetSignature { - type Siwe = St::Siwe; type Address = St::Address; type Signature = Set; + type Siwe = St::Siwe; + } + ///State transition - sets the `siwe` field to Set + pub struct SetSiwe(PhantomData St>); + impl sealed::Sealed for SetSiwe {} + impl State for SetSiwe { + type Address = St::Address; + type Signature = St::Signature; + type Siwe = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `siwe` field - pub struct siwe(()); ///Marker type for the `address` field pub struct address(()); ///Marker type for the `signature` field pub struct signature(()); + ///Marker type for the `siwe` field + pub struct siwe(()); } } @@ -314,9 +314,9 @@ where impl AddressControlBuilder where St: address_control_state::State, - St::Siwe: address_control_state::IsSet, St::Address: address_control_state::IsSet, St::Signature: address_control_state::IsSet, + St::Siwe: address_control_state::IsSet, { /// Build the final struct. pub fn build(self) -> AddressControl { @@ -522,151 +522,151 @@ pub mod siwe_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Address; - type ChainId; - type Statement; + type Uri; type Version; + type ChainId; type Nonce; type IssuedAt; type Domain; + type Statement; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Address = Unset; - type ChainId = Unset; - type Statement = Unset; + type Uri = Unset; type Version = Unset; + type ChainId = Unset; type Nonce = Unset; type IssuedAt = Unset; type Domain = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Address = St::Address; - type ChainId = St::ChainId; - type Statement = St::Statement; - type Version = St::Version; - type Nonce = St::Nonce; - type IssuedAt = St::IssuedAt; - type Domain = St::Domain; + type Statement = Unset; } ///State transition - sets the `address` field to Set pub struct SetAddress(PhantomData St>); impl sealed::Sealed for SetAddress {} impl State for SetAddress { - type Uri = St::Uri; type Address = Set; - type ChainId = St::ChainId; - type Statement = St::Statement; - type Version = St::Version; - type Nonce = St::Nonce; - type IssuedAt = St::IssuedAt; - type Domain = St::Domain; - } - ///State transition - sets the `chain_id` field to Set - pub struct SetChainId(PhantomData St>); - impl sealed::Sealed for SetChainId {} - impl State for SetChainId { type Uri = St::Uri; - type Address = St::Address; - type ChainId = Set; - type Statement = St::Statement; type Version = St::Version; + type ChainId = St::ChainId; type Nonce = St::Nonce; type IssuedAt = St::IssuedAt; type Domain = St::Domain; + type Statement = St::Statement; } - ///State transition - sets the `statement` field to Set - pub struct SetStatement(PhantomData St>); - impl sealed::Sealed for SetStatement {} - impl State for SetStatement { - type Uri = St::Uri; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Address = St::Address; - type ChainId = St::ChainId; - type Statement = Set; + type Uri = Set; type Version = St::Version; + type ChainId = St::ChainId; type Nonce = St::Nonce; type IssuedAt = St::IssuedAt; type Domain = St::Domain; + type Statement = St::Statement; } ///State transition - sets the `version` field to Set pub struct SetVersion(PhantomData St>); impl sealed::Sealed for SetVersion {} impl State for SetVersion { - type Uri = St::Uri; type Address = St::Address; + type Uri = St::Uri; + type Version = Set; type ChainId = St::ChainId; + type Nonce = St::Nonce; + type IssuedAt = St::IssuedAt; + type Domain = St::Domain; type Statement = St::Statement; - type Version = Set; + } + ///State transition - sets the `chain_id` field to Set + pub struct SetChainId(PhantomData St>); + impl sealed::Sealed for SetChainId {} + impl State for SetChainId { + type Address = St::Address; + type Uri = St::Uri; + type Version = St::Version; + type ChainId = Set; type Nonce = St::Nonce; type IssuedAt = St::IssuedAt; type Domain = St::Domain; + type Statement = St::Statement; } ///State transition - sets the `nonce` field to Set pub struct SetNonce(PhantomData St>); impl sealed::Sealed for SetNonce {} impl State for SetNonce { - type Uri = St::Uri; type Address = St::Address; - type ChainId = St::ChainId; - type Statement = St::Statement; + type Uri = St::Uri; type Version = St::Version; + type ChainId = St::ChainId; type Nonce = Set; type IssuedAt = St::IssuedAt; type Domain = St::Domain; + type Statement = St::Statement; } ///State transition - sets the `issued_at` field to Set pub struct SetIssuedAt(PhantomData St>); impl sealed::Sealed for SetIssuedAt {} impl State for SetIssuedAt { - type Uri = St::Uri; type Address = St::Address; - type ChainId = St::ChainId; - type Statement = St::Statement; + type Uri = St::Uri; type Version = St::Version; + type ChainId = St::ChainId; type Nonce = St::Nonce; type IssuedAt = Set; type Domain = St::Domain; + type Statement = St::Statement; } ///State transition - sets the `domain` field to Set pub struct SetDomain(PhantomData St>); impl sealed::Sealed for SetDomain {} impl State for SetDomain { - type Uri = St::Uri; type Address = St::Address; + type Uri = St::Uri; + type Version = St::Version; type ChainId = St::ChainId; + type Nonce = St::Nonce; + type IssuedAt = St::IssuedAt; + type Domain = Set; type Statement = St::Statement; + } + ///State transition - sets the `statement` field to Set + pub struct SetStatement(PhantomData St>); + impl sealed::Sealed for SetStatement {} + impl State for SetStatement { + type Address = St::Address; + type Uri = St::Uri; type Version = St::Version; + type ChainId = St::ChainId; type Nonce = St::Nonce; type IssuedAt = St::IssuedAt; - type Domain = Set; + type Domain = St::Domain; + type Statement = 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 `address` field pub struct address(()); - ///Marker type for the `chain_id` field - pub struct chain_id(()); - ///Marker type for the `statement` field - pub struct statement(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `version` field pub struct version(()); + ///Marker type for the `chain_id` field + pub struct chain_id(()); ///Marker type for the `nonce` field pub struct nonce(()); ///Marker type for the `issued_at` field pub struct issued_at(()); ///Marker type for the `domain` field pub struct domain(()); + ///Marker type for the `statement` field + pub struct statement(()); } } @@ -859,14 +859,14 @@ where impl SiweMessageBuilder where St: siwe_message_state::State, - St::Uri: siwe_message_state::IsSet, St::Address: siwe_message_state::IsSet, - St::ChainId: siwe_message_state::IsSet, - St::Statement: siwe_message_state::IsSet, + St::Uri: siwe_message_state::IsSet, St::Version: siwe_message_state::IsSet, + St::ChainId: siwe_message_state::IsSet, St::Nonce: siwe_message_state::IsSet, St::IssuedAt: siwe_message_state::IsSet, St::Domain: siwe_message_state::IsSet, + St::Statement: siwe_message_state::IsSet, { /// Build the final struct. pub fn build(self) -> SiweMessage { diff --git a/crates/jacquard-api/src/com__5jiji/test/videos.rs b/crates/jacquard-api/src/com__5jiji/test/videos.rs index 0dadb724e..b65d94209 100644 --- a/crates/jacquard-api/src/com__5jiji/test/videos.rs +++ b/crates/jacquard-api/src/com__5jiji/test/videos.rs @@ -126,49 +126,49 @@ pub mod videos_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Title; + type Id; type Creator; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type Title = Unset; + type Id = Unset; type Creator = Unset; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type Title = St::Title; - type Creator = St::Creator; - } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Id = St::Id; type Title = Set; + type Id = St::Id; + type Creator = St::Creator; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Title = St::Title; + type Id = Set; type Creator = St::Creator; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Id = St::Id; type Title = St::Title; + type Id = St::Id; type Creator = 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 `title` field pub struct title(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `creator` field pub struct creator(()); } @@ -259,8 +259,8 @@ where impl VideosBuilder where St: videos_state::State, - St::Id: videos_state::IsSet, St::Title: videos_state::IsSet, + St::Id: videos_state::IsSet, St::Creator: videos_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_atproto/admin.rs b/crates/jacquard-api/src/com_atproto/admin.rs index 52f87b490..a801b50ec 100644 --- a/crates/jacquard-api/src/com_atproto/admin.rs +++ b/crates/jacquard-api/src/com_atproto/admin.rs @@ -200,50 +200,50 @@ 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; } /// 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; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Handle = Set; - type Did = St::Did; - type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Handle = St::Handle; - type Did = Set; type IndexedAt = St::IndexedAt; + type Did = St::Did; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Handle = St::Handle; - type Did = St::Did; type IndexedAt = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = St::Handle; + type IndexedAt = St::IndexedAt; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `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(()); } } @@ -482,8 +482,8 @@ impl AccountViewBuilder where St: account_view_state::State, St::Handle: account_view_state::IsSet, - St::Did: account_view_state::IsSet, St::IndexedAt: account_view_state::IsSet, + St::Did: account_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> AccountView { diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs index f7e86644a..5b519d4c4 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_email.rs @@ -65,37 +65,37 @@ pub mod update_account_email_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Email; type Account; + type Email; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Email = Unset; type Account = Unset; - } - ///State transition - sets the `email` field to Set - pub struct SetEmail(PhantomData St>); - impl sealed::Sealed for SetEmail {} - impl State for SetEmail { - type Email = Set; - type Account = St::Account; + type Email = Unset; } ///State transition - sets the `account` field to Set pub struct SetAccount(PhantomData St>); impl sealed::Sealed for SetAccount {} impl State for SetAccount { - type Email = St::Email; type Account = Set; + type Email = St::Email; + } + ///State transition - sets the `email` field to Set + pub struct SetEmail(PhantomData St>); + impl sealed::Sealed for SetEmail {} + impl State for SetEmail { + type Account = St::Account; + type Email = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `email` field - pub struct email(()); ///Marker type for the `account` field pub struct account(()); + ///Marker type for the `email` field + pub struct email(()); } } @@ -165,8 +165,8 @@ where impl UpdateAccountEmailBuilder where St: update_account_email_state::State, - St::Email: update_account_email_state::IsSet, St::Account: update_account_email_state::IsSet, + St::Email: update_account_email_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpdateAccountEmail { diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs index 383d9c01d..6027cdb2c 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_handle.rs @@ -64,37 +64,37 @@ pub mod update_account_handle_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 St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = St::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = St::Handle; type Did = Set; + type Handle = St::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = St::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(()); } } @@ -167,8 +167,8 @@ where impl UpdateAccountHandleBuilder where St: update_account_handle_state::State, - St::Handle: update_account_handle_state::IsSet, St::Did: update_account_handle_state::IsSet, + St::Handle: update_account_handle_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpdateAccountHandle { diff --git a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs index 918f6645c..3c1cead3b 100644 --- a/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs +++ b/crates/jacquard-api/src/com_atproto/admin/update_account_signing_key.rs @@ -65,37 +65,37 @@ pub mod update_account_signing_key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SigningKey; type Did; + type SigningKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SigningKey = Unset; type Did = Unset; - } - ///State transition - sets the `signing_key` field to Set - pub struct SetSigningKey(PhantomData St>); - impl sealed::Sealed for SetSigningKey {} - impl State for SetSigningKey { - type SigningKey = Set; - type Did = St::Did; + type SigningKey = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type SigningKey = St::SigningKey; type Did = Set; + type SigningKey = St::SigningKey; + } + ///State transition - sets the `signing_key` field to Set + pub struct SetSigningKey(PhantomData St>); + impl sealed::Sealed for SetSigningKey {} + impl State for SetSigningKey { + type Did = St::Did; + type SigningKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signing_key` field - pub struct signing_key(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `signing_key` field + pub struct signing_key(()); } } @@ -179,8 +179,8 @@ where impl UpdateAccountSigningKeyBuilder where St: update_account_signing_key_state::State, - St::SigningKey: update_account_signing_key_state::IsSet, St::Did: update_account_signing_key_state::IsSet, + St::SigningKey: update_account_signing_key_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpdateAccountSigningKey { diff --git a/crates/jacquard-api/src/com_atproto/identity.rs b/crates/jacquard-api/src/com_atproto/identity.rs index 691468eb4..25fc8bb7e 100644 --- a/crates/jacquard-api/src/com_atproto/identity.rs +++ b/crates/jacquard-api/src/com_atproto/identity.rs @@ -73,51 +73,51 @@ pub mod identity_info_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DidDoc; type Did; type Handle; + type DidDoc; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DidDoc = Unset; type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did_doc` field to Set - pub struct SetDidDoc(PhantomData St>); - impl sealed::Sealed for SetDidDoc {} - impl State for SetDidDoc { - type DidDoc = Set; - type Did = St::Did; - type Handle = St::Handle; + type DidDoc = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type DidDoc = St::DidDoc; type Did = Set; type Handle = St::Handle; + type DidDoc = St::DidDoc; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type DidDoc = St::DidDoc; type Did = St::Did; type Handle = Set; + type DidDoc = St::DidDoc; + } + ///State transition - sets the `did_doc` field to Set + pub struct SetDidDoc(PhantomData St>); + impl sealed::Sealed for SetDidDoc {} + impl State for SetDidDoc { + type Did = St::Did; + type Handle = St::Handle; + type DidDoc = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did_doc` field - pub struct did_doc(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did_doc` field + pub struct did_doc(()); } } @@ -206,9 +206,9 @@ where impl IdentityInfoBuilder where St: identity_info_state::State, - St::DidDoc: identity_info_state::IsSet, St::Did: identity_info_state::IsSet, St::Handle: identity_info_state::IsSet, + St::DidDoc: identity_info_state::IsSet, { /// Build the final struct. pub fn build(self) -> IdentityInfo { diff --git a/crates/jacquard-api/src/com_atproto/label.rs b/crates/jacquard-api/src/com_atproto/label.rs index 4b5caeb27..6b894d922 100644 --- a/crates/jacquard-api/src/com_atproto/label.rs +++ b/crates/jacquard-api/src/com_atproto/label.rs @@ -675,66 +675,66 @@ pub mod label_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Val; - type Src; type Uri; type Cts; + type Src; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Val = Unset; - type Src = Unset; type Uri = Unset; type Cts = Unset; + type Src = Unset; } ///State transition - sets the `val` field to Set pub struct SetVal(PhantomData St>); impl sealed::Sealed for SetVal {} impl State for SetVal { type Val = Set; - type Src = St::Src; - type Uri = St::Uri; - type Cts = St::Cts; - } - ///State transition - sets the `src` field to Set - pub struct SetSrc(PhantomData St>); - impl sealed::Sealed for SetSrc {} - impl State for SetSrc { - type Val = St::Val; - type Src = Set; type Uri = St::Uri; type Cts = St::Cts; + type Src = St::Src; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Val = St::Val; - type Src = St::Src; type Uri = Set; type Cts = St::Cts; + type Src = St::Src; } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData St>); impl sealed::Sealed for SetCts {} impl State for SetCts { type Val = St::Val; - type Src = St::Src; type Uri = St::Uri; type Cts = Set; + type Src = St::Src; + } + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData St>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { + type Val = St::Val; + type Uri = St::Uri; + type Cts = St::Cts; + type Src = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `val` field pub struct val(()); - ///Marker type for the `src` field - pub struct src(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `cts` field pub struct cts(()); + ///Marker type for the `src` field + pub struct src(()); } } @@ -918,9 +918,9 @@ impl LabelBuilder where St: label_state::State, St::Val: label_state::IsSet, - St::Src: label_state::IsSet, St::Uri: label_state::IsSet, St::Cts: label_state::IsSet, + St::Src: label_state::IsSet, { /// Build the final struct. pub fn build(self) -> Label { @@ -1292,67 +1292,67 @@ pub mod label_value_definition_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Severity; type Locales; - type Blurs; + type Severity; type Identifier; + type Blurs; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Severity = Unset; type Locales = Unset; - type Blurs = Unset; + type Severity = Unset; type Identifier = Unset; - } - ///State transition - sets the `severity` field to Set - pub struct SetSeverity(PhantomData St>); - impl sealed::Sealed for SetSeverity {} - impl State for SetSeverity { - type Severity = Set; - type Locales = St::Locales; - type Blurs = St::Blurs; - type Identifier = St::Identifier; + type Blurs = Unset; } ///State transition - sets the `locales` field to Set pub struct SetLocales(PhantomData St>); impl sealed::Sealed for SetLocales {} impl State for SetLocales { - type Severity = St::Severity; type Locales = Set; - type Blurs = St::Blurs; + type Severity = St::Severity; type Identifier = St::Identifier; + type Blurs = St::Blurs; } - ///State transition - sets the `blurs` field to Set - pub struct SetBlurs(PhantomData St>); - impl sealed::Sealed for SetBlurs {} - impl State for SetBlurs { - type Severity = St::Severity; + ///State transition - sets the `severity` field to Set + pub struct SetSeverity(PhantomData St>); + impl sealed::Sealed for SetSeverity {} + impl State for SetSeverity { type Locales = St::Locales; - type Blurs = Set; + type Severity = Set; type Identifier = St::Identifier; + type Blurs = St::Blurs; } ///State transition - sets the `identifier` field to Set pub struct SetIdentifier(PhantomData St>); impl sealed::Sealed for SetIdentifier {} impl State for SetIdentifier { - type Severity = St::Severity; type Locales = St::Locales; - type Blurs = St::Blurs; + type Severity = St::Severity; type Identifier = Set; + type Blurs = St::Blurs; + } + ///State transition - sets the `blurs` field to Set + pub struct SetBlurs(PhantomData St>); + impl sealed::Sealed for SetBlurs {} + impl State for SetBlurs { + type Locales = St::Locales; + type Severity = St::Severity; + type Identifier = St::Identifier; + type Blurs = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `severity` field - pub struct severity(()); ///Marker type for the `locales` field pub struct locales(()); - ///Marker type for the `blurs` field - pub struct blurs(()); + ///Marker type for the `severity` field + pub struct severity(()); ///Marker type for the `identifier` field pub struct identifier(()); + ///Marker type for the `blurs` field + pub struct blurs(()); } } @@ -1511,10 +1511,10 @@ where impl LabelValueDefinitionBuilder where St: label_value_definition_state::State, - St::Severity: label_value_definition_state::IsSet, St::Locales: label_value_definition_state::IsSet, - St::Blurs: label_value_definition_state::IsSet, + St::Severity: label_value_definition_state::IsSet, St::Identifier: label_value_definition_state::IsSet, + St::Blurs: label_value_definition_state::IsSet, { /// Build the final struct. pub fn build(self) -> LabelValueDefinition { @@ -1555,49 +1555,49 @@ pub mod label_value_definition_strings_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Lang; type Name; + type Lang; type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Lang = Unset; type Name = Unset; + type Lang = Unset; type Description = Unset; } - ///State transition - sets the `lang` field to Set - pub struct SetLang(PhantomData St>); - impl sealed::Sealed for SetLang {} - impl State for SetLang { - type Lang = Set; - type Name = St::Name; - type Description = St::Description; - } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Lang = St::Lang; type Name = Set; + type Lang = St::Lang; + type Description = St::Description; + } + ///State transition - sets the `lang` field to Set + pub struct SetLang(PhantomData St>); + impl sealed::Sealed for SetLang {} + impl State for SetLang { + type Name = St::Name; + type Lang = Set; type Description = St::Description; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Lang = St::Lang; type Name = St::Name; + type Lang = St::Lang; type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `lang` field - pub struct lang(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `lang` field + pub struct lang(()); ///Marker type for the `description` field pub struct description(()); } @@ -1705,8 +1705,8 @@ where impl LabelValueDefinitionStringsBuilder where St: label_value_definition_strings_state::State, - St::Lang: label_value_definition_strings_state::IsSet, St::Name: label_value_definition_strings_state::IsSet, + St::Lang: label_value_definition_strings_state::IsSet, St::Description: label_value_definition_strings_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_atproto/repo.rs b/crates/jacquard-api/src/com_atproto/repo.rs index 0e8884f87..c4063aeed 100644 --- a/crates/jacquard-api/src/com_atproto/repo.rs +++ b/crates/jacquard-api/src/com_atproto/repo.rs @@ -72,37 +72,37 @@ pub mod commit_meta_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Rev; + 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 Rev = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Rev = St::Rev; + type Cid = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Cid = St::Cid; type Rev = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Rev = St::Rev; + 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 `rev` field pub struct rev(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -172,8 +172,8 @@ where impl CommitMetaBuilder where St: commit_meta_state::State, - St::Cid: commit_meta_state::IsSet, St::Rev: commit_meta_state::IsSet, + St::Cid: commit_meta_state::IsSet, { /// Build the final struct. pub fn build(self) -> CommitMeta { diff --git a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs index c1ebf5783..bbfe4560a 100644 --- a/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/jacquard-api/src/com_atproto/repo/apply_writes.rs @@ -1209,37 +1209,37 @@ pub mod apply_writes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Writes; type Repo; + type Writes; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Writes = Unset; type Repo = Unset; - } - ///State transition - sets the `writes` field to Set - pub struct SetWrites(PhantomData St>); - impl sealed::Sealed for SetWrites {} - impl State for SetWrites { - type Writes = Set; - type Repo = St::Repo; + type Writes = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Writes = St::Writes; type Repo = Set; + type Writes = St::Writes; + } + ///State transition - sets the `writes` field to Set + pub struct SetWrites(PhantomData St>); + impl sealed::Sealed for SetWrites {} + impl State for SetWrites { + type Repo = St::Repo; + type Writes = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `writes` field - pub struct writes(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `writes` field + pub struct writes(()); } } @@ -1340,8 +1340,8 @@ where impl ApplyWritesBuilder where St: apply_writes_state::State, - St::Writes: apply_writes_state::IsSet, St::Repo: apply_writes_state::IsSet, + St::Writes: apply_writes_state::IsSet, { /// Build the final struct. pub fn build(self) -> ApplyWrites { @@ -1378,49 +1378,49 @@ pub mod update_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rkey; type Value; + type Rkey; type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rkey = Unset; type Value = Unset; + type Rkey = Unset; type Collection = Unset; } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData St>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Rkey = Set; - type Value = St::Value; - type Collection = St::Collection; - } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Rkey = St::Rkey; type Value = Set; + type Rkey = St::Rkey; + type Collection = St::Collection; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData St>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Value = St::Value; + type Rkey = Set; type Collection = St::Collection; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Rkey = St::Rkey; type Value = St::Value; + type Rkey = St::Rkey; type Collection = 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 `value` field pub struct value(()); + ///Marker type for the `rkey` field + pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); } @@ -1511,8 +1511,8 @@ where impl UpdateBuilder where St: update_state::State, - St::Rkey: update_state::IsSet, St::Value: update_state::IsSet, + St::Rkey: update_state::IsSet, St::Collection: update_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs index 917d06862..219404424 100644 --- a/crates/jacquard-api/src/com_atproto/repo/delete_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/delete_record.rs @@ -128,51 +128,51 @@ pub mod delete_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rkey; type Collection; type Repo; - 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 Repo = Unset; - type Rkey = Unset; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData St>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Rkey = Set; + type Collection = St::Collection; + type Repo = St::Repo; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { + type Rkey = St::Rkey; type Collection = Set; type Repo = St::Repo; - type Rkey = St::Rkey; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Collection = St::Collection; - type Repo = Set; type Rkey = St::Rkey; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData St>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { type Collection = St::Collection; - type Repo = St::Repo; - type Rkey = Set; + 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 `collection` field pub struct collection(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `rkey` field - pub struct rkey(()); } } @@ -293,9 +293,9 @@ impl DeleteRecordBuilder { impl DeleteRecordBuilder where St: delete_record_state::State, + St::Rkey: delete_record_state::IsSet, St::Collection: delete_record_state::IsSet, St::Repo: delete_record_state::IsSet, - St::Rkey: delete_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeleteRecord { diff --git a/crates/jacquard-api/src/com_atproto/repo/get_record.rs b/crates/jacquard-api/src/com_atproto/repo/get_record.rs index ed5c43977..a8a2a835b 100644 --- a/crates/jacquard-api/src/com_atproto/repo/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/get_record.rs @@ -116,51 +116,51 @@ pub mod get_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; - type Rkey; type Collection; + type Rkey; + type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repo = Unset; - type Rkey = Unset; type Collection = Unset; + type Rkey = Unset; + type Repo = Unset; } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData St>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Collection = Set; type Rkey = St::Rkey; - type Collection = St::Collection; + type Repo = St::Repo; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData St>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Repo = St::Repo; - type Rkey = Set; type Collection = St::Collection; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData St>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { + type Rkey = Set; type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Collection = St::Collection; type Rkey = St::Rkey; - type Collection = Set; + 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 `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 `repo` field + pub struct repo(()); } } @@ -267,9 +267,9 @@ where impl GetRecordBuilder where St: get_record_state::State, - St::Repo: get_record_state::IsSet, - St::Rkey: get_record_state::IsSet, St::Collection: get_record_state::IsSet, + St::Rkey: get_record_state::IsSet, + St::Repo: get_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetRecord { diff --git a/crates/jacquard-api/src/com_atproto/repo/list_records.rs b/crates/jacquard-api/src/com_atproto/repo/list_records.rs index 3b5ef065f..d79e0221c 100644 --- a/crates/jacquard-api/src/com_atproto/repo/list_records.rs +++ b/crates/jacquard-api/src/com_atproto/repo/list_records.rs @@ -117,37 +117,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 St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Collection = St::Collection; + type Repo = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Repo = St::Repo; type Collection = Set; + type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Collection = St::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(()); } } @@ -262,8 +262,8 @@ impl ListRecordsBuilder { impl ListRecordsBuilder where St: list_records_state::State, - St::Repo: list_records_state::IsSet, St::Collection: list_records_state::IsSet, + St::Repo: list_records_state::IsSet, { /// Build the final struct. pub fn build(self) -> ListRecords { @@ -287,51 +287,51 @@ pub mod record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Value; type Cid; type Uri; - 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 Cid = Unset; type Uri = Unset; - type Value = Unset; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; + type Cid = St::Cid; + type Uri = St::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Value = St::Value; type Cid = Set; type Uri = St::Uri; - type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; - type Uri = Set; type Value = St::Value; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { type Cid = St::Cid; - type Uri = St::Uri; - type Value = Set; + type Uri = 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 `cid` field pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `value` field - pub struct value(()); } } @@ -420,9 +420,9 @@ where impl RecordBuilder where St: record_state::State, + St::Value: record_state::IsSet, St::Cid: record_state::IsSet, St::Uri: record_state::IsSet, - St::Value: record_state::IsSet, { /// Build the final struct. pub fn build(self) -> Record { diff --git a/crates/jacquard-api/src/com_atproto/repo/put_record.rs b/crates/jacquard-api/src/com_atproto/repo/put_record.rs index 8e7cff8bf..4a1ebe1f3 100644 --- a/crates/jacquard-api/src/com_atproto/repo/put_record.rs +++ b/crates/jacquard-api/src/com_atproto/repo/put_record.rs @@ -222,65 +222,65 @@ pub mod put_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Collection; type Repo; + type Collection; + type Record; type Rkey; } /// 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; + type Record = Unset; type Rkey = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; type Collection = St::Collection; - type Repo = St::Repo; + type Record = St::Record; type Rkey = St::Rkey; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Record = St::Record; - type Collection = Set; type Repo = St::Repo; + type Collection = Set; + type Record = St::Record; type Rkey = St::Rkey; } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Record = St::Record; + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Repo = St::Repo; type Collection = St::Collection; - type Repo = Set; + type Record = Set; type Rkey = St::Rkey; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData St>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Record = St::Record; - type Collection = St::Collection; type Repo = St::Repo; + type Collection = St::Collection; + type Record = St::Record; type Rkey = 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(()); + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `rkey` field pub struct rkey(()); } @@ -437,9 +437,9 @@ impl PutRecordBuilder { impl PutRecordBuilder where St: put_record_state::State, - St::Record: put_record_state::IsSet, - St::Collection: put_record_state::IsSet, St::Repo: put_record_state::IsSet, + St::Collection: put_record_state::IsSet, + St::Record: put_record_state::IsSet, St::Rkey: put_record_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_atproto/server.rs b/crates/jacquard-api/src/com_atproto/server.rs index 6ca74aab0..b810dc69a 100644 --- a/crates/jacquard-api/src/com_atproto/server.rs +++ b/crates/jacquard-api/src/com_atproto/server.rs @@ -117,119 +117,113 @@ pub mod invite_code_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Available; - type Code; - type ForAccount; type CreatedAt; type CreatedBy; type Uses; type Disabled; + type Available; + type Code; + 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 Code = Unset; - type ForAccount = Unset; type CreatedAt = Unset; type CreatedBy = Unset; type Uses = Unset; type Disabled = Unset; - } - ///State transition - sets the `available` field to Set - pub struct SetAvailable(PhantomData St>); - impl sealed::Sealed for SetAvailable {} - impl State for SetAvailable { - type Available = Set; - type Code = St::Code; - type ForAccount = St::ForAccount; - type CreatedAt = St::CreatedAt; - type CreatedBy = St::CreatedBy; - type Uses = St::Uses; - type Disabled = St::Disabled; - } - ///State transition - sets the `code` field to Set - pub struct SetCode(PhantomData St>); - impl sealed::Sealed for SetCode {} - impl State for SetCode { - type Available = St::Available; - type Code = Set; - type ForAccount = St::ForAccount; - type CreatedAt = St::CreatedAt; - type CreatedBy = St::CreatedBy; - type Uses = St::Uses; - type Disabled = St::Disabled; - } - ///State transition - sets the `for_account` field to Set - pub struct SetForAccount(PhantomData St>); - impl sealed::Sealed for SetForAccount {} - impl State for SetForAccount { - type Available = St::Available; - type Code = St::Code; - type ForAccount = Set; - type CreatedAt = St::CreatedAt; - type CreatedBy = St::CreatedBy; - type Uses = St::Uses; - type Disabled = St::Disabled; + type Available = Unset; + type Code = Unset; + type ForAccount = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Available = St::Available; - type Code = St::Code; - type ForAccount = St::ForAccount; type CreatedAt = Set; type CreatedBy = St::CreatedBy; type Uses = St::Uses; type Disabled = St::Disabled; + type Available = St::Available; + type Code = St::Code; + type ForAccount = St::ForAccount; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData St>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Available = St::Available; - type Code = St::Code; - type ForAccount = St::ForAccount; type CreatedAt = St::CreatedAt; type CreatedBy = Set; type Uses = St::Uses; type Disabled = St::Disabled; + type Available = St::Available; + type Code = St::Code; + type ForAccount = St::ForAccount; } ///State transition - sets the `uses` field to Set pub struct SetUses(PhantomData St>); impl sealed::Sealed for SetUses {} impl State for SetUses { - type Available = St::Available; - type Code = St::Code; - type ForAccount = St::ForAccount; type CreatedAt = St::CreatedAt; type CreatedBy = St::CreatedBy; type Uses = Set; type Disabled = St::Disabled; + type Available = St::Available; + type Code = St::Code; + type ForAccount = St::ForAccount; } ///State transition - sets the `disabled` field to Set pub struct SetDisabled(PhantomData St>); impl sealed::Sealed for SetDisabled {} impl State for SetDisabled { + type CreatedAt = St::CreatedAt; + type CreatedBy = St::CreatedBy; + type Uses = St::Uses; + type Disabled = Set; type Available = St::Available; type Code = St::Code; type ForAccount = St::ForAccount; + } + ///State transition - sets the `available` field to Set + pub struct SetAvailable(PhantomData St>); + impl sealed::Sealed for SetAvailable {} + impl State for SetAvailable { type CreatedAt = St::CreatedAt; type CreatedBy = St::CreatedBy; type Uses = St::Uses; - type Disabled = Set; + type Disabled = St::Disabled; + type Available = Set; + type Code = St::Code; + type ForAccount = St::ForAccount; + } + ///State transition - sets the `code` field to Set + pub struct SetCode(PhantomData St>); + impl sealed::Sealed for SetCode {} + impl State for SetCode { + type CreatedAt = St::CreatedAt; + type CreatedBy = St::CreatedBy; + type Uses = St::Uses; + type Disabled = St::Disabled; + type Available = St::Available; + type Code = Set; + type ForAccount = St::ForAccount; + } + ///State transition - sets the `for_account` field to Set + pub struct SetForAccount(PhantomData St>); + impl sealed::Sealed for SetForAccount {} + impl State for SetForAccount { + type CreatedAt = St::CreatedAt; + type CreatedBy = St::CreatedBy; + type Uses = St::Uses; + type Disabled = St::Disabled; + type Available = St::Available; + type Code = St::Code; + 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 `code` field - pub struct code(()); - ///Marker type for the `for_account` field - pub struct for_account(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `created_by` field @@ -238,6 +232,12 @@ pub mod invite_code_state { pub struct uses(()); ///Marker type for the `disabled` field pub struct disabled(()); + ///Marker type for the `available` field + pub struct available(()); + ///Marker type for the `code` field + pub struct code(()); + ///Marker type for the `for_account` field + pub struct for_account(()); } } @@ -410,13 +410,13 @@ where impl InviteCodeBuilder where St: invite_code_state::State, - St::Available: invite_code_state::IsSet, - St::Code: invite_code_state::IsSet, - St::ForAccount: invite_code_state::IsSet, St::CreatedAt: invite_code_state::IsSet, St::CreatedBy: invite_code_state::IsSet, St::Uses: invite_code_state::IsSet, St::Disabled: invite_code_state::IsSet, + St::Available: invite_code_state::IsSet, + St::Code: invite_code_state::IsSet, + St::ForAccount: invite_code_state::IsSet, { /// Build the final struct. pub fn build(self) -> InviteCode { diff --git a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs index 004d07fca..1f399fdac 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_app_password.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_app_password.rs @@ -156,49 +156,49 @@ pub mod app_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + type Name; type Password; } /// 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 Name = Unset; type Password = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; - type Password = St::Password; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + type Password = St::Password; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + type Name = Set; type Password = St::Password; } ///State transition - sets the `password` field to Set pub struct SetPassword(PhantomData St>); impl sealed::Sealed for SetPassword {} impl State for SetPassword { - type Name = St::Name; type CreatedAt = St::CreatedAt; + type Name = St::Name; type Password = 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 `name` field + pub struct name(()); ///Marker type for the `password` field pub struct password(()); } @@ -302,8 +302,8 @@ impl AppPasswordBuilder { impl AppPasswordBuilder where St: app_password_state::State, - St::Name: app_password_state::IsSet, St::CreatedAt: app_password_state::IsSet, + St::Name: app_password_state::IsSet, St::Password: app_password_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs index 93d66ae01..98f607875 100644 --- a/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs +++ b/crates/jacquard-api/src/com_atproto/server/create_invite_codes.rs @@ -111,37 +111,37 @@ pub mod account_codes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Account; type Codes; + type Account; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Account = Unset; type Codes = Unset; - } - ///State transition - sets the `account` field to Set - pub struct SetAccount(PhantomData St>); - impl sealed::Sealed for SetAccount {} - impl State for SetAccount { - type Account = Set; - type Codes = St::Codes; + type Account = Unset; } ///State transition - sets the `codes` field to Set pub struct SetCodes(PhantomData St>); impl sealed::Sealed for SetCodes {} impl State for SetCodes { - type Account = St::Account; type Codes = Set; + type Account = St::Account; + } + ///State transition - sets the `account` field to Set + pub struct SetAccount(PhantomData St>); + impl sealed::Sealed for SetAccount {} + impl State for SetAccount { + type Codes = St::Codes; + type Account = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `account` field - pub struct account(()); ///Marker type for the `codes` field pub struct codes(()); + ///Marker type for the `account` field + pub struct account(()); } } @@ -211,8 +211,8 @@ where impl AccountCodesBuilder where St: account_codes_state::State, - St::Account: account_codes_state::IsSet, St::Codes: account_codes_state::IsSet, + St::Account: account_codes_state::IsSet, { /// Build the final struct. pub fn build(self) -> AccountCodes { diff --git a/crates/jacquard-api/src/com_atproto/server/delete_account.rs b/crates/jacquard-api/src/com_atproto/server/delete_account.rs index 1981f3663..e5b61917b 100644 --- a/crates/jacquard-api/src/com_atproto/server/delete_account.rs +++ b/crates/jacquard-api/src/com_atproto/server/delete_account.rs @@ -116,51 +116,51 @@ pub mod delete_account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Password; - type Token; type Did; + type Token; + type Password; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Password = Unset; - type Token = Unset; type Did = Unset; + type Token = Unset; + type Password = Unset; } - ///State transition - sets the `password` field to Set - pub struct SetPassword(PhantomData St>); - impl sealed::Sealed for SetPassword {} - impl State for SetPassword { - type Password = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Token = St::Token; - type Did = St::Did; + type Password = St::Password; } ///State transition - sets the `token` field to Set pub struct SetToken(PhantomData St>); impl sealed::Sealed for SetToken {} impl State for SetToken { - type Password = St::Password; - type Token = Set; type Did = St::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + type Token = Set; type Password = St::Password; + } + ///State transition - sets the `password` field to Set + pub struct SetPassword(PhantomData St>); + impl sealed::Sealed for SetPassword {} + impl State for SetPassword { + type Did = St::Did; type Token = St::Token; - type Did = Set; + type Password = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `password` field - pub struct password(()); - ///Marker type for the `token` field - pub struct token(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `token` field + pub struct token(()); + ///Marker type for the `password` field + pub struct password(()); } } @@ -249,9 +249,9 @@ where impl DeleteAccountBuilder where St: delete_account_state::State, - St::Password: delete_account_state::IsSet, - St::Token: delete_account_state::IsSet, St::Did: delete_account_state::IsSet, + St::Token: delete_account_state::IsSet, + St::Password: delete_account_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeleteAccount { diff --git a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs index ca3ab5c34..8e4e0ab6d 100644 --- a/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs +++ b/crates/jacquard-api/src/com_atproto/server/list_app_passwords.rs @@ -141,37 +141,37 @@ pub mod app_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -254,8 +254,8 @@ impl AppPasswordBuilder { impl AppPasswordBuilder where St: app_password_state::State, - St::Name: app_password_state::IsSet, St::CreatedAt: app_password_state::IsSet, + St::Name: app_password_state::IsSet, { /// Build the final struct. pub fn build(self) -> AppPassword { diff --git a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs index 29655db9d..a612a0de7 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_blocks.rs @@ -163,37 +163,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 St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Cids = St::Cids; + type Did = Unset; } ///State transition - sets the `cids` field to Set pub struct SetCids(PhantomData St>); impl sealed::Sealed for SetCids {} impl State for SetCids { - type Did = St::Did; type Cids = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Cids = St::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(()); } } @@ -263,8 +263,8 @@ where impl GetBlocksBuilder where St: get_blocks_state::State, - St::Did: get_blocks_state::IsSet, St::Cids: get_blocks_state::IsSet, + St::Did: get_blocks_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetBlocks { diff --git a/crates/jacquard-api/src/com_atproto/sync/get_record.rs b/crates/jacquard-api/src/com_atproto/sync/get_record.rs index 56139ce5b..9d3325f97 100644 --- a/crates/jacquard-api/src/com_atproto/sync/get_record.rs +++ b/crates/jacquard-api/src/com_atproto/sync/get_record.rs @@ -165,50 +165,50 @@ pub mod get_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Rkey; type Collection; + type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Rkey = Unset; type Collection = Unset; + type Rkey = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Rkey = St::Rkey; - type Collection = St::Collection; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData St>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Did = St::Did; - type Rkey = Set; type Collection = St::Collection; + type Rkey = St::Rkey; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Did = St::Did; - type Rkey = St::Rkey; type Collection = Set; + type Rkey = St::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData St>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Did = St::Did; + type Collection = St::Collection; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `rkey` field - pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -298,8 +298,8 @@ impl GetRecordBuilder where St: get_record_state::State, St::Did: get_record_state::IsSet, - St::Rkey: get_record_state::IsSet, St::Collection: get_record_state::IsSet, + St::Rkey: get_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetRecord { diff --git a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs index 30f45ee40..25b861e4e 100644 --- a/crates/jacquard-api/src/com_atproto/sync/list_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/list_repos.rs @@ -296,51 +296,51 @@ pub mod repo_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Head; type Rev; type Did; - type Head; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Head = Unset; type Rev = Unset; type Did = Unset; - type Head = Unset; + } + ///State transition - sets the `head` field to Set + pub struct SetHead(PhantomData St>); + impl sealed::Sealed for SetHead {} + impl State for SetHead { + type Head = Set; + type Rev = St::Rev; + type Did = St::Did; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { + type Head = St::Head; type Rev = Set; type Did = St::Did; - type Head = St::Head; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Rev = St::Rev; - type Did = Set; type Head = St::Head; - } - ///State transition - sets the `head` field to Set - pub struct SetHead(PhantomData St>); - impl sealed::Sealed for SetHead {} - impl State for SetHead { type Rev = St::Rev; - type Did = St::Did; - type Head = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `head` field + pub struct head(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `head` field - pub struct head(()); } } @@ -461,9 +461,9 @@ impl RepoBuilder { impl RepoBuilder where St: repo_state::State, + St::Head: repo_state::IsSet, St::Rev: repo_state::IsSet, St::Did: repo_state::IsSet, - St::Head: repo_state::IsSet, { /// Build the final struct. pub fn build(self) -> Repo { diff --git a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs index c923cf19b..9ecd51b1b 100644 --- a/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/jacquard-api/src/com_atproto/sync/subscribe_repos.rs @@ -665,66 +665,66 @@ pub mod account_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Seq; - type Active; type Time; + type Active; + type Seq; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Seq = Unset; - type Active = Unset; type Time = Unset; + type Active = Unset; + type Seq = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Seq = St::Seq; - type Active = St::Active; type Time = St::Time; + type Active = St::Active; + type Seq = St::Seq; } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData St>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData St>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { type Did = St::Did; - type Seq = Set; + type Time = Set; type Active = St::Active; - type Time = St::Time; + type Seq = St::Seq; } ///State transition - sets the `active` field to Set pub struct SetActive(PhantomData St>); impl sealed::Sealed for SetActive {} impl State for SetActive { type Did = St::Did; - type Seq = St::Seq; - type Active = Set; type Time = St::Time; + type Active = Set; + type Seq = St::Seq; } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData St>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { type Did = St::Did; - type Seq = St::Seq; + type Time = St::Time; type Active = St::Active; - type Time = Set; + type Seq = 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 `seq` field - pub struct seq(()); - ///Marker type for the `active` field - pub struct active(()); ///Marker type for the `time` field pub struct time(()); + ///Marker type for the `active` field + pub struct active(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -852,9 +852,9 @@ impl AccountBuilder where St: account_state::State, St::Did: account_state::IsSet, - St::Seq: account_state::IsSet, - St::Active: account_state::IsSet, St::Time: account_state::IsSet, + St::Active: account_state::IsSet, + St::Seq: account_state::IsSet, { /// Build the final struct. pub fn build(self) -> Account { @@ -1305,205 +1305,205 @@ pub mod commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Commit; + type Time; type Seq; + type TooBig; + type Ops; type Rev; - type Blobs; + type Rebase; type Repo; type Blocks; - type Ops; - type Rebase; - type Time; - type TooBig; + type Blobs; + type Commit; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Commit = Unset; + type Time = Unset; type Seq = Unset; + type TooBig = Unset; + type Ops = Unset; type Rev = Unset; - type Blobs = Unset; + type Rebase = Unset; type Repo = Unset; type Blocks = Unset; - type Ops = Unset; - type Rebase = Unset; - type Time = Unset; - type TooBig = Unset; + type Blobs = Unset; + type Commit = Unset; } - ///State transition - sets the `commit` field to Set - pub struct SetCommit(PhantomData St>); - impl sealed::Sealed for SetCommit {} - impl State for SetCommit { - type Commit = Set; + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData St>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Time = Set; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; + type Blobs = St::Blobs; + type Commit = St::Commit; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData St>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { - type Commit = St::Commit; + type Time = St::Time; type Seq = Set; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = St::Blocks; + type Blobs = St::Blobs; + type Commit = St::Commit; + } + ///State transition - sets the `too_big` field to Set + pub struct SetTooBig(PhantomData St>); + impl sealed::Sealed for SetTooBig {} + impl State for SetTooBig { + type Time = St::Time; + type Seq = St::Seq; + type TooBig = Set; type Ops = St::Ops; + type Rev = St::Rev; type Rebase = St::Rebase; + type Repo = St::Repo; + type Blocks = St::Blocks; + type Blobs = St::Blobs; + type Commit = St::Commit; + } + ///State transition - sets the `ops` field to Set + pub struct SetOps(PhantomData St>); + impl sealed::Sealed for SetOps {} + impl State for SetOps { type Time = St::Time; + type Seq = St::Seq; type TooBig = St::TooBig; + type Ops = Set; + type Rev = St::Rev; + type Rebase = St::Rebase; + type Repo = St::Repo; + type Blocks = St::Blocks; + type Blobs = St::Blobs; + type Commit = St::Commit; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Commit = St::Commit; + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = Set; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; - } - ///State transition - sets the `blobs` field to Set - pub struct SetBlobs(PhantomData St>); - impl sealed::Sealed for SetBlobs {} - impl State for SetBlobs { + type Blobs = St::Blobs; type Commit = St::Commit; + } + ///State transition - sets the `rebase` field to Set + pub struct SetRebase(PhantomData St>); + impl sealed::Sealed for SetRebase {} + impl State for SetRebase { + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = Set; + type Rebase = Set; type Repo = St::Repo; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; + type Blobs = St::Blobs; + type Commit = St::Commit; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Commit = St::Commit; + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = Set; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; + type Blobs = St::Blobs; + type Commit = St::Commit; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData St>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { - type Commit = St::Commit; + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = Set; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; - } - ///State transition - sets the `ops` field to Set - pub struct SetOps(PhantomData St>); - impl sealed::Sealed for SetOps {} - impl State for SetOps { - type Commit = St::Commit; - type Seq = St::Seq; - type Rev = St::Rev; type Blobs = St::Blobs; - type Repo = St::Repo; - type Blocks = St::Blocks; - type Ops = Set; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = St::TooBig; - } - ///State transition - sets the `rebase` field to Set - pub struct SetRebase(PhantomData St>); - impl sealed::Sealed for SetRebase {} - impl State for SetRebase { type Commit = St::Commit; - type Seq = St::Seq; - type Rev = St::Rev; - type Blobs = St::Blobs; - type Repo = St::Repo; - type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = Set; - type Time = St::Time; - type TooBig = St::TooBig; } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData St>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Commit = St::Commit; + ///State transition - sets the `blobs` field to Set + pub struct SetBlobs(PhantomData St>); + impl sealed::Sealed for SetBlobs {} + impl State for SetBlobs { + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = Set; - type TooBig = St::TooBig; - } - ///State transition - sets the `too_big` field to Set - pub struct SetTooBig(PhantomData St>); - impl sealed::Sealed for SetTooBig {} - impl State for SetTooBig { + type Blobs = Set; type Commit = St::Commit; + } + ///State transition - sets the `commit` field to Set + pub struct SetCommit(PhantomData St>); + impl sealed::Sealed for SetCommit {} + impl State for SetCommit { + type Time = St::Time; type Seq = St::Seq; + type TooBig = St::TooBig; + type Ops = St::Ops; type Rev = St::Rev; - type Blobs = St::Blobs; + type Rebase = St::Rebase; type Repo = St::Repo; type Blocks = St::Blocks; - type Ops = St::Ops; - type Rebase = St::Rebase; - type Time = St::Time; - type TooBig = Set; + type Blobs = St::Blobs; + type Commit = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `commit` field - pub struct commit(()); + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `seq` field pub struct seq(()); + ///Marker type for the `too_big` field + pub struct too_big(()); + ///Marker type for the `ops` field + pub struct ops(()); ///Marker type for the `rev` field pub struct rev(()); - ///Marker type for the `blobs` field - pub struct blobs(()); + ///Marker type for the `rebase` field + pub struct rebase(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `blocks` field pub struct blocks(()); - ///Marker type for the `ops` field - pub struct ops(()); - ///Marker type for the `rebase` field - pub struct rebase(()); - ///Marker type for the `time` field - pub struct time(()); - ///Marker type for the `too_big` field - pub struct too_big(()); + ///Marker type for the `blobs` field + pub struct blobs(()); + ///Marker type for the `commit` field + pub struct commit(()); } } @@ -1777,16 +1777,16 @@ where impl CommitBuilder where St: commit_state::State, - St::Commit: commit_state::IsSet, + St::Time: commit_state::IsSet, St::Seq: commit_state::IsSet, + St::TooBig: commit_state::IsSet, + St::Ops: commit_state::IsSet, St::Rev: commit_state::IsSet, - St::Blobs: commit_state::IsSet, + St::Rebase: commit_state::IsSet, St::Repo: commit_state::IsSet, St::Blocks: commit_state::IsSet, - St::Ops: commit_state::IsSet, - St::Rebase: commit_state::IsSet, - St::Time: commit_state::IsSet, - St::TooBig: commit_state::IsSet, + St::Blobs: commit_state::IsSet, + St::Commit: commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> Commit { @@ -2085,37 +2085,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 St>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Action = Set; - type Path = St::Path; + type Action = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData St>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Action = St::Action; type Path = Set; + type Action = St::Action; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData St>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Path = St::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(()); } } @@ -2216,8 +2216,8 @@ impl RepoOpBuilder { impl RepoOpBuilder where St: repo_op_state::State, - St::Action: repo_op_state::IsSet, St::Path: repo_op_state::IsSet, + St::Action: repo_op_state::IsSet, { /// Build the final struct. pub fn build(self) -> RepoOp { @@ -2251,85 +2251,85 @@ pub mod sync_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Time; - type Seq; + type Blocks; type Rev; + type Seq; type Did; - type Blocks; + 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 Seq = Unset; + type Blocks = Unset; type Rev = Unset; + type Seq = Unset; type Did = Unset; - type Blocks = Unset; + type Time = Unset; } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData St>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Time = Set; - type Seq = St::Seq; + ///State transition - sets the `blocks` field to Set + pub struct SetBlocks(PhantomData St>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { + type Blocks = Set; type Rev = St::Rev; + type Seq = St::Seq; type Did = St::Did; - type Blocks = St::Blocks; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData St>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { type Time = St::Time; - type Seq = Set; - type Rev = St::Rev; - type Did = St::Did; - type Blocks = St::Blocks; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData St>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Time = St::Time; - type Seq = St::Seq; + type Blocks = St::Blocks; type Rev = Set; + type Seq = St::Seq; type Did = St::Did; + type Time = St::Time; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { type Blocks = St::Blocks; + type Rev = St::Rev; + type Seq = Set; + type Did = St::Did; + type Time = St::Time; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Time = St::Time; - type Seq = St::Seq; + type Blocks = St::Blocks; type Rev = St::Rev; + type Seq = St::Seq; type Did = Set; - type Blocks = St::Blocks; - } - ///State transition - sets the `blocks` field to Set - pub struct SetBlocks(PhantomData St>); - impl sealed::Sealed for SetBlocks {} - impl State for SetBlocks { type Time = St::Time; - type Seq = St::Seq; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData St>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Blocks = St::Blocks; type Rev = St::Rev; + type Seq = St::Seq; type Did = St::Did; - type Blocks = 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 `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 `seq` field + pub struct seq(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `blocks` field - pub struct blocks(()); + ///Marker type for the `time` field + pub struct time(()); } } @@ -2453,11 +2453,11 @@ where impl SyncBuilder where St: sync_state::State, - St::Time: sync_state::IsSet, - St::Seq: sync_state::IsSet, + St::Blocks: sync_state::IsSet, St::Rev: sync_state::IsSet, + St::Seq: sync_state::IsSet, St::Did: sync_state::IsSet, - St::Blocks: sync_state::IsSet, + St::Time: sync_state::IsSet, { /// Build the final struct. pub fn build(self) -> Sync { diff --git a/crates/jacquard-api/src/com_chrisvanderloo/project.rs b/crates/jacquard-api/src/com_chrisvanderloo/project.rs index 5022e246b..f25021311 100644 --- a/crates/jacquard-api/src/com_chrisvanderloo/project.rs +++ b/crates/jacquard-api/src/com_chrisvanderloo/project.rs @@ -170,65 +170,65 @@ pub mod project_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Language; type Description; + type Title; type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Language = Unset; type Description = Unset; + type Title = Unset; type Repo = Unset; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Language = St::Language; - type Description = St::Description; - type Repo = St::Repo; - } ///State transition - sets the `language` field to Set pub struct SetLanguage(PhantomData St>); impl sealed::Sealed for SetLanguage {} impl State for SetLanguage { - type Title = St::Title; type Language = Set; type Description = St::Description; + type Title = St::Title; type Repo = St::Repo; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Title = St::Title; type Language = St::Language; type Description = Set; + type Title = St::Title; + type Repo = St::Repo; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Language = St::Language; + type Description = St::Description; + type Title = Set; type Repo = St::Repo; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Title = St::Title; type Language = St::Language; type Description = St::Description; + type Title = St::Title; type Repo = 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 `language` field pub struct language(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `repo` field pub struct repo(()); } @@ -351,9 +351,9 @@ where impl ProjectBuilder where St: project_state::State, - St::Title: project_state::IsSet, St::Language: project_state::IsSet, St::Description: project_state::IsSet, + St::Title: project_state::IsSet, St::Repo: project_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_deckbelcher/collection/list.rs b/crates/jacquard-api/src/com_deckbelcher/collection/list.rs index 941595c43..feefbc2d8 100644 --- a/crates/jacquard-api/src/com_deckbelcher/collection/list.rs +++ b/crates/jacquard-api/src/com_deckbelcher/collection/list.rs @@ -510,37 +510,37 @@ pub mod deck_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; type AddedAt; + type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; type AddedAt = Unset; - } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; - type AddedAt = St::AddedAt; + type Ref = Unset; } ///State transition - sets the `added_at` field to Set pub struct SetAddedAt(PhantomData St>); impl sealed::Sealed for SetAddedAt {} impl State for SetAddedAt { - type Ref = St::Ref; type AddedAt = Set; + type Ref = St::Ref; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { + type AddedAt = St::AddedAt; + type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); ///Marker type for the `added_at` field pub struct added_at(()); + ///Marker type for the `ref` field + pub struct r#ref(()); } } @@ -610,8 +610,8 @@ where impl DeckItemBuilder where St: deck_item_state::State, - St::Ref: deck_item_state::IsSet, St::AddedAt: deck_item_state::IsSet, + St::Ref: deck_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeckItem { @@ -641,51 +641,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Items; type CreatedAt; type Name; + type Items; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Items = Unset; type CreatedAt = Unset; type Name = Unset; - } - ///State transition - sets the `items` field to Set - pub struct SetItems(PhantomData St>); - impl sealed::Sealed for SetItems {} - impl State for SetItems { - type Items = Set; - type CreatedAt = St::CreatedAt; - type Name = St::Name; + type Items = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Items = St::Items; type CreatedAt = Set; type Name = St::Name; + type Items = St::Items; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Items = St::Items; type CreatedAt = St::CreatedAt; type Name = Set; + type Items = St::Items; + } + ///State transition - sets the `items` field to Set + pub struct SetItems(PhantomData St>); + impl sealed::Sealed for SetItems {} + impl State for SetItems { + type CreatedAt = St::CreatedAt; + type Name = St::Name; + type Items = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `items` field - pub struct items(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `items` field + pub struct items(()); } } @@ -806,9 +806,9 @@ impl ListBuilder { impl ListBuilder where St: list_state::State, - St::Items: list_state::IsSet, St::CreatedAt: list_state::IsSet, St::Name: list_state::IsSet, + St::Items: list_state::IsSet, { /// Build the final struct. pub fn build(self) -> List { diff --git a/crates/jacquard-api/src/com_deckbelcher/deck/list.rs b/crates/jacquard-api/src/com_deckbelcher/deck/list.rs index 0c57793ee..f7f380a83 100644 --- a/crates/jacquard-api/src/com_deckbelcher/deck/list.rs +++ b/crates/jacquard-api/src/com_deckbelcher/deck/list.rs @@ -531,51 +531,51 @@ pub mod card_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; type Quantity; type Section; + type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; type Quantity = Unset; type Section = Unset; - } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; - type Quantity = St::Quantity; - type Section = St::Section; + type Ref = Unset; } ///State transition - sets the `quantity` field to Set pub struct SetQuantity(PhantomData St>); impl sealed::Sealed for SetQuantity {} impl State for SetQuantity { - type Ref = St::Ref; type Quantity = Set; type Section = St::Section; + type Ref = St::Ref; } ///State transition - sets the `section` field to Set pub struct SetSection(PhantomData St>); impl sealed::Sealed for SetSection {} impl State for SetSection { - type Ref = St::Ref; type Quantity = St::Quantity; type Section = Set; + type Ref = St::Ref; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { + type Quantity = St::Quantity; + type Section = St::Section; + type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); ///Marker type for the `quantity` field pub struct quantity(()); ///Marker type for the `section` field pub struct section(()); + ///Marker type for the `ref` field + pub struct r#ref(()); } } @@ -677,9 +677,9 @@ impl CardBuilder { impl CardBuilder where St: card_state::State, - St::Ref: card_state::IsSet, St::Quantity: card_state::IsSet, St::Section: card_state::IsSet, + St::Ref: card_state::IsSet, { /// Build the final struct. pub fn build(self) -> Card { @@ -954,51 +954,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Cards; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Cards = Unset; type Name = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Cards = St::Cards; - type Name = St::Name; + type CreatedAt = Unset; } ///State transition - sets the `cards` field to Set pub struct SetCards(PhantomData St>); impl sealed::Sealed for SetCards {} impl State for SetCards { - type CreatedAt = St::CreatedAt; type Cards = Set; type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Cards = St::Cards; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Cards = St::Cards; + type Name = St::Name; + 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 `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(()); } } @@ -1133,9 +1133,9 @@ impl ListBuilder { impl ListBuilder where St: list_state::State, - St::CreatedAt: list_state::IsSet, St::Cards: list_state::IsSet, St::Name: list_state::IsSet, + St::CreatedAt: list_state::IsSet, { /// Build the final struct. pub fn build(self) -> List { diff --git a/crates/jacquard-api/src/com_deckbelcher/richtext/facet.rs b/crates/jacquard-api/src/com_deckbelcher/richtext/facet.rs index a0f2989f1..180062bef 100644 --- a/crates/jacquard-api/src/com_deckbelcher/richtext/facet.rs +++ b/crates/jacquard-api/src/com_deckbelcher/richtext/facet.rs @@ -621,37 +621,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 St>); - impl sealed::Sealed for SetByteStart {} - impl State for SetByteStart { - type ByteStart = Set; - type ByteEnd = St::ByteEnd; + type ByteStart = Unset; } ///State transition - sets the `byte_end` field to Set pub struct SetByteEnd(PhantomData St>); impl sealed::Sealed for SetByteEnd {} impl State for SetByteEnd { - type ByteStart = St::ByteStart; type ByteEnd = Set; + type ByteStart = St::ByteStart; + } + ///State transition - sets the `byte_start` field to Set + pub struct SetByteStart(PhantomData St>); + impl sealed::Sealed for SetByteStart {} + impl State for SetByteStart { + type ByteEnd = St::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(()); } } @@ -721,8 +721,8 @@ where impl ByteSliceBuilder where St: byte_slice_state::State, - St::ByteStart: byte_slice_state::IsSet, St::ByteEnd: byte_slice_state::IsSet, + St::ByteStart: byte_slice_state::IsSet, { /// Build the final struct. pub fn build(self) -> ByteSlice { @@ -949,37 +949,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 St>); - impl sealed::Sealed for SetFeatures {} - impl State for SetFeatures { - type Features = Set; - type Index = St::Index; + type Features = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData St>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Features = St::Features; type Index = Set; + type Features = St::Features; + } + ///State transition - sets the `features` field to Set + pub struct SetFeatures(PhantomData St>); + impl sealed::Sealed for SetFeatures {} + impl State for SetFeatures { + type Index = St::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(()); } } @@ -1049,8 +1049,8 @@ where impl FacetBuilder where St: facet_state::State, - St::Features: facet_state::IsSet, St::Index: facet_state::IsSet, + St::Features: facet_state::IsSet, { /// Build the final struct. pub fn build(self) -> Facet { diff --git a/crates/jacquard-api/src/com_deckbelcher/social/comment.rs b/crates/jacquard-api/src/com_deckbelcher/social/comment.rs index 078758b69..0df5eda70 100644 --- a/crates/jacquard-api/src/com_deckbelcher/social/comment.rs +++ b/crates/jacquard-api/src/com_deckbelcher/social/comment.rs @@ -886,51 +886,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subject; type Content; 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 Content = Unset; type CreatedAt = Unset; - type Subject = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type Content = St::Content; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { + type Subject = St::Subject; type Content = Set; type CreatedAt = St::CreatedAt; - type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; - type CreatedAt = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { type Content = St::Content; - type CreatedAt = St::CreatedAt; - type Subject = Set; + 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 `content` field pub struct content(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `subject` field - pub struct subject(()); } } @@ -1051,9 +1051,9 @@ impl CommentBuilder { impl CommentBuilder where St: comment_state::State, + St::Subject: comment_state::IsSet, St::Content: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, - St::Subject: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/com_deckbelcher/social/reply.rs b/crates/jacquard-api/src/com_deckbelcher/social/reply.rs index df716dc7f..7788a9270 100644 --- a/crates/jacquard-api/src/com_deckbelcher/social/reply.rs +++ b/crates/jacquard-api/src/com_deckbelcher/social/reply.rs @@ -121,67 +121,67 @@ pub mod reply_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Parent; - type CreatedAt; type Root; + type CreatedAt; + type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Content = Unset; type Parent = Unset; - type CreatedAt = Unset; type Root = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Parent = St::Parent; - type CreatedAt = St::CreatedAt; - type Root = St::Root; + type CreatedAt = Unset; + type Content = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Content = St::Content; type Parent = Set; - type CreatedAt = St::CreatedAt; type Root = St::Root; + type CreatedAt = St::CreatedAt; + type Content = St::Content; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = St::Parent; + type Root = Set; + type CreatedAt = St::CreatedAt; + type Content = St::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; type Parent = St::Parent; - type CreatedAt = Set; type Root = St::Root; - } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { + type CreatedAt = Set; type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { type Parent = St::Parent; + type Root = St::Root; type CreatedAt = St::CreatedAt; - type Root = 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 `parent` field pub struct parent(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -308,10 +308,10 @@ impl ReplyBuilder { impl ReplyBuilder where St: reply_state::State, - St::Content: reply_state::IsSet, St::Parent: reply_state::IsSet, - St::CreatedAt: reply_state::IsSet, St::Root: reply_state::IsSet, + St::CreatedAt: reply_state::IsSet, + St::Content: reply_state::IsSet, { /// Build the final struct. pub fn build(self) -> Reply { diff --git a/crates/jacquard-api/src/com_germnetwork/declaration.rs b/crates/jacquard-api/src/com_germnetwork/declaration.rs index 7c1a03776..7ed144965 100644 --- a/crates/jacquard-api/src/com_germnetwork/declaration.rs +++ b/crates/jacquard-api/src/com_germnetwork/declaration.rs @@ -315,37 +315,37 @@ pub mod declaration_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Version; type CurrentKey; + type Version; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Version = Unset; type CurrentKey = Unset; - } - ///State transition - sets the `version` field to Set - pub struct SetVersion(PhantomData St>); - impl sealed::Sealed for SetVersion {} - impl State for SetVersion { - type Version = Set; - type CurrentKey = St::CurrentKey; + type Version = Unset; } ///State transition - sets the `current_key` field to Set pub struct SetCurrentKey(PhantomData St>); impl sealed::Sealed for SetCurrentKey {} impl State for SetCurrentKey { - type Version = St::Version; type CurrentKey = Set; + type Version = St::Version; + } + ///State transition - sets the `version` field to Set + pub struct SetVersion(PhantomData St>); + impl sealed::Sealed for SetVersion {} + impl State for SetVersion { + type CurrentKey = St::CurrentKey; + type Version = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `version` field - pub struct version(()); ///Marker type for the `current_key` field pub struct current_key(()); + ///Marker type for the `version` field + pub struct version(()); } } @@ -463,8 +463,8 @@ where impl DeclarationBuilder where St: declaration_state::State, - St::Version: declaration_state::IsSet, St::CurrentKey: declaration_state::IsSet, + St::Version: declaration_state::IsSet, { /// Build the final struct. pub fn build(self) -> Declaration { diff --git a/crates/jacquard-api/src/com_kipclip/annotation.rs b/crates/jacquard-api/src/com_kipclip/annotation.rs index ead305d1c..63695eba6 100644 --- a/crates/jacquard-api/src/com_kipclip/annotation.rs +++ b/crates/jacquard-api/src/com_kipclip/annotation.rs @@ -154,37 +154,37 @@ pub mod annotation_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -327,8 +327,8 @@ impl AnnotationBuilder { impl AnnotationBuilder where St: annotation_state::State, - St::CreatedAt: annotation_state::IsSet, St::Subject: annotation_state::IsSet, + St::CreatedAt: annotation_state::IsSet, { /// Build the final struct. pub fn build(self) -> Annotation { diff --git a/crates/jacquard-api/src/com_kipclip/tag.rs b/crates/jacquard-api/src/com_kipclip/tag.rs index bacf8acf6..f9d52b20c 100644 --- a/crates/jacquard-api/src/com_kipclip/tag.rs +++ b/crates/jacquard-api/src/com_kipclip/tag.rs @@ -125,37 +125,37 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type CreatedAt = St::CreatedAt; + type Value = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Value = St::Value; type CreatedAt = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -225,8 +225,8 @@ where impl TagBuilder where St: tag_state::State, - St::Value: tag_state::IsSet, St::CreatedAt: tag_state::IsSet, + St::Value: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/com_shinolabs/pinksea/app_view_defs.rs b/crates/jacquard-api/src/com_shinolabs/pinksea/app_view_defs.rs index f28dcfb3c..097c9b569 100644 --- a/crates/jacquard-api/src/com_shinolabs/pinksea/app_view_defs.rs +++ b/crates/jacquard-api/src/com_shinolabs/pinksea/app_view_defs.rs @@ -140,37 +140,37 @@ pub mod author_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 St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = St::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = St::Did; type Handle = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = St::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(()); } } @@ -240,8 +240,8 @@ where impl AuthorBuilder where St: author_state::State, - St::Did: author_state::IsSet, St::Handle: author_state::IsSet, + St::Did: author_state::IsSet, { /// Build the final struct. pub fn build(self) -> Author { @@ -445,103 +445,103 @@ pub mod hydrated_oekaki_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Image; - type Cid; type CreationTime; type Nsfw; + type Cid; type At; + type Image; type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Image = Unset; - type Cid = Unset; type CreationTime = Unset; type Nsfw = Unset; + type Cid = Unset; type At = Unset; + type Image = Unset; type Author = Unset; } - ///State transition - sets the `image` field to Set - pub struct SetImage(PhantomData St>); - impl sealed::Sealed for SetImage {} - impl State for SetImage { - type Image = Set; - type Cid = St::Cid; - type CreationTime = St::CreationTime; - type Nsfw = St::Nsfw; - type At = St::At; - type Author = St::Author; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Image = St::Image; - type Cid = Set; - type CreationTime = St::CreationTime; - type Nsfw = St::Nsfw; - type At = St::At; - type Author = St::Author; - } ///State transition - sets the `creation_time` field to Set pub struct SetCreationTime(PhantomData St>); impl sealed::Sealed for SetCreationTime {} impl State for SetCreationTime { - type Image = St::Image; - type Cid = St::Cid; type CreationTime = Set; type Nsfw = St::Nsfw; + type Cid = St::Cid; type At = St::At; + type Image = St::Image; type Author = St::Author; } ///State transition - sets the `nsfw` field to Set pub struct SetNsfw(PhantomData St>); impl sealed::Sealed for SetNsfw {} impl State for SetNsfw { - type Image = St::Image; - type Cid = St::Cid; type CreationTime = St::CreationTime; type Nsfw = Set; + type Cid = St::Cid; type At = St::At; + type Image = St::Image; + type Author = St::Author; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type CreationTime = St::CreationTime; + type Nsfw = St::Nsfw; + type Cid = Set; + type At = St::At; + type Image = St::Image; type Author = St::Author; } ///State transition - sets the `at` field to Set pub struct SetAt(PhantomData St>); impl sealed::Sealed for SetAt {} impl State for SetAt { - type Image = St::Image; - type Cid = St::Cid; type CreationTime = St::CreationTime; type Nsfw = St::Nsfw; + type Cid = St::Cid; type At = Set; + type Image = St::Image; + type Author = St::Author; + } + ///State transition - sets the `image` field to Set + pub struct SetImage(PhantomData St>); + impl sealed::Sealed for SetImage {} + impl State for SetImage { + type CreationTime = St::CreationTime; + type Nsfw = St::Nsfw; + type Cid = St::Cid; + type At = St::At; + type Image = Set; type Author = St::Author; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Image = St::Image; - type Cid = St::Cid; type CreationTime = St::CreationTime; type Nsfw = St::Nsfw; + type Cid = St::Cid; type At = St::At; + type Image = St::Image; type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `image` field - pub struct image(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `creation_time` field pub struct creation_time(()); ///Marker type for the `nsfw` field pub struct nsfw(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `at` field pub struct at(()); + ///Marker type for the `image` field + pub struct image(()); ///Marker type for the `author` field pub struct author(()); } @@ -724,11 +724,11 @@ impl HydratedOekakiBuilder { impl HydratedOekakiBuilder where St: hydrated_oekaki_state::State, - St::Image: hydrated_oekaki_state::IsSet, - St::Cid: hydrated_oekaki_state::IsSet, St::CreationTime: hydrated_oekaki_state::IsSet, St::Nsfw: hydrated_oekaki_state::IsSet, + St::Cid: hydrated_oekaki_state::IsSet, St::At: hydrated_oekaki_state::IsSet, + St::Image: hydrated_oekaki_state::IsSet, St::Author: hydrated_oekaki_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/com_shinolabs/pinksea/get_parent_for_reply.rs b/crates/jacquard-api/src/com_shinolabs/pinksea/get_parent_for_reply.rs index b6d0b7c12..19aae72f6 100644 --- a/crates/jacquard-api/src/com_shinolabs/pinksea/get_parent_for_reply.rs +++ b/crates/jacquard-api/src/com_shinolabs/pinksea/get_parent_for_reply.rs @@ -70,37 +70,37 @@ pub mod get_parent_for_reply_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rkey; 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 Did = Unset; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData St>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Rkey = Set; - type Did = St::Did; + type Rkey = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Rkey = St::Rkey; type Did = Set; + type Rkey = St::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData St>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Did = St::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 `did` field pub struct did(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -170,8 +170,8 @@ where impl GetParentForReplyBuilder where St: get_parent_for_reply_state::State, - St::Rkey: get_parent_for_reply_state::IsSet, St::Did: get_parent_for_reply_state::IsSet, + St::Rkey: get_parent_for_reply_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetParentForReply { diff --git a/crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs b/crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs index a8c815886..49130720a 100644 --- a/crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs +++ b/crates/jacquard-api/src/com_shinolabs/pinksea/oekaki.rs @@ -228,37 +228,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Blob; type ImageLink; + type Blob; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Blob = Unset; type ImageLink = Unset; - } - ///State transition - sets the `blob` field to Set - pub struct SetBlob(PhantomData St>); - impl sealed::Sealed for SetBlob {} - impl State for SetBlob { - type Blob = Set; - type ImageLink = St::ImageLink; + type Blob = Unset; } ///State transition - sets the `image_link` field to Set pub struct SetImageLink(PhantomData St>); impl sealed::Sealed for SetImageLink {} impl State for SetImageLink { - type Blob = St::Blob; type ImageLink = Set; + type Blob = St::Blob; + } + ///State transition - sets the `blob` field to Set + pub struct SetBlob(PhantomData St>); + impl sealed::Sealed for SetBlob {} + impl State for SetBlob { + type ImageLink = St::ImageLink; + type Blob = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `blob` field - pub struct blob(()); ///Marker type for the `image_link` field pub struct image_link(()); + ///Marker type for the `blob` field + pub struct blob(()); } } @@ -328,8 +328,8 @@ where impl ImageBuilder where St: image_state::State, - St::Blob: image_state::IsSet, St::ImageLink: image_state::IsSet, + St::Blob: image_state::IsSet, { /// Build the final struct. pub fn build(self) -> Image { diff --git a/crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs b/crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs index 3f0e589e6..104004b8d 100644 --- a/crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs +++ b/crates/jacquard-api/src/com_shinolabs/pinksea/profile.rs @@ -472,37 +472,37 @@ pub mod profile_link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Link; + 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 Link = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Link = St::Link; + type Name = Unset; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData St>); impl sealed::Sealed for SetLink {} impl State for SetLink { - type Name = St::Name; type Link = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Link = St::Link; + 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 `link` field pub struct link(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -572,8 +572,8 @@ where impl ProfileLinkBuilder where St: profile_link_state::State, - St::Name: profile_link_state::IsSet, St::Link: profile_link_state::IsSet, + St::Name: profile_link_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileLink { diff --git a/crates/jacquard-api/src/com_suibari/atsumeat/sticker.rs b/crates/jacquard-api/src/com_suibari/atsumeat/sticker.rs index 9b54526e0..16deda9c7 100644 --- a/crates/jacquard-api/src/com_suibari/atsumeat/sticker.rs +++ b/crates/jacquard-api/src/com_suibari/atsumeat/sticker.rs @@ -429,105 +429,105 @@ pub mod sticker_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Model; - type Signature; - type OriginalOwner; type Image; type SignedPayload; + type Signature; + type OriginalOwner; type ObtainedAt; + type Model; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Model = Unset; - type Signature = Unset; - type OriginalOwner = Unset; type Image = Unset; type SignedPayload = Unset; + type Signature = Unset; + type OriginalOwner = Unset; type ObtainedAt = Unset; + type Model = Unset; } - ///State transition - sets the `model` field to Set - pub struct SetModel(PhantomData St>); - impl sealed::Sealed for SetModel {} - impl State for SetModel { - type Model = Set; + ///State transition - sets the `image` field to Set + pub struct SetImage(PhantomData St>); + impl sealed::Sealed for SetImage {} + impl State for SetImage { + type Image = Set; + type SignedPayload = St::SignedPayload; type Signature = St::Signature; type OriginalOwner = St::OriginalOwner; + type ObtainedAt = St::ObtainedAt; + type Model = St::Model; + } + ///State transition - sets the `signed_payload` field to Set + pub struct SetSignedPayload(PhantomData St>); + impl sealed::Sealed for SetSignedPayload {} + impl State for SetSignedPayload { type Image = St::Image; - type SignedPayload = St::SignedPayload; + type SignedPayload = Set; + type Signature = St::Signature; + type OriginalOwner = St::OriginalOwner; type ObtainedAt = St::ObtainedAt; + type Model = St::Model; } ///State transition - sets the `signature` field to Set pub struct SetSignature(PhantomData St>); impl sealed::Sealed for SetSignature {} impl State for SetSignature { - type Model = St::Model; - type Signature = Set; - type OriginalOwner = St::OriginalOwner; type Image = St::Image; type SignedPayload = St::SignedPayload; + type Signature = Set; + type OriginalOwner = St::OriginalOwner; type ObtainedAt = St::ObtainedAt; + type Model = St::Model; } ///State transition - sets the `original_owner` field to Set pub struct SetOriginalOwner(PhantomData St>); impl sealed::Sealed for SetOriginalOwner {} impl State for SetOriginalOwner { - type Model = St::Model; - type Signature = St::Signature; - type OriginalOwner = Set; type Image = St::Image; type SignedPayload = St::SignedPayload; - type ObtainedAt = St::ObtainedAt; - } - ///State transition - sets the `image` field to Set - pub struct SetImage(PhantomData St>); - impl sealed::Sealed for SetImage {} - impl State for SetImage { - type Model = St::Model; type Signature = St::Signature; - type OriginalOwner = St::OriginalOwner; - type Image = Set; - type SignedPayload = St::SignedPayload; + type OriginalOwner = Set; type ObtainedAt = St::ObtainedAt; - } - ///State transition - sets the `signed_payload` field to Set - pub struct SetSignedPayload(PhantomData St>); - impl sealed::Sealed for SetSignedPayload {} - impl State for SetSignedPayload { type Model = St::Model; - type Signature = St::Signature; - type OriginalOwner = St::OriginalOwner; - type Image = St::Image; - type SignedPayload = Set; - type ObtainedAt = St::ObtainedAt; } ///State transition - sets the `obtained_at` field to Set pub struct SetObtainedAt(PhantomData St>); impl sealed::Sealed for SetObtainedAt {} impl State for SetObtainedAt { - type Model = St::Model; + type Image = St::Image; + type SignedPayload = St::SignedPayload; type Signature = St::Signature; type OriginalOwner = St::OriginalOwner; + type ObtainedAt = Set; + type Model = St::Model; + } + ///State transition - sets the `model` field to Set + pub struct SetModel(PhantomData St>); + impl sealed::Sealed for SetModel {} + impl State for SetModel { type Image = St::Image; type SignedPayload = St::SignedPayload; - type ObtainedAt = Set; + type Signature = St::Signature; + type OriginalOwner = St::OriginalOwner; + type ObtainedAt = St::ObtainedAt; + type Model = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `model` field - pub struct model(()); - ///Marker type for the `signature` field - pub struct signature(()); - ///Marker type for the `original_owner` field - pub struct original_owner(()); ///Marker type for the `image` field pub struct image(()); ///Marker type for the `signed_payload` field pub struct signed_payload(()); + ///Marker type for the `signature` field + pub struct signature(()); + ///Marker type for the `original_owner` field + pub struct original_owner(()); ///Marker type for the `obtained_at` field pub struct obtained_at(()); + ///Marker type for the `model` field + pub struct model(()); } } @@ -792,12 +792,12 @@ impl StickerBuilder { impl StickerBuilder where St: sticker_state::State, - St::Model: sticker_state::IsSet, - St::Signature: sticker_state::IsSet, - St::OriginalOwner: sticker_state::IsSet, St::Image: sticker_state::IsSet, St::SignedPayload: sticker_state::IsSet, + St::Signature: sticker_state::IsSet, + St::OriginalOwner: sticker_state::IsSet, St::ObtainedAt: sticker_state::IsSet, + St::Model: sticker_state::IsSet, { /// Build the final struct. pub fn build(self) -> Sticker { diff --git a/crates/jacquard-api/src/com_suibari/atsumeat/transaction.rs b/crates/jacquard-api/src/com_suibari/atsumeat/transaction.rs index d35b4f735..200e74c48 100644 --- a/crates/jacquard-api/src/com_suibari/atsumeat/transaction.rs +++ b/crates/jacquard-api/src/com_suibari/atsumeat/transaction.rs @@ -250,37 +250,37 @@ pub mod transaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type CreatedAt; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type CreatedAt = St::CreatedAt; + type Status = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = St::Status; type CreatedAt = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -451,8 +451,8 @@ impl TransactionBuilder { impl TransactionBuilder where St: transaction_state::State, - St::Status: transaction_state::IsSet, St::CreatedAt: transaction_state::IsSet, + St::Status: transaction_state::IsSet, { /// Build the final struct. pub fn build(self) -> Transaction { diff --git a/crates/jacquard-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs b/crates/jacquard-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs index 6ff3a95b9..06c4cebc8 100644 --- a/crates/jacquard-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs +++ b/crates/jacquard-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs @@ -115,37 +115,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 St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type EntryTitle = St::EntryTitle; + type Author = Unset; } ///State transition - sets the `entry_title` field to Set pub struct SetEntryTitle(PhantomData St>); impl sealed::Sealed for SetEntryTitle {} impl State for SetEntryTitle { - type Author = St::Author; type EntryTitle = Set; + type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type EntryTitle = St::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(()); } } @@ -229,8 +229,8 @@ where impl GetEntryMetadataByNameBuilder where St: get_entry_metadata_by_name_state::State, - St::Author: get_entry_metadata_by_name_state::IsSet, St::EntryTitle: get_entry_metadata_by_name_state::IsSet, + St::Author: get_entry_metadata_by_name_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetEntryMetadataByName { diff --git a/crates/jacquard-api/src/com_yuna0x0/guestbook/sign.rs b/crates/jacquard-api/src/com_yuna0x0/guestbook/sign.rs index 404f185ca..075ba0811 100644 --- a/crates/jacquard-api/src/com_yuna0x0/guestbook/sign.rs +++ b/crates/jacquard-api/src/com_yuna0x0/guestbook/sign.rs @@ -125,49 +125,49 @@ pub mod sign_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; type Message = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; - type Message = St::Message; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + type Message = St::Message; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::CreatedAt; + type Subject = Set; type Message = St::Message; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Subject = St::Subject; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `message` field pub struct message(()); } @@ -258,8 +258,8 @@ where impl SignBuilder where St: sign_state::State, - St::Subject: sign_state::IsSet, St::CreatedAt: sign_state::IsSet, + St::Subject: sign_state::IsSet, St::Message: sign_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/community_lexicon/calendar/event.rs b/crates/jacquard-api/src/community_lexicon/calendar/event.rs index 9f861abe1..e2fc3abf6 100644 --- a/crates/jacquard-api/src/community_lexicon/calendar/event.rs +++ b/crates/jacquard-api/src/community_lexicon/calendar/event.rs @@ -475,37 +475,37 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Name = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + 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 `created_at` field + pub struct created_at(()); } } @@ -679,8 +679,8 @@ impl EventBuilder { impl EventBuilder where St: event_state::State, - St::CreatedAt: event_state::IsSet, St::Name: event_state::IsSet, + St::CreatedAt: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { diff --git a/crates/jacquard-api/src/community_lexicon/calendar/get_event.rs b/crates/jacquard-api/src/community_lexicon/calendar/get_event.rs index 8398ab263..93d866835 100644 --- a/crates/jacquard-api/src/community_lexicon/calendar/get_event.rs +++ b/crates/jacquard-api/src/community_lexicon/calendar/get_event.rs @@ -472,37 +472,37 @@ pub mod get_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RecordKey; type Repository; + type RecordKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RecordKey = Unset; type Repository = Unset; - } - ///State transition - sets the `record_key` field to Set - pub struct SetRecordKey(PhantomData St>); - impl sealed::Sealed for SetRecordKey {} - impl State for SetRecordKey { - type RecordKey = Set; - type Repository = St::Repository; + type RecordKey = Unset; } ///State transition - sets the `repository` field to Set pub struct SetRepository(PhantomData St>); impl sealed::Sealed for SetRepository {} impl State for SetRepository { - type RecordKey = St::RecordKey; type Repository = Set; + type RecordKey = St::RecordKey; + } + ///State transition - sets the `record_key` field to Set + pub struct SetRecordKey(PhantomData St>); + impl sealed::Sealed for SetRecordKey {} + impl State for SetRecordKey { + type Repository = St::Repository; + type RecordKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record_key` field - pub struct record_key(()); ///Marker type for the `repository` field pub struct repository(()); + ///Marker type for the `record_key` field + pub struct record_key(()); } } @@ -572,8 +572,8 @@ where impl GetEventBuilder where St: get_event_state::State, - St::RecordKey: get_event_state::IsSet, St::Repository: get_event_state::IsSet, + St::RecordKey: get_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetEvent { diff --git a/crates/jacquard-api/src/community_lexicon/calendar/get_rsvp.rs b/crates/jacquard-api/src/community_lexicon/calendar/get_rsvp.rs index de97ed7ed..7a698c7fd 100644 --- a/crates/jacquard-api/src/community_lexicon/calendar/get_rsvp.rs +++ b/crates/jacquard-api/src/community_lexicon/calendar/get_rsvp.rs @@ -115,37 +115,37 @@ pub mod get_rsvp_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Event; type Identity; + 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 Identity = Unset; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData St>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { - type Event = Set; - type Identity = St::Identity; + type Event = Unset; } ///State transition - sets the `identity` field to Set pub struct SetIdentity(PhantomData St>); impl sealed::Sealed for SetIdentity {} impl State for SetIdentity { - type Event = St::Event; type Identity = Set; + type Event = St::Event; + } + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData St>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type Identity = St::Identity; + type Event = 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 `identity` field pub struct identity(()); + ///Marker type for the `event` field + pub struct event(()); } } @@ -215,8 +215,8 @@ where impl GetRsvpBuilder where St: get_rsvp_state::State, - St::Event: get_rsvp_state::IsSet, St::Identity: get_rsvp_state::IsSet, + St::Event: get_rsvp_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetRsvp { diff --git a/crates/jacquard-api/src/community_lexicon/calendar/search_events.rs b/crates/jacquard-api/src/community_lexicon/calendar/search_events.rs index 1925dafa6..6bdcb2faa 100644 --- a/crates/jacquard-api/src/community_lexicon/calendar/search_events.rs +++ b/crates/jacquard-api/src/community_lexicon/calendar/search_events.rs @@ -177,67 +177,67 @@ pub mod event_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CountGoing; + type CountInterested; type Url; + type CountGoing; type CountNotGoing; - type CountInterested; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CountGoing = Unset; + type CountInterested = Unset; type Url = Unset; + type CountGoing = Unset; type CountNotGoing = Unset; - type CountInterested = Unset; } - ///State transition - sets the `count_going` field to Set - pub struct SetCountGoing(PhantomData St>); - impl sealed::Sealed for SetCountGoing {} - impl State for SetCountGoing { - type CountGoing = Set; + ///State transition - sets the `count_interested` field to Set + pub struct SetCountInterested(PhantomData St>); + impl sealed::Sealed for SetCountInterested {} + impl State for SetCountInterested { + type CountInterested = Set; type Url = St::Url; + type CountGoing = St::CountGoing; type CountNotGoing = St::CountNotGoing; - type CountInterested = St::CountInterested; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type CountGoing = St::CountGoing; + type CountInterested = St::CountInterested; type Url = Set; + type CountGoing = St::CountGoing; type CountNotGoing = St::CountNotGoing; + } + ///State transition - sets the `count_going` field to Set + pub struct SetCountGoing(PhantomData St>); + impl sealed::Sealed for SetCountGoing {} + impl State for SetCountGoing { type CountInterested = St::CountInterested; + type Url = St::Url; + type CountGoing = Set; + type CountNotGoing = St::CountNotGoing; } ///State transition - sets the `count_not_going` field to Set pub struct SetCountNotGoing(PhantomData St>); impl sealed::Sealed for SetCountNotGoing {} impl State for SetCountNotGoing { - type CountGoing = St::CountGoing; - type Url = St::Url; - type CountNotGoing = Set; type CountInterested = St::CountInterested; - } - ///State transition - sets the `count_interested` field to Set - pub struct SetCountInterested(PhantomData St>); - impl sealed::Sealed for SetCountInterested {} - impl State for SetCountInterested { - type CountGoing = St::CountGoing; type Url = St::Url; - type CountNotGoing = St::CountNotGoing; - type CountInterested = Set; + type CountGoing = St::CountGoing; + type CountNotGoing = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `count_going` field - pub struct count_going(()); + ///Marker type for the `count_interested` field + pub struct count_interested(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `count_going` field + pub struct count_going(()); ///Marker type for the `count_not_going` field pub struct count_not_going(()); - ///Marker type for the `count_interested` field - pub struct count_interested(()); } } @@ -345,10 +345,10 @@ where impl EventViewBuilder where St: event_view_state::State, - St::CountGoing: event_view_state::IsSet, + St::CountInterested: event_view_state::IsSet, St::Url: event_view_state::IsSet, + St::CountGoing: event_view_state::IsSet, St::CountNotGoing: event_view_state::IsSet, - St::CountInterested: event_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> EventView { diff --git a/crates/jacquard-api/src/community_lexicon/interaction/like.rs b/crates/jacquard-api/src/community_lexicon/interaction/like.rs index ca009064a..c2de98f48 100644 --- a/crates/jacquard-api/src/community_lexicon/interaction/like.rs +++ b/crates/jacquard-api/src/community_lexicon/interaction/like.rs @@ -113,37 +113,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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -213,8 +213,8 @@ where impl LikeBuilder where St: like_state::State, - St::Subject: like_state::IsSet, St::CreatedAt: like_state::IsSet, + St::Subject: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/computer_aesthetic/kidlisp.rs b/crates/jacquard-api/src/computer_aesthetic/kidlisp.rs index d311c3751..65c5413d6 100644 --- a/crates/jacquard-api/src/computer_aesthetic/kidlisp.rs +++ b/crates/jacquard-api/src/computer_aesthetic/kidlisp.rs @@ -151,67 +151,67 @@ pub mod kidlisp_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Code; - type When; type Source; + type Code; type Ref; + type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Code = Unset; - type When = Unset; type Source = Unset; + type Code = Unset; type Ref = Unset; - } - ///State transition - sets the `code` field to Set - pub struct SetCode(PhantomData St>); - impl sealed::Sealed for SetCode {} - impl State for SetCode { - type Code = Set; - type When = St::When; - type Source = St::Source; - type Ref = St::Ref; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { - type Code = St::Code; - type When = Set; - type Source = St::Source; - type Ref = St::Ref; + type When = Unset; } ///State transition - sets the `source` field to Set pub struct SetSource(PhantomData St>); impl sealed::Sealed for SetSource {} impl State for SetSource { + type Source = Set; type Code = St::Code; + type Ref = St::Ref; type When = St::When; - type Source = Set; + } + ///State transition - sets the `code` field to Set + pub struct SetCode(PhantomData St>); + impl sealed::Sealed for SetCode {} + impl State for SetCode { + type Source = St::Source; + type Code = Set; type Ref = St::Ref; + type When = St::When; } ///State transition - sets the `ref` field to Set pub struct SetRef(PhantomData St>); impl sealed::Sealed for SetRef {} impl State for SetRef { + type Source = St::Source; type Code = St::Code; + type Ref = Set; type When = St::When; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { type Source = St::Source; - type Ref = Set; + type Code = St::Code; + type Ref = St::Ref; + type When = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `code` field - pub struct code(()); - ///Marker type for the `when` field - pub struct when(()); ///Marker type for the `source` field pub struct source(()); + ///Marker type for the `code` field + pub struct code(()); ///Marker type for the `ref` field pub struct r#ref(()); + ///Marker type for the `when` field + pub struct when(()); } } @@ -319,10 +319,10 @@ where impl KidlispBuilder where St: kidlisp_state::State, - St::Code: kidlisp_state::IsSet, - St::When: kidlisp_state::IsSet, St::Source: kidlisp_state::IsSet, + St::Code: kidlisp_state::IsSet, St::Ref: kidlisp_state::IsSet, + St::When: kidlisp_state::IsSet, { /// Build the final struct. pub fn build(self) -> Kidlisp { diff --git a/crates/jacquard-api/src/computer_aesthetic/mood.rs b/crates/jacquard-api/src/computer_aesthetic/mood.rs index f9e915008..060eb85ad 100644 --- a/crates/jacquard-api/src/computer_aesthetic/mood.rs +++ b/crates/jacquard-api/src/computer_aesthetic/mood.rs @@ -127,49 +127,49 @@ pub mod mood_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type When; type Mood; + type When; type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type When = Unset; type Mood = Unset; + type When = Unset; type Ref = Unset; } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { - type When = Set; - type Mood = St::Mood; - type Ref = St::Ref; - } ///State transition - sets the `mood` field to Set pub struct SetMood(PhantomData St>); impl sealed::Sealed for SetMood {} impl State for SetMood { - type When = St::When; type Mood = Set; + type When = St::When; + type Ref = St::Ref; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type Mood = St::Mood; + type When = Set; type Ref = St::Ref; } ///State transition - sets the `ref` field to Set pub struct SetRef(PhantomData St>); impl sealed::Sealed for SetRef {} impl State for SetRef { - type When = St::When; type Mood = St::Mood; + type When = St::When; type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `when` field - pub struct when(()); ///Marker type for the `mood` field pub struct mood(()); + ///Marker type for the `when` field + pub struct when(()); ///Marker type for the `ref` field pub struct r#ref(()); } @@ -260,8 +260,8 @@ where impl MoodBuilder where St: mood_state::State, - St::When: mood_state::IsSet, St::Mood: mood_state::IsSet, + St::When: mood_state::IsSet, St::Ref: mood_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/computer_aesthetic/painting.rs b/crates/jacquard-api/src/computer_aesthetic/painting.rs index 02999ecbf..3e8880d8f 100644 --- a/crates/jacquard-api/src/computer_aesthetic/painting.rs +++ b/crates/jacquard-api/src/computer_aesthetic/painting.rs @@ -221,85 +221,85 @@ pub mod painting_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; + type When; + type ImageUrl; type Code; + type Ref; type Slug; - type ImageUrl; - type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; + type When = Unset; + type ImageUrl = Unset; type Code = Unset; + type Ref = Unset; type Slug = Unset; - type ImageUrl = Unset; - type When = Unset; } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type When = Set; + type ImageUrl = St::ImageUrl; type Code = St::Code; + type Ref = St::Ref; type Slug = St::Slug; - type ImageUrl = St::ImageUrl; + } + ///State transition - sets the `image_url` field to Set + pub struct SetImageUrl(PhantomData St>); + impl sealed::Sealed for SetImageUrl {} + impl State for SetImageUrl { type When = St::When; + type ImageUrl = Set; + type Code = St::Code; + type Ref = St::Ref; + type Slug = St::Slug; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData St>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type Ref = St::Ref; + type When = St::When; + type ImageUrl = St::ImageUrl; type Code = Set; + type Ref = St::Ref; type Slug = St::Slug; - type ImageUrl = St::ImageUrl; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { type When = St::When; + type ImageUrl = St::ImageUrl; + type Code = St::Code; + type Ref = Set; + type Slug = St::Slug; } ///State transition - sets the `slug` field to Set pub struct SetSlug(PhantomData St>); impl sealed::Sealed for SetSlug {} impl State for SetSlug { - type Ref = St::Ref; - type Code = St::Code; - type Slug = Set; - type ImageUrl = St::ImageUrl; type When = St::When; - } - ///State transition - sets the `image_url` field to Set - pub struct SetImageUrl(PhantomData St>); - impl sealed::Sealed for SetImageUrl {} - impl State for SetImageUrl { - type Ref = St::Ref; + type ImageUrl = St::ImageUrl; type Code = St::Code; - type Slug = St::Slug; - type ImageUrl = Set; - type When = St::When; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { type Ref = St::Ref; - type Code = St::Code; - type Slug = St::Slug; - type ImageUrl = St::ImageUrl; - type When = Set; + type Slug = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); + ///Marker type for the `when` field + pub struct when(()); + ///Marker type for the `image_url` field + pub struct image_url(()); ///Marker type for the `code` field pub struct code(()); + ///Marker type for the `ref` field + pub struct r#ref(()); ///Marker type for the `slug` field pub struct slug(()); - ///Marker type for the `image_url` field - pub struct image_url(()); - ///Marker type for the `when` field - pub struct when(()); } } @@ -460,11 +460,11 @@ where impl PaintingBuilder where St: painting_state::State, - St::Ref: painting_state::IsSet, + St::When: painting_state::IsSet, + St::ImageUrl: painting_state::IsSet, St::Code: painting_state::IsSet, + St::Ref: painting_state::IsSet, St::Slug: painting_state::IsSet, - St::ImageUrl: painting_state::IsSet, - St::When: painting_state::IsSet, { /// Build the final struct. pub fn build(self) -> Painting { diff --git a/crates/jacquard-api/src/computer_aesthetic/piece.rs b/crates/jacquard-api/src/computer_aesthetic/piece.rs index 7f9b221ff..edccf5580 100644 --- a/crates/jacquard-api/src/computer_aesthetic/piece.rs +++ b/crates/jacquard-api/src/computer_aesthetic/piece.rs @@ -138,51 +138,51 @@ pub mod piece_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type When; type Ref; type Slug; - type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type When = Unset; type Ref = Unset; type Slug = Unset; - type When = Unset; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type When = Set; + type Ref = St::Ref; + type Slug = St::Slug; } ///State transition - sets the `ref` field to Set pub struct SetRef(PhantomData St>); impl sealed::Sealed for SetRef {} impl State for SetRef { + type When = St::When; type Ref = Set; type Slug = St::Slug; - type When = St::When; } ///State transition - sets the `slug` field to Set pub struct SetSlug(PhantomData St>); impl sealed::Sealed for SetSlug {} impl State for SetSlug { - type Ref = St::Ref; - type Slug = Set; type When = St::When; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { type Ref = St::Ref; - type Slug = St::Slug; - type When = Set; + type Slug = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `when` field + pub struct when(()); ///Marker type for the `ref` field pub struct r#ref(()); ///Marker type for the `slug` field pub struct slug(()); - ///Marker type for the `when` field - pub struct when(()); } } @@ -271,9 +271,9 @@ where impl PieceBuilder where St: piece_state::State, + St::When: piece_state::IsSet, St::Ref: piece_state::IsSet, St::Slug: piece_state::IsSet, - St::When: piece_state::IsSet, { /// Build the final struct. pub fn build(self) -> Piece { diff --git a/crates/jacquard-api/src/computer_aesthetic/tape.rs b/crates/jacquard-api/src/computer_aesthetic/tape.rs index a41707636..d56e55f6a 100644 --- a/crates/jacquard-api/src/computer_aesthetic/tape.rs +++ b/crates/jacquard-api/src/computer_aesthetic/tape.rs @@ -209,51 +209,51 @@ pub mod tape_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type When; type Code; type Slug; - type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type When = Unset; type Code = Unset; type Slug = Unset; - type When = Unset; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type When = Set; + type Code = St::Code; + type Slug = St::Slug; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData St>); impl sealed::Sealed for SetCode {} impl State for SetCode { + type When = St::When; type Code = Set; type Slug = St::Slug; - type When = St::When; } ///State transition - sets the `slug` field to Set pub struct SetSlug(PhantomData St>); impl sealed::Sealed for SetSlug {} impl State for SetSlug { - type Code = St::Code; - type Slug = Set; type When = St::When; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { type Code = St::Code; - type Slug = St::Slug; - type When = Set; + type Slug = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `when` field + pub struct when(()); ///Marker type for the `code` field pub struct code(()); ///Marker type for the `slug` field pub struct slug(()); - ///Marker type for the `when` field - pub struct when(()); } } @@ -416,9 +416,9 @@ impl TapeBuilder { impl TapeBuilder where St: tape_state::State, + St::When: tape_state::IsSet, St::Code: tape_state::IsSet, St::Slug: tape_state::IsSet, - St::When: tape_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tape { diff --git a/crates/jacquard-api/src/coop_hypha/pollen/claim.rs b/crates/jacquard-api/src/coop_hypha/pollen/claim.rs index 8a50f21e9..774f4ebf3 100644 --- a/crates/jacquard-api/src/coop_hypha/pollen/claim.rs +++ b/crates/jacquard-api/src/coop_hypha/pollen/claim.rs @@ -123,67 +123,67 @@ pub mod claim_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type CreatedAt; - type Pfp; + type Cid; type Content; + type Pfp; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type CreatedAt = Unset; - type Pfp = Unset; + type Cid = Unset; type Content = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type CreatedAt = St::CreatedAt; - type Pfp = St::Pfp; - type Content = St::Content; + type Pfp = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Cid = St::Cid; type CreatedAt = Set; - type Pfp = St::Pfp; + type Cid = St::Cid; type Content = St::Content; + type Pfp = St::Pfp; } - ///State transition - sets the `pfp` field to Set - pub struct SetPfp(PhantomData St>); - impl sealed::Sealed for SetPfp {} - impl State for SetPfp { - type Cid = St::Cid; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type CreatedAt = St::CreatedAt; - type Pfp = Set; + type Cid = Set; type Content = St::Content; + type Pfp = St::Pfp; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Cid = St::Cid; type CreatedAt = St::CreatedAt; - type Pfp = St::Pfp; + type Cid = St::Cid; type Content = Set; + type Pfp = St::Pfp; + } + ///State transition - sets the `pfp` field to Set + pub struct SetPfp(PhantomData St>); + impl sealed::Sealed for SetPfp {} + impl State for SetPfp { + type CreatedAt = St::CreatedAt; + type Cid = St::Cid; + type Content = St::Content; + type Pfp = 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 `created_at` field pub struct created_at(()); - ///Marker type for the `pfp` field - pub struct pfp(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `pfp` field + pub struct pfp(()); } } @@ -310,10 +310,10 @@ impl ClaimBuilder { impl ClaimBuilder where St: claim_state::State, - St::Cid: claim_state::IsSet, St::CreatedAt: claim_state::IsSet, - St::Pfp: claim_state::IsSet, + St::Cid: claim_state::IsSet, St::Content: claim_state::IsSet, + St::Pfp: claim_state::IsSet, { /// Build the final struct. pub fn build(self) -> Claim { diff --git a/crates/jacquard-api/src/coop_hypha/spores/content/text.rs b/crates/jacquard-api/src/coop_hypha/spores/content/text.rs index ac7056aff..46cb1637b 100644 --- a/crates/jacquard-api/src/coop_hypha/spores/content/text.rs +++ b/crates/jacquard-api/src/coop_hypha/spores/content/text.rs @@ -249,37 +249,37 @@ pub mod text_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type CreatedAt; + type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Content = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type CreatedAt = St::CreatedAt; + type Content = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; type CreatedAt = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type CreatedAt = St::CreatedAt; + type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -375,8 +375,8 @@ impl TextBuilder { impl TextBuilder where St: text_state::State, - St::Content: text_state::IsSet, St::CreatedAt: text_state::IsSet, + St::Content: text_state::IsSet, { /// Build the final struct. pub fn build(self) -> Text { diff --git a/crates/jacquard-api/src/coop_hypha/spores/item/special_spore.rs b/crates/jacquard-api/src/coop_hypha/spores/item/special_spore.rs index 8122e82de..bf8e6d35e 100644 --- a/crates/jacquard-api/src/coop_hypha/spores/item/special_spore.rs +++ b/crates/jacquard-api/src/coop_hypha/spores/item/special_spore.rs @@ -114,37 +114,37 @@ pub mod special_spore_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -214,8 +214,8 @@ where impl SpecialSporeBuilder where St: special_spore_state::State, - St::Subject: special_spore_state::IsSet, St::CreatedAt: special_spore_state::IsSet, + St::Subject: special_spore_state::IsSet, { /// Build the final struct. pub fn build(self) -> SpecialSpore { diff --git a/crates/jacquard-api/src/coop_hypha/spores/social/flower.rs b/crates/jacquard-api/src/coop_hypha/spores/social/flower.rs index 942610658..b3d3e0bb4 100644 --- a/crates/jacquard-api/src/coop_hypha/spores/social/flower.rs +++ b/crates/jacquard-api/src/coop_hypha/spores/social/flower.rs @@ -114,37 +114,37 @@ pub mod flower_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -214,8 +214,8 @@ where impl FlowerBuilder where St: flower_state::State, - St::CreatedAt: flower_state::IsSet, St::Subject: flower_state::IsSet, + St::CreatedAt: flower_state::IsSet, { /// Build the final struct. pub fn build(self) -> Flower { diff --git a/crates/jacquard-api/src/dev_baileytownsend/demo/example.rs b/crates/jacquard-api/src/dev_baileytownsend/demo/example.rs index 80e55b040..4d70f50b1 100644 --- a/crates/jacquard-api/src/dev_baileytownsend/demo/example.rs +++ b/crates/jacquard-api/src/dev_baileytownsend/demo/example.rs @@ -148,37 +148,37 @@ pub mod example_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -248,8 +248,8 @@ where impl ExampleBuilder where St: example_state::State, - St::Name: example_state::IsSet, St::CreatedAt: example_state::IsSet, + St::Name: example_state::IsSet, { /// Build the final struct. pub fn build(self) -> Example { diff --git a/crates/jacquard-api/src/dev_baileytownsend/health/rings.rs b/crates/jacquard-api/src/dev_baileytownsend/health/rings.rs index b5e739849..762fdb615 100644 --- a/crates/jacquard-api/src/dev_baileytownsend/health/rings.rs +++ b/crates/jacquard-api/src/dev_baileytownsend/health/rings.rs @@ -123,127 +123,127 @@ pub mod rings_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Exercise; - type MoveGoal; type ExerciseGoal; type StandHours; type StandGoal; + type CreatedAt; type Move; + type MoveGoal; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Exercise = Unset; - type MoveGoal = Unset; type ExerciseGoal = Unset; type StandHours = Unset; type StandGoal = Unset; + type CreatedAt = Unset; type Move = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Exercise = St::Exercise; - type MoveGoal = St::MoveGoal; - type ExerciseGoal = St::ExerciseGoal; - type StandHours = St::StandHours; - type StandGoal = St::StandGoal; - type Move = St::Move; + type MoveGoal = Unset; } ///State transition - sets the `exercise` field to Set pub struct SetExercise(PhantomData St>); impl sealed::Sealed for SetExercise {} impl State for SetExercise { - type CreatedAt = St::CreatedAt; type Exercise = Set; - type MoveGoal = St::MoveGoal; type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = St::StandGoal; - type Move = St::Move; - } - ///State transition - sets the `move_goal` field to Set - pub struct SetMoveGoal(PhantomData St>); - impl sealed::Sealed for SetMoveGoal {} - impl State for SetMoveGoal { type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; - type MoveGoal = Set; - type ExerciseGoal = St::ExerciseGoal; - type StandHours = St::StandHours; - type StandGoal = St::StandGoal; type Move = St::Move; + type MoveGoal = St::MoveGoal; } ///State transition - sets the `exercise_goal` field to Set pub struct SetExerciseGoal(PhantomData St>); impl sealed::Sealed for SetExerciseGoal {} impl State for SetExerciseGoal { - type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; - type MoveGoal = St::MoveGoal; type ExerciseGoal = Set; type StandHours = St::StandHours; type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; type Move = St::Move; + type MoveGoal = St::MoveGoal; } ///State transition - sets the `stand_hours` field to Set pub struct SetStandHours(PhantomData St>); impl sealed::Sealed for SetStandHours {} impl State for SetStandHours { - type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; - type MoveGoal = St::MoveGoal; type ExerciseGoal = St::ExerciseGoal; type StandHours = Set; type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; type Move = St::Move; + type MoveGoal = St::MoveGoal; } ///State transition - sets the `stand_goal` field to Set pub struct SetStandGoal(PhantomData St>); impl sealed::Sealed for SetStandGoal {} impl State for SetStandGoal { - type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; - type MoveGoal = St::MoveGoal; type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = Set; + type CreatedAt = St::CreatedAt; + type Move = St::Move; + type MoveGoal = St::MoveGoal; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Exercise = St::Exercise; + type ExerciseGoal = St::ExerciseGoal; + type StandHours = St::StandHours; + type StandGoal = St::StandGoal; + type CreatedAt = Set; type Move = St::Move; + type MoveGoal = St::MoveGoal; } ///State transition - sets the `move` field to Set pub struct SetMove(PhantomData St>); impl sealed::Sealed for SetMove {} impl State for SetMove { - type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; - type MoveGoal = St::MoveGoal; type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; type Move = Set; + type MoveGoal = St::MoveGoal; + } + ///State transition - sets the `move_goal` field to Set + pub struct SetMoveGoal(PhantomData St>); + impl sealed::Sealed for SetMoveGoal {} + impl State for SetMoveGoal { + type Exercise = St::Exercise; + type ExerciseGoal = St::ExerciseGoal; + type StandHours = St::StandHours; + type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; + type Move = St::Move; + type MoveGoal = 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 `exercise` field pub struct exercise(()); - ///Marker type for the `move_goal` field - pub struct move_goal(()); ///Marker type for the `exercise_goal` field pub struct exercise_goal(()); ///Marker type for the `stand_hours` field pub struct stand_hours(()); ///Marker type for the `stand_goal` field pub struct stand_goal(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `move` field pub struct r#move(()); + ///Marker type for the `move_goal` field + pub struct move_goal(()); } } @@ -416,13 +416,13 @@ where impl RingsBuilder where St: rings_state::State, - St::CreatedAt: rings_state::IsSet, St::Exercise: rings_state::IsSet, - St::MoveGoal: rings_state::IsSet, St::ExerciseGoal: rings_state::IsSet, St::StandHours: rings_state::IsSet, St::StandGoal: rings_state::IsSet, + St::CreatedAt: rings_state::IsSet, St::Move: rings_state::IsSet, + St::MoveGoal: rings_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rings { diff --git a/crates/jacquard-api/src/dev_baileytownsend/health/steps.rs b/crates/jacquard-api/src/dev_baileytownsend/health/steps.rs index c2fc66678..e16b45fc1 100644 --- a/crates/jacquard-api/src/dev_baileytownsend/health/steps.rs +++ b/crates/jacquard-api/src/dev_baileytownsend/health/steps.rs @@ -111,37 +111,37 @@ pub mod steps_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Steps; type CreatedAt; + type Steps; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Steps = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `steps` field to Set - pub struct SetSteps(PhantomData St>); - impl sealed::Sealed for SetSteps {} - impl State for SetSteps { - type Steps = Set; - type CreatedAt = St::CreatedAt; + type Steps = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Steps = St::Steps; type CreatedAt = Set; + type Steps = St::Steps; + } + ///State transition - sets the `steps` field to Set + pub struct SetSteps(PhantomData St>); + impl sealed::Sealed for SetSteps {} + impl State for SetSteps { + type CreatedAt = St::CreatedAt; + type Steps = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `steps` field - pub struct steps(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `steps` field + pub struct steps(()); } } @@ -211,8 +211,8 @@ where impl StepsBuilder where St: steps_state::State, - St::Steps: steps_state::IsSet, St::CreatedAt: steps_state::IsSet, + St::Steps: steps_state::IsSet, { /// Build the final struct. pub fn build(self) -> Steps { diff --git a/crates/jacquard-api/src/dev_baileytownsend/health/workout.rs b/crates/jacquard-api/src/dev_baileytownsend/health/workout.rs index 70382a533..903f2a591 100644 --- a/crates/jacquard-api/src/dev_baileytownsend/health/workout.rs +++ b/crates/jacquard-api/src/dev_baileytownsend/health/workout.rs @@ -121,105 +121,105 @@ pub mod workout_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Duration; type Activity; + type EndTime; + type Duration; type StartTime; type CreatedAt; type CaloriesBurned; - type EndTime; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Duration = Unset; type Activity = Unset; + type EndTime = Unset; + type Duration = Unset; type StartTime = Unset; type CreatedAt = Unset; type CaloriesBurned = Unset; - type EndTime = Unset; - } - ///State transition - sets the `duration` field to Set - pub struct SetDuration(PhantomData St>); - impl sealed::Sealed for SetDuration {} - impl State for SetDuration { - type Duration = Set; - type Activity = St::Activity; - type StartTime = St::StartTime; - type CreatedAt = St::CreatedAt; - type CaloriesBurned = St::CaloriesBurned; - type EndTime = St::EndTime; } ///State transition - sets the `activity` field to Set pub struct SetActivity(PhantomData St>); impl sealed::Sealed for SetActivity {} impl State for SetActivity { - type Duration = St::Duration; type Activity = Set; + type EndTime = St::EndTime; + type Duration = St::Duration; type StartTime = St::StartTime; type CreatedAt = St::CreatedAt; type CaloriesBurned = St::CaloriesBurned; + } + ///State transition - sets the `end_time` field to Set + pub struct SetEndTime(PhantomData St>); + impl sealed::Sealed for SetEndTime {} + impl State for SetEndTime { + type Activity = St::Activity; + type EndTime = Set; + type Duration = St::Duration; + type StartTime = St::StartTime; + type CreatedAt = St::CreatedAt; + type CaloriesBurned = St::CaloriesBurned; + } + ///State transition - sets the `duration` field to Set + pub struct SetDuration(PhantomData St>); + impl sealed::Sealed for SetDuration {} + impl State for SetDuration { + type Activity = St::Activity; type EndTime = St::EndTime; + type Duration = Set; + type StartTime = St::StartTime; + type CreatedAt = St::CreatedAt; + type CaloriesBurned = St::CaloriesBurned; } ///State transition - sets the `start_time` field to Set pub struct SetStartTime(PhantomData St>); impl sealed::Sealed for SetStartTime {} impl State for SetStartTime { - type Duration = St::Duration; type Activity = St::Activity; + type EndTime = St::EndTime; + type Duration = St::Duration; type StartTime = Set; type CreatedAt = St::CreatedAt; type CaloriesBurned = St::CaloriesBurned; - type EndTime = St::EndTime; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Duration = St::Duration; type Activity = St::Activity; + type EndTime = St::EndTime; + type Duration = St::Duration; type StartTime = St::StartTime; type CreatedAt = Set; type CaloriesBurned = St::CaloriesBurned; - type EndTime = St::EndTime; } ///State transition - sets the `calories_burned` field to Set pub struct SetCaloriesBurned(PhantomData St>); impl sealed::Sealed for SetCaloriesBurned {} impl State for SetCaloriesBurned { - type Duration = St::Duration; type Activity = St::Activity; - type StartTime = St::StartTime; - type CreatedAt = St::CreatedAt; - type CaloriesBurned = Set; type EndTime = St::EndTime; - } - ///State transition - sets the `end_time` field to Set - pub struct SetEndTime(PhantomData St>); - impl sealed::Sealed for SetEndTime {} - impl State for SetEndTime { type Duration = St::Duration; - type Activity = St::Activity; type StartTime = St::StartTime; type CreatedAt = St::CreatedAt; - type CaloriesBurned = St::CaloriesBurned; - type EndTime = Set; + type CaloriesBurned = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `duration` field - pub struct duration(()); ///Marker type for the `activity` field pub struct activity(()); + ///Marker type for the `end_time` field + pub struct end_time(()); + ///Marker type for the `duration` field + pub struct duration(()); ///Marker type for the `start_time` field pub struct start_time(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `calories_burned` field pub struct calories_burned(()); - ///Marker type for the `end_time` field - pub struct end_time(()); } } @@ -386,12 +386,12 @@ where impl WorkoutBuilder where St: workout_state::State, - St::Duration: workout_state::IsSet, St::Activity: workout_state::IsSet, + St::EndTime: workout_state::IsSet, + St::Duration: workout_state::IsSet, St::StartTime: workout_state::IsSet, St::CreatedAt: workout_state::IsSet, St::CaloriesBurned: workout_state::IsSet, - St::EndTime: workout_state::IsSet, { /// Build the final struct. pub fn build(self) -> Workout { diff --git a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs index 418ca6308..958f88188 100644 --- a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs +++ b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/post.rs @@ -176,105 +176,105 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Tags; + type Category; type Content; type Title; type Forum; - type Category; + type Tags; + 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 Tags = Unset; + type Category = Unset; type Content = Unset; type Title = Unset; type Forum = Unset; - type Category = Unset; + type Tags = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Tags = St::Tags; + ///State transition - sets the `category` field to Set + pub struct SetCategory(PhantomData St>); + impl sealed::Sealed for SetCategory {} + impl State for SetCategory { + type Category = Set; type Content = St::Content; type Title = St::Title; type Forum = St::Forum; - type Category = St::Category; - } - ///State transition - sets the `tags` field to Set - pub struct SetTags(PhantomData St>); - impl sealed::Sealed for SetTags {} - impl State for SetTags { + type Tags = St::Tags; type CreatedAt = St::CreatedAt; - type Tags = Set; - type Content = St::Content; - type Title = St::Title; - type Forum = St::Forum; - type Category = St::Category; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; + type Category = St::Category; type Content = Set; type Title = St::Title; type Forum = St::Forum; - type Category = St::Category; + type Tags = St::Tags; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; + type Category = St::Category; type Content = St::Content; type Title = Set; type Forum = St::Forum; - type Category = St::Category; + type Tags = St::Tags; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `forum` field to Set pub struct SetForum(PhantomData St>); impl sealed::Sealed for SetForum {} impl State for SetForum { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; + type Category = St::Category; type Content = St::Content; type Title = St::Title; type Forum = Set; - type Category = St::Category; + type Tags = St::Tags; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `category` field to Set - pub struct SetCategory(PhantomData St>); - impl sealed::Sealed for SetCategory {} - impl State for SetCategory { + ///State transition - sets the `tags` field to Set + pub struct SetTags(PhantomData St>); + impl sealed::Sealed for SetTags {} + impl State for SetTags { + type Category = St::Category; + type Content = St::Content; + type Title = St::Title; + type Forum = St::Forum; + type Tags = Set; type CreatedAt = St::CreatedAt; - type Tags = St::Tags; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Category = St::Category; type Content = St::Content; type Title = St::Title; type Forum = St::Forum; - type Category = Set; + type Tags = St::Tags; + 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 `tags` field - pub struct tags(()); + ///Marker type for the `category` field + pub struct category(()); ///Marker type for the `content` field pub struct content(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `forum` field pub struct forum(()); - ///Marker type for the `category` field - pub struct category(()); + ///Marker type for the `tags` field + pub struct tags(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -455,12 +455,12 @@ impl PostBuilder { impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, - St::Tags: post_state::IsSet, + St::Category: post_state::IsSet, St::Content: post_state::IsSet, St::Title: post_state::IsSet, St::Forum: post_state::IsSet, - St::Category: post_state::IsSet, + St::Tags: post_state::IsSet, + St::CreatedAt: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/question.rs b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/question.rs index 8564f8ef7..f978909ae 100644 --- a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/question.rs +++ b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/question.rs @@ -174,103 +174,103 @@ pub mod question_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Tags; - type Title; type Forum; type IsOpen; type Content; + type Tags; + type Title; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Tags = Unset; - type Title = Unset; type Forum = Unset; type IsOpen = Unset; type Content = Unset; + type Tags = Unset; + type Title = Unset; type CreatedAt = Unset; } - ///State transition - sets the `tags` field to Set - pub struct SetTags(PhantomData St>); - impl sealed::Sealed for SetTags {} - impl State for SetTags { - type Tags = Set; - type Title = St::Title; - type Forum = St::Forum; - type IsOpen = St::IsOpen; - type Content = St::Content; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Tags = St::Tags; - type Title = Set; - type Forum = St::Forum; - type IsOpen = St::IsOpen; - type Content = St::Content; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `forum` field to Set pub struct SetForum(PhantomData St>); impl sealed::Sealed for SetForum {} impl State for SetForum { - type Tags = St::Tags; - type Title = St::Title; type Forum = Set; type IsOpen = St::IsOpen; type Content = St::Content; + type Tags = St::Tags; + type Title = St::Title; type CreatedAt = St::CreatedAt; } ///State transition - sets the `is_open` field to Set pub struct SetIsOpen(PhantomData St>); impl sealed::Sealed for SetIsOpen {} impl State for SetIsOpen { - type Tags = St::Tags; - type Title = St::Title; type Forum = St::Forum; type IsOpen = Set; type Content = St::Content; + type Tags = St::Tags; + type Title = St::Title; type CreatedAt = St::CreatedAt; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { + type Forum = St::Forum; + type IsOpen = St::IsOpen; + type Content = Set; type Tags = St::Tags; type Title = St::Title; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `tags` field to Set + pub struct SetTags(PhantomData St>); + impl sealed::Sealed for SetTags {} + impl State for SetTags { type Forum = St::Forum; type IsOpen = St::IsOpen; - type Content = Set; + type Content = St::Content; + type Tags = Set; + type Title = St::Title; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Forum = St::Forum; + type IsOpen = St::IsOpen; + type Content = St::Content; + type Tags = St::Tags; + type Title = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Tags = St::Tags; - type Title = St::Title; type Forum = St::Forum; type IsOpen = St::IsOpen; type Content = St::Content; + type Tags = St::Tags; + type Title = St::Title; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `tags` field - pub struct tags(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `forum` field pub struct forum(()); ///Marker type for the `is_open` field pub struct is_open(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `tags` field + pub struct tags(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -439,11 +439,11 @@ impl QuestionBuilder { impl QuestionBuilder where St: question_state::State, - St::Tags: question_state::IsSet, - St::Title: question_state::IsSet, St::Forum: question_state::IsSet, St::IsOpen: question_state::IsSet, St::Content: question_state::IsSet, + St::Tags: question_state::IsSet, + St::Title: question_state::IsSet, St::CreatedAt: question_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs index f847ffd16..7443a4414 100644 --- a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs +++ b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/feed/reply.rs @@ -126,51 +126,51 @@ pub mod reply_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Root; type CreatedAt; + type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Content = Unset; type Root = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Root = St::Root; - type CreatedAt = St::CreatedAt; + type Content = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData St>); impl sealed::Sealed for SetRoot {} impl State for SetRoot { - type Content = St::Content; type Root = Set; type CreatedAt = St::CreatedAt; + type Content = St::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; type Root = St::Root; type CreatedAt = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Root = St::Root; + type CreatedAt = St::CreatedAt; + type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `root` field pub struct root(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -272,9 +272,9 @@ impl ReplyBuilder { impl ReplyBuilder where St: reply_state::State, - St::Content: reply_state::IsSet, St::Root: reply_state::IsSet, St::CreatedAt: reply_state::IsSet, + St::Content: reply_state::IsSet, { /// Build the final struct. pub fn build(self) -> Reply { diff --git a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs index 8e3745a94..7caba56e6 100644 --- a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs +++ b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/announcement.rs @@ -159,66 +159,66 @@ pub mod announcement_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; + type Title; type ExpiresAt; type Body; - type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; + type Title = Unset; type ExpiresAt = Unset; type Body = Unset; - type Title = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; + type Title = St::Title; + type ExpiresAt = St::ExpiresAt; + type Body = St::Body; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + type Title = Set; type ExpiresAt = St::ExpiresAt; type Body = St::Body; - type Title = St::Title; } ///State transition - sets the `expires_at` field to Set pub struct SetExpiresAt(PhantomData St>); impl sealed::Sealed for SetExpiresAt {} impl State for SetExpiresAt { type CreatedAt = St::CreatedAt; + type Title = St::Title; type ExpiresAt = Set; type Body = St::Body; - type Title = St::Title; } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData St>); impl sealed::Sealed for SetBody {} impl State for SetBody { type CreatedAt = St::CreatedAt; - type ExpiresAt = St::ExpiresAt; - type Body = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type CreatedAt = St::CreatedAt; type ExpiresAt = St::ExpiresAt; - type Body = St::Body; - type Title = Set; + type Body = 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 `title` field + pub struct title(()); ///Marker type for the `expires_at` field pub struct expires_at(()); ///Marker type for the `body` field pub struct body(()); - ///Marker type for the `title` field - pub struct title(()); } } @@ -327,9 +327,9 @@ impl AnnouncementBuilder where St: announcement_state::State, St::CreatedAt: announcement_state::IsSet, + St::Title: announcement_state::IsSet, St::ExpiresAt: announcement_state::IsSet, St::Body: announcement_state::IsSet, - St::Title: announcement_state::IsSet, { /// Build the final struct. pub fn build(self) -> Announcement { diff --git a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs index 4f5d01ebc..b14ce0c03 100644 --- a/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs +++ b/crates/jacquard-api/src/dev_fudgeu/experimental/atforumv1/forum/category.rs @@ -158,51 +158,51 @@ pub mod category_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CategoryType; - type Group; type Name; + type Group; + type CategoryType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CategoryType = Unset; - type Group = Unset; type Name = Unset; + type Group = Unset; + type CategoryType = Unset; } - ///State transition - sets the `category_type` field to Set - pub struct SetCategoryType(PhantomData St>); - impl sealed::Sealed for SetCategoryType {} - impl State for SetCategoryType { - type CategoryType = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Group = St::Group; - type Name = St::Name; + type CategoryType = St::CategoryType; } ///State transition - sets the `group` field to Set pub struct SetGroup(PhantomData St>); impl sealed::Sealed for SetGroup {} impl State for SetGroup { - type CategoryType = St::CategoryType; - type Group = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Group = Set; type CategoryType = St::CategoryType; + } + ///State transition - sets the `category_type` field to Set + pub struct SetCategoryType(PhantomData St>); + impl sealed::Sealed for SetCategoryType {} + impl State for SetCategoryType { + type Name = St::Name; type Group = St::Group; - type Name = Set; + type CategoryType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `category_type` field - pub struct category_type(()); - ///Marker type for the `group` field - pub struct group(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `group` field + pub struct group(()); + ///Marker type for the `category_type` field + pub struct category_type(()); } } @@ -304,9 +304,9 @@ where impl CategoryBuilder where St: category_state::State, - St::CategoryType: category_state::IsSet, - St::Group: category_state::IsSet, St::Name: category_state::IsSet, + St::Group: category_state::IsSet, + St::CategoryType: category_state::IsSet, { /// Build the final struct. pub fn build(self) -> Category { diff --git a/crates/jacquard-api/src/dev_kanad/lexicon_test_2026_02_26/example_cat_lexicon.rs b/crates/jacquard-api/src/dev_kanad/lexicon_test_2026_02_26/example_cat_lexicon.rs index 05e7aa353..379c217f5 100644 --- a/crates/jacquard-api/src/dev_kanad/lexicon_test_2026_02_26/example_cat_lexicon.rs +++ b/crates/jacquard-api/src/dev_kanad/lexicon_test_2026_02_26/example_cat_lexicon.rs @@ -192,37 +192,37 @@ pub mod example_cat_lexicon_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Name = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + 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 `created_at` field + pub struct created_at(()); } } @@ -305,8 +305,8 @@ where impl ExampleCatLexiconBuilder where St: example_cat_lexicon_state::State, - St::CreatedAt: example_cat_lexicon_state::IsSet, St::Name: example_cat_lexicon_state::IsSet, + St::CreatedAt: example_cat_lexicon_state::IsSet, { /// Build the final struct. pub fn build(self) -> ExampleCatLexicon { diff --git a/crates/jacquard-api/src/dev_keytrace.rs b/crates/jacquard-api/src/dev_keytrace.rs new file mode 100644 index 000000000..8ec7b01d5 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace.rs @@ -0,0 +1,11 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod claim; +pub mod profile; +pub mod server_public_key; +pub mod signature; +pub mod statement; +pub mod user_public_key; \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/claim.rs b/crates/jacquard-api/src/dev_keytrace/claim.rs new file mode 100644 index 000000000..dfcc42a47 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/claim.rs @@ -0,0 +1,1000 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.claim +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime, UriValue}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +use crate::dev_keytrace::signature::Signature; +use crate::dev_keytrace::claim; +/// Generic identity data for the claimed account + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct Identity { + ///Avatar/profile image URL + #[serde(skip_serializing_if = "Option::is_none")] + pub avatar_url: Option>, + ///Display name if different from subject + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + ///Profile page URL + #[serde(skip_serializing_if = "Option::is_none")] + pub profile_url: Option>, + ///Primary identifier (username, domain, handle, etc.) + pub subject: S, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// An identity claim linking this DID to an external account + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "dev.keytrace.claim", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Claim { + ///The identity claim URI (e.g., for github: https://gist.github.com/username/id, dns:example.com) + pub claim_uri: S, + ///Optional user-provided label for this claim + #[serde(skip_serializing_if = "Option::is_none")] + pub comment: Option, + ///Datetime when this claim was created (ISO 8601). + pub created_at: Datetime, + ///Timestamp when the claim last failed re-verification or was retracted + #[serde(skip_serializing_if = "Option::is_none")] + pub failed_at: Option, + ///Structured data about the claimed identity, derived from the claimUri and knowledge inside the verification process. This is not the raw claim data, but a normalized set of fields that can be used for display and more. + pub identity: claim::Identity, + ///Timestamp of the most recent successful re-verification by the system + #[serde(skip_serializing_if = "Option::is_none")] + pub last_verified_at: Option, + ///Random one-time value embedded in the challenge text posted to the external service. Used by verifiers to confirm the proof was created specifically for this claim session. Keytrace itself does not use this, but other services making claims may require it for their verification process. + #[serde(skip_serializing_if = "Option::is_none")] + pub nonce: Option, + ///Whether this claim was created during the prerelease/alpha period + #[serde(skip_serializing_if = "Option::is_none")] + pub prerelease: Option, + ///Datetime when this claim was retracted. Present only if the claim has been retracted (ISO 8601). + #[serde(skip_serializing_if = "Option::is_none")] + pub retracted_at: Option, + ///Cryptographic attestation signatures from verification services, for example from @keytrace.dev. These are optional, and so you can pass an empty array. Keytrace will place its attestation signature in the claim here so that the library @keytrace/claims can be used by external developers to not have to implement their own verification logic. + pub sigs: Vec>, + ///Current verification status of this claim. Absent on legacy records, treated as 'verified'. + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option>, + ///The claim type identifier + pub r#type: ClaimType, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Current verification status of this claim. Absent on legacy records, treated as 'verified'. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ClaimStatus { + Verified, + Failed, + Retracted, + Other(S), +} + +impl ClaimStatus { + pub fn as_str(&self) -> &str { + match self { + Self::Verified => "verified", + Self::Failed => "failed", + Self::Retracted => "retracted", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "verified" => Self::Verified, + "failed" => Self::Failed, + "retracted" => Self::Retracted, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ClaimStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ClaimStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ClaimStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ClaimStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ClaimStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ClaimStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ClaimStatus; + fn into_static(self) -> Self::Output { + match self { + ClaimStatus::Verified => ClaimStatus::Verified, + ClaimStatus::Failed => ClaimStatus::Failed, + ClaimStatus::Retracted => ClaimStatus::Retracted, + ClaimStatus::Other(v) => ClaimStatus::Other(v.into_static()), + } + } +} + +/// The claim type identifier + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ClaimType { + Github, + Dns, + Activitypub, + Bsky, + Npm, + Tangled, + Pgp, + Twitter, + Linkedin, + Instagram, + Reddit, + Hackernews, + Other(S), +} + +impl ClaimType { + pub fn as_str(&self) -> &str { + match self { + Self::Github => "github", + Self::Dns => "dns", + Self::Activitypub => "activitypub", + Self::Bsky => "bsky", + Self::Npm => "npm", + Self::Tangled => "tangled", + Self::Pgp => "pgp", + Self::Twitter => "twitter", + Self::Linkedin => "linkedin", + Self::Instagram => "instagram", + Self::Reddit => "reddit", + Self::Hackernews => "hackernews", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "github" => Self::Github, + "dns" => Self::Dns, + "activitypub" => Self::Activitypub, + "bsky" => Self::Bsky, + "npm" => Self::Npm, + "tangled" => Self::Tangled, + "pgp" => Self::Pgp, + "twitter" => Self::Twitter, + "linkedin" => Self::Linkedin, + "instagram" => Self::Instagram, + "reddit" => Self::Reddit, + "hackernews" => Self::Hackernews, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ClaimType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ClaimType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ClaimType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ClaimType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ClaimType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ClaimType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ClaimType; + fn into_static(self) -> Self::Output { + match self { + ClaimType::Github => ClaimType::Github, + ClaimType::Dns => ClaimType::Dns, + ClaimType::Activitypub => ClaimType::Activitypub, + ClaimType::Bsky => ClaimType::Bsky, + ClaimType::Npm => ClaimType::Npm, + ClaimType::Tangled => ClaimType::Tangled, + ClaimType::Pgp => ClaimType::Pgp, + ClaimType::Twitter => ClaimType::Twitter, + ClaimType::Linkedin => ClaimType::Linkedin, + ClaimType::Instagram => ClaimType::Instagram, + ClaimType::Reddit => ClaimType::Reddit, + ClaimType::Hackernews => ClaimType::Hackernews, + ClaimType::Other(v) => ClaimType::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ClaimGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Claim, +} + +impl Claim { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +impl LexiconSchema for Identity { + fn nsid() -> &'static str { + "dev.keytrace.claim" + } + fn def_name() -> &'static str { + "identity" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_claim() + } + fn validate(&self) -> Result<(), ConstraintError> { + Ok(()) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ClaimRecord; +impl XrpcResp for ClaimRecord { + const NSID: &'static str = "dev.keytrace.claim"; + const ENCODING: &'static str = "application/json"; + type Output = ClaimGetRecordOutput; + type Err = RecordError; +} + +impl From> for Claim { + fn from(output: ClaimGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Claim { + const NSID: &'static str = "dev.keytrace.claim"; + type Record = ClaimRecord; +} + +impl Collection for ClaimRecord { + const NSID: &'static str = "dev.keytrace.claim"; + type Record = ClaimRecord; +} + +impl LexiconSchema for Claim { + fn nsid() -> &'static str { + "dev.keytrace.claim" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_claim() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.comment { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 256usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("comment"), + max: 256usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.nonce { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 128usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("nonce"), + max: 128usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +fn lexicon_doc_dev_keytrace_claim() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.claim"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("identity"), + LexUserType::Object(LexObject { + description: Some( + CowStr::new_static( + "Generic identity data for the claimed account", + ), + ), + required: Some(vec![SmolStr::new_static("subject")]), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("avatarUrl"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Avatar/profile image URL"), + ), + format: Some(LexStringFormat::Uri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("displayName"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Display name if different from subject"), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("profileUrl"), + LexObjectProperty::String(LexString { + description: Some(CowStr::new_static("Profile page URL")), + format: Some(LexStringFormat::Uri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("subject"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Primary identifier (username, domain, handle, etc.)", + ), + ), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "An identity claim linking this DID to an external account", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("type"), + SmolStr::new_static("claimUri"), + SmolStr::new_static("identity"), + SmolStr::new_static("sigs"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("claimUri"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The identity claim URI (e.g., for github: https://gist.github.com/username/id, dns:example.com)", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("comment"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Optional user-provided label for this claim", + ), + ), + max_length: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this claim was created (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("failedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Timestamp when the claim last failed re-verification or was retracted", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("identity"), + LexObjectProperty::Ref(LexRef { + r#ref: CowStr::new_static("#identity"), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("lastVerifiedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Timestamp of the most recent successful re-verification by the system", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("nonce"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Random one-time value embedded in the challenge text posted to the external service. Used by verifiers to confirm the proof was created specifically for this claim session. Keytrace itself does not use this, but other services making claims may require it for their verification process.", + ), + ), + max_graphemes: Some(128usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("prerelease"), + LexObjectProperty::Boolean(LexBoolean { + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("retractedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this claim was retracted. Present only if the claim has been retracted (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sigs"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "Cryptographic attestation signatures from verification services, for example from @keytrace.dev. These are optional, and so you can pass an empty array. Keytrace will place its attestation signature in the claim here so that the library @keytrace/claims can be used by external developers to not have to implement their own verification logic.", + ), + ), + items: LexArrayItem::Ref(LexRef { + r#ref: CowStr::new_static("dev.keytrace.signature#main"), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("status"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Current verification status of this claim. Absent on legacy records, treated as 'verified'.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("type"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The claim type identifier"), + ), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} + +pub mod claim_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 Type; + type ClaimUri; + type Sigs; + type CreatedAt; + type Identity; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Type = Unset; + type ClaimUri = Unset; + type Sigs = Unset; + type CreatedAt = Unset; + type Identity = Unset; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Type = Set; + type ClaimUri = St::ClaimUri; + type Sigs = St::Sigs; + type CreatedAt = St::CreatedAt; + type Identity = St::Identity; + } + ///State transition - sets the `claim_uri` field to Set + pub struct SetClaimUri(PhantomData St>); + impl sealed::Sealed for SetClaimUri {} + impl State for SetClaimUri { + type Type = St::Type; + type ClaimUri = Set; + type Sigs = St::Sigs; + type CreatedAt = St::CreatedAt; + type Identity = St::Identity; + } + ///State transition - sets the `sigs` field to Set + pub struct SetSigs(PhantomData St>); + impl sealed::Sealed for SetSigs {} + impl State for SetSigs { + type Type = St::Type; + type ClaimUri = St::ClaimUri; + type Sigs = Set; + type CreatedAt = St::CreatedAt; + type Identity = St::Identity; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Type = St::Type; + type ClaimUri = St::ClaimUri; + type Sigs = St::Sigs; + type CreatedAt = Set; + type Identity = St::Identity; + } + ///State transition - sets the `identity` field to Set + pub struct SetIdentity(PhantomData St>); + impl sealed::Sealed for SetIdentity {} + impl State for SetIdentity { + type Type = St::Type; + type ClaimUri = St::ClaimUri; + type Sigs = St::Sigs; + type CreatedAt = St::CreatedAt; + type Identity = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `type` field + pub struct r#type(()); + ///Marker type for the `claim_uri` field + pub struct claim_uri(()); + ///Marker type for the `sigs` field + pub struct sigs(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `identity` field + pub struct identity(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ClaimBuilder { + _state: PhantomData St>, + _fields: ( + Option, + Option, + Option, + Option, + Option>, + Option, + Option, + Option, + Option, + Option>>, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Claim { + /// Create a new builder for this type. + pub fn new() -> ClaimBuilder { + ClaimBuilder::new() + } +} + +impl ClaimBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ClaimBuilder { + _state: PhantomData, + _fields: ( + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + ), + _type: PhantomData, + } + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::ClaimUri: claim_state::IsUnset, +{ + /// Set the `claimUri` field (required) + pub fn claim_uri( + mut self, + value: impl Into, + ) -> ClaimBuilder> { + self._fields.0 = Option::Some(value.into()); + ClaimBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ClaimBuilder { + /// Set the `comment` field (optional) + pub fn comment(mut self, value: impl Into>) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `comment` field to an Option value (optional) + pub fn maybe_comment(mut self, value: Option) -> Self { + self._fields.1 = value; + self + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::CreatedAt: claim_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> ClaimBuilder> { + self._fields.2 = Option::Some(value.into()); + ClaimBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ClaimBuilder { + /// Set the `failedAt` field (optional) + pub fn failed_at(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `failedAt` field to an Option value (optional) + pub fn maybe_failed_at(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::Identity: claim_state::IsUnset, +{ + /// Set the `identity` field (required) + pub fn identity( + mut self, + value: impl Into>, + ) -> ClaimBuilder> { + self._fields.4 = Option::Some(value.into()); + ClaimBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ClaimBuilder { + /// Set the `lastVerifiedAt` field (optional) + pub fn last_verified_at(mut self, value: impl Into>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `lastVerifiedAt` field to an Option value (optional) + pub fn maybe_last_verified_at(mut self, value: Option) -> Self { + self._fields.5 = value; + self + } +} + +impl ClaimBuilder { + /// Set the `nonce` field (optional) + pub fn nonce(mut self, value: impl Into>) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `nonce` field to an Option value (optional) + pub fn maybe_nonce(mut self, value: Option) -> Self { + self._fields.6 = value; + self + } +} + +impl ClaimBuilder { + /// Set the `prerelease` field (optional) + pub fn prerelease(mut self, value: impl Into>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `prerelease` field to an Option value (optional) + pub fn maybe_prerelease(mut self, value: Option) -> Self { + self._fields.7 = value; + self + } +} + +impl ClaimBuilder { + /// Set the `retractedAt` field (optional) + pub fn retracted_at(mut self, value: impl Into>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `retractedAt` field to an Option value (optional) + pub fn maybe_retracted_at(mut self, value: Option) -> Self { + self._fields.8 = value; + self + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::Sigs: claim_state::IsUnset, +{ + /// Set the `sigs` field (required) + pub fn sigs( + mut self, + value: impl Into>>, + ) -> ClaimBuilder> { + self._fields.9 = Option::Some(value.into()); + ClaimBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ClaimBuilder { + /// Set the `status` field (optional) + pub fn status(mut self, value: impl Into>>) -> Self { + self._fields.10 = value.into(); + self + } + /// Set the `status` field to an Option value (optional) + pub fn maybe_status(mut self, value: Option>) -> Self { + self._fields.10 = value; + self + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::Type: claim_state::IsUnset, +{ + /// Set the `type` field (required) + pub fn r#type( + mut self, + value: impl Into>, + ) -> ClaimBuilder> { + self._fields.11 = Option::Some(value.into()); + ClaimBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ClaimBuilder +where + St: claim_state::State, + St::Type: claim_state::IsSet, + St::ClaimUri: claim_state::IsSet, + St::Sigs: claim_state::IsSet, + St::CreatedAt: claim_state::IsSet, + St::Identity: claim_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Claim { + Claim { + claim_uri: self._fields.0.unwrap(), + comment: self._fields.1, + created_at: self._fields.2.unwrap(), + failed_at: self._fields.3, + identity: self._fields.4.unwrap(), + last_verified_at: self._fields.5, + nonce: self._fields.6, + prerelease: self._fields.7, + retracted_at: self._fields.8, + sigs: self._fields.9.unwrap(), + status: self._fields.10, + r#type: self._fields.11.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Claim { + Claim { + claim_uri: self._fields.0.unwrap(), + comment: self._fields.1, + created_at: self._fields.2.unwrap(), + failed_at: self._fields.3, + identity: self._fields.4.unwrap(), + last_verified_at: self._fields.5, + nonce: self._fields.6, + prerelease: self._fields.7, + retracted_at: self._fields.8, + sigs: self._fields.9.unwrap(), + status: self._fields.10, + r#type: self._fields.11.unwrap(), + extra_data: Some(extra_data), + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/profile.rs b/crates/jacquard-api/src/dev_keytrace/profile.rs new file mode 100644 index 000000000..67d3cfb17 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/profile.rs @@ -0,0 +1,307 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.profile +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// Keytrace profile settings. Singleton record stored in the user's ATProto repo. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "dev.keytrace.profile", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Profile { + ///Bio or description shown on the keytrace profile page. + #[serde(skip_serializing_if = "Option::is_none")] + pub bio: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub created_at: Option, + ///Display name override for the keytrace profile. Falls back to Bluesky display name if absent. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ProfileGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Profile, +} + +impl Profile { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ProfileRecord; +impl XrpcResp for ProfileRecord { + const NSID: &'static str = "dev.keytrace.profile"; + const ENCODING: &'static str = "application/json"; + type Output = ProfileGetRecordOutput; + type Err = RecordError; +} + +impl From> for Profile { + fn from(output: ProfileGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Profile { + const NSID: &'static str = "dev.keytrace.profile"; + type Record = ProfileRecord; +} + +impl Collection for ProfileRecord { + const NSID: &'static str = "dev.keytrace.profile"; + type Record = ProfileRecord; +} + +impl LexiconSchema for Profile { + fn nsid() -> &'static str { + "dev.keytrace.profile" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_profile() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.bio { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("bio"), + max: 1024usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.display_name { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 128usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("display_name"), + max: 128usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod profile_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 {} + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty {} + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members {} +} + +/// Builder for constructing an instance of this type. +pub struct ProfileBuilder { + _state: PhantomData St>, + _fields: (Option, Option, Option), + _type: PhantomData S>, +} + +impl Profile { + /// Create a new builder for this type. + pub fn new() -> ProfileBuilder { + ProfileBuilder::new() + } +} + +impl ProfileBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ProfileBuilder { + _state: PhantomData, + _fields: (None, None, None), + _type: PhantomData, + } + } +} + +impl ProfileBuilder { + /// Set the `bio` field (optional) + pub fn bio(mut self, value: impl Into>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `bio` field to an Option value (optional) + pub fn maybe_bio(mut self, value: Option) -> Self { + self._fields.0 = value; + self + } +} + +impl ProfileBuilder { + /// Set the `createdAt` field (optional) + pub fn created_at(mut self, value: impl Into>) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `createdAt` field to an Option value (optional) + pub fn maybe_created_at(mut self, value: Option) -> Self { + self._fields.1 = value; + self + } +} + +impl ProfileBuilder { + /// Set the `displayName` field (optional) + pub fn display_name(mut self, value: impl Into>) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `displayName` field to an Option value (optional) + pub fn maybe_display_name(mut self, value: Option) -> Self { + self._fields.2 = value; + self + } +} + +impl ProfileBuilder +where + St: profile_state::State, +{ + /// Build the final struct. + pub fn build(self) -> Profile { + Profile { + bio: self._fields.0, + created_at: self._fields.1, + display_name: self._fields.2, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Profile { + Profile { + bio: self._fields.0, + created_at: self._fields.1, + display_name: self._fields.2, + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_dev_keytrace_profile() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.profile"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "Keytrace profile settings. Singleton record stored in the user's ATProto repo.", + ), + ), + key: Some(CowStr::new_static("literal:self")), + record: LexRecordRecord::Object(LexObject { + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("bio"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Bio or description shown on the keytrace profile page.", + ), + ), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("displayName"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Display name override for the keytrace profile. Falls back to Bluesky display name if absent.", + ), + ), + max_graphemes: Some(128usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/server_public_key.rs b/crates/jacquard-api/src/dev_keytrace/server_public_key.rs new file mode 100644 index 000000000..af5ca6517 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/server_public_key.rs @@ -0,0 +1,407 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.serverPublicKey +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A signing key for claim attestations. It effectively hosts a JWK on a user's ATProto repo. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "dev.keytrace.serverPublicKey", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct ServerPublicKey { + ///Optional comment or description. + #[serde(skip_serializing_if = "Option::is_none")] + pub comment: Option, + ///JWK public key as a JSON string (RFC 7517 format) + pub public_jwk: S, + ///Datetime from which this key is valid (ISO 8601). + pub valid_from: Datetime, + ///Datetime until which this key is valid (ISO 8601). + pub valid_until: Datetime, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ServerPublicKeyGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: ServerPublicKey, +} + +impl ServerPublicKey { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ServerPublicKeyRecord; +impl XrpcResp for ServerPublicKeyRecord { + const NSID: &'static str = "dev.keytrace.serverPublicKey"; + const ENCODING: &'static str = "application/json"; + type Output = ServerPublicKeyGetRecordOutput; + type Err = RecordError; +} + +impl From> for ServerPublicKey { + fn from(output: ServerPublicKeyGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for ServerPublicKey { + const NSID: &'static str = "dev.keytrace.serverPublicKey"; + type Record = ServerPublicKeyRecord; +} + +impl Collection for ServerPublicKeyRecord { + const NSID: &'static str = "dev.keytrace.serverPublicKey"; + type Record = ServerPublicKeyRecord; +} + +impl LexiconSchema for ServerPublicKey { + fn nsid() -> &'static str { + "dev.keytrace.serverPublicKey" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_serverPublicKey() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.comment { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 512usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("comment"), + max: 512usize, + actual: count, + }); + } + } + } + { + let value = &self.public_jwk; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 512usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("public_jwk"), + max: 512usize, + actual: ::len(value.as_ref()), + }); + } + } + Ok(()) + } +} + +pub mod server_public_key_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 ValidUntil; + type PublicJwk; + type ValidFrom; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type ValidUntil = Unset; + type PublicJwk = Unset; + type ValidFrom = Unset; + } + ///State transition - sets the `valid_until` field to Set + pub struct SetValidUntil(PhantomData St>); + impl sealed::Sealed for SetValidUntil {} + impl State for SetValidUntil { + type ValidUntil = Set; + type PublicJwk = St::PublicJwk; + type ValidFrom = St::ValidFrom; + } + ///State transition - sets the `public_jwk` field to Set + pub struct SetPublicJwk(PhantomData St>); + impl sealed::Sealed for SetPublicJwk {} + impl State for SetPublicJwk { + type ValidUntil = St::ValidUntil; + type PublicJwk = Set; + type ValidFrom = St::ValidFrom; + } + ///State transition - sets the `valid_from` field to Set + pub struct SetValidFrom(PhantomData St>); + impl sealed::Sealed for SetValidFrom {} + impl State for SetValidFrom { + type ValidUntil = St::ValidUntil; + type PublicJwk = St::PublicJwk; + type ValidFrom = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `valid_until` field + pub struct valid_until(()); + ///Marker type for the `public_jwk` field + pub struct public_jwk(()); + ///Marker type for the `valid_from` field + pub struct valid_from(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ServerPublicKeyBuilder { + _state: PhantomData St>, + _fields: (Option, Option, Option, Option), + _type: PhantomData S>, +} + +impl ServerPublicKey { + /// Create a new builder for this type. + pub fn new() -> ServerPublicKeyBuilder { + ServerPublicKeyBuilder::new() + } +} + +impl ServerPublicKeyBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ServerPublicKeyBuilder { + _state: PhantomData, + _fields: (None, None, None, None), + _type: PhantomData, + } + } +} + +impl ServerPublicKeyBuilder { + /// Set the `comment` field (optional) + pub fn comment(mut self, value: impl Into>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `comment` field to an Option value (optional) + pub fn maybe_comment(mut self, value: Option) -> Self { + self._fields.0 = value; + self + } +} + +impl ServerPublicKeyBuilder +where + St: server_public_key_state::State, + St::PublicJwk: server_public_key_state::IsUnset, +{ + /// Set the `publicJwk` field (required) + pub fn public_jwk( + mut self, + value: impl Into, + ) -> ServerPublicKeyBuilder> { + self._fields.1 = Option::Some(value.into()); + ServerPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ServerPublicKeyBuilder +where + St: server_public_key_state::State, + St::ValidFrom: server_public_key_state::IsUnset, +{ + /// Set the `validFrom` field (required) + pub fn valid_from( + mut self, + value: impl Into, + ) -> ServerPublicKeyBuilder> { + self._fields.2 = Option::Some(value.into()); + ServerPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ServerPublicKeyBuilder +where + St: server_public_key_state::State, + St::ValidUntil: server_public_key_state::IsUnset, +{ + /// Set the `validUntil` field (required) + pub fn valid_until( + mut self, + value: impl Into, + ) -> ServerPublicKeyBuilder> { + self._fields.3 = Option::Some(value.into()); + ServerPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ServerPublicKeyBuilder +where + St: server_public_key_state::State, + St::ValidUntil: server_public_key_state::IsSet, + St::PublicJwk: server_public_key_state::IsSet, + St::ValidFrom: server_public_key_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> ServerPublicKey { + ServerPublicKey { + comment: self._fields.0, + public_jwk: self._fields.1.unwrap(), + valid_from: self._fields.2.unwrap(), + valid_until: self._fields.3.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> ServerPublicKey { + ServerPublicKey { + comment: self._fields.0, + public_jwk: self._fields.1.unwrap(), + valid_from: self._fields.2.unwrap(), + valid_until: self._fields.3.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_dev_keytrace_serverPublicKey() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.serverPublicKey"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A signing key for claim attestations. It effectively hosts a JWK on a user's ATProto repo.", + ), + ), + key: Some(CowStr::new_static("any")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("publicJwk"), + SmolStr::new_static("validFrom"), + SmolStr::new_static("validUntil") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("comment"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Optional comment or description."), + ), + max_graphemes: Some(512usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("publicJwk"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "JWK public key as a JSON string (RFC 7517 format)", + ), + ), + max_length: Some(512usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("validFrom"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime from which this key is valid (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("validUntil"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime until which this key is valid (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/signature.rs b/crates/jacquard-api/src/dev_keytrace/signature.rs new file mode 100644 index 000000000..fe4000e01 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/signature.rs @@ -0,0 +1,485 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.signature +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::string::{AtUri, Datetime}; +use jacquard_common::types::value::Data; +use jacquard_derive::IntoStatic; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A cryptographic signature attesting to a claim + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct Signature { + ///The cryptographic signature (base64-encoded). + pub attestation: S, + ///Optional comment or description. + #[serde(skip_serializing_if = "Option::is_none")] + pub comment: Option, + ///Key identifier (e.g., date in YYYY-MM-DD format). + pub kid: S, + ///Datetime when this signature was retracted. Present only if the signature has been retracted (ISO 8601). + #[serde(skip_serializing_if = "Option::is_none")] + pub retracted_at: Option, + ///Datetime when the signature was created (ISO 8601). + pub signed_at: Datetime, + ///Ordered list of field names included in the signed payload (e.g., ['did', 'subject', 'type', 'verifiedAt']) + pub signed_fields: Vec, + ///AT URI reference to the signing key record published by the verification service (e.g., at://did:plc:serviceaccount/dev.keytrace.serverPublicKey/2024-01-15). + pub src: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +impl LexiconSchema for Signature { + fn nsid() -> &'static str { + "dev.keytrace.signature" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_signature() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.comment { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 512usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("comment"), + max: 512usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod signature_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 Kid; + type Attestation; + type SignedAt; + type Src; + type SignedFields; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Kid = Unset; + type Attestation = Unset; + type SignedAt = Unset; + type Src = Unset; + type SignedFields = Unset; + } + ///State transition - sets the `kid` field to Set + pub struct SetKid(PhantomData St>); + impl sealed::Sealed for SetKid {} + impl State for SetKid { + type Kid = Set; + type Attestation = St::Attestation; + type SignedAt = St::SignedAt; + type Src = St::Src; + type SignedFields = St::SignedFields; + } + ///State transition - sets the `attestation` field to Set + pub struct SetAttestation(PhantomData St>); + impl sealed::Sealed for SetAttestation {} + impl State for SetAttestation { + type Kid = St::Kid; + type Attestation = Set; + type SignedAt = St::SignedAt; + type Src = St::Src; + type SignedFields = St::SignedFields; + } + ///State transition - sets the `signed_at` field to Set + pub struct SetSignedAt(PhantomData St>); + impl sealed::Sealed for SetSignedAt {} + impl State for SetSignedAt { + type Kid = St::Kid; + type Attestation = St::Attestation; + type SignedAt = Set; + type Src = St::Src; + type SignedFields = St::SignedFields; + } + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData St>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { + type Kid = St::Kid; + type Attestation = St::Attestation; + type SignedAt = St::SignedAt; + type Src = Set; + type SignedFields = St::SignedFields; + } + ///State transition - sets the `signed_fields` field to Set + pub struct SetSignedFields(PhantomData St>); + impl sealed::Sealed for SetSignedFields {} + impl State for SetSignedFields { + type Kid = St::Kid; + type Attestation = St::Attestation; + type SignedAt = St::SignedAt; + type Src = St::Src; + type SignedFields = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `kid` field + pub struct kid(()); + ///Marker type for the `attestation` field + pub struct attestation(()); + ///Marker type for the `signed_at` field + pub struct signed_at(()); + ///Marker type for the `src` field + pub struct src(()); + ///Marker type for the `signed_fields` field + pub struct signed_fields(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct SignatureBuilder { + _state: PhantomData St>, + _fields: ( + Option, + Option, + Option, + Option, + Option, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Signature { + /// Create a new builder for this type. + pub fn new() -> SignatureBuilder { + SignatureBuilder::new() + } +} + +impl SignatureBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + SignatureBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::Attestation: signature_state::IsUnset, +{ + /// Set the `attestation` field (required) + pub fn attestation( + mut self, + value: impl Into, + ) -> SignatureBuilder> { + self._fields.0 = Option::Some(value.into()); + SignatureBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl SignatureBuilder { + /// Set the `comment` field (optional) + pub fn comment(mut self, value: impl Into>) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `comment` field to an Option value (optional) + pub fn maybe_comment(mut self, value: Option) -> Self { + self._fields.1 = value; + self + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::Kid: signature_state::IsUnset, +{ + /// Set the `kid` field (required) + pub fn kid( + mut self, + value: impl Into, + ) -> SignatureBuilder> { + self._fields.2 = Option::Some(value.into()); + SignatureBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl SignatureBuilder { + /// Set the `retractedAt` field (optional) + pub fn retracted_at(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `retractedAt` field to an Option value (optional) + pub fn maybe_retracted_at(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::SignedAt: signature_state::IsUnset, +{ + /// Set the `signedAt` field (required) + pub fn signed_at( + mut self, + value: impl Into, + ) -> SignatureBuilder> { + self._fields.4 = Option::Some(value.into()); + SignatureBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::SignedFields: signature_state::IsUnset, +{ + /// Set the `signedFields` field (required) + pub fn signed_fields( + mut self, + value: impl Into>, + ) -> SignatureBuilder> { + self._fields.5 = Option::Some(value.into()); + SignatureBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::Src: signature_state::IsUnset, +{ + /// Set the `src` field (required) + pub fn src( + mut self, + value: impl Into>, + ) -> SignatureBuilder> { + self._fields.6 = Option::Some(value.into()); + SignatureBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl SignatureBuilder +where + St: signature_state::State, + St::Kid: signature_state::IsSet, + St::Attestation: signature_state::IsSet, + St::SignedAt: signature_state::IsSet, + St::Src: signature_state::IsSet, + St::SignedFields: signature_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Signature { + Signature { + attestation: self._fields.0.unwrap(), + comment: self._fields.1, + kid: self._fields.2.unwrap(), + retracted_at: self._fields.3, + signed_at: self._fields.4.unwrap(), + signed_fields: self._fields.5.unwrap(), + src: self._fields.6.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Signature { + Signature { + attestation: self._fields.0.unwrap(), + comment: self._fields.1, + kid: self._fields.2.unwrap(), + retracted_at: self._fields.3, + signed_at: self._fields.4.unwrap(), + signed_fields: self._fields.5.unwrap(), + src: self._fields.6.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_dev_keytrace_signature() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.signature"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Object(LexObject { + description: Some( + CowStr::new_static( + "A cryptographic signature attesting to a claim", + ), + ), + required: Some( + vec![ + SmolStr::new_static("kid"), SmolStr::new_static("src"), + SmolStr::new_static("signedAt"), + SmolStr::new_static("attestation"), + SmolStr::new_static("signedFields") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("attestation"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The cryptographic signature (base64-encoded).", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("comment"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Optional comment or description."), + ), + max_graphemes: Some(512usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("kid"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Key identifier (e.g., date in YYYY-MM-DD format).", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("retractedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this signature was retracted. Present only if the signature has been retracted (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("signedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when the signature was created (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("signedFields"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "Ordered list of field names included in the signed payload (e.g., ['did', 'subject', 'type', 'verifiedAt'])", + ), + ), + items: LexArrayItem::String(LexString { + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("src"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "AT URI reference to the signing key record published by the verification service (e.g., at://did:plc:serviceaccount/dev.keytrace.serverPublicKey/2024-01-15).", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/statement.rs b/crates/jacquard-api/src/dev_keytrace/statement.rs new file mode 100644 index 000000000..1ac52532d --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/statement.rs @@ -0,0 +1,509 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.statement +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A public statement signed by one of the user's own published public keys (dev.keytrace.userPublicKey). + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "dev.keytrace.statement", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Statement { + ///The statement text that was signed. + pub content: S, + ///Datetime when this statement was created (ISO 8601). + pub created_at: Datetime, + ///AT URI of the dev.keytrace.userPublicKey record whose private key produced this signature (e.g., at://did:plc:xxx/dev.keytrace.userPublicKey/3k4...) + pub key_ref: AtUri, + ///Datetime when this statement was retracted. Present only if the statement has been retracted (ISO 8601). + #[serde(skip_serializing_if = "Option::is_none")] + pub retracted_at: Option, + ///Cryptographic signature of the content field, produced by the key referenced in keyRef (PGP cleartext or detached, base64-encoded binary signature). + pub sig: S, + ///Optional short subject or title for the statement. + #[serde(skip_serializing_if = "Option::is_none")] + pub subject: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct StatementGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Statement, +} + +impl Statement { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct StatementRecord; +impl XrpcResp for StatementRecord { + const NSID: &'static str = "dev.keytrace.statement"; + const ENCODING: &'static str = "application/json"; + type Output = StatementGetRecordOutput; + type Err = RecordError; +} + +impl From> for Statement { + fn from(output: StatementGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Statement { + const NSID: &'static str = "dev.keytrace.statement"; + type Record = StatementRecord; +} + +impl Collection for StatementRecord { + const NSID: &'static str = "dev.keytrace.statement"; + type Record = StatementRecord; +} + +impl LexiconSchema for Statement { + fn nsid() -> &'static str { + "dev.keytrace.statement" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_statement() + } + fn validate(&self) -> Result<(), ConstraintError> { + { + let value = &self.content; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10000usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("content"), + max: 10000usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.content; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 10000usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("content"), + max: 10000usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.subject { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("subject"), + max: 256usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod statement_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 KeyRef; + type CreatedAt; + type Content; + type Sig; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type KeyRef = Unset; + type CreatedAt = Unset; + type Content = Unset; + type Sig = Unset; + } + ///State transition - sets the `key_ref` field to Set + pub struct SetKeyRef(PhantomData St>); + impl sealed::Sealed for SetKeyRef {} + impl State for SetKeyRef { + type KeyRef = Set; + type CreatedAt = St::CreatedAt; + type Content = St::Content; + type Sig = St::Sig; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type KeyRef = St::KeyRef; + type CreatedAt = Set; + type Content = St::Content; + type Sig = St::Sig; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type KeyRef = St::KeyRef; + type CreatedAt = St::CreatedAt; + type Content = Set; + type Sig = St::Sig; + } + ///State transition - sets the `sig` field to Set + pub struct SetSig(PhantomData St>); + impl sealed::Sealed for SetSig {} + impl State for SetSig { + type KeyRef = St::KeyRef; + type CreatedAt = St::CreatedAt; + type Content = St::Content; + type Sig = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `key_ref` field + pub struct key_ref(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `sig` field + pub struct sig(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct StatementBuilder { + _state: PhantomData St>, + _fields: ( + Option, + Option, + Option>, + Option, + Option, + Option, + ), + _type: PhantomData S>, +} + +impl Statement { + /// Create a new builder for this type. + pub fn new() -> StatementBuilder { + StatementBuilder::new() + } +} + +impl StatementBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + StatementBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl StatementBuilder +where + St: statement_state::State, + St::Content: statement_state::IsUnset, +{ + /// Set the `content` field (required) + pub fn content( + mut self, + value: impl Into, + ) -> StatementBuilder> { + self._fields.0 = Option::Some(value.into()); + StatementBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl StatementBuilder +where + St: statement_state::State, + St::CreatedAt: statement_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> StatementBuilder> { + self._fields.1 = Option::Some(value.into()); + StatementBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl StatementBuilder +where + St: statement_state::State, + St::KeyRef: statement_state::IsUnset, +{ + /// Set the `keyRef` field (required) + pub fn key_ref( + mut self, + value: impl Into>, + ) -> StatementBuilder> { + self._fields.2 = Option::Some(value.into()); + StatementBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl StatementBuilder { + /// Set the `retractedAt` field (optional) + pub fn retracted_at(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `retractedAt` field to an Option value (optional) + pub fn maybe_retracted_at(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl StatementBuilder +where + St: statement_state::State, + St::Sig: statement_state::IsUnset, +{ + /// Set the `sig` field (required) + pub fn sig( + mut self, + value: impl Into, + ) -> StatementBuilder> { + self._fields.4 = Option::Some(value.into()); + StatementBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl StatementBuilder { + /// Set the `subject` field (optional) + pub fn subject(mut self, value: impl Into>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `subject` field to an Option value (optional) + pub fn maybe_subject(mut self, value: Option) -> Self { + self._fields.5 = value; + self + } +} + +impl StatementBuilder +where + St: statement_state::State, + St::KeyRef: statement_state::IsSet, + St::CreatedAt: statement_state::IsSet, + St::Content: statement_state::IsSet, + St::Sig: statement_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Statement { + Statement { + content: self._fields.0.unwrap(), + created_at: self._fields.1.unwrap(), + key_ref: self._fields.2.unwrap(), + retracted_at: self._fields.3, + sig: self._fields.4.unwrap(), + subject: self._fields.5, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Statement { + Statement { + content: self._fields.0.unwrap(), + created_at: self._fields.1.unwrap(), + key_ref: self._fields.2.unwrap(), + retracted_at: self._fields.3, + sig: self._fields.4.unwrap(), + subject: self._fields.5, + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_dev_keytrace_statement() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.statement"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A public statement signed by one of the user's own published public keys (dev.keytrace.userPublicKey).", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("content"), + SmolStr::new_static("keyRef"), SmolStr::new_static("sig"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("content"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The statement text that was signed."), + ), + max_length: Some(10000usize), + max_graphemes: Some(10000usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this statement was created (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("keyRef"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "AT URI of the dev.keytrace.userPublicKey record whose private key produced this signature (e.g., at://did:plc:xxx/dev.keytrace.userPublicKey/3k4...)", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("retractedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this statement was retracted. Present only if the statement has been retracted (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sig"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Cryptographic signature of the content field, produced by the key referenced in keyRef (PGP cleartext or detached, base64-encoded binary signature).", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("subject"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Optional short subject or title for the statement.", + ), + ), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_keytrace/user_public_key.rs b/crates/jacquard-api/src/dev_keytrace/user_public_key.rs new file mode 100644 index 000000000..9f56e1e97 --- /dev/null +++ b/crates/jacquard-api/src/dev_keytrace/user_public_key.rs @@ -0,0 +1,650 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: dev.keytrace.userPublicKey +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A user-published public key. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "dev.keytrace.userPublicKey", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct UserPublicKey { + ///Optional comment or description. + #[serde(skip_serializing_if = "Option::is_none")] + pub comment: Option, + ///Datetime when this key was created (ISO 8601). + pub created_at: Datetime, + ///Datetime when this key expires (ISO 8601). + #[serde(skip_serializing_if = "Option::is_none")] + pub expires_at: Option, + ///Key fingerprint. + #[serde(skip_serializing_if = "Option::is_none")] + pub fingerprint: Option, + ///Format of the public key. + pub key_type: UserPublicKeyKeyType, + ///Human-readable label for this key (e.g., 'work laptop', 'signing key'). + #[serde(skip_serializing_if = "Option::is_none")] + pub label: Option, + ///Full public key in standard text armored format. + pub public_key_armored: S, + ///Datetime when this key was retracted. Present only if the key has been retracted (ISO 8601). + #[serde(skip_serializing_if = "Option::is_none")] + pub retracted_at: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Format of the public key. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum UserPublicKeyKeyType { + Pgp, + SshEd25519, + SshEcdsa, + Other(S), +} + +impl UserPublicKeyKeyType { + pub fn as_str(&self) -> &str { + match self { + Self::Pgp => "pgp", + Self::SshEd25519 => "ssh-ed25519", + Self::SshEcdsa => "ssh-ecdsa", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "pgp" => Self::Pgp, + "ssh-ed25519" => Self::SshEd25519, + "ssh-ecdsa" => Self::SshEcdsa, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for UserPublicKeyKeyType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for UserPublicKeyKeyType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for UserPublicKeyKeyType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for UserPublicKeyKeyType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for UserPublicKeyKeyType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for UserPublicKeyKeyType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = UserPublicKeyKeyType; + fn into_static(self) -> Self::Output { + match self { + UserPublicKeyKeyType::Pgp => UserPublicKeyKeyType::Pgp, + UserPublicKeyKeyType::SshEd25519 => UserPublicKeyKeyType::SshEd25519, + UserPublicKeyKeyType::SshEcdsa => UserPublicKeyKeyType::SshEcdsa, + UserPublicKeyKeyType::Other(v) => { + UserPublicKeyKeyType::Other(v.into_static()) + } + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct UserPublicKeyGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: UserPublicKey, +} + +impl UserPublicKey { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct UserPublicKeyRecord; +impl XrpcResp for UserPublicKeyRecord { + const NSID: &'static str = "dev.keytrace.userPublicKey"; + const ENCODING: &'static str = "application/json"; + type Output = UserPublicKeyGetRecordOutput; + type Err = RecordError; +} + +impl From> for UserPublicKey { + fn from(output: UserPublicKeyGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for UserPublicKey { + const NSID: &'static str = "dev.keytrace.userPublicKey"; + type Record = UserPublicKeyRecord; +} + +impl Collection for UserPublicKeyRecord { + const NSID: &'static str = "dev.keytrace.userPublicKey"; + type Record = UserPublicKeyRecord; +} + +impl LexiconSchema for UserPublicKey { + fn nsid() -> &'static str { + "dev.keytrace.userPublicKey" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_dev_keytrace_userPublicKey() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.comment { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 512usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("comment"), + max: 512usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.fingerprint { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("fingerprint"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.label { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 128usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("label"), + max: 128usize, + actual: count, + }); + } + } + } + { + let value = &self.public_key_armored; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 16384usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("public_key_armored"), + max: 16384usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.public_key_armored; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 16384usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("public_key_armored"), + max: 16384usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod user_public_key_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 KeyType; + type CreatedAt; + type PublicKeyArmored; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type KeyType = Unset; + type CreatedAt = Unset; + type PublicKeyArmored = Unset; + } + ///State transition - sets the `key_type` field to Set + pub struct SetKeyType(PhantomData St>); + impl sealed::Sealed for SetKeyType {} + impl State for SetKeyType { + type KeyType = Set; + type CreatedAt = St::CreatedAt; + type PublicKeyArmored = St::PublicKeyArmored; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type KeyType = St::KeyType; + type CreatedAt = Set; + type PublicKeyArmored = St::PublicKeyArmored; + } + ///State transition - sets the `public_key_armored` field to Set + pub struct SetPublicKeyArmored(PhantomData St>); + impl sealed::Sealed for SetPublicKeyArmored {} + impl State for SetPublicKeyArmored { + type KeyType = St::KeyType; + type CreatedAt = St::CreatedAt; + type PublicKeyArmored = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `key_type` field + pub struct key_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `public_key_armored` field + pub struct public_key_armored(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct UserPublicKeyBuilder { + _state: PhantomData St>, + _fields: ( + Option, + Option, + Option, + Option, + Option>, + Option, + Option, + Option, + ), + _type: PhantomData S>, +} + +impl UserPublicKey { + /// Create a new builder for this type. + pub fn new() -> UserPublicKeyBuilder { + UserPublicKeyBuilder::new() + } +} + +impl UserPublicKeyBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + UserPublicKeyBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl UserPublicKeyBuilder { + /// Set the `comment` field (optional) + pub fn comment(mut self, value: impl Into>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `comment` field to an Option value (optional) + pub fn maybe_comment(mut self, value: Option) -> Self { + self._fields.0 = value; + self + } +} + +impl UserPublicKeyBuilder +where + St: user_public_key_state::State, + St::CreatedAt: user_public_key_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> UserPublicKeyBuilder> { + self._fields.1 = Option::Some(value.into()); + UserPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl UserPublicKeyBuilder { + /// Set the `expiresAt` field (optional) + pub fn expires_at(mut self, value: impl Into>) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `expiresAt` field to an Option value (optional) + pub fn maybe_expires_at(mut self, value: Option) -> Self { + self._fields.2 = value; + self + } +} + +impl UserPublicKeyBuilder { + /// Set the `fingerprint` field (optional) + pub fn fingerprint(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `fingerprint` field to an Option value (optional) + pub fn maybe_fingerprint(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl UserPublicKeyBuilder +where + St: user_public_key_state::State, + St::KeyType: user_public_key_state::IsUnset, +{ + /// Set the `keyType` field (required) + pub fn key_type( + mut self, + value: impl Into>, + ) -> UserPublicKeyBuilder> { + self._fields.4 = Option::Some(value.into()); + UserPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl UserPublicKeyBuilder { + /// Set the `label` field (optional) + pub fn label(mut self, value: impl Into>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `label` field to an Option value (optional) + pub fn maybe_label(mut self, value: Option) -> Self { + self._fields.5 = value; + self + } +} + +impl UserPublicKeyBuilder +where + St: user_public_key_state::State, + St::PublicKeyArmored: user_public_key_state::IsUnset, +{ + /// Set the `publicKeyArmored` field (required) + pub fn public_key_armored( + mut self, + value: impl Into, + ) -> UserPublicKeyBuilder> { + self._fields.6 = Option::Some(value.into()); + UserPublicKeyBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl UserPublicKeyBuilder { + /// Set the `retractedAt` field (optional) + pub fn retracted_at(mut self, value: impl Into>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `retractedAt` field to an Option value (optional) + pub fn maybe_retracted_at(mut self, value: Option) -> Self { + self._fields.7 = value; + self + } +} + +impl UserPublicKeyBuilder +where + St: user_public_key_state::State, + St::KeyType: user_public_key_state::IsSet, + St::CreatedAt: user_public_key_state::IsSet, + St::PublicKeyArmored: user_public_key_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> UserPublicKey { + UserPublicKey { + comment: self._fields.0, + created_at: self._fields.1.unwrap(), + expires_at: self._fields.2, + fingerprint: self._fields.3, + key_type: self._fields.4.unwrap(), + label: self._fields.5, + public_key_armored: self._fields.6.unwrap(), + retracted_at: self._fields.7, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> UserPublicKey { + UserPublicKey { + comment: self._fields.0, + created_at: self._fields.1.unwrap(), + expires_at: self._fields.2, + fingerprint: self._fields.3, + key_type: self._fields.4.unwrap(), + label: self._fields.5, + public_key_armored: self._fields.6.unwrap(), + retracted_at: self._fields.7, + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_dev_keytrace_userPublicKey() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("dev.keytrace.userPublicKey"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static("A user-published public key."), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("keyType"), + SmolStr::new_static("publicKeyArmored"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("comment"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Optional comment or description."), + ), + max_graphemes: Some(512usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this key was created (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("expiresAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this key expires (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("fingerprint"), + LexObjectProperty::String(LexString { + description: Some(CowStr::new_static("Key fingerprint.")), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("keyType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Format of the public key."), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("label"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Human-readable label for this key (e.g., 'work laptop', 'signing key').", + ), + ), + max_graphemes: Some(128usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("publicKeyArmored"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Full public key in standard text armored format.", + ), + ), + max_length: Some(16384usize), + max_graphemes: Some(16384usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("retractedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Datetime when this key was retracted. Present only if the key has been retracted (ISO 8601).", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs b/crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs index 1363c45ae..cb2279f59 100644 --- a/crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs +++ b/crates/jacquard-api/src/dev_ocbwoy3/blueboard/board.rs @@ -141,67 +141,67 @@ pub mod board_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; + type Nsfw; type Description; + type CreatedAt; type Title; - type Nsfw; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; + type Nsfw = Unset; type Description = Unset; + type CreatedAt = Unset; type Title = Unset; - type Nsfw = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `nsfw` field to Set + pub struct SetNsfw(PhantomData St>); + impl sealed::Sealed for SetNsfw {} + impl State for SetNsfw { + type Nsfw = Set; type Description = St::Description; + type CreatedAt = St::CreatedAt; type Title = St::Title; - type Nsfw = St::Nsfw; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type CreatedAt = St::CreatedAt; + type Nsfw = St::Nsfw; type Description = Set; + type CreatedAt = St::CreatedAt; type Title = St::Title; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Nsfw = St::Nsfw; + type Description = St::Description; + type CreatedAt = Set; + type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = St::CreatedAt; - type Description = St::Description; - type Title = Set; type Nsfw = St::Nsfw; - } - ///State transition - sets the `nsfw` field to Set - pub struct SetNsfw(PhantomData St>); - impl sealed::Sealed for SetNsfw {} - impl State for SetNsfw { - type CreatedAt = St::CreatedAt; type Description = St::Description; - type Title = St::Title; - type Nsfw = Set; + type CreatedAt = St::CreatedAt; + type Title = 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 `nsfw` field + pub struct nsfw(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); - ///Marker type for the `nsfw` field - pub struct nsfw(()); } } @@ -309,10 +309,10 @@ where impl BoardBuilder where St: board_state::State, - St::CreatedAt: board_state::IsSet, + St::Nsfw: board_state::IsSet, St::Description: board_state::IsSet, + St::CreatedAt: board_state::IsSet, St::Title: board_state::IsSet, - St::Nsfw: board_state::IsSet, { /// Build the final struct. pub fn build(self) -> Board { diff --git a/crates/jacquard-api/src/dev_sensorthings/datastream.rs b/crates/jacquard-api/src/dev_sensorthings/datastream.rs index 8539b6a68..ff69edbd5 100644 --- a/crates/jacquard-api/src/dev_sensorthings/datastream.rs +++ b/crates/jacquard-api/src/dev_sensorthings/datastream.rs @@ -215,127 +215,127 @@ pub mod datastream_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ObservationType; type Name; - type ObservedProperty; - type CreatedAt; + type Thing; type Sensor; + type ObservedProperty; type UnitOfMeasurement; - type Thing; + type CreatedAt; + type ObservationType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ObservationType = Unset; type Name = Unset; - type ObservedProperty = Unset; - type CreatedAt = Unset; + type Thing = Unset; type Sensor = Unset; + type ObservedProperty = Unset; type UnitOfMeasurement = Unset; - type Thing = Unset; - } - ///State transition - sets the `observation_type` field to Set - pub struct SetObservationType(PhantomData St>); - impl sealed::Sealed for SetObservationType {} - impl State for SetObservationType { - type ObservationType = Set; - type Name = St::Name; - type ObservedProperty = St::ObservedProperty; - type CreatedAt = St::CreatedAt; - type Sensor = St::Sensor; - type UnitOfMeasurement = St::UnitOfMeasurement; - type Thing = St::Thing; + type CreatedAt = Unset; + type ObservationType = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type ObservationType = St::ObservationType; type Name = Set; - type ObservedProperty = St::ObservedProperty; - type CreatedAt = St::CreatedAt; - type Sensor = St::Sensor; - type UnitOfMeasurement = St::UnitOfMeasurement; type Thing = St::Thing; - } - ///State transition - sets the `observed_property` field to Set - pub struct SetObservedProperty(PhantomData St>); - impl sealed::Sealed for SetObservedProperty {} - impl State for SetObservedProperty { - type ObservationType = St::ObservationType; - type Name = St::Name; - type ObservedProperty = Set; - type CreatedAt = St::CreatedAt; type Sensor = St::Sensor; + type ObservedProperty = St::ObservedProperty; type UnitOfMeasurement = St::UnitOfMeasurement; - type Thing = St::Thing; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type CreatedAt = St::CreatedAt; type ObservationType = St::ObservationType; + } + ///State transition - sets the `thing` field to Set + pub struct SetThing(PhantomData St>); + impl sealed::Sealed for SetThing {} + impl State for SetThing { type Name = St::Name; - type ObservedProperty = St::ObservedProperty; - type CreatedAt = Set; + type Thing = Set; type Sensor = St::Sensor; + type ObservedProperty = St::ObservedProperty; type UnitOfMeasurement = St::UnitOfMeasurement; - type Thing = St::Thing; + type CreatedAt = St::CreatedAt; + type ObservationType = St::ObservationType; } ///State transition - sets the `sensor` field to Set pub struct SetSensor(PhantomData St>); impl sealed::Sealed for SetSensor {} impl State for SetSensor { - type ObservationType = St::ObservationType; type Name = St::Name; - type ObservedProperty = St::ObservedProperty; - type CreatedAt = St::CreatedAt; + type Thing = St::Thing; type Sensor = Set; + type ObservedProperty = St::ObservedProperty; type UnitOfMeasurement = St::UnitOfMeasurement; + type CreatedAt = St::CreatedAt; + type ObservationType = St::ObservationType; + } + ///State transition - sets the `observed_property` field to Set + pub struct SetObservedProperty(PhantomData St>); + impl sealed::Sealed for SetObservedProperty {} + impl State for SetObservedProperty { + type Name = St::Name; type Thing = St::Thing; + type Sensor = St::Sensor; + type ObservedProperty = Set; + type UnitOfMeasurement = St::UnitOfMeasurement; + type CreatedAt = St::CreatedAt; + type ObservationType = St::ObservationType; } ///State transition - sets the `unit_of_measurement` field to Set pub struct SetUnitOfMeasurement(PhantomData St>); impl sealed::Sealed for SetUnitOfMeasurement {} impl State for SetUnitOfMeasurement { - type ObservationType = St::ObservationType; type Name = St::Name; - type ObservedProperty = St::ObservedProperty; - type CreatedAt = St::CreatedAt; + type Thing = St::Thing; type Sensor = St::Sensor; + type ObservedProperty = St::ObservedProperty; type UnitOfMeasurement = Set; - type Thing = St::Thing; - } - ///State transition - sets the `thing` field to Set - pub struct SetThing(PhantomData St>); - impl sealed::Sealed for SetThing {} - impl State for SetThing { + type CreatedAt = St::CreatedAt; type ObservationType = St::ObservationType; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Name = St::Name; + type Thing = St::Thing; + type Sensor = St::Sensor; type ObservedProperty = St::ObservedProperty; - type CreatedAt = St::CreatedAt; + type UnitOfMeasurement = St::UnitOfMeasurement; + type CreatedAt = Set; + type ObservationType = St::ObservationType; + } + ///State transition - sets the `observation_type` field to Set + pub struct SetObservationType(PhantomData St>); + impl sealed::Sealed for SetObservationType {} + impl State for SetObservationType { + type Name = St::Name; + type Thing = St::Thing; type Sensor = St::Sensor; + type ObservedProperty = St::ObservedProperty; type UnitOfMeasurement = St::UnitOfMeasurement; - type Thing = Set; + type CreatedAt = St::CreatedAt; + type ObservationType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `observation_type` field - pub struct observation_type(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `observed_property` field - pub struct observed_property(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `thing` field + pub struct thing(()); ///Marker type for the `sensor` field pub struct sensor(()); + ///Marker type for the `observed_property` field + pub struct observed_property(()); ///Marker type for the `unit_of_measurement` field pub struct unit_of_measurement(()); - ///Marker type for the `thing` field - pub struct thing(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `observation_type` field + pub struct observation_type(()); } } @@ -564,13 +564,13 @@ impl DatastreamBuilder { impl DatastreamBuilder where St: datastream_state::State, - St::ObservationType: datastream_state::IsSet, St::Name: datastream_state::IsSet, - St::ObservedProperty: datastream_state::IsSet, - St::CreatedAt: datastream_state::IsSet, + St::Thing: datastream_state::IsSet, St::Sensor: datastream_state::IsSet, + St::ObservedProperty: datastream_state::IsSet, St::UnitOfMeasurement: datastream_state::IsSet, - St::Thing: datastream_state::IsSet, + St::CreatedAt: datastream_state::IsSet, + St::ObservationType: datastream_state::IsSet, { /// Build the final struct. pub fn build(self) -> Datastream { diff --git a/crates/jacquard-api/src/dev_sensorthings/feature_of_interest.rs b/crates/jacquard-api/src/dev_sensorthings/feature_of_interest.rs index 085122db2..9ebc61f2a 100644 --- a/crates/jacquard-api/src/dev_sensorthings/feature_of_interest.rs +++ b/crates/jacquard-api/src/dev_sensorthings/feature_of_interest.rs @@ -150,65 +150,65 @@ pub mod feature_of_interest_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type EncodingType; type Feature; + type Name; 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 EncodingType = Unset; type Feature = Unset; + type Name = Unset; type CreatedAt = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type EncodingType = St::EncodingType; - type Feature = St::Feature; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `encoding_type` field to Set pub struct SetEncodingType(PhantomData St>); impl sealed::Sealed for SetEncodingType {} impl State for SetEncodingType { - type Name = St::Name; type EncodingType = Set; type Feature = St::Feature; + type Name = St::Name; type CreatedAt = St::CreatedAt; } ///State transition - sets the `feature` field to Set pub struct SetFeature(PhantomData St>); impl sealed::Sealed for SetFeature {} impl State for SetFeature { - type Name = St::Name; type EncodingType = St::EncodingType; type Feature = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type EncodingType = St::EncodingType; + type Feature = St::Feature; + type Name = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type EncodingType = St::EncodingType; type Feature = St::Feature; + type Name = St::Name; 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 `encoding_type` field pub struct encoding_type(()); ///Marker type for the `feature` field pub struct feature(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -331,9 +331,9 @@ where impl FeatureOfInterestBuilder where St: feature_of_interest_state::State, - St::Name: feature_of_interest_state::IsSet, St::EncodingType: feature_of_interest_state::IsSet, St::Feature: feature_of_interest_state::IsSet, + St::Name: feature_of_interest_state::IsSet, St::CreatedAt: feature_of_interest_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/dev_sensorthings/multi_observation.rs b/crates/jacquard-api/src/dev_sensorthings/multi_observation.rs index 580b83610..e93cacc2b 100644 --- a/crates/jacquard-api/src/dev_sensorthings/multi_observation.rs +++ b/crates/jacquard-api/src/dev_sensorthings/multi_observation.rs @@ -895,51 +895,51 @@ pub mod multi_observation_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Result; - type ObservedProperty; type UnitOfMeasurement; + type ObservedProperty; + type Result; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Result = Unset; - type ObservedProperty = Unset; type UnitOfMeasurement = Unset; + type ObservedProperty = Unset; + type Result = Unset; } - ///State transition - sets the `result` field to Set - pub struct SetResult(PhantomData St>); - impl sealed::Sealed for SetResult {} - impl State for SetResult { - type Result = Set; + ///State transition - sets the `unit_of_measurement` field to Set + pub struct SetUnitOfMeasurement(PhantomData St>); + impl sealed::Sealed for SetUnitOfMeasurement {} + impl State for SetUnitOfMeasurement { + type UnitOfMeasurement = Set; type ObservedProperty = St::ObservedProperty; - type UnitOfMeasurement = St::UnitOfMeasurement; + type Result = St::Result; } ///State transition - sets the `observed_property` field to Set pub struct SetObservedProperty(PhantomData St>); impl sealed::Sealed for SetObservedProperty {} impl State for SetObservedProperty { - type Result = St::Result; - type ObservedProperty = Set; type UnitOfMeasurement = St::UnitOfMeasurement; - } - ///State transition - sets the `unit_of_measurement` field to Set - pub struct SetUnitOfMeasurement(PhantomData St>); - impl sealed::Sealed for SetUnitOfMeasurement {} - impl State for SetUnitOfMeasurement { + type ObservedProperty = Set; type Result = St::Result; + } + ///State transition - sets the `result` field to Set + pub struct SetResult(PhantomData St>); + impl sealed::Sealed for SetResult {} + impl State for SetResult { + type UnitOfMeasurement = St::UnitOfMeasurement; type ObservedProperty = St::ObservedProperty; - type UnitOfMeasurement = Set; + type Result = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `result` field - pub struct result(()); - ///Marker type for the `observed_property` field - pub struct observed_property(()); ///Marker type for the `unit_of_measurement` field pub struct unit_of_measurement(()); + ///Marker type for the `observed_property` field + pub struct observed_property(()); + ///Marker type for the `result` field + pub struct result(()); } } @@ -1084,9 +1084,9 @@ where impl MultiObservationEntryBuilder where St: multi_observation_entry_state::State, - St::Result: multi_observation_entry_state::IsSet, - St::ObservedProperty: multi_observation_entry_state::IsSet, St::UnitOfMeasurement: multi_observation_entry_state::IsSet, + St::ObservedProperty: multi_observation_entry_state::IsSet, + St::Result: multi_observation_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> MultiObservationEntry { diff --git a/crates/jacquard-api/src/dev_sensorthings/observation_batch.rs b/crates/jacquard-api/src/dev_sensorthings/observation_batch.rs index b8658d3a2..32114055f 100644 --- a/crates/jacquard-api/src/dev_sensorthings/observation_batch.rs +++ b/crates/jacquard-api/src/dev_sensorthings/observation_batch.rs @@ -517,67 +517,67 @@ pub mod observation_batch_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Observations; type WindowStart; - type Datastream; type WindowEnd; - type Observations; + type Datastream; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Observations = Unset; type WindowStart = Unset; - type Datastream = Unset; type WindowEnd = Unset; - type Observations = Unset; + type Datastream = Unset; + } + ///State transition - sets the `observations` field to Set + pub struct SetObservations(PhantomData St>); + impl sealed::Sealed for SetObservations {} + impl State for SetObservations { + type Observations = Set; + type WindowStart = St::WindowStart; + type WindowEnd = St::WindowEnd; + type Datastream = St::Datastream; } ///State transition - sets the `window_start` field to Set pub struct SetWindowStart(PhantomData St>); impl sealed::Sealed for SetWindowStart {} impl State for SetWindowStart { - type WindowStart = Set; - type Datastream = St::Datastream; - type WindowEnd = St::WindowEnd; type Observations = St::Observations; - } - ///State transition - sets the `datastream` field to Set - pub struct SetDatastream(PhantomData St>); - impl sealed::Sealed for SetDatastream {} - impl State for SetDatastream { - type WindowStart = St::WindowStart; - type Datastream = Set; + type WindowStart = Set; type WindowEnd = St::WindowEnd; - type Observations = St::Observations; + type Datastream = St::Datastream; } ///State transition - sets the `window_end` field to Set pub struct SetWindowEnd(PhantomData St>); impl sealed::Sealed for SetWindowEnd {} impl State for SetWindowEnd { + type Observations = St::Observations; type WindowStart = St::WindowStart; - type Datastream = St::Datastream; type WindowEnd = Set; - type Observations = St::Observations; + type Datastream = St::Datastream; } - ///State transition - sets the `observations` field to Set - pub struct SetObservations(PhantomData St>); - impl sealed::Sealed for SetObservations {} - impl State for SetObservations { + ///State transition - sets the `datastream` field to Set + pub struct SetDatastream(PhantomData St>); + impl sealed::Sealed for SetDatastream {} + impl State for SetDatastream { + type Observations = St::Observations; type WindowStart = St::WindowStart; - type Datastream = St::Datastream; type WindowEnd = St::WindowEnd; - type Observations = Set; + type Datastream = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `observations` field + pub struct observations(()); ///Marker type for the `window_start` field pub struct window_start(()); - ///Marker type for the `datastream` field - pub struct datastream(()); ///Marker type for the `window_end` field pub struct window_end(()); - ///Marker type for the `observations` field - pub struct observations(()); + ///Marker type for the `datastream` field + pub struct datastream(()); } } @@ -690,10 +690,10 @@ where impl ObservationBatchBuilder where St: observation_batch_state::State, + St::Observations: observation_batch_state::IsSet, St::WindowStart: observation_batch_state::IsSet, - St::Datastream: observation_batch_state::IsSet, St::WindowEnd: observation_batch_state::IsSet, - St::Observations: observation_batch_state::IsSet, + St::Datastream: observation_batch_state::IsSet, { /// Build the final struct. pub fn build(self) -> ObservationBatch { diff --git a/crates/jacquard-api/src/dev_sensorthings/sensor.rs b/crates/jacquard-api/src/dev_sensorthings/sensor.rs index 82b58c8fc..b62e8327a 100644 --- a/crates/jacquard-api/src/dev_sensorthings/sensor.rs +++ b/crates/jacquard-api/src/dev_sensorthings/sensor.rs @@ -161,51 +161,51 @@ pub mod sensor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type EncodingType; type Name; + type EncodingType; + 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 EncodingType = Unset; type Name = Unset; + type EncodingType = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type EncodingType = St::EncodingType; - type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `encoding_type` field to Set pub struct SetEncodingType(PhantomData St>); impl sealed::Sealed for SetEncodingType {} impl State for SetEncodingType { - type CreatedAt = St::CreatedAt; - type EncodingType = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type EncodingType = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; type EncodingType = St::EncodingType; - type Name = 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 `encoding_type` field - pub struct encoding_type(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `encoding_type` field + pub struct encoding_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -320,9 +320,9 @@ where impl SensorBuilder where St: sensor_state::State, - St::CreatedAt: sensor_state::IsSet, - St::EncodingType: sensor_state::IsSet, St::Name: sensor_state::IsSet, + St::EncodingType: sensor_state::IsSet, + St::CreatedAt: sensor_state::IsSet, { /// Build the final struct. pub fn build(self) -> Sensor { diff --git a/crates/jacquard-api/src/dev_tsunagite/chart.rs b/crates/jacquard-api/src/dev_tsunagite/chart.rs index 473439794..19713e27a 100644 --- a/crates/jacquard-api/src/dev_tsunagite/chart.rs +++ b/crates/jacquard-api/src/dev_tsunagite/chart.rs @@ -188,67 +188,67 @@ pub mod chart_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Game; + type Difficulty; type Song; type Rating; - type Difficulty; - type Game; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Game = Unset; + type Difficulty = Unset; type Song = Unset; type Rating = Unset; - type Difficulty = Unset; - type Game = Unset; + } + ///State transition - sets the `game` field to Set + pub struct SetGame(PhantomData St>); + impl sealed::Sealed for SetGame {} + impl State for SetGame { + type Game = Set; + type Difficulty = St::Difficulty; + type Song = St::Song; + type Rating = St::Rating; + } + ///State transition - sets the `difficulty` field to Set + pub struct SetDifficulty(PhantomData St>); + impl sealed::Sealed for SetDifficulty {} + impl State for SetDifficulty { + type Game = St::Game; + type Difficulty = Set; + type Song = St::Song; + type Rating = St::Rating; } ///State transition - sets the `song` field to Set pub struct SetSong(PhantomData St>); impl sealed::Sealed for SetSong {} impl State for SetSong { + type Game = St::Game; + type Difficulty = St::Difficulty; type Song = Set; type Rating = St::Rating; - type Difficulty = St::Difficulty; - type Game = St::Game; } ///State transition - sets the `rating` field to Set pub struct SetRating(PhantomData St>); impl sealed::Sealed for SetRating {} impl State for SetRating { - type Song = St::Song; - type Rating = Set; - type Difficulty = St::Difficulty; - type Game = St::Game; - } - ///State transition - sets the `difficulty` field to Set - pub struct SetDifficulty(PhantomData St>); - impl sealed::Sealed for SetDifficulty {} - impl State for SetDifficulty { - type Song = St::Song; - type Rating = St::Rating; - type Difficulty = Set; type Game = St::Game; - } - ///State transition - sets the `game` field to Set - pub struct SetGame(PhantomData St>); - impl sealed::Sealed for SetGame {} - impl State for SetGame { - type Song = St::Song; - type Rating = St::Rating; type Difficulty = St::Difficulty; - type Game = Set; + type Song = St::Song; + type Rating = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `game` field + pub struct game(()); + ///Marker type for the `difficulty` field + pub struct difficulty(()); ///Marker type for the `song` field pub struct song(()); ///Marker type for the `rating` field pub struct rating(()); - ///Marker type for the `difficulty` field - pub struct difficulty(()); - ///Marker type for the `game` field - pub struct game(()); } } @@ -403,10 +403,10 @@ where impl ChartBuilder where St: chart_state::State, + St::Game: chart_state::IsSet, + St::Difficulty: chart_state::IsSet, St::Song: chart_state::IsSet, St::Rating: chart_state::IsSet, - St::Difficulty: chart_state::IsSet, - St::Game: chart_state::IsSet, { /// Build the final struct. pub fn build(self) -> Chart { diff --git a/crates/jacquard-api/src/dev_tsunagite/game.rs b/crates/jacquard-api/src/dev_tsunagite/game.rs index c30df6ea1..894fe4815 100644 --- a/crates/jacquard-api/src/dev_tsunagite/game.rs +++ b/crates/jacquard-api/src/dev_tsunagite/game.rs @@ -402,51 +402,51 @@ pub mod enum_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Values; type Name; type Id; - type Values; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Values = Unset; type Name = Unset; type Id = Unset; - type Values = Unset; + } + ///State transition - sets the `values` field to Set + pub struct SetValues(PhantomData St>); + impl sealed::Sealed for SetValues {} + impl State for SetValues { + type Values = Set; + type Name = St::Name; + type Id = St::Id; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Values = St::Values; type Name = Set; type Id = St::Id; - type Values = St::Values; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Name = St::Name; - type Id = Set; type Values = St::Values; - } - ///State transition - sets the `values` field to Set - pub struct SetValues(PhantomData St>); - impl sealed::Sealed for SetValues {} - impl State for SetValues { type Name = St::Name; - type Id = St::Id; - type Values = Set; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `values` field + pub struct values(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `values` field - pub struct values(()); } } @@ -535,9 +535,9 @@ where impl EnumBuilder where St: enum_state::State, + St::Values: enum_state::IsSet, St::Name: enum_state::IsSet, St::Id: enum_state::IsSet, - St::Values: enum_state::IsSet, { /// Build the final struct. pub fn build(self) -> Enum { @@ -902,67 +902,67 @@ pub mod game_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DefaultComponent; type Name; type Judgments; type ScoreComponents; + type DefaultComponent; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DefaultComponent = Unset; type Name = Unset; type Judgments = Unset; type ScoreComponents = Unset; - } - ///State transition - sets the `default_component` field to Set - pub struct SetDefaultComponent(PhantomData St>); - impl sealed::Sealed for SetDefaultComponent {} - impl State for SetDefaultComponent { - type DefaultComponent = Set; - type Name = St::Name; - type Judgments = St::Judgments; - type ScoreComponents = St::ScoreComponents; + type DefaultComponent = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type DefaultComponent = St::DefaultComponent; type Name = Set; type Judgments = St::Judgments; type ScoreComponents = St::ScoreComponents; + type DefaultComponent = St::DefaultComponent; } ///State transition - sets the `judgments` field to Set pub struct SetJudgments(PhantomData St>); impl sealed::Sealed for SetJudgments {} impl State for SetJudgments { - type DefaultComponent = St::DefaultComponent; type Name = St::Name; type Judgments = Set; type ScoreComponents = St::ScoreComponents; + type DefaultComponent = St::DefaultComponent; } ///State transition - sets the `score_components` field to Set pub struct SetScoreComponents(PhantomData St>); impl sealed::Sealed for SetScoreComponents {} impl State for SetScoreComponents { - type DefaultComponent = St::DefaultComponent; type Name = St::Name; type Judgments = St::Judgments; type ScoreComponents = Set; + type DefaultComponent = St::DefaultComponent; + } + ///State transition - sets the `default_component` field to Set + pub struct SetDefaultComponent(PhantomData St>); + impl sealed::Sealed for SetDefaultComponent {} + impl State for SetDefaultComponent { + type Name = St::Name; + type Judgments = St::Judgments; + type ScoreComponents = St::ScoreComponents; + type DefaultComponent = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `default_component` field - pub struct default_component(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `judgments` field pub struct judgments(()); ///Marker type for the `score_components` field pub struct score_components(()); + ///Marker type for the `default_component` field + pub struct default_component(()); } } @@ -1117,10 +1117,10 @@ where impl GameBuilder where St: game_state::State, - St::DefaultComponent: game_state::IsSet, St::Name: game_state::IsSet, St::Judgments: game_state::IsSet, St::ScoreComponents: game_state::IsSet, + St::DefaultComponent: game_state::IsSet, { /// Build the final struct. pub fn build(self) -> Game { @@ -1168,67 +1168,67 @@ pub mod percentage_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Id; type Name; type Precision; type Maximum; - type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Id = Unset; type Name = Unset; type Precision = Unset; type Maximum = Unset; - type Id = Unset; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; + type Name = St::Name; + type Precision = St::Precision; + type Maximum = St::Maximum; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Id = St::Id; type Name = Set; type Precision = St::Precision; type Maximum = St::Maximum; - type Id = St::Id; } ///State transition - sets the `precision` field to Set pub struct SetPrecision(PhantomData St>); impl sealed::Sealed for SetPrecision {} impl State for SetPrecision { + type Id = St::Id; type Name = St::Name; type Precision = Set; type Maximum = St::Maximum; - type Id = St::Id; } ///State transition - sets the `maximum` field to Set pub struct SetMaximum(PhantomData St>); impl sealed::Sealed for SetMaximum {} impl State for SetMaximum { - type Name = St::Name; - type Precision = St::Precision; - type Maximum = Set; type Id = St::Id; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { type Name = St::Name; type Precision = St::Precision; - type Maximum = St::Maximum; - type Id = Set; + type Maximum = 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 `name` field pub struct name(()); ///Marker type for the `precision` field pub struct precision(()); ///Marker type for the `maximum` field pub struct maximum(()); - ///Marker type for the `id` field - pub struct id(()); } } @@ -1336,10 +1336,10 @@ where impl PercentageBuilder where St: percentage_state::State, + St::Id: percentage_state::IsSet, St::Name: percentage_state::IsSet, St::Precision: percentage_state::IsSet, St::Maximum: percentage_state::IsSet, - St::Id: percentage_state::IsSet, { /// Build the final struct. pub fn build(self) -> Percentage { @@ -1376,37 +1376,37 @@ pub mod points_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Id; + 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 Id = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Id = St::Id; + type Name = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Name = St::Name; type Id = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Id = St::Id; + 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 `id` field pub struct id(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -1489,8 +1489,8 @@ where impl PointsBuilder where St: points_state::State, - St::Name: points_state::IsSet, St::Id: points_state::IsSet, + St::Name: points_state::IsSet, { /// Build the final struct. pub fn build(self) -> Points { @@ -1522,37 +1522,37 @@ pub mod text_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Name; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type Name = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type Name = St::Name; + type Id = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Id = St::Id; type Name = Set; + type Id = St::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Name = St::Name; + type Id = 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 `name` field pub struct name(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -1622,8 +1622,8 @@ where impl TextBuilder where St: text_state::State, - St::Id: text_state::IsSet, St::Name: text_state::IsSet, + St::Id: text_state::IsSet, { /// Build the final struct. pub fn build(self) -> Text { diff --git a/crates/jacquard-api/src/dev_tsunagite/song.rs b/crates/jacquard-api/src/dev_tsunagite/song.rs index 6bb3780d4..4ae57221f 100644 --- a/crates/jacquard-api/src/dev_tsunagite/song.rs +++ b/crates/jacquard-api/src/dev_tsunagite/song.rs @@ -178,49 +178,49 @@ pub mod song_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Composer; type Title; + type Composer; type Game; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Composer = Unset; type Title = Unset; + type Composer = Unset; type Game = Unset; } - ///State transition - sets the `composer` field to Set - pub struct SetComposer(PhantomData St>); - impl sealed::Sealed for SetComposer {} - impl State for SetComposer { - type Composer = Set; - type Title = St::Title; - type Game = St::Game; - } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Composer = St::Composer; type Title = Set; + type Composer = St::Composer; + type Game = St::Game; + } + ///State transition - sets the `composer` field to Set + pub struct SetComposer(PhantomData St>); + impl sealed::Sealed for SetComposer {} + impl State for SetComposer { + type Title = St::Title; + type Composer = Set; type Game = St::Game; } ///State transition - sets the `game` field to Set pub struct SetGame(PhantomData St>); impl sealed::Sealed for SetGame {} impl State for SetGame { - type Composer = St::Composer; type Title = St::Title; + type Composer = St::Composer; type Game = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `composer` field - pub struct composer(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `composer` field + pub struct composer(()); ///Marker type for the `game` field pub struct game(()); } @@ -385,8 +385,8 @@ where impl SongBuilder where St: song_state::State, - St::Composer: song_state::IsSet, St::Title: song_state::IsSet, + St::Composer: song_state::IsSet, St::Game: song_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/dev_tsunagite/types.rs b/crates/jacquard-api/src/dev_tsunagite/types.rs index 8a3170beb..bbecc2a17 100644 --- a/crates/jacquard-api/src/dev_tsunagite/types.rs +++ b/crates/jacquard-api/src/dev_tsunagite/types.rs @@ -116,51 +116,51 @@ pub mod indexable_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; - type Name; type Id; + type Name; + 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 Name = Unset; type Id = Unset; + type Name = Unset; + type Index = Unset; } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData St>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; type Name = St::Name; - type Id = St::Id; + type Index = St::Index; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Index = St::Index; - type Name = Set; type Id = St::Id; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { + type Name = Set; type Index = St::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData St>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Id = St::Id; type Name = St::Name; - type Id = Set; + 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 `name` field - pub struct name(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -249,9 +249,9 @@ where impl IndexableBuilder where St: indexable_state::State, - St::Index: indexable_state::IsSet, - St::Name: indexable_state::IsSet, St::Id: indexable_state::IsSet, + St::Name: indexable_state::IsSet, + St::Index: indexable_state::IsSet, { /// Build the final struct. pub fn build(self) -> Indexable { diff --git a/crates/jacquard-api/src/dev_vielle/guestbook/entry.rs b/crates/jacquard-api/src/dev_vielle/guestbook/entry.rs index c65276a4f..45f29af1a 100644 --- a/crates/jacquard-api/src/dev_vielle/guestbook/entry.rs +++ b/crates/jacquard-api/src/dev_vielle/guestbook/entry.rs @@ -111,37 +111,37 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Book; type Contents; + type Book; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Book = Unset; type Contents = Unset; - } - ///State transition - sets the `book` field to Set - pub struct SetBook(PhantomData St>); - impl sealed::Sealed for SetBook {} - impl State for SetBook { - type Book = Set; - type Contents = St::Contents; + type Book = Unset; } ///State transition - sets the `contents` field to Set pub struct SetContents(PhantomData St>); impl sealed::Sealed for SetContents {} impl State for SetContents { - type Book = St::Book; type Contents = Set; + type Book = St::Book; + } + ///State transition - sets the `book` field to Set + pub struct SetBook(PhantomData St>); + impl sealed::Sealed for SetBook {} + impl State for SetBook { + type Contents = St::Contents; + type Book = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `book` field - pub struct book(()); ///Marker type for the `contents` field pub struct contents(()); + ///Marker type for the `book` field + pub struct book(()); } } @@ -211,8 +211,8 @@ where impl EntryBuilder where St: entry_state::State, - St::Book: entry_state::IsSet, St::Contents: entry_state::IsSet, + St::Book: entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> Entry { diff --git a/crates/jacquard-api/src/directory_evnt/event.rs b/crates/jacquard-api/src/directory_evnt/event.rs index c672c7532..31b4f830e 100644 --- a/crates/jacquard-api/src/directory_evnt/event.rs +++ b/crates/jacquard-api/src/directory_evnt/event.rs @@ -797,37 +797,37 @@ pub mod event_component_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Data; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Data = Unset; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Data = St::Data; + type Type = Unset; } ///State transition - sets the `data` field to Set pub struct SetData(PhantomData St>); impl sealed::Sealed for SetData {} impl State for SetData { - type Type = St::Type; type Data = Set; + type Type = St::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Data = St::Data; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `data` field pub struct data(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -897,8 +897,8 @@ where impl EventComponentBuilder where St: event_component_state::State, - St::Type: event_component_state::IsSet, St::Data: event_component_state::IsSet, + St::Type: event_component_state::IsSet, { /// Build the final struct. pub fn build(self) -> EventComponent { @@ -1116,51 +1116,51 @@ pub mod physical_venue_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Name; type Type; type Id; - 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 Type = Unset; type Id = Unset; - type Name = Unset; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; + type Type = St::Type; + type Id = St::Id; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { + type Name = St::Name; type Type = Set; type Id = St::Id; - type Name = St::Name; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Type = St::Type; - type Id = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type Type = St::Type; - type Id = St::Id; - type Name = Set; + type Id = 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 `type` field pub struct r#type(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `name` field - pub struct name(()); } } @@ -1275,9 +1275,9 @@ where impl PhysicalVenueBuilder where St: physical_venue_state::State, + St::Name: physical_venue_state::IsSet, St::Type: physical_venue_state::IsSet, St::Id: physical_venue_state::IsSet, - St::Name: physical_venue_state::IsSet, { /// Build the final struct. pub fn build(self) -> PhysicalVenue { @@ -1316,51 +1316,51 @@ pub mod unknown_venue_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Name; type Id; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Name = Unset; type Id = Unset; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Name = St::Name; - type Id = St::Id; + type Type = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Type = St::Type; type Name = Set; type Id = St::Id; + type Type = St::Type; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Type = St::Type; type Name = St::Name; type Id = Set; + type Type = St::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Name = St::Name; + type Id = St::Id; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -1449,9 +1449,9 @@ where impl UnknownVenueBuilder where St: unknown_venue_state::State, - St::Type: unknown_venue_state::IsSet, St::Name: unknown_venue_state::IsSet, St::Id: unknown_venue_state::IsSet, + St::Type: unknown_venue_state::IsSet, { /// Build the final struct. pub fn build(self) -> UnknownVenue { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/fact.rs b/crates/jacquard-api/src/diy_razorgirl/winter/fact.rs index a2d231dbe..b6f05fc5f 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/fact.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/fact.rs @@ -157,51 +157,51 @@ pub mod fact_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Args; - type Predicate; type CreatedAt; + type Predicate; + type Args; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Args = Unset; - type Predicate = Unset; type CreatedAt = Unset; + type Predicate = Unset; + type Args = Unset; } - ///State transition - sets the `args` field to Set - pub struct SetArgs(PhantomData St>); - impl sealed::Sealed for SetArgs {} - impl State for SetArgs { - type Args = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Predicate = St::Predicate; - type CreatedAt = St::CreatedAt; + type Args = St::Args; } ///State transition - sets the `predicate` field to Set pub struct SetPredicate(PhantomData St>); impl sealed::Sealed for SetPredicate {} impl State for SetPredicate { - type Args = St::Args; - type Predicate = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Predicate = Set; type Args = St::Args; + } + ///State transition - sets the `args` field to Set + pub struct SetArgs(PhantomData St>); + impl sealed::Sealed for SetArgs {} + impl State for SetArgs { + type CreatedAt = St::CreatedAt; type Predicate = St::Predicate; - type CreatedAt = Set; + type Args = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `args` field - pub struct args(()); - ///Marker type for the `predicate` field - pub struct predicate(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `predicate` field + pub struct predicate(()); + ///Marker type for the `args` field + pub struct args(()); } } @@ -364,9 +364,9 @@ impl FactBuilder { impl FactBuilder where St: fact_state::State, - St::Args: fact_state::IsSet, - St::Predicate: fact_state::IsSet, St::CreatedAt: fact_state::IsSet, + St::Predicate: fact_state::IsSet, + St::Args: fact_state::IsSet, { /// Build the final struct. pub fn build(self) -> Fact { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/job.rs b/crates/jacquard-api/src/diy_razorgirl/winter/job.rs index 9f646afa0..79232a6f7 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/job.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/job.rs @@ -576,67 +576,67 @@ pub mod job_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Schedule; type Instructions; - type Name; + type Schedule; type CreatedAt; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Schedule = Unset; type Instructions = Unset; - type Name = Unset; + type Schedule = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `schedule` field to Set - pub struct SetSchedule(PhantomData St>); - impl sealed::Sealed for SetSchedule {} - impl State for SetSchedule { - type Schedule = Set; - type Instructions = St::Instructions; - type Name = St::Name; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `instructions` field to Set pub struct SetInstructions(PhantomData St>); impl sealed::Sealed for SetInstructions {} impl State for SetInstructions { - type Schedule = St::Schedule; type Instructions = Set; - type Name = St::Name; + type Schedule = St::Schedule; type CreatedAt = St::CreatedAt; + type Name = St::Name; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Schedule = St::Schedule; + ///State transition - sets the `schedule` field to Set + pub struct SetSchedule(PhantomData St>); + impl sealed::Sealed for SetSchedule {} + impl State for SetSchedule { type Instructions = St::Instructions; - type Name = Set; + type Schedule = Set; type CreatedAt = St::CreatedAt; + type Name = St::Name; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Schedule = St::Schedule; type Instructions = St::Instructions; - type Name = St::Name; + type Schedule = St::Schedule; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Instructions = St::Instructions; + type Schedule = St::Schedule; + type CreatedAt = St::CreatedAt; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `schedule` field - pub struct schedule(()); ///Marker type for the `instructions` field pub struct instructions(()); - ///Marker type for the `name` field - pub struct name(()); + ///Marker type for the `schedule` field + pub struct schedule(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -802,10 +802,10 @@ impl JobBuilder { impl JobBuilder where St: job_state::State, - St::Schedule: job_state::IsSet, St::Instructions: job_state::IsSet, - St::Name: job_state::IsSet, + St::Schedule: job_state::IsSet, St::CreatedAt: job_state::IsSet, + St::Name: job_state::IsSet, { /// Build the final struct. pub fn build(self) -> Job { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/note.rs b/crates/jacquard-api/src/diy_razorgirl/winter/note.rs index aa9127758..8ac5fbae1 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/note.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/note.rs @@ -162,67 +162,67 @@ pub mod note_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type LastUpdated; + type CreatedAt; type Content; type Title; - type CreatedAt; - type LastUpdated; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type LastUpdated = Unset; + type CreatedAt = Unset; type Content = Unset; type Title = Unset; - type CreatedAt = Unset; - type LastUpdated = Unset; + } + ///State transition - sets the `last_updated` field to Set + pub struct SetLastUpdated(PhantomData St>); + impl sealed::Sealed for SetLastUpdated {} + impl State for SetLastUpdated { + type LastUpdated = Set; + type CreatedAt = St::CreatedAt; + type Content = St::Content; + type Title = St::Title; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type LastUpdated = St::LastUpdated; + type CreatedAt = Set; + type Content = St::Content; + type Title = St::Title; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { + type LastUpdated = St::LastUpdated; + type CreatedAt = St::CreatedAt; type Content = Set; type Title = St::Title; - type CreatedAt = St::CreatedAt; - type LastUpdated = St::LastUpdated; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Content = St::Content; - type Title = Set; - type CreatedAt = St::CreatedAt; - type LastUpdated = St::LastUpdated; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Content = St::Content; - type Title = St::Title; - type CreatedAt = Set; type LastUpdated = St::LastUpdated; - } - ///State transition - sets the `last_updated` field to Set - pub struct SetLastUpdated(PhantomData St>); - impl sealed::Sealed for SetLastUpdated {} - impl State for SetLastUpdated { - type Content = St::Content; - type Title = St::Title; type CreatedAt = St::CreatedAt; - type LastUpdated = Set; + type Content = St::Content; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `last_updated` field + pub struct last_updated(()); + ///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 `created_at` field - pub struct created_at(()); - ///Marker type for the `last_updated` field - pub struct last_updated(()); } } @@ -377,10 +377,10 @@ where impl NoteBuilder where St: note_state::State, + St::LastUpdated: note_state::IsSet, + St::CreatedAt: note_state::IsSet, St::Content: note_state::IsSet, St::Title: note_state::IsSet, - St::CreatedAt: note_state::IsSet, - St::LastUpdated: note_state::IsSet, { /// Build the final struct. pub fn build(self) -> Note { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/thought.rs b/crates/jacquard-api/src/diy_razorgirl/winter/thought.rs index 7eba1d459..7d44aa723 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/thought.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/thought.rs @@ -239,51 +239,51 @@ pub mod thought_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Kind; type CreatedAt; + type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Content = Unset; type Kind = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Kind = St::Kind; - type CreatedAt = St::CreatedAt; + type Content = Unset; } ///State transition - sets the `kind` field to Set pub struct SetKind(PhantomData St>); impl sealed::Sealed for SetKind {} impl State for SetKind { - type Content = St::Content; type Kind = Set; type CreatedAt = St::CreatedAt; + type Content = St::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; type Kind = St::Kind; type CreatedAt = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Kind = St::Kind; + type CreatedAt = St::CreatedAt; + type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `kind` field pub struct kind(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -418,9 +418,9 @@ impl ThoughtBuilder { impl ThoughtBuilder where St: thought_state::State, - St::Content: thought_state::IsSet, St::Kind: thought_state::IsSet, St::CreatedAt: thought_state::IsSet, + St::Content: thought_state::IsSet, { /// Build the final struct. pub fn build(self) -> Thought { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/tool.rs b/crates/jacquard-api/src/diy_razorgirl/winter/tool.rs index 7acfdc68e..7dad02359 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/tool.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/tool.rs @@ -164,85 +164,85 @@ pub mod tool_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; - type Name; - type Code; type InputSchema; + type Code; + type Description; type CreatedAt; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; - type Name = Unset; - type Code = Unset; type InputSchema = Unset; + type Code = Unset; + type Description = Unset; type CreatedAt = Unset; + type Name = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; - type Name = St::Name; + ///State transition - sets the `input_schema` field to Set + pub struct SetInputSchema(PhantomData St>); + impl sealed::Sealed for SetInputSchema {} + impl State for SetInputSchema { + type InputSchema = Set; type Code = St::Code; - type InputSchema = St::InputSchema; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type Description = St::Description; - type Name = Set; - type Code = St::Code; - type InputSchema = St::InputSchema; type CreatedAt = St::CreatedAt; + type Name = St::Name; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData St>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type Description = St::Description; - type Name = St::Name; - type Code = Set; type InputSchema = St::InputSchema; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `input_schema` field to Set - pub struct SetInputSchema(PhantomData St>); - impl sealed::Sealed for SetInputSchema {} - impl State for SetInputSchema { + type Code = Set; type Description = St::Description; + type CreatedAt = St::CreatedAt; type Name = St::Name; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type InputSchema = St::InputSchema; type Code = St::Code; - type InputSchema = Set; + type Description = Set; type CreatedAt = St::CreatedAt; + type Name = St::Name; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type InputSchema = St::InputSchema; + type Code = St::Code; type Description = St::Description; + type CreatedAt = Set; type Name = St::Name; - type Code = St::Code; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { type InputSchema = St::InputSchema; - type CreatedAt = Set; + type Code = St::Code; + type Description = St::Description; + type CreatedAt = St::CreatedAt; + type Name = 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 `name` field - pub struct name(()); - ///Marker type for the `code` field - pub struct code(()); ///Marker type for the `input_schema` field pub struct input_schema(()); + ///Marker type for the `code` field + pub struct code(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -486,11 +486,11 @@ impl ToolBuilder { impl ToolBuilder where St: tool_state::State, - St::Description: tool_state::IsSet, - St::Name: tool_state::IsSet, - St::Code: tool_state::IsSet, St::InputSchema: tool_state::IsSet, + St::Code: tool_state::IsSet, + St::Description: tool_state::IsSet, St::CreatedAt: tool_state::IsSet, + St::Name: tool_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tool { diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/wiki_entry.rs b/crates/jacquard-api/src/diy_razorgirl/winter/wiki_entry.rs index 33cae6b27..8b29dd96b 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/wiki_entry.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/wiki_entry.rs @@ -271,8 +271,8 @@ pub mod wiki_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type LastUpdated; type Title; + type LastUpdated; type Slug; type CreatedAt; type Content; @@ -281,28 +281,28 @@ pub mod wiki_entry_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type LastUpdated = Unset; type Title = Unset; + type LastUpdated = Unset; type Slug = Unset; type CreatedAt = Unset; type Content = Unset; } - ///State transition - sets the `last_updated` field to Set - pub struct SetLastUpdated(PhantomData St>); - impl sealed::Sealed for SetLastUpdated {} - impl State for SetLastUpdated { - type LastUpdated = Set; - type Title = St::Title; - type Slug = St::Slug; - type CreatedAt = St::CreatedAt; - type Content = St::Content; - } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type LastUpdated = St::LastUpdated; type Title = Set; + type LastUpdated = St::LastUpdated; + type Slug = St::Slug; + type CreatedAt = St::CreatedAt; + type Content = St::Content; + } + ///State transition - sets the `last_updated` field to Set + pub struct SetLastUpdated(PhantomData St>); + impl sealed::Sealed for SetLastUpdated {} + impl State for SetLastUpdated { + type Title = St::Title; + type LastUpdated = Set; type Slug = St::Slug; type CreatedAt = St::CreatedAt; type Content = St::Content; @@ -311,8 +311,8 @@ pub mod wiki_entry_state { pub struct SetSlug(PhantomData St>); impl sealed::Sealed for SetSlug {} impl State for SetSlug { - type LastUpdated = St::LastUpdated; type Title = St::Title; + type LastUpdated = St::LastUpdated; type Slug = Set; type CreatedAt = St::CreatedAt; type Content = St::Content; @@ -321,8 +321,8 @@ pub mod wiki_entry_state { pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type LastUpdated = St::LastUpdated; type Title = St::Title; + type LastUpdated = St::LastUpdated; type Slug = St::Slug; type CreatedAt = Set; type Content = St::Content; @@ -331,8 +331,8 @@ pub mod wiki_entry_state { pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type LastUpdated = St::LastUpdated; type Title = St::Title; + type LastUpdated = St::LastUpdated; type Slug = St::Slug; type CreatedAt = St::CreatedAt; type Content = Set; @@ -340,10 +340,10 @@ pub mod wiki_entry_state { /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `last_updated` field - pub struct last_updated(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `last_updated` field + pub struct last_updated(()); ///Marker type for the `slug` field pub struct slug(()); ///Marker type for the `created_at` field @@ -552,8 +552,8 @@ where impl WikiEntryBuilder where St: wiki_entry_state::State, - St::LastUpdated: wiki_entry_state::IsSet, St::Title: wiki_entry_state::IsSet, + St::LastUpdated: wiki_entry_state::IsSet, St::Slug: wiki_entry_state::IsSet, St::CreatedAt: wiki_entry_state::IsSet, St::Content: wiki_entry_state::IsSet, diff --git a/crates/jacquard-api/src/diy_razorgirl/winter/wiki_link.rs b/crates/jacquard-api/src/diy_razorgirl/winter/wiki_link.rs index 3f92e3a19..e4845eb5a 100644 --- a/crates/jacquard-api/src/diy_razorgirl/winter/wiki_link.rs +++ b/crates/jacquard-api/src/diy_razorgirl/winter/wiki_link.rs @@ -238,67 +238,67 @@ pub mod wiki_link_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; type Target; - type CreatedAt; + type Source; type LinkType; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Source = Unset; type Target = Unset; - type CreatedAt = Unset; + type Source = Unset; type LinkType = Unset; - } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData St>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; - type Target = St::Target; - type CreatedAt = St::CreatedAt; - type LinkType = St::LinkType; + type CreatedAt = Unset; } ///State transition - sets the `target` field to Set pub struct SetTarget(PhantomData St>); impl sealed::Sealed for SetTarget {} impl State for SetTarget { - type Source = St::Source; type Target = Set; - type CreatedAt = St::CreatedAt; + type Source = St::Source; type LinkType = St::LinkType; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Source = St::Source; + ///State transition - sets the `source` field to Set + pub struct SetSource(PhantomData St>); + impl sealed::Sealed for SetSource {} + impl State for SetSource { type Target = St::Target; - type CreatedAt = Set; + type Source = Set; type LinkType = St::LinkType; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `link_type` field to Set pub struct SetLinkType(PhantomData St>); impl sealed::Sealed for SetLinkType {} impl State for SetLinkType { - type Source = St::Source; type Target = St::Target; - type CreatedAt = St::CreatedAt; + type Source = St::Source; type LinkType = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Target = St::Target; + type Source = St::Source; + type LinkType = St::LinkType; + type CreatedAt = 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 `target` field pub struct target(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `source` field + pub struct source(()); ///Marker type for the `link_type` field pub struct link_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -453,10 +453,10 @@ impl WikiLinkBuilder { impl WikiLinkBuilder where St: wiki_link_state::State, - St::Source: wiki_link_state::IsSet, St::Target: wiki_link_state::IsSet, - St::CreatedAt: wiki_link_state::IsSet, + St::Source: wiki_link_state::IsSet, St::LinkType: wiki_link_state::IsSet, + St::CreatedAt: wiki_link_state::IsSet, { /// Build the final struct. pub fn build(self) -> WikiLink { diff --git a/crates/jacquard-api/src/download_darkworld/site/get_state.rs b/crates/jacquard-api/src/download_darkworld/site/get_state.rs index 7de8d7e26..8f99d4b0b 100644 --- a/crates/jacquard-api/src/download_darkworld/site/get_state.rs +++ b/crates/jacquard-api/src/download_darkworld/site/get_state.rs @@ -194,107 +194,107 @@ pub mod output_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type FavoriteGames; + type TitleColors; + type UseSusieProphecy; + type FavoriteArtists; type FavoriteDeltaruneCharacters; type FavoriteAlbums; - type FavoriteArtists; - type UseSusieProphecy; - type TitleColors; - type FavoriteGames; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type FavoriteGames = Unset; + type TitleColors = Unset; + type UseSusieProphecy = Unset; + type FavoriteArtists = Unset; type FavoriteDeltaruneCharacters = Unset; type FavoriteAlbums = Unset; - type FavoriteArtists = Unset; - type UseSusieProphecy = Unset; - type TitleColors = Unset; - type FavoriteGames = Unset; } - ///State transition - sets the `favorite_deltarune_characters` field to Set - pub struct SetFavoriteDeltaruneCharacters( - PhantomData St>, - ); - impl sealed::Sealed for SetFavoriteDeltaruneCharacters {} - impl State for SetFavoriteDeltaruneCharacters { - type FavoriteDeltaruneCharacters = Set; - type FavoriteAlbums = St::FavoriteAlbums; - type FavoriteArtists = St::FavoriteArtists; - type UseSusieProphecy = St::UseSusieProphecy; + ///State transition - sets the `favorite_games` field to Set + pub struct SetFavoriteGames(PhantomData St>); + impl sealed::Sealed for SetFavoriteGames {} + impl State for SetFavoriteGames { + type FavoriteGames = Set; type TitleColors = St::TitleColors; - type FavoriteGames = St::FavoriteGames; - } - ///State transition - sets the `favorite_albums` field to Set - pub struct SetFavoriteAlbums(PhantomData St>); - impl sealed::Sealed for SetFavoriteAlbums {} - impl State for SetFavoriteAlbums { - type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; - type FavoriteAlbums = Set; - type FavoriteArtists = St::FavoriteArtists; type UseSusieProphecy = St::UseSusieProphecy; - type TitleColors = St::TitleColors; - type FavoriteGames = St::FavoriteGames; - } - ///State transition - sets the `favorite_artists` field to Set - pub struct SetFavoriteArtists(PhantomData St>); - impl sealed::Sealed for SetFavoriteArtists {} - impl State for SetFavoriteArtists { + type FavoriteArtists = St::FavoriteArtists; type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; type FavoriteAlbums = St::FavoriteAlbums; - type FavoriteArtists = Set; - type UseSusieProphecy = St::UseSusieProphecy; - type TitleColors = St::TitleColors; + } + ///State transition - sets the `title_colors` field to Set + pub struct SetTitleColors(PhantomData St>); + impl sealed::Sealed for SetTitleColors {} + impl State for SetTitleColors { type FavoriteGames = St::FavoriteGames; + type TitleColors = Set; + type UseSusieProphecy = St::UseSusieProphecy; + type FavoriteArtists = St::FavoriteArtists; + type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; + type FavoriteAlbums = St::FavoriteAlbums; } ///State transition - sets the `use_susie_prophecy` field to Set pub struct SetUseSusieProphecy(PhantomData St>); impl sealed::Sealed for SetUseSusieProphecy {} impl State for SetUseSusieProphecy { - type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; - type FavoriteAlbums = St::FavoriteAlbums; - type FavoriteArtists = St::FavoriteArtists; - type UseSusieProphecy = Set; - type TitleColors = St::TitleColors; type FavoriteGames = St::FavoriteGames; - } - ///State transition - sets the `title_colors` field to Set - pub struct SetTitleColors(PhantomData St>); - impl sealed::Sealed for SetTitleColors {} - impl State for SetTitleColors { + type TitleColors = St::TitleColors; + type UseSusieProphecy = Set; + type FavoriteArtists = St::FavoriteArtists; type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; type FavoriteAlbums = St::FavoriteAlbums; - type FavoriteArtists = St::FavoriteArtists; - type UseSusieProphecy = St::UseSusieProphecy; - type TitleColors = Set; - type FavoriteGames = St::FavoriteGames; } - ///State transition - sets the `favorite_games` field to Set - pub struct SetFavoriteGames(PhantomData St>); - impl sealed::Sealed for SetFavoriteGames {} - impl State for SetFavoriteGames { + ///State transition - sets the `favorite_artists` field to Set + pub struct SetFavoriteArtists(PhantomData St>); + impl sealed::Sealed for SetFavoriteArtists {} + impl State for SetFavoriteArtists { + type FavoriteGames = St::FavoriteGames; + type TitleColors = St::TitleColors; + type UseSusieProphecy = St::UseSusieProphecy; + type FavoriteArtists = Set; type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; type FavoriteAlbums = St::FavoriteAlbums; - type FavoriteArtists = St::FavoriteArtists; + } + ///State transition - sets the `favorite_deltarune_characters` field to Set + pub struct SetFavoriteDeltaruneCharacters( + PhantomData St>, + ); + impl sealed::Sealed for SetFavoriteDeltaruneCharacters {} + impl State for SetFavoriteDeltaruneCharacters { + type FavoriteGames = St::FavoriteGames; + type TitleColors = St::TitleColors; type UseSusieProphecy = St::UseSusieProphecy; + type FavoriteArtists = St::FavoriteArtists; + type FavoriteDeltaruneCharacters = Set; + type FavoriteAlbums = St::FavoriteAlbums; + } + ///State transition - sets the `favorite_albums` field to Set + pub struct SetFavoriteAlbums(PhantomData St>); + impl sealed::Sealed for SetFavoriteAlbums {} + impl State for SetFavoriteAlbums { + type FavoriteGames = St::FavoriteGames; type TitleColors = St::TitleColors; - type FavoriteGames = Set; + type UseSusieProphecy = St::UseSusieProphecy; + type FavoriteArtists = St::FavoriteArtists; + type FavoriteDeltaruneCharacters = St::FavoriteDeltaruneCharacters; + type FavoriteAlbums = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `favorite_games` field + pub struct favorite_games(()); + ///Marker type for the `title_colors` field + pub struct title_colors(()); + ///Marker type for the `use_susie_prophecy` field + pub struct use_susie_prophecy(()); + ///Marker type for the `favorite_artists` field + pub struct favorite_artists(()); ///Marker type for the `favorite_deltarune_characters` field pub struct favorite_deltarune_characters(()); ///Marker type for the `favorite_albums` field pub struct favorite_albums(()); - ///Marker type for the `favorite_artists` field - pub struct favorite_artists(()); - ///Marker type for the `use_susie_prophecy` field - pub struct use_susie_prophecy(()); - ///Marker type for the `title_colors` field - pub struct title_colors(()); - ///Marker type for the `favorite_games` field - pub struct favorite_games(()); } } @@ -447,12 +447,12 @@ where impl OutputBuilder where St: output_state::State, + St::FavoriteGames: output_state::IsSet, + St::TitleColors: output_state::IsSet, + St::UseSusieProphecy: output_state::IsSet, + St::FavoriteArtists: output_state::IsSet, St::FavoriteDeltaruneCharacters: output_state::IsSet, St::FavoriteAlbums: output_state::IsSet, - St::FavoriteArtists: output_state::IsSet, - St::UseSusieProphecy: output_state::IsSet, - St::TitleColors: output_state::IsSet, - St::FavoriteGames: output_state::IsSet, { /// Build the final struct. pub fn build(self) -> Output { diff --git a/crates/jacquard-api/src/download_darkworld/state.rs b/crates/jacquard-api/src/download_darkworld/state.rs index 8d1cd76a1..19d232e5f 100644 --- a/crates/jacquard-api/src/download_darkworld/state.rs +++ b/crates/jacquard-api/src/download_darkworld/state.rs @@ -257,67 +257,67 @@ pub mod favorite_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Album; type Artist; type DeltaruneCharacter; type Game; + type Album; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Album = Unset; type Artist = Unset; type DeltaruneCharacter = Unset; type Game = Unset; - } - ///State transition - sets the `album` field to Set - pub struct SetAlbum(PhantomData St>); - impl sealed::Sealed for SetAlbum {} - impl State for SetAlbum { - type Album = Set; - type Artist = St::Artist; - type DeltaruneCharacter = St::DeltaruneCharacter; - type Game = St::Game; + type Album = Unset; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { - type Album = St::Album; type Artist = Set; type DeltaruneCharacter = St::DeltaruneCharacter; type Game = St::Game; + type Album = St::Album; } ///State transition - sets the `deltarune_character` field to Set pub struct SetDeltaruneCharacter(PhantomData St>); impl sealed::Sealed for SetDeltaruneCharacter {} impl State for SetDeltaruneCharacter { - type Album = St::Album; type Artist = St::Artist; type DeltaruneCharacter = Set; type Game = St::Game; + type Album = St::Album; } ///State transition - sets the `game` field to Set pub struct SetGame(PhantomData St>); impl sealed::Sealed for SetGame {} impl State for SetGame { - type Album = St::Album; type Artist = St::Artist; type DeltaruneCharacter = St::DeltaruneCharacter; type Game = Set; + type Album = St::Album; + } + ///State transition - sets the `album` field to Set + pub struct SetAlbum(PhantomData St>); + impl sealed::Sealed for SetAlbum {} + impl State for SetAlbum { + type Artist = St::Artist; + type DeltaruneCharacter = St::DeltaruneCharacter; + type Game = St::Game; + type Album = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `album` field - pub struct album(()); ///Marker type for the `artist` field pub struct artist(()); ///Marker type for the `deltarune_character` field pub struct deltarune_character(()); ///Marker type for the `game` field pub struct game(()); + ///Marker type for the `album` field + pub struct album(()); } } @@ -425,10 +425,10 @@ where impl FavoriteBuilder where St: favorite_state::State, - St::Album: favorite_state::IsSet, St::Artist: favorite_state::IsSet, St::DeltaruneCharacter: favorite_state::IsSet, St::Game: favorite_state::IsSet, + St::Album: favorite_state::IsSet, { /// Build the final struct. pub fn build(self) -> Favorite { diff --git a/crates/jacquard-api/src/eu_atchef/recipe.rs b/crates/jacquard-api/src/eu_atchef/recipe.rs index bb3c4f8c9..cc99102f2 100644 --- a/crates/jacquard-api/src/eu_atchef/recipe.rs +++ b/crates/jacquard-api/src/eu_atchef/recipe.rs @@ -285,51 +285,51 @@ pub mod recipe_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Name; type Content; type CreatedAt; - 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 Content = Unset; type CreatedAt = Unset; - type Name = Unset; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; + type Content = St::Content; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { + type Name = St::Name; type Content = Set; type CreatedAt = St::CreatedAt; - type Name = St::Name; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = St::Content; - type CreatedAt = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type Content = St::Content; - type CreatedAt = St::CreatedAt; - type Name = Set; + 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 `content` field pub struct content(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `name` field - pub struct name(()); } } @@ -520,9 +520,9 @@ impl RecipeBuilder { impl RecipeBuilder where St: recipe_state::State, + St::Name: recipe_state::IsSet, St::Content: recipe_state::IsSet, St::CreatedAt: recipe_state::IsSet, - St::Name: recipe_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recipe { diff --git a/crates/jacquard-api/src/events_smokesignal/lfg.rs b/crates/jacquard-api/src/events_smokesignal/lfg.rs index 14e2995c6..90e306812 100644 --- a/crates/jacquard-api/src/events_smokesignal/lfg.rs +++ b/crates/jacquard-api/src/events_smokesignal/lfg.rs @@ -149,105 +149,105 @@ pub mod lfg_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Tags; type Active; - type Location; type EndsAt; + type Tags; type StartsAt; + type CreatedAt; + type Location; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type Tags = Unset; type Active = Unset; - type Location = Unset; type EndsAt = Unset; + type Tags = Unset; type StartsAt = Unset; + type CreatedAt = Unset; + type Location = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData St>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Active = Set; + type EndsAt = St::EndsAt; type Tags = St::Tags; - type Active = St::Active; + type StartsAt = St::StartsAt; + type CreatedAt = St::CreatedAt; type Location = St::Location; - type EndsAt = St::EndsAt; + } + ///State transition - sets the `ends_at` field to Set + pub struct SetEndsAt(PhantomData St>); + impl sealed::Sealed for SetEndsAt {} + impl State for SetEndsAt { + type Active = St::Active; + type EndsAt = Set; + type Tags = St::Tags; type StartsAt = St::StartsAt; + type CreatedAt = St::CreatedAt; + type Location = St::Location; } ///State transition - sets the `tags` field to Set pub struct SetTags(PhantomData St>); impl sealed::Sealed for SetTags {} impl State for SetTags { - type CreatedAt = St::CreatedAt; - type Tags = Set; type Active = St::Active; - type Location = St::Location; type EndsAt = St::EndsAt; + type Tags = Set; type StartsAt = St::StartsAt; - } - ///State transition - sets the `active` field to Set - pub struct SetActive(PhantomData St>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { type CreatedAt = St::CreatedAt; + type Location = St::Location; + } + ///State transition - sets the `starts_at` field to Set + pub struct SetStartsAt(PhantomData St>); + impl sealed::Sealed for SetStartsAt {} + impl State for SetStartsAt { + type Active = St::Active; + type EndsAt = St::EndsAt; type Tags = St::Tags; - type Active = Set; + type StartsAt = Set; + type CreatedAt = St::CreatedAt; type Location = St::Location; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Active = St::Active; type EndsAt = St::EndsAt; + type Tags = St::Tags; type StartsAt = St::StartsAt; + type CreatedAt = Set; + type Location = St::Location; } ///State transition - sets the `location` field to Set pub struct SetLocation(PhantomData St>); impl sealed::Sealed for SetLocation {} impl State for SetLocation { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; type Active = St::Active; - type Location = Set; type EndsAt = St::EndsAt; - type StartsAt = St::StartsAt; - } - ///State transition - sets the `ends_at` field to Set - pub struct SetEndsAt(PhantomData St>); - impl sealed::Sealed for SetEndsAt {} - impl State for SetEndsAt { - type CreatedAt = St::CreatedAt; type Tags = St::Tags; - type Active = St::Active; - type Location = St::Location; - type EndsAt = Set; type StartsAt = St::StartsAt; - } - ///State transition - sets the `starts_at` field to Set - pub struct SetStartsAt(PhantomData St>); - impl sealed::Sealed for SetStartsAt {} - impl State for SetStartsAt { type CreatedAt = St::CreatedAt; - type Tags = St::Tags; - type Active = St::Active; - type Location = St::Location; - type EndsAt = St::EndsAt; - type StartsAt = Set; + type Location = 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 `tags` field - pub struct tags(()); ///Marker type for the `active` field pub struct active(()); - ///Marker type for the `location` field - pub struct location(()); ///Marker type for the `ends_at` field pub struct ends_at(()); + ///Marker type for the `tags` field + pub struct tags(()); ///Marker type for the `starts_at` field pub struct starts_at(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `location` field + pub struct location(()); } } @@ -400,12 +400,12 @@ where impl LfgBuilder where St: lfg_state::State, - St::CreatedAt: lfg_state::IsSet, - St::Tags: lfg_state::IsSet, St::Active: lfg_state::IsSet, - St::Location: lfg_state::IsSet, St::EndsAt: lfg_state::IsSet, + St::Tags: lfg_state::IsSet, St::StartsAt: lfg_state::IsSet, + St::CreatedAt: lfg_state::IsSet, + St::Location: lfg_state::IsSet, { /// Build the final struct. pub fn build(self) -> Lfg { diff --git a/crates/jacquard-api/src/fm_teal/alpha/actor/status.rs b/crates/jacquard-api/src/fm_teal/alpha/actor/status.rs index d22d5a8b0..f65d5109c 100644 --- a/crates/jacquard-api/src/fm_teal/alpha/actor/status.rs +++ b/crates/jacquard-api/src/fm_teal/alpha/actor/status.rs @@ -117,37 +117,37 @@ pub mod status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Item; type Time; + type Item; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Item = Unset; type Time = Unset; - } - ///State transition - sets the `item` field to Set - pub struct SetItem(PhantomData St>); - impl sealed::Sealed for SetItem {} - impl State for SetItem { - type Item = Set; - type Time = St::Time; + type Item = Unset; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData St>); impl sealed::Sealed for SetTime {} impl State for SetTime { - type Item = St::Item; type Time = Set; + type Item = St::Item; + } + ///State transition - sets the `item` field to Set + pub struct SetItem(PhantomData St>); + impl sealed::Sealed for SetItem {} + impl State for SetItem { + type Time = St::Time; + type Item = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `item` field - pub struct item(()); ///Marker type for the `time` field pub struct time(()); + ///Marker type for the `item` field + pub struct item(()); } } @@ -230,8 +230,8 @@ where impl StatusBuilder where St: status_state::State, - St::Item: status_state::IsSet, St::Time: status_state::IsSet, + St::Item: status_state::IsSet, { /// Build the final struct. pub fn build(self) -> Status { diff --git a/crates/jacquard-api/src/fm_teal/alpha/stats.rs b/crates/jacquard-api/src/fm_teal/alpha/stats.rs index 8bf98d8f7..b393bb51d 100644 --- a/crates/jacquard-api/src/fm_teal/alpha/stats.rs +++ b/crates/jacquard-api/src/fm_teal/alpha/stats.rs @@ -127,51 +127,51 @@ pub mod artist_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Mbid; type Name; type PlayCount; + type Mbid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Mbid = Unset; type Name = Unset; type PlayCount = Unset; - } - ///State transition - sets the `mbid` field to Set - pub struct SetMbid(PhantomData St>); - impl sealed::Sealed for SetMbid {} - impl State for SetMbid { - type Mbid = Set; - type Name = St::Name; - type PlayCount = St::PlayCount; + type Mbid = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Mbid = St::Mbid; type Name = Set; type PlayCount = St::PlayCount; + type Mbid = St::Mbid; } ///State transition - sets the `play_count` field to Set pub struct SetPlayCount(PhantomData St>); impl sealed::Sealed for SetPlayCount {} impl State for SetPlayCount { - type Mbid = St::Mbid; type Name = St::Name; type PlayCount = Set; + type Mbid = St::Mbid; + } + ///State transition - sets the `mbid` field to Set + pub struct SetMbid(PhantomData St>); + impl sealed::Sealed for SetMbid {} + impl State for SetMbid { + type Name = St::Name; + type PlayCount = St::PlayCount; + type Mbid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `mbid` field - pub struct mbid(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `play_count` field pub struct play_count(()); + ///Marker type for the `mbid` field + pub struct mbid(()); } } @@ -260,9 +260,9 @@ where impl ArtistViewBuilder where St: artist_view_state::State, - St::Mbid: artist_view_state::IsSet, St::Name: artist_view_state::IsSet, St::PlayCount: artist_view_state::IsSet, + St::Mbid: artist_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ArtistView { @@ -432,51 +432,51 @@ pub mod recording_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type PlayCount; type Mbid; type Name; - type PlayCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type PlayCount = Unset; type Mbid = Unset; type Name = Unset; - type PlayCount = Unset; + } + ///State transition - sets the `play_count` field to Set + pub struct SetPlayCount(PhantomData St>); + impl sealed::Sealed for SetPlayCount {} + impl State for SetPlayCount { + type PlayCount = Set; + type Mbid = St::Mbid; + type Name = St::Name; } ///State transition - sets the `mbid` field to Set pub struct SetMbid(PhantomData St>); impl sealed::Sealed for SetMbid {} impl State for SetMbid { + type PlayCount = St::PlayCount; type Mbid = Set; type Name = St::Name; - type PlayCount = St::PlayCount; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Mbid = St::Mbid; - type Name = Set; type PlayCount = St::PlayCount; - } - ///State transition - sets the `play_count` field to Set - pub struct SetPlayCount(PhantomData St>); - impl sealed::Sealed for SetPlayCount {} - impl State for SetPlayCount { type Mbid = St::Mbid; - type Name = St::Name; - type PlayCount = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `play_count` field + pub struct play_count(()); ///Marker type for the `mbid` field pub struct mbid(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `play_count` field - pub struct play_count(()); } } @@ -565,9 +565,9 @@ where impl RecordingViewBuilder where St: recording_view_state::State, + St::PlayCount: recording_view_state::IsSet, St::Mbid: recording_view_state::IsSet, St::Name: recording_view_state::IsSet, - St::PlayCount: recording_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecordingView { @@ -602,49 +602,49 @@ pub mod release_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type PlayCount; + type Name; type Mbid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type PlayCount = Unset; + type Name = Unset; type Mbid = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type PlayCount = St::PlayCount; - type Mbid = St::Mbid; - } ///State transition - sets the `play_count` field to Set pub struct SetPlayCount(PhantomData St>); impl sealed::Sealed for SetPlayCount {} impl State for SetPlayCount { - type Name = St::Name; type PlayCount = Set; + type Name = St::Name; + type Mbid = St::Mbid; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type PlayCount = St::PlayCount; + type Name = Set; type Mbid = St::Mbid; } ///State transition - sets the `mbid` field to Set pub struct SetMbid(PhantomData St>); impl sealed::Sealed for SetMbid {} impl State for SetMbid { - type Name = St::Name; type PlayCount = St::PlayCount; + type Name = St::Name; type Mbid = 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 `play_count` field pub struct play_count(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `mbid` field pub struct mbid(()); } @@ -735,8 +735,8 @@ where impl ReleaseViewBuilder where St: release_view_state::State, - St::Name: release_view_state::IsSet, St::PlayCount: release_view_state::IsSet, + St::Name: release_view_state::IsSet, St::Mbid: release_view_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/fyi_frontpage/feed/post.rs b/crates/jacquard-api/src/fyi_frontpage/feed/post.rs index 66f4a88f2..41eefe101 100644 --- a/crates/jacquard-api/src/fyi_frontpage/feed/post.rs +++ b/crates/jacquard-api/src/fyi_frontpage/feed/post.rs @@ -165,49 +165,49 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type CreatedAt; + type Title; type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type CreatedAt = Unset; + type Title = Unset; type Subject = Unset; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Title = St::Title; type CreatedAt = Set; + type Title = St::Title; + type Subject = St::Subject; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + type Title = Set; type Subject = St::Subject; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Title = St::Title; type CreatedAt = St::CreatedAt; + type Title = St::Title; type Subject = 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 `created_at` field pub struct created_at(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `subject` field pub struct subject(()); } @@ -298,8 +298,8 @@ where impl PostBuilder where St: post_state::State, - St::Title: post_state::IsSet, St::CreatedAt: post_state::IsSet, + St::Title: post_state::IsSet, St::Subject: post_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/fyi_questionable/answer.rs b/crates/jacquard-api/src/fyi_questionable/answer.rs index 4de0d8b95..9f7b34a6b 100644 --- a/crates/jacquard-api/src/fyi_questionable/answer.rs +++ b/crates/jacquard-api/src/fyi_questionable/answer.rs @@ -128,51 +128,51 @@ pub mod answer_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Content; type Question; type CreatedAt; - type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Content = Unset; type Question = Unset; type CreatedAt = Unset; - type Content = Unset; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Content = Set; + type Question = St::Question; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `question` field to Set pub struct SetQuestion(PhantomData St>); impl sealed::Sealed for SetQuestion {} impl State for SetQuestion { + type Content = St::Content; type Question = Set; type CreatedAt = St::CreatedAt; - type Content = St::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Question = St::Question; - type CreatedAt = Set; type Content = St::Content; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { type Question = St::Question; - type CreatedAt = St::CreatedAt; - type Content = Set; + type CreatedAt = 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 `question` field pub struct question(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `content` field - pub struct content(()); } } @@ -279,9 +279,9 @@ where impl AnswerBuilder where St: answer_state::State, + St::Content: answer_state::IsSet, St::Question: answer_state::IsSet, St::CreatedAt: answer_state::IsSet, - St::Content: answer_state::IsSet, { /// Build the final struct. pub fn build(self) -> Answer { diff --git a/crates/jacquard-api/src/fyi_questionable/question.rs b/crates/jacquard-api/src/fyi_questionable/question.rs index e59ef4dce..cfe06974b 100644 --- a/crates/jacquard-api/src/fyi_questionable/question.rs +++ b/crates/jacquard-api/src/fyi_questionable/question.rs @@ -167,51 +167,51 @@ pub mod question_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Summary; 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 Summary = Unset; type Content = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Summary = St::Summary; - type Content = St::Content; + type CreatedAt = Unset; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData St>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { - type CreatedAt = St::CreatedAt; type Summary = Set; type Content = St::Content; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; type Summary = St::Summary; type Content = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Summary = St::Summary; + type Content = St::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 `summary` field pub struct summary(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -332,9 +332,9 @@ where impl QuestionBuilder where St: question_state::State, - St::CreatedAt: question_state::IsSet, St::Summary: question_state::IsSet, St::Content: question_state::IsSet, + St::CreatedAt: question_state::IsSet, { /// Build the final struct. pub fn build(self) -> Question { diff --git a/crates/jacquard-api/src/fyi_questionable/richtext/facet.rs b/crates/jacquard-api/src/fyi_questionable/richtext/facet.rs index 5fe07ddba..1149ee355 100644 --- a/crates/jacquard-api/src/fyi_questionable/richtext/facet.rs +++ b/crates/jacquard-api/src/fyi_questionable/richtext/facet.rs @@ -786,37 +786,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 St>); - impl sealed::Sealed for SetFeatures {} - impl State for SetFeatures { - type Features = Set; - type Index = St::Index; + type Features = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData St>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Features = St::Features; type Index = Set; + type Features = St::Features; + } + ///State transition - sets the `features` field to Set + pub struct SetFeatures(PhantomData St>); + impl sealed::Sealed for SetFeatures {} + impl State for SetFeatures { + type Index = St::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(()); } } @@ -886,8 +886,8 @@ where impl FacetBuilder where St: facet_state::State, - St::Features: facet_state::IsSet, St::Index: facet_state::IsSet, + St::Features: facet_state::IsSet, { /// Build the final struct. pub fn build(self) -> Facet { diff --git a/crates/jacquard-api/src/fyi_questionable/richtext/header.rs b/crates/jacquard-api/src/fyi_questionable/richtext/header.rs index 2e0ab6c0f..78e661d6c 100644 --- a/crates/jacquard-api/src/fyi_questionable/richtext/header.rs +++ b/crates/jacquard-api/src/fyi_questionable/richtext/header.rs @@ -105,37 +105,37 @@ pub mod header_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Level; type Plaintext; + type Level; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Level = Unset; type Plaintext = Unset; - } - ///State transition - sets the `level` field to Set - pub struct SetLevel(PhantomData St>); - impl sealed::Sealed for SetLevel {} - impl State for SetLevel { - type Level = Set; - type Plaintext = St::Plaintext; + type Level = Unset; } ///State transition - sets the `plaintext` field to Set pub struct SetPlaintext(PhantomData St>); impl sealed::Sealed for SetPlaintext {} impl State for SetPlaintext { - type Level = St::Level; type Plaintext = Set; + type Level = St::Level; + } + ///State transition - sets the `level` field to Set + pub struct SetLevel(PhantomData St>); + impl sealed::Sealed for SetLevel {} + impl State for SetLevel { + type Plaintext = St::Plaintext; + type Level = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `level` field - pub struct level(()); ///Marker type for the `plaintext` field pub struct plaintext(()); + ///Marker type for the `level` field + pub struct level(()); } } @@ -218,8 +218,8 @@ where impl HeaderBuilder where St: header_state::State, - St::Level: header_state::IsSet, St::Plaintext: header_state::IsSet, + St::Level: header_state::IsSet, { /// Build the final struct. pub fn build(self) -> Header { diff --git a/crates/jacquard-api/src/fyi_questionable/richtext/image.rs b/crates/jacquard-api/src/fyi_questionable/richtext/image.rs index e6efbf955..f9d098c01 100644 --- a/crates/jacquard-api/src/fyi_questionable/richtext/image.rs +++ b/crates/jacquard-api/src/fyi_questionable/richtext/image.rs @@ -150,37 +150,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = St::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = St::Width; type Height = Set; + type Width = St::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = St::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(()); } } @@ -250,8 +250,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Width: aspect_ratio_state::IsSet, St::Height: aspect_ratio_state::IsSet, + St::Width: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { @@ -367,37 +367,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AspectRatio; type Image; + type AspectRatio; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AspectRatio = Unset; type Image = Unset; - } - ///State transition - sets the `aspect_ratio` field to Set - pub struct SetAspectRatio(PhantomData St>); - impl sealed::Sealed for SetAspectRatio {} - impl State for SetAspectRatio { - type AspectRatio = Set; - type Image = St::Image; + type AspectRatio = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type AspectRatio = St::AspectRatio; type Image = Set; + type AspectRatio = St::AspectRatio; + } + ///State transition - sets the `aspect_ratio` field to Set + pub struct SetAspectRatio(PhantomData St>); + impl sealed::Sealed for SetAspectRatio {} + impl State for SetAspectRatio { + type Image = St::Image; + type AspectRatio = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `aspect_ratio` field - pub struct aspect_ratio(()); ///Marker type for the `image` field pub struct image(()); + ///Marker type for the `aspect_ratio` field + pub struct aspect_ratio(()); } } @@ -480,8 +480,8 @@ where impl ImageBuilder where St: image_state::State, - St::AspectRatio: image_state::IsSet, St::Image: image_state::IsSet, + St::AspectRatio: image_state::IsSet, { /// Build the final struct. pub fn build(self) -> Image { diff --git a/crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs b/crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs index 2f63ca28e..9d83eadfb 100644 --- a/crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs +++ b/crates/jacquard-api/src/fyi_unravel/frontpage/comment.rs @@ -142,49 +142,49 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Content; + type CreatedAt; type Post; } /// 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 CreatedAt = Unset; type Post = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Content = St::Content; - type Post = St::Post; - } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; type Content = Set; + type CreatedAt = St::CreatedAt; + type Post = St::Post; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Content = St::Content; + type CreatedAt = Set; type Post = St::Post; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData St>); impl sealed::Sealed for SetPost {} impl State for SetPost { - type CreatedAt = St::CreatedAt; type Content = St::Content; + type CreatedAt = St::CreatedAt; type Post = 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 `created_at` field + pub struct created_at(()); ///Marker type for the `post` field pub struct post(()); } @@ -288,8 +288,8 @@ where impl CommentBuilder where St: comment_state::State, - St::CreatedAt: comment_state::IsSet, St::Content: comment_state::IsSet, + St::CreatedAt: comment_state::IsSet, St::Post: comment_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/fyi_unravel/frontpage/post.rs b/crates/jacquard-api/src/fyi_unravel/frontpage/post.rs index eacaf44bc..9e66e1a3c 100644 --- a/crates/jacquard-api/src/fyi_unravel/frontpage/post.rs +++ b/crates/jacquard-api/src/fyi_unravel/frontpage/post.rs @@ -140,49 +140,49 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Url; + type CreatedAt; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Url = Unset; + type CreatedAt = Unset; type Title = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Url = St::Url; - type Title = St::Title; - } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type CreatedAt = St::CreatedAt; type Url = Set; + type CreatedAt = St::CreatedAt; + type Title = St::Title; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Url = St::Url; + type CreatedAt = Set; type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = St::CreatedAt; type Url = St::Url; + type CreatedAt = St::CreatedAt; type Title = 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 `url` field pub struct url(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); } @@ -273,8 +273,8 @@ where impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, St::Url: post_state::IsSet, + St::CreatedAt: post_state::IsSet, St::Title: post_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_firehose/barklesheep/place_sheeps.rs b/crates/jacquard-api/src/games_firehose/barklesheep/place_sheeps.rs index 1d65fc777..842462fd4 100644 --- a/crates/jacquard-api/src/games_firehose/barklesheep/place_sheeps.rs +++ b/crates/jacquard-api/src/games_firehose/barklesheep/place_sheeps.rs @@ -243,50 +243,50 @@ pub mod sheep_placement_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Horizontal; - type Start; type Type; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Horizontal = Unset; - type Start = Unset; type Type = Unset; + type Start = Unset; } ///State transition - sets the `horizontal` field to Set pub struct SetHorizontal(PhantomData St>); impl sealed::Sealed for SetHorizontal {} impl State for SetHorizontal { type Horizontal = Set; - type Start = St::Start; - type Type = St::Type; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData St>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Horizontal = St::Horizontal; - type Start = Set; type Type = St::Type; + type Start = St::Start; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { type Horizontal = St::Horizontal; - type Start = St::Start; type Type = Set; + type Start = St::Start; + } + ///State transition - sets the `start` field to Set + pub struct SetStart(PhantomData St>); + impl sealed::Sealed for SetStart {} + impl State for SetStart { + type Horizontal = St::Horizontal; + type Type = St::Type; + type Start = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `horizontal` field pub struct horizontal(()); - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -376,8 +376,8 @@ impl SheepPlacementBuilder where St: sheep_placement_state::State, St::Horizontal: sheep_placement_state::IsSet, - St::Start: sheep_placement_state::IsSet, St::Type: sheep_placement_state::IsSet, + St::Start: sheep_placement_state::IsSet, { /// Build the final struct. pub fn build(self) -> SheepPlacement { diff --git a/crates/jacquard-api/src/games_firehose/barklesheep/reaction.rs b/crates/jacquard-api/src/games_firehose/barklesheep/reaction.rs index 682569d92..d3af906ff 100644 --- a/crates/jacquard-api/src/games_firehose/barklesheep/reaction.rs +++ b/crates/jacquard-api/src/games_firehose/barklesheep/reaction.rs @@ -124,49 +124,49 @@ pub mod reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GameId; type Emoji; + type GameId; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GameId = Unset; type Emoji = Unset; + type GameId = Unset; type CreatedAt = Unset; } - ///State transition - sets the `game_id` field to Set - pub struct SetGameId(PhantomData St>); - impl sealed::Sealed for SetGameId {} - impl State for SetGameId { - type GameId = Set; - type Emoji = St::Emoji; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `emoji` field to Set pub struct SetEmoji(PhantomData St>); impl sealed::Sealed for SetEmoji {} impl State for SetEmoji { - type GameId = St::GameId; type Emoji = Set; + type GameId = St::GameId; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `game_id` field to Set + pub struct SetGameId(PhantomData St>); + impl sealed::Sealed for SetGameId {} + impl State for SetGameId { + type Emoji = St::Emoji; + type GameId = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type GameId = St::GameId; type Emoji = St::Emoji; + type GameId = St::GameId; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `game_id` field - pub struct game_id(()); ///Marker type for the `emoji` field pub struct emoji(()); + ///Marker type for the `game_id` field + pub struct game_id(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -257,8 +257,8 @@ where impl ReactionBuilder where St: reaction_state::State, - St::GameId: reaction_state::IsSet, St::Emoji: reaction_state::IsSet, + St::GameId: reaction_state::IsSet, St::CreatedAt: reaction_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames.rs index 1764442a3..817376960 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames.rs @@ -3267,37 +3267,37 @@ pub mod actor_credit_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Credits; + 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 Credits = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Credits = St::Credits; + type Uri = Unset; } ///State transition - sets the `credits` field to Set pub struct SetCredits(PhantomData St>); impl sealed::Sealed for SetCredits {} impl State for SetCredits { - type Uri = St::Uri; type Credits = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Credits = St::Credits; + 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 `credits` field pub struct credits(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -3398,8 +3398,8 @@ where impl ActorCreditViewBuilder where St: actor_credit_view_state::State, - St::Uri: actor_credit_view_state::IsSet, St::Credits: actor_credit_view_state::IsSet, + St::Uri: actor_credit_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ActorCreditView { @@ -5177,37 +5177,37 @@ pub mod actor_profile_detail_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Did; + 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 Did = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Did = St::Did; + type Uri = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Uri = St::Uri; type Did = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Did = St::Did; + 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 `did` field pub struct did(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -5416,8 +5416,8 @@ impl< impl ActorProfileDetailViewBuilder where St: actor_profile_detail_view_state::State, - St::Uri: actor_profile_detail_view_state::IsSet, St::Did: actor_profile_detail_view_state::IsSet, + St::Uri: actor_profile_detail_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ActorProfileDetailView { @@ -5947,37 +5947,37 @@ pub mod engine_summary_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Uri; + 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 Uri = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Uri = St::Uri; + type Name = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Name = St::Name; type Uri = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Uri = St::Uri; + 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 `uri` field pub struct uri(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -6060,8 +6060,8 @@ where impl EngineSummaryViewBuilder where St: engine_summary_view_state::State, - St::Name: engine_summary_view_state::IsSet, St::Uri: engine_summary_view_state::IsSet, + St::Name: engine_summary_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> EngineSummaryView { @@ -6096,51 +6096,51 @@ pub mod game_detail_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Name; type CreatedAt; type Uri; - 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 CreatedAt = Unset; type Uri = Unset; - type Name = Unset; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Name = St::Name; type CreatedAt = Set; type Uri = St::Uri; - type Name = St::Name; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type CreatedAt = St::CreatedAt; - type Uri = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type CreatedAt = St::CreatedAt; - type Uri = St::Uri; - type Name = Set; + type Uri = 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 `uri` field pub struct uri(()); - ///Marker type for the `name` field - pub struct name(()); } } @@ -6714,9 +6714,9 @@ impl GameDetailViewBuilder impl GameDetailViewBuilder where St: game_detail_view_state::State, + St::Name: game_detail_view_state::IsSet, St::CreatedAt: game_detail_view_state::IsSet, St::Uri: game_detail_view_state::IsSet, - St::Name: game_detail_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> GameDetailView { @@ -7145,51 +7145,51 @@ pub mod game_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ApplicationType; type Uri; type Name; + type ApplicationType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ApplicationType = Unset; type Uri = Unset; type Name = Unset; - } - ///State transition - sets the `application_type` field to Set - pub struct SetApplicationType(PhantomData St>); - impl sealed::Sealed for SetApplicationType {} - impl State for SetApplicationType { - type ApplicationType = Set; - type Uri = St::Uri; - type Name = St::Name; + type ApplicationType = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type ApplicationType = St::ApplicationType; type Uri = Set; type Name = St::Name; + type ApplicationType = St::ApplicationType; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type ApplicationType = St::ApplicationType; type Uri = St::Uri; type Name = Set; + type ApplicationType = St::ApplicationType; + } + ///State transition - sets the `application_type` field to Set + pub struct SetApplicationType(PhantomData St>); + impl sealed::Sealed for SetApplicationType {} + impl State for SetApplicationType { + type Uri = St::Uri; + type Name = St::Name; + type ApplicationType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `application_type` field - pub struct application_type(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `application_type` field + pub struct application_type(()); } } @@ -7424,9 +7424,9 @@ impl GameViewBuilder { impl GameViewBuilder where St: game_view_state::State, - St::ApplicationType: game_view_state::IsSet, St::Uri: game_view_state::IsSet, St::Name: game_view_state::IsSet, + St::ApplicationType: game_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> GameView { @@ -7474,37 +7474,37 @@ pub mod org_credit_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Roles; type Uri; + type Roles; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Roles = Unset; type Uri = Unset; - } - ///State transition - sets the `roles` field to Set - pub struct SetRoles(PhantomData St>); - impl sealed::Sealed for SetRoles {} - impl State for SetRoles { - type Roles = Set; - type Uri = St::Uri; + type Roles = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Roles = St::Roles; type Uri = Set; + type Roles = St::Roles; + } + ///State transition - sets the `roles` field to Set + pub struct SetRoles(PhantomData St>); + impl sealed::Sealed for SetRoles {} + impl State for SetRoles { + type Uri = St::Uri; + type Roles = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `roles` field - pub struct roles(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `roles` field + pub struct roles(()); } } @@ -7605,8 +7605,8 @@ where impl OrgCreditViewBuilder where St: org_credit_view_state::State, - St::Roles: org_credit_view_state::IsSet, St::Uri: org_credit_view_state::IsSet, + St::Roles: org_credit_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> OrgCreditView { @@ -7643,37 +7643,37 @@ pub mod org_profile_detail_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Did; + 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 Did = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Did = St::Did; + type Uri = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Uri = St::Uri; type Did = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Did = St::Did; + 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 `did` field pub struct did(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -7971,8 +7971,8 @@ impl< impl OrgProfileDetailViewBuilder where St: org_profile_detail_view_state::State, - St::Uri: org_profile_detail_view_state::IsSet, St::Did: org_profile_detail_view_state::IsSet, + St::Uri: org_profile_detail_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> OrgProfileDetailView { @@ -8027,37 +8027,37 @@ pub mod org_profile_summary_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Uri; + 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 Uri = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Uri = St::Uri; + type Did = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Did = St::Did; type Uri = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Uri = St::Uri; + 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 `uri` field pub struct uri(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -8165,8 +8165,8 @@ where impl OrgProfileSummaryViewBuilder where St: org_profile_summary_view_state::State, - St::Did: org_profile_summary_view_state::IsSet, St::Uri: org_profile_summary_view_state::IsSet, + St::Did: org_profile_summary_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> OrgProfileSummaryView { @@ -8540,49 +8540,49 @@ pub mod profile_summary_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type ProfileType; + type Uri; type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type ProfileType = Unset; + type Uri = Unset; type Did = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type ProfileType = St::ProfileType; - type Did = St::Did; - } ///State transition - sets the `profile_type` field to Set pub struct SetProfileType(PhantomData St>); impl sealed::Sealed for SetProfileType {} impl State for SetProfileType { - type Uri = St::Uri; type ProfileType = Set; + type Uri = St::Uri; + type Did = St::Did; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type ProfileType = St::ProfileType; + type Uri = Set; type Did = St::Did; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Uri = St::Uri; type ProfileType = St::ProfileType; + type Uri = St::Uri; type Did = 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 `profile_type` field pub struct profile_type(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `did` field pub struct did(()); } @@ -8705,8 +8705,8 @@ where impl ProfileSummaryViewBuilder where St: profile_summary_view_state::State, - St::Uri: profile_summary_view_state::IsSet, St::ProfileType: profile_summary_view_state::IsSet, + St::Uri: profile_summary_view_state::IsSet, St::Did: profile_summary_view_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/game.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/game.rs index cdb35f821..89f664c1f 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/game.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/game.rs @@ -395,51 +395,51 @@ pub mod game_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Platform; type CreatedAt; type Game; + type Platform; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Platform = Unset; type CreatedAt = Unset; type Game = Unset; - } - ///State transition - sets the `platform` field to Set - pub struct SetPlatform(PhantomData St>); - impl sealed::Sealed for SetPlatform {} - impl State for SetPlatform { - type Platform = Set; - type CreatedAt = St::CreatedAt; - type Game = St::Game; + type Platform = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Platform = St::Platform; type CreatedAt = Set; type Game = St::Game; + type Platform = St::Platform; } ///State transition - sets the `game` field to Set pub struct SetGame(PhantomData St>); impl sealed::Sealed for SetGame {} impl State for SetGame { - type Platform = St::Platform; type CreatedAt = St::CreatedAt; type Game = Set; + type Platform = St::Platform; + } + ///State transition - sets the `platform` field to Set + pub struct SetPlatform(PhantomData St>); + impl sealed::Sealed for SetPlatform {} + impl State for SetPlatform { + type CreatedAt = St::CreatedAt; + type Game = St::Game; + type Platform = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `platform` field - pub struct platform(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `game` field pub struct game(()); + ///Marker type for the `platform` field + pub struct platform(()); } } @@ -552,9 +552,9 @@ impl GameBuilder { impl GameBuilder where St: game_state::State, - St::Platform: game_state::IsSet, St::CreatedAt: game_state::IsSet, St::Game: game_state::IsSet, + St::Platform: game_state::IsSet, { /// Build the final struct. pub fn build(self) -> Game { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/profile.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/profile.rs index b37127e5c..2c3219c22 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/profile.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/actor/profile.rs @@ -200,37 +200,37 @@ pub mod profile_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type DisplayName; + 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 DisplayName = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type DisplayName = St::DisplayName; + type CreatedAt = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type CreatedAt = St::CreatedAt; type DisplayName = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type DisplayName = St::DisplayName; + 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 `display_name` field pub struct display_name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -376,8 +376,8 @@ impl ProfileBuilder { impl ProfileBuilder where St: profile_state::State, - St::CreatedAt: profile_state::IsSet, St::DisplayName: profile_state::IsSet, + St::CreatedAt: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/claim_review.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/claim_review.rs index 62ff020cc..a6e6b6c02 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/claim_review.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/claim_review.rs @@ -210,8 +210,8 @@ pub mod claim_review_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type ReviewedBy; type Status; + type ReviewedBy; type Claim; } /// Empty state - all required fields are unset @@ -219,8 +219,8 @@ pub mod claim_review_state { impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type ReviewedBy = Unset; type Status = Unset; + type ReviewedBy = Unset; type Claim = Unset; } ///State transition - sets the `created_at` field to Set @@ -228,17 +228,8 @@ pub mod claim_review_state { impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type ReviewedBy = St::ReviewedBy; - type Status = St::Status; - type Claim = St::Claim; - } - ///State transition - sets the `reviewed_by` field to Set - pub struct SetReviewedBy(PhantomData St>); - impl sealed::Sealed for SetReviewedBy {} - impl State for SetReviewedBy { - type CreatedAt = St::CreatedAt; - type ReviewedBy = Set; type Status = St::Status; + type ReviewedBy = St::ReviewedBy; type Claim = St::Claim; } ///State transition - sets the `status` field to Set @@ -246,8 +237,17 @@ pub mod claim_review_state { impl sealed::Sealed for SetStatus {} impl State for SetStatus { type CreatedAt = St::CreatedAt; - type ReviewedBy = St::ReviewedBy; type Status = Set; + type ReviewedBy = St::ReviewedBy; + type Claim = St::Claim; + } + ///State transition - sets the `reviewed_by` field to Set + pub struct SetReviewedBy(PhantomData St>); + impl sealed::Sealed for SetReviewedBy {} + impl State for SetReviewedBy { + type CreatedAt = St::CreatedAt; + type Status = St::Status; + type ReviewedBy = Set; type Claim = St::Claim; } ///State transition - sets the `claim` field to Set @@ -255,8 +255,8 @@ pub mod claim_review_state { impl sealed::Sealed for SetClaim {} impl State for SetClaim { type CreatedAt = St::CreatedAt; - type ReviewedBy = St::ReviewedBy; type Status = St::Status; + type ReviewedBy = St::ReviewedBy; type Claim = Set; } /// Marker types for field names @@ -264,10 +264,10 @@ pub mod claim_review_state { pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `reviewed_by` field - pub struct reviewed_by(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `reviewed_by` field + pub struct reviewed_by(()); ///Marker type for the `claim` field pub struct claim(()); } @@ -411,8 +411,8 @@ impl ClaimReviewBuilder where St: claim_review_state::State, St::CreatedAt: claim_review_state::IsSet, - St::ReviewedBy: claim_review_state::IsSet, St::Status: claim_review_state::IsSet, + St::ReviewedBy: claim_review_state::IsSet, St::Claim: claim_review_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/collection.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/collection.rs index 85957a5a6..1307a839e 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/collection.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/collection.rs @@ -208,37 +208,37 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -395,8 +395,8 @@ impl CollectionBuilder { impl CollectionBuilder where St: collection_state::State, - St::Name: collection_state::IsSet, St::CreatedAt: collection_state::IsSet, + St::Name: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/feed/generator.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/feed/generator.rs index 50fd4b47e..de8014217 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/feed/generator.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/feed/generator.rs @@ -207,50 +207,50 @@ pub mod generator_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type DisplayName; - type Did; type CreatedAt; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type DisplayName = Unset; - type Did = Unset; type CreatedAt = Unset; + type Did = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { type DisplayName = Set; - type Did = St::Did; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type DisplayName = St::DisplayName; - type Did = Set; type CreatedAt = St::CreatedAt; + type Did = St::Did; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type DisplayName = St::DisplayName; - type Did = St::Did; type CreatedAt = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type DisplayName = St::DisplayName; + type CreatedAt = St::CreatedAt; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -386,8 +386,8 @@ impl GeneratorBuilder where St: generator_state::State, St::DisplayName: generator_state::IsSet, - St::Did: generator_state::IsSet, St::CreatedAt: generator_state::IsSet, + St::Did: generator_state::IsSet, { /// Build the final struct. pub fn build(self) -> Generator { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/game.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/game.rs index 385dc5152..a06632da6 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/game.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/game.rs @@ -185,49 +185,49 @@ pub mod game_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + type Name; type ApplicationType; } /// 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 Name = Unset; type ApplicationType = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; - type ApplicationType = St::ApplicationType; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + type ApplicationType = St::ApplicationType; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + type Name = Set; type ApplicationType = St::ApplicationType; } ///State transition - sets the `application_type` field to Set pub struct SetApplicationType(PhantomData St>); impl sealed::Sealed for SetApplicationType {} impl State for SetApplicationType { - type Name = St::Name; type CreatedAt = St::CreatedAt; + type Name = St::Name; type ApplicationType = 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 `name` field + pub struct name(()); ///Marker type for the `application_type` field pub struct application_type(()); } @@ -725,8 +725,8 @@ impl GameBuilder { impl GameBuilder where St: game_state::State, - St::Name: game_state::IsSet, St::CreatedAt: game_state::IsSet, + St::Name: game_state::IsSet, St::ApplicationType: game_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/get_claim.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/get_claim.rs index 7916758e8..9eca26a29 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/get_claim.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/get_claim.rs @@ -301,85 +301,85 @@ pub mod claim_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Cid; type ClaimantDid; - type Uri; - type CreatedAt; type Type; + type CreatedAt; } /// 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 ClaimantDid = Unset; - type Uri = Unset; - type CreatedAt = Unset; type Type = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type Cid = St::Cid; + type ClaimantDid = St::ClaimantDid; + type Type = St::Type; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Uri = St::Uri; type Cid = Set; type ClaimantDid = St::ClaimantDid; - type Uri = St::Uri; - type CreatedAt = St::CreatedAt; type Type = St::Type; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `claimant_did` field to Set pub struct SetClaimantDid(PhantomData St>); impl sealed::Sealed for SetClaimantDid {} impl State for SetClaimantDid { + type Uri = St::Uri; type Cid = St::Cid; type ClaimantDid = Set; - type Uri = St::Uri; - type CreatedAt = St::CreatedAt; type Type = St::Type; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Uri = St::Uri; type Cid = St::Cid; type ClaimantDid = St::ClaimantDid; - type Uri = Set; + type Type = Set; type CreatedAt = St::CreatedAt; - type Type = St::Type; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Cid = St::Cid; - type ClaimantDid = St::ClaimantDid; type Uri = St::Uri; - type CreatedAt = Set; - type Type = St::Type; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { type Cid = St::Cid; type ClaimantDid = St::ClaimantDid; - type Uri = St::Uri; - type CreatedAt = St::CreatedAt; - type Type = Set; + type Type = St::Type; + type CreatedAt = 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 `claimant_did` field pub struct claimant_did(()); - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -582,11 +582,11 @@ where impl ClaimViewBuilder where St: claim_view_state::State, + St::Uri: claim_view_state::IsSet, St::Cid: claim_view_state::IsSet, St::ClaimantDid: claim_view_state::IsSet, - St::Uri: claim_view_state::IsSet, - St::CreatedAt: claim_view_state::IsSet, St::Type: claim_view_state::IsSet, + St::CreatedAt: claim_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ClaimView { @@ -904,8 +904,8 @@ pub mod review_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Status; - type Uri; type ReviewedBy; + type Uri; type CreatedAt; } /// Empty state - all required fields are unset @@ -913,8 +913,8 @@ pub mod review_view_state { impl sealed::Sealed for Empty {} impl State for Empty { type Status = Unset; - type Uri = Unset; type ReviewedBy = Unset; + type Uri = Unset; type CreatedAt = Unset; } ///State transition - sets the `status` field to Set @@ -922,17 +922,8 @@ pub mod review_view_state { impl sealed::Sealed for SetStatus {} impl State for SetStatus { type Status = Set; - type Uri = St::Uri; - type ReviewedBy = St::ReviewedBy; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Status = St::Status; - type Uri = Set; type ReviewedBy = St::ReviewedBy; + type Uri = St::Uri; type CreatedAt = St::CreatedAt; } ///State transition - sets the `reviewed_by` field to Set @@ -940,8 +931,17 @@ pub mod review_view_state { impl sealed::Sealed for SetReviewedBy {} impl State for SetReviewedBy { type Status = St::Status; - type Uri = St::Uri; type ReviewedBy = Set; + type Uri = St::Uri; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Status = St::Status; + type ReviewedBy = St::ReviewedBy; + type Uri = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set @@ -949,8 +949,8 @@ pub mod review_view_state { impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Status = St::Status; - type Uri = St::Uri; type ReviewedBy = St::ReviewedBy; + type Uri = St::Uri; type CreatedAt = Set; } /// Marker types for field names @@ -958,10 +958,10 @@ pub mod review_view_state { pub mod members { ///Marker type for the `status` field pub struct status(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `reviewed_by` field pub struct reviewed_by(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -1105,8 +1105,8 @@ impl ReviewViewBuilder where St: review_view_state::State, St::Status: review_view_state::IsSet, - St::Uri: review_view_state::IsSet, St::ReviewedBy: review_view_state::IsSet, + St::Uri: review_view_state::IsSet, St::CreatedAt: review_view_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/get_reviews.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/get_reviews.rs index ab1e4cb9b..0b3bda34f 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/get_reviews.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/get_reviews.rs @@ -262,66 +262,66 @@ pub mod popfeed_review_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Did; type Rating; type Uri; + type Did; } /// 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 Rating = Unset; type Uri = Unset; + type Did = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Did = St::Did; - type Rating = St::Rating; - type Uri = St::Uri; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type CreatedAt = St::CreatedAt; - type Did = Set; type Rating = St::Rating; type Uri = St::Uri; + type Did = St::Did; } ///State transition - sets the `rating` field to Set pub struct SetRating(PhantomData St>); impl sealed::Sealed for SetRating {} impl State for SetRating { type CreatedAt = St::CreatedAt; - type Did = St::Did; type Rating = Set; type Uri = St::Uri; + type Did = St::Did; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type CreatedAt = St::CreatedAt; - type Did = St::Did; type Rating = St::Rating; type Uri = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type CreatedAt = St::CreatedAt; + type Rating = St::Rating; + type Uri = St::Uri; + type Did = 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 `rating` field pub struct rating(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -505,9 +505,9 @@ impl PopfeedReviewBuilder where St: popfeed_review_state::State, St::CreatedAt: popfeed_review_state::IsSet, - St::Did: popfeed_review_state::IsSet, St::Rating: popfeed_review_state::IsSet, St::Uri: popfeed_review_state::IsSet, + St::Did: popfeed_review_state::IsSet, { /// Build the final struct. pub fn build(self) -> PopfeedReview { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/graph/like.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/graph/like.rs index a16dcecfb..a64ebcecf 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/graph/like.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/graph/like.rs @@ -113,37 +113,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -213,8 +213,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/migrate_claim.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/migrate_claim.rs index 10e0d708e..f5cfa4af8 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/migrate_claim.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/migrate_claim.rs @@ -195,37 +195,37 @@ pub mod migrate_claim_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ClaimReview; type Claim; + type ClaimReview; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ClaimReview = Unset; type Claim = Unset; - } - ///State transition - sets the `claim_review` field to Set - pub struct SetClaimReview(PhantomData St>); - impl sealed::Sealed for SetClaimReview {} - impl State for SetClaimReview { - type ClaimReview = Set; - type Claim = St::Claim; + type ClaimReview = Unset; } ///State transition - sets the `claim` field to Set pub struct SetClaim(PhantomData St>); impl sealed::Sealed for SetClaim {} impl State for SetClaim { - type ClaimReview = St::ClaimReview; type Claim = Set; + type ClaimReview = St::ClaimReview; + } + ///State transition - sets the `claim_review` field to Set + pub struct SetClaimReview(PhantomData St>); + impl sealed::Sealed for SetClaimReview {} + impl State for SetClaimReview { + type Claim = St::Claim; + type ClaimReview = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `claim_review` field - pub struct claim_review(()); ///Marker type for the `claim` field pub struct claim(()); + ///Marker type for the `claim_review` field + pub struct claim_review(()); } } @@ -295,8 +295,8 @@ where impl MigrateClaimBuilder where St: migrate_claim_state::State, - St::ClaimReview: migrate_claim_state::IsSet, St::Claim: migrate_claim_state::IsSet, + St::ClaimReview: migrate_claim_state::IsSet, { /// Build the final struct. pub fn build(self) -> MigrateClaim { @@ -329,37 +329,37 @@ pub mod migration_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type GameUri; + 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 GameUri = Unset; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type GameUri = St::GameUri; + type Status = Unset; } ///State transition - sets the `game_uri` field to Set pub struct SetGameUri(PhantomData St>); impl sealed::Sealed for SetGameUri {} impl State for SetGameUri { - type Status = St::Status; type GameUri = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type GameUri = St::GameUri; + 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 `game_uri` field pub struct game_uri(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -460,8 +460,8 @@ where impl MigrationResultBuilder where St: migration_result_state::State, - St::Status: migration_result_state::IsSet, St::GameUri: migration_result_state::IsSet, + St::Status: migration_result_state::IsSet, { /// Build the final struct. pub fn build(self) -> MigrationResult { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/org/profile.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/org/profile.rs index 51c247f94..9e0b2f794 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/org/profile.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/org/profile.rs @@ -288,37 +288,37 @@ pub mod profile_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type DisplayName; + 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 DisplayName = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type DisplayName = St::DisplayName; + type CreatedAt = Unset; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type CreatedAt = St::CreatedAt; type DisplayName = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type DisplayName = St::DisplayName; + 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 `display_name` field pub struct display_name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -520,8 +520,8 @@ impl ProfileBuilder { impl ProfileBuilder where St: profile_state::State, - St::CreatedAt: profile_state::IsSet, St::DisplayName: profile_state::IsSet, + St::CreatedAt: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/platform.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/platform.rs index e214e2c07..dcd2df57b 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/platform.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/platform.rs @@ -134,37 +134,37 @@ pub mod platform_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -366,8 +366,8 @@ impl PlatformBuilder { impl PlatformBuilder where St: platform_state::State, - St::Name: platform_state::IsSet, St::CreatedAt: platform_state::IsSet, + St::Name: platform_state::IsSet, { /// Build the final struct. pub fn build(self) -> Platform { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/redirect.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/redirect.rs index bad971d85..81fb5aab7 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/redirect.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/redirect.rs @@ -114,67 +114,67 @@ pub mod redirect_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type SourceUri; type Collection; + type SourceUri; type TargetUri; + 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 SourceUri = Unset; type Collection = Unset; + type SourceUri = Unset; type TargetUri = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData St>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Collection = Set; type SourceUri = St::SourceUri; - type Collection = St::Collection; type TargetUri = St::TargetUri; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `source_uri` field to Set pub struct SetSourceUri(PhantomData St>); impl sealed::Sealed for SetSourceUri {} impl State for SetSourceUri { - type CreatedAt = St::CreatedAt; - type SourceUri = Set; type Collection = St::Collection; + type SourceUri = Set; type TargetUri = St::TargetUri; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData St>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { type CreatedAt = St::CreatedAt; - type SourceUri = St::SourceUri; - type Collection = Set; - type TargetUri = St::TargetUri; } ///State transition - sets the `target_uri` field to Set pub struct SetTargetUri(PhantomData St>); impl sealed::Sealed for SetTargetUri {} impl State for SetTargetUri { - type CreatedAt = St::CreatedAt; - type SourceUri = St::SourceUri; type Collection = St::Collection; + type SourceUri = St::SourceUri; type TargetUri = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Collection = St::Collection; + type SourceUri = St::SourceUri; + type TargetUri = St::TargetUri; + 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 `source_uri` field - pub struct source_uri(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `source_uri` field + pub struct source_uri(()); ///Marker type for the `target_uri` field pub struct target_uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -282,10 +282,10 @@ where impl RedirectBuilder where St: redirect_state::State, - St::CreatedAt: redirect_state::IsSet, - St::SourceUri: redirect_state::IsSet, St::Collection: redirect_state::IsSet, + St::SourceUri: redirect_state::IsSet, St::TargetUri: redirect_state::IsSet, + St::CreatedAt: redirect_state::IsSet, { /// Build the final struct. pub fn build(self) -> Redirect { diff --git a/crates/jacquard-api/src/games_gamesgamesgamesgames/richtext/facet.rs b/crates/jacquard-api/src/games_gamesgamesgamesgames/richtext/facet.rs index 5778637ab..131c13e6b 100644 --- a/crates/jacquard-api/src/games_gamesgamesgamesgames/richtext/facet.rs +++ b/crates/jacquard-api/src/games_gamesgamesgamesgames/richtext/facet.rs @@ -1293,37 +1293,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 St>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Features = St::Features; + type Index = Unset; } ///State transition - sets the `features` field to Set pub struct SetFeatures(PhantomData St>); impl sealed::Sealed for SetFeatures {} impl State for SetFeatures { - type Index = St::Index; type Features = Set; + type Index = St::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData St>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Features = St::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(()); } } @@ -1393,8 +1393,8 @@ where impl FacetBuilder where St: facet_state::State, - St::Index: facet_state::IsSet, St::Features: facet_state::IsSet, + St::Index: facet_state::IsSet, { /// Build the final struct. pub fn build(self) -> Facet { diff --git a/crates/jacquard-api/src/garden_goals/category.rs b/crates/jacquard-api/src/garden_goals/category.rs index 61e735377..7525335d7 100644 --- a/crates/jacquard-api/src/garden_goals/category.rs +++ b/crates/jacquard-api/src/garden_goals/category.rs @@ -138,51 +138,51 @@ pub mod category_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CategoryId; type CreatedAt; + 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 CategoryId = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CategoryId = St::CategoryId; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `category_id` field to Set pub struct SetCategoryId(PhantomData St>); impl sealed::Sealed for SetCategoryId {} impl State for SetCategoryId { - type Name = St::Name; type CategoryId = Set; type CreatedAt = St::CreatedAt; + type Name = St::Name; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CategoryId = St::CategoryId; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CategoryId = St::CategoryId; + type CreatedAt = St::CreatedAt; + 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 `category_id` field pub struct category_id(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -271,9 +271,9 @@ where impl CategoryBuilder where St: category_state::State, - St::Name: category_state::IsSet, St::CategoryId: category_state::IsSet, St::CreatedAt: category_state::IsSet, + St::Name: category_state::IsSet, { /// Build the final struct. pub fn build(self) -> Category { diff --git a/crates/jacquard-api/src/garden_goals/completion.rs b/crates/jacquard-api/src/garden_goals/completion.rs index afeb2801d..4ba22ba4f 100644 --- a/crates/jacquard-api/src/garden_goals/completion.rs +++ b/crates/jacquard-api/src/garden_goals/completion.rs @@ -251,85 +251,85 @@ pub mod completion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Year; - type Day; type GoalId; type CompletedAt; + type Day; type Month; + type Year; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Year = Unset; - type Day = Unset; type GoalId = Unset; type CompletedAt = Unset; + type Day = Unset; type Month = Unset; - } - ///State transition - sets the `year` field to Set - pub struct SetYear(PhantomData St>); - impl sealed::Sealed for SetYear {} - impl State for SetYear { - type Year = Set; - type Day = St::Day; - type GoalId = St::GoalId; - type CompletedAt = St::CompletedAt; - type Month = St::Month; - } - ///State transition - sets the `day` field to Set - pub struct SetDay(PhantomData St>); - impl sealed::Sealed for SetDay {} - impl State for SetDay { - type Year = St::Year; - type Day = Set; - type GoalId = St::GoalId; - type CompletedAt = St::CompletedAt; - type Month = St::Month; + type Year = Unset; } ///State transition - sets the `goal_id` field to Set pub struct SetGoalId(PhantomData St>); impl sealed::Sealed for SetGoalId {} impl State for SetGoalId { - type Year = St::Year; - type Day = St::Day; type GoalId = Set; type CompletedAt = St::CompletedAt; + type Day = St::Day; type Month = St::Month; + type Year = St::Year; } ///State transition - sets the `completed_at` field to Set pub struct SetCompletedAt(PhantomData St>); impl sealed::Sealed for SetCompletedAt {} impl State for SetCompletedAt { - type Year = St::Year; - type Day = St::Day; type GoalId = St::GoalId; type CompletedAt = Set; + type Day = St::Day; + type Month = St::Month; + type Year = St::Year; + } + ///State transition - sets the `day` field to Set + pub struct SetDay(PhantomData St>); + impl sealed::Sealed for SetDay {} + impl State for SetDay { + type GoalId = St::GoalId; + type CompletedAt = St::CompletedAt; + type Day = Set; type Month = St::Month; + type Year = St::Year; } ///State transition - sets the `month` field to Set pub struct SetMonth(PhantomData St>); impl sealed::Sealed for SetMonth {} impl State for SetMonth { - type Year = St::Year; - type Day = St::Day; type GoalId = St::GoalId; type CompletedAt = St::CompletedAt; + type Day = St::Day; type Month = Set; + type Year = St::Year; + } + ///State transition - sets the `year` field to Set + pub struct SetYear(PhantomData St>); + impl sealed::Sealed for SetYear {} + impl State for SetYear { + type GoalId = St::GoalId; + type CompletedAt = St::CompletedAt; + type Day = St::Day; + type Month = St::Month; + type Year = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `year` field - pub struct year(()); - ///Marker type for the `day` field - pub struct day(()); ///Marker type for the `goal_id` field pub struct goal_id(()); ///Marker type for the `completed_at` field pub struct completed_at(()); + ///Marker type for the `day` field + pub struct day(()); ///Marker type for the `month` field pub struct month(()); + ///Marker type for the `year` field + pub struct year(()); } } @@ -518,11 +518,11 @@ where impl CompletionBuilder where St: completion_state::State, - St::Year: completion_state::IsSet, - St::Day: completion_state::IsSet, St::GoalId: completion_state::IsSet, St::CompletedAt: completion_state::IsSet, + St::Day: completion_state::IsSet, St::Month: completion_state::IsSet, + St::Year: completion_state::IsSet, { /// Build the final struct. pub fn build(self) -> Completion { diff --git a/crates/jacquard-api/src/garden_goals/completion_details.rs b/crates/jacquard-api/src/garden_goals/completion_details.rs index 084e2c0b3..3e0af12ae 100644 --- a/crates/jacquard-api/src/garden_goals/completion_details.rs +++ b/crates/jacquard-api/src/garden_goals/completion_details.rs @@ -252,85 +252,85 @@ pub mod completion_details_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Year; type GoalId; - type UpdatedAt; + type Year; type Month; type Day; + type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Year = Unset; type GoalId = Unset; - type UpdatedAt = Unset; + type Year = Unset; type Month = Unset; type Day = Unset; - } - ///State transition - sets the `year` field to Set - pub struct SetYear(PhantomData St>); - impl sealed::Sealed for SetYear {} - impl State for SetYear { - type Year = Set; - type GoalId = St::GoalId; - type UpdatedAt = St::UpdatedAt; - type Month = St::Month; - type Day = St::Day; + type UpdatedAt = Unset; } ///State transition - sets the `goal_id` field to Set pub struct SetGoalId(PhantomData St>); impl sealed::Sealed for SetGoalId {} impl State for SetGoalId { - type Year = St::Year; type GoalId = Set; - type UpdatedAt = St::UpdatedAt; + type Year = St::Year; type Month = St::Month; type Day = St::Day; + type UpdatedAt = St::UpdatedAt; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type Year = St::Year; + ///State transition - sets the `year` field to Set + pub struct SetYear(PhantomData St>); + impl sealed::Sealed for SetYear {} + impl State for SetYear { type GoalId = St::GoalId; - type UpdatedAt = Set; + type Year = Set; type Month = St::Month; type Day = St::Day; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `month` field to Set pub struct SetMonth(PhantomData St>); impl sealed::Sealed for SetMonth {} impl State for SetMonth { - type Year = St::Year; type GoalId = St::GoalId; - type UpdatedAt = St::UpdatedAt; + type Year = St::Year; type Month = Set; type Day = St::Day; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `day` field to Set pub struct SetDay(PhantomData St>); impl sealed::Sealed for SetDay {} impl State for SetDay { - type Year = St::Year; type GoalId = St::GoalId; - type UpdatedAt = St::UpdatedAt; + type Year = St::Year; type Month = St::Month; type Day = Set; + type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type GoalId = St::GoalId; + type Year = St::Year; + type Month = St::Month; + type Day = St::Day; + type UpdatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `year` field - pub struct year(()); ///Marker type for the `goal_id` field pub struct goal_id(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); + ///Marker type for the `year` field + pub struct year(()); ///Marker type for the `month` field pub struct month(()); ///Marker type for the `day` field pub struct day(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); } } @@ -519,11 +519,11 @@ where impl CompletionDetailsBuilder where St: completion_details_state::State, - St::Year: completion_details_state::IsSet, St::GoalId: completion_details_state::IsSet, - St::UpdatedAt: completion_details_state::IsSet, + St::Year: completion_details_state::IsSet, St::Month: completion_details_state::IsSet, St::Day: completion_details_state::IsSet, + St::UpdatedAt: completion_details_state::IsSet, { /// Build the final struct. pub fn build(self) -> CompletionDetails { diff --git a/crates/jacquard-api/src/garden_goals/goal.rs b/crates/jacquard-api/src/garden_goals/goal.rs index 4480a700b..f9180c6ad 100644 --- a/crates/jacquard-api/src/garden_goals/goal.rs +++ b/crates/jacquard-api/src/garden_goals/goal.rs @@ -319,67 +319,67 @@ pub mod goal_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Year; type GoalId; + type Year; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type Year = Unset; type GoalId = Unset; + type Year = Unset; type Name = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `goal_id` field to Set + pub struct SetGoalId(PhantomData St>); + impl sealed::Sealed for SetGoalId {} + impl State for SetGoalId { + type GoalId = Set; type Year = St::Year; - type GoalId = St::GoalId; type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `year` field to Set pub struct SetYear(PhantomData St>); impl sealed::Sealed for SetYear {} impl State for SetYear { - type CreatedAt = St::CreatedAt; - type Year = Set; type GoalId = St::GoalId; + type Year = Set; type Name = St::Name; - } - ///State transition - sets the `goal_id` field to Set - pub struct SetGoalId(PhantomData St>); - impl sealed::Sealed for SetGoalId {} - impl State for SetGoalId { type CreatedAt = St::CreatedAt; - type Year = St::Year; - type GoalId = Set; - type Name = St::Name; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; - type Year = St::Year; type GoalId = St::GoalId; + type Year = St::Year; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type GoalId = St::GoalId; + type Year = St::Year; + type Name = St::Name; + 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 `year` field - pub struct year(()); ///Marker type for the `goal_id` field pub struct goal_id(()); + ///Marker type for the `year` field + pub struct year(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -662,10 +662,10 @@ where impl GoalBuilder where St: goal_state::State, - St::CreatedAt: goal_state::IsSet, - St::Year: goal_state::IsSet, St::GoalId: goal_state::IsSet, + St::Year: goal_state::IsSet, St::Name: goal_state::IsSet, + St::CreatedAt: goal_state::IsSet, { /// Build the final struct. pub fn build(self) -> Goal { diff --git a/crates/jacquard-api/src/garden_lexicon/documentation.rs b/crates/jacquard-api/src/garden_lexicon/documentation.rs index 61eacd257..860c3f2ca 100644 --- a/crates/jacquard-api/src/garden_lexicon/documentation.rs +++ b/crates/jacquard-api/src/garden_lexicon/documentation.rs @@ -613,37 +613,37 @@ pub mod documentation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Lexicon; + 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 Lexicon = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Lexicon = St::Lexicon; + type CreatedAt = Unset; } ///State transition - sets the `lexicon` field to Set pub struct SetLexicon(PhantomData St>); impl sealed::Sealed for SetLexicon {} impl State for SetLexicon { - type CreatedAt = St::CreatedAt; type Lexicon = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Lexicon = St::Lexicon; + 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 `lexicon` field pub struct lexicon(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -756,8 +756,8 @@ where impl DocumentationBuilder where St: documentation_state::State, - St::CreatedAt: documentation_state::IsSet, St::Lexicon: documentation_state::IsSet, + St::CreatedAt: documentation_state::IsSet, { /// Build the final struct. pub fn build(self) -> Documentation { diff --git a/crates/jacquard-api/src/garden_lexicon/exultant_zebra/distribution.rs b/crates/jacquard-api/src/garden_lexicon/exultant_zebra/distribution.rs index 93d45d2f4..38870905f 100644 --- a/crates/jacquard-api/src/garden_lexicon/exultant_zebra/distribution.rs +++ b/crates/jacquard-api/src/garden_lexicon/exultant_zebra/distribution.rs @@ -428,37 +428,37 @@ pub mod distribution_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Artifacts; type Version; + type Artifacts; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Artifacts = Unset; type Version = Unset; - } - ///State transition - sets the `artifacts` field to Set - pub struct SetArtifacts(PhantomData St>); - impl sealed::Sealed for SetArtifacts {} - impl State for SetArtifacts { - type Artifacts = Set; - type Version = St::Version; + type Artifacts = Unset; } ///State transition - sets the `version` field to Set pub struct SetVersion(PhantomData St>); impl sealed::Sealed for SetVersion {} impl State for SetVersion { - type Artifacts = St::Artifacts; type Version = Set; + type Artifacts = St::Artifacts; + } + ///State transition - sets the `artifacts` field to Set + pub struct SetArtifacts(PhantomData St>); + impl sealed::Sealed for SetArtifacts {} + impl State for SetArtifacts { + type Version = St::Version; + type Artifacts = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `artifacts` field - pub struct artifacts(()); ///Marker type for the `version` field pub struct version(()); + ///Marker type for the `artifacts` field + pub struct artifacts(()); } } @@ -541,8 +541,8 @@ where impl DistributionBuilder where St: distribution_state::State, - St::Artifacts: distribution_state::IsSet, St::Version: distribution_state::IsSet, + St::Artifacts: distribution_state::IsSet, { /// Build the final struct. pub fn build(self) -> Distribution { diff --git a/crates/jacquard-api/src/haus_opn/mic/show.rs b/crates/jacquard-api/src/haus_opn/mic/show.rs index 831544bbe..21598191d 100644 --- a/crates/jacquard-api/src/haus_opn/mic/show.rs +++ b/crates/jacquard-api/src/haus_opn/mic/show.rs @@ -273,65 +273,65 @@ pub mod show_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Schedule; type Artist; - type CreatedAt; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Schedule = Unset; type Artist = Unset; - type CreatedAt = Unset; type Title = Unset; } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Schedule = St::Schedule; + type Artist = St::Artist; + type Title = St::Title; + } ///State transition - sets the `schedule` field to Set pub struct SetSchedule(PhantomData St>); impl sealed::Sealed for SetSchedule {} impl State for SetSchedule { + type CreatedAt = St::CreatedAt; type Schedule = Set; type Artist = St::Artist; - type CreatedAt = St::CreatedAt; type Title = St::Title; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { - type Schedule = St::Schedule; - type Artist = Set; type CreatedAt = St::CreatedAt; - type Title = St::Title; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Schedule = St::Schedule; - type Artist = St::Artist; - type CreatedAt = Set; + type Artist = Set; type Title = St::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type CreatedAt = St::CreatedAt; type Schedule = St::Schedule; type Artist = St::Artist; - type CreatedAt = St::CreatedAt; type Title = 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 `schedule` field pub struct schedule(()); ///Marker type for the `artist` field pub struct artist(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); } @@ -474,9 +474,9 @@ where impl ShowBuilder where St: show_state::State, + St::CreatedAt: show_state::IsSet, St::Schedule: show_state::IsSet, St::Artist: show_state::IsSet, - St::CreatedAt: show_state::IsSet, St::Title: show_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/haus_opn/mic/show/episode/favorite.rs b/crates/jacquard-api/src/haus_opn/mic/show/episode/favorite.rs index 0eff9a8fe..c46dbdd17 100644 --- a/crates/jacquard-api/src/haus_opn/mic/show/episode/favorite.rs +++ b/crates/jacquard-api/src/haus_opn/mic/show/episode/favorite.rs @@ -113,37 +113,37 @@ pub mod favorite_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -213,8 +213,8 @@ where impl FavoriteBuilder where St: favorite_state::State, - St::CreatedAt: favorite_state::IsSet, St::Subject: favorite_state::IsSet, + St::CreatedAt: favorite_state::IsSet, { /// Build the final struct. pub fn build(self) -> Favorite { diff --git a/crates/jacquard-api/src/haus_opn/mic/show/favorite.rs b/crates/jacquard-api/src/haus_opn/mic/show/favorite.rs index f9a73cbd4..6a41cf4b7 100644 --- a/crates/jacquard-api/src/haus_opn/mic/show/favorite.rs +++ b/crates/jacquard-api/src/haus_opn/mic/show/favorite.rs @@ -113,37 +113,37 @@ pub mod favorite_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -213,8 +213,8 @@ where impl FavoriteBuilder where St: favorite_state::State, - St::Subject: favorite_state::IsSet, St::CreatedAt: favorite_state::IsSet, + St::Subject: favorite_state::IsSet, { /// Build the final struct. pub fn build(self) -> Favorite { diff --git a/crates/jacquard-api/src/io_atcr/hold/captain.rs b/crates/jacquard-api/src/io_atcr/hold/captain.rs index 8e2cef06c..dff3094ea 100644 --- a/crates/jacquard-api/src/io_atcr/hold/captain.rs +++ b/crates/jacquard-api/src/io_atcr/hold/captain.rs @@ -138,9 +138,9 @@ pub mod captain_state { pub trait State: sealed::Sealed { type AllowAllCrew; type EnableBlueskyPosts; - type Owner; - type Public; type DeployedAt; + type Public; + type Owner; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -148,9 +148,9 @@ pub mod captain_state { impl State for Empty { type AllowAllCrew = Unset; type EnableBlueskyPosts = Unset; - type Owner = Unset; - type Public = Unset; type DeployedAt = Unset; + type Public = Unset; + type Owner = Unset; } ///State transition - sets the `allow_all_crew` field to Set pub struct SetAllowAllCrew(PhantomData St>); @@ -158,9 +158,9 @@ pub mod captain_state { impl State for SetAllowAllCrew { type AllowAllCrew = Set; type EnableBlueskyPosts = St::EnableBlueskyPosts; - type Owner = St::Owner; - type Public = St::Public; type DeployedAt = St::DeployedAt; + type Public = St::Public; + type Owner = St::Owner; } ///State transition - sets the `enable_bluesky_posts` field to Set pub struct SetEnableBlueskyPosts(PhantomData St>); @@ -168,19 +168,19 @@ pub mod captain_state { impl State for SetEnableBlueskyPosts { type AllowAllCrew = St::AllowAllCrew; type EnableBlueskyPosts = Set; - type Owner = St::Owner; - type Public = St::Public; type DeployedAt = St::DeployedAt; + type Public = St::Public; + type Owner = St::Owner; } - ///State transition - sets the `owner` field to Set - pub struct SetOwner(PhantomData St>); - impl sealed::Sealed for SetOwner {} - impl State for SetOwner { + ///State transition - sets the `deployed_at` field to Set + pub struct SetDeployedAt(PhantomData St>); + impl sealed::Sealed for SetDeployedAt {} + impl State for SetDeployedAt { type AllowAllCrew = St::AllowAllCrew; type EnableBlueskyPosts = St::EnableBlueskyPosts; - type Owner = Set; + type DeployedAt = Set; type Public = St::Public; - type DeployedAt = St::DeployedAt; + type Owner = St::Owner; } ///State transition - sets the `public` field to Set pub struct SetPublic(PhantomData St>); @@ -188,19 +188,19 @@ pub mod captain_state { impl State for SetPublic { type AllowAllCrew = St::AllowAllCrew; type EnableBlueskyPosts = St::EnableBlueskyPosts; - type Owner = St::Owner; - type Public = Set; type DeployedAt = St::DeployedAt; + type Public = Set; + type Owner = St::Owner; } - ///State transition - sets the `deployed_at` field to Set - pub struct SetDeployedAt(PhantomData St>); - impl sealed::Sealed for SetDeployedAt {} - impl State for SetDeployedAt { + ///State transition - sets the `owner` field to Set + pub struct SetOwner(PhantomData St>); + impl sealed::Sealed for SetOwner {} + impl State for SetOwner { type AllowAllCrew = St::AllowAllCrew; type EnableBlueskyPosts = St::EnableBlueskyPosts; - type Owner = St::Owner; + type DeployedAt = St::DeployedAt; type Public = St::Public; - type DeployedAt = Set; + type Owner = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -209,12 +209,12 @@ pub mod captain_state { pub struct allow_all_crew(()); ///Marker type for the `enable_bluesky_posts` field pub struct enable_bluesky_posts(()); - ///Marker type for the `owner` field - pub struct owner(()); - ///Marker type for the `public` field - pub struct public(()); ///Marker type for the `deployed_at` field pub struct deployed_at(()); + ///Marker type for the `public` field + pub struct public(()); + ///Marker type for the `owner` field + pub struct owner(()); } } @@ -377,9 +377,9 @@ where St: captain_state::State, St::AllowAllCrew: captain_state::IsSet, St::EnableBlueskyPosts: captain_state::IsSet, - St::Owner: captain_state::IsSet, - St::Public: captain_state::IsSet, St::DeployedAt: captain_state::IsSet, + St::Public: captain_state::IsSet, + St::Owner: captain_state::IsSet, { /// Build the final struct. pub fn build(self) -> Captain { diff --git a/crates/jacquard-api/src/io_atcr/hold/complete_upload.rs b/crates/jacquard-api/src/io_atcr/hold/complete_upload.rs index 4af8767aa..ed41b9dab 100644 --- a/crates/jacquard-api/src/io_atcr/hold/complete_upload.rs +++ b/crates/jacquard-api/src/io_atcr/hold/complete_upload.rs @@ -207,50 +207,50 @@ pub mod complete_upload_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Parts; - type Digest; type UploadId; + type Digest; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Parts = Unset; - type Digest = Unset; type UploadId = Unset; + type Digest = Unset; } ///State transition - sets the `parts` field to Set pub struct SetParts(PhantomData St>); impl sealed::Sealed for SetParts {} impl State for SetParts { type Parts = Set; - type Digest = St::Digest; - type UploadId = St::UploadId; - } - ///State transition - sets the `digest` field to Set - pub struct SetDigest(PhantomData St>); - impl sealed::Sealed for SetDigest {} - impl State for SetDigest { - type Parts = St::Parts; - type Digest = Set; type UploadId = St::UploadId; + type Digest = St::Digest; } ///State transition - sets the `upload_id` field to Set pub struct SetUploadId(PhantomData St>); impl sealed::Sealed for SetUploadId {} impl State for SetUploadId { type Parts = St::Parts; - type Digest = St::Digest; type UploadId = Set; + type Digest = St::Digest; + } + ///State transition - sets the `digest` field to Set + pub struct SetDigest(PhantomData St>); + impl sealed::Sealed for SetDigest {} + impl State for SetDigest { + type Parts = St::Parts; + type UploadId = St::UploadId; + type Digest = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `parts` field pub struct parts(()); - ///Marker type for the `digest` field - pub struct digest(()); ///Marker type for the `upload_id` field pub struct upload_id(()); + ///Marker type for the `digest` field + pub struct digest(()); } } @@ -340,8 +340,8 @@ impl CompleteUploadBuilder where St: complete_upload_state::State, St::Parts: complete_upload_state::IsSet, - St::Digest: complete_upload_state::IsSet, St::UploadId: complete_upload_state::IsSet, + St::Digest: complete_upload_state::IsSet, { /// Build the final struct. pub fn build(self) -> CompleteUpload { @@ -376,37 +376,37 @@ pub mod part_info_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PartNumber; type Etag; + type PartNumber; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PartNumber = Unset; type Etag = Unset; - } - ///State transition - sets the `part_number` field to Set - pub struct SetPartNumber(PhantomData St>); - impl sealed::Sealed for SetPartNumber {} - impl State for SetPartNumber { - type PartNumber = Set; - type Etag = St::Etag; + type PartNumber = Unset; } ///State transition - sets the `etag` field to Set pub struct SetEtag(PhantomData St>); impl sealed::Sealed for SetEtag {} impl State for SetEtag { - type PartNumber = St::PartNumber; type Etag = Set; + type PartNumber = St::PartNumber; + } + ///State transition - sets the `part_number` field to Set + pub struct SetPartNumber(PhantomData St>); + impl sealed::Sealed for SetPartNumber {} + impl State for SetPartNumber { + type Etag = St::Etag; + type PartNumber = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `part_number` field - pub struct part_number(()); ///Marker type for the `etag` field pub struct etag(()); + ///Marker type for the `part_number` field + pub struct part_number(()); } } @@ -476,8 +476,8 @@ where impl PartInfoBuilder where St: part_info_state::State, - St::PartNumber: part_info_state::IsSet, St::Etag: part_info_state::IsSet, + St::PartNumber: part_info_state::IsSet, { /// Build the final struct. pub fn build(self) -> PartInfo { diff --git a/crates/jacquard-api/src/io_atcr/hold/crew.rs b/crates/jacquard-api/src/io_atcr/hold/crew.rs index 34854d95a..6ffaa0a2d 100644 --- a/crates/jacquard-api/src/io_atcr/hold/crew.rs +++ b/crates/jacquard-api/src/io_atcr/hold/crew.rs @@ -229,67 +229,67 @@ pub mod crew_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AddedAt; - type Role; type Member; type Permissions; + type Role; + type AddedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AddedAt = Unset; - type Role = Unset; type Member = Unset; type Permissions = Unset; - } - ///State transition - sets the `added_at` field to Set - pub struct SetAddedAt(PhantomData St>); - impl sealed::Sealed for SetAddedAt {} - impl State for SetAddedAt { - type AddedAt = Set; - type Role = St::Role; - type Member = St::Member; - type Permissions = St::Permissions; - } - ///State transition - sets the `role` field to Set - pub struct SetRole(PhantomData St>); - impl sealed::Sealed for SetRole {} - impl State for SetRole { - type AddedAt = St::AddedAt; - type Role = Set; - type Member = St::Member; - type Permissions = St::Permissions; + type Role = Unset; + type AddedAt = Unset; } ///State transition - sets the `member` field to Set pub struct SetMember(PhantomData St>); impl sealed::Sealed for SetMember {} impl State for SetMember { - type AddedAt = St::AddedAt; - type Role = St::Role; type Member = Set; type Permissions = St::Permissions; + type Role = St::Role; + type AddedAt = St::AddedAt; } ///State transition - sets the `permissions` field to Set pub struct SetPermissions(PhantomData St>); impl sealed::Sealed for SetPermissions {} impl State for SetPermissions { - type AddedAt = St::AddedAt; - type Role = St::Role; type Member = St::Member; type Permissions = Set; + type Role = St::Role; + type AddedAt = St::AddedAt; + } + ///State transition - sets the `role` field to Set + pub struct SetRole(PhantomData St>); + impl sealed::Sealed for SetRole {} + impl State for SetRole { + type Member = St::Member; + type Permissions = St::Permissions; + type Role = Set; + type AddedAt = St::AddedAt; + } + ///State transition - sets the `added_at` field to Set + pub struct SetAddedAt(PhantomData St>); + impl sealed::Sealed for SetAddedAt {} + impl State for SetAddedAt { + type Member = St::Member; + type Permissions = St::Permissions; + type Role = St::Role; + type AddedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `added_at` field - pub struct added_at(()); - ///Marker type for the `role` field - pub struct role(()); ///Marker type for the `member` field pub struct member(()); ///Marker type for the `permissions` field pub struct permissions(()); + ///Marker type for the `role` field + pub struct role(()); + ///Marker type for the `added_at` field + pub struct added_at(()); } } @@ -416,10 +416,10 @@ impl CrewBuilder { impl CrewBuilder where St: crew_state::State, - St::AddedAt: crew_state::IsSet, - St::Role: crew_state::IsSet, St::Member: crew_state::IsSet, St::Permissions: crew_state::IsSet, + St::Role: crew_state::IsSet, + St::AddedAt: crew_state::IsSet, { /// Build the final struct. pub fn build(self) -> Crew { diff --git a/crates/jacquard-api/src/io_atcr/hold/get_part_upload_url.rs b/crates/jacquard-api/src/io_atcr/hold/get_part_upload_url.rs index 67796504f..6f142980f 100644 --- a/crates/jacquard-api/src/io_atcr/hold/get_part_upload_url.rs +++ b/crates/jacquard-api/src/io_atcr/hold/get_part_upload_url.rs @@ -134,37 +134,37 @@ pub mod get_part_upload_url_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PartNumber; type UploadId; + type PartNumber; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PartNumber = Unset; type UploadId = Unset; - } - ///State transition - sets the `part_number` field to Set - pub struct SetPartNumber(PhantomData St>); - impl sealed::Sealed for SetPartNumber {} - impl State for SetPartNumber { - type PartNumber = Set; - type UploadId = St::UploadId; + type PartNumber = Unset; } ///State transition - sets the `upload_id` field to Set pub struct SetUploadId(PhantomData St>); impl sealed::Sealed for SetUploadId {} impl State for SetUploadId { - type PartNumber = St::PartNumber; type UploadId = Set; + type PartNumber = St::PartNumber; + } + ///State transition - sets the `part_number` field to Set + pub struct SetPartNumber(PhantomData St>); + impl sealed::Sealed for SetPartNumber {} + impl State for SetPartNumber { + type UploadId = St::UploadId; + type PartNumber = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `part_number` field - pub struct part_number(()); ///Marker type for the `upload_id` field pub struct upload_id(()); + ///Marker type for the `part_number` field + pub struct part_number(()); } } @@ -234,8 +234,8 @@ where impl GetPartUploadUrlBuilder where St: get_part_upload_url_state::State, - St::PartNumber: get_part_upload_url_state::IsSet, St::UploadId: get_part_upload_url_state::IsSet, + St::PartNumber: get_part_upload_url_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetPartUploadUrl { diff --git a/crates/jacquard-api/src/io_atcr/hold/layer.rs b/crates/jacquard-api/src/io_atcr/hold/layer.rs index 2f2d3e2ec..ee37b9149 100644 --- a/crates/jacquard-api/src/io_atcr/hold/layer.rs +++ b/crates/jacquard-api/src/io_atcr/hold/layer.rs @@ -144,105 +144,105 @@ pub mod layer_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UserDid; - type MediaType; type Size; - type Manifest; - type Digest; type CreatedAt; + type Digest; + type MediaType; + type Manifest; + type UserDid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UserDid = Unset; - type MediaType = Unset; type Size = Unset; - type Manifest = Unset; - type Digest = Unset; type CreatedAt = Unset; + type Digest = Unset; + type MediaType = Unset; + type Manifest = Unset; + type UserDid = Unset; } - ///State transition - sets the `user_did` field to Set - pub struct SetUserDid(PhantomData St>); - impl sealed::Sealed for SetUserDid {} - impl State for SetUserDid { - type UserDid = Set; + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData St>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Size = Set; + type CreatedAt = St::CreatedAt; + type Digest = St::Digest; type MediaType = St::MediaType; - type Size = St::Size; type Manifest = St::Manifest; + type UserDid = St::UserDid; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Size = St::Size; + type CreatedAt = Set; type Digest = St::Digest; + type MediaType = St::MediaType; + type Manifest = St::Manifest; + type UserDid = St::UserDid; + } + ///State transition - sets the `digest` field to Set + pub struct SetDigest(PhantomData St>); + impl sealed::Sealed for SetDigest {} + impl State for SetDigest { + type Size = St::Size; type CreatedAt = St::CreatedAt; + type Digest = Set; + type MediaType = St::MediaType; + type Manifest = St::Manifest; + type UserDid = St::UserDid; } ///State transition - sets the `media_type` field to Set pub struct SetMediaType(PhantomData St>); impl sealed::Sealed for SetMediaType {} impl State for SetMediaType { - type UserDid = St::UserDid; - type MediaType = Set; type Size = St::Size; - type Manifest = St::Manifest; - type Digest = St::Digest; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData St>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - type UserDid = St::UserDid; - type MediaType = St::MediaType; - type Size = Set; - type Manifest = St::Manifest; type Digest = St::Digest; - type CreatedAt = St::CreatedAt; + type MediaType = Set; + type Manifest = St::Manifest; + type UserDid = St::UserDid; } ///State transition - sets the `manifest` field to Set pub struct SetManifest(PhantomData St>); impl sealed::Sealed for SetManifest {} impl State for SetManifest { - type UserDid = St::UserDid; - type MediaType = St::MediaType; type Size = St::Size; - type Manifest = Set; - type Digest = St::Digest; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `digest` field to Set - pub struct SetDigest(PhantomData St>); - impl sealed::Sealed for SetDigest {} - impl State for SetDigest { - type UserDid = St::UserDid; + type Digest = St::Digest; type MediaType = St::MediaType; + type Manifest = Set; + type UserDid = St::UserDid; + } + ///State transition - sets the `user_did` field to Set + pub struct SetUserDid(PhantomData St>); + impl sealed::Sealed for SetUserDid {} + impl State for SetUserDid { type Size = St::Size; - type Manifest = St::Manifest; - type Digest = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type UserDid = St::UserDid; + type Digest = St::Digest; type MediaType = St::MediaType; - type Size = St::Size; type Manifest = St::Manifest; - type Digest = St::Digest; - type CreatedAt = Set; + type UserDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user_did` field - pub struct user_did(()); - ///Marker type for the `media_type` field - pub struct media_type(()); ///Marker type for the `size` field pub struct size(()); - ///Marker type for the `manifest` field - pub struct manifest(()); - ///Marker type for the `digest` field - pub struct digest(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `digest` field + pub struct digest(()); + ///Marker type for the `media_type` field + pub struct media_type(()); + ///Marker type for the `manifest` field + pub struct manifest(()); + ///Marker type for the `user_did` field + pub struct user_did(()); } } @@ -395,12 +395,12 @@ where impl LayerBuilder where St: layer_state::State, - St::UserDid: layer_state::IsSet, - St::MediaType: layer_state::IsSet, St::Size: layer_state::IsSet, - St::Manifest: layer_state::IsSet, - St::Digest: layer_state::IsSet, St::CreatedAt: layer_state::IsSet, + St::Digest: layer_state::IsSet, + St::MediaType: layer_state::IsSet, + St::Manifest: layer_state::IsSet, + St::UserDid: layer_state::IsSet, { /// Build the final struct. pub fn build(self) -> Layer { diff --git a/crates/jacquard-api/src/io_atcr/hold/notify_manifest.rs b/crates/jacquard-api/src/io_atcr/hold/notify_manifest.rs index 8ac1fbc95..f1321b2d1 100644 --- a/crates/jacquard-api/src/io_atcr/hold/notify_manifest.rs +++ b/crates/jacquard-api/src/io_atcr/hold/notify_manifest.rs @@ -751,67 +751,67 @@ pub mod notify_manifest_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Repository; type UserDid; - type Manifest; type ManifestDigest; - type Repository; + type Manifest; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Repository = Unset; type UserDid = Unset; - type Manifest = Unset; type ManifestDigest = Unset; - type Repository = Unset; + type Manifest = Unset; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { + type Repository = Set; + type UserDid = St::UserDid; + type ManifestDigest = St::ManifestDigest; + type Manifest = St::Manifest; } ///State transition - sets the `user_did` field to Set pub struct SetUserDid(PhantomData St>); impl sealed::Sealed for SetUserDid {} impl State for SetUserDid { - type UserDid = Set; - type Manifest = St::Manifest; - type ManifestDigest = St::ManifestDigest; type Repository = St::Repository; - } - ///State transition - sets the `manifest` field to Set - pub struct SetManifest(PhantomData St>); - impl sealed::Sealed for SetManifest {} - impl State for SetManifest { - type UserDid = St::UserDid; - type Manifest = Set; + type UserDid = Set; type ManifestDigest = St::ManifestDigest; - type Repository = St::Repository; + type Manifest = St::Manifest; } ///State transition - sets the `manifest_digest` field to Set pub struct SetManifestDigest(PhantomData St>); impl sealed::Sealed for SetManifestDigest {} impl State for SetManifestDigest { + type Repository = St::Repository; type UserDid = St::UserDid; - type Manifest = St::Manifest; type ManifestDigest = Set; - type Repository = St::Repository; + type Manifest = St::Manifest; } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { + ///State transition - sets the `manifest` field to Set + pub struct SetManifest(PhantomData St>); + impl sealed::Sealed for SetManifest {} + impl State for SetManifest { + type Repository = St::Repository; type UserDid = St::UserDid; - type Manifest = St::Manifest; type ManifestDigest = St::ManifestDigest; - type Repository = Set; + type Manifest = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `repository` field + pub struct repository(()); ///Marker type for the `user_did` field pub struct user_did(()); - ///Marker type for the `manifest` field - pub struct manifest(()); ///Marker type for the `manifest_digest` field pub struct manifest_digest(()); - ///Marker type for the `repository` field - pub struct repository(()); + ///Marker type for the `manifest` field + pub struct manifest(()); } } @@ -955,10 +955,10 @@ where impl NotifyManifestBuilder where St: notify_manifest_state::State, + St::Repository: notify_manifest_state::IsSet, St::UserDid: notify_manifest_state::IsSet, - St::Manifest: notify_manifest_state::IsSet, St::ManifestDigest: notify_manifest_state::IsSet, - St::Repository: notify_manifest_state::IsSet, + St::Manifest: notify_manifest_state::IsSet, { /// Build the final struct. pub fn build(self) -> NotifyManifest { diff --git a/crates/jacquard-api/src/io_atcr/hold/scan.rs b/crates/jacquard-api/src/io_atcr/hold/scan.rs index bc22a932a..febb0d1ff 100644 --- a/crates/jacquard-api/src/io_atcr/hold/scan.rs +++ b/crates/jacquard-api/src/io_atcr/hold/scan.rs @@ -263,205 +263,205 @@ pub mod scan_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repository; - type Critical; type Medium; type Total; type UserDid; - type ScannedAt; - type High; - type ScannerVersion; type Manifest; type Low; + type ScannerVersion; + type Critical; + type ScannedAt; + type Repository; + type High; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repository = Unset; - type Critical = Unset; type Medium = Unset; type Total = Unset; type UserDid = Unset; - type ScannedAt = Unset; - type High = Unset; - type ScannerVersion = Unset; type Manifest = Unset; type Low = Unset; - } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { - type Repository = Set; - type Critical = St::Critical; - type Medium = St::Medium; - type Total = St::Total; - type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = St::ScannerVersion; - type Manifest = St::Manifest; - type Low = St::Low; - } - ///State transition - sets the `critical` field to Set - pub struct SetCritical(PhantomData St>); - impl sealed::Sealed for SetCritical {} - impl State for SetCritical { - type Repository = St::Repository; - type Critical = Set; - type Medium = St::Medium; - type Total = St::Total; - type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = St::ScannerVersion; - type Manifest = St::Manifest; - type Low = St::Low; + type ScannerVersion = Unset; + type Critical = Unset; + type ScannedAt = Unset; + type Repository = Unset; + type High = Unset; } ///State transition - sets the `medium` field to Set pub struct SetMedium(PhantomData St>); impl sealed::Sealed for SetMedium {} impl State for SetMedium { - type Repository = St::Repository; - type Critical = St::Critical; type Medium = Set; type Total = St::Total; type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = St::ScannerVersion; type Manifest = St::Manifest; type Low = St::Low; + type ScannerVersion = St::ScannerVersion; + type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; } ///State transition - sets the `total` field to Set pub struct SetTotal(PhantomData St>); impl sealed::Sealed for SetTotal {} impl State for SetTotal { - type Repository = St::Repository; - type Critical = St::Critical; type Medium = St::Medium; type Total = Set; type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = St::ScannerVersion; type Manifest = St::Manifest; type Low = St::Low; + type ScannerVersion = St::ScannerVersion; + type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; } ///State transition - sets the `user_did` field to Set pub struct SetUserDid(PhantomData St>); impl sealed::Sealed for SetUserDid {} impl State for SetUserDid { - type Repository = St::Repository; - type Critical = St::Critical; type Medium = St::Medium; type Total = St::Total; type UserDid = Set; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = St::ScannerVersion; type Manifest = St::Manifest; type Low = St::Low; - } - ///State transition - sets the `scanned_at` field to Set - pub struct SetScannedAt(PhantomData St>); - impl sealed::Sealed for SetScannedAt {} - impl State for SetScannedAt { - type Repository = St::Repository; + type ScannerVersion = St::ScannerVersion; type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; + } + ///State transition - sets the `manifest` field to Set + pub struct SetManifest(PhantomData St>); + impl sealed::Sealed for SetManifest {} + impl State for SetManifest { type Medium = St::Medium; type Total = St::Total; type UserDid = St::UserDid; - type ScannedAt = Set; - type High = St::High; - type ScannerVersion = St::ScannerVersion; - type Manifest = St::Manifest; + type Manifest = Set; type Low = St::Low; - } - ///State transition - sets the `high` field to Set - pub struct SetHigh(PhantomData St>); - impl sealed::Sealed for SetHigh {} - impl State for SetHigh { - type Repository = St::Repository; + type ScannerVersion = St::ScannerVersion; type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; + } + ///State transition - sets the `low` field to Set + pub struct SetLow(PhantomData St>); + impl sealed::Sealed for SetLow {} + impl State for SetLow { type Medium = St::Medium; type Total = St::Total; type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = Set; - type ScannerVersion = St::ScannerVersion; type Manifest = St::Manifest; - type Low = St::Low; + type Low = Set; + type ScannerVersion = St::ScannerVersion; + type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; } ///State transition - sets the `scanner_version` field to Set pub struct SetScannerVersion(PhantomData St>); impl sealed::Sealed for SetScannerVersion {} impl State for SetScannerVersion { - type Repository = St::Repository; - type Critical = St::Critical; type Medium = St::Medium; type Total = St::Total; type UserDid = St::UserDid; - type ScannedAt = St::ScannedAt; - type High = St::High; - type ScannerVersion = Set; type Manifest = St::Manifest; type Low = St::Low; - } - ///State transition - sets the `manifest` field to Set - pub struct SetManifest(PhantomData St>); - impl sealed::Sealed for SetManifest {} - impl State for SetManifest { - type Repository = St::Repository; + type ScannerVersion = Set; type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = St::High; + } + ///State transition - sets the `critical` field to Set + pub struct SetCritical(PhantomData St>); + impl sealed::Sealed for SetCritical {} + impl State for SetCritical { type Medium = St::Medium; type Total = St::Total; type UserDid = St::UserDid; + type Manifest = St::Manifest; + type Low = St::Low; + type ScannerVersion = St::ScannerVersion; + type Critical = Set; type ScannedAt = St::ScannedAt; + type Repository = St::Repository; type High = St::High; - type ScannerVersion = St::ScannerVersion; - type Manifest = Set; - type Low = St::Low; } - ///State transition - sets the `low` field to Set - pub struct SetLow(PhantomData St>); - impl sealed::Sealed for SetLow {} - impl State for SetLow { - type Repository = St::Repository; + ///State transition - sets the `scanned_at` field to Set + pub struct SetScannedAt(PhantomData St>); + impl sealed::Sealed for SetScannedAt {} + impl State for SetScannedAt { + type Medium = St::Medium; + type Total = St::Total; + type UserDid = St::UserDid; + type Manifest = St::Manifest; + type Low = St::Low; + type ScannerVersion = St::ScannerVersion; type Critical = St::Critical; + type ScannedAt = Set; + type Repository = St::Repository; + type High = St::High; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { type Medium = St::Medium; type Total = St::Total; type UserDid = St::UserDid; + type Manifest = St::Manifest; + type Low = St::Low; + type ScannerVersion = St::ScannerVersion; + type Critical = St::Critical; type ScannedAt = St::ScannedAt; + type Repository = Set; type High = St::High; - type ScannerVersion = St::ScannerVersion; + } + ///State transition - sets the `high` field to Set + pub struct SetHigh(PhantomData St>); + impl sealed::Sealed for SetHigh {} + impl State for SetHigh { + type Medium = St::Medium; + type Total = St::Total; + type UserDid = St::UserDid; type Manifest = St::Manifest; - type Low = Set; + type Low = St::Low; + type ScannerVersion = St::ScannerVersion; + type Critical = St::Critical; + type ScannedAt = St::ScannedAt; + type Repository = St::Repository; + type High = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repository` field - pub struct repository(()); - ///Marker type for the `critical` field - pub struct critical(()); ///Marker type for the `medium` field pub struct medium(()); ///Marker type for the `total` field pub struct total(()); ///Marker type for the `user_did` field pub struct user_did(()); - ///Marker type for the `scanned_at` field - pub struct scanned_at(()); - ///Marker type for the `high` field - pub struct high(()); - ///Marker type for the `scanner_version` field - pub struct scanner_version(()); ///Marker type for the `manifest` field pub struct manifest(()); ///Marker type for the `low` field pub struct low(()); + ///Marker type for the `scanner_version` field + pub struct scanner_version(()); + ///Marker type for the `critical` field + pub struct critical(()); + ///Marker type for the `scanned_at` field + pub struct scanned_at(()); + ///Marker type for the `repository` field + pub struct repository(()); + ///Marker type for the `high` field + pub struct high(()); } } @@ -735,16 +735,16 @@ impl ScanBuilder { impl ScanBuilder where St: scan_state::State, - St::Repository: scan_state::IsSet, - St::Critical: scan_state::IsSet, St::Medium: scan_state::IsSet, St::Total: scan_state::IsSet, St::UserDid: scan_state::IsSet, - St::ScannedAt: scan_state::IsSet, - St::High: scan_state::IsSet, - St::ScannerVersion: scan_state::IsSet, St::Manifest: scan_state::IsSet, St::Low: scan_state::IsSet, + St::ScannerVersion: scan_state::IsSet, + St::Critical: scan_state::IsSet, + St::ScannedAt: scan_state::IsSet, + St::Repository: scan_state::IsSet, + St::High: scan_state::IsSet, { /// Build the final struct. pub fn build(self) -> Scan { diff --git a/crates/jacquard-api/src/io_atcr/hold/set_stats.rs b/crates/jacquard-api/src/io_atcr/hold/set_stats.rs index 000c5f179..5c9a531bf 100644 --- a/crates/jacquard-api/src/io_atcr/hold/set_stats.rs +++ b/crates/jacquard-api/src/io_atcr/hold/set_stats.rs @@ -139,37 +139,37 @@ pub mod set_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repository; type OwnerDid; + type Repository; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repository = Unset; type OwnerDid = Unset; - } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { - type Repository = Set; - type OwnerDid = St::OwnerDid; + type Repository = Unset; } ///State transition - sets the `owner_did` field to Set pub struct SetOwnerDid(PhantomData St>); impl sealed::Sealed for SetOwnerDid {} impl State for SetOwnerDid { - type Repository = St::Repository; type OwnerDid = Set; + type Repository = St::Repository; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { + type OwnerDid = St::OwnerDid; + type Repository = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repository` field - pub struct repository(()); ///Marker type for the `owner_did` field pub struct owner_did(()); + ///Marker type for the `repository` field + pub struct repository(()); } } @@ -298,8 +298,8 @@ where impl SetStatsBuilder where St: set_stats_state::State, - St::Repository: set_stats_state::IsSet, St::OwnerDid: set_stats_state::IsSet, + St::Repository: set_stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> SetStats { diff --git a/crates/jacquard-api/src/io_atcr/hold/stats.rs b/crates/jacquard-api/src/io_atcr/hold/stats.rs index 0045be09c..f913fbcab 100644 --- a/crates/jacquard-api/src/io_atcr/hold/stats.rs +++ b/crates/jacquard-api/src/io_atcr/hold/stats.rs @@ -157,85 +157,85 @@ pub mod stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UpdatedAt; - type PullCount; type Repository; type OwnerDid; + type UpdatedAt; type PushCount; + type PullCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UpdatedAt = Unset; - type PullCount = Unset; type Repository = Unset; type OwnerDid = Unset; + type UpdatedAt = Unset; type PushCount = Unset; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type UpdatedAt = Set; - type PullCount = St::PullCount; - type Repository = St::Repository; - type OwnerDid = St::OwnerDid; - type PushCount = St::PushCount; - } - ///State transition - sets the `pull_count` field to Set - pub struct SetPullCount(PhantomData St>); - impl sealed::Sealed for SetPullCount {} - impl State for SetPullCount { - type UpdatedAt = St::UpdatedAt; - type PullCount = Set; - type Repository = St::Repository; - type OwnerDid = St::OwnerDid; - type PushCount = St::PushCount; + type PullCount = Unset; } ///State transition - sets the `repository` field to Set pub struct SetRepository(PhantomData St>); impl sealed::Sealed for SetRepository {} impl State for SetRepository { - type UpdatedAt = St::UpdatedAt; - type PullCount = St::PullCount; type Repository = Set; type OwnerDid = St::OwnerDid; + type UpdatedAt = St::UpdatedAt; type PushCount = St::PushCount; + type PullCount = St::PullCount; } ///State transition - sets the `owner_did` field to Set pub struct SetOwnerDid(PhantomData St>); impl sealed::Sealed for SetOwnerDid {} impl State for SetOwnerDid { + type Repository = St::Repository; + type OwnerDid = Set; type UpdatedAt = St::UpdatedAt; + type PushCount = St::PushCount; type PullCount = St::PullCount; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { type Repository = St::Repository; - type OwnerDid = Set; + type OwnerDid = St::OwnerDid; + type UpdatedAt = Set; type PushCount = St::PushCount; + type PullCount = St::PullCount; } ///State transition - sets the `push_count` field to Set pub struct SetPushCount(PhantomData St>); impl sealed::Sealed for SetPushCount {} impl State for SetPushCount { + type Repository = St::Repository; + type OwnerDid = St::OwnerDid; type UpdatedAt = St::UpdatedAt; + type PushCount = Set; type PullCount = St::PullCount; + } + ///State transition - sets the `pull_count` field to Set + pub struct SetPullCount(PhantomData St>); + impl sealed::Sealed for SetPullCount {} + impl State for SetPullCount { type Repository = St::Repository; type OwnerDid = St::OwnerDid; - type PushCount = Set; + type UpdatedAt = St::UpdatedAt; + type PushCount = St::PushCount; + type PullCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `updated_at` field - pub struct updated_at(()); - ///Marker type for the `pull_count` field - pub struct pull_count(()); ///Marker type for the `repository` field pub struct repository(()); ///Marker type for the `owner_did` field pub struct owner_did(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); ///Marker type for the `push_count` field pub struct push_count(()); + ///Marker type for the `pull_count` field + pub struct pull_count(()); } } @@ -396,11 +396,11 @@ where impl StatsBuilder where St: stats_state::State, - St::UpdatedAt: stats_state::IsSet, - St::PullCount: stats_state::IsSet, St::Repository: stats_state::IsSet, St::OwnerDid: stats_state::IsSet, + St::UpdatedAt: stats_state::IsSet, St::PushCount: stats_state::IsSet, + St::PullCount: stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> Stats { diff --git a/crates/jacquard-api/src/io_atcr/hold/subscribe_scan_jobs.rs b/crates/jacquard-api/src/io_atcr/hold/subscribe_scan_jobs.rs index 186abd252..d8eba78dd 100644 --- a/crates/jacquard-api/src/io_atcr/hold/subscribe_scan_jobs.rs +++ b/crates/jacquard-api/src/io_atcr/hold/subscribe_scan_jobs.rs @@ -478,127 +478,127 @@ pub mod scan_job_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type HoldEndpoint; - type Type; type UserDid; - type Seq; - type Digest; + type Type; type Repository; + type Digest; + type Seq; type HoldDid; + type HoldEndpoint; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type HoldEndpoint = Unset; - type Type = Unset; type UserDid = Unset; - type Seq = Unset; - type Digest = Unset; + type Type = Unset; type Repository = Unset; + type Digest = Unset; + type Seq = Unset; type HoldDid = Unset; + type HoldEndpoint = Unset; } - ///State transition - sets the `hold_endpoint` field to Set - pub struct SetHoldEndpoint(PhantomData St>); - impl sealed::Sealed for SetHoldEndpoint {} - impl State for SetHoldEndpoint { - type HoldEndpoint = Set; + ///State transition - sets the `user_did` field to Set + pub struct SetUserDid(PhantomData St>); + impl sealed::Sealed for SetUserDid {} + impl State for SetUserDid { + type UserDid = Set; type Type = St::Type; - type UserDid = St::UserDid; - type Seq = St::Seq; - type Digest = St::Digest; type Repository = St::Repository; + type Digest = St::Digest; + type Seq = St::Seq; type HoldDid = St::HoldDid; + type HoldEndpoint = St::HoldEndpoint; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type HoldEndpoint = St::HoldEndpoint; - type Type = Set; type UserDid = St::UserDid; - type Seq = St::Seq; - type Digest = St::Digest; + type Type = Set; type Repository = St::Repository; - type HoldDid = St::HoldDid; - } - ///State transition - sets the `user_did` field to Set - pub struct SetUserDid(PhantomData St>); - impl sealed::Sealed for SetUserDid {} - impl State for SetUserDid { - type HoldEndpoint = St::HoldEndpoint; - type Type = St::Type; - type UserDid = Set; - type Seq = St::Seq; type Digest = St::Digest; - type Repository = St::Repository; + type Seq = St::Seq; type HoldDid = St::HoldDid; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData St>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { type HoldEndpoint = St::HoldEndpoint; - type Type = St::Type; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { type UserDid = St::UserDid; - type Seq = Set; + type Type = St::Type; + type Repository = Set; type Digest = St::Digest; - type Repository = St::Repository; + type Seq = St::Seq; type HoldDid = St::HoldDid; + type HoldEndpoint = St::HoldEndpoint; } ///State transition - sets the `digest` field to Set pub struct SetDigest(PhantomData St>); impl sealed::Sealed for SetDigest {} impl State for SetDigest { - type HoldEndpoint = St::HoldEndpoint; - type Type = St::Type; type UserDid = St::UserDid; - type Seq = St::Seq; - type Digest = Set; + type Type = St::Type; type Repository = St::Repository; + type Digest = Set; + type Seq = St::Seq; type HoldDid = St::HoldDid; - } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { type HoldEndpoint = St::HoldEndpoint; - type Type = St::Type; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { type UserDid = St::UserDid; - type Seq = St::Seq; + type Type = St::Type; + type Repository = St::Repository; type Digest = St::Digest; - type Repository = Set; + type Seq = Set; type HoldDid = St::HoldDid; + type HoldEndpoint = St::HoldEndpoint; } ///State transition - sets the `hold_did` field to Set pub struct SetHoldDid(PhantomData St>); impl sealed::Sealed for SetHoldDid {} impl State for SetHoldDid { - type HoldEndpoint = St::HoldEndpoint; - type Type = St::Type; type UserDid = St::UserDid; - type Seq = St::Seq; - type Digest = St::Digest; + type Type = St::Type; type Repository = St::Repository; + type Digest = St::Digest; + type Seq = St::Seq; type HoldDid = Set; + type HoldEndpoint = St::HoldEndpoint; + } + ///State transition - sets the `hold_endpoint` field to Set + pub struct SetHoldEndpoint(PhantomData St>); + impl sealed::Sealed for SetHoldEndpoint {} + impl State for SetHoldEndpoint { + type UserDid = St::UserDid; + type Type = St::Type; + type Repository = St::Repository; + type Digest = St::Digest; + type Seq = St::Seq; + type HoldDid = St::HoldDid; + type HoldEndpoint = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `hold_endpoint` field - pub struct hold_endpoint(()); - ///Marker type for the `type` field - pub struct r#type(()); ///Marker type for the `user_did` field pub struct user_did(()); - ///Marker type for the `seq` field - pub struct seq(()); - ///Marker type for the `digest` field - pub struct digest(()); + ///Marker type for the `type` field + pub struct r#type(()); ///Marker type for the `repository` field pub struct repository(()); + ///Marker type for the `digest` field + pub struct digest(()); + ///Marker type for the `seq` field + pub struct seq(()); ///Marker type for the `hold_did` field pub struct hold_did(()); + ///Marker type for the `hold_endpoint` field + pub struct hold_endpoint(()); } } @@ -799,13 +799,13 @@ where impl ScanJobBuilder where St: scan_job_state::State, - St::HoldEndpoint: scan_job_state::IsSet, - St::Type: scan_job_state::IsSet, St::UserDid: scan_job_state::IsSet, - St::Seq: scan_job_state::IsSet, - St::Digest: scan_job_state::IsSet, + St::Type: scan_job_state::IsSet, St::Repository: scan_job_state::IsSet, + St::Digest: scan_job_state::IsSet, + St::Seq: scan_job_state::IsSet, St::HoldDid: scan_job_state::IsSet, + St::HoldEndpoint: scan_job_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScanJob { @@ -1137,51 +1137,51 @@ pub mod scan_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Summary; type Type; type Digest; + 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 Type = Unset; type Digest = Unset; - } - ///State transition - sets the `summary` field to Set - pub struct SetSummary(PhantomData St>); - impl sealed::Sealed for SetSummary {} - impl State for SetSummary { - type Summary = Set; - type Type = St::Type; - type Digest = St::Digest; + type Summary = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Summary = St::Summary; type Type = Set; type Digest = St::Digest; + type Summary = St::Summary; } ///State transition - sets the `digest` field to Set pub struct SetDigest(PhantomData St>); impl sealed::Sealed for SetDigest {} impl State for SetDigest { - type Summary = St::Summary; type Type = St::Type; type Digest = Set; + type Summary = St::Summary; + } + ///State transition - sets the `summary` field to Set + pub struct SetSummary(PhantomData St>); + impl sealed::Sealed for SetSummary {} + impl State for SetSummary { + type Type = St::Type; + type Digest = St::Digest; + 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 `type` field pub struct r#type(()); ///Marker type for the `digest` field pub struct digest(()); + ///Marker type for the `summary` field + pub struct summary(()); } } @@ -1330,9 +1330,9 @@ impl ScanResultBuilder { impl ScanResultBuilder where St: scan_result_state::State, - St::Summary: scan_result_state::IsSet, St::Type: scan_result_state::IsSet, St::Digest: scan_result_state::IsSet, + St::Summary: scan_result_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScanResult { @@ -1375,85 +1375,85 @@ pub mod vuln_summary_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Low; - type Medium; type Critical; - type Total; + type Medium; type High; + type Total; + type Low; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Low = Unset; - type Medium = Unset; type Critical = Unset; - type Total = Unset; + type Medium = Unset; type High = Unset; + type Total = Unset; + type Low = Unset; } - ///State transition - sets the `low` field to Set - pub struct SetLow(PhantomData St>); - impl sealed::Sealed for SetLow {} - impl State for SetLow { - type Low = Set; + ///State transition - sets the `critical` field to Set + pub struct SetCritical(PhantomData St>); + impl sealed::Sealed for SetCritical {} + impl State for SetCritical { + type Critical = Set; type Medium = St::Medium; - type Critical = St::Critical; - type Total = St::Total; type High = St::High; + type Total = St::Total; + type Low = St::Low; } ///State transition - sets the `medium` field to Set pub struct SetMedium(PhantomData St>); impl sealed::Sealed for SetMedium {} impl State for SetMedium { - type Low = St::Low; - type Medium = Set; type Critical = St::Critical; - type Total = St::Total; + type Medium = Set; type High = St::High; - } - ///State transition - sets the `critical` field to Set - pub struct SetCritical(PhantomData St>); - impl sealed::Sealed for SetCritical {} - impl State for SetCritical { + type Total = St::Total; type Low = St::Low; + } + ///State transition - sets the `high` field to Set + pub struct SetHigh(PhantomData St>); + impl sealed::Sealed for SetHigh {} + impl State for SetHigh { + type Critical = St::Critical; type Medium = St::Medium; - type Critical = Set; + type High = Set; type Total = St::Total; - type High = St::High; + type Low = St::Low; } ///State transition - sets the `total` field to Set pub struct SetTotal(PhantomData St>); impl sealed::Sealed for SetTotal {} impl State for SetTotal { - type Low = St::Low; - type Medium = St::Medium; type Critical = St::Critical; - type Total = Set; + type Medium = St::Medium; type High = St::High; - } - ///State transition - sets the `high` field to Set - pub struct SetHigh(PhantomData St>); - impl sealed::Sealed for SetHigh {} - impl State for SetHigh { + type Total = Set; type Low = St::Low; - type Medium = St::Medium; + } + ///State transition - sets the `low` field to Set + pub struct SetLow(PhantomData St>); + impl sealed::Sealed for SetLow {} + impl State for SetLow { type Critical = St::Critical; + type Medium = St::Medium; + type High = St::High; type Total = St::Total; - type High = Set; + type Low = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `low` field - pub struct low(()); - ///Marker type for the `medium` field - pub struct medium(()); ///Marker type for the `critical` field pub struct critical(()); - ///Marker type for the `total` field - pub struct total(()); + ///Marker type for the `medium` field + pub struct medium(()); ///Marker type for the `high` field pub struct high(()); + ///Marker type for the `total` field + pub struct total(()); + ///Marker type for the `low` field + pub struct low(()); } } @@ -1580,11 +1580,11 @@ where impl VulnSummaryBuilder where St: vuln_summary_state::State, - St::Low: vuln_summary_state::IsSet, - St::Medium: vuln_summary_state::IsSet, St::Critical: vuln_summary_state::IsSet, - St::Total: vuln_summary_state::IsSet, + St::Medium: vuln_summary_state::IsSet, St::High: vuln_summary_state::IsSet, + St::Total: vuln_summary_state::IsSet, + St::Low: vuln_summary_state::IsSet, { /// Build the final struct. pub fn build(self) -> VulnSummary { diff --git a/crates/jacquard-api/src/io_atcr/hold/update_crew_tier.rs b/crates/jacquard-api/src/io_atcr/hold/update_crew_tier.rs index b859c16ee..b4a79295d 100644 --- a/crates/jacquard-api/src/io_atcr/hold/update_crew_tier.rs +++ b/crates/jacquard-api/src/io_atcr/hold/update_crew_tier.rs @@ -129,37 +129,37 @@ pub mod update_crew_tier_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UserDid; type TierRank; + type UserDid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UserDid = Unset; type TierRank = Unset; - } - ///State transition - sets the `user_did` field to Set - pub struct SetUserDid(PhantomData St>); - impl sealed::Sealed for SetUserDid {} - impl State for SetUserDid { - type UserDid = Set; - type TierRank = St::TierRank; + type UserDid = Unset; } ///State transition - sets the `tier_rank` field to Set pub struct SetTierRank(PhantomData St>); impl sealed::Sealed for SetTierRank {} impl State for SetTierRank { - type UserDid = St::UserDid; type TierRank = Set; + type UserDid = St::UserDid; + } + ///State transition - sets the `user_did` field to Set + pub struct SetUserDid(PhantomData St>); + impl sealed::Sealed for SetUserDid {} + impl State for SetUserDid { + type TierRank = St::TierRank; + type UserDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user_did` field - pub struct user_did(()); ///Marker type for the `tier_rank` field pub struct tier_rank(()); + ///Marker type for the `user_did` field + pub struct user_did(()); } } @@ -229,8 +229,8 @@ where impl UpdateCrewTierBuilder where St: update_crew_tier_state::State, - St::UserDid: update_crew_tier_state::IsSet, St::TierRank: update_crew_tier_state::IsSet, + St::UserDid: update_crew_tier_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpdateCrewTier { diff --git a/crates/jacquard-api/src/io_atcr/manifest.rs b/crates/jacquard-api/src/io_atcr/manifest.rs index 14fb52d04..b29ad641a 100644 --- a/crates/jacquard-api/src/io_atcr/manifest.rs +++ b/crates/jacquard-api/src/io_atcr/manifest.rs @@ -486,50 +486,50 @@ pub mod blob_reference_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Digest; - type Size; type MediaType; + type Size; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Digest = Unset; - type Size = Unset; type MediaType = Unset; + type Size = Unset; } ///State transition - sets the `digest` field to Set pub struct SetDigest(PhantomData St>); impl sealed::Sealed for SetDigest {} impl State for SetDigest { type Digest = Set; - type Size = St::Size; - type MediaType = St::MediaType; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData St>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - type Digest = St::Digest; - type Size = Set; type MediaType = St::MediaType; + type Size = St::Size; } ///State transition - sets the `media_type` field to Set pub struct SetMediaType(PhantomData St>); impl sealed::Sealed for SetMediaType {} impl State for SetMediaType { type Digest = St::Digest; - type Size = St::Size; type MediaType = Set; + type Size = St::Size; + } + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData St>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Digest = St::Digest; + type MediaType = St::MediaType; + type Size = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `digest` field pub struct digest(()); - ///Marker type for the `size` field - pub struct size(()); ///Marker type for the `media_type` field pub struct media_type(()); + ///Marker type for the `size` field + pub struct size(()); } } @@ -651,8 +651,8 @@ impl BlobReferenceBuilder where St: blob_reference_state::State, St::Digest: blob_reference_state::IsSet, - St::Size: blob_reference_state::IsSet, St::MediaType: blob_reference_state::IsSet, + St::Size: blob_reference_state::IsSet, { /// Build the final struct. pub fn build(self) -> BlobReference { @@ -1073,85 +1073,85 @@ pub mod manifest_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SchemaVersion; - type Digest; type MediaType; type Repository; + type Digest; type CreatedAt; + type SchemaVersion; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SchemaVersion = Unset; - type Digest = Unset; type MediaType = Unset; type Repository = Unset; + type Digest = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `schema_version` field to Set - pub struct SetSchemaVersion(PhantomData St>); - impl sealed::Sealed for SetSchemaVersion {} - impl State for SetSchemaVersion { - type SchemaVersion = Set; - type Digest = St::Digest; - type MediaType = St::MediaType; - type Repository = St::Repository; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `digest` field to Set - pub struct SetDigest(PhantomData St>); - impl sealed::Sealed for SetDigest {} - impl State for SetDigest { - type SchemaVersion = St::SchemaVersion; - type Digest = Set; - type MediaType = St::MediaType; - type Repository = St::Repository; - type CreatedAt = St::CreatedAt; + type SchemaVersion = Unset; } ///State transition - sets the `media_type` field to Set pub struct SetMediaType(PhantomData St>); impl sealed::Sealed for SetMediaType {} impl State for SetMediaType { - type SchemaVersion = St::SchemaVersion; - type Digest = St::Digest; type MediaType = Set; type Repository = St::Repository; + type Digest = St::Digest; type CreatedAt = St::CreatedAt; + type SchemaVersion = St::SchemaVersion; } ///State transition - sets the `repository` field to Set pub struct SetRepository(PhantomData St>); impl sealed::Sealed for SetRepository {} impl State for SetRepository { - type SchemaVersion = St::SchemaVersion; - type Digest = St::Digest; type MediaType = St::MediaType; type Repository = Set; + type Digest = St::Digest; type CreatedAt = St::CreatedAt; + type SchemaVersion = St::SchemaVersion; + } + ///State transition - sets the `digest` field to Set + pub struct SetDigest(PhantomData St>); + impl sealed::Sealed for SetDigest {} + impl State for SetDigest { + type MediaType = St::MediaType; + type Repository = St::Repository; + type Digest = Set; + type CreatedAt = St::CreatedAt; + type SchemaVersion = St::SchemaVersion; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SchemaVersion = St::SchemaVersion; - type Digest = St::Digest; type MediaType = St::MediaType; type Repository = St::Repository; + type Digest = St::Digest; type CreatedAt = Set; + type SchemaVersion = St::SchemaVersion; + } + ///State transition - sets the `schema_version` field to Set + pub struct SetSchemaVersion(PhantomData St>); + impl sealed::Sealed for SetSchemaVersion {} + impl State for SetSchemaVersion { + type MediaType = St::MediaType; + type Repository = St::Repository; + type Digest = St::Digest; + type CreatedAt = St::CreatedAt; + type SchemaVersion = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `schema_version` field - pub struct schema_version(()); - ///Marker type for the `digest` field - pub struct digest(()); ///Marker type for the `media_type` field pub struct media_type(()); ///Marker type for the `repository` field pub struct repository(()); + ///Marker type for the `digest` field + pub struct digest(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `schema_version` field + pub struct schema_version(()); } } @@ -1428,11 +1428,11 @@ impl ManifestBuilder { impl ManifestBuilder where St: manifest_state::State, - St::SchemaVersion: manifest_state::IsSet, - St::Digest: manifest_state::IsSet, St::MediaType: manifest_state::IsSet, St::Repository: manifest_state::IsSet, + St::Digest: manifest_state::IsSet, St::CreatedAt: manifest_state::IsSet, + St::SchemaVersion: manifest_state::IsSet, { /// Build the final struct. pub fn build(self) -> Manifest { diff --git a/crates/jacquard-api/src/io_atcr/repo/page.rs b/crates/jacquard-api/src/io_atcr/repo/page.rs index b116418e8..e6b6010e8 100644 --- a/crates/jacquard-api/src/io_atcr/repo/page.rs +++ b/crates/jacquard-api/src/io_atcr/repo/page.rs @@ -186,50 +186,50 @@ pub mod page_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type UpdatedAt; - type Repository; type CreatedAt; + type Repository; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type UpdatedAt = Unset; - type Repository = Unset; type CreatedAt = Unset; + type Repository = Unset; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { type UpdatedAt = Set; - type Repository = St::Repository; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { - type UpdatedAt = St::UpdatedAt; - type Repository = Set; type CreatedAt = St::CreatedAt; + type Repository = St::Repository; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type UpdatedAt = St::UpdatedAt; - type Repository = St::Repository; type CreatedAt = Set; + type Repository = St::Repository; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { + type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; + type Repository = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `updated_at` field pub struct updated_at(()); - ///Marker type for the `repository` field - pub struct repository(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `repository` field + pub struct repository(()); } } @@ -351,8 +351,8 @@ impl PageBuilder where St: page_state::State, St::UpdatedAt: page_state::IsSet, - St::Repository: page_state::IsSet, St::CreatedAt: page_state::IsSet, + St::Repository: page_state::IsSet, { /// Build the final struct. pub fn build(self) -> Page { diff --git a/crates/jacquard-api/src/io_atcr/sailor/webhook.rs b/crates/jacquard-api/src/io_atcr/sailor/webhook.rs index 1735650e9..96b40c836 100644 --- a/crates/jacquard-api/src/io_atcr/sailor/webhook.rs +++ b/crates/jacquard-api/src/io_atcr/sailor/webhook.rs @@ -142,65 +142,65 @@ pub mod webhook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PrivateCid; - type CreatedAt; type Triggers; + type CreatedAt; + type PrivateCid; type HoldDid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PrivateCid = Unset; - type CreatedAt = Unset; type Triggers = Unset; + type CreatedAt = Unset; + type PrivateCid = Unset; type HoldDid = Unset; } - ///State transition - sets the `private_cid` field to Set - pub struct SetPrivateCid(PhantomData St>); - impl sealed::Sealed for SetPrivateCid {} - impl State for SetPrivateCid { - type PrivateCid = Set; + ///State transition - sets the `triggers` field to Set + pub struct SetTriggers(PhantomData St>); + impl sealed::Sealed for SetTriggers {} + impl State for SetTriggers { + type Triggers = Set; type CreatedAt = St::CreatedAt; - type Triggers = St::Triggers; + type PrivateCid = St::PrivateCid; type HoldDid = St::HoldDid; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type PrivateCid = St::PrivateCid; - type CreatedAt = Set; type Triggers = St::Triggers; + type CreatedAt = Set; + type PrivateCid = St::PrivateCid; type HoldDid = St::HoldDid; } - ///State transition - sets the `triggers` field to Set - pub struct SetTriggers(PhantomData St>); - impl sealed::Sealed for SetTriggers {} - impl State for SetTriggers { - type PrivateCid = St::PrivateCid; + ///State transition - sets the `private_cid` field to Set + pub struct SetPrivateCid(PhantomData St>); + impl sealed::Sealed for SetPrivateCid {} + impl State for SetPrivateCid { + type Triggers = St::Triggers; type CreatedAt = St::CreatedAt; - type Triggers = Set; + type PrivateCid = Set; type HoldDid = St::HoldDid; } ///State transition - sets the `hold_did` field to Set pub struct SetHoldDid(PhantomData St>); impl sealed::Sealed for SetHoldDid {} impl State for SetHoldDid { - type PrivateCid = St::PrivateCid; - type CreatedAt = St::CreatedAt; type Triggers = St::Triggers; + type CreatedAt = St::CreatedAt; + type PrivateCid = St::PrivateCid; type HoldDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `private_cid` field - pub struct private_cid(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `triggers` field pub struct triggers(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `private_cid` field + pub struct private_cid(()); ///Marker type for the `hold_did` field pub struct hold_did(()); } @@ -329,9 +329,9 @@ impl WebhookBuilder { impl WebhookBuilder where St: webhook_state::State, - St::PrivateCid: webhook_state::IsSet, - St::CreatedAt: webhook_state::IsSet, St::Triggers: webhook_state::IsSet, + St::CreatedAt: webhook_state::IsSet, + St::PrivateCid: webhook_state::IsSet, St::HoldDid: webhook_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/io_atcr/tag.rs b/crates/jacquard-api/src/io_atcr/tag.rs index 18f9d328b..c73c2f872 100644 --- a/crates/jacquard-api/src/io_atcr/tag.rs +++ b/crates/jacquard-api/src/io_atcr/tag.rs @@ -155,37 +155,37 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repository; type Tag; + type Repository; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repository = Unset; type Tag = Unset; - } - ///State transition - sets the `repository` field to Set - pub struct SetRepository(PhantomData St>); - impl sealed::Sealed for SetRepository {} - impl State for SetRepository { - type Repository = Set; - type Tag = St::Tag; + type Repository = Unset; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData St>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type Repository = St::Repository; type Tag = Set; + type Repository = St::Repository; + } + ///State transition - sets the `repository` field to Set + pub struct SetRepository(PhantomData St>); + impl sealed::Sealed for SetRepository {} + impl State for SetRepository { + type Tag = St::Tag; + type Repository = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repository` field - pub struct repository(()); ///Marker type for the `tag` field pub struct tag(()); + ///Marker type for the `repository` field + pub struct repository(()); } } @@ -291,8 +291,8 @@ impl TagBuilder { impl TagBuilder where St: tag_state::State, - St::Repository: tag_state::IsSet, St::Tag: tag_state::IsSet, + St::Repository: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/io_kich/cookinglog.rs b/crates/jacquard-api/src/io_kich/cookinglog.rs index 6a4c6035f..efa1d8f45 100644 --- a/crates/jacquard-api/src/io_kich/cookinglog.rs +++ b/crates/jacquard-api/src/io_kich/cookinglog.rs @@ -130,37 +130,37 @@ pub mod cookinglog_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -256,8 +256,8 @@ where impl CookinglogBuilder where St: cookinglog_state::State, - St::CreatedAt: cookinglog_state::IsSet, St::Subject: cookinglog_state::IsSet, + St::CreatedAt: cookinglog_state::IsSet, { /// Build the final struct. pub fn build(self) -> Cookinglog { diff --git a/crates/jacquard-api/src/io_kich/graph/follow.rs b/crates/jacquard-api/src/io_kich/graph/follow.rs index 56322b487..c43c65c4f 100644 --- a/crates/jacquard-api/src/io_kich/graph/follow.rs +++ b/crates/jacquard-api/src/io_kich/graph/follow.rs @@ -113,37 +113,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -213,8 +213,8 @@ where impl FollowBuilder where St: follow_state::State, - St::Subject: follow_state::IsSet, St::CreatedAt: follow_state::IsSet, + St::Subject: follow_state::IsSet, { /// Build the final struct. pub fn build(self) -> Follow { diff --git a/crates/jacquard-api/src/io_kich/recipe/collectionitem.rs b/crates/jacquard-api/src/io_kich/recipe/collectionitem.rs index 874f415a3..129aaf1f1 100644 --- a/crates/jacquard-api/src/io_kich/recipe/collectionitem.rs +++ b/crates/jacquard-api/src/io_kich/recipe/collectionitem.rs @@ -123,50 +123,50 @@ pub mod collectionitem_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Subject; - type Collection; type CreatedAt; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Subject = Unset; - type Collection = Unset; type CreatedAt = Unset; + type Collection = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Subject = Set; - type Collection = St::Collection; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData St>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Subject = St::Subject; - type Collection = Set; type CreatedAt = St::CreatedAt; + type Collection = St::Collection; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Subject = St::Subject; - type Collection = St::Collection; type CreatedAt = Set; + type Collection = St::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData St>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + type Collection = 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 `collection` field - pub struct collection(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -288,8 +288,8 @@ impl CollectionitemBuilder where St: collectionitem_state::State, St::Subject: collectionitem_state::IsSet, - St::Collection: collectionitem_state::IsSet, St::CreatedAt: collectionitem_state::IsSet, + St::Collection: collectionitem_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collectionitem { diff --git a/crates/jacquard-api/src/io_kich/recipe/like.rs b/crates/jacquard-api/src/io_kich/recipe/like.rs index 79351382f..d9e650c45 100644 --- a/crates/jacquard-api/src/io_kich/recipe/like.rs +++ b/crates/jacquard-api/src/io_kich/recipe/like.rs @@ -114,37 +114,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -227,8 +227,8 @@ impl LikeBuilder { impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/io_kich/recipe/recipe.rs b/crates/jacquard-api/src/io_kich/recipe/recipe.rs index 1960c4c59..3b9ad7da5 100644 --- a/crates/jacquard-api/src/io_kich/recipe/recipe.rs +++ b/crates/jacquard-api/src/io_kich/recipe/recipe.rs @@ -667,51 +667,51 @@ pub mod recipe_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Servings; type Name; + type Servings; + 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 Servings = Unset; type Name = Unset; + type Servings = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Servings = St::Servings; - type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `servings` field to Set pub struct SetServings(PhantomData St>); impl sealed::Sealed for SetServings {} impl State for SetServings { - type CreatedAt = St::CreatedAt; - type Servings = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Servings = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; type Servings = St::Servings; - type Name = 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 `servings` field - pub struct servings(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `servings` field + pub struct servings(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -1045,9 +1045,9 @@ impl RecipeBuilder { impl RecipeBuilder where St: recipe_state::State, - St::CreatedAt: recipe_state::IsSet, - St::Servings: recipe_state::IsSet, St::Name: recipe_state::IsSet, + St::Servings: recipe_state::IsSet, + St::CreatedAt: recipe_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recipe { diff --git a/crates/jacquard-api/src/io_kich/recipe/review.rs b/crates/jacquard-api/src/io_kich/recipe/review.rs index 46fba836a..29fdaaec3 100644 --- a/crates/jacquard-api/src/io_kich/recipe/review.rs +++ b/crates/jacquard-api/src/io_kich/recipe/review.rs @@ -153,51 +153,51 @@ pub mod review_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Subject; type Rating; - 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; type Rating = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Subject = St::Subject; + type Rating = St::Rating; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type CreatedAt = St::CreatedAt; type Subject = Set; type Rating = St::Rating; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `rating` field to Set pub struct SetRating(PhantomData St>); impl sealed::Sealed for SetRating {} impl State for SetRating { - type Subject = St::Subject; - type Rating = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Subject = St::Subject; - type Rating = St::Rating; - type CreatedAt = Set; + type Rating = 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 `rating` field pub struct rating(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -318,9 +318,9 @@ impl ReviewBuilder { impl ReviewBuilder where St: review_state::State, + St::CreatedAt: review_state::IsSet, St::Subject: review_state::IsSet, St::Rating: review_state::IsSet, - St::CreatedAt: review_state::IsSet, { /// Build the final struct. pub fn build(self) -> Review { diff --git a/crates/jacquard-api/src/io_livewire/p3k/podping00.rs b/crates/jacquard-api/src/io_livewire/p3k/podping00.rs index c81baae04..99241294b 100644 --- a/crates/jacquard-api/src/io_livewire/p3k/podping00.rs +++ b/crates/jacquard-api/src/io_livewire/p3k/podping00.rs @@ -114,37 +114,37 @@ pub mod podping00_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Url; + 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 Url = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Url = St::Url; + type CreatedAt = Unset; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type CreatedAt = St::CreatedAt; type Url = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Url = St::Url; + 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 `url` field pub struct url(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,8 +214,8 @@ where impl Podping00Builder where St: podping00_state::State, - St::CreatedAt: podping00_state::IsSet, St::Url: podping00_state::IsSet, + St::CreatedAt: podping00_state::IsSet, { /// Build the final struct. pub fn build(self) -> Podping00 { diff --git a/crates/jacquard-api/src/io_whiteley/ATlas/pin.rs b/crates/jacquard-api/src/io_whiteley/ATlas/pin.rs index 05edc4a88..6c4cd3c75 100644 --- a/crates/jacquard-api/src/io_whiteley/ATlas/pin.rs +++ b/crates/jacquard-api/src/io_whiteley/ATlas/pin.rs @@ -160,85 +160,85 @@ pub mod pin_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; - type Latitude; - type Did; type PlacedAt; + type Latitude; type Longitude; + type Did; + 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 Latitude = Unset; - type Did = Unset; type PlacedAt = Unset; + type Latitude = Unset; type Longitude = Unset; + type Did = Unset; + type Description = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; + ///State transition - sets the `placed_at` field to Set + pub struct SetPlacedAt(PhantomData St>); + impl sealed::Sealed for SetPlacedAt {} + impl State for SetPlacedAt { + type PlacedAt = Set; type Latitude = St::Latitude; - type Did = St::Did; - type PlacedAt = St::PlacedAt; type Longitude = St::Longitude; + type Did = St::Did; + type Description = St::Description; } ///State transition - sets the `latitude` field to Set pub struct SetLatitude(PhantomData St>); impl sealed::Sealed for SetLatitude {} impl State for SetLatitude { - type Description = St::Description; + type PlacedAt = St::PlacedAt; type Latitude = Set; + type Longitude = St::Longitude; type Did = St::Did; + type Description = St::Description; + } + ///State transition - sets the `longitude` field to Set + pub struct SetLongitude(PhantomData St>); + impl sealed::Sealed for SetLongitude {} + impl State for SetLongitude { type PlacedAt = St::PlacedAt; - type Longitude = St::Longitude; + type Latitude = St::Latitude; + type Longitude = Set; + type Did = St::Did; + type Description = St::Description; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Description = St::Description; - type Latitude = St::Latitude; - type Did = Set; type PlacedAt = St::PlacedAt; - type Longitude = St::Longitude; - } - ///State transition - sets the `placed_at` field to Set - pub struct SetPlacedAt(PhantomData St>); - impl sealed::Sealed for SetPlacedAt {} - impl State for SetPlacedAt { - type Description = St::Description; type Latitude = St::Latitude; - type Did = St::Did; - type PlacedAt = Set; type Longitude = St::Longitude; - } - ///State transition - sets the `longitude` field to Set - pub struct SetLongitude(PhantomData St>); - impl sealed::Sealed for SetLongitude {} - impl State for SetLongitude { + type Did = Set; type Description = St::Description; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type PlacedAt = St::PlacedAt; type Latitude = St::Latitude; + type Longitude = St::Longitude; type Did = St::Did; - type PlacedAt = St::PlacedAt; - type Longitude = 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 `latitude` field - pub struct latitude(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `placed_at` field pub struct placed_at(()); + ///Marker type for the `latitude` field + pub struct latitude(()); ///Marker type for the `longitude` field pub struct longitude(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -385,11 +385,11 @@ impl PinBuilder { impl PinBuilder where St: pin_state::State, - St::Description: pin_state::IsSet, - St::Latitude: pin_state::IsSet, - St::Did: pin_state::IsSet, St::PlacedAt: pin_state::IsSet, + St::Latitude: pin_state::IsSet, St::Longitude: pin_state::IsSet, + St::Did: pin_state::IsSet, + St::Description: pin_state::IsSet, { /// Build the final struct. pub fn build(self) -> Pin { diff --git a/crates/jacquard-api/src/io_whiteley/luke/ATlas/pin.rs b/crates/jacquard-api/src/io_whiteley/luke/ATlas/pin.rs index 30d8f662d..335cca2dd 100644 --- a/crates/jacquard-api/src/io_whiteley/luke/ATlas/pin.rs +++ b/crates/jacquard-api/src/io_whiteley/luke/ATlas/pin.rs @@ -160,83 +160,83 @@ pub mod pin_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; + type Did; type Longitude; + type Description; type Latitude; - type Did; type PlacedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; + type Did = Unset; type Longitude = Unset; + type Description = Unset; type Latitude = Unset; - type Did = Unset; type PlacedAt = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Longitude = St::Longitude; + type Description = St::Description; type Latitude = St::Latitude; - type Did = St::Did; type PlacedAt = St::PlacedAt; } ///State transition - sets the `longitude` field to Set pub struct SetLongitude(PhantomData St>); impl sealed::Sealed for SetLongitude {} impl State for SetLongitude { - type Description = St::Description; + type Did = St::Did; type Longitude = Set; + type Description = St::Description; type Latitude = St::Latitude; + type PlacedAt = St::PlacedAt; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { type Did = St::Did; + type Longitude = St::Longitude; + type Description = Set; + type Latitude = St::Latitude; type PlacedAt = St::PlacedAt; } ///State transition - sets the `latitude` field to Set pub struct SetLatitude(PhantomData St>); impl sealed::Sealed for SetLatitude {} impl State for SetLatitude { - type Description = St::Description; - type Longitude = St::Longitude; - type Latitude = Set; type Did = St::Did; - type PlacedAt = St::PlacedAt; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Description = St::Description; type Longitude = St::Longitude; - type Latitude = St::Latitude; - type Did = Set; + type Description = St::Description; + type Latitude = Set; type PlacedAt = St::PlacedAt; } ///State transition - sets the `placed_at` field to Set pub struct SetPlacedAt(PhantomData St>); impl sealed::Sealed for SetPlacedAt {} impl State for SetPlacedAt { - type Description = St::Description; + type Did = St::Did; type Longitude = St::Longitude; + type Description = St::Description; type Latitude = St::Latitude; - type Did = St::Did; type PlacedAt = 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 `did` field + pub struct did(()); ///Marker type for the `longitude` field pub struct longitude(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `latitude` field pub struct latitude(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `placed_at` field pub struct placed_at(()); } @@ -385,10 +385,10 @@ impl PinBuilder { impl PinBuilder where St: pin_state::State, - St::Description: pin_state::IsSet, + St::Did: pin_state::IsSet, St::Longitude: pin_state::IsSet, + St::Description: pin_state::IsSet, St::Latitude: pin_state::IsSet, - St::Did: pin_state::IsSet, St::PlacedAt: pin_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/io_whiteside/linked_account.rs b/crates/jacquard-api/src/io_whiteside/linked_account.rs index bac8c13f2..a60c334ce 100644 --- a/crates/jacquard-api/src/io_whiteside/linked_account.rs +++ b/crates/jacquard-api/src/io_whiteside/linked_account.rs @@ -119,49 +119,49 @@ pub mod linked_account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Link; + type Name; type Icon; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Link = Unset; + type Name = Unset; type Icon = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Link = St::Link; - type Icon = St::Icon; - } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData St>); impl sealed::Sealed for SetLink {} impl State for SetLink { - type Name = St::Name; type Link = Set; + type Name = St::Name; + type Icon = St::Icon; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Link = St::Link; + type Name = Set; type Icon = St::Icon; } ///State transition - sets the `icon` field to Set pub struct SetIcon(PhantomData St>); impl sealed::Sealed for SetIcon {} impl State for SetIcon { - type Name = St::Name; type Link = St::Link; + type Name = St::Name; type Icon = 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 `link` field pub struct link(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `icon` field pub struct icon(()); } @@ -265,8 +265,8 @@ impl LinkedAccountBuilder { impl LinkedAccountBuilder where St: linked_account_state::State, - St::Name: linked_account_state::IsSet, St::Link: linked_account_state::IsSet, + St::Name: linked_account_state::IsSet, St::Icon: linked_account_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/io_whiteside/profile.rs b/crates/jacquard-api/src/io_whiteside/profile.rs index fa94b7b60..8b6096e40 100644 --- a/crates/jacquard-api/src/io_whiteside/profile.rs +++ b/crates/jacquard-api/src/io_whiteside/profile.rs @@ -138,51 +138,51 @@ pub mod profile_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; - type UpdatedAt; type Heading; + type UpdatedAt; + 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 UpdatedAt = Unset; type Heading = Unset; + type UpdatedAt = Unset; + type Content = Unset; } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; + ///State transition - sets the `heading` field to Set + pub struct SetHeading(PhantomData St>); + impl sealed::Sealed for SetHeading {} + impl State for SetHeading { + type Heading = Set; type UpdatedAt = St::UpdatedAt; - type Heading = St::Heading; + type Content = St::Content; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Content = St::Content; - type UpdatedAt = Set; type Heading = St::Heading; - } - ///State transition - sets the `heading` field to Set - pub struct SetHeading(PhantomData St>); - impl sealed::Sealed for SetHeading {} - impl State for SetHeading { + type UpdatedAt = Set; type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Heading = St::Heading; type UpdatedAt = St::UpdatedAt; - type Heading = 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 `updated_at` field - pub struct updated_at(()); ///Marker type for the `heading` field pub struct heading(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -271,9 +271,9 @@ where impl ProfileBuilder where St: profile_state::State, - St::Content: profile_state::IsSet, - St::UpdatedAt: profile_state::IsSet, St::Heading: profile_state::IsSet, + St::UpdatedAt: profile_state::IsSet, + St::Content: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/lib.rs b/crates/jacquard-api/src/lib.rs index eae5293c6..6e2fdab2c 100644 --- a/crates/jacquard-api/src/lib.rs +++ b/crates/jacquard-api/src/lib.rs @@ -117,6 +117,10 @@ pub mod at_podping; pub mod at_unthread; +#[cfg(feature = "at_youandme")] +pub mod at_youandme; + + #[cfg(feature = "beauty_cybernetic")] pub mod beauty_cybernetic; @@ -282,6 +286,10 @@ pub mod dev_fudgeu; pub mod dev_kanad; +#[cfg(feature = "dev_keytrace")] +pub mod dev_keytrace; + + #[cfg(feature = "dev_ocbwoy3")] pub mod dev_ocbwoy3; @@ -658,6 +666,10 @@ pub mod tech_manos; pub mod tech_tokimeki; +#[cfg(feature = "to_atpr")] +pub mod to_atpr; + + #[cfg(feature = "tools_ozone")] pub mod tools_ozone; @@ -686,6 +698,10 @@ pub mod us_polhem; pub mod win_tomo_x; +#[cfg(feature = "world_ptah")] +pub mod world_ptah; + + #[cfg(feature = "xyz_atpoke")] pub mod xyz_atpoke; diff --git a/crates/jacquard-api/src/link_bridgebeats/lookup.rs b/crates/jacquard-api/src/link_bridgebeats/lookup.rs index b484d6c20..b4bcdd80c 100644 --- a/crates/jacquard-api/src/link_bridgebeats/lookup.rs +++ b/crates/jacquard-api/src/link_bridgebeats/lookup.rs @@ -245,37 +245,37 @@ pub mod lookup_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Results; type LookedUpAt; + type Results; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Results = Unset; type LookedUpAt = Unset; - } - ///State transition - sets the `results` field to Set - pub struct SetResults(PhantomData St>); - impl sealed::Sealed for SetResults {} - impl State for SetResults { - type Results = Set; - type LookedUpAt = St::LookedUpAt; + type Results = Unset; } ///State transition - sets the `looked_up_at` field to Set pub struct SetLookedUpAt(PhantomData St>); impl sealed::Sealed for SetLookedUpAt {} impl State for SetLookedUpAt { - type Results = St::Results; type LookedUpAt = Set; + type Results = St::Results; + } + ///State transition - sets the `results` field to Set + pub struct SetResults(PhantomData St>); + impl sealed::Sealed for SetResults {} + impl State for SetResults { + type LookedUpAt = St::LookedUpAt; + type Results = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `results` field - pub struct results(()); ///Marker type for the `looked_up_at` field pub struct looked_up_at(()); + ///Marker type for the `results` field + pub struct results(()); } } @@ -345,8 +345,8 @@ where impl LookupBuilder where St: lookup_state::State, - St::Results: lookup_state::IsSet, St::LookedUpAt: lookup_state::IsSet, + St::Results: lookup_state::IsSet, { /// Build the final struct. pub fn build(self) -> Lookup { @@ -563,84 +563,84 @@ pub mod provider_result_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Artist; - type MarketRegion; - type Provider; type Url; type Title; + type Provider; + type MarketRegion; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Artist = Unset; - type MarketRegion = Unset; - type Provider = Unset; type Url = Unset; type Title = Unset; + type Provider = Unset; + type MarketRegion = Unset; } ///State transition - sets the `artist` field to Set pub struct SetArtist(PhantomData St>); impl sealed::Sealed for SetArtist {} impl State for SetArtist { type Artist = Set; - type MarketRegion = St::MarketRegion; - type Provider = St::Provider; type Url = St::Url; type Title = St::Title; - } - ///State transition - sets the `market_region` field to Set - pub struct SetMarketRegion(PhantomData St>); - impl sealed::Sealed for SetMarketRegion {} - impl State for SetMarketRegion { - type Artist = St::Artist; - type MarketRegion = Set; type Provider = St::Provider; - type Url = St::Url; - type Title = St::Title; - } - ///State transition - sets the `provider` field to Set - pub struct SetProvider(PhantomData St>); - impl sealed::Sealed for SetProvider {} - impl State for SetProvider { - type Artist = St::Artist; type MarketRegion = St::MarketRegion; - type Provider = Set; - type Url = St::Url; - type Title = St::Title; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { type Artist = St::Artist; - type MarketRegion = St::MarketRegion; - type Provider = St::Provider; type Url = Set; type Title = St::Title; + type Provider = St::Provider; + type MarketRegion = St::MarketRegion; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Artist = St::Artist; - type MarketRegion = St::MarketRegion; - type Provider = St::Provider; type Url = St::Url; type Title = Set; + type Provider = St::Provider; + type MarketRegion = St::MarketRegion; + } + ///State transition - sets the `provider` field to Set + pub struct SetProvider(PhantomData St>); + impl sealed::Sealed for SetProvider {} + impl State for SetProvider { + type Artist = St::Artist; + type Url = St::Url; + type Title = St::Title; + type Provider = Set; + type MarketRegion = St::MarketRegion; + } + ///State transition - sets the `market_region` field to Set + pub struct SetMarketRegion(PhantomData St>); + impl sealed::Sealed for SetMarketRegion {} + impl State for SetMarketRegion { + type Artist = St::Artist; + type Url = St::Url; + type Title = St::Title; + type Provider = St::Provider; + type MarketRegion = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `artist` field pub struct artist(()); - ///Marker type for the `market_region` field - pub struct market_region(()); - ///Marker type for the `provider` field - pub struct provider(()); ///Marker type for the `url` field pub struct url(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `provider` field + pub struct provider(()); + ///Marker type for the `market_region` field + pub struct market_region(()); } } @@ -816,10 +816,10 @@ impl ProviderResultBuilder where St: provider_result_state::State, St::Artist: provider_result_state::IsSet, - St::MarketRegion: provider_result_state::IsSet, - St::Provider: provider_result_state::IsSet, St::Url: provider_result_state::IsSet, St::Title: provider_result_state::IsSet, + St::Provider: provider_result_state::IsSet, + St::MarketRegion: provider_result_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProviderResult { diff --git a/crates/jacquard-api/src/me_linkna/lastfm.rs b/crates/jacquard-api/src/me_linkna/lastfm.rs index 29b246cd1..8fdf9360c 100644 --- a/crates/jacquard-api/src/me_linkna/lastfm.rs +++ b/crates/jacquard-api/src/me_linkna/lastfm.rs @@ -137,49 +137,49 @@ pub mod lastfm_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type TrackName; type ArtistNames; + type TrackName; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type TrackName = Unset; type ArtistNames = Unset; + type TrackName = Unset; type CreatedAt = Unset; } - ///State transition - sets the `track_name` field to Set - pub struct SetTrackName(PhantomData St>); - impl sealed::Sealed for SetTrackName {} - impl State for SetTrackName { - type TrackName = Set; - type ArtistNames = St::ArtistNames; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `artist_names` field to Set pub struct SetArtistNames(PhantomData St>); impl sealed::Sealed for SetArtistNames {} impl State for SetArtistNames { - type TrackName = St::TrackName; type ArtistNames = Set; + type TrackName = St::TrackName; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `track_name` field to Set + pub struct SetTrackName(PhantomData St>); + impl sealed::Sealed for SetTrackName {} + impl State for SetTrackName { + type ArtistNames = St::ArtistNames; + type TrackName = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type TrackName = St::TrackName; type ArtistNames = St::ArtistNames; + type TrackName = St::TrackName; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `track_name` field - pub struct track_name(()); ///Marker type for the `artist_names` field pub struct artist_names(()); + ///Marker type for the `track_name` field + pub struct track_name(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -372,8 +372,8 @@ where impl LastfmBuilder where St: lastfm_state::State, - St::TrackName: lastfm_state::IsSet, St::ArtistNames: lastfm_state::IsSet, + St::TrackName: lastfm_state::IsSet, St::CreatedAt: lastfm_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/me_linkna/linkinbio.rs b/crates/jacquard-api/src/me_linkna/linkinbio.rs index 80fe48180..dfd53bb74 100644 --- a/crates/jacquard-api/src/me_linkna/linkinbio.rs +++ b/crates/jacquard-api/src/me_linkna/linkinbio.rs @@ -2794,51 +2794,51 @@ pub mod github_contribution_day_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Level; type Date; type Count; - type Level; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Level = Unset; type Date = Unset; type Count = Unset; - type Level = Unset; + } + ///State transition - sets the `level` field to Set + pub struct SetLevel(PhantomData St>); + impl sealed::Sealed for SetLevel {} + impl State for SetLevel { + type Level = Set; + type Date = St::Date; + type Count = St::Count; } ///State transition - sets the `date` field to Set pub struct SetDate(PhantomData St>); impl sealed::Sealed for SetDate {} impl State for SetDate { + type Level = St::Level; type Date = Set; type Count = St::Count; - type Level = St::Level; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData St>); impl sealed::Sealed for SetCount {} impl State for SetCount { - type Date = St::Date; - type Count = Set; type Level = St::Level; - } - ///State transition - sets the `level` field to Set - pub struct SetLevel(PhantomData St>); - impl sealed::Sealed for SetLevel {} - impl State for SetLevel { type Date = St::Date; - type Count = St::Count; - type Level = Set; + type Count = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `level` field + pub struct level(()); ///Marker type for the `date` field pub struct date(()); ///Marker type for the `count` field pub struct count(()); - ///Marker type for the `level` field - pub struct level(()); } } @@ -2933,9 +2933,9 @@ where impl GithubContributionDayBuilder where St: github_contribution_day_state::State, + St::Level: github_contribution_day_state::IsSet, St::Date: github_contribution_day_state::IsSet, St::Count: github_contribution_day_state::IsSet, - St::Level: github_contribution_day_state::IsSet, { /// Build the final struct. pub fn build(self) -> GithubContributionDay { @@ -3324,67 +3324,67 @@ pub mod widget_github_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Contributions; + type Id; type GithubUsername; type Type; - type Id; - type Contributions; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Contributions = Unset; + type Id = Unset; type GithubUsername = Unset; type Type = Unset; - type Id = Unset; - type Contributions = Unset; + } + ///State transition - sets the `contributions` field to Set + pub struct SetContributions(PhantomData St>); + impl sealed::Sealed for SetContributions {} + impl State for SetContributions { + type Contributions = Set; + type Id = St::Id; + type GithubUsername = St::GithubUsername; + type Type = St::Type; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Contributions = St::Contributions; + type Id = Set; + type GithubUsername = St::GithubUsername; + type Type = St::Type; } ///State transition - sets the `github_username` field to Set pub struct SetGithubUsername(PhantomData St>); impl sealed::Sealed for SetGithubUsername {} impl State for SetGithubUsername { + type Contributions = St::Contributions; + type Id = St::Id; type GithubUsername = Set; type Type = St::Type; - type Id = St::Id; - type Contributions = St::Contributions; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type GithubUsername = St::GithubUsername; - type Type = Set; - type Id = St::Id; - type Contributions = St::Contributions; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type GithubUsername = St::GithubUsername; - type Type = St::Type; - type Id = Set; type Contributions = St::Contributions; - } - ///State transition - sets the `contributions` field to Set - pub struct SetContributions(PhantomData St>); - impl sealed::Sealed for SetContributions {} - impl State for SetContributions { - type GithubUsername = St::GithubUsername; - type Type = St::Type; type Id = St::Id; - type Contributions = Set; + type GithubUsername = St::GithubUsername; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `contributions` field + pub struct contributions(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `github_username` field pub struct github_username(()); ///Marker type for the `type` field pub struct r#type(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `contributions` field - pub struct contributions(()); } } @@ -3553,10 +3553,10 @@ where impl WidgetGithubBuilder where St: widget_github_state::State, + St::Contributions: widget_github_state::IsSet, + St::Id: widget_github_state::IsSet, St::GithubUsername: widget_github_state::IsSet, St::Type: widget_github_state::IsSet, - St::Id: widget_github_state::IsSet, - St::Contributions: widget_github_state::IsSet, { /// Build the final struct. pub fn build(self) -> WidgetGithub { @@ -3601,85 +3601,85 @@ pub mod widget_goodreads_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GoodreadsUserId; - type Books; - type Id; type Shelf; + type Id; + type GoodreadsUserId; type Type; + type Books; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GoodreadsUserId = Unset; - type Books = Unset; - type Id = Unset; type Shelf = Unset; + type Id = Unset; + type GoodreadsUserId = Unset; type Type = Unset; + type Books = Unset; } - ///State transition - sets the `goodreads_user_id` field to Set - pub struct SetGoodreadsUserId(PhantomData St>); - impl sealed::Sealed for SetGoodreadsUserId {} - impl State for SetGoodreadsUserId { - type GoodreadsUserId = Set; - type Books = St::Books; + ///State transition - sets the `shelf` field to Set + pub struct SetShelf(PhantomData St>); + impl sealed::Sealed for SetShelf {} + impl State for SetShelf { + type Shelf = Set; type Id = St::Id; - type Shelf = St::Shelf; - type Type = St::Type; - } - ///State transition - sets the `books` field to Set - pub struct SetBooks(PhantomData St>); - impl sealed::Sealed for SetBooks {} - impl State for SetBooks { type GoodreadsUserId = St::GoodreadsUserId; - type Books = Set; - type Id = St::Id; - type Shelf = St::Shelf; type Type = St::Type; + type Books = St::Books; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type GoodreadsUserId = St::GoodreadsUserId; - type Books = St::Books; - type Id = Set; type Shelf = St::Shelf; - type Type = St::Type; - } - ///State transition - sets the `shelf` field to Set - pub struct SetShelf(PhantomData St>); - impl sealed::Sealed for SetShelf {} - impl State for SetShelf { + type Id = Set; type GoodreadsUserId = St::GoodreadsUserId; + type Type = St::Type; type Books = St::Books; + } + ///State transition - sets the `goodreads_user_id` field to Set + pub struct SetGoodreadsUserId(PhantomData St>); + impl sealed::Sealed for SetGoodreadsUserId {} + impl State for SetGoodreadsUserId { + type Shelf = St::Shelf; type Id = St::Id; - type Shelf = Set; + type GoodreadsUserId = Set; type Type = St::Type; + type Books = St::Books; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { + type Shelf = St::Shelf; + type Id = St::Id; type GoodreadsUserId = St::GoodreadsUserId; + type Type = Set; type Books = St::Books; - type Id = St::Id; + } + ///State transition - sets the `books` field to Set + pub struct SetBooks(PhantomData St>); + impl sealed::Sealed for SetBooks {} + impl State for SetBooks { type Shelf = St::Shelf; - type Type = Set; + type Id = St::Id; + type GoodreadsUserId = St::GoodreadsUserId; + type Type = St::Type; + type Books = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `goodreads_user_id` field - pub struct goodreads_user_id(()); - ///Marker type for the `books` field - pub struct books(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `shelf` field pub struct shelf(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `goodreads_user_id` field + pub struct goodreads_user_id(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `books` field + pub struct books(()); } } @@ -3874,11 +3874,11 @@ where impl WidgetGoodreadsBuilder where St: widget_goodreads_state::State, - St::GoodreadsUserId: widget_goodreads_state::IsSet, - St::Books: widget_goodreads_state::IsSet, - St::Id: widget_goodreads_state::IsSet, St::Shelf: widget_goodreads_state::IsSet, + St::Id: widget_goodreads_state::IsSet, + St::GoodreadsUserId: widget_goodreads_state::IsSet, St::Type: widget_goodreads_state::IsSet, + St::Books: widget_goodreads_state::IsSet, { /// Build the final struct. pub fn build(self) -> WidgetGoodreads { @@ -3925,51 +3925,51 @@ pub mod widget_tealfm_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; - type Id; type Plays; + type Id; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; - type Id = Unset; type Plays = Unset; + type Id = Unset; + type Type = Unset; } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; + ///State transition - sets the `plays` field to Set + pub struct SetPlays(PhantomData St>); + impl sealed::Sealed for SetPlays {} + impl State for SetPlays { + type Plays = Set; type Id = St::Id; - type Plays = St::Plays; + type Type = St::Type; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Type = St::Type; - type Id = Set; type Plays = St::Plays; - } - ///State transition - sets the `plays` field to Set - pub struct SetPlays(PhantomData St>); - impl sealed::Sealed for SetPlays {} - impl State for SetPlays { + type Id = Set; type Type = St::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Plays = St::Plays; type Id = St::Id; - type Plays = Set; + type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `type` field - pub struct r#type(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `plays` field pub struct plays(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -4118,9 +4118,9 @@ where impl WidgetTealfmBuilder where St: widget_tealfm_state::State, - St::Type: widget_tealfm_state::IsSet, - St::Id: widget_tealfm_state::IsSet, St::Plays: widget_tealfm_state::IsSet, + St::Id: widget_tealfm_state::IsSet, + St::Type: widget_tealfm_state::IsSet, { /// Build the final struct. pub fn build(self) -> WidgetTealfm { diff --git a/crates/jacquard-api/src/media_ionosphere/group.rs b/crates/jacquard-api/src/media_ionosphere/group.rs index 8790b23aa..14e6c8c6f 100644 --- a/crates/jacquard-api/src/media_ionosphere/group.rs +++ b/crates/jacquard-api/src/media_ionosphere/group.rs @@ -301,51 +301,51 @@ pub mod group_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; - type Language; type Ionosphere; + type Language; + 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 Language = Unset; type Ionosphere = Unset; + type Language = Unset; + type Name = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; + ///State transition - sets the `ionosphere` field to Set + pub struct SetIonosphere(PhantomData St>); + impl sealed::Sealed for SetIonosphere {} + impl State for SetIonosphere { + type Ionosphere = Set; type Language = St::Language; - type Ionosphere = St::Ionosphere; + type Name = St::Name; } ///State transition - sets the `language` field to Set pub struct SetLanguage(PhantomData St>); impl sealed::Sealed for SetLanguage {} impl State for SetLanguage { - type Name = St::Name; - type Language = Set; type Ionosphere = St::Ionosphere; - } - ///State transition - sets the `ionosphere` field to Set - pub struct SetIonosphere(PhantomData St>); - impl sealed::Sealed for SetIonosphere {} - impl State for SetIonosphere { + type Language = Set; type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Ionosphere = St::Ionosphere; type Language = St::Language; - type Ionosphere = Set; + 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 `language` field - pub struct language(()); ///Marker type for the `ionosphere` field pub struct ionosphere(()); + ///Marker type for the `language` field + pub struct language(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -522,9 +522,9 @@ where impl GroupBuilder where St: group_state::State, - St::Name: group_state::IsSet, - St::Language: group_state::IsSet, St::Ionosphere: group_state::IsSet, + St::Language: group_state::IsSet, + St::Name: group_state::IsSet, { /// Build the final struct. pub fn build(self) -> Group { diff --git a/crates/jacquard-api/src/media_ionosphere/log.rs b/crates/jacquard-api/src/media_ionosphere/log.rs index 7174781b6..e055c0d19 100644 --- a/crates/jacquard-api/src/media_ionosphere/log.rs +++ b/crates/jacquard-api/src/media_ionosphere/log.rs @@ -129,49 +129,49 @@ pub mod log_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ionosphere; type CreatedAt; + type Ionosphere; type Item; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ionosphere = Unset; type CreatedAt = Unset; + type Ionosphere = Unset; type Item = Unset; } - ///State transition - sets the `ionosphere` field to Set - pub struct SetIonosphere(PhantomData St>); - impl sealed::Sealed for SetIonosphere {} - impl State for SetIonosphere { - type Ionosphere = Set; - type CreatedAt = St::CreatedAt; - type Item = St::Item; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Ionosphere = St::Ionosphere; type CreatedAt = Set; + type Ionosphere = St::Ionosphere; + type Item = St::Item; + } + ///State transition - sets the `ionosphere` field to Set + pub struct SetIonosphere(PhantomData St>); + impl sealed::Sealed for SetIonosphere {} + impl State for SetIonosphere { + type CreatedAt = St::CreatedAt; + type Ionosphere = Set; type Item = St::Item; } ///State transition - sets the `item` field to Set pub struct SetItem(PhantomData St>); impl sealed::Sealed for SetItem {} impl State for SetItem { - type Ionosphere = St::Ionosphere; type CreatedAt = St::CreatedAt; + type Ionosphere = St::Ionosphere; type Item = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ionosphere` field - pub struct ionosphere(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `ionosphere` field + pub struct ionosphere(()); ///Marker type for the `item` field pub struct item(()); } @@ -275,8 +275,8 @@ impl LogBuilder { impl LogBuilder where St: log_state::State, - St::Ionosphere: log_state::IsSet, St::CreatedAt: log_state::IsSet, + St::Ionosphere: log_state::IsSet, St::Item: log_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/media_ionosphere/programme.rs b/crates/jacquard-api/src/media_ionosphere/programme.rs index 31e463cf2..766a3d5fd 100644 --- a/crates/jacquard-api/src/media_ionosphere/programme.rs +++ b/crates/jacquard-api/src/media_ionosphere/programme.rs @@ -208,51 +208,51 @@ pub mod programme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Language; type Name; type Ionosphere; - type Language; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Language = Unset; type Name = Unset; type Ionosphere = Unset; - type Language = Unset; + } + ///State transition - sets the `language` field to Set + pub struct SetLanguage(PhantomData St>); + impl sealed::Sealed for SetLanguage {} + impl State for SetLanguage { + type Language = Set; + type Name = St::Name; + type Ionosphere = St::Ionosphere; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Language = St::Language; type Name = Set; type Ionosphere = St::Ionosphere; - type Language = St::Language; } ///State transition - sets the `ionosphere` field to Set pub struct SetIonosphere(PhantomData St>); impl sealed::Sealed for SetIonosphere {} impl State for SetIonosphere { - type Name = St::Name; - type Ionosphere = Set; type Language = St::Language; - } - ///State transition - sets the `language` field to Set - pub struct SetLanguage(PhantomData St>); - impl sealed::Sealed for SetLanguage {} - impl State for SetLanguage { type Name = St::Name; - type Ionosphere = St::Ionosphere; - type Language = Set; + type Ionosphere = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `language` field + pub struct language(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `ionosphere` field pub struct ionosphere(()); - ///Marker type for the `language` field - pub struct language(()); } } @@ -463,9 +463,9 @@ impl ProgrammeBuilder { impl ProgrammeBuilder where St: programme_state::State, + St::Language: programme_state::IsSet, St::Name: programme_state::IsSet, St::Ionosphere: programme_state::IsSet, - St::Language: programme_state::IsSet, { /// Build the final struct. pub fn build(self) -> Programme { diff --git a/crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs b/crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs index f5ce5368c..8fd5590bd 100644 --- a/crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs +++ b/crates/jacquard-api/src/moe_karashiiro/kpaste/paste.rs @@ -188,37 +188,37 @@ pub mod paste_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; 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; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Content = St::Content; + type CreatedAt = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; type Content = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Content = St::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 `created_at` field + pub struct created_at(()); } } @@ -333,8 +333,8 @@ impl PasteBuilder { impl PasteBuilder where St: paste_state::State, - St::CreatedAt: paste_state::IsSet, St::Content: paste_state::IsSet, + St::CreatedAt: paste_state::IsSet, { /// Build the final struct. pub fn build(self) -> Paste { diff --git a/crates/jacquard-api/src/my_skylights/rel.rs b/crates/jacquard-api/src/my_skylights/rel.rs index 52d616689..2a352e79e 100644 --- a/crates/jacquard-api/src/my_skylights/rel.rs +++ b/crates/jacquard-api/src/my_skylights/rel.rs @@ -634,37 +634,37 @@ pub mod rating_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Value; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Value = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Value = St::Value; + type CreatedAt = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type CreatedAt = St::CreatedAt; type Value = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Value = St::Value; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -734,8 +734,8 @@ where impl RatingBuilder where St: rating_state::State, - St::CreatedAt: rating_state::IsSet, St::Value: rating_state::IsSet, + St::CreatedAt: rating_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rating { diff --git a/crates/jacquard-api/src/net_alternativeproto/review.rs b/crates/jacquard-api/src/net_alternativeproto/review.rs index 5b97df13d..3ca59b306 100644 --- a/crates/jacquard-api/src/net_alternativeproto/review.rs +++ b/crates/jacquard-api/src/net_alternativeproto/review.rs @@ -164,8 +164,8 @@ pub mod review_state { pub trait State: sealed::Sealed { type Rating; type ProjectId; - type CreatedAt; type Text; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -173,8 +173,8 @@ pub mod review_state { impl State for Empty { type Rating = Unset; type ProjectId = Unset; - type CreatedAt = Unset; type Text = Unset; + type CreatedAt = Unset; } ///State transition - sets the `rating` field to Set pub struct SetRating(PhantomData St>); @@ -182,8 +182,8 @@ pub mod review_state { impl State for SetRating { type Rating = Set; type ProjectId = St::ProjectId; - type CreatedAt = St::CreatedAt; type Text = St::Text; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `project_id` field to Set pub struct SetProjectId(PhantomData St>); @@ -191,17 +191,8 @@ pub mod review_state { impl State for SetProjectId { type Rating = St::Rating; type ProjectId = Set; - type CreatedAt = St::CreatedAt; - type Text = St::Text; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Rating = St::Rating; - type ProjectId = St::ProjectId; - type CreatedAt = Set; type Text = St::Text; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); @@ -209,8 +200,17 @@ pub mod review_state { impl State for SetText { type Rating = St::Rating; type ProjectId = St::ProjectId; - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Rating = St::Rating; + type ProjectId = St::ProjectId; + type Text = St::Text; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -219,10 +219,10 @@ pub mod review_state { pub struct rating(()); ///Marker type for the `project_id` field pub struct project_id(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -332,8 +332,8 @@ where St: review_state::State, St::Rating: review_state::IsSet, St::ProjectId: review_state::IsSet, - St::CreatedAt: review_state::IsSet, St::Text: review_state::IsSet, + St::CreatedAt: review_state::IsSet, { /// Build the final struct. pub fn build(self) -> Review { diff --git a/crates/jacquard-api/src/net_alternativeproto/submission.rs b/crates/jacquard-api/src/net_alternativeproto/submission.rs index fcb85126b..ba413c72c 100644 --- a/crates/jacquard-api/src/net_alternativeproto/submission.rs +++ b/crates/jacquard-api/src/net_alternativeproto/submission.rs @@ -291,85 +291,85 @@ pub mod submission_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type AuthType; type Url; type Name; - type Description; - type AuthType; type CreatedAt; + type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type AuthType = Unset; type Url = Unset; type Name = Unset; - type Description = Unset; - type AuthType = Unset; type CreatedAt = Unset; + type Description = Unset; + } + ///State transition - sets the `auth_type` field to Set + pub struct SetAuthType(PhantomData St>); + impl sealed::Sealed for SetAuthType {} + impl State for SetAuthType { + type AuthType = Set; + type Url = St::Url; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type Description = St::Description; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { + type AuthType = St::AuthType; type Url = Set; type Name = St::Name; - type Description = St::Description; - type AuthType = St::AuthType; type CreatedAt = St::CreatedAt; + type Description = St::Description; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Url = St::Url; - type Name = Set; - type Description = St::Description; type AuthType = St::AuthType; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { type Url = St::Url; - type Name = St::Name; - type Description = Set; - type AuthType = St::AuthType; + type Name = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `auth_type` field to Set - pub struct SetAuthType(PhantomData St>); - impl sealed::Sealed for SetAuthType {} - impl State for SetAuthType { - type Url = St::Url; - type Name = St::Name; type Description = St::Description; - type AuthType = Set; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type AuthType = St::AuthType; type Url = St::Url; type Name = St::Name; + type CreatedAt = Set; type Description = St::Description; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { type AuthType = St::AuthType; - type CreatedAt = Set; + type Url = St::Url; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `auth_type` field + pub struct auth_type(()); ///Marker type for the `url` field pub struct url(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `description` field - pub struct description(()); - ///Marker type for the `auth_type` field - pub struct auth_type(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -572,11 +572,11 @@ where impl SubmissionBuilder where St: submission_state::State, + St::AuthType: submission_state::IsSet, St::Url: submission_state::IsSet, St::Name: submission_state::IsSet, - St::Description: submission_state::IsSet, - St::AuthType: submission_state::IsSet, St::CreatedAt: submission_state::IsSet, + St::Description: submission_state::IsSet, { /// Build the final struct. pub fn build(self) -> Submission { diff --git a/crates/jacquard-api/src/net_alternativeproto/vote.rs b/crates/jacquard-api/src/net_alternativeproto/vote.rs index c5b134a03..2cacf427f 100644 --- a/crates/jacquard-api/src/net_alternativeproto/vote.rs +++ b/crates/jacquard-api/src/net_alternativeproto/vote.rs @@ -196,51 +196,51 @@ pub mod vote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Direction; 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 Direction = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Direction = St::Direction; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `direction` field to Set pub struct SetDirection(PhantomData St>); impl sealed::Sealed for SetDirection {} impl State for SetDirection { - type Subject = St::Subject; type Direction = Set; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type Direction = St::Direction; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Direction = St::Direction; + type CreatedAt = St::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 `direction` field pub struct direction(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -329,9 +329,9 @@ where impl VoteBuilder where St: vote_state::State, - St::Subject: vote_state::IsSet, St::Direction: vote_state::IsSet, St::CreatedAt: vote_state::IsSet, + St::Subject: vote_state::IsSet, { /// Build the final struct. pub fn build(self) -> Vote { diff --git a/crates/jacquard-api/src/net_altq/aqfile.rs b/crates/jacquard-api/src/net_altq/aqfile.rs index 130731cf2..2827de200 100644 --- a/crates/jacquard-api/src/net_altq/aqfile.rs +++ b/crates/jacquard-api/src/net_altq/aqfile.rs @@ -554,37 +554,37 @@ pub mod file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Size; type Name; + type Size; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Size = Unset; type Name = Unset; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData St>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - type Size = Set; - type Name = St::Name; + type Size = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Size = St::Size; type Name = Set; + type Size = St::Size; + } + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData St>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Name = St::Name; + type Size = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `size` field - pub struct size(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `size` field + pub struct size(()); } } @@ -680,8 +680,8 @@ where impl FileBuilder where St: file_state::State, - St::Size: file_state::IsSet, St::Name: file_state::IsSet, + St::Size: file_state::IsSet, { /// Build the final struct. pub fn build(self) -> File { diff --git a/crates/jacquard-api/src/net_anisota/beta/game/collection.rs b/crates/jacquard-api/src/net_anisota/beta/game/collection.rs index a0a2789d8..3854e3e80 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/collection.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/collection.rs @@ -293,67 +293,67 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Quantity; type AcquiredAt; - type CreatedAt; + type Quantity; type SpecimenId; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Quantity = Unset; type AcquiredAt = Unset; - type CreatedAt = Unset; + type Quantity = Unset; type SpecimenId = Unset; - } - ///State transition - sets the `quantity` field to Set - pub struct SetQuantity(PhantomData St>); - impl sealed::Sealed for SetQuantity {} - impl State for SetQuantity { - type Quantity = Set; - type AcquiredAt = St::AcquiredAt; - type CreatedAt = St::CreatedAt; - type SpecimenId = St::SpecimenId; + type CreatedAt = Unset; } ///State transition - sets the `acquired_at` field to Set pub struct SetAcquiredAt(PhantomData St>); impl sealed::Sealed for SetAcquiredAt {} impl State for SetAcquiredAt { - type Quantity = St::Quantity; type AcquiredAt = Set; - type CreatedAt = St::CreatedAt; + type Quantity = St::Quantity; type SpecimenId = St::SpecimenId; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Quantity = St::Quantity; + ///State transition - sets the `quantity` field to Set + pub struct SetQuantity(PhantomData St>); + impl sealed::Sealed for SetQuantity {} + impl State for SetQuantity { type AcquiredAt = St::AcquiredAt; - type CreatedAt = Set; + type Quantity = Set; type SpecimenId = St::SpecimenId; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `specimen_id` field to Set pub struct SetSpecimenId(PhantomData St>); impl sealed::Sealed for SetSpecimenId {} impl State for SetSpecimenId { - type Quantity = St::Quantity; type AcquiredAt = St::AcquiredAt; - type CreatedAt = St::CreatedAt; + type Quantity = St::Quantity; type SpecimenId = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type AcquiredAt = St::AcquiredAt; + type Quantity = St::Quantity; + type SpecimenId = St::SpecimenId; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `quantity` field - pub struct quantity(()); ///Marker type for the `acquired_at` field pub struct acquired_at(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `quantity` field + pub struct quantity(()); ///Marker type for the `specimen_id` field pub struct specimen_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -678,10 +678,10 @@ impl CollectionBuilder { impl CollectionBuilder where St: collection_state::State, - St::Quantity: collection_state::IsSet, St::AcquiredAt: collection_state::IsSet, - St::CreatedAt: collection_state::IsSet, + St::Quantity: collection_state::IsSet, St::SpecimenId: collection_state::IsSet, + St::CreatedAt: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/net_anisota/beta/game/inventory.rs b/crates/jacquard-api/src/net_anisota/beta/game/inventory.rs index 4d3568858..f812da8f6 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/inventory.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/inventory.rs @@ -244,66 +244,66 @@ pub mod inventory_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Quantity; - type ItemId; type CreatedAt; type AcquiredAt; + type ItemId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Quantity = Unset; - type ItemId = Unset; type CreatedAt = Unset; type AcquiredAt = Unset; + type ItemId = Unset; } ///State transition - sets the `quantity` field to Set pub struct SetQuantity(PhantomData St>); impl sealed::Sealed for SetQuantity {} impl State for SetQuantity { type Quantity = Set; - type ItemId = St::ItemId; - type CreatedAt = St::CreatedAt; - type AcquiredAt = St::AcquiredAt; - } - ///State transition - sets the `item_id` field to Set - pub struct SetItemId(PhantomData St>); - impl sealed::Sealed for SetItemId {} - impl State for SetItemId { - type Quantity = St::Quantity; - type ItemId = Set; type CreatedAt = St::CreatedAt; type AcquiredAt = St::AcquiredAt; + type ItemId = St::ItemId; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Quantity = St::Quantity; - type ItemId = St::ItemId; type CreatedAt = Set; type AcquiredAt = St::AcquiredAt; + type ItemId = St::ItemId; } ///State transition - sets the `acquired_at` field to Set pub struct SetAcquiredAt(PhantomData St>); impl sealed::Sealed for SetAcquiredAt {} impl State for SetAcquiredAt { type Quantity = St::Quantity; - type ItemId = St::ItemId; type CreatedAt = St::CreatedAt; type AcquiredAt = Set; + type ItemId = St::ItemId; + } + ///State transition - sets the `item_id` field to Set + pub struct SetItemId(PhantomData St>); + impl sealed::Sealed for SetItemId {} + impl State for SetItemId { + type Quantity = St::Quantity; + type CreatedAt = St::CreatedAt; + type AcquiredAt = St::AcquiredAt; + type ItemId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `quantity` field pub struct quantity(()); - ///Marker type for the `item_id` field - pub struct item_id(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `acquired_at` field pub struct acquired_at(()); + ///Marker type for the `item_id` field + pub struct item_id(()); } } @@ -593,9 +593,9 @@ impl InventoryBuilder where St: inventory_state::State, St::Quantity: inventory_state::IsSet, - St::ItemId: inventory_state::IsSet, St::CreatedAt: inventory_state::IsSet, St::AcquiredAt: inventory_state::IsSet, + St::ItemId: inventory_state::IsSet, { /// Build the final struct. pub fn build(self) -> Inventory { diff --git a/crates/jacquard-api/src/net_anisota/beta/game/log.rs b/crates/jacquard-api/src/net_anisota/beta/game/log.rs index 82275f149..7984b4e7d 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/log.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/log.rs @@ -1078,49 +1078,49 @@ pub mod log_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Timestamp; type SessionId; + type Timestamp; type EventType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Timestamp = Unset; type SessionId = Unset; + type Timestamp = Unset; type EventType = Unset; } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData St>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Timestamp = Set; - type SessionId = St::SessionId; - type EventType = St::EventType; - } ///State transition - sets the `session_id` field to Set pub struct SetSessionId(PhantomData St>); impl sealed::Sealed for SetSessionId {} impl State for SetSessionId { - type Timestamp = St::Timestamp; type SessionId = Set; + type Timestamp = St::Timestamp; + type EventType = St::EventType; + } + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData St>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { + type SessionId = St::SessionId; + type Timestamp = Set; type EventType = St::EventType; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData St>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type Timestamp = St::Timestamp; type SessionId = St::SessionId; + type Timestamp = St::Timestamp; type EventType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `timestamp` field - pub struct timestamp(()); ///Marker type for the `session_id` field pub struct session_id(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); ///Marker type for the `event_type` field pub struct event_type(()); } @@ -1408,8 +1408,8 @@ where impl LogBuilder where St: log_state::State, - St::Timestamp: log_state::IsSet, St::SessionId: log_state::IsSet, + St::Timestamp: log_state::IsSet, St::EventType: log_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/net_anisota/beta/game/pack.rs b/crates/jacquard-api/src/net_anisota/beta/game/pack.rs index b4a43e784..4b20c64db 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/pack.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/pack.rs @@ -233,67 +233,67 @@ pub mod pack_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type TotalOpens; - type LastOpenTime; type Streak; + type LastOpenTime; + 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 TotalOpens = Unset; - type LastOpenTime = Unset; type Streak = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type TotalOpens = St::TotalOpens; - type LastOpenTime = St::LastOpenTime; - type Streak = St::Streak; + type LastOpenTime = Unset; + type CreatedAt = Unset; } ///State transition - sets the `total_opens` field to Set pub struct SetTotalOpens(PhantomData St>); impl sealed::Sealed for SetTotalOpens {} impl State for SetTotalOpens { - type CreatedAt = St::CreatedAt; type TotalOpens = Set; - type LastOpenTime = St::LastOpenTime; type Streak = St::Streak; + type LastOpenTime = St::LastOpenTime; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `streak` field to Set + pub struct SetStreak(PhantomData St>); + impl sealed::Sealed for SetStreak {} + impl State for SetStreak { + type TotalOpens = St::TotalOpens; + type Streak = Set; + type LastOpenTime = St::LastOpenTime; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `last_open_time` field to Set pub struct SetLastOpenTime(PhantomData St>); impl sealed::Sealed for SetLastOpenTime {} impl State for SetLastOpenTime { - type CreatedAt = St::CreatedAt; type TotalOpens = St::TotalOpens; - type LastOpenTime = Set; type Streak = St::Streak; - } - ///State transition - sets the `streak` field to Set - pub struct SetStreak(PhantomData St>); - impl sealed::Sealed for SetStreak {} - impl State for SetStreak { + type LastOpenTime = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type TotalOpens = St::TotalOpens; + type Streak = St::Streak; type LastOpenTime = St::LastOpenTime; - type Streak = 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 `total_opens` field pub struct total_opens(()); - ///Marker type for the `last_open_time` field - pub struct last_open_time(()); ///Marker type for the `streak` field pub struct streak(()); + ///Marker type for the `last_open_time` field + pub struct last_open_time(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -454,10 +454,10 @@ where impl PackBuilder where St: pack_state::State, - St::CreatedAt: pack_state::IsSet, St::TotalOpens: pack_state::IsSet, - St::LastOpenTime: pack_state::IsSet, St::Streak: pack_state::IsSet, + St::LastOpenTime: pack_state::IsSet, + St::CreatedAt: pack_state::IsSet, { /// Build the final struct. pub fn build(self) -> Pack { diff --git a/crates/jacquard-api/src/net_anisota/beta/game/progress.rs b/crates/jacquard-api/src/net_anisota/beta/game/progress.rs index e59934857..95dd50bc0 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/progress.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/progress.rs @@ -338,85 +338,85 @@ pub mod progress_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Level; + type ProgressPercentage; type XpToNextLevel; - type CreatedAt; type TotalXp; - type ProgressPercentage; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Level = Unset; + type ProgressPercentage = Unset; type XpToNextLevel = Unset; - type CreatedAt = Unset; type TotalXp = Unset; - type ProgressPercentage = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Level = St::Level; + type ProgressPercentage = St::ProgressPercentage; + type XpToNextLevel = St::XpToNextLevel; + type TotalXp = St::TotalXp; } ///State transition - sets the `level` field to Set pub struct SetLevel(PhantomData St>); impl sealed::Sealed for SetLevel {} impl State for SetLevel { + type CreatedAt = St::CreatedAt; type Level = Set; + type ProgressPercentage = St::ProgressPercentage; type XpToNextLevel = St::XpToNextLevel; + type TotalXp = St::TotalXp; + } + ///State transition - sets the `progress_percentage` field to Set + pub struct SetProgressPercentage(PhantomData St>); + impl sealed::Sealed for SetProgressPercentage {} + impl State for SetProgressPercentage { type CreatedAt = St::CreatedAt; + type Level = St::Level; + type ProgressPercentage = Set; + type XpToNextLevel = St::XpToNextLevel; type TotalXp = St::TotalXp; - type ProgressPercentage = St::ProgressPercentage; } ///State transition - sets the `xp_to_next_level` field to Set pub struct SetXpToNextLevel(PhantomData St>); impl sealed::Sealed for SetXpToNextLevel {} impl State for SetXpToNextLevel { - type Level = St::Level; - type XpToNextLevel = Set; type CreatedAt = St::CreatedAt; - type TotalXp = St::TotalXp; - type ProgressPercentage = St::ProgressPercentage; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Level = St::Level; - type XpToNextLevel = St::XpToNextLevel; - type CreatedAt = Set; - type TotalXp = St::TotalXp; type ProgressPercentage = St::ProgressPercentage; + type XpToNextLevel = Set; + type TotalXp = St::TotalXp; } ///State transition - sets the `total_xp` field to Set pub struct SetTotalXp(PhantomData St>); impl sealed::Sealed for SetTotalXp {} impl State for SetTotalXp { - type Level = St::Level; - type XpToNextLevel = St::XpToNextLevel; type CreatedAt = St::CreatedAt; - type TotalXp = Set; - type ProgressPercentage = St::ProgressPercentage; - } - ///State transition - sets the `progress_percentage` field to Set - pub struct SetProgressPercentage(PhantomData St>); - impl sealed::Sealed for SetProgressPercentage {} - impl State for SetProgressPercentage { type Level = St::Level; + type ProgressPercentage = St::ProgressPercentage; type XpToNextLevel = St::XpToNextLevel; - type CreatedAt = St::CreatedAt; - type TotalXp = St::TotalXp; - type ProgressPercentage = Set; + type TotalXp = 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 `level` field pub struct level(()); + ///Marker type for the `progress_percentage` field + pub struct progress_percentage(()); ///Marker type for the `xp_to_next_level` field pub struct xp_to_next_level(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `total_xp` field pub struct total_xp(()); - ///Marker type for the `progress_percentage` field - pub struct progress_percentage(()); } } @@ -705,11 +705,11 @@ where impl ProgressBuilder where St: progress_state::State, + St::CreatedAt: progress_state::IsSet, St::Level: progress_state::IsSet, + St::ProgressPercentage: progress_state::IsSet, St::XpToNextLevel: progress_state::IsSet, - St::CreatedAt: progress_state::IsSet, St::TotalXp: progress_state::IsSet, - St::ProgressPercentage: progress_state::IsSet, { /// Build the final struct. pub fn build(self) -> Progress { diff --git a/crates/jacquard-api/src/net_anisota/beta/game/session.rs b/crates/jacquard-api/src/net_anisota/beta/game/session.rs index a91e2cb44..763a0f005 100644 --- a/crates/jacquard-api/src/net_anisota/beta/game/session.rs +++ b/crates/jacquard-api/src/net_anisota/beta/game/session.rs @@ -894,67 +894,67 @@ pub mod session_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type StartedAt; type Platform; - type Status; + type StartedAt; type ClientVersion; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type StartedAt = Unset; type Platform = Unset; - type Status = Unset; + type StartedAt = Unset; type ClientVersion = Unset; - } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData St>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type StartedAt = Set; - type Platform = St::Platform; - type Status = St::Status; - type ClientVersion = St::ClientVersion; + type Status = Unset; } ///State transition - sets the `platform` field to Set pub struct SetPlatform(PhantomData St>); impl sealed::Sealed for SetPlatform {} impl State for SetPlatform { - type StartedAt = St::StartedAt; type Platform = Set; - type Status = St::Status; + type StartedAt = St::StartedAt; type ClientVersion = St::ClientVersion; + type Status = St::Status; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type StartedAt = St::StartedAt; + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData St>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { type Platform = St::Platform; - type Status = Set; + type StartedAt = Set; type ClientVersion = St::ClientVersion; + type Status = St::Status; } ///State transition - sets the `client_version` field to Set pub struct SetClientVersion(PhantomData St>); impl sealed::Sealed for SetClientVersion {} impl State for SetClientVersion { - type StartedAt = St::StartedAt; type Platform = St::Platform; - type Status = St::Status; + type StartedAt = St::StartedAt; type ClientVersion = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Platform = St::Platform; + type StartedAt = St::StartedAt; + type ClientVersion = St::ClientVersion; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `started_at` field - pub struct started_at(()); ///Marker type for the `platform` field pub struct platform(()); - ///Marker type for the `status` field - pub struct status(()); + ///Marker type for the `started_at` field + pub struct started_at(()); ///Marker type for the `client_version` field pub struct client_version(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -1279,10 +1279,10 @@ impl SessionBuilder { impl SessionBuilder where St: session_state::State, - St::StartedAt: session_state::IsSet, St::Platform: session_state::IsSet, - St::Status: session_state::IsSet, + St::StartedAt: session_state::IsSet, St::ClientVersion: session_state::IsSet, + St::Status: session_state::IsSet, { /// Build the final struct. pub fn build(self) -> Session { diff --git a/crates/jacquard-api/src/net_anisota/feed/draft.rs b/crates/jacquard-api/src/net_anisota/feed/draft.rs index 8963ed43a..44022afbb 100644 --- a/crates/jacquard-api/src/net_anisota/feed/draft.rs +++ b/crates/jacquard-api/src/net_anisota/feed/draft.rs @@ -663,37 +663,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 St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Parent = St::Parent; + type Root = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData St>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Root = St::Root; type Parent = Set; + type Root = St::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = St::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(()); } } @@ -763,8 +763,8 @@ where impl ReplyRefBuilder where St: reply_ref_state::State, - St::Root: reply_ref_state::IsSet, St::Parent: reply_ref_state::IsSet, + St::Root: reply_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReplyRef { diff --git a/crates/jacquard-api/src/net_anisota/feed/like.rs b/crates/jacquard-api/src/net_anisota/feed/like.rs index 315406f52..19d320d81 100644 --- a/crates/jacquard-api/src/net_anisota/feed/like.rs +++ b/crates/jacquard-api/src/net_anisota/feed/like.rs @@ -115,37 +115,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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -215,8 +215,8 @@ where impl LikeBuilder where St: like_state::State, - St::Subject: like_state::IsSet, St::CreatedAt: like_state::IsSet, + St::Subject: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/net_anisota/feed/list_item.rs b/crates/jacquard-api/src/net_anisota/feed/list_item.rs index 47d22fd9b..2982301cb 100644 --- a/crates/jacquard-api/src/net_anisota/feed/list_item.rs +++ b/crates/jacquard-api/src/net_anisota/feed/list_item.rs @@ -117,50 +117,50 @@ pub mod list_item_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Subject; - type List; type CreatedAt; + type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Subject = Unset; - type List = Unset; type CreatedAt = Unset; + type List = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Subject = Set; - type List = St::List; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData St>); - impl sealed::Sealed for SetList {} - impl State for SetList { - type Subject = St::Subject; - type List = Set; type CreatedAt = St::CreatedAt; + type List = St::List; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Subject = St::Subject; - type List = St::List; type CreatedAt = Set; + type List = St::List; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData St>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `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(()); } } @@ -250,8 +250,8 @@ impl ListItemBuilder where St: list_item_state::State, St::Subject: list_item_state::IsSet, - St::List: list_item_state::IsSet, St::CreatedAt: list_item_state::IsSet, + St::List: list_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> ListItem { diff --git a/crates/jacquard-api/src/net_anisota/feed/post.rs b/crates/jacquard-api/src/net_anisota/feed/post.rs index 5d622fe99..a13803080 100644 --- a/crates/jacquard-api/src/net_anisota/feed/post.rs +++ b/crates/jacquard-api/src/net_anisota/feed/post.rs @@ -225,37 +225,37 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -412,8 +412,8 @@ where impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, St::Text: post_state::IsSet, + St::CreatedAt: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/net_anisota/graph/mute.rs b/crates/jacquard-api/src/net_anisota/graph/mute.rs index c962886d4..27f4eac82 100644 --- a/crates/jacquard-api/src/net_anisota/graph/mute.rs +++ b/crates/jacquard-api/src/net_anisota/graph/mute.rs @@ -364,37 +364,37 @@ pub mod mute_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -526,8 +526,8 @@ impl MuteBuilder { impl MuteBuilder where St: mute_state::State, - St::Subject: mute_state::IsSet, St::CreatedAt: mute_state::IsSet, + St::Subject: mute_state::IsSet, { /// Build the final struct. pub fn build(self) -> Mute { diff --git a/crates/jacquard-api/src/net_anisota/harvest/minigame.rs b/crates/jacquard-api/src/net_anisota/harvest/minigame.rs index f18072b33..aba7cbb8d 100644 --- a/crates/jacquard-api/src/net_anisota/harvest/minigame.rs +++ b/crates/jacquard-api/src/net_anisota/harvest/minigame.rs @@ -360,83 +360,83 @@ pub mod minigame_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type FinalScore; + type RoundDuration; type PlayedAt; + type FinalScore; type ShapesCollected; - type RoundDuration; type GameContext; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type FinalScore = Unset; + type RoundDuration = Unset; type PlayedAt = Unset; + type FinalScore = Unset; type ShapesCollected = Unset; - type RoundDuration = Unset; type GameContext = Unset; } - ///State transition - sets the `final_score` field to Set - pub struct SetFinalScore(PhantomData St>); - impl sealed::Sealed for SetFinalScore {} - impl State for SetFinalScore { - type FinalScore = Set; + ///State transition - sets the `round_duration` field to Set + pub struct SetRoundDuration(PhantomData St>); + impl sealed::Sealed for SetRoundDuration {} + impl State for SetRoundDuration { + type RoundDuration = Set; type PlayedAt = St::PlayedAt; + type FinalScore = St::FinalScore; type ShapesCollected = St::ShapesCollected; - type RoundDuration = St::RoundDuration; type GameContext = St::GameContext; } ///State transition - sets the `played_at` field to Set pub struct SetPlayedAt(PhantomData St>); impl sealed::Sealed for SetPlayedAt {} impl State for SetPlayedAt { - type FinalScore = St::FinalScore; + type RoundDuration = St::RoundDuration; type PlayedAt = Set; + type FinalScore = St::FinalScore; type ShapesCollected = St::ShapesCollected; + type GameContext = St::GameContext; + } + ///State transition - sets the `final_score` field to Set + pub struct SetFinalScore(PhantomData St>); + impl sealed::Sealed for SetFinalScore {} + impl State for SetFinalScore { type RoundDuration = St::RoundDuration; + type PlayedAt = St::PlayedAt; + type FinalScore = Set; + type ShapesCollected = St::ShapesCollected; type GameContext = St::GameContext; } ///State transition - sets the `shapes_collected` field to Set pub struct SetShapesCollected(PhantomData St>); impl sealed::Sealed for SetShapesCollected {} impl State for SetShapesCollected { - type FinalScore = St::FinalScore; - type PlayedAt = St::PlayedAt; - type ShapesCollected = Set; type RoundDuration = St::RoundDuration; - type GameContext = St::GameContext; - } - ///State transition - sets the `round_duration` field to Set - pub struct SetRoundDuration(PhantomData St>); - impl sealed::Sealed for SetRoundDuration {} - impl State for SetRoundDuration { - type FinalScore = St::FinalScore; type PlayedAt = St::PlayedAt; - type ShapesCollected = St::ShapesCollected; - type RoundDuration = Set; + type FinalScore = St::FinalScore; + type ShapesCollected = Set; type GameContext = St::GameContext; } ///State transition - sets the `game_context` field to Set pub struct SetGameContext(PhantomData St>); impl sealed::Sealed for SetGameContext {} impl State for SetGameContext { - type FinalScore = St::FinalScore; + type RoundDuration = St::RoundDuration; type PlayedAt = St::PlayedAt; + type FinalScore = St::FinalScore; type ShapesCollected = St::ShapesCollected; - type RoundDuration = St::RoundDuration; type GameContext = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `final_score` field - pub struct final_score(()); + ///Marker type for the `round_duration` field + pub struct round_duration(()); ///Marker type for the `played_at` field pub struct played_at(()); + ///Marker type for the `final_score` field + pub struct final_score(()); ///Marker type for the `shapes_collected` field pub struct shapes_collected(()); - ///Marker type for the `round_duration` field - pub struct round_duration(()); ///Marker type for the `game_context` field pub struct game_context(()); } @@ -763,10 +763,10 @@ impl MinigameBuilder { impl MinigameBuilder where St: minigame_state::State, - St::FinalScore: minigame_state::IsSet, + St::RoundDuration: minigame_state::IsSet, St::PlayedAt: minigame_state::IsSet, + St::FinalScore: minigame_state::IsSet, St::ShapesCollected: minigame_state::IsSet, - St::RoundDuration: minigame_state::IsSet, St::GameContext: minigame_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/net_asadaame5121/at_circle/banner.rs b/crates/jacquard-api/src/net_asadaame5121/at_circle/banner.rs index ffc8e3839..113561363 100644 --- a/crates/jacquard-api/src/net_asadaame5121/at_circle/banner.rs +++ b/crates/jacquard-api/src/net_asadaame5121/at_circle/banner.rs @@ -155,51 +155,51 @@ pub mod banner_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Banner; type Ring; - 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 Banner = Unset; type Ring = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Banner = St::Banner; + type Ring = St::Ring; } ///State transition - sets the `banner` field to Set pub struct SetBanner(PhantomData St>); impl sealed::Sealed for SetBanner {} impl State for SetBanner { + type CreatedAt = St::CreatedAt; type Banner = Set; type Ring = St::Ring; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `ring` field to Set pub struct SetRing(PhantomData St>); impl sealed::Sealed for SetRing {} impl State for SetRing { - type Banner = St::Banner; - type Ring = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Banner = St::Banner; - type Ring = St::Ring; - type CreatedAt = Set; + type Ring = 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 `banner` field pub struct banner(()); ///Marker type for the `ring` field pub struct ring(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -288,9 +288,9 @@ where impl BannerBuilder where St: banner_state::State, + St::CreatedAt: banner_state::IsSet, St::Banner: banner_state::IsSet, St::Ring: banner_state::IsSet, - St::CreatedAt: banner_state::IsSet, { /// Build the final struct. pub fn build(self) -> Banner { diff --git a/crates/jacquard-api/src/net_asadaame5121/at_circle/block.rs b/crates/jacquard-api/src/net_asadaame5121/at_circle/block.rs index dc92dfae0..f15c815b7 100644 --- a/crates/jacquard-api/src/net_asadaame5121/at_circle/block.rs +++ b/crates/jacquard-api/src/net_asadaame5121/at_circle/block.rs @@ -151,51 +151,51 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ring; - type Subject; type CreatedAt; + type Subject; + type Ring; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ring = Unset; - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; + type Ring = Unset; } - ///State transition - sets the `ring` field to Set - pub struct SetRing(PhantomData St>); - impl sealed::Sealed for SetRing {} - impl State for SetRing { - type Ring = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Subject = St::Subject; - type CreatedAt = St::CreatedAt; + type Ring = St::Ring; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Ring = St::Ring; - type Subject = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Subject = Set; type Ring = St::Ring; + } + ///State transition - sets the `ring` field to Set + pub struct SetRing(PhantomData St>); + impl sealed::Sealed for SetRing {} + impl State for SetRing { + type CreatedAt = St::CreatedAt; type Subject = St::Subject; - type CreatedAt = Set; + type Ring = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ring` field - pub struct ring(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `ring` field + pub struct ring(()); } } @@ -297,9 +297,9 @@ where impl BlockBuilder where St: block_state::State, - St::Ring: block_state::IsSet, - St::Subject: block_state::IsSet, St::CreatedAt: block_state::IsSet, + St::Subject: block_state::IsSet, + St::Ring: block_state::IsSet, { /// Build the final struct. pub fn build(self) -> Block { diff --git a/crates/jacquard-api/src/net_asadaame5121/at_circle/member.rs b/crates/jacquard-api/src/net_asadaame5121/at_circle/member.rs index 36106f8dd..23186fc8c 100644 --- a/crates/jacquard-api/src/net_asadaame5121/at_circle/member.rs +++ b/crates/jacquard-api/src/net_asadaame5121/at_circle/member.rs @@ -190,65 +190,65 @@ pub mod member_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Url; type Title; type Ring; - type Url; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Url = Unset; type Title = Unset; type Ring = Unset; - type Url = Unset; type CreatedAt = Unset; } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Url = Set; + type Title = St::Title; + type Ring = St::Ring; + type CreatedAt = St::CreatedAt; + } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type Url = St::Url; type Title = Set; type Ring = St::Ring; - type Url = St::Url; type CreatedAt = St::CreatedAt; } ///State transition - sets the `ring` field to Set pub struct SetRing(PhantomData St>); impl sealed::Sealed for SetRing {} impl State for SetRing { - type Title = St::Title; - type Ring = Set; type Url = St::Url; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { type Title = St::Title; - type Ring = St::Ring; - type Url = Set; + type Ring = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Url = St::Url; type Title = St::Title; type Ring = St::Ring; - type Url = St::Url; type CreatedAt = 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 `title` field pub struct title(()); ///Marker type for the `ring` field pub struct ring(()); - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -391,9 +391,9 @@ where impl MemberBuilder where St: member_state::State, + St::Url: member_state::IsSet, St::Title: member_state::IsSet, St::Ring: member_state::IsSet, - St::Url: member_state::IsSet, St::CreatedAt: member_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/net_asadaame5121/at_circle/request.rs b/crates/jacquard-api/src/net_asadaame5121/at_circle/request.rs index 8bcfcc01c..8bf25eadc 100644 --- a/crates/jacquard-api/src/net_asadaame5121/at_circle/request.rs +++ b/crates/jacquard-api/src/net_asadaame5121/at_circle/request.rs @@ -170,66 +170,66 @@ pub mod request_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Ring; - type SiteUrl; type SiteTitle; type CreatedAt; + type SiteUrl; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Ring = Unset; - type SiteUrl = Unset; type SiteTitle = Unset; type CreatedAt = Unset; + type SiteUrl = Unset; } ///State transition - sets the `ring` field to Set pub struct SetRing(PhantomData St>); impl sealed::Sealed for SetRing {} impl State for SetRing { type Ring = Set; - type SiteUrl = St::SiteUrl; - type SiteTitle = St::SiteTitle; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `site_url` field to Set - pub struct SetSiteUrl(PhantomData St>); - impl sealed::Sealed for SetSiteUrl {} - impl State for SetSiteUrl { - type Ring = St::Ring; - type SiteUrl = Set; type SiteTitle = St::SiteTitle; type CreatedAt = St::CreatedAt; + type SiteUrl = St::SiteUrl; } ///State transition - sets the `site_title` field to Set pub struct SetSiteTitle(PhantomData St>); impl sealed::Sealed for SetSiteTitle {} impl State for SetSiteTitle { type Ring = St::Ring; - type SiteUrl = St::SiteUrl; type SiteTitle = Set; type CreatedAt = St::CreatedAt; + type SiteUrl = St::SiteUrl; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Ring = St::Ring; - type SiteUrl = St::SiteUrl; type SiteTitle = St::SiteTitle; type CreatedAt = Set; + type SiteUrl = St::SiteUrl; + } + ///State transition - sets the `site_url` field to Set + pub struct SetSiteUrl(PhantomData St>); + impl sealed::Sealed for SetSiteUrl {} + impl State for SetSiteUrl { + type Ring = St::Ring; + type SiteTitle = St::SiteTitle; + type CreatedAt = St::CreatedAt; + type SiteUrl = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `ring` field pub struct ring(()); - ///Marker type for the `site_url` field - pub struct site_url(()); ///Marker type for the `site_title` field pub struct site_title(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `site_url` field + pub struct site_url(()); } } @@ -371,9 +371,9 @@ impl RequestBuilder where St: request_state::State, St::Ring: request_state::IsSet, - St::SiteUrl: request_state::IsSet, St::SiteTitle: request_state::IsSet, St::CreatedAt: request_state::IsSet, + St::SiteUrl: request_state::IsSet, { /// Build the final struct. pub fn build(self) -> Request { diff --git a/crates/jacquard-api/src/net_asadaame5121/at_circle/ring.rs b/crates/jacquard-api/src/net_asadaame5121/at_circle/ring.rs index 846cc2643..3e3cc6e73 100644 --- a/crates/jacquard-api/src/net_asadaame5121/at_circle/ring.rs +++ b/crates/jacquard-api/src/net_asadaame5121/at_circle/ring.rs @@ -348,51 +348,51 @@ pub mod ring_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; - type CreatedAt; type Title; + type CreatedAt; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; - type CreatedAt = Unset; type Title = Unset; + type CreatedAt = Unset; + type Status = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type CreatedAt = St::CreatedAt; - type Title = St::Title; + type Status = St::Status; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = St::Status; - type CreatedAt = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { + type CreatedAt = Set; type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Title = St::Title; type CreatedAt = St::CreatedAt; - type Title = Set; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -519,9 +519,9 @@ where impl RingBuilder where St: ring_state::State, - St::Status: ring_state::IsSet, - St::CreatedAt: ring_state::IsSet, St::Title: ring_state::IsSet, + St::CreatedAt: ring_state::IsSet, + St::Status: ring_state::IsSet, { /// Build the final struct. pub fn build(self) -> Ring { diff --git a/crates/jacquard-api/src/net_jbsm/jb/reminder.rs b/crates/jacquard-api/src/net_jbsm/jb/reminder.rs index 94fe7f782..454f3dcea 100644 --- a/crates/jacquard-api/src/net_jbsm/jb/reminder.rs +++ b/crates/jacquard-api/src/net_jbsm/jb/reminder.rs @@ -140,65 +140,65 @@ pub mod reminder_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type TriggerAt; type Subject; type Requester; - type TriggerAt; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type TriggerAt = Unset; type Subject = Unset; type Requester = Unset; - type TriggerAt = Unset; type CreatedAt = Unset; } + ///State transition - sets the `trigger_at` field to Set + pub struct SetTriggerAt(PhantomData St>); + impl sealed::Sealed for SetTriggerAt {} + impl State for SetTriggerAt { + type TriggerAt = Set; + type Subject = St::Subject; + type Requester = St::Requester; + type CreatedAt = St::CreatedAt; + } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type TriggerAt = St::TriggerAt; type Subject = Set; type Requester = St::Requester; - type TriggerAt = St::TriggerAt; type CreatedAt = St::CreatedAt; } ///State transition - sets the `requester` field to Set pub struct SetRequester(PhantomData St>); impl sealed::Sealed for SetRequester {} impl State for SetRequester { - type Subject = St::Subject; - type Requester = Set; type TriggerAt = St::TriggerAt; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `trigger_at` field to Set - pub struct SetTriggerAt(PhantomData St>); - impl sealed::Sealed for SetTriggerAt {} - impl State for SetTriggerAt { type Subject = St::Subject; - type Requester = St::Requester; - type TriggerAt = Set; + type Requester = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type TriggerAt = St::TriggerAt; type Subject = St::Subject; type Requester = St::Requester; - type TriggerAt = St::TriggerAt; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `trigger_at` field + pub struct trigger_at(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `requester` field pub struct requester(()); - ///Marker type for the `trigger_at` field - pub struct trigger_at(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -341,9 +341,9 @@ where impl ReminderBuilder where St: reminder_state::State, + St::TriggerAt: reminder_state::IsSet, St::Subject: reminder_state::IsSet, St::Requester: reminder_state::IsSet, - St::TriggerAt: reminder_state::IsSet, St::CreatedAt: reminder_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/net_mmatt/right/now.rs b/crates/jacquard-api/src/net_mmatt/right/now.rs index 59a9fe5f0..c9207684d 100644 --- a/crates/jacquard-api/src/net_mmatt/right/now.rs +++ b/crates/jacquard-api/src/net_mmatt/right/now.rs @@ -117,37 +117,37 @@ pub mod now_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -227,8 +227,8 @@ where impl NowBuilder where St: now_state::State, - St::CreatedAt: now_state::IsSet, St::Text: now_state::IsSet, + St::CreatedAt: now_state::IsSet, { /// Build the final struct. pub fn build(self) -> Now { diff --git a/crates/jacquard-api/src/net_mmatt/vitals/car.rs b/crates/jacquard-api/src/net_mmatt/vitals/car.rs index 537c696cc..c64e05293 100644 --- a/crates/jacquard-api/src/net_mmatt/vitals/car.rs +++ b/crates/jacquard-api/src/net_mmatt/vitals/car.rs @@ -128,85 +128,85 @@ pub mod car_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AmountRemaining; - type CarPercentFuelRemaining; - type CarFuelRange; type CreatedAt; type CarTraveledDistance; + type CarFuelRange; + type CarPercentFuelRemaining; + type AmountRemaining; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AmountRemaining = Unset; - type CarPercentFuelRemaining = Unset; - type CarFuelRange = Unset; type CreatedAt = Unset; type CarTraveledDistance = Unset; + type CarFuelRange = Unset; + type CarPercentFuelRemaining = Unset; + type AmountRemaining = Unset; } - ///State transition - sets the `amount_remaining` field to Set - pub struct SetAmountRemaining(PhantomData St>); - impl sealed::Sealed for SetAmountRemaining {} - impl State for SetAmountRemaining { - type AmountRemaining = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type CarTraveledDistance = St::CarTraveledDistance; + type CarFuelRange = St::CarFuelRange; type CarPercentFuelRemaining = St::CarPercentFuelRemaining; + type AmountRemaining = St::AmountRemaining; + } + ///State transition - sets the `car_traveled_distance` field to Set + pub struct SetCarTraveledDistance(PhantomData St>); + impl sealed::Sealed for SetCarTraveledDistance {} + impl State for SetCarTraveledDistance { + type CreatedAt = St::CreatedAt; + type CarTraveledDistance = Set; type CarFuelRange = St::CarFuelRange; + type CarPercentFuelRemaining = St::CarPercentFuelRemaining; + type AmountRemaining = St::AmountRemaining; + } + ///State transition - sets the `car_fuel_range` field to Set + pub struct SetCarFuelRange(PhantomData St>); + impl sealed::Sealed for SetCarFuelRange {} + impl State for SetCarFuelRange { type CreatedAt = St::CreatedAt; type CarTraveledDistance = St::CarTraveledDistance; + type CarFuelRange = Set; + type CarPercentFuelRemaining = St::CarPercentFuelRemaining; + type AmountRemaining = St::AmountRemaining; } ///State transition - sets the `car_percent_fuel_remaining` field to Set pub struct SetCarPercentFuelRemaining(PhantomData St>); impl sealed::Sealed for SetCarPercentFuelRemaining {} impl State for SetCarPercentFuelRemaining { - type AmountRemaining = St::AmountRemaining; - type CarPercentFuelRemaining = Set; - type CarFuelRange = St::CarFuelRange; type CreatedAt = St::CreatedAt; type CarTraveledDistance = St::CarTraveledDistance; - } - ///State transition - sets the `car_fuel_range` field to Set - pub struct SetCarFuelRange(PhantomData St>); - impl sealed::Sealed for SetCarFuelRange {} - impl State for SetCarFuelRange { + type CarFuelRange = St::CarFuelRange; + type CarPercentFuelRemaining = Set; type AmountRemaining = St::AmountRemaining; - type CarPercentFuelRemaining = St::CarPercentFuelRemaining; - type CarFuelRange = Set; + } + ///State transition - sets the `amount_remaining` field to Set + pub struct SetAmountRemaining(PhantomData St>); + impl sealed::Sealed for SetAmountRemaining {} + impl State for SetAmountRemaining { type CreatedAt = St::CreatedAt; type CarTraveledDistance = St::CarTraveledDistance; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type AmountRemaining = St::AmountRemaining; - type CarPercentFuelRemaining = St::CarPercentFuelRemaining; type CarFuelRange = St::CarFuelRange; - type CreatedAt = Set; - type CarTraveledDistance = St::CarTraveledDistance; - } - ///State transition - sets the `car_traveled_distance` field to Set - pub struct SetCarTraveledDistance(PhantomData St>); - impl sealed::Sealed for SetCarTraveledDistance {} - impl State for SetCarTraveledDistance { - type AmountRemaining = St::AmountRemaining; type CarPercentFuelRemaining = St::CarPercentFuelRemaining; - type CarFuelRange = St::CarFuelRange; - type CreatedAt = St::CreatedAt; - type CarTraveledDistance = Set; + type AmountRemaining = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `amount_remaining` field - pub struct amount_remaining(()); - ///Marker type for the `car_percent_fuel_remaining` field - pub struct car_percent_fuel_remaining(()); - ///Marker type for the `car_fuel_range` field - pub struct car_fuel_range(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `car_traveled_distance` field pub struct car_traveled_distance(()); + ///Marker type for the `car_fuel_range` field + pub struct car_fuel_range(()); + ///Marker type for the `car_percent_fuel_remaining` field + pub struct car_percent_fuel_remaining(()); + ///Marker type for the `amount_remaining` field + pub struct amount_remaining(()); } } @@ -381,11 +381,11 @@ where impl CarBuilder where St: car_state::State, - St::AmountRemaining: car_state::IsSet, - St::CarPercentFuelRemaining: car_state::IsSet, - St::CarFuelRange: car_state::IsSet, St::CreatedAt: car_state::IsSet, St::CarTraveledDistance: car_state::IsSet, + St::CarFuelRange: car_state::IsSet, + St::CarPercentFuelRemaining: car_state::IsSet, + St::AmountRemaining: car_state::IsSet, { /// Build the final struct. pub fn build(self) -> Car { diff --git a/crates/jacquard-api/src/net_shwilliam/hyphae/note.rs b/crates/jacquard-api/src/net_shwilliam/hyphae/note.rs index 6d2915172..d121df400 100644 --- a/crates/jacquard-api/src/net_shwilliam/hyphae/note.rs +++ b/crates/jacquard-api/src/net_shwilliam/hyphae/note.rs @@ -164,37 +164,37 @@ pub mod note_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -290,8 +290,8 @@ where impl NoteBuilder where St: note_state::State, - St::CreatedAt: note_state::IsSet, St::Text: note_state::IsSet, + St::CreatedAt: note_state::IsSet, { /// Build the final struct. pub fn build(self) -> Note { diff --git a/crates/jacquard-api/src/network_cosmik/card.rs b/crates/jacquard-api/src/network_cosmik/card.rs index b7174f3f7..91c245a02 100644 --- a/crates/jacquard-api/src/network_cosmik/card.rs +++ b/crates/jacquard-api/src/network_cosmik/card.rs @@ -342,37 +342,37 @@ pub mod card_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Type; + 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 Type = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Type = St::Type; + type Content = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Content = St::Content; type Type = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Type = St::Type; + 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 `type` field pub struct r#type(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -515,8 +515,8 @@ impl CardBuilder { impl CardBuilder where St: card_state::State, - St::Content: card_state::IsSet, St::Type: card_state::IsSet, + St::Content: card_state::IsSet, { /// Build the final struct. pub fn build(self) -> Card { diff --git a/crates/jacquard-api/src/network_cosmik/collection.rs b/crates/jacquard-api/src/network_cosmik/collection.rs index 9b137b9af..b6e506145 100644 --- a/crates/jacquard-api/src/network_cosmik/collection.rs +++ b/crates/jacquard-api/src/network_cosmik/collection.rs @@ -228,37 +228,37 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AccessType; type Name; + type AccessType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AccessType = Unset; type Name = Unset; - } - ///State transition - sets the `access_type` field to Set - pub struct SetAccessType(PhantomData St>); - impl sealed::Sealed for SetAccessType {} - impl State for SetAccessType { - type AccessType = Set; - type Name = St::Name; + type AccessType = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type AccessType = St::AccessType; type Name = Set; + type AccessType = St::AccessType; + } + ///State transition - sets the `access_type` field to Set + pub struct SetAccessType(PhantomData St>); + impl sealed::Sealed for SetAccessType {} + impl State for SetAccessType { + type Name = St::Name; + type AccessType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access_type` field - pub struct access_type(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `access_type` field + pub struct access_type(()); } } @@ -387,8 +387,8 @@ impl CollectionBuilder { impl CollectionBuilder where St: collection_state::State, - St::AccessType: collection_state::IsSet, St::Name: collection_state::IsSet, + St::AccessType: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/network_cosmik/collection_link.rs b/crates/jacquard-api/src/network_cosmik/collection_link.rs index 4bbf174b4..5b8da641d 100644 --- a/crates/jacquard-api/src/network_cosmik/collection_link.rs +++ b/crates/jacquard-api/src/network_cosmik/collection_link.rs @@ -131,8 +131,8 @@ pub mod collection_link_state { pub trait State: sealed::Sealed { type Collection; type AddedBy; - type AddedAt; type Card; + type AddedAt; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -140,8 +140,8 @@ pub mod collection_link_state { impl State for Empty { type Collection = Unset; type AddedBy = Unset; - type AddedAt = Unset; type Card = Unset; + type AddedAt = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); @@ -149,8 +149,8 @@ pub mod collection_link_state { impl State for SetCollection { type Collection = Set; type AddedBy = St::AddedBy; - type AddedAt = St::AddedAt; type Card = St::Card; + type AddedAt = St::AddedAt; } ///State transition - sets the `added_by` field to Set pub struct SetAddedBy(PhantomData St>); @@ -158,17 +158,8 @@ pub mod collection_link_state { impl State for SetAddedBy { type Collection = St::Collection; type AddedBy = Set; - type AddedAt = St::AddedAt; - type Card = St::Card; - } - ///State transition - sets the `added_at` field to Set - pub struct SetAddedAt(PhantomData St>); - impl sealed::Sealed for SetAddedAt {} - impl State for SetAddedAt { - type Collection = St::Collection; - type AddedBy = St::AddedBy; - type AddedAt = Set; type Card = St::Card; + type AddedAt = St::AddedAt; } ///State transition - sets the `card` field to Set pub struct SetCard(PhantomData St>); @@ -176,8 +167,17 @@ pub mod collection_link_state { impl State for SetCard { type Collection = St::Collection; type AddedBy = St::AddedBy; - type AddedAt = St::AddedAt; type Card = Set; + type AddedAt = St::AddedAt; + } + ///State transition - sets the `added_at` field to Set + pub struct SetAddedAt(PhantomData St>); + impl sealed::Sealed for SetAddedAt {} + impl State for SetAddedAt { + type Collection = St::Collection; + type AddedBy = St::AddedBy; + type Card = St::Card; + type AddedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -186,10 +186,10 @@ pub mod collection_link_state { pub struct collection(()); ///Marker type for the `added_by` field pub struct added_by(()); - ///Marker type for the `added_at` field - pub struct added_at(()); ///Marker type for the `card` field pub struct card(()); + ///Marker type for the `added_at` field + pub struct added_at(()); } } @@ -346,8 +346,8 @@ where St: collection_link_state::State, St::Collection: collection_link_state::IsSet, St::AddedBy: collection_link_state::IsSet, - St::AddedAt: collection_link_state::IsSet, St::Card: collection_link_state::IsSet, + St::AddedAt: collection_link_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionLink { diff --git a/crates/jacquard-api/src/network_cosmik/collection_link_removal.rs b/crates/jacquard-api/src/network_cosmik/collection_link_removal.rs index 8073ca568..ab6ef1576 100644 --- a/crates/jacquard-api/src/network_cosmik/collection_link_removal.rs +++ b/crates/jacquard-api/src/network_cosmik/collection_link_removal.rs @@ -119,50 +119,50 @@ pub mod collection_link_removal_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type RemovedAt; - type RemovedLink; type Collection; + type RemovedLink; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type RemovedAt = Unset; - type RemovedLink = Unset; type Collection = Unset; + type RemovedLink = Unset; } ///State transition - sets the `removed_at` field to Set pub struct SetRemovedAt(PhantomData St>); impl sealed::Sealed for SetRemovedAt {} impl State for SetRemovedAt { type RemovedAt = Set; - type RemovedLink = St::RemovedLink; - type Collection = St::Collection; - } - ///State transition - sets the `removed_link` field to Set - pub struct SetRemovedLink(PhantomData St>); - impl sealed::Sealed for SetRemovedLink {} - impl State for SetRemovedLink { - type RemovedAt = St::RemovedAt; - type RemovedLink = Set; type Collection = St::Collection; + type RemovedLink = St::RemovedLink; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type RemovedAt = St::RemovedAt; - type RemovedLink = St::RemovedLink; type Collection = Set; + type RemovedLink = St::RemovedLink; + } + ///State transition - sets the `removed_link` field to Set + pub struct SetRemovedLink(PhantomData St>); + impl sealed::Sealed for SetRemovedLink {} + impl State for SetRemovedLink { + type RemovedAt = St::RemovedAt; + type Collection = St::Collection; + type RemovedLink = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `removed_at` field pub struct removed_at(()); - ///Marker type for the `removed_link` field - pub struct removed_link(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `removed_link` field + pub struct removed_link(()); } } @@ -267,8 +267,8 @@ impl CollectionLinkRemovalBuilder where St: collection_link_removal_state::State, St::RemovedAt: collection_link_removal_state::IsSet, - St::RemovedLink: collection_link_removal_state::IsSet, St::Collection: collection_link_removal_state::IsSet, + St::RemovedLink: collection_link_removal_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionLinkRemoval { diff --git a/crates/jacquard-api/src/network_slices/actor.rs b/crates/jacquard-api/src/network_slices/actor.rs index 837292dc4..3e584b0af 100644 --- a/crates/jacquard-api/src/network_slices/actor.rs +++ b/crates/jacquard-api/src/network_slices/actor.rs @@ -113,37 +113,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 St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = St::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = St::Handle; type Did = Set; + type Handle = St::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = St::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(()); } } @@ -252,8 +252,8 @@ where impl ProfileViewBasicBuilder where St: profile_view_basic_state::State, - St::Handle: profile_view_basic_state::IsSet, St::Did: profile_view_basic_state::IsSet, + St::Handle: profile_view_basic_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileViewBasic { diff --git a/crates/jacquard-api/src/network_slices/lexicon.rs b/crates/jacquard-api/src/network_slices/lexicon.rs index 448234b60..9d14ab565 100644 --- a/crates/jacquard-api/src/network_slices/lexicon.rs +++ b/crates/jacquard-api/src/network_slices/lexicon.rs @@ -152,67 +152,67 @@ pub mod lexicon_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Definitions; type CreatedAt; - type Slice; type Nsid; - type Definitions; + type Slice; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Definitions = Unset; type CreatedAt = Unset; - type Slice = Unset; type Nsid = Unset; - type Definitions = Unset; + type Slice = Unset; + } + ///State transition - sets the `definitions` field to Set + pub struct SetDefinitions(PhantomData St>); + impl sealed::Sealed for SetDefinitions {} + impl State for SetDefinitions { + type Definitions = Set; + type CreatedAt = St::CreatedAt; + type Nsid = St::Nsid; + type Slice = St::Slice; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedAt = Set; - type Slice = St::Slice; - type Nsid = St::Nsid; type Definitions = St::Definitions; - } - ///State transition - sets the `slice` field to Set - pub struct SetSlice(PhantomData St>); - impl sealed::Sealed for SetSlice {} - impl State for SetSlice { - type CreatedAt = St::CreatedAt; - type Slice = Set; + type CreatedAt = Set; type Nsid = St::Nsid; - type Definitions = St::Definitions; + type Slice = St::Slice; } ///State transition - sets the `nsid` field to Set pub struct SetNsid(PhantomData St>); impl sealed::Sealed for SetNsid {} impl State for SetNsid { + type Definitions = St::Definitions; type CreatedAt = St::CreatedAt; - type Slice = St::Slice; type Nsid = Set; - type Definitions = St::Definitions; + type Slice = St::Slice; } - ///State transition - sets the `definitions` field to Set - pub struct SetDefinitions(PhantomData St>); - impl sealed::Sealed for SetDefinitions {} - impl State for SetDefinitions { + ///State transition - sets the `slice` field to Set + pub struct SetSlice(PhantomData St>); + impl sealed::Sealed for SetSlice {} + impl State for SetSlice { + type Definitions = St::Definitions; type CreatedAt = St::CreatedAt; - type Slice = St::Slice; type Nsid = St::Nsid; - type Definitions = Set; + type Slice = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `definitions` field + pub struct definitions(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `slice` field - pub struct slice(()); ///Marker type for the `nsid` field pub struct nsid(()); - ///Marker type for the `definitions` field - pub struct definitions(()); + ///Marker type for the `slice` field + pub struct slice(()); } } @@ -367,10 +367,10 @@ impl LexiconBuilder { impl LexiconBuilder where St: lexicon_state::State, + St::Definitions: lexicon_state::IsSet, St::CreatedAt: lexicon_state::IsSet, - St::Slice: lexicon_state::IsSet, St::Nsid: lexicon_state::IsSet, - St::Definitions: lexicon_state::IsSet, + St::Slice: lexicon_state::IsSet, { /// Build the final struct. pub fn build(self) -> Lexicon { diff --git a/crates/jacquard-api/src/network_slices/slice.rs b/crates/jacquard-api/src/network_slices/slice.rs index 5b1ec810a..16ae480f7 100644 --- a/crates/jacquard-api/src/network_slices/slice.rs +++ b/crates/jacquard-api/src/network_slices/slice.rs @@ -242,49 +242,49 @@ pub mod slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Domain; + type CreatedAt; type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Domain = Unset; + type CreatedAt = Unset; type Name = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Domain = St::Domain; - type Name = St::Name; - } ///State transition - sets the `domain` field to Set pub struct SetDomain(PhantomData St>); impl sealed::Sealed for SetDomain {} impl State for SetDomain { - type CreatedAt = St::CreatedAt; type Domain = Set; + type CreatedAt = St::CreatedAt; + type Name = St::Name; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Domain = St::Domain; + type CreatedAt = Set; type Name = St::Name; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Domain = St::Domain; + type CreatedAt = St::CreatedAt; type Name = 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 `domain` field pub struct domain(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `name` field pub struct name(()); } @@ -375,8 +375,8 @@ where impl SliceBuilder where St: slice_state::State, - St::CreatedAt: slice_state::IsSet, St::Domain: slice_state::IsSet, + St::CreatedAt: slice_state::IsSet, St::Name: slice_state::IsSet, { /// Build the final struct. @@ -476,105 +476,105 @@ pub mod slice_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Creator; type Cid; - type Name; type Domain; + type Name; + type Creator; type CreatedAt; + 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 Creator = Unset; type Cid = Unset; - type Name = Unset; type Domain = Unset; + type Name = Unset; + type Creator = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Creator = St::Creator; - type Cid = St::Cid; - type Name = St::Name; - type Domain = St::Domain; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData St>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Uri = St::Uri; - type Creator = Set; - type Cid = St::Cid; - type Name = St::Name; - type Domain = St::Domain; - type CreatedAt = St::CreatedAt; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; - type Creator = St::Creator; type Cid = Set; - type Name = St::Name; type Domain = St::Domain; + type Name = St::Name; + type Creator = St::Creator; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + } + ///State transition - sets the `domain` field to Set + pub struct SetDomain(PhantomData St>); + impl sealed::Sealed for SetDomain {} + impl State for SetDomain { + type Cid = St::Cid; + type Domain = Set; + type Name = St::Name; + type Creator = St::Creator; type CreatedAt = St::CreatedAt; + type Uri = St::Uri; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Uri = St::Uri; - type Creator = St::Creator; type Cid = St::Cid; - type Name = Set; type Domain = St::Domain; + type Name = Set; + type Creator = St::Creator; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `domain` field to Set - pub struct SetDomain(PhantomData St>); - impl sealed::Sealed for SetDomain {} - impl State for SetDomain { type Uri = St::Uri; - type Creator = St::Creator; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData St>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Cid = St::Cid; + type Domain = St::Domain; type Name = St::Name; - type Domain = Set; + type Creator = Set; type CreatedAt = St::CreatedAt; + type Uri = St::Uri; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = St::Uri; - type Creator = St::Creator; type Cid = St::Cid; - type Name = St::Name; type Domain = St::Domain; + type Name = St::Name; + type Creator = St::Creator; type CreatedAt = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; + type Domain = St::Domain; + type Name = St::Name; + type Creator = St::Creator; + type CreatedAt = St::CreatedAt; + 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 `creator` field - pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `domain` field pub struct domain(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `creator` field + pub struct creator(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -830,12 +830,12 @@ impl SliceViewBuilder { impl SliceViewBuilder where St: slice_view_state::State, - St::Uri: slice_view_state::IsSet, - St::Creator: slice_view_state::IsSet, St::Cid: slice_view_state::IsSet, - St::Name: slice_view_state::IsSet, St::Domain: slice_view_state::IsSet, + St::Name: slice_view_state::IsSet, + St::Creator: slice_view_state::IsSet, St::CreatedAt: slice_view_state::IsSet, + St::Uri: slice_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SliceView { @@ -1049,37 +1049,37 @@ pub mod sparkline_point_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Timestamp; type Count; + type Timestamp; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Timestamp = Unset; type Count = Unset; - } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData St>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Timestamp = Set; - type Count = St::Count; + type Timestamp = Unset; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData St>); impl sealed::Sealed for SetCount {} impl State for SetCount { - type Timestamp = St::Timestamp; type Count = Set; + type Timestamp = St::Timestamp; + } + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData St>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { + type Count = St::Count; + type Timestamp = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `timestamp` field - pub struct timestamp(()); ///Marker type for the `count` field pub struct count(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); } } @@ -1149,8 +1149,8 @@ where impl SparklinePointBuilder where St: sparkline_point_state::State, - St::Timestamp: sparkline_point_state::IsSet, St::Count: sparkline_point_state::IsSet, + St::Timestamp: sparkline_point_state::IsSet, { /// Build the final struct. pub fn build(self) -> SparklinePoint { diff --git a/crates/jacquard-api/src/network_slices/slice/create_o_auth_client.rs b/crates/jacquard-api/src/network_slices/slice/create_o_auth_client.rs index 33c38e18b..8cd13fc29 100644 --- a/crates/jacquard-api/src/network_slices/slice/create_o_auth_client.rs +++ b/crates/jacquard-api/src/network_slices/slice/create_o_auth_client.rs @@ -101,50 +101,50 @@ pub mod create_o_auth_client_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type ClientName; - type RedirectUris; type SliceUri; + type RedirectUris; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type ClientName = Unset; - type RedirectUris = Unset; type SliceUri = Unset; + type RedirectUris = Unset; } ///State transition - sets the `client_name` field to Set pub struct SetClientName(PhantomData St>); impl sealed::Sealed for SetClientName {} impl State for SetClientName { type ClientName = Set; - type RedirectUris = St::RedirectUris; - type SliceUri = St::SliceUri; - } - ///State transition - sets the `redirect_uris` field to Set - pub struct SetRedirectUris(PhantomData St>); - impl sealed::Sealed for SetRedirectUris {} - impl State for SetRedirectUris { - type ClientName = St::ClientName; - type RedirectUris = Set; type SliceUri = St::SliceUri; + type RedirectUris = St::RedirectUris; } ///State transition - sets the `slice_uri` field to Set pub struct SetSliceUri(PhantomData St>); impl sealed::Sealed for SetSliceUri {} impl State for SetSliceUri { type ClientName = St::ClientName; - type RedirectUris = St::RedirectUris; type SliceUri = Set; + type RedirectUris = St::RedirectUris; + } + ///State transition - sets the `redirect_uris` field to Set + pub struct SetRedirectUris(PhantomData St>); + impl sealed::Sealed for SetRedirectUris {} + impl State for SetRedirectUris { + type ClientName = St::ClientName; + type SliceUri = St::SliceUri; + type RedirectUris = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `client_name` field pub struct client_name(()); - ///Marker type for the `redirect_uris` field - pub struct redirect_uris(()); ///Marker type for the `slice_uri` field pub struct slice_uri(()); + ///Marker type for the `redirect_uris` field + pub struct redirect_uris(()); } } @@ -336,8 +336,8 @@ impl CreateOAuthClientBuilder where St: create_o_auth_client_state::State, St::ClientName: create_o_auth_client_state::IsSet, - St::RedirectUris: create_o_auth_client_state::IsSet, St::SliceUri: create_o_auth_client_state::IsSet, + St::RedirectUris: create_o_auth_client_state::IsSet, { /// Build the final struct. pub fn build(self) -> CreateOAuthClient { diff --git a/crates/jacquard-api/src/network_slices/slice/get_actors.rs b/crates/jacquard-api/src/network_slices/slice/get_actors.rs index b265b442d..042246877 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_actors.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_actors.rs @@ -127,51 +127,51 @@ pub mod actor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Did; type SliceUri; + type Did; + 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 Did = Unset; type SliceUri = Unset; + type Did = Unset; + type IndexedAt = Unset; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; + ///State transition - sets the `slice_uri` field to Set + pub struct SetSliceUri(PhantomData St>); + impl sealed::Sealed for SetSliceUri {} + impl State for SetSliceUri { + type SliceUri = Set; type Did = St::Did; - type SliceUri = St::SliceUri; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type IndexedAt = St::IndexedAt; - type Did = Set; type SliceUri = St::SliceUri; - } - ///State transition - sets the `slice_uri` field to Set - pub struct SetSliceUri(PhantomData St>); - impl sealed::Sealed for SetSliceUri {} - impl State for SetSliceUri { + type Did = Set; type IndexedAt = St::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type SliceUri = St::SliceUri; type Did = St::Did; - type SliceUri = 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 `did` field - pub struct did(()); ///Marker type for the `slice_uri` field pub struct slice_uri(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -273,9 +273,9 @@ where impl ActorBuilder where St: actor_state::State, - St::IndexedAt: actor_state::IsSet, - St::Did: actor_state::IsSet, St::SliceUri: actor_state::IsSet, + St::Did: actor_state::IsSet, + St::IndexedAt: actor_state::IsSet, { /// Build the final struct. pub fn build(self) -> Actor { diff --git a/crates/jacquard-api/src/network_slices/slice/get_job_logs.rs b/crates/jacquard-api/src/network_slices/slice/get_job_logs.rs index ed6bbbf9b..884ac12c7 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_job_logs.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_job_logs.rs @@ -124,85 +124,85 @@ pub mod log_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type LogType; type CreatedAt; type Level; - type Id; type Message; - type LogType; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type LogType = Unset; type CreatedAt = Unset; type Level = Unset; - type Id = Unset; type Message = Unset; - type LogType = Unset; + type Id = Unset; + } + ///State transition - sets the `log_type` field to Set + pub struct SetLogType(PhantomData St>); + impl sealed::Sealed for SetLogType {} + impl State for SetLogType { + type LogType = Set; + type CreatedAt = St::CreatedAt; + type Level = St::Level; + type Message = St::Message; + type Id = St::Id; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type LogType = St::LogType; type CreatedAt = Set; type Level = St::Level; - type Id = St::Id; type Message = St::Message; - type LogType = St::LogType; + type Id = St::Id; } ///State transition - sets the `level` field to Set pub struct SetLevel(PhantomData St>); impl sealed::Sealed for SetLevel {} impl State for SetLevel { - type CreatedAt = St::CreatedAt; - type Level = Set; - type Id = St::Id; - type Message = St::Message; type LogType = St::LogType; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { type CreatedAt = St::CreatedAt; - type Level = St::Level; - type Id = Set; + type Level = Set; type Message = St::Message; - type LogType = St::LogType; + type Id = St::Id; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { + type LogType = St::LogType; type CreatedAt = St::CreatedAt; type Level = St::Level; - type Id = St::Id; type Message = Set; - type LogType = St::LogType; + type Id = St::Id; } - ///State transition - sets the `log_type` field to Set - pub struct SetLogType(PhantomData St>); - impl sealed::Sealed for SetLogType {} - impl State for SetLogType { + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type LogType = St::LogType; type CreatedAt = St::CreatedAt; type Level = St::Level; - type Id = St::Id; type Message = St::Message; - type LogType = Set; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `log_type` field + pub struct log_type(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `level` field pub struct level(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `message` field pub struct message(()); - ///Marker type for the `log_type` field - pub struct log_type(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -391,11 +391,11 @@ impl LogEntryBuilder { impl LogEntryBuilder where St: log_entry_state::State, + St::LogType: log_entry_state::IsSet, St::CreatedAt: log_entry_state::IsSet, St::Level: log_entry_state::IsSet, - St::Id: log_entry_state::IsSet, St::Message: log_entry_state::IsSet, - St::LogType: log_entry_state::IsSet, + St::Id: log_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> LogEntry { diff --git a/crates/jacquard-api/src/network_slices/slice/get_job_status.rs b/crates/jacquard-api/src/network_slices/slice/get_job_status.rs index aa7c4c177..4c375bef2 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_job_status.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_job_status.rs @@ -152,8 +152,8 @@ pub mod job_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RetryCount; type Status; + type RetryCount; type JobId; type CreatedAt; } @@ -161,26 +161,26 @@ pub mod job_status_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RetryCount = Unset; type Status = Unset; + type RetryCount = Unset; type JobId = Unset; type CreatedAt = Unset; } - ///State transition - sets the `retry_count` field to Set - pub struct SetRetryCount(PhantomData St>); - impl sealed::Sealed for SetRetryCount {} - impl State for SetRetryCount { - type RetryCount = Set; - type Status = St::Status; - type JobId = St::JobId; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type RetryCount = St::RetryCount; type Status = Set; + type RetryCount = St::RetryCount; + type JobId = St::JobId; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `retry_count` field to Set + pub struct SetRetryCount(PhantomData St>); + impl sealed::Sealed for SetRetryCount {} + impl State for SetRetryCount { + type Status = St::Status; + type RetryCount = Set; type JobId = St::JobId; type CreatedAt = St::CreatedAt; } @@ -188,8 +188,8 @@ pub mod job_status_state { pub struct SetJobId(PhantomData St>); impl sealed::Sealed for SetJobId {} impl State for SetJobId { - type RetryCount = St::RetryCount; type Status = St::Status; + type RetryCount = St::RetryCount; type JobId = Set; type CreatedAt = St::CreatedAt; } @@ -197,18 +197,18 @@ pub mod job_status_state { pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type RetryCount = St::RetryCount; type Status = St::Status; + type RetryCount = St::RetryCount; type JobId = St::JobId; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `retry_count` field - pub struct retry_count(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `retry_count` field + pub struct retry_count(()); ///Marker type for the `job_id` field pub struct job_id(()); ///Marker type for the `created_at` field @@ -387,8 +387,8 @@ where impl JobStatusBuilder where St: job_status_state::State, - St::RetryCount: job_status_state::IsSet, St::Status: job_status_state::IsSet, + St::RetryCount: job_status_state::IsSet, St::JobId: job_status_state::IsSet, St::CreatedAt: job_status_state::IsSet, { @@ -716,85 +716,85 @@ pub mod sync_job_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ReposProcessed; - type Message; - type TotalRecords; type CollectionsSynced; + type TotalRecords; type Success; + type Message; + type ReposProcessed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ReposProcessed = Unset; - type Message = Unset; - type TotalRecords = Unset; type CollectionsSynced = Unset; + type TotalRecords = Unset; type Success = Unset; + type Message = Unset; + type ReposProcessed = Unset; } - ///State transition - sets the `repos_processed` field to Set - pub struct SetReposProcessed(PhantomData St>); - impl sealed::Sealed for SetReposProcessed {} - impl State for SetReposProcessed { - type ReposProcessed = Set; - type Message = St::Message; + ///State transition - sets the `collections_synced` field to Set + pub struct SetCollectionsSynced(PhantomData St>); + impl sealed::Sealed for SetCollectionsSynced {} + impl State for SetCollectionsSynced { + type CollectionsSynced = Set; type TotalRecords = St::TotalRecords; - type CollectionsSynced = St::CollectionsSynced; type Success = St::Success; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { + type Message = St::Message; type ReposProcessed = St::ReposProcessed; - type Message = Set; - type TotalRecords = St::TotalRecords; - type CollectionsSynced = St::CollectionsSynced; - type Success = St::Success; } ///State transition - sets the `total_records` field to Set pub struct SetTotalRecords(PhantomData St>); impl sealed::Sealed for SetTotalRecords {} impl State for SetTotalRecords { - type ReposProcessed = St::ReposProcessed; - type Message = St::Message; - type TotalRecords = Set; type CollectionsSynced = St::CollectionsSynced; + type TotalRecords = Set; type Success = St::Success; - } - ///State transition - sets the `collections_synced` field to Set - pub struct SetCollectionsSynced(PhantomData St>); - impl sealed::Sealed for SetCollectionsSynced {} - impl State for SetCollectionsSynced { - type ReposProcessed = St::ReposProcessed; type Message = St::Message; - type TotalRecords = St::TotalRecords; - type CollectionsSynced = Set; - type Success = St::Success; + type ReposProcessed = St::ReposProcessed; } ///State transition - sets the `success` field to Set pub struct SetSuccess(PhantomData St>); impl sealed::Sealed for SetSuccess {} impl State for SetSuccess { - type ReposProcessed = St::ReposProcessed; + type CollectionsSynced = St::CollectionsSynced; + type TotalRecords = St::TotalRecords; + type Success = Set; type Message = St::Message; + type ReposProcessed = St::ReposProcessed; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type CollectionsSynced = St::CollectionsSynced; type TotalRecords = St::TotalRecords; + type Success = St::Success; + type Message = Set; + type ReposProcessed = St::ReposProcessed; + } + ///State transition - sets the `repos_processed` field to Set + pub struct SetReposProcessed(PhantomData St>); + impl sealed::Sealed for SetReposProcessed {} + impl State for SetReposProcessed { type CollectionsSynced = St::CollectionsSynced; - type Success = Set; + type TotalRecords = St::TotalRecords; + type Success = St::Success; + type Message = St::Message; + type ReposProcessed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repos_processed` field - pub struct repos_processed(()); - ///Marker type for the `message` field - pub struct message(()); - ///Marker type for the `total_records` field - pub struct total_records(()); ///Marker type for the `collections_synced` field pub struct collections_synced(()); + ///Marker type for the `total_records` field + pub struct total_records(()); ///Marker type for the `success` field pub struct success(()); + ///Marker type for the `message` field + pub struct message(()); + ///Marker type for the `repos_processed` field + pub struct repos_processed(()); } } @@ -921,11 +921,11 @@ where impl SyncJobResultBuilder where St: sync_job_result_state::State, - St::ReposProcessed: sync_job_result_state::IsSet, - St::Message: sync_job_result_state::IsSet, - St::TotalRecords: sync_job_result_state::IsSet, St::CollectionsSynced: sync_job_result_state::IsSet, + St::TotalRecords: sync_job_result_state::IsSet, St::Success: sync_job_result_state::IsSet, + St::Message: sync_job_result_state::IsSet, + St::ReposProcessed: sync_job_result_state::IsSet, { /// Build the final struct. pub fn build(self) -> SyncJobResult { diff --git a/crates/jacquard-api/src/network_slices/slice/get_o_auth_clients.rs b/crates/jacquard-api/src/network_slices/slice/get_o_auth_clients.rs index b445e3a9b..db7026f56 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_o_auth_clients.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_o_auth_clients.rs @@ -219,127 +219,127 @@ pub mod oauth_client_details_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GrantTypes; - type CreatedAt; - type ResponseTypes; - type ClientName; type CreatedByDid; + type ClientName; type ClientId; type RedirectUris; + type GrantTypes; + type CreatedAt; + type ResponseTypes; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GrantTypes = Unset; - type CreatedAt = Unset; - type ResponseTypes = Unset; - type ClientName = Unset; type CreatedByDid = Unset; + type ClientName = Unset; type ClientId = Unset; type RedirectUris = Unset; + type GrantTypes = Unset; + type CreatedAt = Unset; + type ResponseTypes = Unset; } - ///State transition - sets the `grant_types` field to Set - pub struct SetGrantTypes(PhantomData St>); - impl sealed::Sealed for SetGrantTypes {} - impl State for SetGrantTypes { - type GrantTypes = Set; - type CreatedAt = St::CreatedAt; - type ResponseTypes = St::ResponseTypes; - type ClientName = St::ClientName; - type CreatedByDid = St::CreatedByDid; - type ClientId = St::ClientId; - type RedirectUris = St::RedirectUris; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type GrantTypes = St::GrantTypes; - type CreatedAt = Set; - type ResponseTypes = St::ResponseTypes; + ///State transition - sets the `created_by_did` field to Set + pub struct SetCreatedByDid(PhantomData St>); + impl sealed::Sealed for SetCreatedByDid {} + impl State for SetCreatedByDid { + type CreatedByDid = Set; type ClientName = St::ClientName; - type CreatedByDid = St::CreatedByDid; type ClientId = St::ClientId; type RedirectUris = St::RedirectUris; - } - ///State transition - sets the `response_types` field to Set - pub struct SetResponseTypes(PhantomData St>); - impl sealed::Sealed for SetResponseTypes {} - impl State for SetResponseTypes { type GrantTypes = St::GrantTypes; type CreatedAt = St::CreatedAt; - type ResponseTypes = Set; - type ClientName = St::ClientName; - type CreatedByDid = St::CreatedByDid; - type ClientId = St::ClientId; - type RedirectUris = St::RedirectUris; + type ResponseTypes = St::ResponseTypes; } ///State transition - sets the `client_name` field to Set pub struct SetClientName(PhantomData St>); impl sealed::Sealed for SetClientName {} impl State for SetClientName { - type GrantTypes = St::GrantTypes; - type CreatedAt = St::CreatedAt; - type ResponseTypes = St::ResponseTypes; - type ClientName = Set; type CreatedByDid = St::CreatedByDid; + type ClientName = Set; type ClientId = St::ClientId; type RedirectUris = St::RedirectUris; - } - ///State transition - sets the `created_by_did` field to Set - pub struct SetCreatedByDid(PhantomData St>); - impl sealed::Sealed for SetCreatedByDid {} - impl State for SetCreatedByDid { type GrantTypes = St::GrantTypes; type CreatedAt = St::CreatedAt; type ResponseTypes = St::ResponseTypes; - type ClientName = St::ClientName; - type CreatedByDid = Set; - type ClientId = St::ClientId; - type RedirectUris = St::RedirectUris; } ///State transition - sets the `client_id` field to Set pub struct SetClientId(PhantomData St>); impl sealed::Sealed for SetClientId {} impl State for SetClientId { - type GrantTypes = St::GrantTypes; - type CreatedAt = St::CreatedAt; - type ResponseTypes = St::ResponseTypes; - type ClientName = St::ClientName; type CreatedByDid = St::CreatedByDid; + type ClientName = St::ClientName; type ClientId = Set; type RedirectUris = St::RedirectUris; + type GrantTypes = St::GrantTypes; + type CreatedAt = St::CreatedAt; + type ResponseTypes = St::ResponseTypes; } ///State transition - sets the `redirect_uris` field to Set pub struct SetRedirectUris(PhantomData St>); impl sealed::Sealed for SetRedirectUris {} impl State for SetRedirectUris { + type CreatedByDid = St::CreatedByDid; + type ClientName = St::ClientName; + type ClientId = St::ClientId; + type RedirectUris = Set; type GrantTypes = St::GrantTypes; type CreatedAt = St::CreatedAt; type ResponseTypes = St::ResponseTypes; + } + ///State transition - sets the `grant_types` field to Set + pub struct SetGrantTypes(PhantomData St>); + impl sealed::Sealed for SetGrantTypes {} + impl State for SetGrantTypes { + type CreatedByDid = St::CreatedByDid; type ClientName = St::ClientName; + type ClientId = St::ClientId; + type RedirectUris = St::RedirectUris; + type GrantTypes = Set; + type CreatedAt = St::CreatedAt; + type ResponseTypes = St::ResponseTypes; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type CreatedByDid = St::CreatedByDid; + type ClientName = St::ClientName; type ClientId = St::ClientId; - type RedirectUris = Set; + type RedirectUris = St::RedirectUris; + type GrantTypes = St::GrantTypes; + type CreatedAt = Set; + type ResponseTypes = St::ResponseTypes; + } + ///State transition - sets the `response_types` field to Set + pub struct SetResponseTypes(PhantomData St>); + impl sealed::Sealed for SetResponseTypes {} + impl State for SetResponseTypes { + type CreatedByDid = St::CreatedByDid; + type ClientName = St::ClientName; + type ClientId = St::ClientId; + type RedirectUris = St::RedirectUris; + type GrantTypes = St::GrantTypes; + type CreatedAt = St::CreatedAt; + type ResponseTypes = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `grant_types` field - pub struct grant_types(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `response_types` field - pub struct response_types(()); - ///Marker type for the `client_name` field - pub struct client_name(()); ///Marker type for the `created_by_did` field pub struct created_by_did(()); + ///Marker type for the `client_name` field + pub struct client_name(()); ///Marker type for the `client_id` field pub struct client_id(()); ///Marker type for the `redirect_uris` field pub struct redirect_uris(()); + ///Marker type for the `grant_types` field + pub struct grant_types(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `response_types` field + pub struct response_types(()); } } @@ -610,13 +610,13 @@ impl OauthClientDetailsBuilder impl OauthClientDetailsBuilder where St: oauth_client_details_state::State, - St::GrantTypes: oauth_client_details_state::IsSet, - St::CreatedAt: oauth_client_details_state::IsSet, - St::ResponseTypes: oauth_client_details_state::IsSet, - St::ClientName: oauth_client_details_state::IsSet, St::CreatedByDid: oauth_client_details_state::IsSet, + St::ClientName: oauth_client_details_state::IsSet, St::ClientId: oauth_client_details_state::IsSet, St::RedirectUris: oauth_client_details_state::IsSet, + St::GrantTypes: oauth_client_details_state::IsSet, + St::CreatedAt: oauth_client_details_state::IsSet, + St::ResponseTypes: oauth_client_details_state::IsSet, { /// Build the final struct. pub fn build(self) -> OauthClientDetails { diff --git a/crates/jacquard-api/src/network_slices/slice/get_slice_records.rs b/crates/jacquard-api/src/network_slices/slice/get_slice_records.rs index cdb417bda..c722e89d5 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_slice_records.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_slice_records.rs @@ -133,103 +133,103 @@ pub mod indexed_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; + type Value; type Cid; - type Uri; + type Did; type Collection; - type Value; + type Uri; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; + type Value = Unset; type Cid = Unset; - type Uri = Unset; + type Did = Unset; type Collection = Unset; - type Value = Unset; + type Uri = Unset; type IndexedAt = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; type Cid = St::Cid; - type Uri = St::Uri; + type Did = St::Did; type Collection = St::Collection; - type Value = St::Value; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Did = St::Did; + type Value = St::Value; type Cid = Set; - type Uri = St::Uri; + type Did = St::Did; type Collection = St::Collection; - type Value = St::Value; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Did = St::Did; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Value = St::Value; type Cid = St::Cid; - type Uri = Set; + type Did = Set; type Collection = St::Collection; - type Value = St::Value; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Did = St::Did; + type Value = St::Value; type Cid = St::Cid; - type Uri = St::Uri; + type Did = St::Did; type Collection = Set; - type Value = St::Value; + type Uri = St::Uri; type IndexedAt = St::IndexedAt; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Did = St::Did; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Value = St::Value; type Cid = St::Cid; - type Uri = St::Uri; + type Did = St::Did; type Collection = St::Collection; - type Value = Set; + type Uri = Set; type IndexedAt = St::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Did = St::Did; + type Value = St::Value; type Cid = St::Cid; - type Uri = St::Uri; + type Did = St::Did; type Collection = St::Collection; - type Value = St::Value; + type Uri = St::Uri; type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); + ///Marker type for the `value` field + pub struct value(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `collection` field pub struct collection(()); - ///Marker type for the `value` field - pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } @@ -384,11 +384,11 @@ where impl IndexedRecordBuilder where St: indexed_record_state::State, - St::Did: indexed_record_state::IsSet, + St::Value: indexed_record_state::IsSet, St::Cid: indexed_record_state::IsSet, - St::Uri: indexed_record_state::IsSet, + St::Did: indexed_record_state::IsSet, St::Collection: indexed_record_state::IsSet, - St::Value: indexed_record_state::IsSet, + St::Uri: indexed_record_state::IsSet, St::IndexedAt: indexed_record_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/network_slices/slice/get_sync_summary.rs b/crates/jacquard-api/src/network_slices/slice/get_sync_summary.rs index 9b5d86da6..0ea858d1e 100644 --- a/crates/jacquard-api/src/network_slices/slice/get_sync_summary.rs +++ b/crates/jacquard-api/src/network_slices/slice/get_sync_summary.rs @@ -114,51 +114,51 @@ pub mod collection_summary_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IsExternal; type Collection; type EstimatedRepos; - type IsExternal; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type IsExternal = Unset; type Collection = Unset; type EstimatedRepos = Unset; - type IsExternal = Unset; + } + ///State transition - sets the `is_external` field to Set + pub struct SetIsExternal(PhantomData St>); + impl sealed::Sealed for SetIsExternal {} + impl State for SetIsExternal { + type IsExternal = Set; + type Collection = St::Collection; + type EstimatedRepos = St::EstimatedRepos; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { + type IsExternal = St::IsExternal; type Collection = Set; type EstimatedRepos = St::EstimatedRepos; - type IsExternal = St::IsExternal; } ///State transition - sets the `estimated_repos` field to Set pub struct SetEstimatedRepos(PhantomData St>); impl sealed::Sealed for SetEstimatedRepos {} impl State for SetEstimatedRepos { - type Collection = St::Collection; - type EstimatedRepos = Set; type IsExternal = St::IsExternal; - } - ///State transition - sets the `is_external` field to Set - pub struct SetIsExternal(PhantomData St>); - impl sealed::Sealed for SetIsExternal {} - impl State for SetIsExternal { type Collection = St::Collection; - type EstimatedRepos = St::EstimatedRepos; - type IsExternal = Set; + type EstimatedRepos = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `is_external` field + pub struct is_external(()); ///Marker type for the `collection` field pub struct collection(()); ///Marker type for the `estimated_repos` field pub struct estimated_repos(()); - ///Marker type for the `is_external` field - pub struct is_external(()); } } @@ -247,9 +247,9 @@ where impl CollectionSummaryBuilder where St: collection_summary_state::State, + St::IsExternal: collection_summary_state::IsSet, St::Collection: collection_summary_state::IsSet, St::EstimatedRepos: collection_summary_state::IsSet, - St::IsExternal: collection_summary_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionSummary { diff --git a/crates/jacquard-api/src/network_slices/slice/stats.rs b/crates/jacquard-api/src/network_slices/slice/stats.rs index 765b748a5..0d16b26a5 100644 --- a/crates/jacquard-api/src/network_slices/slice/stats.rs +++ b/crates/jacquard-api/src/network_slices/slice/stats.rs @@ -114,50 +114,50 @@ pub mod collection_stats_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Collection; - type UniqueActors; type RecordCount; + type UniqueActors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Collection = Unset; - type UniqueActors = Unset; type RecordCount = Unset; + type UniqueActors = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Collection = Set; - type UniqueActors = St::UniqueActors; - type RecordCount = St::RecordCount; - } - ///State transition - sets the `unique_actors` field to Set - pub struct SetUniqueActors(PhantomData St>); - impl sealed::Sealed for SetUniqueActors {} - impl State for SetUniqueActors { - type Collection = St::Collection; - type UniqueActors = Set; type RecordCount = St::RecordCount; + type UniqueActors = St::UniqueActors; } ///State transition - sets the `record_count` field to Set pub struct SetRecordCount(PhantomData St>); impl sealed::Sealed for SetRecordCount {} impl State for SetRecordCount { type Collection = St::Collection; - type UniqueActors = St::UniqueActors; type RecordCount = Set; + type UniqueActors = St::UniqueActors; + } + ///State transition - sets the `unique_actors` field to Set + pub struct SetUniqueActors(PhantomData St>); + impl sealed::Sealed for SetUniqueActors {} + impl State for SetUniqueActors { + type Collection = St::Collection; + type RecordCount = St::RecordCount; + type UniqueActors = 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 `unique_actors` field - pub struct unique_actors(()); ///Marker type for the `record_count` field pub struct record_count(()); + ///Marker type for the `unique_actors` field + pub struct unique_actors(()); } } @@ -247,8 +247,8 @@ impl CollectionStatsBuilder where St: collection_stats_state::State, St::Collection: collection_stats_state::IsSet, - St::UniqueActors: collection_stats_state::IsSet, St::RecordCount: collection_stats_state::IsSet, + St::UniqueActors: collection_stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionStats { diff --git a/crates/jacquard-api/src/network_slices/tools.rs b/crates/jacquard-api/src/network_slices/tools.rs index 5584d9e0c..f9faa41d1 100644 --- a/crates/jacquard-api/src/network_slices/tools.rs +++ b/crates/jacquard-api/src/network_slices/tools.rs @@ -141,37 +141,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 St>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Alt = Set; - type Image = St::Image; + type Alt = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Alt = St::Alt; type Image = Set; + type Alt = St::Alt; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData St>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Image = St::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(()); } } @@ -241,8 +241,8 @@ where impl ImageBuilder where St: image_state::State, - St::Alt: image_state::IsSet, St::Image: image_state::IsSet, + St::Alt: image_state::IsSet, { /// Build the final struct. pub fn build(self) -> Image { diff --git a/crates/jacquard-api/src/network_slices/tools/bug.rs b/crates/jacquard-api/src/network_slices/tools/bug.rs index d2780ebb4..8cdb97f57 100644 --- a/crates/jacquard-api/src/network_slices/tools/bug.rs +++ b/crates/jacquard-api/src/network_slices/tools/bug.rs @@ -301,105 +301,105 @@ pub mod bug_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Namespace; - type Title; type Severity; - type Description; - type StepsToReproduce; type CreatedAt; + type StepsToReproduce; + type Title; + type Description; + type Namespace; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Namespace = Unset; - type Title = Unset; type Severity = Unset; - type Description = Unset; - type StepsToReproduce = Unset; type CreatedAt = Unset; + type StepsToReproduce = Unset; + type Title = Unset; + type Description = Unset; + type Namespace = Unset; } - ///State transition - sets the `namespace` field to Set - pub struct SetNamespace(PhantomData St>); - impl sealed::Sealed for SetNamespace {} - impl State for SetNamespace { - type Namespace = Set; + ///State transition - sets the `severity` field to Set + pub struct SetSeverity(PhantomData St>); + impl sealed::Sealed for SetSeverity {} + impl State for SetSeverity { + type Severity = Set; + type CreatedAt = St::CreatedAt; + type StepsToReproduce = St::StepsToReproduce; type Title = St::Title; - type Severity = St::Severity; type Description = St::Description; + type Namespace = St::Namespace; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Severity = St::Severity; + type CreatedAt = Set; type StepsToReproduce = St::StepsToReproduce; + type Title = St::Title; + type Description = St::Description; + type Namespace = St::Namespace; + } + ///State transition - sets the `steps_to_reproduce` field to Set + pub struct SetStepsToReproduce(PhantomData St>); + impl sealed::Sealed for SetStepsToReproduce {} + impl State for SetStepsToReproduce { + type Severity = St::Severity; type CreatedAt = St::CreatedAt; + type StepsToReproduce = Set; + type Title = St::Title; + type Description = St::Description; + type Namespace = St::Namespace; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Namespace = St::Namespace; - type Title = Set; type Severity = St::Severity; - type Description = St::Description; - type StepsToReproduce = St::StepsToReproduce; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `severity` field to Set - pub struct SetSeverity(PhantomData St>); - impl sealed::Sealed for SetSeverity {} - impl State for SetSeverity { - type Namespace = St::Namespace; - type Title = St::Title; - type Severity = Set; - type Description = St::Description; type StepsToReproduce = St::StepsToReproduce; - type CreatedAt = St::CreatedAt; + type Title = Set; + type Description = St::Description; + type Namespace = St::Namespace; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Namespace = St::Namespace; - type Title = St::Title; type Severity = St::Severity; - type Description = Set; - type StepsToReproduce = St::StepsToReproduce; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `steps_to_reproduce` field to Set - pub struct SetStepsToReproduce(PhantomData St>); - impl sealed::Sealed for SetStepsToReproduce {} - impl State for SetStepsToReproduce { - type Namespace = St::Namespace; + type StepsToReproduce = St::StepsToReproduce; type Title = St::Title; + type Description = Set; + type Namespace = St::Namespace; + } + ///State transition - sets the `namespace` field to Set + pub struct SetNamespace(PhantomData St>); + impl sealed::Sealed for SetNamespace {} + impl State for SetNamespace { type Severity = St::Severity; - type Description = St::Description; - type StepsToReproduce = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Namespace = St::Namespace; + type StepsToReproduce = St::StepsToReproduce; type Title = St::Title; - type Severity = St::Severity; type Description = St::Description; - type StepsToReproduce = St::StepsToReproduce; - type CreatedAt = Set; + type Namespace = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `namespace` field - pub struct namespace(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `severity` field pub struct severity(()); - ///Marker type for the `description` field - pub struct description(()); - ///Marker type for the `steps_to_reproduce` field - pub struct steps_to_reproduce(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `steps_to_reproduce` field + pub struct steps_to_reproduce(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `description` field + pub struct description(()); + ///Marker type for the `namespace` field + pub struct namespace(()); } } @@ -617,12 +617,12 @@ where impl BugBuilder where St: bug_state::State, - St::Namespace: bug_state::IsSet, - St::Title: bug_state::IsSet, St::Severity: bug_state::IsSet, - St::Description: bug_state::IsSet, - St::StepsToReproduce: bug_state::IsSet, St::CreatedAt: bug_state::IsSet, + St::StepsToReproduce: bug_state::IsSet, + St::Title: bug_state::IsSet, + St::Description: bug_state::IsSet, + St::Namespace: bug_state::IsSet, { /// Build the final struct. pub fn build(self) -> Bug { diff --git a/crates/jacquard-api/src/network_slices/tools/bug/comment.rs b/crates/jacquard-api/src/network_slices/tools/bug/comment.rs index a30da96e0..34d963ccd 100644 --- a/crates/jacquard-api/src/network_slices/tools/bug/comment.rs +++ b/crates/jacquard-api/src/network_slices/tools/bug/comment.rs @@ -147,49 +147,49 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Body; type Bug; + type Body; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Body = Unset; type Bug = Unset; + type Body = Unset; type CreatedAt = Unset; } - ///State transition - sets the `body` field to Set - pub struct SetBody(PhantomData St>); - impl sealed::Sealed for SetBody {} - impl State for SetBody { - type Body = Set; - type Bug = St::Bug; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `bug` field to Set pub struct SetBug(PhantomData St>); impl sealed::Sealed for SetBug {} impl State for SetBug { - type Body = St::Body; type Bug = Set; + type Body = St::Body; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `body` field to Set + pub struct SetBody(PhantomData St>); + impl sealed::Sealed for SetBody {} + impl State for SetBody { + type Bug = St::Bug; + type Body = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Body = St::Body; type Bug = St::Bug; + type Body = St::Body; type CreatedAt = 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 `bug` field pub struct bug(()); + ///Marker type for the `body` field + pub struct body(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -326,8 +326,8 @@ impl CommentBuilder { impl CommentBuilder where St: comment_state::State, - St::Body: comment_state::IsSet, St::Bug: comment_state::IsSet, + St::Body: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/network_slices/tools/bug/issue.rs b/crates/jacquard-api/src/network_slices/tools/bug/issue.rs index 91343b5f5..42e1ef4f3 100644 --- a/crates/jacquard-api/src/network_slices/tools/bug/issue.rs +++ b/crates/jacquard-api/src/network_slices/tools/bug/issue.rs @@ -114,51 +114,51 @@ pub mod issue_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Issue; type CreatedAt; type Bug; - type Issue; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Issue = Unset; type CreatedAt = Unset; type Bug = Unset; - type Issue = Unset; + } + ///State transition - sets the `issue` field to Set + pub struct SetIssue(PhantomData St>); + impl sealed::Sealed for SetIssue {} + impl State for SetIssue { + type Issue = Set; + type CreatedAt = St::CreatedAt; + type Bug = St::Bug; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Issue = St::Issue; type CreatedAt = Set; type Bug = St::Bug; - type Issue = St::Issue; } ///State transition - sets the `bug` field to Set pub struct SetBug(PhantomData St>); impl sealed::Sealed for SetBug {} impl State for SetBug { - type CreatedAt = St::CreatedAt; - type Bug = Set; type Issue = St::Issue; - } - ///State transition - sets the `issue` field to Set - pub struct SetIssue(PhantomData St>); - impl sealed::Sealed for SetIssue {} - impl State for SetIssue { type CreatedAt = St::CreatedAt; - type Bug = St::Bug; - type Issue = Set; + type Bug = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `issue` field + pub struct issue(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `bug` field pub struct bug(()); - ///Marker type for the `issue` field - pub struct issue(()); } } @@ -247,9 +247,9 @@ where impl IssueBuilder where St: issue_state::State, + St::Issue: issue_state::IsSet, St::CreatedAt: issue_state::IsSet, St::Bug: issue_state::IsSet, - St::Issue: issue_state::IsSet, { /// Build the final struct. pub fn build(self) -> Issue { diff --git a/crates/jacquard-api/src/network_slices/tools/bug/response.rs b/crates/jacquard-api/src/network_slices/tools/bug/response.rs index cc73bc231..595d98e71 100644 --- a/crates/jacquard-api/src/network_slices/tools/bug/response.rs +++ b/crates/jacquard-api/src/network_slices/tools/bug/response.rs @@ -232,51 +232,51 @@ pub mod response_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type CreatedAt; type Bug; + 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 CreatedAt = Unset; type Bug = Unset; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type CreatedAt = St::CreatedAt; - type Bug = St::Bug; + type Status = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = St::Status; type CreatedAt = Set; type Bug = St::Bug; + type Status = St::Status; } ///State transition - sets the `bug` field to Set pub struct SetBug(PhantomData St>); impl sealed::Sealed for SetBug {} impl State for SetBug { - type Status = St::Status; type CreatedAt = St::CreatedAt; type Bug = Set; + type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = St::CreatedAt; + type Bug = St::Bug; + 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 `created_at` field pub struct created_at(()); ///Marker type for the `bug` field pub struct bug(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -397,9 +397,9 @@ where impl ResponseBuilder where St: response_state::State, - St::Status: response_state::IsSet, St::CreatedAt: response_state::IsSet, St::Bug: response_state::IsSet, + St::Status: response_state::IsSet, { /// Build the final struct. pub fn build(self) -> Response { diff --git a/crates/jacquard-api/src/network_slices/tools/document.rs b/crates/jacquard-api/src/network_slices/tools/document.rs index 1fc21339e..ac3ff9c32 100644 --- a/crates/jacquard-api/src/network_slices/tools/document.rs +++ b/crates/jacquard-api/src/network_slices/tools/document.rs @@ -776,37 +776,37 @@ pub mod heading_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; type Level; + 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 Level = Unset; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type Level = St::Level; + type Text = Unset; } ///State transition - sets the `level` field to Set pub struct SetLevel(PhantomData St>); impl sealed::Sealed for SetLevel {} impl State for SetLevel { - type Text = St::Text; type Level = Set; + type Text = St::Text; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type Level = St::Level; + 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 `level` field pub struct level(()); + ///Marker type for the `text` field + pub struct text(()); } } @@ -889,8 +889,8 @@ where impl HeadingBuilder where St: heading_state::State, - St::Text: heading_state::IsSet, St::Level: heading_state::IsSet, + St::Text: heading_state::IsSet, { /// Build the final struct. pub fn build(self) -> Heading { @@ -1038,66 +1038,66 @@ pub mod document_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type Slug; type Blocks; type CreatedAt; + type Slug; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type Slug = Unset; type Blocks = Unset; type CreatedAt = Unset; + type Slug = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type Slug = St::Slug; - type Blocks = St::Blocks; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `slug` field to Set - pub struct SetSlug(PhantomData St>); - impl sealed::Sealed for SetSlug {} - impl State for SetSlug { - type Title = St::Title; - type Slug = Set; type Blocks = St::Blocks; type CreatedAt = St::CreatedAt; + type Slug = St::Slug; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData St>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { type Title = St::Title; - type Slug = St::Slug; type Blocks = Set; type CreatedAt = St::CreatedAt; + type Slug = St::Slug; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Title = St::Title; - type Slug = St::Slug; type Blocks = St::Blocks; type CreatedAt = Set; + type Slug = St::Slug; + } + ///State transition - sets the `slug` field to Set + pub struct SetSlug(PhantomData St>); + impl sealed::Sealed for SetSlug {} + impl State for SetSlug { + type Title = St::Title; + type Blocks = St::Blocks; + type CreatedAt = St::CreatedAt; + type Slug = 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 `slug` field - pub struct slug(()); ///Marker type for the `blocks` field pub struct blocks(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `slug` field + pub struct slug(()); } } @@ -1225,9 +1225,9 @@ impl DocumentBuilder where St: document_state::State, St::Title: document_state::IsSet, - St::Slug: document_state::IsSet, St::Blocks: document_state::IsSet, St::CreatedAt: document_state::IsSet, + St::Slug: document_state::IsSet, { /// Build the final struct. pub fn build(self) -> Document { diff --git a/crates/jacquard-api/src/network_slices/waitlist.rs b/crates/jacquard-api/src/network_slices/waitlist.rs index 700f8f391..962835382 100644 --- a/crates/jacquard-api/src/network_slices/waitlist.rs +++ b/crates/jacquard-api/src/network_slices/waitlist.rs @@ -109,51 +109,51 @@ pub mod invite_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Slice; type CreatedAt; type Did; - type Slice; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Slice = Unset; type CreatedAt = Unset; type Did = Unset; - type Slice = Unset; + } + ///State transition - sets the `slice` field to Set + pub struct SetSlice(PhantomData St>); + impl sealed::Sealed for SetSlice {} + impl State for SetSlice { + type Slice = Set; + type CreatedAt = St::CreatedAt; + type Did = St::Did; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Slice = St::Slice; type CreatedAt = Set; type Did = St::Did; - type Slice = St::Slice; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type CreatedAt = St::CreatedAt; - type Did = Set; type Slice = St::Slice; - } - ///State transition - sets the `slice` field to Set - pub struct SetSlice(PhantomData St>); - impl sealed::Sealed for SetSlice {} - impl State for SetSlice { type CreatedAt = St::CreatedAt; - type Did = St::Did; - type Slice = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `slice` field + pub struct slice(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `slice` field - pub struct slice(()); } } @@ -288,9 +288,9 @@ impl InviteViewBuilder { impl InviteViewBuilder where St: invite_view_state::State, + St::Slice: invite_view_state::IsSet, St::CreatedAt: invite_view_state::IsSet, St::Did: invite_view_state::IsSet, - St::Slice: invite_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> InviteView { @@ -485,37 +485,37 @@ pub mod request_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Slice; type CreatedAt; + type Slice; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Slice = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `slice` field to Set - pub struct SetSlice(PhantomData St>); - impl sealed::Sealed for SetSlice {} - impl State for SetSlice { - type Slice = Set; - type CreatedAt = St::CreatedAt; + type Slice = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Slice = St::Slice; type CreatedAt = Set; + type Slice = St::Slice; + } + ///State transition - sets the `slice` field to Set + pub struct SetSlice(PhantomData St>); + impl sealed::Sealed for SetSlice {} + impl State for SetSlice { + type CreatedAt = St::CreatedAt; + type Slice = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `slice` field - pub struct slice(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `slice` field + pub struct slice(()); } } @@ -598,8 +598,8 @@ where impl RequestViewBuilder where St: request_view_state::State, - St::Slice: request_view_state::IsSet, St::CreatedAt: request_view_state::IsSet, + St::Slice: request_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RequestView { diff --git a/crates/jacquard-api/src/network_slices/waitlist/request.rs b/crates/jacquard-api/src/network_slices/waitlist/request.rs index 7a93753f4..3c06e994b 100644 --- a/crates/jacquard-api/src/network_slices/waitlist/request.rs +++ b/crates/jacquard-api/src/network_slices/waitlist/request.rs @@ -114,37 +114,37 @@ pub mod request_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Slice; type CreatedAt; + type Slice; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Slice = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `slice` field to Set - pub struct SetSlice(PhantomData St>); - impl sealed::Sealed for SetSlice {} - impl State for SetSlice { - type Slice = Set; - type CreatedAt = St::CreatedAt; + type Slice = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Slice = St::Slice; type CreatedAt = Set; + type Slice = St::Slice; + } + ///State transition - sets the `slice` field to Set + pub struct SetSlice(PhantomData St>); + impl sealed::Sealed for SetSlice {} + impl State for SetSlice { + type CreatedAt = St::CreatedAt; + type Slice = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `slice` field - pub struct slice(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `slice` field + pub struct slice(()); } } @@ -214,8 +214,8 @@ where impl RequestBuilder where St: request_state::State, - St::Slice: request_state::IsSet, St::CreatedAt: request_state::IsSet, + St::Slice: request_state::IsSet, { /// Build the final struct. pub fn build(self) -> Request { diff --git a/crates/jacquard-api/src/ooo_bsky/authfetch/fetch_records.rs b/crates/jacquard-api/src/ooo_bsky/authfetch/fetch_records.rs index 6b6182646..7d911bac2 100644 --- a/crates/jacquard-api/src/ooo_bsky/authfetch/fetch_records.rs +++ b/crates/jacquard-api/src/ooo_bsky/authfetch/fetch_records.rs @@ -196,49 +196,49 @@ pub mod fetch_records_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Strategy; + type Record; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Strategy = Unset; + type Record = Unset; type Uri = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Strategy = St::Strategy; - type Uri = St::Uri; - } ///State transition - sets the `strategy` field to Set pub struct SetStrategy(PhantomData St>); impl sealed::Sealed for SetStrategy {} impl State for SetStrategy { - type Record = St::Record; type Strategy = Set; + type Record = St::Record; + type Uri = St::Uri; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Strategy = St::Strategy; + type Record = Set; type Uri = St::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = St::Record; type Strategy = St::Strategy; + type Record = St::Record; type Uri = 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 `strategy` field pub struct strategy(()); + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `uri` field pub struct uri(()); } @@ -329,8 +329,8 @@ where impl FetchRecordsResultBuilder where St: fetch_records_result_state::State, - St::Record: fetch_records_result_state::IsSet, St::Strategy: fetch_records_result_state::IsSet, + St::Record: fetch_records_result_state::IsSet, St::Uri: fetch_records_result_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/ooo_bsky/authfetch/list_records.rs b/crates/jacquard-api/src/ooo_bsky/authfetch/list_records.rs index ebe53cd33..fcdb8b4a2 100644 --- a/crates/jacquard-api/src/ooo_bsky/authfetch/list_records.rs +++ b/crates/jacquard-api/src/ooo_bsky/authfetch/list_records.rs @@ -252,50 +252,50 @@ pub mod record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Strategy; - type Value; type Uri; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Strategy = Unset; - type Value = Unset; type Uri = Unset; + type Value = Unset; } ///State transition - sets the `strategy` field to Set pub struct SetStrategy(PhantomData St>); impl sealed::Sealed for SetStrategy {} impl State for SetStrategy { type Strategy = Set; - type Value = St::Value; - type Uri = St::Uri; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Strategy = St::Strategy; - type Value = Set; type Uri = St::Uri; + type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Strategy = St::Strategy; - type Value = St::Value; type Uri = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Strategy = St::Strategy; + type Uri = St::Uri; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `strategy` field pub struct strategy(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -385,8 +385,8 @@ impl RecordBuilder where St: record_state::State, St::Strategy: record_state::IsSet, - St::Value: record_state::IsSet, St::Uri: record_state::IsSet, + St::Value: record_state::IsSet, { /// Build the final struct. pub fn build(self) -> Record { diff --git a/crates/jacquard-api/src/ooo_bsky/authfetch/put_record.rs b/crates/jacquard-api/src/ooo_bsky/authfetch/put_record.rs index 3ba5be0cb..10eb096ee 100644 --- a/crates/jacquard-api/src/ooo_bsky/authfetch/put_record.rs +++ b/crates/jacquard-api/src/ooo_bsky/authfetch/put_record.rs @@ -82,66 +82,66 @@ pub mod put_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Collection; - type Record; type Rkey; type Strategy; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Collection = Unset; - type Record = Unset; type Rkey = Unset; type Strategy = Unset; + type Record = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Collection = Set; - type Record = St::Record; - type Rkey = St::Rkey; - type Strategy = St::Strategy; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Collection = St::Collection; - type Record = Set; type Rkey = St::Rkey; type Strategy = St::Strategy; + type Record = St::Record; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData St>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { type Collection = St::Collection; - type Record = St::Record; type Rkey = Set; type Strategy = St::Strategy; + type Record = St::Record; } ///State transition - sets the `strategy` field to Set pub struct SetStrategy(PhantomData St>); impl sealed::Sealed for SetStrategy {} impl State for SetStrategy { type Collection = St::Collection; - type Record = St::Record; type Rkey = St::Rkey; type Strategy = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Collection = St::Collection; + type Rkey = St::Rkey; + type Strategy = St::Strategy; + type Record = 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 `record` field - pub struct record(()); ///Marker type for the `rkey` field pub struct rkey(()); ///Marker type for the `strategy` field pub struct strategy(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -255,9 +255,9 @@ impl PutRecordBuilder where St: put_record_state::State, St::Collection: put_record_state::IsSet, - St::Record: put_record_state::IsSet, St::Rkey: put_record_state::IsSet, St::Strategy: put_record_state::IsSet, + St::Record: put_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> PutRecord { diff --git a/crates/jacquard-api/src/org_atpodcasting/episode.rs b/crates/jacquard-api/src/org_atpodcasting/episode.rs index 6f36f88aa..b184c451f 100644 --- a/crates/jacquard-api/src/org_atpodcasting/episode.rs +++ b/crates/jacquard-api/src/org_atpodcasting/episode.rs @@ -921,126 +921,126 @@ pub mod episode_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Podcast; - type CreatedAt; - type Duration; - type PublishedAt; type Media; + type Duration; type FeedItemGuid; + type CreatedAt; type Title; + type PublishedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Podcast = Unset; - type CreatedAt = Unset; - type Duration = Unset; - type PublishedAt = Unset; type Media = Unset; + type Duration = Unset; type FeedItemGuid = Unset; + type CreatedAt = Unset; type Title = Unset; + type PublishedAt = Unset; } ///State transition - sets the `podcast` field to Set pub struct SetPodcast(PhantomData St>); impl sealed::Sealed for SetPodcast {} impl State for SetPodcast { type Podcast = Set; - type CreatedAt = St::CreatedAt; - type Duration = St::Duration; - type PublishedAt = St::PublishedAt; type Media = St::Media; + type Duration = St::Duration; type FeedItemGuid = St::FeedItemGuid; + type CreatedAt = St::CreatedAt; type Title = St::Title; + type PublishedAt = St::PublishedAt; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `media` field to Set + pub struct SetMedia(PhantomData St>); + impl sealed::Sealed for SetMedia {} + impl State for SetMedia { type Podcast = St::Podcast; - type CreatedAt = Set; + type Media = Set; type Duration = St::Duration; - type PublishedAt = St::PublishedAt; - type Media = St::Media; type FeedItemGuid = St::FeedItemGuid; + type CreatedAt = St::CreatedAt; type Title = St::Title; + type PublishedAt = St::PublishedAt; } ///State transition - sets the `duration` field to Set pub struct SetDuration(PhantomData St>); impl sealed::Sealed for SetDuration {} impl State for SetDuration { type Podcast = St::Podcast; - type CreatedAt = St::CreatedAt; - type Duration = Set; - type PublishedAt = St::PublishedAt; type Media = St::Media; + type Duration = Set; type FeedItemGuid = St::FeedItemGuid; - type Title = St::Title; - } - ///State transition - sets the `published_at` field to Set - pub struct SetPublishedAt(PhantomData St>); - impl sealed::Sealed for SetPublishedAt {} - impl State for SetPublishedAt { - type Podcast = St::Podcast; type CreatedAt = St::CreatedAt; - type Duration = St::Duration; - type PublishedAt = Set; - type Media = St::Media; - type FeedItemGuid = St::FeedItemGuid; type Title = St::Title; - } - ///State transition - sets the `media` field to Set - pub struct SetMedia(PhantomData St>); - impl sealed::Sealed for SetMedia {} - impl State for SetMedia { - type Podcast = St::Podcast; - type CreatedAt = St::CreatedAt; - type Duration = St::Duration; type PublishedAt = St::PublishedAt; - type Media = Set; - type FeedItemGuid = St::FeedItemGuid; - type Title = St::Title; } ///State transition - sets the `feed_item_guid` field to Set pub struct SetFeedItemGuid(PhantomData St>); impl sealed::Sealed for SetFeedItemGuid {} impl State for SetFeedItemGuid { type Podcast = St::Podcast; - type CreatedAt = St::CreatedAt; + type Media = St::Media; type Duration = St::Duration; + type FeedItemGuid = Set; + type CreatedAt = St::CreatedAt; + type Title = St::Title; type PublishedAt = St::PublishedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Podcast = St::Podcast; type Media = St::Media; - type FeedItemGuid = Set; + type Duration = St::Duration; + type FeedItemGuid = St::FeedItemGuid; + type CreatedAt = Set; type Title = St::Title; + type PublishedAt = St::PublishedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Podcast = St::Podcast; - type CreatedAt = St::CreatedAt; + type Media = St::Media; type Duration = St::Duration; + type FeedItemGuid = St::FeedItemGuid; + type CreatedAt = St::CreatedAt; + type Title = Set; type PublishedAt = St::PublishedAt; + } + ///State transition - sets the `published_at` field to Set + pub struct SetPublishedAt(PhantomData St>); + impl sealed::Sealed for SetPublishedAt {} + impl State for SetPublishedAt { + type Podcast = St::Podcast; type Media = St::Media; + type Duration = St::Duration; type FeedItemGuid = St::FeedItemGuid; - type Title = Set; + type CreatedAt = St::CreatedAt; + type Title = St::Title; + type PublishedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `podcast` field pub struct podcast(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `duration` field - pub struct duration(()); - ///Marker type for the `published_at` field - pub struct published_at(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `duration` field + pub struct duration(()); ///Marker type for the `feed_item_guid` field pub struct feed_item_guid(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `published_at` field + pub struct published_at(()); } } @@ -1390,12 +1390,12 @@ impl EpisodeBuilder where St: episode_state::State, St::Podcast: episode_state::IsSet, - St::CreatedAt: episode_state::IsSet, - St::Duration: episode_state::IsSet, - St::PublishedAt: episode_state::IsSet, St::Media: episode_state::IsSet, + St::Duration: episode_state::IsSet, St::FeedItemGuid: episode_state::IsSet, + St::CreatedAt: episode_state::IsSet, St::Title: episode_state::IsSet, + St::PublishedAt: episode_state::IsSet, { /// Build the final struct. pub fn build(self) -> Episode { @@ -1455,37 +1455,37 @@ pub mod media_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type MimeType; + 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 MimeType = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type MimeType = St::MimeType; + type Url = Unset; } ///State transition - sets the `mime_type` field to Set pub struct SetMimeType(PhantomData St>); impl sealed::Sealed for SetMimeType {} impl State for SetMimeType { - type Url = St::Url; type MimeType = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type MimeType = St::MimeType; + 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 `mime_type` field pub struct mime_type(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -1555,8 +1555,8 @@ where impl MediaRefBuilder where St: media_ref_state::State, - St::Url: media_ref_state::IsSet, St::MimeType: media_ref_state::IsSet, + St::Url: media_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> MediaRef { diff --git a/crates/jacquard-api/src/org_atpodcasting/follow.rs b/crates/jacquard-api/src/org_atpodcasting/follow.rs index bb29f97d5..6e82c00d4 100644 --- a/crates/jacquard-api/src/org_atpodcasting/follow.rs +++ b/crates/jacquard-api/src/org_atpodcasting/follow.rs @@ -115,37 +115,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -215,8 +215,8 @@ where impl FollowBuilder where St: follow_state::State, - St::Subject: follow_state::IsSet, St::CreatedAt: follow_state::IsSet, + St::Subject: follow_state::IsSet, { /// Build the final struct. pub fn build(self) -> Follow { diff --git a/crates/jacquard-api/src/org_atpodcasting/podcast.rs b/crates/jacquard-api/src/org_atpodcasting/podcast.rs index de353ccd7..3fbb75c30 100644 --- a/crates/jacquard-api/src/org_atpodcasting/podcast.rs +++ b/crates/jacquard-api/src/org_atpodcasting/podcast.rs @@ -223,151 +223,151 @@ pub mod podcast_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Language; + type Title; type FeedUrl; + type Categories; type Artwork; - type Title; + type Language; type Description; - type CreatedAt; type Guid; - type Categories; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Language = Unset; + type Title = Unset; type FeedUrl = Unset; + type Categories = Unset; type Artwork = Unset; - type Title = Unset; + type Language = Unset; type Description = Unset; - type CreatedAt = Unset; type Guid = Unset; - type Categories = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `language` field to Set - pub struct SetLanguage(PhantomData St>); - impl sealed::Sealed for SetLanguage {} - impl State for SetLanguage { - type Language = Set; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = St::Title; + type Language = St::Language; type Description = St::Description; - type CreatedAt = St::CreatedAt; type Guid = St::Guid; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `feed_url` field to Set pub struct SetFeedUrl(PhantomData St>); impl sealed::Sealed for SetFeedUrl {} impl State for SetFeedUrl { - type Language = St::Language; + type Title = St::Title; type FeedUrl = Set; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = St::Title; + type Language = St::Language; type Description = St::Description; + type Guid = St::Guid; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `categories` field to Set + pub struct SetCategories(PhantomData St>); + impl sealed::Sealed for SetCategories {} + impl State for SetCategories { + type Title = St::Title; + type FeedUrl = St::FeedUrl; + type Categories = Set; + type Artwork = St::Artwork; + type Language = St::Language; + type Description = St::Description; type Guid = St::Guid; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `artwork` field to Set pub struct SetArtwork(PhantomData St>); impl sealed::Sealed for SetArtwork {} impl State for SetArtwork { - type Language = St::Language; + type Title = St::Title; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = Set; - type Title = St::Title; + type Language = St::Language; type Description = St::Description; - type CreatedAt = St::CreatedAt; type Guid = St::Guid; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Language = St::Language; + ///State transition - sets the `language` field to Set + pub struct SetLanguage(PhantomData St>); + impl sealed::Sealed for SetLanguage {} + impl State for SetLanguage { + type Title = St::Title; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = Set; + type Language = Set; type Description = St::Description; - type CreatedAt = St::CreatedAt; type Guid = St::Guid; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Language = St::Language; - type FeedUrl = St::FeedUrl; - type Artwork = St::Artwork; type Title = St::Title; - type Description = Set; - type CreatedAt = St::CreatedAt; - type Guid = St::Guid; - type Categories = St::Categories; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Language = St::Language; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = St::Title; - type Description = St::Description; - type CreatedAt = Set; + type Language = St::Language; + type Description = Set; type Guid = St::Guid; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `guid` field to Set pub struct SetGuid(PhantomData St>); impl sealed::Sealed for SetGuid {} impl State for SetGuid { - type Language = St::Language; + type Title = St::Title; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = St::Title; + type Language = St::Language; type Description = St::Description; - type CreatedAt = St::CreatedAt; type Guid = Set; - type Categories = St::Categories; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `categories` field to Set - pub struct SetCategories(PhantomData St>); - impl sealed::Sealed for SetCategories {} - impl State for SetCategories { - type Language = St::Language; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Title = St::Title; type FeedUrl = St::FeedUrl; + type Categories = St::Categories; type Artwork = St::Artwork; - type Title = St::Title; + type Language = St::Language; type Description = St::Description; - type CreatedAt = St::CreatedAt; type Guid = St::Guid; - type Categories = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `language` field - pub struct language(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `feed_url` field pub struct feed_url(()); + ///Marker type for the `categories` field + pub struct categories(()); ///Marker type for the `artwork` field pub struct artwork(()); - ///Marker type for the `title` field - pub struct title(()); + ///Marker type for the `language` field + pub struct language(()); ///Marker type for the `description` field pub struct description(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `guid` field pub struct guid(()); - ///Marker type for the `categories` field - pub struct categories(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -602,14 +602,14 @@ where impl PodcastBuilder where St: podcast_state::State, - St::Language: podcast_state::IsSet, + St::Title: podcast_state::IsSet, St::FeedUrl: podcast_state::IsSet, + St::Categories: podcast_state::IsSet, St::Artwork: podcast_state::IsSet, - St::Title: podcast_state::IsSet, + St::Language: podcast_state::IsSet, St::Description: podcast_state::IsSet, - St::CreatedAt: podcast_state::IsSet, St::Guid: podcast_state::IsSet, - St::Categories: podcast_state::IsSet, + St::CreatedAt: podcast_state::IsSet, { /// Build the final struct. pub fn build(self) -> Podcast { diff --git a/crates/jacquard-api/src/org_atsui/blob.rs b/crates/jacquard-api/src/org_atsui/blob.rs index 69dbe5cd1..2c1d9f36c 100644 --- a/crates/jacquard-api/src/org_atsui/blob.rs +++ b/crates/jacquard-api/src/org_atsui/blob.rs @@ -137,37 +137,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = St::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = St::Width; type Height = Set; + type Width = St::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = St::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(()); } } @@ -237,8 +237,8 @@ where impl AspectRatioBuilder where St: aspect_ratio_state::State, - St::Width: aspect_ratio_state::IsSet, St::Height: aspect_ratio_state::IsSet, + St::Width: aspect_ratio_state::IsSet, { /// Build the final struct. pub fn build(self) -> AspectRatio { @@ -375,37 +375,37 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Src; type Did; + type Src; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Src = Unset; type Did = Unset; - } - ///State transition - sets the `src` field to Set - pub struct SetSrc(PhantomData St>); - impl sealed::Sealed for SetSrc {} - impl State for SetSrc { - type Src = Set; - type Did = St::Did; + type Src = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Src = St::Src; type Did = Set; + type Src = St::Src; + } + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData St>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { + type Did = St::Did; + type Src = 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 `did` field pub struct did(()); + ///Marker type for the `src` field + pub struct src(()); } } @@ -501,8 +501,8 @@ where impl BlobBuilder where St: blob_state::State, - St::Src: blob_state::IsSet, St::Did: blob_state::IsSet, + St::Src: blob_state::IsSet, { /// Build the final struct. pub fn build(self) -> Blob { diff --git a/crates/jacquard-api/src/org_atsui/tabs.rs b/crates/jacquard-api/src/org_atsui/tabs.rs index 5f934a2b4..35bf5b812 100644 --- a/crates/jacquard-api/src/org_atsui/tabs.rs +++ b/crates/jacquard-api/src/org_atsui/tabs.rs @@ -232,51 +232,51 @@ pub mod tab_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Label; - type Content; type Key; + type Content; + type Label; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Label = Unset; - type Content = Unset; type Key = Unset; + type Content = Unset; + type Label = Unset; } - ///State transition - sets the `label` field to Set - pub struct SetLabel(PhantomData St>); - impl sealed::Sealed for SetLabel {} - impl State for SetLabel { - type Label = Set; + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Key = Set; type Content = St::Content; - type Key = St::Key; + type Label = St::Label; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Label = St::Label; - type Content = Set; type Key = St::Key; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { + type Content = Set; type Label = St::Label; + } + ///State transition - sets the `label` field to Set + pub struct SetLabel(PhantomData St>); + impl sealed::Sealed for SetLabel {} + impl State for SetLabel { + type Key = St::Key; type Content = St::Content; - type Key = Set; + type Label = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `label` field - pub struct label(()); - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `key` field pub struct key(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `label` field + pub struct label(()); } } @@ -362,9 +362,9 @@ where impl TabBuilder where St: tab_state::State, - St::Label: tab_state::IsSet, - St::Content: tab_state::IsSet, St::Key: tab_state::IsSet, + St::Content: tab_state::IsSet, + St::Label: tab_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tab { diff --git a/crates/jacquard-api/src/org_devcon/event/test.rs b/crates/jacquard-api/src/org_devcon/event/test.rs index 5a2885ac4..73c96bc71 100644 --- a/crates/jacquard-api/src/org_devcon/event/test.rs +++ b/crates/jacquard-api/src/org_devcon/event/test.rs @@ -127,50 +127,50 @@ pub mod test_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type End; type Start; + type End; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type End = Unset; type Start = Unset; + type End = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type End = St::End; - type Start = St::Start; - } - ///State transition - sets the `end` field to Set - pub struct SetEnd(PhantomData St>); - impl sealed::Sealed for SetEnd {} - impl State for SetEnd { - type Title = St::Title; - type End = Set; type Start = St::Start; + type End = St::End; } ///State transition - sets the `start` field to Set pub struct SetStart(PhantomData St>); impl sealed::Sealed for SetStart {} impl State for SetStart { type Title = St::Title; - type End = St::End; type Start = Set; + type End = St::End; + } + ///State transition - sets the `end` field to Set + pub struct SetEnd(PhantomData St>); + impl sealed::Sealed for SetEnd {} + impl State for SetEnd { + type Title = St::Title; + type Start = St::Start; + type End = 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 `end` field - pub struct end(()); ///Marker type for the `start` field pub struct start(()); + ///Marker type for the `end` field + pub struct end(()); } } @@ -320,8 +320,8 @@ impl TestBuilder where St: test_state::State, St::Title: test_state::IsSet, - St::End: test_state::IsSet, St::Start: test_state::IsSet, + St::End: test_state::IsSet, { /// Build the final struct. pub fn build(self) -> Test { diff --git a/crates/jacquard-api/src/org_farmapps/temp/ecrop.rs b/crates/jacquard-api/src/org_farmapps/temp/ecrop.rs index a5c62782d..2510b4864 100644 --- a/crates/jacquard-api/src/org_farmapps/temp/ecrop.rs +++ b/crates/jacquard-api/src/org_farmapps/temp/ecrop.rs @@ -61,37 +61,37 @@ pub mod code_type_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ListId; type Code; + type ListId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ListId = Unset; type Code = Unset; - } - ///State transition - sets the `list_id` field to Set - pub struct SetListId(PhantomData St>); - impl sealed::Sealed for SetListId {} - impl State for SetListId { - type ListId = Set; - type Code = St::Code; + type ListId = Unset; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData St>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type ListId = St::ListId; type Code = Set; + type ListId = St::ListId; + } + ///State transition - sets the `list_id` field to Set + pub struct SetListId(PhantomData St>); + impl sealed::Sealed for SetListId {} + impl State for SetListId { + type Code = St::Code; + type ListId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `list_id` field - pub struct list_id(()); ///Marker type for the `code` field pub struct code(()); + ///Marker type for the `list_id` field + pub struct list_id(()); } } @@ -161,8 +161,8 @@ where impl CodeTypeBuilder where St: code_type_state::State, - St::ListId: code_type_state::IsSet, St::Code: code_type_state::IsSet, + St::ListId: code_type_state::IsSet, { /// Build the final struct. pub fn build(self) -> CodeType { diff --git a/crates/jacquard-api/src/org_hyperboards/board.rs b/crates/jacquard-api/src/org_hyperboards/board.rs index 140b9ac50..3480ca037 100644 --- a/crates/jacquard-api/src/org_hyperboards/board.rs +++ b/crates/jacquard-api/src/org_hyperboards/board.rs @@ -1204,37 +1204,37 @@ pub mod board_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -1341,8 +1341,8 @@ where impl BoardBuilder where St: board_state::State, - St::Subject: board_state::IsSet, St::CreatedAt: board_state::IsSet, + St::Subject: board_state::IsSet, { /// Build the final struct. pub fn build(self) -> Board { diff --git a/crates/jacquard-api/src/org_hyperboards/contributor.rs b/crates/jacquard-api/src/org_hyperboards/contributor.rs index 04e45f8c7..2a7715c55 100644 --- a/crates/jacquard-api/src/org_hyperboards/contributor.rs +++ b/crates/jacquard-api/src/org_hyperboards/contributor.rs @@ -130,37 +130,37 @@ pub mod contributor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type ContributorRef; + 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 ContributorRef = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type ContributorRef = St::ContributorRef; + type CreatedAt = Unset; } ///State transition - sets the `contributor_ref` field to Set pub struct SetContributorRef(PhantomData St>); impl sealed::Sealed for SetContributorRef {} impl State for SetContributorRef { - type CreatedAt = St::CreatedAt; type ContributorRef = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type ContributorRef = St::ContributorRef; + 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 `contributor_ref` field pub struct contributor_ref(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -303,8 +303,8 @@ impl ContributorBuilder { impl ContributorBuilder where St: contributor_state::State, - St::CreatedAt: contributor_state::IsSet, St::ContributorRef: contributor_state::IsSet, + St::CreatedAt: contributor_state::IsSet, { /// Build the final struct. pub fn build(self) -> Contributor { diff --git a/crates/jacquard-api/src/org_hypercerts/claim/activity.rs b/crates/jacquard-api/src/org_hypercerts/claim/activity.rs index 9e7ff79b5..c5b2b88be 100644 --- a/crates/jacquard-api/src/org_hypercerts/claim/activity.rs +++ b/crates/jacquard-api/src/org_hypercerts/claim/activity.rs @@ -909,51 +909,51 @@ pub mod activity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type ShortDescription; type Title; type CreatedAt; - type ShortDescription; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type ShortDescription = Unset; type Title = Unset; type CreatedAt = Unset; - type ShortDescription = Unset; + } + ///State transition - sets the `short_description` field to Set + pub struct SetShortDescription(PhantomData St>); + impl sealed::Sealed for SetShortDescription {} + impl State for SetShortDescription { + type ShortDescription = Set; + type Title = St::Title; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type ShortDescription = St::ShortDescription; type Title = Set; type CreatedAt = St::CreatedAt; - type ShortDescription = St::ShortDescription; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Title = St::Title; - type CreatedAt = Set; type ShortDescription = St::ShortDescription; - } - ///State transition - sets the `short_description` field to Set - pub struct SetShortDescription(PhantomData St>); - impl sealed::Sealed for SetShortDescription {} - impl State for SetShortDescription { type Title = St::Title; - type CreatedAt = St::CreatedAt; - type ShortDescription = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `short_description` field + pub struct short_description(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `short_description` field - pub struct short_description(()); } } @@ -1197,9 +1197,9 @@ impl ActivityBuilder { impl ActivityBuilder where St: activity_state::State, + St::ShortDescription: activity_state::IsSet, St::Title: activity_state::IsSet, St::CreatedAt: activity_state::IsSet, - St::ShortDescription: activity_state::IsSet, { /// Build the final struct. pub fn build(self) -> Activity { diff --git a/crates/jacquard-api/src/org_hypercerts/claim/rights.rs b/crates/jacquard-api/src/org_hypercerts/claim/rights.rs index 26057d810..0a04c0669 100644 --- a/crates/jacquard-api/src/org_hypercerts/claim/rights.rs +++ b/crates/jacquard-api/src/org_hypercerts/claim/rights.rs @@ -180,67 +180,67 @@ pub mod rights_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RightsName; type RightsDescription; type CreatedAt; type RightsType; + type RightsName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RightsName = Unset; type RightsDescription = Unset; type CreatedAt = Unset; type RightsType = Unset; - } - ///State transition - sets the `rights_name` field to Set - pub struct SetRightsName(PhantomData St>); - impl sealed::Sealed for SetRightsName {} - impl State for SetRightsName { - type RightsName = Set; - type RightsDescription = St::RightsDescription; - type CreatedAt = St::CreatedAt; - type RightsType = St::RightsType; + type RightsName = Unset; } ///State transition - sets the `rights_description` field to Set pub struct SetRightsDescription(PhantomData St>); impl sealed::Sealed for SetRightsDescription {} impl State for SetRightsDescription { - type RightsName = St::RightsName; type RightsDescription = Set; type CreatedAt = St::CreatedAt; type RightsType = St::RightsType; + type RightsName = St::RightsName; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type RightsName = St::RightsName; type RightsDescription = St::RightsDescription; type CreatedAt = Set; type RightsType = St::RightsType; + type RightsName = St::RightsName; } ///State transition - sets the `rights_type` field to Set pub struct SetRightsType(PhantomData St>); impl sealed::Sealed for SetRightsType {} impl State for SetRightsType { - type RightsName = St::RightsName; type RightsDescription = St::RightsDescription; type CreatedAt = St::CreatedAt; type RightsType = Set; + type RightsName = St::RightsName; + } + ///State transition - sets the `rights_name` field to Set + pub struct SetRightsName(PhantomData St>); + impl sealed::Sealed for SetRightsName {} + impl State for SetRightsName { + type RightsDescription = St::RightsDescription; + type CreatedAt = St::CreatedAt; + type RightsType = St::RightsType; + type RightsName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rights_name` field - pub struct rights_name(()); ///Marker type for the `rights_description` field pub struct rights_description(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `rights_type` field pub struct rights_type(()); + ///Marker type for the `rights_name` field + pub struct rights_name(()); } } @@ -367,10 +367,10 @@ where impl RightsBuilder where St: rights_state::State, - St::RightsName: rights_state::IsSet, St::RightsDescription: rights_state::IsSet, St::CreatedAt: rights_state::IsSet, St::RightsType: rights_state::IsSet, + St::RightsName: rights_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rights { diff --git a/crates/jacquard-api/src/org_hypercerts/context/acknowledgement.rs b/crates/jacquard-api/src/org_hypercerts/context/acknowledgement.rs index 19d572d8d..b257f3a4e 100644 --- a/crates/jacquard-api/src/org_hypercerts/context/acknowledgement.rs +++ b/crates/jacquard-api/src/org_hypercerts/context/acknowledgement.rs @@ -157,51 +157,51 @@ pub mod acknowledgement_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Acknowledged; type CreatedAt; type Subject; - type Acknowledged; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Acknowledged = Unset; type CreatedAt = Unset; type Subject = Unset; - type Acknowledged = Unset; + } + ///State transition - sets the `acknowledged` field to Set + pub struct SetAcknowledged(PhantomData St>); + impl sealed::Sealed for SetAcknowledged {} + impl State for SetAcknowledged { + type Acknowledged = Set; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Acknowledged = St::Acknowledged; type CreatedAt = Set; type Subject = St::Subject; - type Acknowledged = St::Acknowledged; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; - type Subject = Set; type Acknowledged = St::Acknowledged; - } - ///State transition - sets the `acknowledged` field to Set - pub struct SetAcknowledged(PhantomData St>); - impl sealed::Sealed for SetAcknowledged {} - impl State for SetAcknowledged { type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - type Acknowledged = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `acknowledged` field + pub struct acknowledged(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `acknowledged` field - pub struct acknowledged(()); } } @@ -325,9 +325,9 @@ where impl AcknowledgementBuilder where St: acknowledgement_state::State, + St::Acknowledged: acknowledgement_state::IsSet, St::CreatedAt: acknowledgement_state::IsSet, St::Subject: acknowledgement_state::IsSet, - St::Acknowledged: acknowledgement_state::IsSet, { /// Build the final struct. pub fn build(self) -> Acknowledgement { diff --git a/crates/jacquard-api/src/org_hypercerts/context/evaluation.rs b/crates/jacquard-api/src/org_hypercerts/context/evaluation.rs index a23e54be1..32b7d3915 100644 --- a/crates/jacquard-api/src/org_hypercerts/context/evaluation.rs +++ b/crates/jacquard-api/src/org_hypercerts/context/evaluation.rs @@ -232,51 +232,51 @@ pub mod evaluation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Evaluators; type Summary; type CreatedAt; - type Evaluators; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Evaluators = Unset; type Summary = Unset; type CreatedAt = Unset; - type Evaluators = Unset; + } + ///State transition - sets the `evaluators` field to Set + pub struct SetEvaluators(PhantomData St>); + impl sealed::Sealed for SetEvaluators {} + impl State for SetEvaluators { + type Evaluators = Set; + type Summary = St::Summary; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData St>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { + type Evaluators = St::Evaluators; type Summary = Set; type CreatedAt = St::CreatedAt; - type Evaluators = St::Evaluators; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Summary = St::Summary; - type CreatedAt = Set; type Evaluators = St::Evaluators; - } - ///State transition - sets the `evaluators` field to Set - pub struct SetEvaluators(PhantomData St>); - impl sealed::Sealed for SetEvaluators {} - impl State for SetEvaluators { type Summary = St::Summary; - type CreatedAt = St::CreatedAt; - type Evaluators = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `evaluators` field + pub struct evaluators(()); ///Marker type for the `summary` field pub struct summary(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `evaluators` field - pub struct evaluators(()); } } @@ -445,9 +445,9 @@ where impl EvaluationBuilder where St: evaluation_state::State, + St::Evaluators: evaluation_state::IsSet, St::Summary: evaluation_state::IsSet, St::CreatedAt: evaluation_state::IsSet, - St::Evaluators: evaluation_state::IsSet, { /// Build the final struct. pub fn build(self) -> Evaluation { @@ -669,50 +669,50 @@ pub mod score_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Max; - type Min; type Value; + type Min; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Max = Unset; - type Min = Unset; type Value = Unset; + type Min = Unset; } ///State transition - sets the `max` field to Set pub struct SetMax(PhantomData St>); impl sealed::Sealed for SetMax {} impl State for SetMax { type Max = Set; - type Min = St::Min; - type Value = St::Value; - } - ///State transition - sets the `min` field to Set - pub struct SetMin(PhantomData St>); - impl sealed::Sealed for SetMin {} - impl State for SetMin { - type Max = St::Max; - type Min = Set; type Value = St::Value; + type Min = St::Min; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Max = St::Max; - type Min = St::Min; type Value = Set; + type Min = St::Min; + } + ///State transition - sets the `min` field to Set + pub struct SetMin(PhantomData St>); + impl sealed::Sealed for SetMin {} + impl State for SetMin { + type Max = St::Max; + type Value = St::Value; + type Min = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `max` field pub struct max(()); - ///Marker type for the `min` field - pub struct min(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `min` field + pub struct min(()); } } @@ -802,8 +802,8 @@ impl ScoreBuilder where St: score_state::State, St::Max: score_state::IsSet, - St::Min: score_state::IsSet, St::Value: score_state::IsSet, + St::Min: score_state::IsSet, { /// Build the final struct. pub fn build(self) -> Score { diff --git a/crates/jacquard-api/src/org_hypercerts/context/measurement.rs b/crates/jacquard-api/src/org_hypercerts/context/measurement.rs index be9f5807f..44cd23efc 100644 --- a/crates/jacquard-api/src/org_hypercerts/context/measurement.rs +++ b/crates/jacquard-api/src/org_hypercerts/context/measurement.rs @@ -256,67 +256,67 @@ pub mod measurement_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Metric; type Unit; - type Value; type CreatedAt; + type Metric; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Metric = Unset; type Unit = Unset; - type Value = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `metric` field to Set - pub struct SetMetric(PhantomData St>); - impl sealed::Sealed for SetMetric {} - impl State for SetMetric { - type Metric = Set; - type Unit = St::Unit; - type Value = St::Value; - type CreatedAt = St::CreatedAt; + type Metric = Unset; + type Value = Unset; } ///State transition - sets the `unit` field to Set pub struct SetUnit(PhantomData St>); impl sealed::Sealed for SetUnit {} impl State for SetUnit { - type Metric = St::Metric; type Unit = Set; - type Value = St::Value; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { type Metric = St::Metric; - type Unit = St::Unit; - type Value = Set; - type CreatedAt = St::CreatedAt; + type Value = St::Value; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Unit = St::Unit; + type CreatedAt = Set; type Metric = St::Metric; + type Value = St::Value; + } + ///State transition - sets the `metric` field to Set + pub struct SetMetric(PhantomData St>); + impl sealed::Sealed for SetMetric {} + impl State for SetMetric { type Unit = St::Unit; + type CreatedAt = St::CreatedAt; + type Metric = Set; type Value = St::Value; - type CreatedAt = Set; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Unit = St::Unit; + type CreatedAt = St::CreatedAt; + type Metric = St::Metric; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `metric` field - pub struct metric(()); ///Marker type for the `unit` field pub struct unit(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `metric` field + pub struct metric(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -584,10 +584,10 @@ where impl MeasurementBuilder where St: measurement_state::State, - St::Metric: measurement_state::IsSet, St::Unit: measurement_state::IsSet, - St::Value: measurement_state::IsSet, St::CreatedAt: measurement_state::IsSet, + St::Metric: measurement_state::IsSet, + St::Value: measurement_state::IsSet, { /// Build the final struct. pub fn build(self) -> Measurement { diff --git a/crates/jacquard-api/src/org_hypercerts/funding/receipt.rs b/crates/jacquard-api/src/org_hypercerts/funding/receipt.rs index 29619787e..262d098bb 100644 --- a/crates/jacquard-api/src/org_hypercerts/funding/receipt.rs +++ b/crates/jacquard-api/src/org_hypercerts/funding/receipt.rs @@ -213,9 +213,9 @@ pub mod receipt_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type To; - type Currency; type Amount; type From; + type Currency; type CreatedAt; } /// Empty state - all required fields are unset @@ -223,9 +223,9 @@ pub mod receipt_state { impl sealed::Sealed for Empty {} impl State for Empty { type To = Unset; - type Currency = Unset; type Amount = Unset; type From = Unset; + type Currency = Unset; type CreatedAt = Unset; } ///State transition - sets the `to` field to Set @@ -233,19 +233,9 @@ pub mod receipt_state { impl sealed::Sealed for SetTo {} impl State for SetTo { type To = Set; - type Currency = St::Currency; - type Amount = St::Amount; - type From = St::From; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `currency` field to Set - pub struct SetCurrency(PhantomData St>); - impl sealed::Sealed for SetCurrency {} - impl State for SetCurrency { - type To = St::To; - type Currency = Set; type Amount = St::Amount; type From = St::From; + type Currency = St::Currency; type CreatedAt = St::CreatedAt; } ///State transition - sets the `amount` field to Set @@ -253,9 +243,9 @@ pub mod receipt_state { impl sealed::Sealed for SetAmount {} impl State for SetAmount { type To = St::To; - type Currency = St::Currency; type Amount = Set; type From = St::From; + type Currency = St::Currency; type CreatedAt = St::CreatedAt; } ///State transition - sets the `from` field to Set @@ -263,9 +253,19 @@ pub mod receipt_state { impl sealed::Sealed for SetFrom {} impl State for SetFrom { type To = St::To; - type Currency = St::Currency; type Amount = St::Amount; type From = Set; + type Currency = St::Currency; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `currency` field to Set + pub struct SetCurrency(PhantomData St>); + impl sealed::Sealed for SetCurrency {} + impl State for SetCurrency { + type To = St::To; + type Amount = St::Amount; + type From = St::From; + type Currency = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set @@ -273,9 +273,9 @@ pub mod receipt_state { impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type To = St::To; - type Currency = St::Currency; type Amount = St::Amount; type From = St::From; + type Currency = St::Currency; type CreatedAt = Set; } /// Marker types for field names @@ -283,12 +283,12 @@ pub mod receipt_state { pub mod members { ///Marker type for the `to` field pub struct to(()); - ///Marker type for the `currency` field - pub struct currency(()); ///Marker type for the `amount` field pub struct amount(()); ///Marker type for the `from` field pub struct from(()); + ///Marker type for the `currency` field + pub struct currency(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -508,9 +508,9 @@ impl ReceiptBuilder where St: receipt_state::State, St::To: receipt_state::IsSet, - St::Currency: receipt_state::IsSet, St::Amount: receipt_state::IsSet, St::From: receipt_state::IsSet, + St::Currency: receipt_state::IsSet, St::CreatedAt: receipt_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/org_hypercerts/helper/work_scope_tag.rs b/crates/jacquard-api/src/org_hypercerts/helper/work_scope_tag.rs index dbdb7dc3a..d66b63629 100644 --- a/crates/jacquard-api/src/org_hypercerts/helper/work_scope_tag.rs +++ b/crates/jacquard-api/src/org_hypercerts/helper/work_scope_tag.rs @@ -209,51 +209,51 @@ pub mod work_scope_tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Key; type CreatedAt; type Label; - type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Key = Unset; type CreatedAt = Unset; type Label = Unset; - type Key = Unset; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Key = Set; + type CreatedAt = St::CreatedAt; + type Label = St::Label; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Key = St::Key; type CreatedAt = Set; type Label = St::Label; - type Key = St::Key; } ///State transition - sets the `label` field to Set pub struct SetLabel(PhantomData St>); impl sealed::Sealed for SetLabel {} impl State for SetLabel { - type CreatedAt = St::CreatedAt; - type Label = Set; type Key = St::Key; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { type CreatedAt = St::CreatedAt; - type Label = St::Label; - type Key = Set; + type Label = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `key` field + pub struct key(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `label` field pub struct label(()); - ///Marker type for the `key` field - pub struct key(()); } } @@ -422,9 +422,9 @@ impl WorkScopeTagBuilder { impl WorkScopeTagBuilder where St: work_scope_tag_state::State, + St::Key: work_scope_tag_state::IsSet, St::CreatedAt: work_scope_tag_state::IsSet, St::Label: work_scope_tag_state::IsSet, - St::Key: work_scope_tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> WorkScopeTag { diff --git a/crates/jacquard-api/src/org_hypercerts/workscope/cel.rs b/crates/jacquard-api/src/org_hypercerts/workscope/cel.rs index add9d04ca..8babb0e2a 100644 --- a/crates/jacquard-api/src/org_hypercerts/workscope/cel.rs +++ b/crates/jacquard-api/src/org_hypercerts/workscope/cel.rs @@ -188,67 +188,67 @@ pub mod cel_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UsedTags; + type Version; type Expression; type CreatedAt; - type Version; + type UsedTags; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UsedTags = Unset; + type Version = Unset; type Expression = Unset; type CreatedAt = Unset; - type Version = Unset; + type UsedTags = Unset; } - ///State transition - sets the `used_tags` field to Set - pub struct SetUsedTags(PhantomData St>); - impl sealed::Sealed for SetUsedTags {} - impl State for SetUsedTags { - type UsedTags = Set; + ///State transition - sets the `version` field to Set + pub struct SetVersion(PhantomData St>); + impl sealed::Sealed for SetVersion {} + impl State for SetVersion { + type Version = Set; type Expression = St::Expression; type CreatedAt = St::CreatedAt; - type Version = St::Version; + type UsedTags = St::UsedTags; } ///State transition - sets the `expression` field to Set pub struct SetExpression(PhantomData St>); impl sealed::Sealed for SetExpression {} impl State for SetExpression { - type UsedTags = St::UsedTags; + type Version = St::Version; type Expression = Set; type CreatedAt = St::CreatedAt; - type Version = St::Version; + type UsedTags = St::UsedTags; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type UsedTags = St::UsedTags; + type Version = St::Version; type Expression = St::Expression; type CreatedAt = Set; - type Version = St::Version; - } - ///State transition - sets the `version` field to Set - pub struct SetVersion(PhantomData St>); - impl sealed::Sealed for SetVersion {} - impl State for SetVersion { type UsedTags = St::UsedTags; + } + ///State transition - sets the `used_tags` field to Set + pub struct SetUsedTags(PhantomData St>); + impl sealed::Sealed for SetUsedTags {} + impl State for SetUsedTags { + type Version = St::Version; type Expression = St::Expression; type CreatedAt = St::CreatedAt; - type Version = Set; + type UsedTags = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `used_tags` field - pub struct used_tags(()); + ///Marker type for the `version` field + pub struct version(()); ///Marker type for the `expression` field pub struct expression(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `version` field - pub struct version(()); + ///Marker type for the `used_tags` field + pub struct used_tags(()); } } @@ -361,10 +361,10 @@ where impl CelBuilder where St: cel_state::State, - St::UsedTags: cel_state::IsSet, + St::Version: cel_state::IsSet, St::Expression: cel_state::IsSet, St::CreatedAt: cel_state::IsSet, - St::Version: cel_state::IsSet, + St::UsedTags: cel_state::IsSet, { /// Build the final struct. pub fn build(self) -> Cel { diff --git a/crates/jacquard-api/src/org_hypercerts/workscope/tag.rs b/crates/jacquard-api/src/org_hypercerts/workscope/tag.rs index f5844a027..43c2bd7f3 100644 --- a/crates/jacquard-api/src/org_hypercerts/workscope/tag.rs +++ b/crates/jacquard-api/src/org_hypercerts/workscope/tag.rs @@ -408,51 +408,51 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Key; type Name; type CreatedAt; - type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Key = Unset; type Name = Unset; type CreatedAt = Unset; - type Key = Unset; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Key = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Key = St::Key; type Name = Set; type CreatedAt = St::CreatedAt; - type Key = St::Key; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; - type CreatedAt = Set; type Key = St::Key; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { type Name = St::Name; - type CreatedAt = St::CreatedAt; - type Key = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `key` field + pub struct key(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `key` field - pub struct key(()); } } @@ -657,9 +657,9 @@ impl TagBuilder { impl TagBuilder where St: tag_state::State, + St::Key: tag_state::IsSet, St::Name: tag_state::IsSet, St::CreatedAt: tag_state::IsSet, - St::Key: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/org_impactindexer/link/attestation.rs b/crates/jacquard-api/src/org_impactindexer/link/attestation.rs index 389cec587..ceb963d6e 100644 --- a/crates/jacquard-api/src/org_impactindexer/link/attestation.rs +++ b/crates/jacquard-api/src/org_impactindexer/link/attestation.rs @@ -566,105 +566,105 @@ pub mod attestation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Address; + type Message; + type ChainId; type SignatureType; type Signature; - type ChainId; - type Message; type CreatedAt; + type Address; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Address = Unset; + type Message = Unset; + type ChainId = Unset; type SignatureType = Unset; type Signature = Unset; - type ChainId = Unset; - type Message = Unset; type CreatedAt = Unset; + type Address = Unset; } - ///State transition - sets the `address` field to Set - pub struct SetAddress(PhantomData St>); - impl sealed::Sealed for SetAddress {} - impl State for SetAddress { - type Address = Set; + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type Message = Set; + type ChainId = St::ChainId; type SignatureType = St::SignatureType; type Signature = St::Signature; - type ChainId = St::ChainId; + type CreatedAt = St::CreatedAt; + type Address = St::Address; + } + ///State transition - sets the `chain_id` field to Set + pub struct SetChainId(PhantomData St>); + impl sealed::Sealed for SetChainId {} + impl State for SetChainId { type Message = St::Message; + type ChainId = Set; + type SignatureType = St::SignatureType; + type Signature = St::Signature; type CreatedAt = St::CreatedAt; + type Address = St::Address; } ///State transition - sets the `signature_type` field to Set pub struct SetSignatureType(PhantomData St>); impl sealed::Sealed for SetSignatureType {} impl State for SetSignatureType { - type Address = St::Address; + type Message = St::Message; + type ChainId = St::ChainId; type SignatureType = Set; type Signature = St::Signature; - type ChainId = St::ChainId; - type Message = St::Message; type CreatedAt = St::CreatedAt; + type Address = St::Address; } ///State transition - sets the `signature` field to Set pub struct SetSignature(PhantomData St>); impl sealed::Sealed for SetSignature {} impl State for SetSignature { - type Address = St::Address; - type SignatureType = St::SignatureType; - type Signature = Set; - type ChainId = St::ChainId; type Message = St::Message; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `chain_id` field to Set - pub struct SetChainId(PhantomData St>); - impl sealed::Sealed for SetChainId {} - impl State for SetChainId { - type Address = St::Address; + type ChainId = St::ChainId; type SignatureType = St::SignatureType; - type Signature = St::Signature; - type ChainId = Set; - type Message = St::Message; + type Signature = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { type Address = St::Address; - type SignatureType = St::SignatureType; - type Signature = St::Signature; - type ChainId = St::ChainId; - type Message = Set; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Address = St::Address; + type Message = St::Message; + type ChainId = St::ChainId; type SignatureType = St::SignatureType; type Signature = St::Signature; - type ChainId = St::ChainId; - type Message = St::Message; type CreatedAt = Set; + type Address = St::Address; + } + ///State transition - sets the `address` field to Set + pub struct SetAddress(PhantomData St>); + impl sealed::Sealed for SetAddress {} + impl State for SetAddress { + type Message = St::Message; + type ChainId = St::ChainId; + type SignatureType = St::SignatureType; + type Signature = St::Signature; + type CreatedAt = St::CreatedAt; + type Address = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `address` field - pub struct address(()); + ///Marker type for the `message` field + pub struct message(()); + ///Marker type for the `chain_id` field + pub struct chain_id(()); ///Marker type for the `signature_type` field pub struct signature_type(()); ///Marker type for the `signature` field pub struct signature(()); - ///Marker type for the `chain_id` field - pub struct chain_id(()); - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `address` field + pub struct address(()); } } @@ -817,12 +817,12 @@ where impl AttestationBuilder where St: attestation_state::State, - St::Address: attestation_state::IsSet, + St::Message: attestation_state::IsSet, + St::ChainId: attestation_state::IsSet, St::SignatureType: attestation_state::IsSet, St::Signature: attestation_state::IsSet, - St::ChainId: attestation_state::IsSet, - St::Message: attestation_state::IsSet, St::CreatedAt: attestation_state::IsSet, + St::Address: attestation_state::IsSet, { /// Build the final struct. pub fn build(self) -> Attestation { diff --git a/crates/jacquard-api/src/org_impactindexer/review/comment.rs b/crates/jacquard-api/src/org_impactindexer/review/comment.rs index f6521ddd3..7972b4619 100644 --- a/crates/jacquard-api/src/org_impactindexer/review/comment.rs +++ b/crates/jacquard-api/src/org_impactindexer/review/comment.rs @@ -144,49 +144,49 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; type Subject; + type Text; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Text = Unset; type Subject = Unset; + type Text = Unset; type CreatedAt = Unset; } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type Subject = St::Subject; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Text = St::Text; type Subject = Set; + type Text = St::Text; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type Subject = St::Subject; + type Text = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Text = St::Text; type Subject = St::Subject; + type Text = St::Text; type CreatedAt = 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 `subject` field pub struct subject(()); + ///Marker type for the `text` field + pub struct text(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -290,8 +290,8 @@ where impl CommentBuilder where St: comment_state::State, - St::Text: comment_state::IsSet, St::Subject: comment_state::IsSet, + St::Text: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/org_impactindexer/review/like.rs b/crates/jacquard-api/src/org_impactindexer/review/like.rs index 2ba68f37d..abfee9bc0 100644 --- a/crates/jacquard-api/src/org_impactindexer/review/like.rs +++ b/crates/jacquard-api/src/org_impactindexer/review/like.rs @@ -115,37 +115,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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -215,8 +215,8 @@ where impl LikeBuilder where St: like_state::State, - St::Subject: like_state::IsSet, St::CreatedAt: like_state::IsSet, + St::Subject: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/org_okazu_diary/embed/external.rs b/crates/jacquard-api/src/org_okazu_diary/embed/external.rs index b798cc344..219fa9979 100644 --- a/crates/jacquard-api/src/org_okazu_diary/embed/external.rs +++ b/crates/jacquard-api/src/org_okazu_diary/embed/external.rs @@ -310,37 +310,37 @@ pub mod thumb_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = St::Cid; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; type Cid = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -410,8 +410,8 @@ where impl ThumbBuilder where St: thumb_state::State, - St::Uri: thumb_state::IsSet, St::Cid: thumb_state::IsSet, + St::Uri: thumb_state::IsSet, { /// Build the final struct. pub fn build(self) -> Thumb { diff --git a/crates/jacquard-api/src/org_okazu_diary/feed/collection_item.rs b/crates/jacquard-api/src/org_okazu_diary/feed/collection_item.rs index 58aeedd02..610c7e76a 100644 --- a/crates/jacquard-api/src/org_okazu_diary/feed/collection_item.rs +++ b/crates/jacquard-api/src/org_okazu_diary/feed/collection_item.rs @@ -160,51 +160,51 @@ pub mod collection_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subjects; type Collection; type CreatedAt; + type Subjects; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subjects = Unset; type Collection = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subjects` field to Set - pub struct SetSubjects(PhantomData St>); - impl sealed::Sealed for SetSubjects {} - impl State for SetSubjects { - type Subjects = Set; - type Collection = St::Collection; - type CreatedAt = St::CreatedAt; + type Subjects = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Subjects = St::Subjects; type Collection = Set; type CreatedAt = St::CreatedAt; + type Subjects = St::Subjects; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subjects = St::Subjects; type Collection = St::Collection; type CreatedAt = Set; + type Subjects = St::Subjects; + } + ///State transition - sets the `subjects` field to Set + pub struct SetSubjects(PhantomData St>); + impl sealed::Sealed for SetSubjects {} + impl State for SetSubjects { + type Collection = St::Collection; + type CreatedAt = St::CreatedAt; + type Subjects = 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 `collection` field pub struct collection(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subjects` field + pub struct subjects(()); } } @@ -339,9 +339,9 @@ impl CollectionItemBuilder { impl CollectionItemBuilder where St: collection_item_state::State, - St::Subjects: collection_item_state::IsSet, St::Collection: collection_item_state::IsSet, St::CreatedAt: collection_item_state::IsSet, + St::Subjects: collection_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionItem { diff --git a/crates/jacquard-api/src/org_okazu_diary/material/collection_item.rs b/crates/jacquard-api/src/org_okazu_diary/material/collection_item.rs index fbec8a3be..c25d86a5e 100644 --- a/crates/jacquard-api/src/org_okazu_diary/material/collection_item.rs +++ b/crates/jacquard-api/src/org_okazu_diary/material/collection_item.rs @@ -166,51 +166,51 @@ pub mod collection_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subjects; type Collection; type CreatedAt; - type Subjects; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Subjects = Unset; type Collection = Unset; type CreatedAt = Unset; - type Subjects = Unset; + } + ///State transition - sets the `subjects` field to Set + pub struct SetSubjects(PhantomData St>); + impl sealed::Sealed for SetSubjects {} + impl State for SetSubjects { + type Subjects = Set; + type Collection = St::Collection; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { + type Subjects = St::Subjects; type Collection = Set; type CreatedAt = St::CreatedAt; - type Subjects = St::Subjects; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Collection = St::Collection; - type CreatedAt = Set; type Subjects = St::Subjects; - } - ///State transition - sets the `subjects` field to Set - pub struct SetSubjects(PhantomData St>); - impl sealed::Sealed for SetSubjects {} - impl State for SetSubjects { type Collection = St::Collection; - type CreatedAt = St::CreatedAt; - type Subjects = Set; + type CreatedAt = 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 `collection` field pub struct collection(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `subjects` field - pub struct subjects(()); } } @@ -331,9 +331,9 @@ impl CollectionItemBuilder { impl CollectionItemBuilder where St: collection_item_state::State, + St::Subjects: collection_item_state::IsSet, St::Collection: collection_item_state::IsSet, St::CreatedAt: collection_item_state::IsSet, - St::Subjects: collection_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionItem { diff --git a/crates/jacquard-api/src/org_passingreads/book.rs b/crates/jacquard-api/src/org_passingreads/book.rs index f5a1fc207..035d321f9 100644 --- a/crates/jacquard-api/src/org_passingreads/book.rs +++ b/crates/jacquard-api/src/org_passingreads/book.rs @@ -352,85 +352,85 @@ pub mod confirmed_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Location; - type Actor; - type Uri; type Event; type OccurredAt; + type Uri; + type Actor; + type Location; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Location = Unset; - type Actor = Unset; - type Uri = Unset; type Event = Unset; type OccurredAt = Unset; + type Uri = Unset; + type Actor = Unset; + type Location = Unset; } - ///State transition - sets the `location` field to Set - pub struct SetLocation(PhantomData St>); - impl sealed::Sealed for SetLocation {} - impl State for SetLocation { - type Location = Set; + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData St>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type Event = Set; + type OccurredAt = St::OccurredAt; + type Uri = St::Uri; type Actor = St::Actor; + type Location = St::Location; + } + ///State transition - sets the `occurred_at` field to Set + pub struct SetOccurredAt(PhantomData St>); + impl sealed::Sealed for SetOccurredAt {} + impl State for SetOccurredAt { + type Event = St::Event; + type OccurredAt = Set; type Uri = St::Uri; + type Actor = St::Actor; + type Location = St::Location; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Event = St::Event; type OccurredAt = St::OccurredAt; + type Uri = Set; + type Actor = St::Actor; + type Location = St::Location; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData St>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Location = St::Location; - type Actor = Set; - type Uri = St::Uri; type Event = St::Event; type OccurredAt = St::OccurredAt; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Uri = St::Uri; + type Actor = Set; type Location = St::Location; - type Actor = St::Actor; - type Uri = Set; + } + ///State transition - sets the `location` field to Set + pub struct SetLocation(PhantomData St>); + impl sealed::Sealed for SetLocation {} + impl State for SetLocation { type Event = St::Event; type OccurredAt = St::OccurredAt; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData St>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { - type Location = St::Location; - type Actor = St::Actor; type Uri = St::Uri; - type Event = Set; - type OccurredAt = St::OccurredAt; - } - ///State transition - sets the `occurred_at` field to Set - pub struct SetOccurredAt(PhantomData St>); - impl sealed::Sealed for SetOccurredAt {} - impl State for SetOccurredAt { - type Location = St::Location; type Actor = St::Actor; - type Uri = St::Uri; - type Event = St::Event; - type OccurredAt = Set; + type Location = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `location` field - pub struct location(()); - ///Marker type for the `actor` field - pub struct actor(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `event` field pub struct event(()); ///Marker type for the `occurred_at` field pub struct occurred_at(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `actor` field + pub struct actor(()); + ///Marker type for the `location` field + pub struct location(()); } } @@ -563,11 +563,11 @@ where impl ConfirmedEventBuilder where St: confirmed_event_state::State, - St::Location: confirmed_event_state::IsSet, - St::Actor: confirmed_event_state::IsSet, - St::Uri: confirmed_event_state::IsSet, St::Event: confirmed_event_state::IsSet, St::OccurredAt: confirmed_event_state::IsSet, + St::Uri: confirmed_event_state::IsSet, + St::Actor: confirmed_event_state::IsSet, + St::Location: confirmed_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> ConfirmedEvent { @@ -899,9 +899,9 @@ pub mod registration_view_state { pub trait State: sealed::Sealed { type OccurredAt; type Authors; - type RegisteredBy; - type Title; type BookId; + type Title; + type RegisteredBy; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -909,9 +909,9 @@ pub mod registration_view_state { impl State for Empty { type OccurredAt = Unset; type Authors = Unset; - type RegisteredBy = Unset; - type Title = Unset; type BookId = Unset; + type Title = Unset; + type RegisteredBy = Unset; } ///State transition - sets the `occurred_at` field to Set pub struct SetOccurredAt(PhantomData St>); @@ -919,9 +919,9 @@ pub mod registration_view_state { impl State for SetOccurredAt { type OccurredAt = Set; type Authors = St::Authors; - type RegisteredBy = St::RegisteredBy; - type Title = St::Title; type BookId = St::BookId; + type Title = St::Title; + type RegisteredBy = St::RegisteredBy; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData St>); @@ -929,19 +929,19 @@ pub mod registration_view_state { impl State for SetAuthors { type OccurredAt = St::OccurredAt; type Authors = Set; - type RegisteredBy = St::RegisteredBy; - type Title = St::Title; type BookId = St::BookId; + type Title = St::Title; + type RegisteredBy = St::RegisteredBy; } - ///State transition - sets the `registered_by` field to Set - pub struct SetRegisteredBy(PhantomData St>); - impl sealed::Sealed for SetRegisteredBy {} - impl State for SetRegisteredBy { + ///State transition - sets the `book_id` field to Set + pub struct SetBookId(PhantomData St>); + impl sealed::Sealed for SetBookId {} + impl State for SetBookId { type OccurredAt = St::OccurredAt; type Authors = St::Authors; - type RegisteredBy = Set; + type BookId = Set; type Title = St::Title; - type BookId = St::BookId; + type RegisteredBy = St::RegisteredBy; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); @@ -949,19 +949,19 @@ pub mod registration_view_state { impl State for SetTitle { type OccurredAt = St::OccurredAt; type Authors = St::Authors; - type RegisteredBy = St::RegisteredBy; - type Title = Set; type BookId = St::BookId; + type Title = Set; + type RegisteredBy = St::RegisteredBy; } - ///State transition - sets the `book_id` field to Set - pub struct SetBookId(PhantomData St>); - impl sealed::Sealed for SetBookId {} - impl State for SetBookId { + ///State transition - sets the `registered_by` field to Set + pub struct SetRegisteredBy(PhantomData St>); + impl sealed::Sealed for SetRegisteredBy {} + impl State for SetRegisteredBy { type OccurredAt = St::OccurredAt; type Authors = St::Authors; - type RegisteredBy = St::RegisteredBy; + type BookId = St::BookId; type Title = St::Title; - type BookId = Set; + type RegisteredBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -970,12 +970,12 @@ pub mod registration_view_state { pub struct occurred_at(()); ///Marker type for the `authors` field pub struct authors(()); - ///Marker type for the `registered_by` field - pub struct registered_by(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `book_id` field pub struct book_id(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `registered_by` field + pub struct registered_by(()); } } @@ -1124,9 +1124,9 @@ where St: registration_view_state::State, St::OccurredAt: registration_view_state::IsSet, St::Authors: registration_view_state::IsSet, - St::RegisteredBy: registration_view_state::IsSet, - St::Title: registration_view_state::IsSet, St::BookId: registration_view_state::IsSet, + St::Title: registration_view_state::IsSet, + St::RegisteredBy: registration_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RegistrationView { @@ -1167,85 +1167,85 @@ pub mod stateful_book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type State; - type CurrentHolder; + type Registration; type Uri; type Cid; - type Registration; + type State; + type CurrentHolder; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type State = Unset; - type CurrentHolder = Unset; + type Registration = Unset; type Uri = Unset; type Cid = Unset; - type Registration = Unset; + type State = Unset; + type CurrentHolder = Unset; } - ///State transition - sets the `state` field to Set - pub struct SetState(PhantomData St>); - impl sealed::Sealed for SetState {} - impl State for SetState { - type State = Set; - type CurrentHolder = St::CurrentHolder; + ///State transition - sets the `registration` field to Set + pub struct SetRegistration(PhantomData St>); + impl sealed::Sealed for SetRegistration {} + impl State for SetRegistration { + type Registration = Set; type Uri = St::Uri; type Cid = St::Cid; - type Registration = St::Registration; - } - ///State transition - sets the `current_holder` field to Set - pub struct SetCurrentHolder(PhantomData St>); - impl sealed::Sealed for SetCurrentHolder {} - impl State for SetCurrentHolder { type State = St::State; - type CurrentHolder = Set; - type Uri = St::Uri; - type Cid = St::Cid; - type Registration = St::Registration; + type CurrentHolder = St::CurrentHolder; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type State = St::State; - type CurrentHolder = St::CurrentHolder; + type Registration = St::Registration; type Uri = Set; type Cid = St::Cid; - type Registration = St::Registration; + type State = St::State; + type CurrentHolder = St::CurrentHolder; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type State = St::State; - type CurrentHolder = St::CurrentHolder; + type Registration = St::Registration; type Uri = St::Uri; type Cid = Set; - type Registration = St::Registration; - } - ///State transition - sets the `registration` field to Set - pub struct SetRegistration(PhantomData St>); - impl sealed::Sealed for SetRegistration {} - impl State for SetRegistration { type State = St::State; type CurrentHolder = St::CurrentHolder; + } + ///State transition - sets the `state` field to Set + pub struct SetState(PhantomData St>); + impl sealed::Sealed for SetState {} + impl State for SetState { + type Registration = St::Registration; type Uri = St::Uri; type Cid = St::Cid; - type Registration = Set; + type State = Set; + type CurrentHolder = St::CurrentHolder; + } + ///State transition - sets the `current_holder` field to Set + pub struct SetCurrentHolder(PhantomData St>); + impl sealed::Sealed for SetCurrentHolder {} + impl State for SetCurrentHolder { + type Registration = St::Registration; + type Uri = St::Uri; + type Cid = St::Cid; + type State = St::State; + type CurrentHolder = 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 `current_holder` field - pub struct current_holder(()); + ///Marker type for the `registration` field + pub struct registration(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `registration` field - pub struct registration(()); + ///Marker type for the `state` field + pub struct state(()); + ///Marker type for the `current_holder` field + pub struct current_holder(()); } } @@ -1437,11 +1437,11 @@ where impl StatefulBookBuilder where St: stateful_book_state::State, - St::State: stateful_book_state::IsSet, - St::CurrentHolder: stateful_book_state::IsSet, + St::Registration: stateful_book_state::IsSet, St::Uri: stateful_book_state::IsSet, St::Cid: stateful_book_state::IsSet, - St::Registration: stateful_book_state::IsSet, + St::State: stateful_book_state::IsSet, + St::CurrentHolder: stateful_book_state::IsSet, { /// Build the final struct. pub fn build(self) -> StatefulBook { diff --git a/crates/jacquard-api/src/org_passingreads/book/event.rs b/crates/jacquard-api/src/org_passingreads/book/event.rs index 873a46782..40b34863f 100644 --- a/crates/jacquard-api/src/org_passingreads/book/event.rs +++ b/crates/jacquard-api/src/org_passingreads/book/event.rs @@ -262,103 +262,103 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type Book; - type Location; type BookSig; + type Book; type OccurredAt; + type Did; + type Location; type BookPub; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type Book = Unset; - type Location = Unset; type BookSig = Unset; + type Book = Unset; type OccurredAt = Unset; + type Did = Unset; + type Location = Unset; type BookPub = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `book_sig` field to Set + pub struct SetBookSig(PhantomData St>); + impl sealed::Sealed for SetBookSig {} + impl State for SetBookSig { + type BookSig = Set; type Book = St::Book; - type Location = St::Location; - type BookSig = St::BookSig; type OccurredAt = St::OccurredAt; + type Did = St::Did; + type Location = St::Location; type BookPub = St::BookPub; } ///State transition - sets the `book` field to Set pub struct SetBook(PhantomData St>); impl sealed::Sealed for SetBook {} impl State for SetBook { - type Did = St::Did; - type Book = Set; - type Location = St::Location; - type BookSig = St::BookSig; - type OccurredAt = St::OccurredAt; - type BookPub = St::BookPub; - } - ///State transition - sets the `location` field to Set - pub struct SetLocation(PhantomData St>); - impl sealed::Sealed for SetLocation {} - impl State for SetLocation { - type Did = St::Did; - type Book = St::Book; - type Location = Set; type BookSig = St::BookSig; + type Book = Set; type OccurredAt = St::OccurredAt; - type BookPub = St::BookPub; - } - ///State transition - sets the `book_sig` field to Set - pub struct SetBookSig(PhantomData St>); - impl sealed::Sealed for SetBookSig {} - impl State for SetBookSig { type Did = St::Did; - type Book = St::Book; type Location = St::Location; - type BookSig = Set; - type OccurredAt = St::OccurredAt; type BookPub = St::BookPub; } ///State transition - sets the `occurred_at` field to Set pub struct SetOccurredAt(PhantomData St>); impl sealed::Sealed for SetOccurredAt {} impl State for SetOccurredAt { + type BookSig = St::BookSig; + type Book = St::Book; + type OccurredAt = Set; type Did = St::Did; + type Location = St::Location; + type BookPub = St::BookPub; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type BookSig = St::BookSig; type Book = St::Book; + type OccurredAt = St::OccurredAt; + type Did = Set; type Location = St::Location; + type BookPub = St::BookPub; + } + ///State transition - sets the `location` field to Set + pub struct SetLocation(PhantomData St>); + impl sealed::Sealed for SetLocation {} + impl State for SetLocation { type BookSig = St::BookSig; - type OccurredAt = Set; + type Book = St::Book; + type OccurredAt = St::OccurredAt; + type Did = St::Did; + type Location = Set; type BookPub = St::BookPub; } ///State transition - sets the `book_pub` field to Set pub struct SetBookPub(PhantomData St>); impl sealed::Sealed for SetBookPub {} impl State for SetBookPub { - type Did = St::Did; - type Book = St::Book; - type Location = St::Location; type BookSig = St::BookSig; + type Book = St::Book; type OccurredAt = St::OccurredAt; + type Did = St::Did; + type Location = St::Location; type BookPub = 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 `book` field - pub struct book(()); - ///Marker type for the `location` field - pub struct location(()); ///Marker type for the `book_sig` field pub struct book_sig(()); + ///Marker type for the `book` field + pub struct book(()); ///Marker type for the `occurred_at` field pub struct occurred_at(()); + ///Marker type for the `did` field + pub struct did(()); + ///Marker type for the `location` field + pub struct location(()); ///Marker type for the `book_pub` field pub struct book_pub(()); } @@ -527,11 +527,11 @@ where impl EventBuilder where St: event_state::State, - St::Did: event_state::IsSet, - St::Book: event_state::IsSet, - St::Location: event_state::IsSet, St::BookSig: event_state::IsSet, + St::Book: event_state::IsSet, St::OccurredAt: event_state::IsSet, + St::Did: event_state::IsSet, + St::Location: event_state::IsSet, St::BookPub: event_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/org_passingreads/book/registration.rs b/crates/jacquard-api/src/org_passingreads/book/registration.rs index 507a2e89e..3903402e3 100644 --- a/crates/jacquard-api/src/org_passingreads/book/registration.rs +++ b/crates/jacquard-api/src/org_passingreads/book/registration.rs @@ -199,150 +199,150 @@ pub mod registration_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type BookSig; - type PublicationId; + type Authors; type OccurredAt; type BookId; - type Authors; type Title; + type PublicationId; type BookPub; + type BookSig; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type BookSig = Unset; - type PublicationId = Unset; + type Authors = Unset; type OccurredAt = Unset; type BookId = Unset; - type Authors = Unset; type Title = Unset; + type PublicationId = Unset; type BookPub = Unset; + type BookSig = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type BookSig = St::BookSig; - type PublicationId = St::PublicationId; - type OccurredAt = St::OccurredAt; - type BookId = St::BookId; type Authors = St::Authors; - type Title = St::Title; - type BookPub = St::BookPub; - } - ///State transition - sets the `book_sig` field to Set - pub struct SetBookSig(PhantomData St>); - impl sealed::Sealed for SetBookSig {} - impl State for SetBookSig { - type Did = St::Did; - type BookSig = Set; - type PublicationId = St::PublicationId; type OccurredAt = St::OccurredAt; type BookId = St::BookId; - type Authors = St::Authors; type Title = St::Title; + type PublicationId = St::PublicationId; type BookPub = St::BookPub; + type BookSig = St::BookSig; } - ///State transition - sets the `publication_id` field to Set - pub struct SetPublicationId(PhantomData St>); - impl sealed::Sealed for SetPublicationId {} - impl State for SetPublicationId { + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { type Did = St::Did; - type BookSig = St::BookSig; - type PublicationId = Set; + type Authors = Set; type OccurredAt = St::OccurredAt; type BookId = St::BookId; - type Authors = St::Authors; type Title = St::Title; + type PublicationId = St::PublicationId; type BookPub = St::BookPub; + type BookSig = St::BookSig; } ///State transition - sets the `occurred_at` field to Set pub struct SetOccurredAt(PhantomData St>); impl sealed::Sealed for SetOccurredAt {} impl State for SetOccurredAt { type Did = St::Did; - type BookSig = St::BookSig; - type PublicationId = St::PublicationId; + type Authors = St::Authors; type OccurredAt = Set; type BookId = St::BookId; - type Authors = St::Authors; type Title = St::Title; + type PublicationId = St::PublicationId; type BookPub = St::BookPub; + type BookSig = St::BookSig; } ///State transition - sets the `book_id` field to Set pub struct SetBookId(PhantomData St>); impl sealed::Sealed for SetBookId {} impl State for SetBookId { type Did = St::Did; - type BookSig = St::BookSig; - type PublicationId = St::PublicationId; + type Authors = St::Authors; type OccurredAt = St::OccurredAt; type BookId = Set; - type Authors = St::Authors; type Title = St::Title; - type BookPub = St::BookPub; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Did = St::Did; - type BookSig = St::BookSig; type PublicationId = St::PublicationId; - type OccurredAt = St::OccurredAt; - type BookId = St::BookId; - type Authors = Set; - type Title = St::Title; type BookPub = St::BookPub; + type BookSig = St::BookSig; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Did = St::Did; - type BookSig = St::BookSig; - type PublicationId = St::PublicationId; + type Authors = St::Authors; type OccurredAt = St::OccurredAt; type BookId = St::BookId; - type Authors = St::Authors; type Title = Set; + type PublicationId = St::PublicationId; type BookPub = St::BookPub; + type BookSig = St::BookSig; + } + ///State transition - sets the `publication_id` field to Set + pub struct SetPublicationId(PhantomData St>); + impl sealed::Sealed for SetPublicationId {} + impl State for SetPublicationId { + type Did = St::Did; + type Authors = St::Authors; + type OccurredAt = St::OccurredAt; + type BookId = St::BookId; + type Title = St::Title; + type PublicationId = Set; + type BookPub = St::BookPub; + type BookSig = St::BookSig; } ///State transition - sets the `book_pub` field to Set pub struct SetBookPub(PhantomData St>); impl sealed::Sealed for SetBookPub {} impl State for SetBookPub { type Did = St::Did; - type BookSig = St::BookSig; - type PublicationId = St::PublicationId; + type Authors = St::Authors; type OccurredAt = St::OccurredAt; type BookId = St::BookId; - type Authors = St::Authors; type Title = St::Title; + type PublicationId = St::PublicationId; type BookPub = Set; + type BookSig = St::BookSig; + } + ///State transition - sets the `book_sig` field to Set + pub struct SetBookSig(PhantomData St>); + impl sealed::Sealed for SetBookSig {} + impl State for SetBookSig { + type Did = St::Did; + type Authors = St::Authors; + type OccurredAt = St::OccurredAt; + type BookId = St::BookId; + type Title = St::Title; + type PublicationId = St::PublicationId; + type BookPub = St::BookPub; + type BookSig = 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 `book_sig` field - pub struct book_sig(()); - ///Marker type for the `publication_id` field - pub struct publication_id(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `occurred_at` field pub struct occurred_at(()); ///Marker type for the `book_id` field pub struct book_id(()); - ///Marker type for the `authors` field - pub struct authors(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `publication_id` field + pub struct publication_id(()); ///Marker type for the `book_pub` field pub struct book_pub(()); + ///Marker type for the `book_sig` field + pub struct book_sig(()); } } @@ -564,13 +564,13 @@ impl RegistrationBuilder where St: registration_state::State, St::Did: registration_state::IsSet, - St::BookSig: registration_state::IsSet, - St::PublicationId: registration_state::IsSet, + St::Authors: registration_state::IsSet, St::OccurredAt: registration_state::IsSet, St::BookId: registration_state::IsSet, - St::Authors: registration_state::IsSet, St::Title: registration_state::IsSet, + St::PublicationId: registration_state::IsSet, St::BookPub: registration_state::IsSet, + St::BookSig: registration_state::IsSet, { /// Build the final struct. pub fn build(self) -> Registration { diff --git a/crates/jacquard-api/src/org_simocracy/agents.rs b/crates/jacquard-api/src/org_simocracy/agents.rs index 95623623c..9a1897ef1 100644 --- a/crates/jacquard-api/src/org_simocracy/agents.rs +++ b/crates/jacquard-api/src/org_simocracy/agents.rs @@ -173,51 +173,51 @@ pub mod agents_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Sim; type ShortDescription; + type Sim; + 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 Sim = Unset; type ShortDescription = Unset; + type Sim = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `short_description` field to Set + pub struct SetShortDescription(PhantomData St>); + impl sealed::Sealed for SetShortDescription {} + impl State for SetShortDescription { + type ShortDescription = Set; type Sim = St::Sim; - type ShortDescription = St::ShortDescription; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `sim` field to Set pub struct SetSim(PhantomData St>); impl sealed::Sealed for SetSim {} impl State for SetSim { - type CreatedAt = St::CreatedAt; - type Sim = Set; type ShortDescription = St::ShortDescription; - } - ///State transition - sets the `short_description` field to Set - pub struct SetShortDescription(PhantomData St>); - impl sealed::Sealed for SetShortDescription {} - impl State for SetShortDescription { + type Sim = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type ShortDescription = St::ShortDescription; type Sim = St::Sim; - type ShortDescription = 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 `sim` field - pub struct sim(()); ///Marker type for the `short_description` field pub struct short_description(()); + ///Marker type for the `sim` field + pub struct sim(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -361,9 +361,9 @@ where impl AgentsBuilder where St: agents_state::State, - St::CreatedAt: agents_state::IsSet, - St::Sim: agents_state::IsSet, St::ShortDescription: agents_state::IsSet, + St::Sim: agents_state::IsSet, + St::CreatedAt: agents_state::IsSet, { /// Build the final struct. pub fn build(self) -> Agents { diff --git a/crates/jacquard-api/src/org_simocracy/event.rs b/crates/jacquard-api/src/org_simocracy/event.rs index 0aa1b4a00..fb2c23552 100644 --- a/crates/jacquard-api/src/org_simocracy/event.rs +++ b/crates/jacquard-api/src/org_simocracy/event.rs @@ -189,67 +189,67 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SimNames; type CreatedAt; type Type; type ActorDid; + type SimNames; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SimNames = Unset; type CreatedAt = Unset; type Type = Unset; type ActorDid = Unset; - } - ///State transition - sets the `sim_names` field to Set - pub struct SetSimNames(PhantomData St>); - impl sealed::Sealed for SetSimNames {} - impl State for SetSimNames { - type SimNames = Set; - type CreatedAt = St::CreatedAt; - type Type = St::Type; - type ActorDid = St::ActorDid; + type SimNames = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SimNames = St::SimNames; type CreatedAt = Set; type Type = St::Type; type ActorDid = St::ActorDid; + type SimNames = St::SimNames; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type SimNames = St::SimNames; type CreatedAt = St::CreatedAt; type Type = Set; type ActorDid = St::ActorDid; + type SimNames = St::SimNames; } ///State transition - sets the `actor_did` field to Set pub struct SetActorDid(PhantomData St>); impl sealed::Sealed for SetActorDid {} impl State for SetActorDid { - type SimNames = St::SimNames; type CreatedAt = St::CreatedAt; type Type = St::Type; type ActorDid = Set; + type SimNames = St::SimNames; + } + ///State transition - sets the `sim_names` field to Set + pub struct SetSimNames(PhantomData St>); + impl sealed::Sealed for SetSimNames {} + impl State for SetSimNames { + type CreatedAt = St::CreatedAt; + type Type = St::Type; + type ActorDid = St::ActorDid; + type SimNames = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `sim_names` field - pub struct sim_names(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `type` field pub struct r#type(()); ///Marker type for the `actor_did` field pub struct actor_did(()); + ///Marker type for the `sim_names` field + pub struct sim_names(()); } } @@ -432,10 +432,10 @@ impl EventBuilder { impl EventBuilder where St: event_state::State, - St::SimNames: event_state::IsSet, St::CreatedAt: event_state::IsSet, St::Type: event_state::IsSet, St::ActorDid: event_state::IsSet, + St::SimNames: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { diff --git a/crates/jacquard-api/src/org_simocracy/interview.rs b/crates/jacquard-api/src/org_simocracy/interview.rs index 3878962a6..747223c91 100644 --- a/crates/jacquard-api/src/org_simocracy/interview.rs +++ b/crates/jacquard-api/src/org_simocracy/interview.rs @@ -223,66 +223,66 @@ pub mod interview_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Sim; + type OpenAnswers; type YesNoAnswers; type CreatedAt; - type OpenAnswers; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Sim = Unset; + type OpenAnswers = Unset; type YesNoAnswers = Unset; type CreatedAt = Unset; - type OpenAnswers = Unset; } ///State transition - sets the `sim` field to Set pub struct SetSim(PhantomData St>); impl sealed::Sealed for SetSim {} impl State for SetSim { type Sim = Set; + type OpenAnswers = St::OpenAnswers; + type YesNoAnswers = St::YesNoAnswers; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `open_answers` field to Set + pub struct SetOpenAnswers(PhantomData St>); + impl sealed::Sealed for SetOpenAnswers {} + impl State for SetOpenAnswers { + type Sim = St::Sim; + type OpenAnswers = Set; type YesNoAnswers = St::YesNoAnswers; type CreatedAt = St::CreatedAt; - type OpenAnswers = St::OpenAnswers; } ///State transition - sets the `yes_no_answers` field to Set pub struct SetYesNoAnswers(PhantomData St>); impl sealed::Sealed for SetYesNoAnswers {} impl State for SetYesNoAnswers { type Sim = St::Sim; + type OpenAnswers = St::OpenAnswers; type YesNoAnswers = Set; type CreatedAt = St::CreatedAt; - type OpenAnswers = St::OpenAnswers; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Sim = St::Sim; - type YesNoAnswers = St::YesNoAnswers; - type CreatedAt = Set; type OpenAnswers = St::OpenAnswers; - } - ///State transition - sets the `open_answers` field to Set - pub struct SetOpenAnswers(PhantomData St>); - impl sealed::Sealed for SetOpenAnswers {} - impl State for SetOpenAnswers { - type Sim = St::Sim; type YesNoAnswers = St::YesNoAnswers; - type CreatedAt = St::CreatedAt; - type OpenAnswers = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `sim` field pub struct sim(()); + ///Marker type for the `open_answers` field + pub struct open_answers(()); ///Marker type for the `yes_no_answers` field pub struct yes_no_answers(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `open_answers` field - pub struct open_answers(()); } } @@ -396,9 +396,9 @@ impl InterviewBuilder where St: interview_state::State, St::Sim: interview_state::IsSet, + St::OpenAnswers: interview_state::IsSet, St::YesNoAnswers: interview_state::IsSet, St::CreatedAt: interview_state::IsSet, - St::OpenAnswers: interview_state::IsSet, { /// Build the final struct. pub fn build(self) -> Interview { diff --git a/crates/jacquard-api/src/org_simocracy/sim.rs b/crates/jacquard-api/src/org_simocracy/sim.rs index 89aae6873..99faabc61 100644 --- a/crates/jacquard-api/src/org_simocracy/sim.rs +++ b/crates/jacquard-api/src/org_simocracy/sim.rs @@ -161,49 +161,49 @@ pub mod sim_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Settings; type Name; + type Settings; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Settings = Unset; type Name = Unset; + type Settings = Unset; type CreatedAt = Unset; } - ///State transition - sets the `settings` field to Set - pub struct SetSettings(PhantomData St>); - impl sealed::Sealed for SetSettings {} - impl State for SetSettings { - type Settings = Set; - type Name = St::Name; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Settings = St::Settings; type Name = Set; + type Settings = St::Settings; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `settings` field to Set + pub struct SetSettings(PhantomData St>); + impl sealed::Sealed for SetSettings {} + impl State for SetSettings { + type Name = St::Name; + type Settings = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Settings = St::Settings; type Name = St::Name; + type Settings = St::Settings; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `settings` field - pub struct settings(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `settings` field + pub struct settings(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -309,8 +309,8 @@ where impl SimBuilder where St: sim_state::State, - St::Settings: sim_state::IsSet, St::Name: sim_state::IsSet, + St::Settings: sim_state::IsSet, St::CreatedAt: sim_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/org_simocracy/skill.rs b/crates/jacquard-api/src/org_simocracy/skill.rs index 88d2b768a..4b6d2fe28 100644 --- a/crates/jacquard-api/src/org_simocracy/skill.rs +++ b/crates/jacquard-api/src/org_simocracy/skill.rs @@ -199,50 +199,50 @@ pub mod skill_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Sim; type Name; + type Sim; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Sim = Unset; type Name = Unset; + type Sim = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Sim = St::Sim; - type Name = St::Name; - } - ///State transition - sets the `sim` field to Set - pub struct SetSim(PhantomData St>); - impl sealed::Sealed for SetSim {} - impl State for SetSim { - type CreatedAt = St::CreatedAt; - type Sim = Set; type Name = St::Name; + type Sim = St::Sim; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { type CreatedAt = St::CreatedAt; - type Sim = St::Sim; type Name = Set; + type Sim = St::Sim; + } + ///State transition - sets the `sim` field to Set + pub struct SetSim(PhantomData St>); + impl sealed::Sealed for SetSim {} + impl State for SetSim { + type CreatedAt = St::CreatedAt; + type Name = St::Name; + type Sim = 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 `sim` field - pub struct sim(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `sim` field + pub struct sim(()); } } @@ -412,8 +412,8 @@ impl SkillBuilder where St: skill_state::State, St::CreatedAt: skill_state::IsSet, - St::Sim: skill_state::IsSet, St::Name: skill_state::IsSet, + St::Sim: skill_state::IsSet, { /// Build the final struct. pub fn build(self) -> Skill { diff --git a/crates/jacquard-api/src/org_simocracy/style.rs b/crates/jacquard-api/src/org_simocracy/style.rs index 76b21a611..772455b05 100644 --- a/crates/jacquard-api/src/org_simocracy/style.rs +++ b/crates/jacquard-api/src/org_simocracy/style.rs @@ -143,50 +143,50 @@ pub mod style_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Description; - type CreatedAt; type Sim; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Description = Unset; - type CreatedAt = Unset; type Sim = Unset; + type CreatedAt = Unset; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { type Description = Set; - type CreatedAt = St::CreatedAt; - type Sim = St::Sim; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Description = St::Description; - type CreatedAt = Set; type Sim = St::Sim; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `sim` field to Set pub struct SetSim(PhantomData St>); impl sealed::Sealed for SetSim {} impl State for SetSim { type Description = St::Description; - type CreatedAt = St::CreatedAt; type Sim = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Description = St::Description; + type Sim = St::Sim; + type CreatedAt = 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 `created_at` field - pub struct created_at(()); ///Marker type for the `sim` field pub struct sim(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -292,8 +292,8 @@ impl StyleBuilder where St: style_state::State, St::Description: style_state::IsSet, - St::CreatedAt: style_state::IsSet, St::Sim: style_state::IsSet, + St::CreatedAt: style_state::IsSet, { /// Build the final struct. pub fn build(self) -> Style { diff --git a/crates/jacquard-api/src/org_stormlightlabs/malfestio/deck.rs b/crates/jacquard-api/src/org_stormlightlabs/malfestio/deck.rs index 07eb5cd94..e05bea06f 100644 --- a/crates/jacquard-api/src/org_stormlightlabs/malfestio/deck.rs +++ b/crates/jacquard-api/src/org_stormlightlabs/malfestio/deck.rs @@ -280,37 +280,37 @@ pub mod deck_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type CreatedAt = St::CreatedAt; + type Title = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Title = St::Title; type CreatedAt = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -495,8 +495,8 @@ impl DeckBuilder { impl DeckBuilder where St: deck_state::State, - St::Title: deck_state::IsSet, St::CreatedAt: deck_state::IsSet, + St::Title: deck_state::IsSet, { /// Build the final struct. pub fn build(self) -> Deck { diff --git a/crates/jacquard-api/src/org_stormlightlabs/malfestio/thread/comment.rs b/crates/jacquard-api/src/org_stormlightlabs/malfestio/thread/comment.rs index bcd354efa..dfead849e 100644 --- a/crates/jacquard-api/src/org_stormlightlabs/malfestio/thread/comment.rs +++ b/crates/jacquard-api/src/org_stormlightlabs/malfestio/thread/comment.rs @@ -129,51 +129,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Body; type SubjectRef; - 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 Body = Unset; type SubjectRef = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Body = St::Body; + type SubjectRef = St::SubjectRef; } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData St>); impl sealed::Sealed for SetBody {} impl State for SetBody { + type CreatedAt = St::CreatedAt; type Body = Set; type SubjectRef = St::SubjectRef; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `subject_ref` field to Set pub struct SetSubjectRef(PhantomData St>); impl sealed::Sealed for SetSubjectRef {} impl State for SetSubjectRef { - type Body = St::Body; - type SubjectRef = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Body = St::Body; - type SubjectRef = St::SubjectRef; - type CreatedAt = Set; + type SubjectRef = 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 `body` field pub struct body(()); ///Marker type for the `subject_ref` field pub struct subject_ref(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -275,9 +275,9 @@ where impl CommentBuilder where St: comment_state::State, + St::CreatedAt: comment_state::IsSet, St::Body: comment_state::IsSet, St::SubjectRef: comment_state::IsSet, - St::CreatedAt: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/pink_vase/pod/comment.rs b/crates/jacquard-api/src/pink_vase/pod/comment.rs index b09d41306..caa93d318 100644 --- a/crates/jacquard-api/src/pink_vase/pod/comment.rs +++ b/crates/jacquard-api/src/pink_vase/pod/comment.rs @@ -130,50 +130,50 @@ pub mod comment_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Episode; type Text; + type Episode; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Episode = Unset; type Text = Unset; + type Episode = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Episode = St::Episode; - type Text = St::Text; - } - ///State transition - sets the `episode` field to Set - pub struct SetEpisode(PhantomData St>); - impl sealed::Sealed for SetEpisode {} - impl State for SetEpisode { - type CreatedAt = St::CreatedAt; - type Episode = Set; type Text = St::Text; + type Episode = St::Episode; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { type CreatedAt = St::CreatedAt; - type Episode = St::Episode; type Text = Set; + type Episode = St::Episode; + } + ///State transition - sets the `episode` field to Set + pub struct SetEpisode(PhantomData St>); + impl sealed::Sealed for SetEpisode {} + impl State for SetEpisode { + type CreatedAt = St::CreatedAt; + type Text = St::Text; + type Episode = 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 `episode` field - pub struct episode(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `episode` field + pub struct episode(()); } } @@ -276,8 +276,8 @@ impl CommentBuilder where St: comment_state::State, St::CreatedAt: comment_state::IsSet, - St::Episode: comment_state::IsSet, St::Text: comment_state::IsSet, + St::Episode: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/pink_vase/pod/episode.rs b/crates/jacquard-api/src/pink_vase/pod/episode.rs index 1832e132b..82e54f313 100644 --- a/crates/jacquard-api/src/pink_vase/pod/episode.rs +++ b/crates/jacquard-api/src/pink_vase/pod/episode.rs @@ -281,8 +281,8 @@ pub mod episode_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Title; type Show; + type Title; type AudioUrl; } /// Empty state - all required fields are unset @@ -290,8 +290,8 @@ pub mod episode_state { impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Title = Unset; type Show = Unset; + type Title = Unset; type AudioUrl = Unset; } ///State transition - sets the `created_at` field to Set @@ -299,17 +299,8 @@ pub mod episode_state { impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Title = St::Title; - type Show = St::Show; - type AudioUrl = St::AudioUrl; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type CreatedAt = St::CreatedAt; - type Title = Set; type Show = St::Show; + type Title = St::Title; type AudioUrl = St::AudioUrl; } ///State transition - sets the `show` field to Set @@ -317,8 +308,17 @@ pub mod episode_state { impl sealed::Sealed for SetShow {} impl State for SetShow { type CreatedAt = St::CreatedAt; - type Title = St::Title; type Show = Set; + type Title = St::Title; + type AudioUrl = St::AudioUrl; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + type Show = St::Show; + type Title = Set; type AudioUrl = St::AudioUrl; } ///State transition - sets the `audio_url` field to Set @@ -326,8 +326,8 @@ pub mod episode_state { impl sealed::Sealed for SetAudioUrl {} impl State for SetAudioUrl { type CreatedAt = St::CreatedAt; - type Title = St::Title; type Show = St::Show; + type Title = St::Title; type AudioUrl = Set; } /// Marker types for field names @@ -335,10 +335,10 @@ pub mod episode_state { pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `show` field pub struct show(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `audio_url` field pub struct audio_url(()); } @@ -555,8 +555,8 @@ impl EpisodeBuilder where St: episode_state::State, St::CreatedAt: episode_state::IsSet, - St::Title: episode_state::IsSet, St::Show: episode_state::IsSet, + St::Title: episode_state::IsSet, St::AudioUrl: episode_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/pink_vase/pod/playlist.rs b/crates/jacquard-api/src/pink_vase/pod/playlist.rs index 9956371e9..873ee54df 100644 --- a/crates/jacquard-api/src/pink_vase/pod/playlist.rs +++ b/crates/jacquard-api/src/pink_vase/pod/playlist.rs @@ -232,51 +232,51 @@ pub mod playlist_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Name; type Items; - 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 Items = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Name = St::Name; + type Items = St::Items; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type CreatedAt = St::CreatedAt; type Name = Set; type Items = St::Items; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `items` field to Set pub struct SetItems(PhantomData St>); impl sealed::Sealed for SetItems {} impl State for SetItems { - type Name = St::Name; - type Items = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Name = St::Name; - type Items = St::Items; - type CreatedAt = Set; + type Items = 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 `items` field pub struct items(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -400,9 +400,9 @@ impl PlaylistBuilder { impl PlaylistBuilder where St: playlist_state::State, + St::CreatedAt: playlist_state::IsSet, St::Name: playlist_state::IsSet, St::Items: playlist_state::IsSet, - St::CreatedAt: playlist_state::IsSet, { /// Build the final struct. pub fn build(self) -> Playlist { diff --git a/crates/jacquard-api/src/place_atwork/endorsement.rs b/crates/jacquard-api/src/place_atwork/endorsement.rs index d5205edf7..f925e9e72 100644 --- a/crates/jacquard-api/src/place_atwork/endorsement.rs +++ b/crates/jacquard-api/src/place_atwork/endorsement.rs @@ -147,66 +147,66 @@ pub mod endorsement_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Text; - type Giver; type CreatedAt; type Receiver; + type Giver; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Text = Unset; - type Giver = Unset; type CreatedAt = Unset; type Receiver = Unset; + type Giver = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { type Text = Set; - type Giver = St::Giver; - type CreatedAt = St::CreatedAt; - type Receiver = St::Receiver; - } - ///State transition - sets the `giver` field to Set - pub struct SetGiver(PhantomData St>); - impl sealed::Sealed for SetGiver {} - impl State for SetGiver { - type Text = St::Text; - type Giver = Set; type CreatedAt = St::CreatedAt; type Receiver = St::Receiver; + type Giver = St::Giver; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Text = St::Text; - type Giver = St::Giver; type CreatedAt = Set; type Receiver = St::Receiver; + type Giver = St::Giver; } ///State transition - sets the `receiver` field to Set pub struct SetReceiver(PhantomData St>); impl sealed::Sealed for SetReceiver {} impl State for SetReceiver { type Text = St::Text; - type Giver = St::Giver; type CreatedAt = St::CreatedAt; type Receiver = Set; + type Giver = St::Giver; + } + ///State transition - sets the `giver` field to Set + pub struct SetGiver(PhantomData St>); + impl sealed::Sealed for SetGiver {} + impl State for SetGiver { + type Text = St::Text; + type CreatedAt = St::CreatedAt; + type Receiver = St::Receiver; + type Giver = 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 `giver` field - pub struct giver(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `receiver` field pub struct receiver(()); + ///Marker type for the `giver` field + pub struct giver(()); } } @@ -334,9 +334,9 @@ impl EndorsementBuilder where St: endorsement_state::State, St::Text: endorsement_state::IsSet, - St::Giver: endorsement_state::IsSet, St::CreatedAt: endorsement_state::IsSet, St::Receiver: endorsement_state::IsSet, + St::Giver: endorsement_state::IsSet, { /// Build the final struct. pub fn build(self) -> Endorsement { diff --git a/crates/jacquard-api/src/place_atwork/get_listing.rs b/crates/jacquard-api/src/place_atwork/get_listing.rs index 31f279b27..8e1facc84 100644 --- a/crates/jacquard-api/src/place_atwork/get_listing.rs +++ b/crates/jacquard-api/src/place_atwork/get_listing.rs @@ -138,37 +138,37 @@ pub mod get_listing_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rkey; type Repo; + 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 Repo = Unset; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData St>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Rkey = Set; - type Repo = St::Repo; + type Rkey = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Rkey = St::Rkey; type Repo = Set; + type Rkey = St::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData St>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Repo = St::Repo; + 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 `repo` field pub struct repo(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -238,8 +238,8 @@ where impl GetListingBuilder where St: get_listing_state::State, - St::Rkey: get_listing_state::IsSet, St::Repo: get_listing_state::IsSet, + St::Rkey: get_listing_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetListing { diff --git a/crates/jacquard-api/src/place_atwork/listing.rs b/crates/jacquard-api/src/place_atwork/listing.rs index 3617dd741..c652ce25d 100644 --- a/crates/jacquard-api/src/place_atwork/listing.rs +++ b/crates/jacquard-api/src/place_atwork/listing.rs @@ -208,67 +208,67 @@ pub mod listing_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type NotBefore; + type Title; type NotAfter; type Description; - type Title; - type NotBefore; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type NotBefore = Unset; + type Title = Unset; type NotAfter = Unset; type Description = Unset; - type Title = Unset; - type NotBefore = Unset; + } + ///State transition - sets the `not_before` field to Set + pub struct SetNotBefore(PhantomData St>); + impl sealed::Sealed for SetNotBefore {} + impl State for SetNotBefore { + type NotBefore = Set; + type Title = St::Title; + type NotAfter = St::NotAfter; + type Description = St::Description; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type NotBefore = St::NotBefore; + type Title = Set; + type NotAfter = St::NotAfter; + type Description = St::Description; } ///State transition - sets the `not_after` field to Set pub struct SetNotAfter(PhantomData St>); impl sealed::Sealed for SetNotAfter {} impl State for SetNotAfter { + type NotBefore = St::NotBefore; + type Title = St::Title; type NotAfter = Set; type Description = St::Description; - type Title = St::Title; - type NotBefore = St::NotBefore; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type NotAfter = St::NotAfter; - type Description = Set; - type Title = St::Title; - type NotBefore = St::NotBefore; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type NotAfter = St::NotAfter; - type Description = St::Description; - type Title = Set; type NotBefore = St::NotBefore; - } - ///State transition - sets the `not_before` field to Set - pub struct SetNotBefore(PhantomData St>); - impl sealed::Sealed for SetNotBefore {} - impl State for SetNotBefore { - type NotAfter = St::NotAfter; - type Description = St::Description; type Title = St::Title; - type NotBefore = Set; + type NotAfter = St::NotAfter; + type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `not_before` field + pub struct not_before(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `not_after` field pub struct not_after(()); ///Marker type for the `description` field pub struct description(()); - ///Marker type for the `title` field - pub struct title(()); - ///Marker type for the `not_before` field - pub struct not_before(()); } } @@ -437,10 +437,10 @@ where impl ListingBuilder where St: listing_state::State, + St::NotBefore: listing_state::IsSet, + St::Title: listing_state::IsSet, St::NotAfter: listing_state::IsSet, St::Description: listing_state::IsSet, - St::Title: listing_state::IsSet, - St::NotBefore: listing_state::IsSet, { /// Build the final struct. pub fn build(self) -> Listing { diff --git a/crates/jacquard-api/src/place_stream.rs b/crates/jacquard-api/src/place_stream.rs index c640dc6bd..9e9f2b74e 100644 --- a/crates/jacquard-api/src/place_stream.rs +++ b/crates/jacquard-api/src/place_stream.rs @@ -131,85 +131,85 @@ pub mod block_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Blocker; type IndexedAt; type Cid; - type Uri; + type Blocker; type Record; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Blocker = Unset; type IndexedAt = Unset; type Cid = Unset; - type Uri = Unset; + type Blocker = Unset; type Record = Unset; - } - ///State transition - sets the `blocker` field to Set - pub struct SetBlocker(PhantomData St>); - impl sealed::Sealed for SetBlocker {} - impl State for SetBlocker { - type Blocker = Set; - type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - type Uri = St::Uri; - type Record = St::Record; + type Uri = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Blocker = St::Blocker; type IndexedAt = Set; type Cid = St::Cid; - type Uri = St::Uri; + type Blocker = St::Blocker; type Record = St::Record; + type Uri = St::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Blocker = St::Blocker; type IndexedAt = St::IndexedAt; type Cid = Set; - type Uri = St::Uri; + type Blocker = St::Blocker; type Record = St::Record; + type Uri = St::Uri; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Blocker = St::Blocker; + ///State transition - sets the `blocker` field to Set + pub struct SetBlocker(PhantomData St>); + impl sealed::Sealed for SetBlocker {} + impl State for SetBlocker { type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Uri = Set; + type Blocker = Set; type Record = St::Record; + type Uri = St::Uri; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Blocker = St::Blocker; type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Uri = St::Uri; + type Blocker = St::Blocker; type Record = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type IndexedAt = St::IndexedAt; + type Cid = St::Cid; + type Blocker = St::Blocker; + type Record = St::Record; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `blocker` field - pub struct blocker(()); ///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 `blocker` field + pub struct blocker(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -342,11 +342,11 @@ where impl BlockViewBuilder where St: block_view_state::State, - St::Blocker: block_view_state::IsSet, St::IndexedAt: block_view_state::IsSet, St::Cid: block_view_state::IsSet, - St::Uri: block_view_state::IsSet, + St::Blocker: block_view_state::IsSet, St::Record: block_view_state::IsSet, + St::Uri: block_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> BlockView { diff --git a/crates/jacquard-api/src/place_stream/broadcast.rs b/crates/jacquard-api/src/place_stream/broadcast.rs index ff600fe90..6f5167f65 100644 --- a/crates/jacquard-api/src/place_stream/broadcast.rs +++ b/crates/jacquard-api/src/place_stream/broadcast.rs @@ -67,67 +67,67 @@ pub mod broadcast_origin_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Author; type Uri; type Cid; + type Author; + 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 Author = Unset; type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Author = St::Author; - type Uri = St::Uri; - type Cid = St::Cid; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Record = St::Record; - type Author = Set; - type Uri = St::Uri; - type Cid = St::Cid; + type Author = Unset; + type Record = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = St::Record; - type Author = St::Author; type Uri = Set; type Cid = St::Cid; + type Author = St::Author; + type Record = St::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = St::Record; - type Author = St::Author; type Uri = St::Uri; type Cid = Set; + type Author = St::Author; + type Record = St::Record; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Uri = St::Uri; + type Cid = St::Cid; + type Author = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Uri = St::Uri; + type Cid = St::Cid; + type Author = St::Author; + 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 `author` field - pub struct author(()); ///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 `record` field + pub struct record(()); } } @@ -243,10 +243,10 @@ where impl BroadcastOriginViewBuilder where St: broadcast_origin_view_state::State, - St::Record: broadcast_origin_view_state::IsSet, - St::Author: broadcast_origin_view_state::IsSet, St::Uri: broadcast_origin_view_state::IsSet, St::Cid: broadcast_origin_view_state::IsSet, + St::Author: broadcast_origin_view_state::IsSet, + St::Record: broadcast_origin_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> BroadcastOriginView { diff --git a/crates/jacquard-api/src/place_stream/broadcast/origin.rs b/crates/jacquard-api/src/place_stream/broadcast/origin.rs index 150d7d974..cee7d8edd 100644 --- a/crates/jacquard-api/src/place_stream/broadcast/origin.rs +++ b/crates/jacquard-api/src/place_stream/broadcast/origin.rs @@ -135,49 +135,49 @@ pub mod origin_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Streamer; type Server; + type Streamer; type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Streamer = Unset; type Server = Unset; + type Streamer = Unset; type UpdatedAt = Unset; } - ///State transition - sets the `streamer` field to Set - pub struct SetStreamer(PhantomData St>); - impl sealed::Sealed for SetStreamer {} - impl State for SetStreamer { - type Streamer = Set; - type Server = St::Server; - type UpdatedAt = St::UpdatedAt; - } ///State transition - sets the `server` field to Set pub struct SetServer(PhantomData St>); impl sealed::Sealed for SetServer {} impl State for SetServer { - type Streamer = St::Streamer; type Server = Set; + type Streamer = St::Streamer; + type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `streamer` field to Set + pub struct SetStreamer(PhantomData St>); + impl sealed::Sealed for SetStreamer {} + impl State for SetStreamer { + type Server = St::Server; + type Streamer = Set; type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Streamer = St::Streamer; type Server = St::Server; + type Streamer = St::Streamer; type UpdatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `streamer` field - pub struct streamer(()); ///Marker type for the `server` field pub struct server(()); + ///Marker type for the `streamer` field + pub struct streamer(()); ///Marker type for the `updated_at` field pub struct updated_at(()); } @@ -314,8 +314,8 @@ impl OriginBuilder { impl OriginBuilder where St: origin_state::State, - St::Streamer: origin_state::IsSet, St::Server: origin_state::IsSet, + St::Streamer: origin_state::IsSet, St::UpdatedAt: origin_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/place_stream/chat.rs b/crates/jacquard-api/src/place_stream/chat.rs index 88e751be8..1e067f009 100644 --- a/crates/jacquard-api/src/place_stream/chat.rs +++ b/crates/jacquard-api/src/place_stream/chat.rs @@ -86,85 +86,85 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; - type Uri; type Author; type Cid; + type IndexedAt; type Record; + type Uri; } /// 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 Author = Unset; type Cid = Unset; + type IndexedAt = Unset; type Record = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Uri = St::Uri; - type Author = St::Author; - type Cid = St::Cid; - type Record = St::Record; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type IndexedAt = St::IndexedAt; - type Uri = Set; - type Author = St::Author; - type Cid = St::Cid; - type Record = St::Record; + type Uri = Unset; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; type Author = Set; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Record = St::Record; + type Uri = St::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Author = St::Author; + type Cid = Set; type IndexedAt = St::IndexedAt; + type Record = St::Record; type Uri = St::Uri; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Author = St::Author; - type Cid = Set; + type Cid = St::Cid; + type IndexedAt = Set; type Record = St::Record; + type Uri = St::Uri; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { + type Author = St::Author; + type Cid = St::Cid; type IndexedAt = St::IndexedAt; + type Record = Set; type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Author = St::Author; type Cid = St::Cid; - type Record = Set; + type IndexedAt = St::IndexedAt; + type Record = St::Record; + type Uri = 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 `author` field pub struct author(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -339,11 +339,11 @@ where impl MessageViewBuilder where St: message_view_state::State, - St::IndexedAt: message_view_state::IsSet, - St::Uri: message_view_state::IsSet, St::Author: message_view_state::IsSet, St::Cid: message_view_state::IsSet, + St::IndexedAt: message_view_state::IsSet, St::Record: message_view_state::IsSet, + St::Uri: message_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> MessageView { diff --git a/crates/jacquard-api/src/place_stream/chat/message.rs b/crates/jacquard-api/src/place_stream/chat/message.rs index 9d0258310..742dab5e9 100644 --- a/crates/jacquard-api/src/place_stream/chat/message.rs +++ b/crates/jacquard-api/src/place_stream/chat/message.rs @@ -173,49 +173,49 @@ pub mod message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Streamer; type Text; + type Streamer; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Streamer = Unset; type Text = Unset; + type Streamer = Unset; type CreatedAt = Unset; } - ///State transition - sets the `streamer` field to Set - pub struct SetStreamer(PhantomData St>); - impl sealed::Sealed for SetStreamer {} - impl State for SetStreamer { - type Streamer = Set; - type Text = St::Text; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Streamer = St::Streamer; type Text = Set; + type Streamer = St::Streamer; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `streamer` field to Set + pub struct SetStreamer(PhantomData St>); + impl sealed::Sealed for SetStreamer {} + impl State for SetStreamer { + type Text = St::Text; + type Streamer = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Streamer = St::Streamer; type Text = St::Text; + type Streamer = St::Streamer; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `streamer` field - pub struct streamer(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `streamer` field + pub struct streamer(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -338,8 +338,8 @@ where impl MessageBuilder where St: message_state::State, - St::Streamer: message_state::IsSet, St::Text: message_state::IsSet, + St::Streamer: message_state::IsSet, St::CreatedAt: message_state::IsSet, { /// Build the final struct. @@ -506,37 +506,37 @@ pub mod reply_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Parent; type Root; + type Parent; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Parent = Unset; type Root = Unset; - } - ///State transition - sets the `parent` field to Set - pub struct SetParent(PhantomData St>); - impl sealed::Sealed for SetParent {} - impl State for SetParent { - type Parent = Set; - type Root = St::Root; + type Parent = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData St>); impl sealed::Sealed for SetRoot {} impl State for SetRoot { - type Parent = St::Parent; type Root = Set; + type Parent = St::Parent; + } + ///State transition - sets the `parent` field to Set + pub struct SetParent(PhantomData St>); + impl sealed::Sealed for SetParent {} + impl State for SetParent { + type Root = St::Root; + type Parent = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `parent` field - pub struct parent(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `parent` field + pub struct parent(()); } } @@ -606,8 +606,8 @@ where impl ReplyRefBuilder where St: reply_ref_state::State, - St::Parent: reply_ref_state::IsSet, St::Root: reply_ref_state::IsSet, + St::Parent: reply_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReplyRef { diff --git a/crates/jacquard-api/src/place_stream/chat/profile.rs b/crates/jacquard-api/src/place_stream/chat/profile.rs index 35d5d904d..bc25ba444 100644 --- a/crates/jacquard-api/src/place_stream/chat/profile.rs +++ b/crates/jacquard-api/src/place_stream/chat/profile.rs @@ -200,51 +200,51 @@ pub mod color_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Red; - type Blue; type Green; + type Blue; + type Red; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Red = Unset; - type Blue = Unset; type Green = Unset; + type Blue = Unset; + type Red = Unset; } - ///State transition - sets the `red` field to Set - pub struct SetRed(PhantomData St>); - impl sealed::Sealed for SetRed {} - impl State for SetRed { - type Red = Set; + ///State transition - sets the `green` field to Set + pub struct SetGreen(PhantomData St>); + impl sealed::Sealed for SetGreen {} + impl State for SetGreen { + type Green = Set; type Blue = St::Blue; - type Green = St::Green; + type Red = St::Red; } ///State transition - sets the `blue` field to Set pub struct SetBlue(PhantomData St>); impl sealed::Sealed for SetBlue {} impl State for SetBlue { - type Red = St::Red; - type Blue = Set; type Green = St::Green; - } - ///State transition - sets the `green` field to Set - pub struct SetGreen(PhantomData St>); - impl sealed::Sealed for SetGreen {} - impl State for SetGreen { + type Blue = Set; type Red = St::Red; + } + ///State transition - sets the `red` field to Set + pub struct SetRed(PhantomData St>); + impl sealed::Sealed for SetRed {} + impl State for SetRed { + type Green = St::Green; type Blue = St::Blue; - type Green = Set; + type Red = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `red` field - pub struct red(()); - ///Marker type for the `blue` field - pub struct blue(()); ///Marker type for the `green` field pub struct green(()); + ///Marker type for the `blue` field + pub struct blue(()); + ///Marker type for the `red` field + pub struct red(()); } } @@ -333,9 +333,9 @@ where impl ColorBuilder where St: color_state::State, - St::Red: color_state::IsSet, - St::Blue: color_state::IsSet, St::Green: color_state::IsSet, + St::Blue: color_state::IsSet, + St::Red: color_state::IsSet, { /// Build the final struct. pub fn build(self) -> Color { diff --git a/crates/jacquard-api/src/place_stream/key.rs b/crates/jacquard-api/src/place_stream/key.rs index 6b2136986..99182b9a2 100644 --- a/crates/jacquard-api/src/place_stream/key.rs +++ b/crates/jacquard-api/src/place_stream/key.rs @@ -139,37 +139,37 @@ pub mod key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SigningKey; type CreatedAt; + type SigningKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SigningKey = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `signing_key` field to Set - pub struct SetSigningKey(PhantomData St>); - impl sealed::Sealed for SetSigningKey {} - impl State for SetSigningKey { - type SigningKey = Set; - type CreatedAt = St::CreatedAt; + type SigningKey = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SigningKey = St::SigningKey; type CreatedAt = Set; + type SigningKey = St::SigningKey; + } + ///State transition - sets the `signing_key` field to Set + pub struct SetSigningKey(PhantomData St>); + impl sealed::Sealed for SetSigningKey {} + impl State for SetSigningKey { + type CreatedAt = St::CreatedAt; + type SigningKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signing_key` field - pub struct signing_key(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `signing_key` field + pub struct signing_key(()); } } @@ -252,8 +252,8 @@ where impl KeyBuilder where St: key_state::State, - St::SigningKey: key_state::IsSet, St::CreatedAt: key_state::IsSet, + St::SigningKey: key_state::IsSet, { /// Build the final struct. pub fn build(self) -> Key { diff --git a/crates/jacquard-api/src/place_stream/live/get_recommendations.rs b/crates/jacquard-api/src/place_stream/live/get_recommendations.rs index c3db0cea6..41587a2a1 100644 --- a/crates/jacquard-api/src/place_stream/live/get_recommendations.rs +++ b/crates/jacquard-api/src/place_stream/live/get_recommendations.rs @@ -106,37 +106,37 @@ pub mod livestream_recommendation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Source; + 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 Source = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Source = St::Source; + type Did = Unset; } ///State transition - sets the `source` field to Set pub struct SetSource(PhantomData St>); impl sealed::Sealed for SetSource {} impl State for SetSource { - type Did = St::Did; type Source = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Source = St::Source; + 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 `source` field pub struct source(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -220,8 +220,8 @@ where impl LivestreamRecommendationBuilder where St: livestream_recommendation_state::State, - St::Did: livestream_recommendation_state::IsSet, St::Source: livestream_recommendation_state::IsSet, + St::Did: livestream_recommendation_state::IsSet, { /// Build the final struct. pub fn build(self) -> LivestreamRecommendation { diff --git a/crates/jacquard-api/src/place_stream/live/recommendations.rs b/crates/jacquard-api/src/place_stream/live/recommendations.rs index 6b9a61ad9..a70562d4f 100644 --- a/crates/jacquard-api/src/place_stream/live/recommendations.rs +++ b/crates/jacquard-api/src/place_stream/live/recommendations.rs @@ -136,37 +136,37 @@ pub mod recommendations_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Streamers; type CreatedAt; + type Streamers; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Streamers = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `streamers` field to Set - pub struct SetStreamers(PhantomData St>); - impl sealed::Sealed for SetStreamers {} - impl State for SetStreamers { - type Streamers = Set; - type CreatedAt = St::CreatedAt; + type Streamers = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Streamers = St::Streamers; type CreatedAt = Set; + type Streamers = St::Streamers; + } + ///State transition - sets the `streamers` field to Set + pub struct SetStreamers(PhantomData St>); + impl sealed::Sealed for SetStreamers {} + impl State for SetStreamers { + type CreatedAt = St::CreatedAt; + type Streamers = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `streamers` field - pub struct streamers(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `streamers` field + pub struct streamers(()); } } @@ -236,8 +236,8 @@ where impl RecommendationsBuilder where St: recommendations_state::State, - St::Streamers: recommendations_state::IsSet, St::CreatedAt: recommendations_state::IsSet, + St::Streamers: recommendations_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recommendations { diff --git a/crates/jacquard-api/src/place_stream/livestream.rs b/crates/jacquard-api/src/place_stream/livestream.rs index 5cbacced1..5cd7f5ce0 100644 --- a/crates/jacquard-api/src/place_stream/livestream.rs +++ b/crates/jacquard-api/src/place_stream/livestream.rs @@ -399,85 +399,85 @@ pub mod livestream_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Author; - type Uri; type Cid; type IndexedAt; + type Uri; + type Record; + type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; - type Author = Unset; - type Uri = Unset; type Cid = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Author = St::Author; - type Uri = St::Uri; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Record = St::Record; - type Author = Set; - type Uri = St::Uri; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Record = St::Record; - type Author = St::Author; - type Uri = Set; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; + type Uri = Unset; + type Record = Unset; + type Author = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = St::Record; - type Author = St::Author; - type Uri = St::Uri; type Cid = Set; type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Record = St::Record; + type Author = St::Author; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Cid = St::Cid; + type IndexedAt = Set; + type Uri = St::Uri; type Record = St::Record; type Author = St::Author; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; + type IndexedAt = St::IndexedAt; + type Uri = Set; + type Record = St::Record; + type Author = St::Author; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Cid = St::Cid; + type IndexedAt = St::IndexedAt; type Uri = St::Uri; + type Record = Set; + type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Cid = St::Cid; - type IndexedAt = Set; + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + type Record = St::Record; + type Author = 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 `author` field - pub struct author(()); - ///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 `uri` field + pub struct uri(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -630,11 +630,11 @@ impl LivestreamViewBuilder { impl LivestreamViewBuilder where St: livestream_view_state::State, - St::Record: livestream_view_state::IsSet, - St::Author: livestream_view_state::IsSet, - St::Uri: livestream_view_state::IsSet, St::Cid: livestream_view_state::IsSet, St::IndexedAt: livestream_view_state::IsSet, + St::Uri: livestream_view_state::IsSet, + St::Record: livestream_view_state::IsSet, + St::Author: livestream_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> LivestreamView { @@ -1436,65 +1436,65 @@ pub mod teleport_arrival_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; type StartsAt; type TeleportUri; + type Source; type ViewerCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Source = Unset; type StartsAt = Unset; type TeleportUri = Unset; + type Source = Unset; type ViewerCount = Unset; } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData St>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; - type StartsAt = St::StartsAt; - type TeleportUri = St::TeleportUri; - type ViewerCount = St::ViewerCount; - } ///State transition - sets the `starts_at` field to Set pub struct SetStartsAt(PhantomData St>); impl sealed::Sealed for SetStartsAt {} impl State for SetStartsAt { - type Source = St::Source; type StartsAt = Set; type TeleportUri = St::TeleportUri; + type Source = St::Source; type ViewerCount = St::ViewerCount; } ///State transition - sets the `teleport_uri` field to Set pub struct SetTeleportUri(PhantomData St>); impl sealed::Sealed for SetTeleportUri {} impl State for SetTeleportUri { - type Source = St::Source; type StartsAt = St::StartsAt; type TeleportUri = Set; + type Source = St::Source; + type ViewerCount = St::ViewerCount; + } + ///State transition - sets the `source` field to Set + pub struct SetSource(PhantomData St>); + impl sealed::Sealed for SetSource {} + impl State for SetSource { + type StartsAt = St::StartsAt; + type TeleportUri = St::TeleportUri; + type Source = Set; type ViewerCount = St::ViewerCount; } ///State transition - sets the `viewer_count` field to Set pub struct SetViewerCount(PhantomData St>); impl sealed::Sealed for SetViewerCount {} impl State for SetViewerCount { - type Source = St::Source; type StartsAt = St::StartsAt; type TeleportUri = St::TeleportUri; + type Source = St::Source; type ViewerCount = 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 `starts_at` field pub struct starts_at(()); ///Marker type for the `teleport_uri` field pub struct teleport_uri(()); + ///Marker type for the `source` field + pub struct source(()); ///Marker type for the `viewer_count` field pub struct viewer_count(()); } @@ -1623,9 +1623,9 @@ where impl TeleportArrivalBuilder where St: teleport_arrival_state::State, - St::Source: teleport_arrival_state::IsSet, St::StartsAt: teleport_arrival_state::IsSet, St::TeleportUri: teleport_arrival_state::IsSet, + St::Source: teleport_arrival_state::IsSet, St::ViewerCount: teleport_arrival_state::IsSet, { /// Build the final struct. @@ -1665,37 +1665,37 @@ pub mod teleport_canceled_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; type TeleportUri; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; type TeleportUri = Unset; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type TeleportUri = St::TeleportUri; + type Reason = Unset; } ///State transition - sets the `teleport_uri` field to Set pub struct SetTeleportUri(PhantomData St>); impl sealed::Sealed for SetTeleportUri {} impl State for SetTeleportUri { - type Reason = St::Reason; type TeleportUri = Set; + type Reason = St::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type TeleportUri = St::TeleportUri; + type Reason = 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 `teleport_uri` field pub struct teleport_uri(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -1765,8 +1765,8 @@ where impl TeleportCanceledBuilder where St: teleport_canceled_state::State, - St::Reason: teleport_canceled_state::IsSet, St::TeleportUri: teleport_canceled_state::IsSet, + St::Reason: teleport_canceled_state::IsSet, { /// Build the final struct. pub fn build(self) -> TeleportCanceled { diff --git a/crates/jacquard-api/src/place_stream/moderation.rs b/crates/jacquard-api/src/place_stream/moderation.rs index fafa08fd5..16b9c79b5 100644 --- a/crates/jacquard-api/src/place_stream/moderation.rs +++ b/crates/jacquard-api/src/place_stream/moderation.rs @@ -74,67 +74,67 @@ pub mod permission_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Author; type Uri; + type Author; type Cid; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; - type Author = Unset; type Uri = Unset; + type Author = Unset; type Cid = Unset; + type Record = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Author = St::Author; - type Uri = St::Uri; type Cid = St::Cid; + type Record = St::Record; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Record = St::Record; - type Author = Set; type Uri = St::Uri; + type Author = Set; type Cid = St::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Record = St::Record; - type Author = St::Author; - type Uri = Set; - type Cid = St::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = St::Record; - type Author = St::Author; type Uri = St::Uri; + type Author = St::Author; type Cid = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Uri = St::Uri; + type Author = St::Author; + type Cid = St::Cid; + 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 `author` field - pub struct author(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -247,10 +247,10 @@ where impl PermissionViewBuilder where St: permission_view_state::State, - St::Record: permission_view_state::IsSet, - St::Author: permission_view_state::IsSet, St::Uri: permission_view_state::IsSet, + St::Author: permission_view_state::IsSet, St::Cid: permission_view_state::IsSet, + St::Record: permission_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PermissionView { diff --git a/crates/jacquard-api/src/place_stream/moderation/create_gate.rs b/crates/jacquard-api/src/place_stream/moderation/create_gate.rs index ab8c07c48..4acfe072a 100644 --- a/crates/jacquard-api/src/place_stream/moderation/create_gate.rs +++ b/crates/jacquard-api/src/place_stream/moderation/create_gate.rs @@ -141,37 +141,37 @@ pub mod create_gate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MessageUri; type Streamer; + type MessageUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MessageUri = Unset; type Streamer = Unset; - } - ///State transition - sets the `message_uri` field to Set - pub struct SetMessageUri(PhantomData St>); - impl sealed::Sealed for SetMessageUri {} - impl State for SetMessageUri { - type MessageUri = Set; - type Streamer = St::Streamer; + type MessageUri = Unset; } ///State transition - sets the `streamer` field to Set pub struct SetStreamer(PhantomData St>); impl sealed::Sealed for SetStreamer {} impl State for SetStreamer { - type MessageUri = St::MessageUri; type Streamer = Set; + type MessageUri = St::MessageUri; + } + ///State transition - sets the `message_uri` field to Set + pub struct SetMessageUri(PhantomData St>); + impl sealed::Sealed for SetMessageUri {} + impl State for SetMessageUri { + type Streamer = St::Streamer; + type MessageUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message_uri` field - pub struct message_uri(()); ///Marker type for the `streamer` field pub struct streamer(()); + ///Marker type for the `message_uri` field + pub struct message_uri(()); } } @@ -241,8 +241,8 @@ where impl CreateGateBuilder where St: create_gate_state::State, - St::MessageUri: create_gate_state::IsSet, St::Streamer: create_gate_state::IsSet, + St::MessageUri: create_gate_state::IsSet, { /// Build the final struct. pub fn build(self) -> CreateGate { diff --git a/crates/jacquard-api/src/place_stream/moderation/delete_gate.rs b/crates/jacquard-api/src/place_stream/moderation/delete_gate.rs index 5dc23609a..2f2365882 100644 --- a/crates/jacquard-api/src/place_stream/moderation/delete_gate.rs +++ b/crates/jacquard-api/src/place_stream/moderation/delete_gate.rs @@ -137,37 +137,37 @@ pub mod delete_gate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type GateUri; type Streamer; + type GateUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type GateUri = Unset; type Streamer = Unset; - } - ///State transition - sets the `gate_uri` field to Set - pub struct SetGateUri(PhantomData St>); - impl sealed::Sealed for SetGateUri {} - impl State for SetGateUri { - type GateUri = Set; - type Streamer = St::Streamer; + type GateUri = Unset; } ///State transition - sets the `streamer` field to Set pub struct SetStreamer(PhantomData St>); impl sealed::Sealed for SetStreamer {} impl State for SetStreamer { - type GateUri = St::GateUri; type Streamer = Set; + type GateUri = St::GateUri; + } + ///State transition - sets the `gate_uri` field to Set + pub struct SetGateUri(PhantomData St>); + impl sealed::Sealed for SetGateUri {} + impl State for SetGateUri { + type Streamer = St::Streamer; + type GateUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `gate_uri` field - pub struct gate_uri(()); ///Marker type for the `streamer` field pub struct streamer(()); + ///Marker type for the `gate_uri` field + pub struct gate_uri(()); } } @@ -237,8 +237,8 @@ where impl DeleteGateBuilder where St: delete_gate_state::State, - St::GateUri: delete_gate_state::IsSet, St::Streamer: delete_gate_state::IsSet, + St::GateUri: delete_gate_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeleteGate { diff --git a/crates/jacquard-api/src/place_stream/moderation/permission.rs b/crates/jacquard-api/src/place_stream/moderation/permission.rs index 90ca17e21..25c1dde73 100644 --- a/crates/jacquard-api/src/place_stream/moderation/permission.rs +++ b/crates/jacquard-api/src/place_stream/moderation/permission.rs @@ -119,49 +119,49 @@ pub mod permission_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Moderator; type Permissions; + type Moderator; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Moderator = Unset; type Permissions = Unset; + type Moderator = Unset; type CreatedAt = Unset; } - ///State transition - sets the `moderator` field to Set - pub struct SetModerator(PhantomData St>); - impl sealed::Sealed for SetModerator {} - impl State for SetModerator { - type Moderator = Set; - type Permissions = St::Permissions; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `permissions` field to Set pub struct SetPermissions(PhantomData St>); impl sealed::Sealed for SetPermissions {} impl State for SetPermissions { - type Moderator = St::Moderator; type Permissions = Set; + type Moderator = St::Moderator; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `moderator` field to Set + pub struct SetModerator(PhantomData St>); + impl sealed::Sealed for SetModerator {} + impl State for SetModerator { + type Permissions = St::Permissions; + type Moderator = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Moderator = St::Moderator; type Permissions = St::Permissions; + type Moderator = St::Moderator; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `moderator` field - pub struct moderator(()); ///Marker type for the `permissions` field pub struct permissions(()); + ///Marker type for the `moderator` field + pub struct moderator(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -265,8 +265,8 @@ where impl PermissionBuilder where St: permission_state::State, - St::Moderator: permission_state::IsSet, St::Permissions: permission_state::IsSet, + St::Moderator: permission_state::IsSet, St::CreatedAt: permission_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/place_stream/multistream.rs b/crates/jacquard-api/src/place_stream/multistream.rs index e5d3f1a0d..3a25d541d 100644 --- a/crates/jacquard-api/src/place_stream/multistream.rs +++ b/crates/jacquard-api/src/place_stream/multistream.rs @@ -96,51 +96,51 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Message; type Status; + 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 Message = Unset; type Status = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Message = St::Message; - type Status = St::Status; + type CreatedAt = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type CreatedAt = St::CreatedAt; type Message = Set; type Status = St::Status; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CreatedAt = St::CreatedAt; type Message = St::Message; type Status = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Message = St::Message; + type Status = St::Status; + 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 `message` field pub struct message(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -229,9 +229,9 @@ where impl EventBuilder where St: event_state::State, - St::CreatedAt: event_state::IsSet, St::Message: event_state::IsSet, St::Status: event_state::IsSet, + St::CreatedAt: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { @@ -358,51 +358,51 @@ pub mod target_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Record; type Cid; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type Record = Unset; type Cid = Unset; - type Uri = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type Record = St::Record; + type Cid = St::Cid; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { + type Uri = St::Uri; type Record = Set; type Cid = St::Cid; - type Uri = St::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = St::Record; - type Cid = Set; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Record = St::Record; - type Cid = St::Cid; - 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 `record` field pub struct record(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -512,9 +512,9 @@ where impl TargetViewBuilder where St: target_view_state::State, + St::Uri: target_view_state::IsSet, St::Record: target_view_state::IsSet, St::Cid: target_view_state::IsSet, - St::Uri: target_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TargetView { diff --git a/crates/jacquard-api/src/place_stream/multistream/list_targets.rs b/crates/jacquard-api/src/place_stream/multistream/list_targets.rs index 22d955542..45d3d539d 100644 --- a/crates/jacquard-api/src/place_stream/multistream/list_targets.rs +++ b/crates/jacquard-api/src/place_stream/multistream/list_targets.rs @@ -196,50 +196,50 @@ pub mod record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; - type Value; type Uri; + 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 Value = Unset; type Uri = Unset; + type Value = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; - type Value = St::Value; - type Uri = St::Uri; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Cid = St::Cid; - type Value = Set; type Uri = St::Uri; + type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = St::Cid; - type Value = St::Value; type Uri = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Cid = St::Cid; + type Uri = St::Uri; + 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 `value` field - pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -329,8 +329,8 @@ impl RecordBuilder where St: record_state::State, St::Cid: record_state::IsSet, - St::Value: record_state::IsSet, St::Uri: record_state::IsSet, + St::Value: record_state::IsSet, { /// Build the final struct. pub fn build(self) -> Record { diff --git a/crates/jacquard-api/src/place_stream/playback/whep.rs b/crates/jacquard-api/src/place_stream/playback/whep.rs index 9446d7386..2eb7031ff 100644 --- a/crates/jacquard-api/src/place_stream/playback/whep.rs +++ b/crates/jacquard-api/src/place_stream/playback/whep.rs @@ -157,37 +157,37 @@ pub mod whep_params_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rendition; type Streamer; + type Rendition; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rendition = Unset; type Streamer = Unset; - } - ///State transition - sets the `rendition` field to Set - pub struct SetRendition(PhantomData St>); - impl sealed::Sealed for SetRendition {} - impl State for SetRendition { - type Rendition = Set; - type Streamer = St::Streamer; + type Rendition = Unset; } ///State transition - sets the `streamer` field to Set pub struct SetStreamer(PhantomData St>); impl sealed::Sealed for SetStreamer {} impl State for SetStreamer { - type Rendition = St::Rendition; type Streamer = Set; + type Rendition = St::Rendition; + } + ///State transition - sets the `rendition` field to Set + pub struct SetRendition(PhantomData St>); + impl sealed::Sealed for SetRendition {} + impl State for SetRendition { + type Streamer = St::Streamer; + type Rendition = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rendition` field - pub struct rendition(()); ///Marker type for the `streamer` field pub struct streamer(()); + ///Marker type for the `rendition` field + pub struct rendition(()); } } @@ -257,8 +257,8 @@ where impl WhepParamsBuilder where St: whep_params_state::State, - St::Rendition: whep_params_state::IsSet, St::Streamer: whep_params_state::IsSet, + St::Rendition: whep_params_state::IsSet, { /// Build the final struct. pub fn build(self) -> WhepParams { diff --git a/crates/jacquard-api/src/place_stream/segment.rs b/crates/jacquard-api/src/place_stream/segment.rs index b7279466d..63cab9dfc 100644 --- a/crates/jacquard-api/src/place_stream/segment.rs +++ b/crates/jacquard-api/src/place_stream/segment.rs @@ -816,67 +816,67 @@ pub mod segment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SigningKey; type Creator; - type Id; type StartTime; + type Id; + type SigningKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SigningKey = Unset; type Creator = Unset; - type Id = Unset; type StartTime = Unset; - } - ///State transition - sets the `signing_key` field to Set - pub struct SetSigningKey(PhantomData St>); - impl sealed::Sealed for SetSigningKey {} - impl State for SetSigningKey { - type SigningKey = Set; - type Creator = St::Creator; - type Id = St::Id; - type StartTime = St::StartTime; + type Id = Unset; + type SigningKey = Unset; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData St>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type SigningKey = St::SigningKey; type Creator = Set; - type Id = St::Id; type StartTime = St::StartTime; + type Id = St::Id; + type SigningKey = St::SigningKey; + } + ///State transition - sets the `start_time` field to Set + pub struct SetStartTime(PhantomData St>); + impl sealed::Sealed for SetStartTime {} + impl State for SetStartTime { + type Creator = St::Creator; + type StartTime = Set; + type Id = St::Id; + type SigningKey = St::SigningKey; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type SigningKey = St::SigningKey; type Creator = St::Creator; - type Id = Set; type StartTime = St::StartTime; - } - ///State transition - sets the `start_time` field to Set - pub struct SetStartTime(PhantomData St>); - impl sealed::Sealed for SetStartTime {} - impl State for SetStartTime { + type Id = Set; type SigningKey = St::SigningKey; + } + ///State transition - sets the `signing_key` field to Set + pub struct SetSigningKey(PhantomData St>); + impl sealed::Sealed for SetSigningKey {} + impl State for SetSigningKey { type Creator = St::Creator; + type StartTime = St::StartTime; type Id = St::Id; - type StartTime = Set; + type SigningKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signing_key` field - pub struct signing_key(()); ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `start_time` field pub struct start_time(()); + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `signing_key` field + pub struct signing_key(()); } } @@ -1096,10 +1096,10 @@ impl SegmentBuilder { impl SegmentBuilder where St: segment_state::State, - St::SigningKey: segment_state::IsSet, St::Creator: segment_state::IsSet, - St::Id: segment_state::IsSet, St::StartTime: segment_state::IsSet, + St::Id: segment_state::IsSet, + St::SigningKey: segment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Segment { @@ -1147,37 +1147,37 @@ pub mod segment_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Cid; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Cid = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Cid = St::Cid; + type Record = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Record = St::Record; type Cid = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Cid = St::Cid; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -1247,8 +1247,8 @@ where impl SegmentViewBuilder where St: segment_view_state::State, - St::Record: segment_view_state::IsSet, St::Cid: segment_view_state::IsSet, + St::Record: segment_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SegmentView { @@ -1281,51 +1281,51 @@ pub mod video_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Codec; type Width; type Height; + type Codec; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Codec = Unset; type Width = Unset; type Height = Unset; - } - ///State transition - sets the `codec` field to Set - pub struct SetCodec(PhantomData St>); - impl sealed::Sealed for SetCodec {} - impl State for SetCodec { - type Codec = Set; - type Width = St::Width; - type Height = St::Height; + type Codec = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData St>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Codec = St::Codec; type Width = Set; type Height = St::Height; + type Codec = St::Codec; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Codec = St::Codec; type Width = St::Width; type Height = Set; + type Codec = St::Codec; + } + ///State transition - sets the `codec` field to Set + pub struct SetCodec(PhantomData St>); + impl sealed::Sealed for SetCodec {} + impl State for SetCodec { + type Width = St::Width; + type Height = St::Height; + type Codec = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `codec` field - pub struct codec(()); ///Marker type for the `width` field pub struct width(()); ///Marker type for the `height` field pub struct height(()); + ///Marker type for the `codec` field + pub struct codec(()); } } @@ -1446,9 +1446,9 @@ where impl VideoBuilder where St: video_state::State, - St::Codec: video_state::IsSet, St::Width: video_state::IsSet, St::Height: video_state::IsSet, + St::Codec: video_state::IsSet, { /// Build the final struct. pub fn build(self) -> Video { diff --git a/crates/jacquard-api/src/place_stream/server.rs b/crates/jacquard-api/src/place_stream/server.rs index e10207e51..35efa552f 100644 --- a/crates/jacquard-api/src/place_stream/server.rs +++ b/crates/jacquard-api/src/place_stream/server.rs @@ -428,85 +428,85 @@ pub mod webhook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Id; + type Active; type Url; - type Events; type CreatedAt; - type Active; - type Id; + type Events; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Id = Unset; + type Active = Unset; type Url = Unset; - type Events = Unset; type CreatedAt = Unset; - type Active = Unset; - type Id = Unset; + type Events = Unset; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; + type Active = St::Active; + type Url = St::Url; + type CreatedAt = St::CreatedAt; + type Events = St::Events; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData St>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Id = St::Id; + type Active = Set; + type Url = St::Url; + type CreatedAt = St::CreatedAt; + type Events = St::Events; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Url = Set; - type Events = St::Events; - type CreatedAt = St::CreatedAt; - type Active = St::Active; type Id = St::Id; - } - ///State transition - sets the `events` field to Set - pub struct SetEvents(PhantomData St>); - impl sealed::Sealed for SetEvents {} - impl State for SetEvents { - type Url = St::Url; - type Events = Set; - type CreatedAt = St::CreatedAt; type Active = St::Active; - type Id = St::Id; + type Url = Set; + type CreatedAt = St::CreatedAt; + type Events = St::Events; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Url = St::Url; - type Events = St::Events; - type CreatedAt = Set; - type Active = St::Active; type Id = St::Id; - } - ///State transition - sets the `active` field to Set - pub struct SetActive(PhantomData St>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { + type Active = St::Active; type Url = St::Url; + type CreatedAt = Set; type Events = St::Events; - type CreatedAt = St::CreatedAt; - type Active = Set; - type Id = St::Id; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { + ///State transition - sets the `events` field to Set + pub struct SetEvents(PhantomData St>); + impl sealed::Sealed for SetEvents {} + impl State for SetEvents { + type Id = St::Id; + type Active = St::Active; type Url = St::Url; - type Events = St::Events; type CreatedAt = St::CreatedAt; - type Active = St::Active; - type Id = Set; + type Events = 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 `active` field + pub struct active(()); ///Marker type for the `url` field pub struct url(()); - ///Marker type for the `events` field - pub struct events(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `active` field - pub struct active(()); - ///Marker type for the `id` field - pub struct id(()); + ///Marker type for the `events` field + pub struct events(()); } } @@ -783,11 +783,11 @@ where impl WebhookBuilder where St: webhook_state::State, + St::Id: webhook_state::IsSet, + St::Active: webhook_state::IsSet, St::Url: webhook_state::IsSet, - St::Events: webhook_state::IsSet, St::CreatedAt: webhook_state::IsSet, - St::Active: webhook_state::IsSet, - St::Id: webhook_state::IsSet, + St::Events: webhook_state::IsSet, { /// Build the final struct. pub fn build(self) -> Webhook { diff --git a/crates/jacquard-api/src/place_stream/server/create_webhook.rs b/crates/jacquard-api/src/place_stream/server/create_webhook.rs index 50cc2c336..b7bd6ffd3 100644 --- a/crates/jacquard-api/src/place_stream/server/create_webhook.rs +++ b/crates/jacquard-api/src/place_stream/server/create_webhook.rs @@ -166,37 +166,37 @@ pub mod create_webhook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Events; type Url; + type Events; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Events = Unset; type Url = Unset; - } - ///State transition - sets the `events` field to Set - pub struct SetEvents(PhantomData St>); - impl sealed::Sealed for SetEvents {} - impl State for SetEvents { - type Events = Set; - type Url = St::Url; + type Events = Unset; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Events = St::Events; type Url = Set; + type Events = St::Events; + } + ///State transition - sets the `events` field to Set + pub struct SetEvents(PhantomData St>); + impl sealed::Sealed for SetEvents {} + impl State for SetEvents { + type Url = St::Url; + type Events = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `events` field - pub struct events(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `events` field + pub struct events(()); } } @@ -367,8 +367,8 @@ where impl CreateWebhookBuilder where St: create_webhook_state::State, - St::Events: create_webhook_state::IsSet, St::Url: create_webhook_state::IsSet, + St::Events: create_webhook_state::IsSet, { /// Build the final struct. pub fn build(self) -> CreateWebhook { diff --git a/crates/jacquard-api/src/place_wisp/fs.rs b/crates/jacquard-api/src/place_wisp/fs.rs index 9f1dc1d4c..7e4ff68ec 100644 --- a/crates/jacquard-api/src/place_wisp/fs.rs +++ b/crates/jacquard-api/src/place_wisp/fs.rs @@ -977,51 +977,51 @@ pub mod fs_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Root; - type Site; type CreatedAt; + type Site; + 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 Site = Unset; type CreatedAt = Unset; + type Site = Unset; + type Root = Unset; } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData St>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Site = St::Site; - type CreatedAt = St::CreatedAt; + type Root = St::Root; } ///State transition - sets the `site` field to Set pub struct SetSite(PhantomData St>); impl sealed::Sealed for SetSite {} impl State for SetSite { - type Root = St::Root; - type Site = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Site = Set; type Root = St::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData St>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type CreatedAt = St::CreatedAt; type Site = St::Site; - type CreatedAt = Set; + 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 `site` field - pub struct site(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `site` field + pub struct site(()); + ///Marker type for the `root` field + pub struct root(()); } } @@ -1120,9 +1120,9 @@ where impl FsBuilder where St: fs_state::State, - St::Root: fs_state::IsSet, - St::Site: fs_state::IsSet, St::CreatedAt: fs_state::IsSet, + St::Site: fs_state::IsSet, + St::Root: fs_state::IsSet, { /// Build the final struct. pub fn build(self) -> Fs { diff --git a/crates/jacquard-api/src/pub_leaflet/comment.rs b/crates/jacquard-api/src/pub_leaflet/comment.rs index 45b20f528..e38857026 100644 --- a/crates/jacquard-api/src/pub_leaflet/comment.rs +++ b/crates/jacquard-api/src/pub_leaflet/comment.rs @@ -450,49 +450,49 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; 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 Subject = Unset; type Plaintext = Unset; + type Subject = Unset; type CreatedAt = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Plaintext = St::Plaintext; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `plaintext` field to Set pub struct SetPlaintext(PhantomData St>); impl sealed::Sealed for SetPlaintext {} impl State for SetPlaintext { - type Subject = St::Subject; type Plaintext = Set; + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Plaintext = St::Plaintext; + type Subject = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type Plaintext = St::Plaintext; + type Subject = St::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 `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(()); } @@ -649,8 +649,8 @@ where impl CommentBuilder where St: comment_state::State, - St::Subject: comment_state::IsSet, St::Plaintext: comment_state::IsSet, + St::Subject: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/pub_leaflet/interactions/recommend.rs b/crates/jacquard-api/src/pub_leaflet/interactions/recommend.rs index 3a7f6107d..d154e2db8 100644 --- a/crates/jacquard-api/src/pub_leaflet/interactions/recommend.rs +++ b/crates/jacquard-api/src/pub_leaflet/interactions/recommend.rs @@ -112,37 +112,37 @@ pub mod recommend_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -212,8 +212,8 @@ where impl RecommendBuilder where St: recommend_state::State, - St::Subject: recommend_state::IsSet, St::CreatedAt: recommend_state::IsSet, + St::Subject: recommend_state::IsSet, { /// Build the final struct. pub fn build(self) -> Recommend { diff --git a/crates/jacquard-api/src/pub_leaflet/pages/canvas.rs b/crates/jacquard-api/src/pub_leaflet/pages/canvas.rs index b812a7070..6b95ea29d 100644 --- a/crates/jacquard-api/src/pub_leaflet/pages/canvas.rs +++ b/crates/jacquard-api/src/pub_leaflet/pages/canvas.rs @@ -221,65 +221,65 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Width; type Y; type Block; - type Width; type X; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Width = Unset; type Y = Unset; type Block = Unset; - type Width = Unset; type X = Unset; } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Width = Set; + type Y = St::Y; + type Block = St::Block; + type X = St::X; + } ///State transition - sets the `y` field to Set pub struct SetY(PhantomData St>); impl sealed::Sealed for SetY {} impl State for SetY { + type Width = St::Width; type Y = Set; type Block = St::Block; - type Width = St::Width; type X = St::X; } ///State transition - sets the `block` field to Set pub struct SetBlock(PhantomData St>); impl sealed::Sealed for SetBlock {} impl State for SetBlock { - type Y = St::Y; - type Block = Set; type Width = St::Width; - type X = St::X; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { type Y = St::Y; - type Block = St::Block; - type Width = Set; + type Block = Set; type X = St::X; } ///State transition - sets the `x` field to Set pub struct SetX(PhantomData St>); impl sealed::Sealed for SetX {} impl State for SetX { + type Width = St::Width; type Y = St::Y; type Block = St::Block; - type Width = St::Width; type X = 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 `y` field pub struct y(()); ///Marker type for the `block` field pub struct block(()); - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `x` field pub struct x(()); } @@ -416,9 +416,9 @@ where impl BlockBuilder where St: block_state::State, + St::Width: block_state::IsSet, St::Y: block_state::IsSet, St::Block: block_state::IsSet, - St::Width: block_state::IsSet, St::X: block_state::IsSet, { /// Build the final struct. @@ -881,37 +881,37 @@ pub mod quote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Start; type End; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Start = Unset; type End = Unset; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData St>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Start = Set; - type End = St::End; + type Start = Unset; } ///State transition - sets the `end` field to Set pub struct SetEnd(PhantomData St>); impl sealed::Sealed for SetEnd {} impl State for SetEnd { - type Start = St::Start; type End = Set; + type Start = St::Start; + } + ///State transition - sets the `start` field to Set + pub struct SetStart(PhantomData St>); + impl sealed::Sealed for SetStart {} + impl State for SetStart { + type End = St::End; + type Start = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `end` field pub struct end(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -981,8 +981,8 @@ where impl QuoteBuilder where St: quote_state::State, - St::Start: quote_state::IsSet, St::End: quote_state::IsSet, + St::Start: quote_state::IsSet, { /// Build the final struct. pub fn build(self) -> Quote { diff --git a/crates/jacquard-api/src/pub_leaflet/pages/linear_document.rs b/crates/jacquard-api/src/pub_leaflet/pages/linear_document.rs index a3f42bd67..6dc3ba931 100644 --- a/crates/jacquard-api/src/pub_leaflet/pages/linear_document.rs +++ b/crates/jacquard-api/src/pub_leaflet/pages/linear_document.rs @@ -822,37 +822,37 @@ pub mod quote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Start; type End; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Start = Unset; type End = Unset; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData St>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Start = Set; - type End = St::End; + type Start = Unset; } ///State transition - sets the `end` field to Set pub struct SetEnd(PhantomData St>); impl sealed::Sealed for SetEnd {} impl State for SetEnd { - type Start = St::Start; type End = Set; + type Start = St::Start; + } + ///State transition - sets the `start` field to Set + pub struct SetStart(PhantomData St>); + impl sealed::Sealed for SetStart {} + impl State for SetStart { + type End = St::End; + type Start = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `end` field pub struct end(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -925,8 +925,8 @@ where impl QuoteBuilder where St: quote_state::State, - St::Start: quote_state::IsSet, St::End: quote_state::IsSet, + St::Start: quote_state::IsSet, { /// Build the final struct. pub fn build(self) -> Quote { diff --git a/crates/jacquard-api/src/pub_leaflet/poll/definition.rs b/crates/jacquard-api/src/pub_leaflet/poll/definition.rs index 59794f322..f5b46f9b0 100644 --- a/crates/jacquard-api/src/pub_leaflet/poll/definition.rs +++ b/crates/jacquard-api/src/pub_leaflet/poll/definition.rs @@ -186,37 +186,37 @@ pub mod definition_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Options; + 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 Options = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Options = St::Options; + type Name = Unset; } ///State transition - sets the `options` field to Set pub struct SetOptions(PhantomData St>); impl sealed::Sealed for SetOptions {} impl State for SetOptions { - type Name = St::Name; type Options = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Options = St::Options; + 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 `options` field pub struct options(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -299,8 +299,8 @@ where impl DefinitionBuilder where St: definition_state::State, - St::Name: definition_state::IsSet, St::Options: definition_state::IsSet, + St::Name: definition_state::IsSet, { /// Build the final struct. pub fn build(self) -> Definition { diff --git a/crates/jacquard-api/src/pub_leaflet/richtext/facet.rs b/crates/jacquard-api/src/pub_leaflet/richtext/facet.rs index 481aa19a8..8a925f888 100644 --- a/crates/jacquard-api/src/pub_leaflet/richtext/facet.rs +++ b/crates/jacquard-api/src/pub_leaflet/richtext/facet.rs @@ -822,37 +822,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 St>); - impl sealed::Sealed for SetByteStart {} - impl State for SetByteStart { - type ByteStart = Set; - type ByteEnd = St::ByteEnd; + type ByteStart = Unset; } ///State transition - sets the `byte_end` field to Set pub struct SetByteEnd(PhantomData St>); impl sealed::Sealed for SetByteEnd {} impl State for SetByteEnd { - type ByteStart = St::ByteStart; type ByteEnd = Set; + type ByteStart = St::ByteStart; + } + ///State transition - sets the `byte_start` field to Set + pub struct SetByteStart(PhantomData St>); + impl sealed::Sealed for SetByteStart {} + impl State for SetByteStart { + type ByteEnd = St::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(()); } } @@ -922,8 +922,8 @@ where impl ByteSliceBuilder where St: byte_slice_state::State, - St::ByteStart: byte_slice_state::IsSet, St::ByteEnd: byte_slice_state::IsSet, + St::ByteStart: byte_slice_state::IsSet, { /// Build the final struct. pub fn build(self) -> ByteSlice { diff --git a/crates/jacquard-api/src/pub_leaflet/theme/color.rs b/crates/jacquard-api/src/pub_leaflet/theme/color.rs index 0e456f5e7..e37ebd570 100644 --- a/crates/jacquard-api/src/pub_leaflet/theme/color.rs +++ b/crates/jacquard-api/src/pub_leaflet/theme/color.rs @@ -226,51 +226,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; - } - ///State transition - sets the `r` field to Set - pub struct SetR(PhantomData St>); - impl sealed::Sealed for SetR {} - impl State for SetR { - type R = Set; - type G = St::G; - type B = St::B; + type R = Unset; } ///State transition - sets the `g` field to Set pub struct SetG(PhantomData St>); impl sealed::Sealed for SetG {} impl State for SetG { - type R = St::R; type G = Set; type B = St::B; + type R = St::R; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData St>); impl sealed::Sealed for SetB {} impl State for SetB { - type R = St::R; type G = St::G; type B = Set; + type R = St::R; + } + ///State transition - sets the `r` field to Set + pub struct SetR(PhantomData St>); + impl sealed::Sealed for SetR {} + impl State for SetR { + type G = St::G; + type B = St::B; + type R = 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(()); } } @@ -350,9 +350,9 @@ where impl RgbBuilder where St: rgb_state::State, - St::R: rgb_state::IsSet, St::G: rgb_state::IsSet, St::B: rgb_state::IsSet, + St::R: rgb_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rgb { @@ -490,65 +490,65 @@ pub mod rgba_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type R; - type A; type G; + type A; + type R; type B; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type R = Unset; - type A = Unset; type G = Unset; + type A = Unset; + type R = Unset; type B = Unset; } - ///State transition - sets the `r` field to Set - pub struct SetR(PhantomData St>); - impl sealed::Sealed for SetR {} - impl State for SetR { - type R = Set; + ///State transition - sets the `g` field to Set + pub struct SetG(PhantomData St>); + impl sealed::Sealed for SetG {} + impl State for SetG { + type G = Set; type A = St::A; - type G = St::G; + type R = St::R; type B = St::B; } ///State transition - sets the `a` field to Set pub struct SetA(PhantomData St>); impl sealed::Sealed for SetA {} impl State for SetA { - type R = St::R; - type A = Set; type G = St::G; + type A = Set; + type R = St::R; type B = St::B; } - ///State transition - sets the `g` field to Set - pub struct SetG(PhantomData St>); - impl sealed::Sealed for SetG {} - impl State for SetG { - type R = St::R; + ///State transition - sets the `r` field to Set + pub struct SetR(PhantomData St>); + impl sealed::Sealed for SetR {} + impl State for SetR { + type G = St::G; type A = St::A; - type G = Set; + type R = Set; type B = St::B; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData St>); impl sealed::Sealed for SetB {} impl State for SetB { - type R = St::R; - type A = St::A; type G = St::G; + type A = St::A; + type R = St::R; 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 `a` field - pub struct a(()); ///Marker type for the `g` field pub struct g(()); + ///Marker type for the `a` field + pub struct a(()); + ///Marker type for the `r` field + pub struct r(()); ///Marker type for the `b` field pub struct b(()); } @@ -646,9 +646,9 @@ where impl RgbaBuilder where St: rgba_state::State, - St::R: rgba_state::IsSet, - St::A: rgba_state::IsSet, St::G: rgba_state::IsSet, + St::A: rgba_state::IsSet, + St::R: rgba_state::IsSet, St::B: rgba_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/pub_quizzy/answer.rs b/crates/jacquard-api/src/pub_quizzy/answer.rs index 945a84c3a..37c874507 100644 --- a/crates/jacquard-api/src/pub_quizzy/answer.rs +++ b/crates/jacquard-api/src/pub_quizzy/answer.rs @@ -230,67 +230,67 @@ pub mod answer_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Timestamp; + type Question; type Certainty; + type Timestamp; type Text; - type Question; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Timestamp = Unset; + type Question = Unset; type Certainty = Unset; + type Timestamp = Unset; type Text = Unset; - type Question = Unset; } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData St>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Timestamp = Set; + ///State transition - sets the `question` field to Set + pub struct SetQuestion(PhantomData St>); + impl sealed::Sealed for SetQuestion {} + impl State for SetQuestion { + type Question = Set; type Certainty = St::Certainty; + type Timestamp = St::Timestamp; type Text = St::Text; - type Question = St::Question; } ///State transition - sets the `certainty` field to Set pub struct SetCertainty(PhantomData St>); impl sealed::Sealed for SetCertainty {} impl State for SetCertainty { - type Timestamp = St::Timestamp; + type Question = St::Question; type Certainty = Set; + type Timestamp = St::Timestamp; type Text = St::Text; + } + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData St>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { type Question = St::Question; + type Certainty = St::Certainty; + type Timestamp = Set; + type Text = St::Text; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Timestamp = St::Timestamp; - type Certainty = St::Certainty; - type Text = Set; type Question = St::Question; - } - ///State transition - sets the `question` field to Set - pub struct SetQuestion(PhantomData St>); - impl sealed::Sealed for SetQuestion {} - impl State for SetQuestion { - type Timestamp = St::Timestamp; type Certainty = St::Certainty; - type Text = St::Text; - type Question = Set; + type Timestamp = St::Timestamp; + type Text = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `timestamp` field - pub struct timestamp(()); + ///Marker type for the `question` field + pub struct question(()); ///Marker type for the `certainty` field pub struct certainty(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); ///Marker type for the `text` field pub struct text(()); - ///Marker type for the `question` field - pub struct question(()); } } @@ -403,10 +403,10 @@ where impl AnswerBuilder where St: answer_state::State, - St::Timestamp: answer_state::IsSet, + St::Question: answer_state::IsSet, St::Certainty: answer_state::IsSet, + St::Timestamp: answer_state::IsSet, St::Text: answer_state::IsSet, - St::Question: answer_state::IsSet, { /// Build the final struct. pub fn build(self) -> Answer { diff --git a/crates/jacquard-api/src/pub_quizzy/league.rs b/crates/jacquard-api/src/pub_quizzy/league.rs index 257175c62..7983eaeab 100644 --- a/crates/jacquard-api/src/pub_quizzy/league.rs +++ b/crates/jacquard-api/src/pub_quizzy/league.rs @@ -174,51 +174,51 @@ pub mod league_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Teams; type Name; type QuizMasters; - type Teams; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Teams = Unset; type Name = Unset; type QuizMasters = Unset; - type Teams = Unset; + } + ///State transition - sets the `teams` field to Set + pub struct SetTeams(PhantomData St>); + impl sealed::Sealed for SetTeams {} + impl State for SetTeams { + type Teams = Set; + type Name = St::Name; + type QuizMasters = St::QuizMasters; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Teams = St::Teams; type Name = Set; type QuizMasters = St::QuizMasters; - type Teams = St::Teams; } ///State transition - sets the `quiz_masters` field to Set pub struct SetQuizMasters(PhantomData St>); impl sealed::Sealed for SetQuizMasters {} impl State for SetQuizMasters { - type Name = St::Name; - type QuizMasters = Set; type Teams = St::Teams; - } - ///State transition - sets the `teams` field to Set - pub struct SetTeams(PhantomData St>); - impl sealed::Sealed for SetTeams {} - impl State for SetTeams { type Name = St::Name; - type QuizMasters = St::QuizMasters; - type Teams = Set; + type QuizMasters = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `teams` field + pub struct teams(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `quiz_masters` field pub struct quiz_masters(()); - ///Marker type for the `teams` field - pub struct teams(()); } } @@ -307,9 +307,9 @@ where impl LeagueBuilder where St: league_state::State, + St::Teams: league_state::IsSet, St::Name: league_state::IsSet, St::QuizMasters: league_state::IsSet, - St::Teams: league_state::IsSet, { /// Build the final struct. pub fn build(self) -> League { diff --git a/crates/jacquard-api/src/pub_quizzy/quiz.rs b/crates/jacquard-api/src/pub_quizzy/quiz.rs index 5d4014ada..8721cca69 100644 --- a/crates/jacquard-api/src/pub_quizzy/quiz.rs +++ b/crates/jacquard-api/src/pub_quizzy/quiz.rs @@ -344,65 +344,65 @@ pub mod quiz_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Locales; type Title; type Rounds; + type Locales; type Timestamp; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Locales = Unset; type Title = Unset; type Rounds = Unset; + type Locales = Unset; type Timestamp = Unset; } - ///State transition - sets the `locales` field to Set - pub struct SetLocales(PhantomData St>); - impl sealed::Sealed for SetLocales {} - impl State for SetLocales { - type Locales = Set; - type Title = St::Title; - type Rounds = St::Rounds; - type Timestamp = St::Timestamp; - } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Locales = St::Locales; type Title = Set; type Rounds = St::Rounds; + type Locales = St::Locales; type Timestamp = St::Timestamp; } ///State transition - sets the `rounds` field to Set pub struct SetRounds(PhantomData St>); impl sealed::Sealed for SetRounds {} impl State for SetRounds { - type Locales = St::Locales; type Title = St::Title; type Rounds = Set; + type Locales = St::Locales; + type Timestamp = St::Timestamp; + } + ///State transition - sets the `locales` field to Set + pub struct SetLocales(PhantomData St>); + impl sealed::Sealed for SetLocales {} + impl State for SetLocales { + type Title = St::Title; + type Rounds = St::Rounds; + type Locales = Set; type Timestamp = St::Timestamp; } ///State transition - sets the `timestamp` field to Set pub struct SetTimestamp(PhantomData St>); impl sealed::Sealed for SetTimestamp {} impl State for SetTimestamp { - type Locales = St::Locales; type Title = St::Title; type Rounds = St::Rounds; + type Locales = St::Locales; type Timestamp = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `locales` field - pub struct locales(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `rounds` field pub struct rounds(()); + ///Marker type for the `locales` field + pub struct locales(()); ///Marker type for the `timestamp` field pub struct timestamp(()); } @@ -573,9 +573,9 @@ where impl QuizBuilder where St: quiz_state::State, - St::Locales: quiz_state::IsSet, St::Title: quiz_state::IsSet, St::Rounds: quiz_state::IsSet, + St::Locales: quiz_state::IsSet, St::Timestamp: quiz_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/pub_quizzy/quiz_begin.rs b/crates/jacquard-api/src/pub_quizzy/quiz_begin.rs index c6a8ca2cc..8da9fdec2 100644 --- a/crates/jacquard-api/src/pub_quizzy/quiz_begin.rs +++ b/crates/jacquard-api/src/pub_quizzy/quiz_begin.rs @@ -120,8 +120,8 @@ pub mod quiz_begin_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type League; - type StartedAt; type Quiz; + type StartedAt; type EndsAt; } /// Empty state - all required fields are unset @@ -129,8 +129,8 @@ pub mod quiz_begin_state { impl sealed::Sealed for Empty {} impl State for Empty { type League = Unset; - type StartedAt = Unset; type Quiz = Unset; + type StartedAt = Unset; type EndsAt = Unset; } ///State transition - sets the `league` field to Set @@ -138,17 +138,8 @@ pub mod quiz_begin_state { impl sealed::Sealed for SetLeague {} impl State for SetLeague { type League = Set; - type StartedAt = St::StartedAt; - type Quiz = St::Quiz; - type EndsAt = St::EndsAt; - } - ///State transition - sets the `started_at` field to Set - pub struct SetStartedAt(PhantomData St>); - impl sealed::Sealed for SetStartedAt {} - impl State for SetStartedAt { - type League = St::League; - type StartedAt = Set; type Quiz = St::Quiz; + type StartedAt = St::StartedAt; type EndsAt = St::EndsAt; } ///State transition - sets the `quiz` field to Set @@ -156,8 +147,17 @@ pub mod quiz_begin_state { impl sealed::Sealed for SetQuiz {} impl State for SetQuiz { type League = St::League; - type StartedAt = St::StartedAt; type Quiz = Set; + type StartedAt = St::StartedAt; + type EndsAt = St::EndsAt; + } + ///State transition - sets the `started_at` field to Set + pub struct SetStartedAt(PhantomData St>); + impl sealed::Sealed for SetStartedAt {} + impl State for SetStartedAt { + type League = St::League; + type Quiz = St::Quiz; + type StartedAt = Set; type EndsAt = St::EndsAt; } ///State transition - sets the `ends_at` field to Set @@ -165,8 +165,8 @@ pub mod quiz_begin_state { impl sealed::Sealed for SetEndsAt {} impl State for SetEndsAt { type League = St::League; - type StartedAt = St::StartedAt; type Quiz = St::Quiz; + type StartedAt = St::StartedAt; type EndsAt = Set; } /// Marker types for field names @@ -174,10 +174,10 @@ pub mod quiz_begin_state { pub mod members { ///Marker type for the `league` field pub struct league(()); - ///Marker type for the `started_at` field - pub struct started_at(()); ///Marker type for the `quiz` field pub struct quiz(()); + ///Marker type for the `started_at` field + pub struct started_at(()); ///Marker type for the `ends_at` field pub struct ends_at(()); } @@ -293,8 +293,8 @@ impl QuizBeginBuilder where St: quiz_begin_state::State, St::League: quiz_begin_state::IsSet, - St::StartedAt: quiz_begin_state::IsSet, St::Quiz: quiz_begin_state::IsSet, + St::StartedAt: quiz_begin_state::IsSet, St::EndsAt: quiz_begin_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/pub_quizzy/team_score.rs b/crates/jacquard-api/src/pub_quizzy/team_score.rs index 4543d658a..8ce5bcf32 100644 --- a/crates/jacquard-api/src/pub_quizzy/team_score.rs +++ b/crates/jacquard-api/src/pub_quizzy/team_score.rs @@ -204,51 +204,51 @@ pub mod team_score_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type QuizBegin; - type Team; type Answers; + type Team; + type QuizBegin; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type QuizBegin = Unset; - type Team = Unset; type Answers = Unset; + type Team = Unset; + type QuizBegin = Unset; } - ///State transition - sets the `quiz_begin` field to Set - pub struct SetQuizBegin(PhantomData St>); - impl sealed::Sealed for SetQuizBegin {} - impl State for SetQuizBegin { - type QuizBegin = Set; + ///State transition - sets the `answers` field to Set + pub struct SetAnswers(PhantomData St>); + impl sealed::Sealed for SetAnswers {} + impl State for SetAnswers { + type Answers = Set; type Team = St::Team; - type Answers = St::Answers; + type QuizBegin = St::QuizBegin; } ///State transition - sets the `team` field to Set pub struct SetTeam(PhantomData St>); impl sealed::Sealed for SetTeam {} impl State for SetTeam { - type QuizBegin = St::QuizBegin; - type Team = Set; type Answers = St::Answers; - } - ///State transition - sets the `answers` field to Set - pub struct SetAnswers(PhantomData St>); - impl sealed::Sealed for SetAnswers {} - impl State for SetAnswers { + type Team = Set; type QuizBegin = St::QuizBegin; + } + ///State transition - sets the `quiz_begin` field to Set + pub struct SetQuizBegin(PhantomData St>); + impl sealed::Sealed for SetQuizBegin {} + impl State for SetQuizBegin { + type Answers = St::Answers; type Team = St::Team; - type Answers = Set; + type QuizBegin = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `quiz_begin` field - pub struct quiz_begin(()); - ///Marker type for the `team` field - pub struct team(()); ///Marker type for the `answers` field pub struct answers(()); + ///Marker type for the `team` field + pub struct team(()); + ///Marker type for the `quiz_begin` field + pub struct quiz_begin(()); } } @@ -341,9 +341,9 @@ where impl TeamScoreBuilder where St: team_score_state::State, - St::QuizBegin: team_score_state::IsSet, - St::Team: team_score_state::IsSet, St::Answers: team_score_state::IsSet, + St::Team: team_score_state::IsSet, + St::QuizBegin: team_score_state::IsSet, { /// Build the final struct. pub fn build(self) -> TeamScore { @@ -503,37 +503,37 @@ pub mod scored_answer_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Scores; type Answer; + type Scores; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Scores = Unset; type Answer = Unset; - } - ///State transition - sets the `scores` field to Set - pub struct SetScores(PhantomData St>); - impl sealed::Sealed for SetScores {} - impl State for SetScores { - type Scores = Set; - type Answer = St::Answer; + type Scores = Unset; } ///State transition - sets the `answer` field to Set pub struct SetAnswer(PhantomData St>); impl sealed::Sealed for SetAnswer {} impl State for SetAnswer { - type Scores = St::Scores; type Answer = Set; + type Scores = St::Scores; + } + ///State transition - sets the `scores` field to Set + pub struct SetScores(PhantomData St>); + impl sealed::Sealed for SetScores {} + impl State for SetScores { + type Answer = St::Answer; + type Scores = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `scores` field - pub struct scores(()); ///Marker type for the `answer` field pub struct answer(()); + ///Marker type for the `scores` field + pub struct scores(()); } } @@ -616,8 +616,8 @@ where impl ScoredAnswerBuilder where St: scored_answer_state::State, - St::Scores: scored_answer_state::IsSet, St::Answer: scored_answer_state::IsSet, + St::Scores: scored_answer_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScoredAnswer { diff --git a/crates/jacquard-api/src/science_alt/dataset/entry.rs b/crates/jacquard-api/src/science_alt/dataset/entry.rs index 0733f4935..301fc25bf 100644 --- a/crates/jacquard-api/src/science_alt/dataset/entry.rs +++ b/crates/jacquard-api/src/science_alt/dataset/entry.rs @@ -577,67 +577,67 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; + type Storage; type Name; type SchemaRef; - type Storage; - 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 Storage = Unset; type Name = Unset; type SchemaRef = Unset; - type Storage = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Storage = St::Storage; + type Name = St::Name; + type SchemaRef = St::SchemaRef; + } + ///State transition - sets the `storage` field to Set + pub struct SetStorage(PhantomData St>); + impl sealed::Sealed for SetStorage {} + impl State for SetStorage { + type CreatedAt = St::CreatedAt; + type Storage = Set; + type Name = St::Name; + type SchemaRef = St::SchemaRef; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type CreatedAt = St::CreatedAt; + type Storage = St::Storage; type Name = Set; type SchemaRef = St::SchemaRef; - type Storage = St::Storage; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `schema_ref` field to Set pub struct SetSchemaRef(PhantomData St>); impl sealed::Sealed for SetSchemaRef {} impl State for SetSchemaRef { - type Name = St::Name; - type SchemaRef = Set; - type Storage = St::Storage; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `storage` field to Set - pub struct SetStorage(PhantomData St>); - impl sealed::Sealed for SetStorage {} - impl State for SetStorage { - type Name = St::Name; - type SchemaRef = St::SchemaRef; - type Storage = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Name = St::Name; - type SchemaRef = St::SchemaRef; type Storage = St::Storage; - type CreatedAt = Set; + type Name = St::Name; + type SchemaRef = 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 `storage` field + pub struct storage(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `schema_ref` field pub struct schema_ref(()); - ///Marker type for the `storage` field - pub struct storage(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -848,10 +848,10 @@ impl EntryBuilder { impl EntryBuilder where St: entry_state::State, + St::CreatedAt: entry_state::IsSet, + St::Storage: entry_state::IsSet, St::Name: entry_state::IsSet, St::SchemaRef: entry_state::IsSet, - St::Storage: entry_state::IsSet, - St::CreatedAt: entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> Entry { diff --git a/crates/jacquard-api/src/science_alt/dataset/label.rs b/crates/jacquard-api/src/science_alt/dataset/label.rs index 71d423eca..720cd0c95 100644 --- a/crates/jacquard-api/src/science_alt/dataset/label.rs +++ b/crates/jacquard-api/src/science_alt/dataset/label.rs @@ -164,49 +164,49 @@ pub mod label_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DatasetUri; type Name; + type DatasetUri; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DatasetUri = Unset; type Name = Unset; + type DatasetUri = Unset; type CreatedAt = Unset; } - ///State transition - sets the `dataset_uri` field to Set - pub struct SetDatasetUri(PhantomData St>); - impl sealed::Sealed for SetDatasetUri {} - impl State for SetDatasetUri { - type DatasetUri = Set; - type Name = St::Name; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type DatasetUri = St::DatasetUri; type Name = Set; + type DatasetUri = St::DatasetUri; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `dataset_uri` field to Set + pub struct SetDatasetUri(PhantomData St>); + impl sealed::Sealed for SetDatasetUri {} + impl State for SetDatasetUri { + type Name = St::Name; + type DatasetUri = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type DatasetUri = St::DatasetUri; type Name = St::Name; + type DatasetUri = St::DatasetUri; type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `dataset_uri` field - pub struct dataset_uri(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `dataset_uri` field + pub struct dataset_uri(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -323,8 +323,8 @@ impl LabelBuilder { impl LabelBuilder where St: label_state::State, - St::DatasetUri: label_state::IsSet, St::Name: label_state::IsSet, + St::DatasetUri: label_state::IsSet, St::CreatedAt: label_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/science_alt/dataset/lens.rs b/crates/jacquard-api/src/science_alt/dataset/lens.rs index 00a0f72f3..4fde39127 100644 --- a/crates/jacquard-api/src/science_alt/dataset/lens.rs +++ b/crates/jacquard-api/src/science_alt/dataset/lens.rs @@ -563,105 +563,105 @@ pub mod lens_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type SourceSchema; type GetterCode; type PutterCode; type CreatedAt; - type SourceSchema; - type Name; type TargetSchema; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type SourceSchema = Unset; type GetterCode = Unset; type PutterCode = Unset; type CreatedAt = Unset; - type SourceSchema = Unset; - type Name = Unset; type TargetSchema = Unset; + type Name = Unset; + } + ///State transition - sets the `source_schema` field to Set + pub struct SetSourceSchema(PhantomData St>); + impl sealed::Sealed for SetSourceSchema {} + impl State for SetSourceSchema { + type SourceSchema = Set; + type GetterCode = St::GetterCode; + type PutterCode = St::PutterCode; + type CreatedAt = St::CreatedAt; + type TargetSchema = St::TargetSchema; + type Name = St::Name; } ///State transition - sets the `getter_code` field to Set pub struct SetGetterCode(PhantomData St>); impl sealed::Sealed for SetGetterCode {} impl State for SetGetterCode { + type SourceSchema = St::SourceSchema; type GetterCode = Set; type PutterCode = St::PutterCode; type CreatedAt = St::CreatedAt; - type SourceSchema = St::SourceSchema; - type Name = St::Name; type TargetSchema = St::TargetSchema; + type Name = St::Name; } ///State transition - sets the `putter_code` field to Set pub struct SetPutterCode(PhantomData St>); impl sealed::Sealed for SetPutterCode {} impl State for SetPutterCode { + type SourceSchema = St::SourceSchema; type GetterCode = St::GetterCode; type PutterCode = Set; type CreatedAt = St::CreatedAt; - type SourceSchema = St::SourceSchema; - type Name = St::Name; type TargetSchema = St::TargetSchema; + type Name = St::Name; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type SourceSchema = St::SourceSchema; type GetterCode = St::GetterCode; type PutterCode = St::PutterCode; type CreatedAt = Set; - type SourceSchema = St::SourceSchema; - type Name = St::Name; type TargetSchema = St::TargetSchema; + type Name = St::Name; } - ///State transition - sets the `source_schema` field to Set - pub struct SetSourceSchema(PhantomData St>); - impl sealed::Sealed for SetSourceSchema {} - impl State for SetSourceSchema { + ///State transition - sets the `target_schema` field to Set + pub struct SetTargetSchema(PhantomData St>); + impl sealed::Sealed for SetTargetSchema {} + impl State for SetTargetSchema { + type SourceSchema = St::SourceSchema; type GetterCode = St::GetterCode; type PutterCode = St::PutterCode; type CreatedAt = St::CreatedAt; - type SourceSchema = Set; + type TargetSchema = Set; type Name = St::Name; - type TargetSchema = St::TargetSchema; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type GetterCode = St::GetterCode; - type PutterCode = St::PutterCode; - type CreatedAt = St::CreatedAt; type SourceSchema = St::SourceSchema; - type Name = Set; - type TargetSchema = St::TargetSchema; - } - ///State transition - sets the `target_schema` field to Set - pub struct SetTargetSchema(PhantomData St>); - impl sealed::Sealed for SetTargetSchema {} - impl State for SetTargetSchema { type GetterCode = St::GetterCode; type PutterCode = St::PutterCode; type CreatedAt = St::CreatedAt; - type SourceSchema = St::SourceSchema; - type Name = St::Name; - type TargetSchema = Set; + type TargetSchema = St::TargetSchema; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `source_schema` field + pub struct source_schema(()); ///Marker type for the `getter_code` field pub struct getter_code(()); ///Marker type for the `putter_code` field pub struct putter_code(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `source_schema` field - pub struct source_schema(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `target_schema` field pub struct target_schema(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -884,12 +884,12 @@ impl LensBuilder { impl LensBuilder where St: lens_state::State, + St::SourceSchema: lens_state::IsSet, St::GetterCode: lens_state::IsSet, St::PutterCode: lens_state::IsSet, St::CreatedAt: lens_state::IsSet, - St::SourceSchema: lens_state::IsSet, - St::Name: lens_state::IsSet, St::TargetSchema: lens_state::IsSet, + St::Name: lens_state::IsSet, { /// Build the final struct. pub fn build(self) -> Lens { diff --git a/crates/jacquard-api/src/science_alt/dataset/lens_verification.rs b/crates/jacquard-api/src/science_alt/dataset/lens_verification.rs index b59c71f49..97a41bf49 100644 --- a/crates/jacquard-api/src/science_alt/dataset/lens_verification.rs +++ b/crates/jacquard-api/src/science_alt/dataset/lens_verification.rs @@ -374,67 +374,67 @@ pub mod lens_verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Lens; + type LensCommit; type VerificationMethod; + type Lens; type CreatedAt; - type LensCommit; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Lens = Unset; + type LensCommit = Unset; type VerificationMethod = Unset; + type Lens = Unset; type CreatedAt = Unset; - type LensCommit = Unset; } - ///State transition - sets the `lens` field to Set - pub struct SetLens(PhantomData St>); - impl sealed::Sealed for SetLens {} - impl State for SetLens { - type Lens = Set; + ///State transition - sets the `lens_commit` field to Set + pub struct SetLensCommit(PhantomData St>); + impl sealed::Sealed for SetLensCommit {} + impl State for SetLensCommit { + type LensCommit = Set; type VerificationMethod = St::VerificationMethod; + type Lens = St::Lens; type CreatedAt = St::CreatedAt; - type LensCommit = St::LensCommit; } ///State transition - sets the `verification_method` field to Set pub struct SetVerificationMethod(PhantomData St>); impl sealed::Sealed for SetVerificationMethod {} impl State for SetVerificationMethod { - type Lens = St::Lens; + type LensCommit = St::LensCommit; type VerificationMethod = Set; + type Lens = St::Lens; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `lens` field to Set + pub struct SetLens(PhantomData St>); + impl sealed::Sealed for SetLens {} + impl State for SetLens { type LensCommit = St::LensCommit; + type VerificationMethod = St::VerificationMethod; + type Lens = Set; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Lens = St::Lens; - type VerificationMethod = St::VerificationMethod; - type CreatedAt = Set; type LensCommit = St::LensCommit; - } - ///State transition - sets the `lens_commit` field to Set - pub struct SetLensCommit(PhantomData St>); - impl sealed::Sealed for SetLensCommit {} - impl State for SetLensCommit { - type Lens = St::Lens; type VerificationMethod = St::VerificationMethod; - type CreatedAt = St::CreatedAt; - type LensCommit = Set; + type Lens = St::Lens; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `lens` field - pub struct lens(()); + ///Marker type for the `lens_commit` field + pub struct lens_commit(()); ///Marker type for the `verification_method` field pub struct verification_method(()); + ///Marker type for the `lens` field + pub struct lens(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `lens_commit` field - pub struct lens_commit(()); } } @@ -595,10 +595,10 @@ where impl LensVerificationBuilder where St: lens_verification_state::State, - St::Lens: lens_verification_state::IsSet, + St::LensCommit: lens_verification_state::IsSet, St::VerificationMethod: lens_verification_state::IsSet, + St::Lens: lens_verification_state::IsSet, St::CreatedAt: lens_verification_state::IsSet, - St::LensCommit: lens_verification_state::IsSet, { /// Build the final struct. pub fn build(self) -> LensVerification { diff --git a/crates/jacquard-api/src/science_alt/dataset/resolve_schema.rs b/crates/jacquard-api/src/science_alt/dataset/resolve_schema.rs index 44eb4629b..29067ae34 100644 --- a/crates/jacquard-api/src/science_alt/dataset/resolve_schema.rs +++ b/crates/jacquard-api/src/science_alt/dataset/resolve_schema.rs @@ -118,37 +118,37 @@ pub mod resolve_schema_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SchemaId; type Handle; + type SchemaId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SchemaId = Unset; type Handle = Unset; - } - ///State transition - sets the `schema_id` field to Set - pub struct SetSchemaId(PhantomData St>); - impl sealed::Sealed for SetSchemaId {} - impl State for SetSchemaId { - type SchemaId = Set; - type Handle = St::Handle; + type SchemaId = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type SchemaId = St::SchemaId; type Handle = Set; + type SchemaId = St::SchemaId; + } + ///State transition - sets the `schema_id` field to Set + pub struct SetSchemaId(PhantomData St>); + impl sealed::Sealed for SetSchemaId {} + impl State for SetSchemaId { + type Handle = St::Handle; + type SchemaId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `schema_id` field - pub struct schema_id(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `schema_id` field + pub struct schema_id(()); } } @@ -231,8 +231,8 @@ impl ResolveSchemaBuilder { impl ResolveSchemaBuilder where St: resolve_schema_state::State, - St::SchemaId: resolve_schema_state::IsSet, St::Handle: resolve_schema_state::IsSet, + St::SchemaId: resolve_schema_state::IsSet, { /// Build the final struct. pub fn build(self) -> ResolveSchema { diff --git a/crates/jacquard-api/src/science_alt/dataset/storage_http.rs b/crates/jacquard-api/src/science_alt/dataset/storage_http.rs index f106218fe..f53e69769 100644 --- a/crates/jacquard-api/src/science_alt/dataset/storage_http.rs +++ b/crates/jacquard-api/src/science_alt/dataset/storage_http.rs @@ -302,37 +302,37 @@ pub mod shard_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Checksum; + 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 Checksum = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Checksum = St::Checksum; + type Url = Unset; } ///State transition - sets the `checksum` field to Set pub struct SetChecksum(PhantomData St>); impl sealed::Sealed for SetChecksum {} impl State for SetChecksum { - type Url = St::Url; type Checksum = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Checksum = St::Checksum; + 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 `checksum` field pub struct checksum(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -402,8 +402,8 @@ where impl ShardEntryBuilder where St: shard_entry_state::State, - St::Url: shard_entry_state::IsSet, St::Checksum: shard_entry_state::IsSet, + St::Url: shard_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> ShardEntry { diff --git a/crates/jacquard-api/src/science_alt/dataset/storage_s3.rs b/crates/jacquard-api/src/science_alt/dataset/storage_s3.rs index df13d109b..da0e3f1e9 100644 --- a/crates/jacquard-api/src/science_alt/dataset/storage_s3.rs +++ b/crates/jacquard-api/src/science_alt/dataset/storage_s3.rs @@ -151,37 +151,37 @@ pub mod storage_s3_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Shards; type Bucket; + type Shards; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Shards = Unset; type Bucket = Unset; - } - ///State transition - sets the `shards` field to Set - pub struct SetShards(PhantomData St>); - impl sealed::Sealed for SetShards {} - impl State for SetShards { - type Shards = Set; - type Bucket = St::Bucket; + type Shards = Unset; } ///State transition - sets the `bucket` field to Set pub struct SetBucket(PhantomData St>); impl sealed::Sealed for SetBucket {} impl State for SetBucket { - type Shards = St::Shards; type Bucket = Set; + type Shards = St::Shards; + } + ///State transition - sets the `shards` field to Set + pub struct SetShards(PhantomData St>); + impl sealed::Sealed for SetShards {} + impl State for SetShards { + type Bucket = St::Bucket; + type Shards = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `shards` field - pub struct shards(()); ///Marker type for the `bucket` field pub struct bucket(()); + ///Marker type for the `shards` field + pub struct shards(()); } } @@ -282,8 +282,8 @@ where impl StorageS3Builder where St: storage_s3_state::State, - St::Shards: storage_s3_state::IsSet, St::Bucket: storage_s3_state::IsSet, + St::Shards: storage_s3_state::IsSet, { /// Build the final struct. pub fn build(self) -> StorageS3 { @@ -446,37 +446,37 @@ pub mod shard_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Key; type Checksum; + type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Key = Unset; type Checksum = Unset; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { - type Key = Set; - type Checksum = St::Checksum; + type Key = Unset; } ///State transition - sets the `checksum` field to Set pub struct SetChecksum(PhantomData St>); impl sealed::Sealed for SetChecksum {} impl State for SetChecksum { - type Key = St::Key; type Checksum = Set; + type Key = St::Key; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Checksum = St::Checksum; + type Key = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `key` field - pub struct key(()); ///Marker type for the `checksum` field pub struct checksum(()); + ///Marker type for the `key` field + pub struct key(()); } } @@ -546,8 +546,8 @@ where impl ShardEntryBuilder where St: shard_entry_state::State, - St::Key: shard_entry_state::IsSet, St::Checksum: shard_entry_state::IsSet, + St::Key: shard_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> ShardEntry { diff --git a/crates/jacquard-api/src/scot_comhairle/testing_polis_poll_v1.rs b/crates/jacquard-api/src/scot_comhairle/testing_polis_poll_v1.rs index dd9b523c2..c679c426a 100644 --- a/crates/jacquard-api/src/scot_comhairle/testing_polis_poll_v1.rs +++ b/crates/jacquard-api/src/scot_comhairle/testing_polis_poll_v1.rs @@ -141,37 +141,37 @@ pub mod testing_polis_poll_v1_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Topic; type CreatedAt; + type Topic; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Topic = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `topic` field to Set - pub struct SetTopic(PhantomData St>); - impl sealed::Sealed for SetTopic {} - impl State for SetTopic { - type Topic = Set; - type CreatedAt = St::CreatedAt; + type Topic = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Topic = St::Topic; type CreatedAt = Set; + type Topic = St::Topic; + } + ///State transition - sets the `topic` field to Set + pub struct SetTopic(PhantomData St>); + impl sealed::Sealed for SetTopic {} + impl State for SetTopic { + type CreatedAt = St::CreatedAt; + type Topic = 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 `created_at` field pub struct created_at(()); + ///Marker type for the `topic` field + pub struct topic(()); } } @@ -273,8 +273,8 @@ where impl TestingPolisPollV1Builder where St: testing_polis_poll_v1_state::State, - St::Topic: testing_polis_poll_v1_state::IsSet, St::CreatedAt: testing_polis_poll_v1_state::IsSet, + St::Topic: testing_polis_poll_v1_state::IsSet, { /// Build the final struct. pub fn build(self) -> TestingPolisPollV1 { diff --git a/crates/jacquard-api/src/scot_comhairle/testing_polis_statement_v1.rs b/crates/jacquard-api/src/scot_comhairle/testing_polis_statement_v1.rs index 389f3c532..c1f95c4d7 100644 --- a/crates/jacquard-api/src/scot_comhairle/testing_polis_statement_v1.rs +++ b/crates/jacquard-api/src/scot_comhairle/testing_polis_statement_v1.rs @@ -157,49 +157,49 @@ pub mod testing_polis_statement_v1_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Text; type Poll; + type Text; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Text = Unset; type Poll = Unset; + type Text = Unset; type CreatedAt = Unset; } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData St>); - impl sealed::Sealed for SetText {} - impl State for SetText { - type Text = Set; - type Poll = St::Poll; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `poll` field to Set pub struct SetPoll(PhantomData St>); impl sealed::Sealed for SetPoll {} impl State for SetPoll { - type Text = St::Text; type Poll = Set; + type Text = St::Text; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `text` field to Set + pub struct SetText(PhantomData St>); + impl sealed::Sealed for SetText {} + impl State for SetText { + type Poll = St::Poll; + type Text = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Text = St::Text; type Poll = St::Poll; + type Text = St::Text; type CreatedAt = 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 `poll` field pub struct poll(()); + ///Marker type for the `text` field + pub struct text(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -311,8 +311,8 @@ where impl TestingPolisStatementV1Builder where St: testing_polis_statement_v1_state::State, - St::Text: testing_polis_statement_v1_state::IsSet, St::Poll: testing_polis_statement_v1_state::IsSet, + St::Text: testing_polis_statement_v1_state::IsSet, St::CreatedAt: testing_polis_statement_v1_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/scot_comhairle/testing_polis_vote_v1.rs b/crates/jacquard-api/src/scot_comhairle/testing_polis_vote_v1.rs index baacac508..e35db1a8a 100644 --- a/crates/jacquard-api/src/scot_comhairle/testing_polis_vote_v1.rs +++ b/crates/jacquard-api/src/scot_comhairle/testing_polis_vote_v1.rs @@ -176,66 +176,66 @@ pub mod testing_polis_vote_v1_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Poll; - type Value; - type Subject; type CreatedAt; + type Subject; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Poll = Unset; - type Value = Unset; - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; + type Value = Unset; } ///State transition - sets the `poll` field to Set pub struct SetPoll(PhantomData St>); impl sealed::Sealed for SetPoll {} impl State for SetPoll { type Poll = Set; - type Value = St::Value; - type Subject = St::Subject; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; + type Value = St::Value; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Poll = St::Poll; - type Value = Set; + type CreatedAt = Set; type Subject = St::Subject; - type CreatedAt = St::CreatedAt; + type Value = St::Value; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Poll = St::Poll; - type Value = St::Value; - type Subject = Set; type CreatedAt = St::CreatedAt; + type Subject = Set; + type Value = St::Value; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type Poll = St::Poll; - type Value = St::Value; + type CreatedAt = St::CreatedAt; type Subject = St::Subject; - type CreatedAt = Set; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `poll` field pub struct poll(()); - ///Marker type for the `value` field - pub struct value(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -349,9 +349,9 @@ impl TestingPolisVoteV1Builder where St: testing_polis_vote_v1_state::State, St::Poll: testing_polis_vote_v1_state::IsSet, - St::Value: testing_polis_vote_v1_state::IsSet, - St::Subject: testing_polis_vote_v1_state::IsSet, St::CreatedAt: testing_polis_vote_v1_state::IsSet, + St::Subject: testing_polis_vote_v1_state::IsSet, + St::Value: testing_polis_vote_v1_state::IsSet, { /// Build the final struct. pub fn build(self) -> TestingPolisVoteV1 { @@ -536,37 +536,37 @@ pub mod poll_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 St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Uri = St::Uri; + type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; type Uri = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = St::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(()); } } @@ -636,8 +636,8 @@ where impl PollRefBuilder where St: poll_ref_state::State, - St::Cid: poll_ref_state::IsSet, St::Uri: poll_ref_state::IsSet, + St::Cid: poll_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> PollRef { diff --git a/crates/jacquard-api/src/sh_tangled.rs b/crates/jacquard-api/src/sh_tangled.rs index 5e549e026..3647e69ba 100644 --- a/crates/jacquard-api/src/sh_tangled.rs +++ b/crates/jacquard-api/src/sh_tangled.rs @@ -14,4 +14,5 @@ pub mod pipeline; pub mod public_key; pub mod repo; pub mod spindle; -pub mod string; \ No newline at end of file +pub mod string; +pub mod sync; \ No newline at end of file diff --git a/crates/jacquard-api/src/sh_tangled/feed/reaction.rs b/crates/jacquard-api/src/sh_tangled/feed/reaction.rs index 810a690c0..0753afdf1 100644 --- a/crates/jacquard-api/src/sh_tangled/feed/reaction.rs +++ b/crates/jacquard-api/src/sh_tangled/feed/reaction.rs @@ -112,51 +112,51 @@ pub mod reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Subject; type Reaction; + 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; type Reaction = Unset; + type Subject = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `reaction` field to Set + pub struct SetReaction(PhantomData St>); + impl sealed::Sealed for SetReaction {} + impl State for SetReaction { + type Reaction = Set; type Subject = St::Subject; - type Reaction = St::Reaction; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; - type Subject = Set; type Reaction = St::Reaction; - } - ///State transition - sets the `reaction` field to Set - pub struct SetReaction(PhantomData St>); - impl sealed::Sealed for SetReaction {} - impl State for SetReaction { + type Subject = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Reaction = St::Reaction; type Subject = St::Subject; - type Reaction = 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 `subject` field - pub struct subject(()); ///Marker type for the `reaction` field pub struct reaction(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -245,9 +245,9 @@ where impl ReactionBuilder where St: reaction_state::State, - St::CreatedAt: reaction_state::IsSet, - St::Subject: reaction_state::IsSet, St::Reaction: reaction_state::IsSet, + St::Subject: reaction_state::IsSet, + St::CreatedAt: reaction_state::IsSet, { /// Build the final struct. pub fn build(self) -> Reaction { diff --git a/crates/jacquard-api/src/sh_tangled/feed/star.rs b/crates/jacquard-api/src/sh_tangled/feed/star.rs index e0e68a620..e6e3a6737 100644 --- a/crates/jacquard-api/src/sh_tangled/feed/star.rs +++ b/crates/jacquard-api/src/sh_tangled/feed/star.rs @@ -111,37 +111,37 @@ pub mod star_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -211,8 +211,8 @@ where impl StarBuilder where St: star_state::State, - St::Subject: star_state::IsSet, St::CreatedAt: star_state::IsSet, + St::Subject: star_state::IsSet, { /// Build the final struct. pub fn build(self) -> Star { diff --git a/crates/jacquard-api/src/sh_tangled/git/ref_update.rs b/crates/jacquard-api/src/sh_tangled/git/ref_update.rs index c0747d8fe..1b0d2fcea 100644 --- a/crates/jacquard-api/src/sh_tangled/git/ref_update.rs +++ b/crates/jacquard-api/src/sh_tangled/git/ref_update.rs @@ -708,37 +708,37 @@ pub mod individual_language_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Size; type Lang; + type Size; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Size = Unset; type Lang = Unset; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData St>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { - type Size = Set; - type Lang = St::Lang; + type Size = Unset; } ///State transition - sets the `lang` field to Set pub struct SetLang(PhantomData St>); impl sealed::Sealed for SetLang {} impl State for SetLang { - type Size = St::Size; type Lang = Set; + type Size = St::Size; + } + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData St>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Lang = St::Lang; + type Size = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `size` field - pub struct size(()); ///Marker type for the `lang` field pub struct lang(()); + ///Marker type for the `size` field + pub struct size(()); } } @@ -814,8 +814,8 @@ where impl IndividualLanguageSizeBuilder where St: individual_language_size_state::State, - St::Size: individual_language_size_state::IsSet, St::Lang: individual_language_size_state::IsSet, + St::Size: individual_language_size_state::IsSet, { /// Build the final struct. pub fn build(self) -> IndividualLanguageSize { @@ -848,127 +848,127 @@ pub mod ref_update_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Meta; type Ref; type RepoDid; - type RepoName; - type OldSha; type NewSha; + type Meta; type CommitterDid; + type OldSha; + type RepoName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Meta = Unset; type Ref = Unset; type RepoDid = Unset; - type RepoName = Unset; - type OldSha = Unset; type NewSha = Unset; + type Meta = Unset; type CommitterDid = Unset; - } - ///State transition - sets the `meta` field to Set - pub struct SetMeta(PhantomData St>); - impl sealed::Sealed for SetMeta {} - impl State for SetMeta { - type Meta = Set; - type Ref = St::Ref; - type RepoDid = St::RepoDid; - type RepoName = St::RepoName; - type OldSha = St::OldSha; - type NewSha = St::NewSha; - type CommitterDid = St::CommitterDid; + type OldSha = Unset; + type RepoName = Unset; } ///State transition - sets the `ref` field to Set pub struct SetRef(PhantomData St>); impl sealed::Sealed for SetRef {} impl State for SetRef { - type Meta = St::Meta; type Ref = Set; type RepoDid = St::RepoDid; - type RepoName = St::RepoName; - type OldSha = St::OldSha; type NewSha = St::NewSha; + type Meta = St::Meta; type CommitterDid = St::CommitterDid; + type OldSha = St::OldSha; + type RepoName = St::RepoName; } ///State transition - sets the `repo_did` field to Set pub struct SetRepoDid(PhantomData St>); impl sealed::Sealed for SetRepoDid {} impl State for SetRepoDid { - type Meta = St::Meta; type Ref = St::Ref; type RepoDid = Set; - type RepoName = St::RepoName; - type OldSha = St::OldSha; type NewSha = St::NewSha; - type CommitterDid = St::CommitterDid; - } - ///State transition - sets the `repo_name` field to Set - pub struct SetRepoName(PhantomData St>); - impl sealed::Sealed for SetRepoName {} - impl State for SetRepoName { type Meta = St::Meta; - type Ref = St::Ref; - type RepoDid = St::RepoDid; - type RepoName = Set; - type OldSha = St::OldSha; - type NewSha = St::NewSha; type CommitterDid = St::CommitterDid; - } - ///State transition - sets the `old_sha` field to Set - pub struct SetOldSha(PhantomData St>); - impl sealed::Sealed for SetOldSha {} - impl State for SetOldSha { - type Meta = St::Meta; - type Ref = St::Ref; - type RepoDid = St::RepoDid; + type OldSha = St::OldSha; type RepoName = St::RepoName; - type OldSha = Set; - type NewSha = St::NewSha; - type CommitterDid = St::CommitterDid; } ///State transition - sets the `new_sha` field to Set pub struct SetNewSha(PhantomData St>); impl sealed::Sealed for SetNewSha {} impl State for SetNewSha { - type Meta = St::Meta; type Ref = St::Ref; type RepoDid = St::RepoDid; - type RepoName = St::RepoName; - type OldSha = St::OldSha; type NewSha = Set; + type Meta = St::Meta; type CommitterDid = St::CommitterDid; + type OldSha = St::OldSha; + type RepoName = St::RepoName; + } + ///State transition - sets the `meta` field to Set + pub struct SetMeta(PhantomData St>); + impl sealed::Sealed for SetMeta {} + impl State for SetMeta { + type Ref = St::Ref; + type RepoDid = St::RepoDid; + type NewSha = St::NewSha; + type Meta = Set; + type CommitterDid = St::CommitterDid; + type OldSha = St::OldSha; + type RepoName = St::RepoName; } ///State transition - sets the `committer_did` field to Set pub struct SetCommitterDid(PhantomData St>); impl sealed::Sealed for SetCommitterDid {} impl State for SetCommitterDid { + type Ref = St::Ref; + type RepoDid = St::RepoDid; + type NewSha = St::NewSha; type Meta = St::Meta; + type CommitterDid = Set; + type OldSha = St::OldSha; + type RepoName = St::RepoName; + } + ///State transition - sets the `old_sha` field to Set + pub struct SetOldSha(PhantomData St>); + impl sealed::Sealed for SetOldSha {} + impl State for SetOldSha { type Ref = St::Ref; type RepoDid = St::RepoDid; + type NewSha = St::NewSha; + type Meta = St::Meta; + type CommitterDid = St::CommitterDid; + type OldSha = Set; type RepoName = St::RepoName; - type OldSha = St::OldSha; + } + ///State transition - sets the `repo_name` field to Set + pub struct SetRepoName(PhantomData St>); + impl sealed::Sealed for SetRepoName {} + impl State for SetRepoName { + type Ref = St::Ref; + type RepoDid = St::RepoDid; type NewSha = St::NewSha; - type CommitterDid = Set; + type Meta = St::Meta; + type CommitterDid = St::CommitterDid; + type OldSha = St::OldSha; + type RepoName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `meta` field - pub struct meta(()); ///Marker type for the `ref` field pub struct r#ref(()); ///Marker type for the `repo_did` field pub struct repo_did(()); - ///Marker type for the `repo_name` field - pub struct repo_name(()); - ///Marker type for the `old_sha` field - pub struct old_sha(()); ///Marker type for the `new_sha` field pub struct new_sha(()); + ///Marker type for the `meta` field + pub struct meta(()); ///Marker type for the `committer_did` field pub struct committer_did(()); + ///Marker type for the `old_sha` field + pub struct old_sha(()); + ///Marker type for the `repo_name` field + pub struct repo_name(()); } } @@ -1141,13 +1141,13 @@ where impl RefUpdateBuilder where St: ref_update_state::State, - St::Meta: ref_update_state::IsSet, St::Ref: ref_update_state::IsSet, St::RepoDid: ref_update_state::IsSet, - St::RepoName: ref_update_state::IsSet, - St::OldSha: ref_update_state::IsSet, St::NewSha: ref_update_state::IsSet, + St::Meta: ref_update_state::IsSet, St::CommitterDid: ref_update_state::IsSet, + St::OldSha: ref_update_state::IsSet, + St::RepoName: ref_update_state::IsSet, { /// Build the final struct. pub fn build(self) -> RefUpdate { diff --git a/crates/jacquard-api/src/sh_tangled/git/temp.rs b/crates/jacquard-api/src/sh_tangled/git/temp.rs index 810f28fa7..bbbebc977 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp.rs @@ -228,67 +228,67 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Mode; - type LastCommit; type Size; + type Name; + type LastCommit; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Mode = Unset; - type LastCommit = Unset; type Size = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Mode = St::Mode; - type LastCommit = St::LastCommit; - type Size = St::Size; + type Name = Unset; + type LastCommit = Unset; } ///State transition - sets the `mode` field to Set pub struct SetMode(PhantomData St>); impl sealed::Sealed for SetMode {} impl State for SetMode { - type Name = St::Name; type Mode = Set; - type LastCommit = St::LastCommit; type Size = St::Size; - } - ///State transition - sets the `last_commit` field to Set - pub struct SetLastCommit(PhantomData St>); - impl sealed::Sealed for SetLastCommit {} - impl State for SetLastCommit { type Name = St::Name; - type Mode = St::Mode; - type LastCommit = Set; - type Size = St::Size; + type LastCommit = St::LastCommit; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { + type Mode = St::Mode; + type Size = Set; type Name = St::Name; + type LastCommit = St::LastCommit; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { type Mode = St::Mode; + type Size = St::Size; + type Name = Set; type LastCommit = St::LastCommit; - type Size = Set; + } + ///State transition - sets the `last_commit` field to Set + pub struct SetLastCommit(PhantomData St>); + impl sealed::Sealed for SetLastCommit {} + impl State for SetLastCommit { + type Mode = St::Mode; + type Size = St::Size; + type Name = St::Name; + type LastCommit = 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 `mode` field pub struct mode(()); - ///Marker type for the `last_commit` field - pub struct last_commit(()); ///Marker type for the `size` field pub struct size(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `last_commit` field + pub struct last_commit(()); } } @@ -415,10 +415,10 @@ impl BlobBuilder { impl BlobBuilder where St: blob_state::State, - St::Name: blob_state::IsSet, St::Mode: blob_state::IsSet, - St::LastCommit: blob_state::IsSet, St::Size: blob_state::IsSet, + St::Name: blob_state::IsSet, + St::LastCommit: blob_state::IsSet, { /// Build the final struct. pub fn build(self) -> Blob { @@ -858,85 +858,85 @@ pub mod commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; + type Committer; + type Author; type Tree; + type Message; type Hash; - type Author; - type Committer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; + type Committer = Unset; + type Author = Unset; type Tree = Unset; + type Message = Unset; type Hash = Unset; - type Author = Unset; - type Committer = Unset; } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; + ///State transition - sets the `committer` field to Set + pub struct SetCommitter(PhantomData St>); + impl sealed::Sealed for SetCommitter {} + impl State for SetCommitter { + type Committer = Set; + type Author = St::Author; type Tree = St::Tree; + type Message = St::Message; type Hash = St::Hash; - type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Committer = St::Committer; + type Author = Set; + type Tree = St::Tree; + type Message = St::Message; + type Hash = St::Hash; } ///State transition - sets the `tree` field to Set pub struct SetTree(PhantomData St>); impl sealed::Sealed for SetTree {} impl State for SetTree { - type Message = St::Message; + type Committer = St::Committer; + type Author = St::Author; type Tree = Set; + type Message = St::Message; type Hash = St::Hash; - type Author = St::Author; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { type Committer = St::Committer; + type Author = St::Author; + type Tree = St::Tree; + type Message = Set; + type Hash = St::Hash; } ///State transition - sets the `hash` field to Set pub struct SetHash(PhantomData St>); impl sealed::Sealed for SetHash {} impl State for SetHash { - type Message = St::Message; - type Tree = St::Tree; - type Hash = Set; - type Author = St::Author; type Committer = St::Committer; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Message = St::Message; + type Author = St::Author; type Tree = St::Tree; - type Hash = St::Hash; - type Author = Set; - type Committer = St::Committer; - } - ///State transition - sets the `committer` field to Set - pub struct SetCommitter(PhantomData St>); - impl sealed::Sealed for SetCommitter {} - impl State for SetCommitter { type Message = St::Message; - type Tree = St::Tree; - type Hash = St::Hash; - type Author = St::Author; - type Committer = Set; + type Hash = 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 `committer` field + pub struct committer(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `tree` field pub struct tree(()); + ///Marker type for the `message` field + pub struct message(()); ///Marker type for the `hash` field pub struct hash(()); - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `committer` field - pub struct committer(()); } } @@ -1069,11 +1069,11 @@ where impl CommitBuilder where St: commit_state::State, - St::Message: commit_state::IsSet, + St::Committer: commit_state::IsSet, + St::Author: commit_state::IsSet, St::Tree: commit_state::IsSet, + St::Message: commit_state::IsSet, St::Hash: commit_state::IsSet, - St::Author: commit_state::IsSet, - St::Committer: commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> Commit { @@ -1110,50 +1110,50 @@ pub mod signature_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type When; - type Email; type Name; + type Email; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type When = Unset; - type Email = Unset; type Name = Unset; + type Email = Unset; } ///State transition - sets the `when` field to Set pub struct SetWhen(PhantomData St>); impl sealed::Sealed for SetWhen {} impl State for SetWhen { type When = Set; - type Email = St::Email; - type Name = St::Name; - } - ///State transition - sets the `email` field to Set - pub struct SetEmail(PhantomData St>); - impl sealed::Sealed for SetEmail {} - impl State for SetEmail { - type When = St::When; - type Email = Set; type Name = St::Name; + type Email = St::Email; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { type When = St::When; - type Email = St::Email; type Name = Set; + type Email = St::Email; + } + ///State transition - sets the `email` field to Set + pub struct SetEmail(PhantomData St>); + impl sealed::Sealed for SetEmail {} + impl State for SetEmail { + type When = St::When; + type Name = St::Name; + type Email = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `when` field pub struct when(()); - ///Marker type for the `email` field - pub struct email(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `email` field + pub struct email(()); } } @@ -1243,8 +1243,8 @@ impl SignatureBuilder where St: signature_state::State, St::When: signature_state::IsSet, - St::Email: signature_state::IsSet, St::Name: signature_state::IsSet, + St::Email: signature_state::IsSet, { /// Build the final struct. pub fn build(self) -> Signature { @@ -1279,49 +1279,49 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Tagger; type Name; + type Tagger; type Target; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Tagger = Unset; type Name = Unset; + type Tagger = Unset; type Target = Unset; } - ///State transition - sets the `tagger` field to Set - pub struct SetTagger(PhantomData St>); - impl sealed::Sealed for SetTagger {} - impl State for SetTagger { - type Tagger = Set; - type Name = St::Name; - type Target = St::Target; - } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Tagger = St::Tagger; type Name = Set; + type Tagger = St::Tagger; + type Target = St::Target; + } + ///State transition - sets the `tagger` field to Set + pub struct SetTagger(PhantomData St>); + impl sealed::Sealed for SetTagger {} + impl State for SetTagger { + type Name = St::Name; + type Tagger = Set; type Target = St::Target; } ///State transition - sets the `target` field to Set pub struct SetTarget(PhantomData St>); impl sealed::Sealed for SetTarget {} impl State for SetTarget { - type Tagger = St::Tagger; type Name = St::Name; + type Tagger = St::Tagger; type Target = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `tagger` field - pub struct tagger(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `tagger` field + pub struct tagger(()); ///Marker type for the `target` field pub struct target(()); } @@ -1422,8 +1422,8 @@ where impl TagBuilder where St: tag_state::State, - St::Tagger: tag_state::IsSet, St::Name: tag_state::IsSet, + St::Tagger: tag_state::IsSet, St::Target: tag_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/git/temp/analyze_merge.rs b/crates/jacquard-api/src/sh_tangled/git/temp/analyze_merge.rs index d330ac920..2c4651a53 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp/analyze_merge.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp/analyze_merge.rs @@ -211,51 +211,51 @@ pub mod analyze_merge_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Branch; type Repo; type Patch; - type Branch; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Branch = Unset; type Repo = Unset; type Patch = Unset; - type Branch = Unset; + } + ///State transition - sets the `branch` field to Set + pub struct SetBranch(PhantomData St>); + impl sealed::Sealed for SetBranch {} + impl State for SetBranch { + type Branch = Set; + type Repo = St::Repo; + type Patch = St::Patch; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { + type Branch = St::Branch; type Repo = Set; type Patch = St::Patch; - type Branch = St::Branch; } ///State transition - sets the `patch` field to Set pub struct SetPatch(PhantomData St>); impl sealed::Sealed for SetPatch {} impl State for SetPatch { - type Repo = St::Repo; - type Patch = Set; type Branch = St::Branch; - } - ///State transition - sets the `branch` field to Set - pub struct SetBranch(PhantomData St>); - impl sealed::Sealed for SetBranch {} - impl State for SetBranch { type Repo = St::Repo; - type Patch = St::Patch; - type Branch = Set; + type Patch = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `branch` field + pub struct branch(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `patch` field pub struct patch(()); - ///Marker type for the `branch` field - pub struct branch(()); } } @@ -344,9 +344,9 @@ where impl AnalyzeMergeBuilder where St: analyze_merge_state::State, + St::Branch: analyze_merge_state::IsSet, St::Repo: analyze_merge_state::IsSet, St::Patch: analyze_merge_state::IsSet, - St::Branch: analyze_merge_state::IsSet, { /// Build the final struct. pub fn build(self) -> AnalyzeMerge { diff --git a/crates/jacquard-api/src/sh_tangled/git/temp/get_commit.rs b/crates/jacquard-api/src/sh_tangled/git/temp/get_commit.rs index f2d5b66a4..9c55fb291 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp/get_commit.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp/get_commit.rs @@ -132,37 +132,37 @@ pub mod get_commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; type Repo; + type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; type Repo = Unset; - } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; - type Repo = St::Repo; + type Ref = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Ref = St::Ref; type Repo = Set; + type Ref = St::Ref; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { + type Repo = St::Repo; + type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `ref` field + pub struct r#ref(()); } } @@ -232,8 +232,8 @@ where impl GetCommitBuilder where St: get_commit_state::State, - St::Ref: get_commit_state::IsSet, St::Repo: get_commit_state::IsSet, + St::Ref: get_commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetCommit { diff --git a/crates/jacquard-api/src/sh_tangled/git/temp/get_diff.rs b/crates/jacquard-api/src/sh_tangled/git/temp/get_diff.rs index 71dfb4273..6a1fe7720 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp/get_diff.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp/get_diff.rs @@ -160,49 +160,49 @@ pub mod get_diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev1; type Rev2; + type Rev1; type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev1 = Unset; type Rev2 = Unset; + type Rev1 = Unset; type Repo = Unset; } - ///State transition - sets the `rev1` field to Set - pub struct SetRev1(PhantomData St>); - impl sealed::Sealed for SetRev1 {} - impl State for SetRev1 { - type Rev1 = Set; - type Rev2 = St::Rev2; - type Repo = St::Repo; - } ///State transition - sets the `rev2` field to Set pub struct SetRev2(PhantomData St>); impl sealed::Sealed for SetRev2 {} impl State for SetRev2 { - type Rev1 = St::Rev1; type Rev2 = Set; + type Rev1 = St::Rev1; + type Repo = St::Repo; + } + ///State transition - sets the `rev1` field to Set + pub struct SetRev1(PhantomData St>); + impl sealed::Sealed for SetRev1 {} + impl State for SetRev1 { + type Rev2 = St::Rev2; + type Rev1 = Set; type Repo = St::Repo; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Rev1 = St::Rev1; type Rev2 = St::Rev2; + type Rev1 = St::Rev1; type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev1` field - pub struct rev1(()); ///Marker type for the `rev2` field pub struct rev2(()); + ///Marker type for the `rev1` field + pub struct rev1(()); ///Marker type for the `repo` field pub struct repo(()); } @@ -293,8 +293,8 @@ where impl GetDiffBuilder where St: get_diff_state::State, - St::Rev1: get_diff_state::IsSet, St::Rev2: get_diff_state::IsSet, + St::Rev1: get_diff_state::IsSet, St::Repo: get_diff_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/git/temp/get_tree.rs b/crates/jacquard-api/src/sh_tangled/git/temp/get_tree.rs index 15f7e6944..e13e45c38 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp/get_tree.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp/get_tree.rs @@ -284,51 +284,51 @@ pub mod last_commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type When; type Message; type Hash; + type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type When = Unset; type Message = Unset; type Hash = Unset; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { - type When = Set; - type Message = St::Message; - type Hash = St::Hash; + type When = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type When = St::When; type Message = Set; type Hash = St::Hash; + type When = St::When; } ///State transition - sets the `hash` field to Set pub struct SetHash(PhantomData St>); impl sealed::Sealed for SetHash {} impl State for SetHash { - type When = St::When; type Message = St::Message; type Hash = Set; + type When = St::When; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type Message = St::Message; + type Hash = St::Hash; + type When = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `when` field - pub struct when(()); ///Marker type for the `message` field pub struct message(()); ///Marker type for the `hash` field pub struct hash(()); + ///Marker type for the `when` field + pub struct when(()); } } @@ -430,9 +430,9 @@ where impl LastCommitBuilder where St: last_commit_state::State, - St::When: last_commit_state::IsSet, St::Message: last_commit_state::IsSet, St::Hash: last_commit_state::IsSet, + St::When: last_commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> LastCommit { @@ -843,50 +843,50 @@ pub mod signature_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Email; - type When; type Name; + type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Email = Unset; - type When = Unset; type Name = Unset; + type When = Unset; } ///State transition - sets the `email` field to Set pub struct SetEmail(PhantomData St>); impl sealed::Sealed for SetEmail {} impl State for SetEmail { type Email = Set; - type When = St::When; - type Name = St::Name; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { - type Email = St::Email; - type When = Set; type Name = St::Name; + type When = St::When; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { type Email = St::Email; - type When = St::When; type Name = Set; + type When = St::When; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type Email = St::Email; + type Name = St::Name; + type When = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `email` field pub struct email(()); - ///Marker type for the `when` field - pub struct when(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `when` field + pub struct when(()); } } @@ -976,8 +976,8 @@ impl SignatureBuilder where St: signature_state::State, St::Email: signature_state::IsSet, - St::When: signature_state::IsSet, St::Name: signature_state::IsSet, + St::When: signature_state::IsSet, { /// Build the final struct. pub fn build(self) -> Signature { @@ -1013,50 +1013,50 @@ pub mod tree_entry_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Mode; - type Name; type Size; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Mode = Unset; - type Name = Unset; type Size = Unset; + type Name = Unset; } ///State transition - sets the `mode` field to Set pub struct SetMode(PhantomData St>); impl sealed::Sealed for SetMode {} impl State for SetMode { type Mode = Set; - type Name = St::Name; - type Size = St::Size; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Mode = St::Mode; - type Name = Set; type Size = St::Size; + type Name = St::Name; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { type Mode = St::Mode; - type Name = St::Name; type Size = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Mode = St::Mode; + type Size = St::Size; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `mode` field pub struct mode(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `size` field pub struct size(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -1162,8 +1162,8 @@ impl TreeEntryBuilder where St: tree_entry_state::State, St::Mode: tree_entry_state::IsSet, - St::Name: tree_entry_state::IsSet, St::Size: tree_entry_state::IsSet, + St::Name: tree_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> TreeEntry { diff --git a/crates/jacquard-api/src/sh_tangled/git/temp/list_languages.rs b/crates/jacquard-api/src/sh_tangled/git/temp/list_languages.rs index 287360513..c509aa69a 100644 --- a/crates/jacquard-api/src/sh_tangled/git/temp/list_languages.rs +++ b/crates/jacquard-api/src/sh_tangled/git/temp/list_languages.rs @@ -188,51 +188,51 @@ pub mod language_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Percentage; type Size; type Name; - type Percentage; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Percentage = Unset; type Size = Unset; type Name = Unset; - type Percentage = Unset; + } + ///State transition - sets the `percentage` field to Set + pub struct SetPercentage(PhantomData St>); + impl sealed::Sealed for SetPercentage {} + impl State for SetPercentage { + type Percentage = Set; + type Size = St::Size; + type Name = St::Name; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { + type Percentage = St::Percentage; type Size = Set; type Name = St::Name; - type Percentage = St::Percentage; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Size = St::Size; - type Name = Set; type Percentage = St::Percentage; - } - ///State transition - sets the `percentage` field to Set - pub struct SetPercentage(PhantomData St>); - impl sealed::Sealed for SetPercentage {} - impl State for SetPercentage { type Size = St::Size; - type Name = St::Name; - type Percentage = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `percentage` field + pub struct percentage(()); ///Marker type for the `size` field pub struct size(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `percentage` field - pub struct percentage(()); } } @@ -367,9 +367,9 @@ where impl LanguageBuilder where St: language_state::State, + St::Percentage: language_state::IsSet, St::Size: language_state::IsSet, St::Name: language_state::IsSet, - St::Percentage: language_state::IsSet, { /// Build the final struct. pub fn build(self) -> Language { diff --git a/crates/jacquard-api/src/sh_tangled/graph/follow.rs b/crates/jacquard-api/src/sh_tangled/graph/follow.rs index de8d02a5b..2c3e6153d 100644 --- a/crates/jacquard-api/src/sh_tangled/graph/follow.rs +++ b/crates/jacquard-api/src/sh_tangled/graph/follow.rs @@ -111,37 +111,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -211,8 +211,8 @@ where impl FollowBuilder where St: follow_state::State, - St::Subject: follow_state::IsSet, St::CreatedAt: follow_state::IsSet, + St::Subject: follow_state::IsSet, { /// Build the final struct. pub fn build(self) -> Follow { diff --git a/crates/jacquard-api/src/sh_tangled/knot.rs b/crates/jacquard-api/src/sh_tangled/knot.rs index f8e60d736..fbbdf5d09 100644 --- a/crates/jacquard-api/src/sh_tangled/knot.rs +++ b/crates/jacquard-api/src/sh_tangled/knot.rs @@ -7,6 +7,10 @@ pub mod list_keys; pub mod member; + + +#[cfg(feature = "streaming")] +pub mod subscribe_repos; pub mod version; diff --git a/crates/jacquard-api/src/sh_tangled/knot/list_keys.rs b/crates/jacquard-api/src/sh_tangled/knot/list_keys.rs index da01533aa..e23c90c10 100644 --- a/crates/jacquard-api/src/sh_tangled/knot/list_keys.rs +++ b/crates/jacquard-api/src/sh_tangled/knot/list_keys.rs @@ -253,49 +253,49 @@ pub mod public_key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Key; + type Did; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Key = Unset; + type Did = Unset; type CreatedAt = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Key = St::Key; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData St>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type Did = St::Did; type Key = Set; + type Did = St::Did; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Key = St::Key; + type Did = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Did = St::Did; type Key = St::Key; + type Did = St::Did; type CreatedAt = 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 `key` field pub struct key(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -386,8 +386,8 @@ where impl PublicKeyBuilder where St: public_key_state::State, - St::Did: public_key_state::IsSet, St::Key: public_key_state::IsSet, + St::Did: public_key_state::IsSet, St::CreatedAt: public_key_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/knot/subscribe_repos.rs b/crates/jacquard-api/src/sh_tangled/knot/subscribe_repos.rs new file mode 100644 index 000000000..4f2154fcb --- /dev/null +++ b/crates/jacquard-api/src/sh_tangled/knot/subscribe_repos.rs @@ -0,0 +1,865 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.tangled.knot.subscribeRepos +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::string::{Did, AtUri, Datetime}; +use jacquard_common::types::value::Data; +use jacquard_derive::{IntoStatic, open_union}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +use crate::sh_tangled::knot::subscribe_repos; + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct GitSync1 { + ///Repository DID identifier + pub did: Did, + ///The stream sequence number of this message. + pub seq: i64, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct GitSync2 { + ///Repository AT-URI identifier + #[serde(skip_serializing_if = "Option::is_none")] + pub did: Option>, + ///The stream sequence number of this message. + pub seq: i64, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct Identity { + ///Repository DID identifier + pub did: Did, + ///The stream sequence number of this message. + pub seq: i64, + pub time: Datetime, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct SubscribeRepos { + #[serde(skip_serializing_if = "Option::is_none")] + pub cursor: Option, +} + + +#[open_union] +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(tag = "$type", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub enum SubscribeReposMessage { + #[serde(rename = "#identity")] + Identity(Box>), + #[serde(rename = "gitRefUpdate")] + GitRefUpdate(Box>), +} + +impl SubscribeReposMessage { + /// Decode a framed DAG-CBOR message (header + body). + pub fn decode_framed<'de>( + bytes: &'de [u8], + ) -> Result, jacquard_common::error::DecodeError> + where + S: serde::Deserialize<'de>, + { + let (header, body) = jacquard_common::xrpc::subscription::parse_event_header( + bytes, + )?; + match header.t.as_str() { + "#identity" => { + let variant = jacquard_common::deps::codegen::serde_ipld_dagcbor::from_slice( + body, + )?; + Ok(Self::Identity(Box::new(variant))) + } + "gitRefUpdate" => { + let variant = jacquard_common::deps::codegen::serde_ipld_dagcbor::from_slice( + body, + )?; + Ok(Self::GitRefUpdate(Box::new(variant))) + } + unknown => { + Err( + jacquard_common::error::DecodeError::UnknownEventType(unknown.into()), + ) + } + } + } +} + + +#[derive( + Serialize, + Deserialize, + Debug, + Clone, + PartialEq, + Eq, + thiserror::Error, + miette::Diagnostic +)] + +#[serde(tag = "error", content = "message")] +pub enum SubscribeReposError { + #[serde(rename = "FutureCursor")] + FutureCursor(Option), + /// If the consumer of the stream can not keep up with events, and a backlog gets too large, the server will drop the connection. + #[serde(rename = "ConsumerTooSlow")] + ConsumerTooSlow(Option), + /// Catch-all for unknown error codes. + #[serde(untagged)] + Other { error: SmolStr, message: Option }, +} + +impl core::fmt::Display for SubscribeReposError { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::FutureCursor(msg) => { + write!(f, "FutureCursor")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::ConsumerTooSlow(msg) => { + write!(f, "ConsumerTooSlow")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::Other { error, message } => { + write!(f, "{}", error)?; + if let Some(msg) = message { + write!(f, ": {}", msg)?; + } + Ok(()) + } + } + } +} + +impl LexiconSchema for GitSync1 { + fn nsid() -> &'static str { + "sh.tangled.knot.subscribeRepos" + } + fn def_name() -> &'static str { + "gitSync1" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_sh_tangled_knot_subscribeRepos() + } + fn validate(&self) -> Result<(), ConstraintError> { + Ok(()) + } +} + +impl LexiconSchema for GitSync2 { + fn nsid() -> &'static str { + "sh.tangled.knot.subscribeRepos" + } + fn def_name() -> &'static str { + "gitSync2" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_sh_tangled_knot_subscribeRepos() + } + fn validate(&self) -> Result<(), ConstraintError> { + Ok(()) + } +} + +impl LexiconSchema for Identity { + fn nsid() -> &'static str { + "sh.tangled.knot.subscribeRepos" + } + fn def_name() -> &'static str { + "identity" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_sh_tangled_knot_subscribeRepos() + } + fn validate(&self) -> Result<(), ConstraintError> { + Ok(()) + } +} + +///Stream response type for +///sh.tangled.knot.subscribeRepos +pub struct SubscribeReposStream; +impl jacquard_common::xrpc::SubscriptionResp for SubscribeReposStream { + const NSID: &'static str = "sh.tangled.knot.subscribeRepos"; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::Json; + type Message = SubscribeReposMessage; + type Error = SubscribeReposError; +} + +impl jacquard_common::xrpc::XrpcSubscription for SubscribeRepos { + const NSID: &'static str = "sh.tangled.knot.subscribeRepos"; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::Json; + type Stream = SubscribeReposStream; +} + +pub struct SubscribeReposEndpoint; +impl jacquard_common::xrpc::SubscriptionEndpoint for SubscribeReposEndpoint { + const PATH: &'static str = "/xrpc/sh.tangled.knot.subscribeRepos"; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::Json; + type Params = SubscribeRepos; + type Stream = SubscribeReposStream; +} + +pub mod git_sync1_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 Did; + type Seq; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Did = Unset; + type Seq = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; + type Seq = St::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Did = St::Did; + type Seq = 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 `seq` field + pub struct seq(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct GitSync1Builder { + _state: PhantomData St>, + _fields: (Option>, Option), + _type: PhantomData S>, +} + +impl GitSync1 { + /// Create a new builder for this type. + pub fn new() -> GitSync1Builder { + GitSync1Builder::new() + } +} + +impl GitSync1Builder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + GitSync1Builder { + _state: PhantomData, + _fields: (None, None), + _type: PhantomData, + } + } +} + +impl GitSync1Builder +where + St: git_sync1_state::State, + St::Did: git_sync1_state::IsUnset, +{ + /// Set the `did` field (required) + pub fn did( + mut self, + value: impl Into>, + ) -> GitSync1Builder> { + self._fields.0 = Option::Some(value.into()); + GitSync1Builder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl GitSync1Builder +where + St: git_sync1_state::State, + St::Seq: git_sync1_state::IsUnset, +{ + /// Set the `seq` field (required) + pub fn seq( + mut self, + value: impl Into, + ) -> GitSync1Builder> { + self._fields.1 = Option::Some(value.into()); + GitSync1Builder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl GitSync1Builder +where + St: git_sync1_state::State, + St::Did: git_sync1_state::IsSet, + St::Seq: git_sync1_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> GitSync1 { + GitSync1 { + did: self._fields.0.unwrap(), + seq: self._fields.1.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> GitSync1 { + GitSync1 { + did: self._fields.0.unwrap(), + seq: self._fields.1.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_sh_tangled_knot_subscribeRepos() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("sh.tangled.knot.subscribeRepos"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("gitSync1"), + LexUserType::Object(LexObject { + required: Some( + vec![SmolStr::new_static("seq"), SmolStr::new_static("did")], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("did"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Repository DID identifier"), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("seq"), + LexObjectProperty::Integer(LexInteger { + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("gitSync2"), + LexUserType::Object(LexObject { + required: Some( + vec![SmolStr::new_static("seq"), SmolStr::new_static("repo")], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("did"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Repository AT-URI identifier"), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("seq"), + LexObjectProperty::Integer(LexInteger { + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("identity"), + LexUserType::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("seq"), SmolStr::new_static("did"), + SmolStr::new_static("time") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("did"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Repository DID identifier"), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("seq"), + LexObjectProperty::Integer(LexInteger { + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("time"), + LexObjectProperty::String(LexString { + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("main"), + LexUserType::XrpcSubscription(LexXrpcSubscription { + parameters: Some( + LexXrpcSubscriptionParameter::Params(LexXrpcParameters { + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("cursor"), + LexXrpcParametersProperty::Integer(LexInteger { + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} + +pub mod git_sync2_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 Repo; + type Seq; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Repo = Unset; + type Seq = Unset; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; + type Seq = St::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Repo = St::Repo; + type Seq = 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 `seq` field + pub struct seq(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct GitSync2Builder { + _state: PhantomData St>, + _fields: (Option>, Option), + _type: PhantomData S>, +} + +impl GitSync2 { + /// Create a new builder for this type. + pub fn new() -> GitSync2Builder { + GitSync2Builder::new() + } +} + +impl GitSync2Builder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + GitSync2Builder { + _state: PhantomData, + _fields: (None, None), + _type: PhantomData, + } + } +} + +impl GitSync2Builder { + /// Set the `did` field (optional) + pub fn did(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `did` field to an Option value (optional) + pub fn maybe_did(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl GitSync2Builder +where + St: git_sync2_state::State, + St::Seq: git_sync2_state::IsUnset, +{ + /// Set the `seq` field (required) + pub fn seq( + mut self, + value: impl Into, + ) -> GitSync2Builder> { + self._fields.1 = Option::Some(value.into()); + GitSync2Builder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl GitSync2Builder +where + St: git_sync2_state::State, + St::Repo: git_sync2_state::IsSet, + St::Seq: git_sync2_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> GitSync2 { + GitSync2 { + did: self._fields.0, + seq: self._fields.1.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> GitSync2 { + GitSync2 { + did: self._fields.0, + seq: self._fields.1.unwrap(), + extra_data: Some(extra_data), + } + } +} + +pub mod identity_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 Did; + type Seq; + type Time; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Did = Unset; + type Seq = Unset; + type Time = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; + type Seq = St::Seq; + type Time = St::Time; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData St>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Did = St::Did; + type Seq = Set; + type Time = St::Time; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData St>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Did = St::Did; + type Seq = St::Seq; + type Time = 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 `seq` field + pub struct seq(()); + ///Marker type for the `time` field + pub struct time(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct IdentityBuilder { + _state: PhantomData St>, + _fields: (Option>, Option, Option), + _type: PhantomData S>, +} + +impl Identity { + /// Create a new builder for this type. + pub fn new() -> IdentityBuilder { + IdentityBuilder::new() + } +} + +impl IdentityBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + IdentityBuilder { + _state: PhantomData, + _fields: (None, None, None), + _type: PhantomData, + } + } +} + +impl IdentityBuilder +where + St: identity_state::State, + St::Did: identity_state::IsUnset, +{ + /// Set the `did` field (required) + pub fn did( + mut self, + value: impl Into>, + ) -> IdentityBuilder> { + self._fields.0 = Option::Some(value.into()); + IdentityBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl IdentityBuilder +where + St: identity_state::State, + St::Seq: identity_state::IsUnset, +{ + /// Set the `seq` field (required) + pub fn seq( + mut self, + value: impl Into, + ) -> IdentityBuilder> { + self._fields.1 = Option::Some(value.into()); + IdentityBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl IdentityBuilder +where + St: identity_state::State, + St::Time: identity_state::IsUnset, +{ + /// Set the `time` field (required) + pub fn time( + mut self, + value: impl Into, + ) -> IdentityBuilder> { + self._fields.2 = Option::Some(value.into()); + IdentityBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl IdentityBuilder +where + St: identity_state::State, + St::Did: identity_state::IsSet, + St::Seq: identity_state::IsSet, + St::Time: identity_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Identity { + Identity { + did: self._fields.0.unwrap(), + seq: self._fields.1.unwrap(), + time: self._fields.2.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Identity { + Identity { + did: self._fields.0.unwrap(), + seq: self._fields.1.unwrap(), + time: self._fields.2.unwrap(), + extra_data: Some(extra_data), + } + } +} + +pub mod subscribe_repos_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 {} + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty {} + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members {} +} + +/// Builder for constructing an instance of this type. +pub struct SubscribeReposBuilder { + _state: PhantomData St>, + _fields: (Option,), +} + +impl SubscribeRepos { + /// Create a new builder for this type. + pub fn new() -> SubscribeReposBuilder { + SubscribeReposBuilder::new() + } +} + +impl SubscribeReposBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + SubscribeReposBuilder { + _state: PhantomData, + _fields: (None,), + } + } +} + +impl SubscribeReposBuilder { + /// Set the `cursor` field (optional) + pub fn cursor(mut self, value: impl Into>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `cursor` field to an Option value (optional) + pub fn maybe_cursor(mut self, value: Option) -> Self { + self._fields.0 = value; + self + } +} + +impl SubscribeReposBuilder +where + St: subscribe_repos_state::State, +{ + /// Build the final struct. + pub fn build(self) -> SubscribeRepos { + SubscribeRepos { + cursor: self._fields.0, + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/sh_tangled/label/definition.rs b/crates/jacquard-api/src/sh_tangled/label/definition.rs index cec14d0ea..2cf819aa3 100644 --- a/crates/jacquard-api/src/sh_tangled/label/definition.rs +++ b/crates/jacquard-api/src/sh_tangled/label/definition.rs @@ -179,67 +179,67 @@ pub mod definition_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; - type Scope; type ValueType; + type Name; type CreatedAt; + type Scope; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; - type Scope = Unset; type ValueType = Unset; + type Name = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Scope = St::Scope; - type ValueType = St::ValueType; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData St>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { - type Name = St::Name; - type Scope = Set; - type ValueType = St::ValueType; - type CreatedAt = St::CreatedAt; + type Scope = Unset; } ///State transition - sets the `value_type` field to Set pub struct SetValueType(PhantomData St>); impl sealed::Sealed for SetValueType {} impl State for SetValueType { + type ValueType = Set; type Name = St::Name; + type CreatedAt = St::CreatedAt; type Scope = St::Scope; - type ValueType = Set; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type ValueType = St::ValueType; + type Name = Set; type CreatedAt = St::CreatedAt; + type Scope = St::Scope; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type ValueType = St::ValueType; type Name = St::Name; + type CreatedAt = Set; type Scope = St::Scope; + } + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData St>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { type ValueType = St::ValueType; - type CreatedAt = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type Scope = 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 `scope` field - pub struct scope(()); ///Marker type for the `value_type` field pub struct value_type(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `scope` field + pub struct scope(()); } } @@ -380,10 +380,10 @@ where impl DefinitionBuilder where St: definition_state::State, - St::Name: definition_state::IsSet, - St::Scope: definition_state::IsSet, St::ValueType: definition_state::IsSet, + St::Name: definition_state::IsSet, St::CreatedAt: definition_state::IsSet, + St::Scope: definition_state::IsSet, { /// Build the final struct. pub fn build(self) -> Definition { diff --git a/crates/jacquard-api/src/sh_tangled/label/op.rs b/crates/jacquard-api/src/sh_tangled/label/op.rs index b2be64329..d77f5dbfd 100644 --- a/crates/jacquard-api/src/sh_tangled/label/op.rs +++ b/crates/jacquard-api/src/sh_tangled/label/op.rs @@ -142,65 +142,65 @@ pub mod op_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Delete; type Subject; type PerformedAt; - type Delete; type Add; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Delete = Unset; type Subject = Unset; type PerformedAt = Unset; - type Delete = Unset; type Add = Unset; } + ///State transition - sets the `delete` field to Set + pub struct SetDelete(PhantomData St>); + impl sealed::Sealed for SetDelete {} + impl State for SetDelete { + type Delete = Set; + type Subject = St::Subject; + type PerformedAt = St::PerformedAt; + type Add = St::Add; + } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type Delete = St::Delete; type Subject = Set; type PerformedAt = St::PerformedAt; - type Delete = St::Delete; type Add = St::Add; } ///State transition - sets the `performed_at` field to Set pub struct SetPerformedAt(PhantomData St>); impl sealed::Sealed for SetPerformedAt {} impl State for SetPerformedAt { - type Subject = St::Subject; - type PerformedAt = Set; type Delete = St::Delete; - type Add = St::Add; - } - ///State transition - sets the `delete` field to Set - pub struct SetDelete(PhantomData St>); - impl sealed::Sealed for SetDelete {} - impl State for SetDelete { type Subject = St::Subject; - type PerformedAt = St::PerformedAt; - type Delete = Set; + type PerformedAt = Set; type Add = St::Add; } ///State transition - sets the `add` field to Set pub struct SetAdd(PhantomData St>); impl sealed::Sealed for SetAdd {} impl State for SetAdd { + type Delete = St::Delete; type Subject = St::Subject; type PerformedAt = St::PerformedAt; - type Delete = St::Delete; type Add = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `delete` field + pub struct delete(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `performed_at` field pub struct performed_at(()); - ///Marker type for the `delete` field - pub struct delete(()); ///Marker type for the `add` field pub struct add(()); } @@ -315,9 +315,9 @@ where impl OpBuilder where St: op_state::State, + St::Delete: op_state::IsSet, St::Subject: op_state::IsSet, St::PerformedAt: op_state::IsSet, - St::Delete: op_state::IsSet, St::Add: op_state::IsSet, { /// Build the final struct. @@ -464,37 +464,37 @@ pub mod operand_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Key; type Value; + type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Key = Unset; type Value = Unset; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { - type Key = Set; - type Value = St::Value; + type Key = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Key = St::Key; type Value = Set; + type Key = St::Key; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Value = St::Value; + type Key = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `key` field - pub struct key(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `key` field + pub struct key(()); } } @@ -564,8 +564,8 @@ where impl OperandBuilder where St: operand_state::State, - St::Key: operand_state::IsSet, St::Value: operand_state::IsSet, + St::Key: operand_state::IsSet, { /// Build the final struct. pub fn build(self) -> Operand { diff --git a/crates/jacquard-api/src/sh_tangled/pipeline.rs b/crates/jacquard-api/src/sh_tangled/pipeline.rs index f51c78286..23d50d13c 100644 --- a/crates/jacquard-api/src/sh_tangled/pipeline.rs +++ b/crates/jacquard-api/src/sh_tangled/pipeline.rs @@ -396,51 +396,51 @@ pub mod clone_opts_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Skip; type Depth; type Submodules; - type Skip; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Skip = Unset; type Depth = Unset; type Submodules = Unset; - type Skip = Unset; + } + ///State transition - sets the `skip` field to Set + pub struct SetSkip(PhantomData St>); + impl sealed::Sealed for SetSkip {} + impl State for SetSkip { + type Skip = Set; + type Depth = St::Depth; + type Submodules = St::Submodules; } ///State transition - sets the `depth` field to Set pub struct SetDepth(PhantomData St>); impl sealed::Sealed for SetDepth {} impl State for SetDepth { + type Skip = St::Skip; type Depth = Set; type Submodules = St::Submodules; - type Skip = St::Skip; } ///State transition - sets the `submodules` field to Set pub struct SetSubmodules(PhantomData St>); impl sealed::Sealed for SetSubmodules {} impl State for SetSubmodules { - type Depth = St::Depth; - type Submodules = Set; type Skip = St::Skip; - } - ///State transition - sets the `skip` field to Set - pub struct SetSkip(PhantomData St>); - impl sealed::Sealed for SetSkip {} - impl State for SetSkip { type Depth = St::Depth; - type Submodules = St::Submodules; - type Skip = Set; + type Submodules = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `skip` field + pub struct skip(()); ///Marker type for the `depth` field pub struct depth(()); ///Marker type for the `submodules` field pub struct submodules(()); - ///Marker type for the `skip` field - pub struct skip(()); } } @@ -529,9 +529,9 @@ where impl CloneOptsBuilder where St: clone_opts_state::State, + St::Skip: clone_opts_state::IsSet, St::Depth: clone_opts_state::IsSet, St::Submodules: clone_opts_state::IsSet, - St::Skip: clone_opts_state::IsSet, { /// Build the final struct. pub fn build(self) -> CloneOpts { @@ -893,37 +893,37 @@ pub mod pipeline_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Workflows; type TriggerMetadata; + type Workflows; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Workflows = Unset; type TriggerMetadata = Unset; - } - ///State transition - sets the `workflows` field to Set - pub struct SetWorkflows(PhantomData St>); - impl sealed::Sealed for SetWorkflows {} - impl State for SetWorkflows { - type Workflows = Set; - type TriggerMetadata = St::TriggerMetadata; + type Workflows = Unset; } ///State transition - sets the `trigger_metadata` field to Set pub struct SetTriggerMetadata(PhantomData St>); impl sealed::Sealed for SetTriggerMetadata {} impl State for SetTriggerMetadata { - type Workflows = St::Workflows; type TriggerMetadata = Set; + type Workflows = St::Workflows; + } + ///State transition - sets the `workflows` field to Set + pub struct SetWorkflows(PhantomData St>); + impl sealed::Sealed for SetWorkflows {} + impl State for SetWorkflows { + type TriggerMetadata = St::TriggerMetadata; + type Workflows = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `workflows` field - pub struct workflows(()); ///Marker type for the `trigger_metadata` field pub struct trigger_metadata(()); + ///Marker type for the `workflows` field + pub struct workflows(()); } } @@ -993,8 +993,8 @@ where impl PipelineBuilder where St: pipeline_state::State, - St::Workflows: pipeline_state::IsSet, St::TriggerMetadata: pipeline_state::IsSet, + St::Workflows: pipeline_state::IsSet, { /// Build the final struct. pub fn build(self) -> Pipeline { @@ -1024,37 +1024,37 @@ pub mod trigger_metadata_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Kind; + 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 Kind = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Kind = St::Kind; + type Repo = Unset; } ///State transition - sets the `kind` field to Set pub struct SetKind(PhantomData St>); impl sealed::Sealed for SetKind {} impl State for SetKind { - type Repo = St::Repo; type Kind = Set; + type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Kind = St::Kind; + 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 `kind` field pub struct kind(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -1184,8 +1184,8 @@ where impl TriggerMetadataBuilder where St: trigger_metadata_state::State, - St::Repo: trigger_metadata_state::IsSet, St::Kind: trigger_metadata_state::IsSet, + St::Repo: trigger_metadata_state::IsSet, { /// Build the final struct. pub fn build(self) -> TriggerMetadata { @@ -1225,8 +1225,8 @@ pub mod trigger_repo_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Knot; - type Did; type Repo; + type Did; type DefaultBranch; } /// Empty state - all required fields are unset @@ -1234,8 +1234,8 @@ pub mod trigger_repo_state { impl sealed::Sealed for Empty {} impl State for Empty { type Knot = Unset; - type Did = Unset; type Repo = Unset; + type Did = Unset; type DefaultBranch = Unset; } ///State transition - sets the `knot` field to Set @@ -1243,17 +1243,8 @@ pub mod trigger_repo_state { impl sealed::Sealed for SetKnot {} impl State for SetKnot { type Knot = Set; - type Did = St::Did; - type Repo = St::Repo; - type DefaultBranch = St::DefaultBranch; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Knot = St::Knot; - type Did = Set; type Repo = St::Repo; + type Did = St::Did; type DefaultBranch = St::DefaultBranch; } ///State transition - sets the `repo` field to Set @@ -1261,8 +1252,17 @@ pub mod trigger_repo_state { impl sealed::Sealed for SetRepo {} impl State for SetRepo { type Knot = St::Knot; - type Did = St::Did; type Repo = Set; + type Did = St::Did; + type DefaultBranch = St::DefaultBranch; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Knot = St::Knot; + type Repo = St::Repo; + type Did = Set; type DefaultBranch = St::DefaultBranch; } ///State transition - sets the `default_branch` field to Set @@ -1270,8 +1270,8 @@ pub mod trigger_repo_state { impl sealed::Sealed for SetDefaultBranch {} impl State for SetDefaultBranch { type Knot = St::Knot; - type Did = St::Did; type Repo = St::Repo; + type Did = St::Did; type DefaultBranch = Set; } /// Marker types for field names @@ -1279,10 +1279,10 @@ pub mod trigger_repo_state { pub mod members { ///Marker type for the `knot` field pub struct knot(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `default_branch` field pub struct default_branch(()); } @@ -1393,8 +1393,8 @@ impl TriggerRepoBuilder where St: trigger_repo_state::State, St::Knot: trigger_repo_state::IsSet, - St::Did: trigger_repo_state::IsSet, St::Repo: trigger_repo_state::IsSet, + St::Did: trigger_repo_state::IsSet, St::DefaultBranch: trigger_repo_state::IsSet, { /// Build the final struct. @@ -1432,67 +1432,67 @@ pub mod workflow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Clone; type Engine; - type Raw; + type Clone; type Name; + type Raw; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Clone = Unset; type Engine = Unset; - type Raw = Unset; + type Clone = Unset; type Name = Unset; - } - ///State transition - sets the `clone` field to Set - pub struct SetClone(PhantomData St>); - impl sealed::Sealed for SetClone {} - impl State for SetClone { - type Clone = Set; - type Engine = St::Engine; - type Raw = St::Raw; - type Name = St::Name; + type Raw = Unset; } ///State transition - sets the `engine` field to Set pub struct SetEngine(PhantomData St>); impl sealed::Sealed for SetEngine {} impl State for SetEngine { - type Clone = St::Clone; type Engine = Set; - type Raw = St::Raw; + type Clone = St::Clone; type Name = St::Name; + type Raw = St::Raw; } - ///State transition - sets the `raw` field to Set - pub struct SetRaw(PhantomData St>); - impl sealed::Sealed for SetRaw {} - impl State for SetRaw { - type Clone = St::Clone; + ///State transition - sets the `clone` field to Set + pub struct SetClone(PhantomData St>); + impl sealed::Sealed for SetClone {} + impl State for SetClone { type Engine = St::Engine; - type Raw = Set; + type Clone = Set; type Name = St::Name; + type Raw = St::Raw; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Clone = St::Clone; type Engine = St::Engine; - type Raw = St::Raw; + type Clone = St::Clone; type Name = Set; + type Raw = St::Raw; + } + ///State transition - sets the `raw` field to Set + pub struct SetRaw(PhantomData St>); + impl sealed::Sealed for SetRaw {} + impl State for SetRaw { + type Engine = St::Engine; + type Clone = St::Clone; + type Name = St::Name; + type Raw = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `clone` field - pub struct clone(()); ///Marker type for the `engine` field pub struct engine(()); - ///Marker type for the `raw` field - pub struct raw(()); + ///Marker type for the `clone` field + pub struct clone(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `raw` field + pub struct raw(()); } } @@ -1600,10 +1600,10 @@ where impl WorkflowBuilder where St: workflow_state::State, - St::Clone: workflow_state::IsSet, St::Engine: workflow_state::IsSet, - St::Raw: workflow_state::IsSet, + St::Clone: workflow_state::IsSet, St::Name: workflow_state::IsSet, + St::Raw: workflow_state::IsSet, { /// Build the final struct. pub fn build(self) -> Workflow { diff --git a/crates/jacquard-api/src/sh_tangled/pipeline/cancel_pipeline.rs b/crates/jacquard-api/src/sh_tangled/pipeline/cancel_pipeline.rs index 93677947a..3e2f7c107 100644 --- a/crates/jacquard-api/src/sh_tangled/pipeline/cancel_pipeline.rs +++ b/crates/jacquard-api/src/sh_tangled/pipeline/cancel_pipeline.rs @@ -68,51 +68,51 @@ pub mod cancel_pipeline_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Workflow; type Pipeline; type Repo; - type Workflow; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Workflow = Unset; type Pipeline = Unset; type Repo = Unset; - type Workflow = Unset; + } + ///State transition - sets the `workflow` field to Set + pub struct SetWorkflow(PhantomData St>); + impl sealed::Sealed for SetWorkflow {} + impl State for SetWorkflow { + type Workflow = Set; + type Pipeline = St::Pipeline; + type Repo = St::Repo; } ///State transition - sets the `pipeline` field to Set pub struct SetPipeline(PhantomData St>); impl sealed::Sealed for SetPipeline {} impl State for SetPipeline { + type Workflow = St::Workflow; type Pipeline = Set; type Repo = St::Repo; - type Workflow = St::Workflow; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Pipeline = St::Pipeline; - type Repo = Set; type Workflow = St::Workflow; - } - ///State transition - sets the `workflow` field to Set - pub struct SetWorkflow(PhantomData St>); - impl sealed::Sealed for SetWorkflow {} - impl State for SetWorkflow { type Pipeline = St::Pipeline; - type Repo = St::Repo; - type Workflow = Set; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `workflow` field + pub struct workflow(()); ///Marker type for the `pipeline` field pub struct pipeline(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `workflow` field - pub struct workflow(()); } } @@ -201,9 +201,9 @@ where impl CancelPipelineBuilder where St: cancel_pipeline_state::State, + St::Workflow: cancel_pipeline_state::IsSet, St::Pipeline: cancel_pipeline_state::IsSet, St::Repo: cancel_pipeline_state::IsSet, - St::Workflow: cancel_pipeline_state::IsSet, { /// Build the final struct. pub fn build(self) -> CancelPipeline { diff --git a/crates/jacquard-api/src/sh_tangled/pipeline/status.rs b/crates/jacquard-api/src/sh_tangled/pipeline/status.rs index 901da778b..7dead9198 100644 --- a/crates/jacquard-api/src/sh_tangled/pipeline/status.rs +++ b/crates/jacquard-api/src/sh_tangled/pipeline/status.rs @@ -123,67 +123,67 @@ pub mod status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Pipeline; type Workflow; - type CreatedAt; type Status; + type CreatedAt; + type Pipeline; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Pipeline = Unset; type Workflow = Unset; - type CreatedAt = Unset; type Status = Unset; - } - ///State transition - sets the `pipeline` field to Set - pub struct SetPipeline(PhantomData St>); - impl sealed::Sealed for SetPipeline {} - impl State for SetPipeline { - type Pipeline = Set; - type Workflow = St::Workflow; - type CreatedAt = St::CreatedAt; - type Status = St::Status; + type CreatedAt = Unset; + type Pipeline = Unset; } ///State transition - sets the `workflow` field to Set pub struct SetWorkflow(PhantomData St>); impl sealed::Sealed for SetWorkflow {} impl State for SetWorkflow { - type Pipeline = St::Pipeline; type Workflow = Set; - type CreatedAt = St::CreatedAt; type Status = St::Status; + type CreatedAt = St::CreatedAt; + type Pipeline = St::Pipeline; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Workflow = St::Workflow; + type Status = Set; + type CreatedAt = St::CreatedAt; + type Pipeline = St::Pipeline; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Pipeline = St::Pipeline; type Workflow = St::Workflow; - type CreatedAt = Set; type Status = St::Status; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { + type CreatedAt = Set; type Pipeline = St::Pipeline; + } + ///State transition - sets the `pipeline` field to Set + pub struct SetPipeline(PhantomData St>); + impl sealed::Sealed for SetPipeline {} + impl State for SetPipeline { type Workflow = St::Workflow; + type Status = St::Status; type CreatedAt = St::CreatedAt; - type Status = Set; + type Pipeline = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `pipeline` field - pub struct pipeline(()); ///Marker type for the `workflow` field pub struct workflow(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `pipeline` field + pub struct pipeline(()); } } @@ -324,10 +324,10 @@ where impl StatusBuilder where St: status_state::State, - St::Pipeline: status_state::IsSet, St::Workflow: status_state::IsSet, - St::CreatedAt: status_state::IsSet, St::Status: status_state::IsSet, + St::CreatedAt: status_state::IsSet, + St::Pipeline: status_state::IsSet, { /// Build the final struct. pub fn build(self) -> Status { diff --git a/crates/jacquard-api/src/sh_tangled/public_key.rs b/crates/jacquard-api/src/sh_tangled/public_key.rs index 45faac4c5..2f09e8f84 100644 --- a/crates/jacquard-api/src/sh_tangled/public_key.rs +++ b/crates/jacquard-api/src/sh_tangled/public_key.rs @@ -126,51 +126,51 @@ pub mod public_key_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Key; type Name; + type Key; + 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 Key = Unset; type Name = Unset; + type Key = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Key = St::Key; - type Name = St::Name; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData St>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type CreatedAt = St::CreatedAt; - type Key = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Key = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; type Key = St::Key; - type Name = 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 `key` field - pub struct key(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `key` field + pub struct key(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -259,9 +259,9 @@ where impl PublicKeyBuilder where St: public_key_state::State, - St::CreatedAt: public_key_state::IsSet, - St::Key: public_key_state::IsSet, St::Name: public_key_state::IsSet, + St::Key: public_key_state::IsSet, + St::CreatedAt: public_key_state::IsSet, { /// Build the final struct. pub fn build(self) -> PublicKey { diff --git a/crates/jacquard-api/src/sh_tangled/repo.rs b/crates/jacquard-api/src/sh_tangled/repo.rs index 7a4cdd02d..830e3cbc6 100644 --- a/crates/jacquard-api/src/sh_tangled/repo.rs +++ b/crates/jacquard-api/src/sh_tangled/repo.rs @@ -195,51 +195,51 @@ pub mod repo_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Knot; type Name; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Knot = Unset; type Name = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Knot = St::Knot; + type Name = St::Name; } ///State transition - sets the `knot` field to Set pub struct SetKnot(PhantomData St>); impl sealed::Sealed for SetKnot {} impl State for SetKnot { + type CreatedAt = St::CreatedAt; type Knot = Set; type Name = St::Name; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Knot = St::Knot; - type Name = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Knot = St::Knot; - type Name = St::Name; - type CreatedAt = Set; + type Name = 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 `knot` field pub struct knot(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -416,9 +416,9 @@ impl RepoBuilder { impl RepoBuilder where St: repo_state::State, + St::CreatedAt: repo_state::IsSet, St::Knot: repo_state::IsSet, St::Name: repo_state::IsSet, - St::CreatedAt: repo_state::IsSet, { /// Build the final struct. pub fn build(self) -> Repo { diff --git a/crates/jacquard-api/src/sh_tangled/repo/add_secret.rs b/crates/jacquard-api/src/sh_tangled/repo/add_secret.rs index 36cf8dd8c..0ad080322 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/add_secret.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/add_secret.rs @@ -65,51 +65,51 @@ pub mod add_secret_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type Repo; type Key; + type Repo; + 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 Repo = Unset; type Key = Unset; + type Repo = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Key = Set; type Repo = St::Repo; - type Key = St::Key; + type Value = St::Value; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Value = St::Value; - type Repo = Set; type Key = St::Key; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { + type Repo = Set; type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Key = St::Key; type Repo = St::Repo; - type Key = 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 `repo` field - pub struct repo(()); ///Marker type for the `key` field pub struct key(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -198,9 +198,9 @@ where impl AddSecretBuilder where St: add_secret_state::State, - St::Value: add_secret_state::IsSet, - St::Repo: add_secret_state::IsSet, St::Key: add_secret_state::IsSet, + St::Repo: add_secret_state::IsSet, + St::Value: add_secret_state::IsSet, { /// Build the final struct. pub fn build(self) -> AddSecret { diff --git a/crates/jacquard-api/src/sh_tangled/repo/artifact.rs b/crates/jacquard-api/src/sh_tangled/repo/artifact.rs index 49ff6465e..0b8db64ed 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/artifact.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/artifact.rs @@ -162,85 +162,85 @@ pub mod artifact_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; + type Name; type Repo; type Tag; + type CreatedAt; type Artifact; - type Name; } /// 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 Repo = Unset; type Tag = Unset; + type CreatedAt = Unset; type Artifact = Unset; - type Name = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Repo = St::Repo; type Tag = St::Tag; + type CreatedAt = St::CreatedAt; type Artifact = St::Artifact; - type Name = St::Name; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type CreatedAt = St::CreatedAt; + type Name = St::Name; type Repo = Set; type Tag = St::Tag; + type CreatedAt = St::CreatedAt; type Artifact = St::Artifact; - type Name = St::Name; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData St>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type CreatedAt = St::CreatedAt; + type Name = St::Name; type Repo = St::Repo; type Tag = Set; + type CreatedAt = St::CreatedAt; type Artifact = St::Artifact; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Name = St::Name; + type Repo = St::Repo; + type Tag = St::Tag; + type CreatedAt = Set; + type Artifact = St::Artifact; } ///State transition - sets the `artifact` field to Set pub struct SetArtifact(PhantomData St>); impl sealed::Sealed for SetArtifact {} impl State for SetArtifact { - type CreatedAt = St::CreatedAt; - type Repo = St::Repo; - type Tag = St::Tag; - type Artifact = Set; type Name = St::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type CreatedAt = St::CreatedAt; type Repo = St::Repo; type Tag = St::Tag; - type Artifact = St::Artifact; - type Name = Set; + type CreatedAt = St::CreatedAt; + type Artifact = 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 `repo` field pub struct repo(()); ///Marker type for the `tag` field pub struct tag(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `artifact` field pub struct artifact(()); - ///Marker type for the `name` field - pub struct name(()); } } @@ -373,11 +373,11 @@ where impl ArtifactBuilder where St: artifact_state::State, - St::CreatedAt: artifact_state::IsSet, + St::Name: artifact_state::IsSet, St::Repo: artifact_state::IsSet, St::Tag: artifact_state::IsSet, + St::CreatedAt: artifact_state::IsSet, St::Artifact: artifact_state::IsSet, - St::Name: artifact_state::IsSet, { /// Build the final struct. pub fn build(self) -> Artifact { diff --git a/crates/jacquard-api/src/sh_tangled/repo/blob.rs b/crates/jacquard-api/src/sh_tangled/repo/blob.rs index 099e6e77f..2b7eb51db 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/blob.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/blob.rs @@ -267,51 +267,51 @@ pub mod last_commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Hash; type Message; type When; - type Hash; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Hash = Unset; type Message = Unset; type When = Unset; - type Hash = Unset; + } + ///State transition - sets the `hash` field to Set + pub struct SetHash(PhantomData St>); + impl sealed::Sealed for SetHash {} + impl State for SetHash { + type Hash = Set; + type Message = St::Message; + type When = St::When; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData St>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { + type Hash = St::Hash; type Message = Set; type When = St::When; - type Hash = St::Hash; } ///State transition - sets the `when` field to Set pub struct SetWhen(PhantomData St>); impl sealed::Sealed for SetWhen {} impl State for SetWhen { - type Message = St::Message; - type When = Set; type Hash = St::Hash; - } - ///State transition - sets the `hash` field to Set - pub struct SetHash(PhantomData St>); - impl sealed::Sealed for SetHash {} - impl State for SetHash { type Message = St::Message; - type When = St::When; - type Hash = Set; + type When = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `hash` field + pub struct hash(()); ///Marker type for the `message` field pub struct message(()); ///Marker type for the `when` field pub struct when(()); - ///Marker type for the `hash` field - pub struct hash(()); } } @@ -413,9 +413,9 @@ where impl LastCommitBuilder where St: last_commit_state::State, + St::Hash: last_commit_state::IsSet, St::Message: last_commit_state::IsSet, St::When: last_commit_state::IsSet, - St::Hash: last_commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> LastCommit { @@ -655,51 +655,51 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Path; type Repo; type Ref; + 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 Repo = Unset; type Ref = Unset; - } - ///State transition - sets the `path` field to Set - pub struct SetPath(PhantomData St>); - impl sealed::Sealed for SetPath {} - impl State for SetPath { - type Path = Set; - type Repo = St::Repo; - type Ref = St::Ref; + type Path = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Path = St::Path; type Repo = Set; type Ref = St::Ref; + type Path = St::Path; } ///State transition - sets the `ref` field to Set pub struct SetRef(PhantomData St>); impl sealed::Sealed for SetRef {} impl State for SetRef { - type Path = St::Path; type Repo = St::Repo; type Ref = Set; + type Path = St::Path; + } + ///State transition - sets the `path` field to Set + pub struct SetPath(PhantomData St>); + impl sealed::Sealed for SetPath {} + impl State for SetPath { + type Repo = St::Repo; + type Ref = St::Ref; + 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 `repo` field pub struct repo(()); ///Marker type for the `ref` field pub struct r#ref(()); + ///Marker type for the `path` field + pub struct path(()); } } @@ -801,9 +801,9 @@ where impl BlobBuilder where St: blob_state::State, - St::Path: blob_state::IsSet, St::Repo: blob_state::IsSet, St::Ref: blob_state::IsSet, + St::Path: blob_state::IsSet, { /// Build the final struct. pub fn build(self) -> Blob { @@ -826,51 +826,51 @@ pub mod signature_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type When; type Name; type Email; + type When; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type When = Unset; type Name = Unset; type Email = Unset; - } - ///State transition - sets the `when` field to Set - pub struct SetWhen(PhantomData St>); - impl sealed::Sealed for SetWhen {} - impl State for SetWhen { - type When = Set; - type Name = St::Name; - type Email = St::Email; + type When = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type When = St::When; type Name = Set; type Email = St::Email; + type When = St::When; } ///State transition - sets the `email` field to Set pub struct SetEmail(PhantomData St>); impl sealed::Sealed for SetEmail {} impl State for SetEmail { - type When = St::When; type Name = St::Name; type Email = Set; + type When = St::When; + } + ///State transition - sets the `when` field to Set + pub struct SetWhen(PhantomData St>); + impl sealed::Sealed for SetWhen {} + impl State for SetWhen { + type Name = St::Name; + type Email = St::Email; + type When = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `when` field - pub struct when(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `email` field pub struct email(()); + ///Marker type for the `when` field + pub struct when(()); } } @@ -959,9 +959,9 @@ where impl SignatureBuilder where St: signature_state::State, - St::When: signature_state::IsSet, St::Name: signature_state::IsSet, St::Email: signature_state::IsSet, + St::When: signature_state::IsSet, { /// Build the final struct. pub fn build(self) -> Signature { diff --git a/crates/jacquard-api/src/sh_tangled/repo/branch.rs b/crates/jacquard-api/src/sh_tangled/repo/branch.rs index 7422c5bcd..f232c3b1b 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/branch.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/branch.rs @@ -184,37 +184,37 @@ pub mod branch_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Repo; + 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 Repo = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Repo = St::Repo; + type Name = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Name = St::Name; type Repo = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Repo = St::Repo; + 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 `repo` field pub struct repo(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -284,8 +284,8 @@ where impl BranchBuilder where St: branch_state::State, - St::Name: branch_state::IsSet, St::Repo: branch_state::IsSet, + St::Name: branch_state::IsSet, { /// Build the final struct. pub fn build(self) -> Branch { @@ -306,51 +306,51 @@ pub mod signature_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Email; type When; + 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 Email = Unset; type When = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Email = St::Email; - type When = St::When; + type Name = Unset; } ///State transition - sets the `email` field to Set pub struct SetEmail(PhantomData St>); impl sealed::Sealed for SetEmail {} impl State for SetEmail { - type Name = St::Name; type Email = Set; type When = St::When; + type Name = St::Name; } ///State transition - sets the `when` field to Set pub struct SetWhen(PhantomData St>); impl sealed::Sealed for SetWhen {} impl State for SetWhen { - type Name = St::Name; type Email = St::Email; type When = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Email = St::Email; + type When = St::When; + 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 `email` field pub struct email(()); ///Marker type for the `when` field pub struct when(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -439,9 +439,9 @@ where impl SignatureBuilder where St: signature_state::State, - St::Name: signature_state::IsSet, St::Email: signature_state::IsSet, St::When: signature_state::IsSet, + St::Name: signature_state::IsSet, { /// Build the final struct. pub fn build(self) -> Signature { diff --git a/crates/jacquard-api/src/sh_tangled/repo/collaborator.rs b/crates/jacquard-api/src/sh_tangled/repo/collaborator.rs index bbcca3b2f..8295883bf 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/collaborator.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/collaborator.rs @@ -113,49 +113,49 @@ pub mod collaborator_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Repo; + type CreatedAt; type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Repo = Unset; + type CreatedAt = Unset; type Subject = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Repo = St::Repo; - type Subject = St::Subject; - } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type CreatedAt = St::CreatedAt; type Repo = Set; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Repo = St::Repo; + type CreatedAt = Set; type Subject = St::Subject; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Repo = St::Repo; + type CreatedAt = St::CreatedAt; 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 `repo` field pub struct repo(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); } @@ -246,8 +246,8 @@ where impl CollaboratorBuilder where St: collaborator_state::State, - St::CreatedAt: collaborator_state::IsSet, St::Repo: collaborator_state::IsSet, + St::CreatedAt: collaborator_state::IsSet, St::Subject: collaborator_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/repo/compare.rs b/crates/jacquard-api/src/sh_tangled/repo/compare.rs index 160856e1e..c7af48d47 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/compare.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/compare.rs @@ -159,51 +159,51 @@ pub mod compare_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev2; - type Rev1; type Repo; + type Rev1; + type Rev2; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev2 = Unset; - type Rev1 = Unset; type Repo = Unset; + type Rev1 = Unset; + type Rev2 = Unset; } - ///State transition - sets the `rev2` field to Set - pub struct SetRev2(PhantomData St>); - impl sealed::Sealed for SetRev2 {} - impl State for SetRev2 { - type Rev2 = Set; + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; type Rev1 = St::Rev1; - type Repo = St::Repo; + type Rev2 = St::Rev2; } ///State transition - sets the `rev1` field to Set pub struct SetRev1(PhantomData St>); impl sealed::Sealed for SetRev1 {} impl State for SetRev1 { - type Rev2 = St::Rev2; - type Rev1 = Set; type Repo = St::Repo; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { + type Rev1 = Set; type Rev2 = St::Rev2; + } + ///State transition - sets the `rev2` field to Set + pub struct SetRev2(PhantomData St>); + impl sealed::Sealed for SetRev2 {} + impl State for SetRev2 { + type Repo = St::Repo; type Rev1 = St::Rev1; - type Repo = Set; + type Rev2 = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev2` field - pub struct rev2(()); - ///Marker type for the `rev1` field - pub struct rev1(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `rev1` field + pub struct rev1(()); + ///Marker type for the `rev2` field + pub struct rev2(()); } } @@ -292,9 +292,9 @@ where impl CompareBuilder where St: compare_state::State, - St::Rev2: compare_state::IsSet, - St::Rev1: compare_state::IsSet, St::Repo: compare_state::IsSet, + St::Rev1: compare_state::IsSet, + St::Rev2: compare_state::IsSet, { /// Build the final struct. pub fn build(self) -> Compare { diff --git a/crates/jacquard-api/src/sh_tangled/repo/delete.rs b/crates/jacquard-api/src/sh_tangled/repo/delete.rs index 9651c84f8..7756e6bfa 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/delete.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/delete.rs @@ -69,50 +69,50 @@ pub mod delete_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type Did; type Rkey; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Name = Unset; - type Did = Unset; type Rkey = Unset; + type Did = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { type Name = Set; - type Did = St::Did; - type Rkey = St::Rkey; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Name = St::Name; - type Did = Set; type Rkey = St::Rkey; + type Did = St::Did; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData St>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { type Name = St::Name; - type Did = St::Did; type Rkey = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Name = St::Name; + type Rkey = St::Rkey; + type Did = 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 `did` field - pub struct did(()); ///Marker type for the `rkey` field pub struct rkey(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -202,8 +202,8 @@ impl DeleteBuilder where St: delete_state::State, St::Name: delete_state::IsSet, - St::Did: delete_state::IsSet, St::Rkey: delete_state::IsSet, + St::Did: delete_state::IsSet, { /// Build the final struct. pub fn build(self) -> Delete { diff --git a/crates/jacquard-api/src/sh_tangled/repo/diff.rs b/crates/jacquard-api/src/sh_tangled/repo/diff.rs index 6c1a11c96..c90edf103 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/diff.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/diff.rs @@ -147,37 +147,37 @@ pub mod diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; type Repo; + type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; type Repo = Unset; - } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; - type Repo = St::Repo; + type Ref = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Ref = St::Ref; type Repo = Set; + type Ref = St::Ref; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { + type Repo = St::Repo; + type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `ref` field + pub struct r#ref(()); } } @@ -247,8 +247,8 @@ where impl DiffBuilder where St: diff_state::State, - St::Ref: diff_state::IsSet, St::Repo: diff_state::IsSet, + St::Ref: diff_state::IsSet, { /// Build the final struct. pub fn build(self) -> Diff { diff --git a/crates/jacquard-api/src/sh_tangled/repo/fork_status.rs b/crates/jacquard-api/src/sh_tangled/repo/fork_status.rs index c33c53aea..72a9fef84 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/fork_status.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/fork_status.rs @@ -82,85 +82,85 @@ pub mod fork_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; + type Name; type HiddenRef; type Did; - type Name; type Branch; + 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 Name = Unset; type HiddenRef = Unset; type Did = Unset; - type Name = Unset; type Branch = Unset; + type Source = Unset; } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData St>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type HiddenRef = St::HiddenRef; type Did = St::Did; - type Name = St::Name; type Branch = St::Branch; + type Source = St::Source; } ///State transition - sets the `hidden_ref` field to Set pub struct SetHiddenRef(PhantomData St>); impl sealed::Sealed for SetHiddenRef {} impl State for SetHiddenRef { - type Source = St::Source; + type Name = St::Name; type HiddenRef = Set; type Did = St::Did; - type Name = St::Name; type Branch = St::Branch; + type Source = St::Source; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Source = St::Source; + type Name = St::Name; type HiddenRef = St::HiddenRef; type Did = Set; - type Name = St::Name; type Branch = St::Branch; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type Source = St::Source; - type HiddenRef = St::HiddenRef; - type Did = St::Did; - type Name = Set; - type Branch = St::Branch; } ///State transition - sets the `branch` field to Set pub struct SetBranch(PhantomData St>); impl sealed::Sealed for SetBranch {} impl State for SetBranch { - type Source = St::Source; + type Name = St::Name; type HiddenRef = St::HiddenRef; type Did = St::Did; - type Name = St::Name; type Branch = Set; + type Source = St::Source; + } + ///State transition - sets the `source` field to Set + pub struct SetSource(PhantomData St>); + impl sealed::Sealed for SetSource {} + impl State for SetSource { + type Name = St::Name; + type HiddenRef = St::HiddenRef; + type Did = St::Did; + type Branch = St::Branch; + 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 `name` field + pub struct name(()); ///Marker type for the `hidden_ref` field pub struct hidden_ref(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `branch` field pub struct branch(()); + ///Marker type for the `source` field + pub struct source(()); } } @@ -287,11 +287,11 @@ where impl ForkStatusBuilder where St: fork_status_state::State, - St::Source: fork_status_state::IsSet, + St::Name: fork_status_state::IsSet, St::HiddenRef: fork_status_state::IsSet, St::Did: fork_status_state::IsSet, - St::Name: fork_status_state::IsSet, St::Branch: fork_status_state::IsSet, + St::Source: fork_status_state::IsSet, { /// Build the final struct. pub fn build(self) -> ForkStatus { diff --git a/crates/jacquard-api/src/sh_tangled/repo/fork_sync.rs b/crates/jacquard-api/src/sh_tangled/repo/fork_sync.rs index ac5d5603e..f415c24aa 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/fork_sync.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/fork_sync.rs @@ -70,67 +70,67 @@ pub mod fork_sync_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; - type Name; type Branch; type Did; + type Name; + 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 Name = Unset; type Branch = Unset; type Did = Unset; - } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData St>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; - type Name = St::Name; - type Branch = St::Branch; - type Did = St::Did; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Source = St::Source; - type Name = Set; - type Branch = St::Branch; - type Did = St::Did; + type Name = Unset; + type Source = Unset; } ///State transition - sets the `branch` field to Set pub struct SetBranch(PhantomData St>); impl sealed::Sealed for SetBranch {} impl State for SetBranch { - type Source = St::Source; - type Name = St::Name; type Branch = Set; type Did = St::Did; + type Name = St::Name; + type Source = St::Source; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Source = St::Source; - type Name = St::Name; type Branch = St::Branch; type Did = Set; + type Name = St::Name; + type Source = St::Source; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Branch = St::Branch; + type Did = St::Did; + type Name = Set; + type Source = St::Source; + } + ///State transition - sets the `source` field to Set + pub struct SetSource(PhantomData St>); + impl sealed::Sealed for SetSource {} + impl State for SetSource { + type Branch = St::Branch; + type Did = St::Did; + type Name = St::Name; + 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 `name` field - pub struct name(()); ///Marker type for the `branch` field pub struct branch(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `source` field + pub struct source(()); } } @@ -238,10 +238,10 @@ where impl ForkSyncBuilder where St: fork_sync_state::State, - St::Source: fork_sync_state::IsSet, - St::Name: fork_sync_state::IsSet, St::Branch: fork_sync_state::IsSet, St::Did: fork_sync_state::IsSet, + St::Name: fork_sync_state::IsSet, + St::Source: fork_sync_state::IsSet, { /// Build the final struct. pub fn build(self) -> ForkSync { diff --git a/crates/jacquard-api/src/sh_tangled/repo/hidden_ref.rs b/crates/jacquard-api/src/sh_tangled/repo/hidden_ref.rs index 6642d77dc..dc45814a1 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/hidden_ref.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/hidden_ref.rs @@ -84,49 +84,49 @@ pub mod hidden_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type RemoteRef; + type Repo; type ForkRef; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repo = Unset; type RemoteRef = Unset; + type Repo = Unset; type ForkRef = Unset; } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type RemoteRef = St::RemoteRef; - type ForkRef = St::ForkRef; - } ///State transition - sets the `remote_ref` field to Set pub struct SetRemoteRef(PhantomData St>); impl sealed::Sealed for SetRemoteRef {} impl State for SetRemoteRef { - type Repo = St::Repo; type RemoteRef = Set; + type Repo = St::Repo; + type ForkRef = St::ForkRef; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type RemoteRef = St::RemoteRef; + type Repo = Set; type ForkRef = St::ForkRef; } ///State transition - sets the `fork_ref` field to Set pub struct SetForkRef(PhantomData St>); impl sealed::Sealed for SetForkRef {} impl State for SetForkRef { - type Repo = St::Repo; type RemoteRef = St::RemoteRef; + type Repo = St::Repo; type ForkRef = 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 `remote_ref` field pub struct remote_ref(()); + ///Marker type for the `repo` field + pub struct repo(()); ///Marker type for the `fork_ref` field pub struct fork_ref(()); } @@ -217,8 +217,8 @@ where impl HiddenRefBuilder where St: hidden_ref_state::State, - St::Repo: hidden_ref_state::IsSet, St::RemoteRef: hidden_ref_state::IsSet, + St::Repo: hidden_ref_state::IsSet, St::ForkRef: hidden_ref_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs b/crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs index 26a82ab7a..96d3f6109 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/issue/comment.rs @@ -118,51 +118,51 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Issue; type CreatedAt; type Body; + type Issue; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Issue = Unset; type CreatedAt = Unset; type Body = Unset; - } - ///State transition - sets the `issue` field to Set - pub struct SetIssue(PhantomData St>); - impl sealed::Sealed for SetIssue {} - impl State for SetIssue { - type Issue = Set; - type CreatedAt = St::CreatedAt; - type Body = St::Body; + type Issue = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Issue = St::Issue; type CreatedAt = Set; type Body = St::Body; + type Issue = St::Issue; } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData St>); impl sealed::Sealed for SetBody {} impl State for SetBody { - type Issue = St::Issue; type CreatedAt = St::CreatedAt; type Body = Set; + type Issue = St::Issue; + } + ///State transition - sets the `issue` field to Set + pub struct SetIssue(PhantomData St>); + impl sealed::Sealed for SetIssue {} + impl State for SetIssue { + type CreatedAt = St::CreatedAt; + type Body = St::Body; + type Issue = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `issue` field - pub struct issue(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `body` field pub struct body(()); + ///Marker type for the `issue` field + pub struct issue(()); } } @@ -297,9 +297,9 @@ impl CommentBuilder { impl CommentBuilder where St: comment_state::State, - St::Issue: comment_state::IsSet, St::CreatedAt: comment_state::IsSet, St::Body: comment_state::IsSet, + St::Issue: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/sh_tangled/repo/languages.rs b/crates/jacquard-api/src/sh_tangled/repo/languages.rs index 33b19ec2e..10bb0fa9e 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/languages.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/languages.rs @@ -187,51 +187,51 @@ pub mod language_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Size; type Percentage; type Name; - type Size; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Size = Unset; type Percentage = Unset; type Name = Unset; - type Size = Unset; + } + ///State transition - sets the `size` field to Set + pub struct SetSize(PhantomData St>); + impl sealed::Sealed for SetSize {} + impl State for SetSize { + type Size = Set; + type Percentage = St::Percentage; + type Name = St::Name; } ///State transition - sets the `percentage` field to Set pub struct SetPercentage(PhantomData St>); impl sealed::Sealed for SetPercentage {} impl State for SetPercentage { + type Size = St::Size; type Percentage = Set; type Name = St::Name; - type Size = St::Size; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Percentage = St::Percentage; - type Name = Set; type Size = St::Size; - } - ///State transition - sets the `size` field to Set - pub struct SetSize(PhantomData St>); - impl sealed::Sealed for SetSize {} - impl State for SetSize { type Percentage = St::Percentage; - type Name = St::Name; - type Size = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `size` field + pub struct size(()); ///Marker type for the `percentage` field pub struct percentage(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `size` field - pub struct size(()); } } @@ -366,9 +366,9 @@ where impl LanguageBuilder where St: language_state::State, + St::Size: language_state::IsSet, St::Percentage: language_state::IsSet, St::Name: language_state::IsSet, - St::Size: language_state::IsSet, { /// Build the final struct. pub fn build(self) -> Language { diff --git a/crates/jacquard-api/src/sh_tangled/repo/list_secrets.rs b/crates/jacquard-api/src/sh_tangled/repo/list_secrets.rs index 4373dfb50..89085b2b4 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/list_secrets.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/list_secrets.rs @@ -213,65 +213,65 @@ pub mod secret_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Repo; type Key; + type CreatedAt; type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Repo = Unset; type Key = Unset; + type CreatedAt = Unset; type CreatedBy = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Repo = St::Repo; - type Key = St::Key; - type CreatedBy = St::CreatedBy; - } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type CreatedAt = St::CreatedAt; type Repo = Set; type Key = St::Key; + type CreatedAt = St::CreatedAt; type CreatedBy = St::CreatedBy; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData St>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type CreatedAt = St::CreatedAt; type Repo = St::Repo; type Key = Set; + type CreatedAt = St::CreatedAt; + type CreatedBy = St::CreatedBy; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Repo = St::Repo; + type Key = St::Key; + type CreatedAt = Set; type CreatedBy = St::CreatedBy; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData St>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type CreatedAt = St::CreatedAt; type Repo = St::Repo; type Key = St::Key; + type CreatedAt = St::CreatedAt; type CreatedBy = 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 `repo` field pub struct repo(()); ///Marker type for the `key` field pub struct key(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `created_by` field pub struct created_by(()); } @@ -381,9 +381,9 @@ where impl SecretBuilder where St: secret_state::State, - St::CreatedAt: secret_state::IsSet, St::Repo: secret_state::IsSet, St::Key: secret_state::IsSet, + St::CreatedAt: secret_state::IsSet, St::CreatedBy: secret_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/repo/log.rs b/crates/jacquard-api/src/sh_tangled/repo/log.rs index eb7b3768f..83175e8e4 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/log.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/log.rs @@ -175,37 +175,37 @@ pub mod log_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ref; type Repo; + type Ref; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ref = Unset; type Repo = Unset; - } - ///State transition - sets the `ref` field to Set - pub struct SetRef(PhantomData St>); - impl sealed::Sealed for SetRef {} - impl State for SetRef { - type Ref = Set; - type Repo = St::Repo; + type Ref = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData St>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Ref = St::Ref; type Repo = Set; + type Ref = St::Ref; + } + ///State transition - sets the `ref` field to Set + pub struct SetRef(PhantomData St>); + impl sealed::Sealed for SetRef {} + impl State for SetRef { + type Repo = St::Repo; + type Ref = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ref` field - pub struct r#ref(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `ref` field + pub struct r#ref(()); } } @@ -308,8 +308,8 @@ where impl LogBuilder where St: log_state::State, - St::Ref: log_state::IsSet, St::Repo: log_state::IsSet, + St::Ref: log_state::IsSet, { /// Build the final struct. pub fn build(self) -> Log { diff --git a/crates/jacquard-api/src/sh_tangled/repo/merge.rs b/crates/jacquard-api/src/sh_tangled/repo/merge.rs index 2b1a13586..4e7afca27 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/merge.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/merge.rs @@ -82,67 +82,67 @@ pub mod merge_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Patch; - type Name; type Branch; type Did; + type Name; + type Patch; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Patch = Unset; - type Name = Unset; type Branch = Unset; type Did = Unset; - } - ///State transition - sets the `patch` field to Set - pub struct SetPatch(PhantomData St>); - impl sealed::Sealed for SetPatch {} - impl State for SetPatch { - type Patch = Set; - type Name = St::Name; - type Branch = St::Branch; - type Did = St::Did; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Patch = St::Patch; - type Name = Set; - type Branch = St::Branch; - type Did = St::Did; + type Name = Unset; + type Patch = Unset; } ///State transition - sets the `branch` field to Set pub struct SetBranch(PhantomData St>); impl sealed::Sealed for SetBranch {} impl State for SetBranch { - type Patch = St::Patch; - type Name = St::Name; type Branch = Set; type Did = St::Did; + type Name = St::Name; + type Patch = St::Patch; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Patch = St::Patch; - type Name = St::Name; type Branch = St::Branch; type Did = Set; + type Name = St::Name; + type Patch = St::Patch; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Branch = St::Branch; + type Did = St::Did; + type Name = Set; + type Patch = St::Patch; + } + ///State transition - sets the `patch` field to Set + pub struct SetPatch(PhantomData St>); + impl sealed::Sealed for SetPatch {} + impl State for SetPatch { + type Branch = St::Branch; + type Did = St::Did; + type Name = St::Name; + type Patch = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `patch` field - pub struct patch(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `branch` field pub struct branch(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `patch` field + pub struct patch(()); } } @@ -311,10 +311,10 @@ where impl MergeBuilder where St: merge_state::State, - St::Patch: merge_state::IsSet, - St::Name: merge_state::IsSet, St::Branch: merge_state::IsSet, St::Did: merge_state::IsSet, + St::Name: merge_state::IsSet, + St::Patch: merge_state::IsSet, { /// Build the final struct. pub fn build(self) -> Merge { diff --git a/crates/jacquard-api/src/sh_tangled/repo/merge_check.rs b/crates/jacquard-api/src/sh_tangled/repo/merge_check.rs index ebdf1b6c1..f67716481 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/merge_check.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/merge_check.rs @@ -241,67 +241,67 @@ pub mod merge_check_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Branch; - type Did; type Patch; + type Name; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Branch = Unset; - type Did = Unset; type Patch = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Branch = St::Branch; - type Did = St::Did; - type Patch = St::Patch; + type Name = Unset; + type Did = Unset; } ///State transition - sets the `branch` field to Set pub struct SetBranch(PhantomData St>); impl sealed::Sealed for SetBranch {} impl State for SetBranch { - type Name = St::Name; type Branch = Set; - type Did = St::Did; type Patch = St::Patch; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type Name = St::Name; - type Branch = St::Branch; - type Did = Set; - type Patch = St::Patch; + type Did = St::Did; } ///State transition - sets the `patch` field to Set pub struct SetPatch(PhantomData St>); impl sealed::Sealed for SetPatch {} impl State for SetPatch { + type Branch = St::Branch; + type Patch = Set; type Name = St::Name; + type Did = St::Did; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { type Branch = St::Branch; + type Patch = St::Patch; + type Name = Set; type Did = St::Did; - type Patch = Set; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Branch = St::Branch; + type Patch = St::Patch; + type Name = St::Name; + type Did = 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 `branch` field pub struct branch(()); - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `patch` field pub struct patch(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -409,10 +409,10 @@ where impl MergeCheckBuilder where St: merge_check_state::State, - St::Name: merge_check_state::IsSet, St::Branch: merge_check_state::IsSet, - St::Did: merge_check_state::IsSet, St::Patch: merge_check_state::IsSet, + St::Name: merge_check_state::IsSet, + St::Did: merge_check_state::IsSet, { /// Build the final struct. pub fn build(self) -> MergeCheck { diff --git a/crates/jacquard-api/src/sh_tangled/repo/pull.rs b/crates/jacquard-api/src/sh_tangled/repo/pull.rs index 49dbd4edb..28dcc2b78 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/pull.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/pull.rs @@ -232,67 +232,67 @@ pub mod pull_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; + type Title; type PatchBlob; type Target; - type Title; - 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 Title = Unset; type PatchBlob = Unset; type Target = Unset; - type Title = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Title = St::Title; + type PatchBlob = St::PatchBlob; + type Target = St::Target; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type CreatedAt = St::CreatedAt; + type Title = Set; + type PatchBlob = St::PatchBlob; + type Target = St::Target; } ///State transition - sets the `patch_blob` field to Set pub struct SetPatchBlob(PhantomData St>); impl sealed::Sealed for SetPatchBlob {} impl State for SetPatchBlob { + type CreatedAt = St::CreatedAt; + type Title = St::Title; type PatchBlob = Set; type Target = St::Target; - type Title = St::Title; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `target` field to Set pub struct SetTarget(PhantomData St>); impl sealed::Sealed for SetTarget {} impl State for SetTarget { - type PatchBlob = St::PatchBlob; - type Target = Set; - type Title = St::Title; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type PatchBlob = St::PatchBlob; - type Target = St::Target; - type Title = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type PatchBlob = St::PatchBlob; - type Target = St::Target; type Title = St::Title; - type CreatedAt = Set; + type PatchBlob = St::PatchBlob; + type Target = 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 `title` field + pub struct title(()); ///Marker type for the `patch_blob` field pub struct patch_blob(()); ///Marker type for the `target` field pub struct target(()); - ///Marker type for the `title` field - pub struct title(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -475,10 +475,10 @@ where impl PullBuilder where St: pull_state::State, + St::CreatedAt: pull_state::IsSet, + St::Title: pull_state::IsSet, St::PatchBlob: pull_state::IsSet, St::Target: pull_state::IsSet, - St::Title: pull_state::IsSet, - St::CreatedAt: pull_state::IsSet, { /// Build the final struct. pub fn build(self) -> Pull { @@ -684,37 +684,37 @@ pub mod target_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Branch; + 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 Branch = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Branch = St::Branch; + type Repo = Unset; } ///State transition - sets the `branch` field to Set pub struct SetBranch(PhantomData St>); impl sealed::Sealed for SetBranch {} impl State for SetBranch { - type Repo = St::Repo; type Branch = Set; + type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Branch = St::Branch; + 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 `branch` field pub struct branch(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -784,8 +784,8 @@ where impl TargetBuilder where St: target_state::State, - St::Repo: target_state::IsSet, St::Branch: target_state::IsSet, + St::Repo: target_state::IsSet, { /// Build the final struct. pub fn build(self) -> Target { diff --git a/crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs b/crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs index 382c43f13..4b1378c74 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/pull/comment.rs @@ -117,50 +117,50 @@ pub mod comment_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Pull; type Body; + type Pull; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Pull = Unset; type Body = Unset; + type Pull = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Pull = St::Pull; - type Body = St::Body; - } - ///State transition - sets the `pull` field to Set - pub struct SetPull(PhantomData St>); - impl sealed::Sealed for SetPull {} - impl State for SetPull { - type CreatedAt = St::CreatedAt; - type Pull = Set; type Body = St::Body; + type Pull = St::Pull; } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData St>); impl sealed::Sealed for SetBody {} impl State for SetBody { type CreatedAt = St::CreatedAt; - type Pull = St::Pull; type Body = Set; + type Pull = St::Pull; + } + ///State transition - sets the `pull` field to Set + pub struct SetPull(PhantomData St>); + impl sealed::Sealed for SetPull {} + impl State for SetPull { + type CreatedAt = St::CreatedAt; + type Body = St::Body; + type Pull = 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 `pull` field - pub struct pull(()); ///Marker type for the `body` field pub struct body(()); + ///Marker type for the `pull` field + pub struct pull(()); } } @@ -282,8 +282,8 @@ impl CommentBuilder where St: comment_state::State, St::CreatedAt: comment_state::IsSet, - St::Pull: comment_state::IsSet, St::Body: comment_state::IsSet, + St::Pull: comment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Comment { diff --git a/crates/jacquard-api/src/sh_tangled/repo/tag.rs b/crates/jacquard-api/src/sh_tangled/repo/tag.rs index 86eab8949..caac7a6bb 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/tag.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/tag.rs @@ -147,37 +147,37 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Tag; + 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 Tag = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Tag = St::Tag; + type Repo = Unset; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData St>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type Repo = St::Repo; type Tag = Set; + type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Tag = St::Tag; + 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 `tag` field pub struct tag(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -241,8 +241,8 @@ where impl TagBuilder where St: tag_state::State, - St::Repo: tag_state::IsSet, St::Tag: tag_state::IsSet, + St::Repo: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/sh_tangled/repo/tree.rs b/crates/jacquard-api/src/sh_tangled/repo/tree.rs index 63f80ae91..83b3ef62a 100644 --- a/crates/jacquard-api/src/sh_tangled/repo/tree.rs +++ b/crates/jacquard-api/src/sh_tangled/repo/tree.rs @@ -285,50 +285,50 @@ pub mod last_commit_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type When; - type Message; type Hash; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type When = Unset; - type Message = Unset; type Hash = Unset; + type Message = Unset; } ///State transition - sets the `when` field to Set pub struct SetWhen(PhantomData St>); impl sealed::Sealed for SetWhen {} impl State for SetWhen { type When = Set; - type Message = St::Message; - type Hash = St::Hash; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData St>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type When = St::When; - type Message = Set; type Hash = St::Hash; + type Message = St::Message; } ///State transition - sets the `hash` field to Set pub struct SetHash(PhantomData St>); impl sealed::Sealed for SetHash {} impl State for SetHash { type When = St::When; - type Message = St::Message; type Hash = Set; + type Message = St::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData St>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type When = St::When; + type Hash = St::Hash; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `when` field pub struct when(()); - ///Marker type for the `message` field - pub struct message(()); ///Marker type for the `hash` field pub struct hash(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -431,8 +431,8 @@ impl LastCommitBuilder where St: last_commit_state::State, St::When: last_commit_state::IsSet, - St::Message: last_commit_state::IsSet, St::Hash: last_commit_state::IsSet, + St::Message: last_commit_state::IsSet, { /// Build the final struct. pub fn build(self) -> LastCommit { @@ -843,51 +843,51 @@ pub mod signature_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Email; type When; type Name; - type Email; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Email = Unset; type When = Unset; type Name = Unset; - type Email = Unset; + } + ///State transition - sets the `email` field to Set + pub struct SetEmail(PhantomData St>); + impl sealed::Sealed for SetEmail {} + impl State for SetEmail { + type Email = Set; + type When = St::When; + type Name = St::Name; } ///State transition - sets the `when` field to Set pub struct SetWhen(PhantomData St>); impl sealed::Sealed for SetWhen {} impl State for SetWhen { + type Email = St::Email; type When = Set; type Name = St::Name; - type Email = St::Email; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type When = St::When; - type Name = Set; type Email = St::Email; - } - ///State transition - sets the `email` field to Set - pub struct SetEmail(PhantomData St>); - impl sealed::Sealed for SetEmail {} - impl State for SetEmail { type When = St::When; - type Name = St::Name; - type Email = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `email` field + pub struct email(()); ///Marker type for the `when` field pub struct when(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `email` field - pub struct email(()); } } @@ -976,9 +976,9 @@ where impl SignatureBuilder where St: signature_state::State, + St::Email: signature_state::IsSet, St::When: signature_state::IsSet, St::Name: signature_state::IsSet, - St::Email: signature_state::IsSet, { /// Build the final struct. pub fn build(self) -> Signature { @@ -1013,51 +1013,51 @@ pub mod tree_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Mode; type Size; type Name; - type Mode; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Mode = Unset; type Size = Unset; type Name = Unset; - type Mode = Unset; + } + ///State transition - sets the `mode` field to Set + pub struct SetMode(PhantomData St>); + impl sealed::Sealed for SetMode {} + impl State for SetMode { + type Mode = Set; + type Size = St::Size; + type Name = St::Name; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { + type Mode = St::Mode; type Size = Set; type Name = St::Name; - type Mode = St::Mode; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Size = St::Size; - type Name = Set; type Mode = St::Mode; - } - ///State transition - sets the `mode` field to Set - pub struct SetMode(PhantomData St>); - impl sealed::Sealed for SetMode {} - impl State for SetMode { type Size = St::Size; - type Name = St::Name; - type Mode = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `mode` field + pub struct mode(()); ///Marker type for the `size` field pub struct size(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `mode` field - pub struct mode(()); } } @@ -1159,9 +1159,9 @@ where impl TreeEntryBuilder where St: tree_entry_state::State, + St::Mode: tree_entry_state::IsSet, St::Size: tree_entry_state::IsSet, St::Name: tree_entry_state::IsSet, - St::Mode: tree_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> TreeEntry { diff --git a/crates/jacquard-api/src/sh_tangled/spindle/member.rs b/crates/jacquard-api/src/sh_tangled/spindle/member.rs index 6d6033e6d..7b00c6eba 100644 --- a/crates/jacquard-api/src/sh_tangled/spindle/member.rs +++ b/crates/jacquard-api/src/sh_tangled/spindle/member.rs @@ -113,49 +113,49 @@ pub mod member_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; type Instance; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; type Instance = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; - type Instance = St::Instance; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + type Instance = St::Instance; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::CreatedAt; + type Subject = Set; type Instance = St::Instance; } ///State transition - sets the `instance` field to Set pub struct SetInstance(PhantomData St>); impl sealed::Sealed for SetInstance {} impl State for SetInstance { - type Subject = St::Subject; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; type Instance = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `instance` field pub struct instance(()); } @@ -246,8 +246,8 @@ where impl MemberBuilder where St: member_state::State, - St::Subject: member_state::IsSet, St::CreatedAt: member_state::IsSet, + St::Subject: member_state::IsSet, St::Instance: member_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_tangled/string.rs b/crates/jacquard-api/src/sh_tangled/string.rs index b02c2b9c2..bd85e937b 100644 --- a/crates/jacquard-api/src/sh_tangled/string.rs +++ b/crates/jacquard-api/src/sh_tangled/string.rs @@ -165,67 +165,67 @@ pub mod tangled_string_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Filename; + type Description; type Contents; type CreatedAt; - type Description; + type Filename; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Filename = Unset; + type Description = Unset; type Contents = Unset; type CreatedAt = Unset; - type Description = Unset; + type Filename = Unset; } - ///State transition - sets the `filename` field to Set - pub struct SetFilename(PhantomData St>); - impl sealed::Sealed for SetFilename {} - impl State for SetFilename { - type Filename = Set; + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Description = Set; type Contents = St::Contents; type CreatedAt = St::CreatedAt; - type Description = St::Description; + type Filename = St::Filename; } ///State transition - sets the `contents` field to Set pub struct SetContents(PhantomData St>); impl sealed::Sealed for SetContents {} impl State for SetContents { - type Filename = St::Filename; + type Description = St::Description; type Contents = Set; type CreatedAt = St::CreatedAt; - type Description = St::Description; + type Filename = St::Filename; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Filename = St::Filename; + type Description = St::Description; type Contents = St::Contents; type CreatedAt = Set; - type Description = St::Description; - } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { type Filename = St::Filename; + } + ///State transition - sets the `filename` field to Set + pub struct SetFilename(PhantomData St>); + impl sealed::Sealed for SetFilename {} + impl State for SetFilename { + type Description = St::Description; type Contents = St::Contents; type CreatedAt = St::CreatedAt; - type Description = Set; + type Filename = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `filename` field - pub struct filename(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `contents` field pub struct contents(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `description` field - pub struct description(()); + ///Marker type for the `filename` field + pub struct filename(()); } } @@ -333,10 +333,10 @@ where impl TangledStringBuilder where St: tangled_string_state::State, - St::Filename: tangled_string_state::IsSet, + St::Description: tangled_string_state::IsSet, St::Contents: tangled_string_state::IsSet, St::CreatedAt: tangled_string_state::IsSet, - St::Description: tangled_string_state::IsSet, + St::Filename: tangled_string_state::IsSet, { /// Build the final struct. pub fn build(self) -> TangledString { diff --git a/crates/jacquard-api/src/sh_tangled/sync.rs b/crates/jacquard-api/src/sh_tangled/sync.rs new file mode 100644 index 000000000..9e26dc604 --- /dev/null +++ b/crates/jacquard-api/src/sh_tangled/sync.rs @@ -0,0 +1,6 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod request_crawl; \ No newline at end of file diff --git a/crates/jacquard-api/src/sh_tangled/sync/request_crawl.rs b/crates/jacquard-api/src/sh_tangled/sync/request_crawl.rs new file mode 100644 index 000000000..d636abc04 --- /dev/null +++ b/crates/jacquard-api/src/sh_tangled/sync/request_crawl.rs @@ -0,0 +1,100 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.tangled.sync.requestCrawl +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::string::AtUri; +use jacquard_common::types::value::Data; +use jacquard_derive::{IntoStatic, open_union}; +use serde::{Serialize, Deserialize}; + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct RequestCrawl { + ///specific repository to ensure crawling + #[serde(skip_serializing_if = "Option::is_none")] + pub ensure_repo: Option>, + ///Hostname of the current service (eg, Knot) that is requesting to be crawled. + pub hostname: S, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + + +#[derive( + Serialize, + Deserialize, + Debug, + Clone, + PartialEq, + Eq, + thiserror::Error, + miette::Diagnostic +)] + +#[serde(tag = "error", content = "message")] +pub enum RequestCrawlError { + #[serde(rename = "HostBanned")] + HostBanned(Option), + /// Catch-all for unknown error codes. + #[serde(untagged)] + Other { error: SmolStr, message: Option }, +} + +impl core::fmt::Display for RequestCrawlError { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + match self { + Self::HostBanned(msg) => { + write!(f, "HostBanned")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::Other { error, message } => { + write!(f, "{}", error)?; + if let Some(msg) = message { + write!(f, ": {}", msg)?; + } + Ok(()) + } + } + } +} + +/// Response type for sh.tangled.sync.requestCrawl +pub struct RequestCrawlResponse; +impl jacquard_common::xrpc::XrpcResp for RequestCrawlResponse { + const NSID: &'static str = "sh.tangled.sync.requestCrawl"; + const ENCODING: &'static str = "application/json"; + type Output = (); + type Err = RequestCrawlError; +} + +impl jacquard_common::xrpc::XrpcRequest for RequestCrawl { + const NSID: &'static str = "sh.tangled.sync.requestCrawl"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Response = RequestCrawlResponse; +} + +/// Endpoint type for sh.tangled.sync.requestCrawl +pub struct RequestCrawlRequest; +impl jacquard_common::xrpc::XrpcEndpoint for RequestCrawlRequest { + const PATH: &'static str = "/xrpc/sh.tangled.sync.requestCrawl"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Procedure( + "application/json", + ); + type Request = RequestCrawl; + type Response = RequestCrawlResponse; +} \ No newline at end of file diff --git a/crates/jacquard-api/src/sh_weaver/actor.rs b/crates/jacquard-api/src/sh_weaver/actor.rs index ac4ac99f7..f0613d261 100644 --- a/crates/jacquard-api/src/sh_weaver/actor.rs +++ b/crates/jacquard-api/src/sh_weaver/actor.rs @@ -1786,37 +1786,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 St>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = St::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = St::Handle; type Did = Set; + type Handle = St::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData St>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = St::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(()); } } @@ -2132,8 +2132,8 @@ impl ProfileViewBuilder { impl ProfileViewBuilder where St: profile_view_state::State, - St::Handle: profile_view_state::IsSet, St::Did: profile_view_state::IsSet, + St::Handle: profile_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileView { @@ -2198,37 +2198,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = St::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = St::Did; type Handle = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = St::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(()); } } @@ -2385,8 +2385,8 @@ impl ProfileViewBasicBuilder ProfileViewBasicBuilder where St: profile_view_basic_state::State, - St::Did: profile_view_basic_state::IsSet, St::Handle: profile_view_basic_state::IsSet, + St::Did: profile_view_basic_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileViewBasic { @@ -2562,50 +2562,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 St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Bluesky = St::Bluesky; - type Handle = St::Handle; - } - ///State transition - sets the `bluesky` field to Set - pub struct SetBluesky(PhantomData St>); - impl sealed::Sealed for SetBluesky {} - impl State for SetBluesky { - type Did = St::Did; - type Bluesky = Set; type Handle = St::Handle; + type Bluesky = St::Bluesky; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = St::Did; - type Bluesky = St::Bluesky; type Handle = Set; + type Bluesky = St::Bluesky; + } + ///State transition - sets the `bluesky` field to Set + pub struct SetBluesky(PhantomData St>); + impl sealed::Sealed for SetBluesky {} + impl State for SetBluesky { + type Did = St::Did; + type Handle = St::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(()); } } @@ -2772,8 +2772,8 @@ impl TangledProfileViewBuilder where St: tangled_profile_view_state::State, St::Did: tangled_profile_view_state::IsSet, - St::Bluesky: tangled_profile_view_state::IsSet, St::Handle: tangled_profile_view_state::IsSet, + St::Bluesky: tangled_profile_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TangledProfileView { diff --git a/crates/jacquard-api/src/sh_weaver/collab.rs b/crates/jacquard-api/src/sh_weaver/collab.rs index 8993f7ce6..dbf9fff38 100644 --- a/crates/jacquard-api/src/sh_weaver/collab.rs +++ b/crates/jacquard-api/src/sh_weaver/collab.rs @@ -929,50 +929,50 @@ pub mod collaboration_state_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Status; - type Participants; type Resource; + type Participants; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Status = Unset; - type Participants = Unset; type Resource = Unset; + type Participants = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { type Status = Set; - type Participants = St::Participants; - type Resource = St::Resource; - } - ///State transition - sets the `participants` field to Set - pub struct SetParticipants(PhantomData St>); - impl sealed::Sealed for SetParticipants {} - impl State for SetParticipants { - type Status = St::Status; - type Participants = Set; type Resource = St::Resource; + type Participants = St::Participants; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData St>); impl sealed::Sealed for SetResource {} impl State for SetResource { type Status = St::Status; - type Participants = St::Participants; type Resource = Set; + type Participants = St::Participants; + } + ///State transition - sets the `participants` field to Set + pub struct SetParticipants(PhantomData St>); + impl sealed::Sealed for SetParticipants {} + impl State for SetParticipants { + type Status = St::Status; + type Resource = St::Resource; + type Participants = 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 `participants` field - pub struct participants(()); ///Marker type for the `resource` field pub struct resource(()); + ///Marker type for the `participants` field + pub struct participants(()); } } @@ -1262,8 +1262,8 @@ impl CollaborationStateViewBuilder where St: collaboration_state_view_state::State, St::Status: collaboration_state_view_state::IsSet, - St::Participants: collaboration_state_view_state::IsSet, St::Resource: collaboration_state_view_state::IsSet, + St::Participants: collaboration_state_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollaborationStateView { @@ -1841,67 +1841,67 @@ pub mod former_collaborator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type User; + type WasActiveUntil; type EndReason; + type User; type WasActiveFrom; - type WasActiveUntil; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type User = Unset; + type WasActiveUntil = Unset; type EndReason = Unset; + type User = Unset; type WasActiveFrom = Unset; - type WasActiveUntil = Unset; } - ///State transition - sets the `user` field to Set - pub struct SetUser(PhantomData St>); - impl sealed::Sealed for SetUser {} - impl State for SetUser { - type User = Set; + ///State transition - sets the `was_active_until` field to Set + pub struct SetWasActiveUntil(PhantomData St>); + impl sealed::Sealed for SetWasActiveUntil {} + impl State for SetWasActiveUntil { + type WasActiveUntil = Set; type EndReason = St::EndReason; + type User = St::User; type WasActiveFrom = St::WasActiveFrom; - type WasActiveUntil = St::WasActiveUntil; } ///State transition - sets the `end_reason` field to Set pub struct SetEndReason(PhantomData St>); impl sealed::Sealed for SetEndReason {} impl State for SetEndReason { - type User = St::User; + type WasActiveUntil = St::WasActiveUntil; type EndReason = Set; + type User = St::User; type WasActiveFrom = St::WasActiveFrom; + } + ///State transition - sets the `user` field to Set + pub struct SetUser(PhantomData St>); + impl sealed::Sealed for SetUser {} + impl State for SetUser { type WasActiveUntil = St::WasActiveUntil; + type EndReason = St::EndReason; + type User = Set; + type WasActiveFrom = St::WasActiveFrom; } ///State transition - sets the `was_active_from` field to Set pub struct SetWasActiveFrom(PhantomData St>); impl sealed::Sealed for SetWasActiveFrom {} impl State for SetWasActiveFrom { - type User = St::User; - type EndReason = St::EndReason; - type WasActiveFrom = Set; type WasActiveUntil = St::WasActiveUntil; - } - ///State transition - sets the `was_active_until` field to Set - pub struct SetWasActiveUntil(PhantomData St>); - impl sealed::Sealed for SetWasActiveUntil {} - impl State for SetWasActiveUntil { - type User = St::User; type EndReason = St::EndReason; - type WasActiveFrom = St::WasActiveFrom; - type WasActiveUntil = Set; + type User = St::User; + type WasActiveFrom = 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 `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(()); ///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(()); } } @@ -2080,10 +2080,10 @@ where impl FormerCollaboratorViewBuilder where St: former_collaborator_view_state::State, - St::User: former_collaborator_view_state::IsSet, + St::WasActiveUntil: former_collaborator_view_state::IsSet, St::EndReason: former_collaborator_view_state::IsSet, + St::User: former_collaborator_view_state::IsSet, St::WasActiveFrom: former_collaborator_view_state::IsSet, - St::WasActiveUntil: former_collaborator_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> FormerCollaboratorView { @@ -2126,127 +2126,127 @@ pub mod invite_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; - type Cid; - type CreatedAt; type Invitee; + type Resource; + type CreatedAt; + type Status; type Uri; + type Cid; type Inviter; - type Resource; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; - type Cid = Unset; - type CreatedAt = Unset; type Invitee = Unset; + type Resource = Unset; + type CreatedAt = Unset; + type Status = Unset; type Uri = Unset; + type Cid = Unset; type Inviter = Unset; - type Resource = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type Cid = St::Cid; + ///State transition - sets the `invitee` field to Set + pub struct SetInvitee(PhantomData St>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Invitee = Set; + type Resource = St::Resource; type CreatedAt = St::CreatedAt; - type Invitee = St::Invitee; + type Status = St::Status; type Uri = St::Uri; + type Cid = St::Cid; type Inviter = St::Inviter; - type Resource = St::Resource; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Status = St::Status; - type Cid = Set; - type CreatedAt = St::CreatedAt; + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData St>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { type Invitee = St::Invitee; + type Resource = Set; + type CreatedAt = St::CreatedAt; + type Status = St::Status; type Uri = St::Uri; + type Cid = St::Cid; type Inviter = St::Inviter; - type Resource = St::Resource; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = St::Status; - type Cid = St::Cid; - type CreatedAt = Set; type Invitee = St::Invitee; - type Uri = St::Uri; - type Inviter = St::Inviter; type Resource = St::Resource; - } - ///State transition - sets the `invitee` field to Set - pub struct SetInvitee(PhantomData St>); - impl sealed::Sealed for SetInvitee {} - impl State for SetInvitee { + type CreatedAt = Set; type Status = St::Status; + type Uri = St::Uri; type Cid = St::Cid; + type Inviter = St::Inviter; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Invitee = St::Invitee; + type Resource = St::Resource; type CreatedAt = St::CreatedAt; - type Invitee = Set; + type Status = Set; type Uri = St::Uri; + type Cid = St::Cid; type Inviter = St::Inviter; - type Resource = St::Resource; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Status = St::Status; - type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Invitee = St::Invitee; + type Resource = St::Resource; + type CreatedAt = St::CreatedAt; + type Status = St::Status; type Uri = Set; + type Cid = St::Cid; type Inviter = St::Inviter; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Invitee = St::Invitee; type Resource = St::Resource; + type CreatedAt = St::CreatedAt; + type Status = St::Status; + type Uri = St::Uri; + type Cid = Set; + type Inviter = St::Inviter; } ///State transition - sets the `inviter` field to Set pub struct SetInviter(PhantomData St>); impl sealed::Sealed for SetInviter {} impl State for SetInviter { - type Status = St::Status; - type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Invitee = St::Invitee; - type Uri = St::Uri; - type Inviter = Set; type Resource = St::Resource; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData St>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { - type Status = St::Status; - type Cid = St::Cid; type CreatedAt = St::CreatedAt; - type Invitee = St::Invitee; + type Status = St::Status; type Uri = St::Uri; - type Inviter = St::Inviter; - type Resource = Set; + type Cid = St::Cid; + type Inviter = 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 `cid` field - pub struct cid(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `invitee` field pub struct invitee(()); + ///Marker type for the `resource` field + pub struct resource(()); + ///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 `cid` field + pub struct cid(()); ///Marker type for the `inviter` field pub struct inviter(()); - ///Marker type for the `resource` field - pub struct resource(()); } } @@ -2517,13 +2517,13 @@ where impl InviteViewBuilder where St: invite_view_state::State, - St::Status: invite_view_state::IsSet, - St::Cid: invite_view_state::IsSet, - St::CreatedAt: invite_view_state::IsSet, St::Invitee: invite_view_state::IsSet, + St::Resource: invite_view_state::IsSet, + St::CreatedAt: invite_view_state::IsSet, + St::Status: invite_view_state::IsSet, St::Uri: invite_view_state::IsSet, + St::Cid: invite_view_state::IsSet, St::Inviter: invite_view_state::IsSet, - St::Resource: invite_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> InviteView { @@ -2913,85 +2913,85 @@ pub mod session_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type NodeId; type CreatedAt; - type Resource; type Uri; type User; - 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 Resource = Unset; type Uri = Unset; type User = Unset; - type NodeId = Unset; + type Resource = Unset; + } + ///State transition - sets the `node_id` field to Set + pub struct SetNodeId(PhantomData St>); + impl sealed::Sealed for SetNodeId {} + impl State for SetNodeId { + type NodeId = Set; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type User = St::User; + type Resource = St::Resource; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedAt = Set; - type Resource = St::Resource; - type Uri = St::Uri; - type User = St::User; type NodeId = St::NodeId; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData St>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { - type CreatedAt = St::CreatedAt; - type Resource = Set; + type CreatedAt = Set; type Uri = St::Uri; type User = St::User; - type NodeId = St::NodeId; + type Resource = St::Resource; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type NodeId = St::NodeId; type CreatedAt = St::CreatedAt; - type Resource = St::Resource; type Uri = Set; type User = St::User; - type NodeId = St::NodeId; + type Resource = St::Resource; } ///State transition - sets the `user` field to Set pub struct SetUser(PhantomData St>); impl sealed::Sealed for SetUser {} impl State for SetUser { + type NodeId = St::NodeId; type CreatedAt = St::CreatedAt; - type Resource = St::Resource; type Uri = St::Uri; type User = Set; - type NodeId = St::NodeId; + type Resource = St::Resource; } - ///State transition - sets the `node_id` field to Set - pub struct SetNodeId(PhantomData St>); - impl sealed::Sealed for SetNodeId {} - impl State for SetNodeId { + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData St>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type NodeId = St::NodeId; type CreatedAt = St::CreatedAt; - type Resource = St::Resource; type Uri = St::Uri; type User = St::User; - type NodeId = Set; + 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 `resource` field - pub struct resource(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `user` field pub struct user(()); - ///Marker type for the `node_id` field - pub struct node_id(()); + ///Marker type for the `resource` field + pub struct resource(()); } } @@ -3152,11 +3152,11 @@ where impl SessionViewBuilder where St: session_view_state::State, + St::NodeId: session_view_state::IsSet, St::CreatedAt: session_view_state::IsSet, - St::Resource: session_view_state::IsSet, St::Uri: session_view_state::IsSet, St::User: session_view_state::IsSet, - St::NodeId: session_view_state::IsSet, + St::Resource: session_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SessionView { diff --git a/crates/jacquard-api/src/sh_weaver/collab/accept.rs b/crates/jacquard-api/src/sh_weaver/collab/accept.rs index 52c2b9a0b..d9981b4c3 100644 --- a/crates/jacquard-api/src/sh_weaver/collab/accept.rs +++ b/crates/jacquard-api/src/sh_weaver/collab/accept.rs @@ -117,50 +117,50 @@ 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 Resource; } /// 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 Resource = Unset; } ///State transition - sets the `invite` field to Set pub struct SetInvite(PhantomData St>); impl sealed::Sealed for SetInvite {} impl State for SetInvite { type Invite = Set; - type Resource = St::Resource; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData St>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { - type Invite = St::Invite; - type Resource = Set; type CreatedAt = St::CreatedAt; + type Resource = St::Resource; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Invite = St::Invite; - type Resource = St::Resource; type CreatedAt = Set; + type Resource = St::Resource; + } + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData St>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type Invite = St::Invite; + type CreatedAt = St::CreatedAt; + type Resource = 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 `resource` field + pub struct resource(()); } } @@ -250,8 +250,8 @@ impl AcceptBuilder where St: accept_state::State, St::Invite: accept_state::IsSet, - St::Resource: accept_state::IsSet, St::CreatedAt: accept_state::IsSet, + St::Resource: accept_state::IsSet, { /// Build the final struct. pub fn build(self) -> Accept { diff --git a/crates/jacquard-api/src/sh_weaver/collab/invite.rs b/crates/jacquard-api/src/sh_weaver/collab/invite.rs index 397e6e3ae..b5793b209 100644 --- a/crates/jacquard-api/src/sh_weaver/collab/invite.rs +++ b/crates/jacquard-api/src/sh_weaver/collab/invite.rs @@ -229,49 +229,49 @@ pub mod invite_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Resource; + type CreatedAt; type Invitee; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Resource = Unset; + type CreatedAt = Unset; type Invitee = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Resource = St::Resource; - type Invitee = St::Invitee; - } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData St>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type CreatedAt = St::CreatedAt; type Resource = Set; + type CreatedAt = St::CreatedAt; + type Invitee = St::Invitee; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Resource = St::Resource; + type CreatedAt = Set; type Invitee = St::Invitee; } ///State transition - sets the `invitee` field to Set pub struct SetInvitee(PhantomData St>); impl sealed::Sealed for SetInvitee {} impl State for SetInvitee { - type CreatedAt = St::CreatedAt; type Resource = St::Resource; + type CreatedAt = St::CreatedAt; type Invitee = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `resource` field pub struct resource(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `invitee` field pub struct invitee(()); } @@ -408,8 +408,8 @@ impl InviteBuilder { impl InviteBuilder where St: invite_state::State, - St::CreatedAt: invite_state::IsSet, St::Resource: invite_state::IsSet, + St::CreatedAt: invite_state::IsSet, St::Invitee: invite_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_weaver/edit.rs b/crates/jacquard-api/src/sh_weaver/edit.rs index e9bc79259..f5896d802 100644 --- a/crates/jacquard-api/src/sh_weaver/edit.rs +++ b/crates/jacquard-api/src/sh_weaver/edit.rs @@ -768,67 +768,67 @@ pub mod edit_branch_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Length; + type Head; type Author; type LastUpdated; - type Head; - type Length; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Length = Unset; + type Head = Unset; type Author = Unset; type LastUpdated = Unset; - type Head = Unset; - type Length = Unset; + } + ///State transition - sets the `length` field to Set + pub struct SetLength(PhantomData St>); + impl sealed::Sealed for SetLength {} + impl State for SetLength { + type Length = Set; + type Head = St::Head; + type Author = St::Author; + type LastUpdated = St::LastUpdated; + } + ///State transition - sets the `head` field to Set + pub struct SetHead(PhantomData St>); + impl sealed::Sealed for SetHead {} + impl State for SetHead { + type Length = St::Length; + type Head = Set; + type Author = St::Author; + type LastUpdated = St::LastUpdated; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { + type Length = St::Length; + type Head = St::Head; type Author = Set; type LastUpdated = St::LastUpdated; - type Head = St::Head; - type Length = St::Length; } ///State transition - sets the `last_updated` field to Set pub struct SetLastUpdated(PhantomData St>); impl sealed::Sealed for SetLastUpdated {} impl State for SetLastUpdated { - type Author = St::Author; - type LastUpdated = Set; - type Head = St::Head; - type Length = St::Length; - } - ///State transition - sets the `head` field to Set - pub struct SetHead(PhantomData St>); - impl sealed::Sealed for SetHead {} - impl State for SetHead { - type Author = St::Author; - type LastUpdated = St::LastUpdated; - type Head = Set; type Length = St::Length; - } - ///State transition - sets the `length` field to Set - pub struct SetLength(PhantomData St>); - impl sealed::Sealed for SetLength {} - impl State for SetLength { - type Author = St::Author; - type LastUpdated = St::LastUpdated; type Head = St::Head; - type Length = Set; + type Author = St::Author; + type LastUpdated = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `length` field + pub struct length(()); + ///Marker type for the `head` field + pub struct head(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `last_updated` field pub struct last_updated(()); - ///Marker type for the `head` field - pub struct head(()); - ///Marker type for the `length` field - pub struct length(()); } } @@ -983,10 +983,10 @@ impl EditBranchViewBuilder impl EditBranchViewBuilder where St: edit_branch_view_state::State, + St::Length: edit_branch_view_state::IsSet, + St::Head: edit_branch_view_state::IsSet, St::Author: edit_branch_view_state::IsSet, St::LastUpdated: edit_branch_view_state::IsSet, - St::Head: edit_branch_view_state::IsSet, - St::Length: edit_branch_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> EditBranchView { @@ -1029,85 +1029,85 @@ pub mod edit_history_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; type Type; type Uri; - type Cid; - type CreatedAt; type Author; + 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 Type = Unset; type Uri = Unset; - type Cid = Unset; - type CreatedAt = Unset; type Author = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Type = St::Type; + type Uri = St::Uri; + type Author = St::Author; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { + type Cid = St::Cid; type Type = Set; type Uri = St::Uri; - type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Author = St::Author; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type Cid = St::Cid; type Type = St::Type; type Uri = Set; - type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Author = St::Author; + type CreatedAt = St::CreatedAt; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Cid = St::Cid; type Type = St::Type; type Uri = St::Uri; - type Cid = Set; + type Author = Set; type CreatedAt = St::CreatedAt; - type Author = St::Author; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Type = St::Type; - type Uri = St::Uri; type Cid = St::Cid; - type CreatedAt = Set; - type Author = St::Author; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type Type = St::Type; type Uri = St::Uri; - type Cid = St::Cid; - type CreatedAt = St::CreatedAt; - type Author = Set; + type Author = St::Author; + 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 `type` field pub struct r#type(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -1296,11 +1296,11 @@ where impl EditHistoryEntryBuilder where St: edit_history_entry_state::State, + St::Cid: edit_history_entry_state::IsSet, St::Type: edit_history_entry_state::IsSet, St::Uri: edit_history_entry_state::IsSet, - St::Cid: edit_history_entry_state::IsSet, - St::CreatedAt: edit_history_entry_state::IsSet, St::Author: edit_history_entry_state::IsSet, + St::CreatedAt: edit_history_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> EditHistoryEntry { diff --git a/crates/jacquard-api/src/sh_weaver/edit/cursor.rs b/crates/jacquard-api/src/sh_weaver/edit/cursor.rs index 5a8e6a767..f1464e386 100644 --- a/crates/jacquard-api/src/sh_weaver/edit/cursor.rs +++ b/crates/jacquard-api/src/sh_weaver/edit/cursor.rs @@ -913,49 +913,49 @@ pub mod normal_container_id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Peer; type Counter; + type Peer; type ContainerType; } /// 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; + type Peer = Unset; type ContainerType = Unset; } - ///State transition - sets the `peer` field to Set - pub struct SetPeer(PhantomData St>); - impl sealed::Sealed for SetPeer {} - impl State for SetPeer { - type Peer = Set; - type Counter = St::Counter; - type ContainerType = St::ContainerType; - } ///State transition - sets the `counter` field to Set pub struct SetCounter(PhantomData St>); impl sealed::Sealed for SetCounter {} impl State for SetCounter { - type Peer = St::Peer; type Counter = Set; + type Peer = St::Peer; + type ContainerType = St::ContainerType; + } + ///State transition - sets the `peer` field to Set + pub struct SetPeer(PhantomData St>); + impl sealed::Sealed for SetPeer {} + impl State for SetPeer { + type Counter = St::Counter; + type Peer = Set; type ContainerType = St::ContainerType; } ///State transition - sets the `container_type` field to Set pub struct SetContainerType(PhantomData St>); impl sealed::Sealed for SetContainerType {} impl State for SetContainerType { - type Peer = St::Peer; type Counter = St::Counter; + type Peer = St::Peer; type ContainerType = 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(()); ///Marker type for the `container_type` field pub struct container_type(()); } @@ -1046,8 +1046,8 @@ where impl NormalContainerIdBuilder where St: normal_container_id_state::State, - St::Peer: normal_container_id_state::IsSet, St::Counter: normal_container_id_state::IsSet, + St::Peer: normal_container_id_state::IsSet, St::ContainerType: normal_container_id_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_weaver/edit/diff.rs b/crates/jacquard-api/src/sh_weaver/edit/diff.rs index 206e10b31..47b107783 100644 --- a/crates/jacquard-api/src/sh_weaver/edit/diff.rs +++ b/crates/jacquard-api/src/sh_weaver/edit/diff.rs @@ -165,37 +165,37 @@ pub mod diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Doc; type Root; + type Doc; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Doc = Unset; type Root = Unset; - } - ///State transition - sets the `doc` field to Set - pub struct SetDoc(PhantomData St>); - impl sealed::Sealed for SetDoc {} - impl State for SetDoc { - type Doc = Set; - type Root = St::Root; + type Doc = Unset; } ///State transition - sets the `root` field to Set pub struct SetRoot(PhantomData St>); impl sealed::Sealed for SetRoot {} impl State for SetRoot { - type Doc = St::Doc; type Root = Set; + type Doc = St::Doc; + } + ///State transition - sets the `doc` field to Set + pub struct SetDoc(PhantomData St>); + impl sealed::Sealed for SetDoc {} + impl State for SetDoc { + type Root = St::Root; + type Doc = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `doc` field - pub struct doc(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `doc` field + pub struct doc(()); } } @@ -324,8 +324,8 @@ impl DiffBuilder { impl DiffBuilder where St: diff_state::State, - St::Doc: diff_state::IsSet, St::Root: diff_state::IsSet, + St::Doc: diff_state::IsSet, { /// Build the final struct. pub fn build(self) -> Diff { diff --git a/crates/jacquard-api/src/sh_weaver/embed.rs b/crates/jacquard-api/src/sh_weaver/embed.rs index bb2179bc6..04935b76d 100644 --- a/crates/jacquard-api/src/sh_weaver/embed.rs +++ b/crates/jacquard-api/src/sh_weaver/embed.rs @@ -304,37 +304,37 @@ pub mod pixel_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Height; type Width; + type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Height = Unset; type Width = Unset; - } - ///State transition - sets the `height` field to Set - pub struct SetHeight(PhantomData St>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = St::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData St>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = St::Height; type Width = Set; + type Height = St::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData St>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = St::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(()); } } @@ -404,8 +404,8 @@ where impl PixelSizeBuilder where St: pixel_size_state::State, - St::Height: pixel_size_state::IsSet, St::Width: pixel_size_state::IsSet, + St::Height: pixel_size_state::IsSet, { /// Build the final struct. pub fn build(self) -> PixelSize { diff --git a/crates/jacquard-api/src/sh_weaver/embed/external.rs b/crates/jacquard-api/src/sh_weaver/embed/external.rs index 201d8f5eb..62b4b7924 100644 --- a/crates/jacquard-api/src/sh_weaver/embed/external.rs +++ b/crates/jacquard-api/src/sh_weaver/embed/external.rs @@ -200,51 +200,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 St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Description = Set; + type Title = St::Title; + type Uri = St::Uri; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { + type Description = St::Description; type Title = Set; type Uri = St::Uri; - type Description = St::Description; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = St::Title; - type Uri = Set; type Description = St::Description; - } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { type Title = St::Title; - type Uri = St::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(()); } } @@ -346,9 +346,9 @@ where impl ExternalEmbedBuilder where St: external_embed_state::State, + St::Description: external_embed_state::IsSet, St::Title: external_embed_state::IsSet, St::Uri: external_embed_state::IsSet, - St::Description: external_embed_state::IsSet, { /// Build the final struct. pub fn build(self) -> ExternalEmbed { @@ -717,50 +717,50 @@ pub mod view_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 St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type Uri = St::Uri; - type Description = St::Description; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Title = St::Title; - type Uri = Set; type Description = St::Description; + type Uri = St::Uri; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { type Title = St::Title; - type Uri = St::Uri; type Description = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Title = St::Title; + type Description = St::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(()); } } @@ -863,8 +863,8 @@ impl ViewExternalBuilder where St: view_external_state::State, St::Title: view_external_state::IsSet, - St::Uri: view_external_state::IsSet, St::Description: view_external_state::IsSet, + St::Uri: view_external_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewExternal { diff --git a/crates/jacquard-api/src/sh_weaver/embed/record_with_media.rs b/crates/jacquard-api/src/sh_weaver/embed/record_with_media.rs index b55a3d214..141ff7ba9 100644 --- a/crates/jacquard-api/src/sh_weaver/embed/record_with_media.rs +++ b/crates/jacquard-api/src/sh_weaver/embed/record_with_media.rs @@ -334,37 +334,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = St::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData St>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = St::Record; type Media = Set; + type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = St::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(()); } } @@ -428,8 +428,8 @@ impl ViewBuilder { impl ViewBuilder where St: view_state::State, - St::Record: view_state::IsSet, St::Media: view_state::IsSet, + St::Record: view_state::IsSet, { /// Build the final struct. pub fn build(self) -> View { diff --git a/crates/jacquard-api/src/sh_weaver/embed/records.rs b/crates/jacquard-api/src/sh_weaver/embed/records.rs index aebee6bdb..b62231d51 100644 --- a/crates/jacquard-api/src/sh_weaver/embed/records.rs +++ b/crates/jacquard-api/src/sh_weaver/embed/records.rs @@ -1071,49 +1071,49 @@ pub mod view_blocked_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Author; + type Uri; type Blocked; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Author = Unset; + type Uri = Unset; type Blocked = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Author = St::Author; - type Blocked = St::Blocked; - } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = St::Uri; type Author = Set; + type Uri = St::Uri; + type Blocked = St::Blocked; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Author = St::Author; + type Uri = Set; type Blocked = St::Blocked; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData St>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Uri = St::Uri; type Author = St::Author; + type Uri = St::Uri; type Blocked = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `blocked` field pub struct blocked(()); } @@ -1204,8 +1204,8 @@ where impl ViewBlockedBuilder where St: view_blocked_state::State, - St::Uri: view_blocked_state::IsSet, St::Author: view_blocked_state::IsSet, + St::Uri: view_blocked_state::IsSet, St::Blocked: view_blocked_state::IsSet, { /// Build the final struct. @@ -1241,37 +1241,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Detached; type Uri; + type Detached; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Detached = Unset; type Uri = Unset; - } - ///State transition - sets the `detached` field to Set - pub struct SetDetached(PhantomData St>); - impl sealed::Sealed for SetDetached {} - impl State for SetDetached { - type Detached = Set; - type Uri = St::Uri; + type Detached = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Detached = St::Detached; type Uri = Set; + type Detached = St::Detached; + } + ///State transition - sets the `detached` field to Set + pub struct SetDetached(PhantomData St>); + impl sealed::Sealed for SetDetached {} + impl State for SetDetached { + type Uri = St::Uri; + type Detached = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `detached` field - pub struct detached(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `detached` field + pub struct detached(()); } } @@ -1341,8 +1341,8 @@ where impl ViewDetachedBuilder where St: view_detached_state::State, - St::Detached: view_detached_state::IsSet, St::Uri: view_detached_state::IsSet, + St::Detached: view_detached_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewDetached { @@ -1375,37 +1375,37 @@ pub mod view_not_found_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type NotFound; type Uri; + type NotFound; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type NotFound = Unset; type Uri = Unset; - } - ///State transition - sets the `not_found` field to Set - pub struct SetNotFound(PhantomData St>); - impl sealed::Sealed for SetNotFound {} - impl State for SetNotFound { - type NotFound = Set; - type Uri = St::Uri; + type NotFound = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type NotFound = St::NotFound; type Uri = Set; + type NotFound = St::NotFound; + } + ///State transition - sets the `not_found` field to Set + pub struct SetNotFound(PhantomData St>); + impl sealed::Sealed for SetNotFound {} + impl State for SetNotFound { + type Uri = St::Uri; + type NotFound = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `not_found` field - pub struct not_found(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `not_found` field + pub struct not_found(()); } } @@ -1475,8 +1475,8 @@ where impl ViewNotFoundBuilder where St: view_not_found_state::State, - St::NotFound: view_not_found_state::IsSet, St::Uri: view_not_found_state::IsSet, + St::NotFound: view_not_found_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewNotFound { @@ -1511,9 +1511,9 @@ pub mod view_record_state { pub trait State: sealed::Sealed { type Cid; type Author; + type Value; type IndexedAt; type Uri; - type Value; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -1521,9 +1521,9 @@ pub mod view_record_state { impl State for Empty { type Cid = Unset; type Author = Unset; + type Value = Unset; type IndexedAt = Unset; type Uri = Unset; - type Value = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); @@ -1531,9 +1531,9 @@ pub mod view_record_state { impl State for SetCid { type Cid = Set; type Author = St::Author; + type Value = St::Value; type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Value = St::Value; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); @@ -1541,9 +1541,19 @@ pub mod view_record_state { impl State for SetAuthor { type Cid = St::Cid; type Author = Set; + type Value = St::Value; + type IndexedAt = St::IndexedAt; + type Uri = St::Uri; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Cid = St::Cid; + type Author = St::Author; + type Value = Set; type IndexedAt = St::IndexedAt; type Uri = St::Uri; - type Value = St::Value; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); @@ -1551,9 +1561,9 @@ pub mod view_record_state { impl State for SetIndexedAt { type Cid = St::Cid; type Author = St::Author; + type Value = St::Value; type IndexedAt = Set; type Uri = St::Uri; - type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); @@ -1561,19 +1571,9 @@ pub mod view_record_state { impl State for SetUri { type Cid = St::Cid; type Author = St::Author; - type IndexedAt = St::IndexedAt; - type Uri = Set; type Value = St::Value; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Cid = St::Cid; - type Author = St::Author; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type Value = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -1582,12 +1582,12 @@ pub mod view_record_state { 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 `uri` field pub struct uri(()); - ///Marker type for the `value` field - pub struct value(()); } } @@ -1812,9 +1812,9 @@ where St: view_record_state::State, St::Cid: view_record_state::IsSet, St::Author: view_record_state::IsSet, + St::Value: view_record_state::IsSet, St::IndexedAt: view_record_state::IsSet, St::Uri: view_record_state::IsSet, - St::Value: view_record_state::IsSet, { /// Build the final struct. pub fn build(self) -> ViewRecord { diff --git a/crates/jacquard-api/src/sh_weaver/graph.rs b/crates/jacquard-api/src/sh_weaver/graph.rs index aba752e45..4c1767a35 100644 --- a/crates/jacquard-api/src/sh_weaver/graph.rs +++ b/crates/jacquard-api/src/sh_weaver/graph.rs @@ -1020,127 +1020,127 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ItemCount; - type Creator; type Uri; - type Cid; - type Purpose; + type ItemCount; type IndexedAt; + type Purpose; + type Cid; type Name; + type Creator; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ItemCount = Unset; - type Creator = Unset; type Uri = Unset; - type Cid = Unset; - type Purpose = Unset; + type ItemCount = Unset; type IndexedAt = Unset; + type Purpose = Unset; + type Cid = Unset; type Name = Unset; + type Creator = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type ItemCount = St::ItemCount; + type IndexedAt = St::IndexedAt; + type Purpose = St::Purpose; + type Cid = St::Cid; + type Name = St::Name; + type Creator = St::Creator; } ///State transition - sets the `item_count` field to Set pub struct SetItemCount(PhantomData St>); impl sealed::Sealed for SetItemCount {} impl State for SetItemCount { - type ItemCount = Set; - type Creator = St::Creator; type Uri = St::Uri; - type Cid = St::Cid; - type Purpose = St::Purpose; + type ItemCount = Set; type IndexedAt = St::IndexedAt; - type Name = St::Name; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData St>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type ItemCount = St::ItemCount; - type Creator = Set; - type Uri = St::Uri; - type Cid = St::Cid; type Purpose = St::Purpose; - type IndexedAt = St::IndexedAt; - type Name = St::Name; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type ItemCount = St::ItemCount; - type Creator = St::Creator; - type Uri = Set; type Cid = St::Cid; - type Purpose = St::Purpose; - type IndexedAt = St::IndexedAt; type Name = St::Name; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type ItemCount = St::ItemCount; type Creator = St::Creator; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Uri = St::Uri; - type Cid = Set; + type ItemCount = St::ItemCount; + type IndexedAt = Set; type Purpose = St::Purpose; - type IndexedAt = St::IndexedAt; + type Cid = St::Cid; type Name = St::Name; + type Creator = St::Creator; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData St>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type ItemCount = St::ItemCount; - type Creator = St::Creator; type Uri = St::Uri; - type Cid = St::Cid; - type Purpose = Set; + type ItemCount = St::ItemCount; type IndexedAt = St::IndexedAt; + type Purpose = Set; + type Cid = St::Cid; type Name = St::Name; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type ItemCount = St::ItemCount; type Creator = St::Creator; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Uri = St::Uri; - type Cid = St::Cid; + type ItemCount = St::ItemCount; + type IndexedAt = St::IndexedAt; type Purpose = St::Purpose; - type IndexedAt = Set; + type Cid = Set; type Name = St::Name; + type Creator = St::Creator; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { + type Uri = St::Uri; type ItemCount = St::ItemCount; + type IndexedAt = St::IndexedAt; + type Purpose = St::Purpose; + type Cid = St::Cid; + type Name = Set; type Creator = St::Creator; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData St>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Uri = St::Uri; - type Cid = St::Cid; - type Purpose = St::Purpose; + type ItemCount = St::ItemCount; type IndexedAt = St::IndexedAt; - type Name = Set; + type Purpose = St::Purpose; + type Cid = St::Cid; + type Name = St::Name; + type Creator = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `item_count` field - pub struct item_count(()); - ///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 `purpose` field - pub struct purpose(()); + ///Marker type for the `item_count` field + pub struct item_count(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `purpose` field + pub struct purpose(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `creator` field + pub struct creator(()); } } @@ -1355,13 +1355,13 @@ impl ListViewBuilder { impl ListViewBuilder where St: list_view_state::State, - St::ItemCount: list_view_state::IsSet, - St::Creator: list_view_state::IsSet, St::Uri: list_view_state::IsSet, - St::Cid: list_view_state::IsSet, - St::Purpose: list_view_state::IsSet, + St::ItemCount: list_view_state::IsSet, St::IndexedAt: list_view_state::IsSet, + St::Purpose: list_view_state::IsSet, + St::Cid: list_view_state::IsSet, St::Name: list_view_state::IsSet, + St::Creator: list_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ListView { @@ -1407,49 +1407,49 @@ pub mod resource_tags_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - 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 Resource = Unset; type AuthorTags = Unset; + type Resource = Unset; type CommunityTags = Unset; } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData St>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { - type Resource = Set; - type AuthorTags = St::AuthorTags; - type CommunityTags = St::CommunityTags; - } ///State transition - sets the `author_tags` field to Set pub struct SetAuthorTags(PhantomData St>); impl sealed::Sealed for SetAuthorTags {} impl State for SetAuthorTags { - type Resource = St::Resource; type AuthorTags = Set; + type Resource = St::Resource; + type CommunityTags = St::CommunityTags; + } + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData St>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type AuthorTags = St::AuthorTags; + type Resource = Set; type CommunityTags = St::CommunityTags; } ///State transition - sets the `community_tags` field to Set pub struct SetCommunityTags(PhantomData St>); impl sealed::Sealed for SetCommunityTags {} impl State for SetCommunityTags { - type Resource = St::Resource; type AuthorTags = St::AuthorTags; + type Resource = St::Resource; type CommunityTags = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); } @@ -1558,8 +1558,8 @@ impl ResourceTagsViewBuilder ResourceTagsViewBuilder where St: resource_tags_view_state::State, - St::Resource: resource_tags_view_state::IsSet, St::AuthorTags: resource_tags_view_state::IsSet, + St::Resource: resource_tags_view_state::IsSet, St::CommunityTags: resource_tags_view_state::IsSet, { /// Build the final struct. @@ -1597,67 +1597,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 AppliedBy; + type Tag; type CreatedAt; - type Uri; } /// 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 AppliedBy = Unset; + type Tag = Unset; type CreatedAt = Unset; - type Uri = Unset; } - ///State transition - sets the `tag` field to Set - pub struct SetTag(PhantomData St>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type Tag = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type AppliedBy = St::AppliedBy; + type Tag = St::Tag; type CreatedAt = St::CreatedAt; - type Uri = St::Uri; } ///State transition - sets the `applied_by` field to Set pub struct SetAppliedBy(PhantomData St>); impl sealed::Sealed for SetAppliedBy {} impl State for SetAppliedBy { - type Tag = St::Tag; + type Uri = St::Uri; type AppliedBy = Set; + type Tag = St::Tag; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `tag` field to Set + pub struct SetTag(PhantomData St>); + impl sealed::Sealed for SetTag {} + impl State for SetTag { type Uri = St::Uri; + type AppliedBy = St::AppliedBy; + type Tag = Set; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Tag = St::Tag; - type AppliedBy = St::AppliedBy; - type CreatedAt = Set; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Tag = St::Tag; type AppliedBy = St::AppliedBy; - type CreatedAt = St::CreatedAt; - type Uri = Set; + type Tag = St::Tag; + 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 `uri` field + pub struct uri(()); ///Marker type for the `applied_by` field pub struct applied_by(()); + ///Marker type for the `tag` field + pub struct tag(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -1770,10 +1770,10 @@ where impl TagApplicationViewBuilder where St: tag_application_view_state::State, - St::Tag: tag_application_view_state::IsSet, + St::Uri: tag_application_view_state::IsSet, St::AppliedBy: tag_application_view_state::IsSet, + St::Tag: tag_application_view_state::IsSet, St::CreatedAt: tag_application_view_state::IsSet, - St::Uri: tag_application_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TagApplicationView { @@ -1810,37 +1810,37 @@ pub mod tag_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UseCount; type Tag; + type UseCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UseCount = Unset; type Tag = Unset; - } - ///State transition - sets the `use_count` field to Set - pub struct SetUseCount(PhantomData St>); - impl sealed::Sealed for SetUseCount {} - impl State for SetUseCount { - type UseCount = Set; - type Tag = St::Tag; + type UseCount = Unset; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData St>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type UseCount = St::UseCount; type Tag = Set; + type UseCount = St::UseCount; + } + ///State transition - sets the `use_count` field to Set + pub struct SetUseCount(PhantomData St>); + impl sealed::Sealed for SetUseCount {} + impl State for SetUseCount { + type Tag = St::Tag; + type UseCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `use_count` field - pub struct use_count(()); ///Marker type for the `tag` field pub struct tag(()); + ///Marker type for the `use_count` field + pub struct use_count(()); } } @@ -1969,8 +1969,8 @@ where impl TagViewBuilder where St: tag_view_state::State, - St::UseCount: tag_view_state::IsSet, St::Tag: tag_view_state::IsSet, + St::UseCount: tag_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TagView { diff --git a/crates/jacquard-api/src/sh_weaver/graph/like.rs b/crates/jacquard-api/src/sh_weaver/graph/like.rs index 890ea4c3b..0764d46a9 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/like.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/like.rs @@ -114,37 +114,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -214,8 +214,8 @@ where impl LikeBuilder where St: like_state::State, - St::CreatedAt: like_state::IsSet, St::Subject: like_state::IsSet, + St::CreatedAt: like_state::IsSet, { /// Build the final struct. pub fn build(self) -> Like { diff --git a/crates/jacquard-api/src/sh_weaver/graph/list.rs b/crates/jacquard-api/src/sh_weaver/graph/list.rs index 3f0e21412..c3e1967ec 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/list.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/list.rs @@ -282,50 +282,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 St>); impl sealed::Sealed for SetName {} impl State for SetName { type Name = Set; - type Purpose = St::Purpose; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData St>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { - type Name = St::Name; - type Purpose = Set; type CreatedAt = St::CreatedAt; + type Purpose = St::Purpose; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Name = St::Name; - type Purpose = St::Purpose; type CreatedAt = Set; + type Purpose = St::Purpose; + } + ///State transition - sets the `purpose` field to Set + pub struct SetPurpose(PhantomData St>); + impl sealed::Sealed for SetPurpose {} + impl State for SetPurpose { + type Name = St::Name; + type CreatedAt = St::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(()); } } @@ -447,8 +447,8 @@ impl ListBuilder where St: list_state::State, St::Name: list_state::IsSet, - St::Purpose: list_state::IsSet, St::CreatedAt: list_state::IsSet, + St::Purpose: list_state::IsSet, { /// Build the final struct. pub fn build(self) -> List { diff --git a/crates/jacquard-api/src/sh_weaver/graph/listitem.rs b/crates/jacquard-api/src/sh_weaver/graph/listitem.rs index 248a955b5..c8d706493 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/listitem.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/listitem.rs @@ -117,50 +117,50 @@ 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; } /// 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; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Subject = Set; - type List = St::List; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData St>); - impl sealed::Sealed for SetList {} - impl State for SetList { - type Subject = St::Subject; - type List = Set; type CreatedAt = St::CreatedAt; + type List = St::List; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Subject = St::Subject; - type List = St::List; type CreatedAt = Set; + type List = St::List; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData St>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `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(()); } } @@ -250,8 +250,8 @@ impl ListitemBuilder where St: listitem_state::State, St::Subject: listitem_state::IsSet, - St::List: listitem_state::IsSet, St::CreatedAt: listitem_state::IsSet, + St::List: listitem_state::IsSet, { /// Build the final struct. pub fn build(self) -> Listitem { diff --git a/crates/jacquard-api/src/sh_weaver/graph/subscribe.rs b/crates/jacquard-api/src/sh_weaver/graph/subscribe.rs index e525500be..7a2c52048 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/subscribe.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/subscribe.rs @@ -113,37 +113,37 @@ pub mod subscribe_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Notebook; + 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 Notebook = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Notebook = St::Notebook; + type CreatedAt = Unset; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData St>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type CreatedAt = St::CreatedAt; type Notebook = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Notebook = St::Notebook; + 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 `notebook` field pub struct notebook(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -213,8 +213,8 @@ where impl SubscribeBuilder where St: subscribe_state::State, - St::CreatedAt: subscribe_state::IsSet, St::Notebook: subscribe_state::IsSet, + St::CreatedAt: subscribe_state::IsSet, { /// Build the final struct. pub fn build(self) -> Subscribe { diff --git a/crates/jacquard-api/src/sh_weaver/graph/subscribe_accept.rs b/crates/jacquard-api/src/sh_weaver/graph/subscribe_accept.rs index 0cdce97d4..68a27a038 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/subscribe_accept.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/subscribe_accept.rs @@ -114,37 +114,37 @@ pub mod subscribe_accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subscribe; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subscribe = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subscribe = St::Subscribe; + type CreatedAt = Unset; } ///State transition - sets the `subscribe` field to Set pub struct SetSubscribe(PhantomData St>); impl sealed::Sealed for SetSubscribe {} impl State for SetSubscribe { - type CreatedAt = St::CreatedAt; type Subscribe = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subscribe = St::Subscribe; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subscribe` field pub struct subscribe(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,8 +214,8 @@ where impl SubscribeAcceptBuilder where St: subscribe_accept_state::State, - St::CreatedAt: subscribe_accept_state::IsSet, St::Subscribe: subscribe_accept_state::IsSet, + St::CreatedAt: subscribe_accept_state::IsSet, { /// Build the final struct. pub fn build(self) -> SubscribeAccept { diff --git a/crates/jacquard-api/src/sh_weaver/graph/tag.rs b/crates/jacquard-api/src/sh_weaver/graph/tag.rs index 5eb538e83..f93cbbfac 100644 --- a/crates/jacquard-api/src/sh_weaver/graph/tag.rs +++ b/crates/jacquard-api/src/sh_weaver/graph/tag.rs @@ -139,50 +139,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 St>); impl sealed::Sealed for SetTag {} impl State for SetTag { type Tag = Set; - type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Tag = St::Tag; - type CreatedAt = Set; type Subject = St::Subject; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type Tag = St::Tag; - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Tag = St::Tag; + type Subject = St::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(()); } } @@ -269,8 +269,8 @@ impl TagBuilder where St: tag_state::State, St::Tag: tag_state::IsSet, - St::CreatedAt: tag_state::IsSet, St::Subject: tag_state::IsSet, + St::CreatedAt: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/sh_weaver/notebook.rs b/crates/jacquard-api/src/sh_weaver/notebook.rs index 93959d14b..79196ab18 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook.rs @@ -1152,37 +1152,37 @@ pub mod author_list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Record; + 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 Record = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData St>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Record = St::Record; + type Index = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Index = St::Index; type Record = Set; + type Index = St::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData St>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Record = St::Record; + 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 `record` field pub struct record(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -1265,8 +1265,8 @@ impl AuthorListViewBuilder impl AuthorListViewBuilder where St: author_list_view_state::State, - St::Index: author_list_view_state::IsSet, St::Record: author_list_view_state::IsSet, + St::Index: author_list_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> AuthorListView { @@ -2493,37 +2493,37 @@ pub mod book_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 St>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Entry = Set; - type Index = St::Index; + type Entry = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData St>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Entry = St::Entry; type Index = Set; + type Entry = St::Entry; + } + ///State transition - sets the `entry` field to Set + pub struct SetEntry(PhantomData St>); + impl sealed::Sealed for SetEntry {} + impl State for SetEntry { + type Index = St::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(()); } } @@ -2624,8 +2624,8 @@ impl BookEntryViewBuilder { impl BookEntryViewBuilder where St: book_entry_view_state::State, - St::Entry: book_entry_view_state::IsSet, St::Index: book_entry_view_state::IsSet, + St::Entry: book_entry_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> BookEntryView { @@ -2831,105 +2831,105 @@ pub mod chapter_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IndexedAt; type Cid; - type Authors; - type Record; type Uri; - type IndexedAt; + type Authors; type Notebook; + type Record; } /// 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 Authors = Unset; - type Record = Unset; type Uri = Unset; - type IndexedAt = Unset; + type Authors = Unset; type Notebook = Unset; + type Record = Unset; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type Cid = St::Cid; + type Uri = St::Uri; + type Authors = St::Authors; + type Notebook = St::Notebook; + type Record = St::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Cid = Set; - type Authors = St::Authors; - type Record = St::Record; - type Uri = St::Uri; type IndexedAt = St::IndexedAt; - type Notebook = St::Notebook; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Cid = St::Cid; - type Authors = Set; - type Record = St::Record; + type Cid = Set; type Uri = St::Uri; - type IndexedAt = St::IndexedAt; - type Notebook = St::Notebook; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Cid = St::Cid; type Authors = St::Authors; - type Record = Set; - type Uri = St::Uri; - type IndexedAt = St::IndexedAt; type Notebook = St::Notebook; + type Record = St::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Authors = St::Authors; - type Record = St::Record; type Uri = Set; - type IndexedAt = St::IndexedAt; + type Authors = St::Authors; type Notebook = St::Notebook; + type Record = St::Record; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Authors = St::Authors; - type Record = St::Record; type Uri = St::Uri; - type IndexedAt = Set; + type Authors = Set; type Notebook = St::Notebook; + type Record = St::Record; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData St>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { + type IndexedAt = St::IndexedAt; type Cid = St::Cid; + type Uri = St::Uri; type Authors = St::Authors; + type Notebook = Set; type Record = St::Record; - type Uri = St::Uri; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type IndexedAt = St::IndexedAt; - type Notebook = Set; + type Cid = St::Cid; + type Uri = St::Uri; + type Authors = St::Authors; + type Notebook = St::Notebook; + 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 `cid` field pub struct cid(()); - ///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 `indexed_at` field - pub struct indexed_at(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -3124,12 +3124,12 @@ where impl ChapterViewBuilder where St: chapter_view_state::State, + St::IndexedAt: chapter_view_state::IsSet, St::Cid: chapter_view_state::IsSet, - St::Authors: chapter_view_state::IsSet, - St::Record: chapter_view_state::IsSet, St::Uri: chapter_view_state::IsSet, - St::IndexedAt: chapter_view_state::IsSet, + St::Authors: chapter_view_state::IsSet, St::Notebook: chapter_view_state::IsSet, + St::Record: chapter_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ChapterView { @@ -3189,85 +3189,85 @@ pub mod entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; type IndexedAt; - type Uri; type Authors; + type Uri; type Record; - type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Cid = Unset; type IndexedAt = Unset; - type Uri = Unset; type Authors = Unset; + type Uri = Unset; type Record = Unset; - type Cid = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type IndexedAt = St::IndexedAt; + type Authors = St::Authors; + type Uri = St::Uri; + type Record = St::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type IndexedAt = Set; - type Uri = St::Uri; - type Authors = St::Authors; - type Record = St::Record; type Cid = St::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type IndexedAt = St::IndexedAt; - type Uri = Set; + type IndexedAt = Set; type Authors = St::Authors; + type Uri = St::Uri; type Record = St::Record; - type Cid = St::Cid; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData St>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { + type Cid = St::Cid; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; type Authors = Set; + type Uri = St::Uri; type Record = St::Record; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Cid = St::Cid; + type IndexedAt = St::IndexedAt; + type Authors = St::Authors; + type Uri = Set; + type Record = St::Record; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - type Authors = St::Authors; - type Record = Set; type Cid = St::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type IndexedAt = St::IndexedAt; - type Uri = St::Uri; type Authors = St::Authors; - type Record = St::Record; - type Cid = Set; + type Uri = St::Uri; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `authors` field pub struct authors(()); + ///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(()); } } @@ -3574,11 +3574,11 @@ impl EntryViewBuilder { impl EntryViewBuilder where St: entry_view_state::State, + St::Cid: entry_view_state::IsSet, St::IndexedAt: entry_view_state::IsSet, - St::Uri: entry_view_state::IsSet, St::Authors: entry_view_state::IsSet, + St::Uri: entry_view_state::IsSet, St::Record: entry_view_state::IsSet, - St::Cid: entry_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> EntryView { @@ -3777,37 +3777,37 @@ pub mod feed_notebook_context_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Uri; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Uri = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Uri = St::Uri; + type Title = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = St::Title; type Uri = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Uri = St::Uri; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -3896,8 +3896,8 @@ where impl FeedNotebookContextBuilder where St: feed_notebook_context_state::State, - St::Title: feed_notebook_context_state::IsSet, St::Uri: feed_notebook_context_state::IsSet, + St::Title: feed_notebook_context_state::IsSet, { /// Build the final struct. pub fn build(self) -> FeedNotebookContext { @@ -3932,85 +3932,85 @@ pub mod notebook_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Record; + type Authors; type IndexedAt; + type Uri; type Cid; - type Authors; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Record = Unset; + type Authors = Unset; type IndexedAt = Unset; + type Uri = Unset; type Cid = Unset; - type Authors = Unset; + type Record = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Record = St::Record; + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Authors = Set; type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - type Authors = St::Authors; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { type Uri = St::Uri; - type Record = Set; - type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Authors = St::Authors; + type Record = St::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Uri = St::Uri; - type Record = St::Record; + type Authors = St::Authors; type IndexedAt = Set; + type Uri = St::Uri; type Cid = St::Cid; + type Record = St::Record; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Authors = St::Authors; + type IndexedAt = St::IndexedAt; + type Uri = Set; + type Cid = St::Cid; + type Record = St::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; - type Record = St::Record; - type IndexedAt = St::IndexedAt; - type Cid = Set; type Authors = St::Authors; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { + type IndexedAt = St::IndexedAt; type Uri = St::Uri; + type Cid = Set; type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Authors = St::Authors; type IndexedAt = St::IndexedAt; + type Uri = St::Uri; type Cid = St::Cid; - type Authors = Set; + type Record = 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 `record` field - pub struct record(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `authors` field - pub struct authors(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -4341,11 +4341,11 @@ impl NotebookViewBuilder { impl NotebookViewBuilder where St: notebook_view_state::State, - St::Uri: notebook_view_state::IsSet, - St::Record: notebook_view_state::IsSet, + St::Authors: notebook_view_state::IsSet, St::IndexedAt: notebook_view_state::IsSet, + St::Uri: notebook_view_state::IsSet, St::Cid: notebook_view_state::IsSet, - St::Authors: notebook_view_state::IsSet, + St::Record: notebook_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> NotebookView { @@ -4408,85 +4408,85 @@ pub mod page_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; - type Cid; - type Record; type IndexedAt; + type Cid; + type Notebook; type Uri; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; - type Cid = Unset; - type Record = Unset; type IndexedAt = Unset; + type Cid = Unset; + type Notebook = Unset; type Uri = Unset; + type Record = Unset; } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData St>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Notebook = St::Notebook; type Uri = St::Uri; + type Record = St::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Notebook = St::Notebook; - type Cid = Set; - type Record = St::Record; type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData St>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + type Cid = Set; type Notebook = St::Notebook; - type Cid = St::Cid; - type Record = Set; - type IndexedAt = St::IndexedAt; type Uri = St::Uri; + type Record = St::Record; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Notebook = St::Notebook; + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData St>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type IndexedAt = St::IndexedAt; type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = Set; + type Notebook = Set; type Uri = St::Uri; + type Record = St::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Notebook = St::Notebook; + type IndexedAt = St::IndexedAt; type Cid = St::Cid; + type Notebook = St::Notebook; + type Uri = Set; type Record = St::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData St>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type IndexedAt = St::IndexedAt; - type Uri = Set; + type Cid = St::Cid; + type Notebook = St::Notebook; + type Uri = St::Uri; + type Record = 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 `cid` field - pub struct cid(()); - ///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(()); + ///Marker type for the `notebook` field + pub struct notebook(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -4661,11 +4661,11 @@ where impl PageViewBuilder where St: page_view_state::State, - St::Notebook: page_view_state::IsSet, - St::Cid: page_view_state::IsSet, - St::Record: page_view_state::IsSet, St::IndexedAt: page_view_state::IsSet, + St::Cid: page_view_state::IsSet, + St::Notebook: page_view_state::IsSet, St::Uri: page_view_state::IsSet, + St::Record: page_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PageView { @@ -4707,67 +4707,67 @@ pub mod permission_grant_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type GrantedAt; type Scope; + type Did; type Source; + type GrantedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type GrantedAt = Unset; type Scope = Unset; + type Did = Unset; type Source = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type GrantedAt = St::GrantedAt; - type Scope = St::Scope; - type Source = St::Source; - } - ///State transition - sets the `granted_at` field to Set - pub struct SetGrantedAt(PhantomData St>); - impl sealed::Sealed for SetGrantedAt {} - impl State for SetGrantedAt { - type Did = St::Did; - type GrantedAt = Set; - type Scope = St::Scope; - type Source = St::Source; + type GrantedAt = Unset; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData St>); impl sealed::Sealed for SetScope {} impl State for SetScope { + type Scope = Set; type Did = St::Did; + type Source = St::Source; type GrantedAt = St::GrantedAt; - type Scope = Set; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Scope = St::Scope; + type Did = Set; type Source = St::Source; + type GrantedAt = St::GrantedAt; } ///State transition - sets the `source` field to Set pub struct SetSource(PhantomData St>); impl sealed::Sealed for SetSource {} impl State for SetSource { + type Scope = St::Scope; type Did = St::Did; + type Source = Set; type GrantedAt = St::GrantedAt; + } + ///State transition - sets the `granted_at` field to Set + pub struct SetGrantedAt(PhantomData St>); + impl sealed::Sealed for SetGrantedAt {} + impl State for SetGrantedAt { type Scope = St::Scope; - type Source = Set; + type Did = St::Did; + type Source = St::Source; + type GrantedAt = 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 `granted_at` field - pub struct granted_at(()); ///Marker type for the `scope` field pub struct scope(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `source` field pub struct source(()); + ///Marker type for the `granted_at` field + pub struct granted_at(()); } } @@ -4880,10 +4880,10 @@ where impl PermissionGrantBuilder where St: permission_grant_state::State, - St::Did: permission_grant_state::IsSet, - St::GrantedAt: permission_grant_state::IsSet, St::Scope: permission_grant_state::IsSet, + St::Did: permission_grant_state::IsSet, St::Source: permission_grant_state::IsSet, + St::GrantedAt: permission_grant_state::IsSet, { /// Build the final struct. pub fn build(self) -> PermissionGrant { @@ -5045,66 +5045,66 @@ pub mod published_version_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; + type Publisher; type PublishedAt; type Cid; - type Publisher; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Uri = Unset; + type Publisher = Unset; type PublishedAt = Unset; type Cid = Unset; - type Publisher = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; + type Publisher = St::Publisher; + type PublishedAt = St::PublishedAt; + type Cid = St::Cid; + } + ///State transition - sets the `publisher` field to Set + pub struct SetPublisher(PhantomData St>); + impl sealed::Sealed for SetPublisher {} + impl State for SetPublisher { + type Uri = St::Uri; + type Publisher = Set; type PublishedAt = St::PublishedAt; type Cid = St::Cid; - type Publisher = St::Publisher; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData St>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { type Uri = St::Uri; + type Publisher = St::Publisher; type PublishedAt = Set; type Cid = St::Cid; - type Publisher = St::Publisher; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Uri = St::Uri; - type PublishedAt = St::PublishedAt; - type Cid = Set; type Publisher = St::Publisher; - } - ///State transition - sets the `publisher` field to Set - pub struct SetPublisher(PhantomData St>); - impl sealed::Sealed for SetPublisher {} - impl State for SetPublisher { - type Uri = St::Uri; type PublishedAt = St::PublishedAt; - type Cid = St::Cid; - type Publisher = 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 `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 `publisher` field - pub struct publisher(()); } } @@ -5275,9 +5275,9 @@ impl PublishedVersionViewBuilder where St: published_version_view_state::State, St::Uri: published_version_view_state::IsSet, + St::Publisher: published_version_view_state::IsSet, St::PublishedAt: published_version_view_state::IsSet, St::Cid: published_version_view_state::IsSet, - St::Publisher: published_version_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PublishedVersionView { @@ -5454,37 +5454,37 @@ pub mod reason_like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type By; type IndexedAt; + type By; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type By = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `by` field to Set - pub struct SetBy(PhantomData St>); - impl sealed::Sealed for SetBy {} - impl State for SetBy { - type By = Set; - type IndexedAt = St::IndexedAt; + type By = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type By = St::By; type IndexedAt = Set; + type By = St::By; + } + ///State transition - sets the `by` field to Set + pub struct SetBy(PhantomData St>); + impl sealed::Sealed for SetBy {} + impl State for SetBy { + type IndexedAt = St::IndexedAt; + type By = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `by` field - pub struct by(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `by` field + pub struct by(()); } } @@ -5554,8 +5554,8 @@ where impl ReasonLikeBuilder where St: reason_like_state::State, - St::By: reason_like_state::IsSet, St::IndexedAt: reason_like_state::IsSet, + St::By: reason_like_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReasonLike { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/book.rs b/crates/jacquard-api/src/sh_weaver/notebook/book.rs index 8cf4f0fdb..fb207d740 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/book.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/book.rs @@ -140,37 +140,37 @@ pub mod book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; type EntryList; + type Authors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; type EntryList = Unset; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData St>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; - type EntryList = St::EntryList; + type Authors = Unset; } ///State transition - sets the `entry_list` field to Set pub struct SetEntryList(PhantomData St>); impl sealed::Sealed for SetEntryList {} impl State for SetEntryList { - type Authors = St::Authors; type EntryList = Set; + type Authors = St::Authors; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData St>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type EntryList = St::EntryList; + type Authors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `authors` field - pub struct authors(()); ///Marker type for the `entry_list` field pub struct entry_list(()); + ///Marker type for the `authors` field + pub struct authors(()); } } @@ -372,8 +372,8 @@ impl BookBuilder { impl BookBuilder where St: book_state::State, - St::Authors: book_state::IsSet, St::EntryList: book_state::IsSet, + St::Authors: book_state::IsSet, { /// Build the final struct. pub fn build(self) -> Book { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/chapter.rs b/crates/jacquard-api/src/sh_weaver/notebook/chapter.rs index b2dbb6362..a901c7667 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/chapter.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/chapter.rs @@ -131,49 +131,49 @@ pub mod chapter_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Authors; + type Notebook; type EntryList; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; type Authors = Unset; + type Notebook = Unset; type EntryList = Unset; } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData St>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; - type Authors = St::Authors; - type EntryList = St::EntryList; - } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData St>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { - type Notebook = St::Notebook; type Authors = Set; + type Notebook = St::Notebook; + type EntryList = St::EntryList; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData St>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Authors = St::Authors; + type Notebook = Set; type EntryList = St::EntryList; } ///State transition - sets the `entry_list` field to Set pub struct SetEntryList(PhantomData St>); impl sealed::Sealed for SetEntryList {} impl State for SetEntryList { - type Notebook = St::Notebook; type Authors = St::Authors; + type Notebook = St::Notebook; type EntryList = 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 `authors` field pub struct authors(()); + ///Marker type for the `notebook` field + pub struct notebook(()); ///Marker type for the `entry_list` field pub struct entry_list(()); } @@ -341,8 +341,8 @@ impl ChapterBuilder { impl ChapterBuilder where St: chapter_state::State, - St::Notebook: chapter_state::IsSet, St::Authors: chapter_state::IsSet, + St::Notebook: chapter_state::IsSet, St::EntryList: chapter_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_weaver/notebook/colour_scheme.rs b/crates/jacquard-api/src/sh_weaver/notebook/colour_scheme.rs index b24b35692..160286ddc 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/colour_scheme.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/colour_scheme.rs @@ -405,51 +405,51 @@ pub mod colour_scheme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Variant; type Name; type Colours; + type Variant; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Variant = Unset; type Name = Unset; type Colours = Unset; - } - ///State transition - sets the `variant` field to Set - pub struct SetVariant(PhantomData St>); - impl sealed::Sealed for SetVariant {} - impl State for SetVariant { - type Variant = Set; - type Name = St::Name; - type Colours = St::Colours; + type Variant = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Variant = St::Variant; type Name = Set; type Colours = St::Colours; + type Variant = St::Variant; } ///State transition - sets the `colours` field to Set pub struct SetColours(PhantomData St>); impl sealed::Sealed for SetColours {} impl State for SetColours { - type Variant = St::Variant; type Name = St::Name; type Colours = Set; + type Variant = St::Variant; + } + ///State transition - sets the `variant` field to Set + pub struct SetVariant(PhantomData St>); + impl sealed::Sealed for SetVariant {} + impl State for SetVariant { + type Name = St::Name; + type Colours = St::Colours; + type Variant = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `variant` field - pub struct variant(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `colours` field pub struct colours(()); + ///Marker type for the `variant` field + pub struct variant(()); } } @@ -538,9 +538,9 @@ where impl ColourSchemeBuilder where St: colour_scheme_state::State, - St::Variant: colour_scheme_state::IsSet, St::Name: colour_scheme_state::IsSet, St::Colours: colour_scheme_state::IsSet, + St::Variant: colour_scheme_state::IsSet, { /// Build the final struct. pub fn build(self) -> ColourScheme { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/entry.rs b/crates/jacquard-api/src/sh_weaver/notebook/entry.rs index 1e27ac4b9..cacb4dfa9 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/entry.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/entry.rs @@ -351,67 +351,67 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Path; - type Title; type Content; + type CreatedAt; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Path = Unset; - type Title = Unset; type Content = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Path = St::Path; - type Title = St::Title; - type Content = St::Content; + type CreatedAt = Unset; + type Title = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData St>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type CreatedAt = St::CreatedAt; type Path = Set; - type Title = St::Title; type Content = St::Content; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { type CreatedAt = St::CreatedAt; - type Path = St::Path; - type Title = Set; - type Content = St::Content; + type Title = St::Title; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { + type Path = St::Path; + type Content = Set; type CreatedAt = St::CreatedAt; + type Title = St::Title; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Path = St::Path; + type Content = St::Content; + type CreatedAt = Set; type Title = St::Title; - type Content = Set; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Path = St::Path; + type Content = St::Content; + type CreatedAt = St::CreatedAt; + type Title = 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 `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(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -611,10 +611,10 @@ impl EntryBuilder { impl EntryBuilder where St: entry_state::State, - St::CreatedAt: entry_state::IsSet, St::Path: entry_state::IsSet, - St::Title: entry_state::IsSet, St::Content: entry_state::IsSet, + St::CreatedAt: entry_state::IsSet, + St::Title: entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> Entry { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/get_entry_notebooks.rs b/crates/jacquard-api/src/sh_weaver/notebook/get_entry_notebooks.rs index 34c9b960b..d48bab31e 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/get_entry_notebooks.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/get_entry_notebooks.rs @@ -195,37 +195,37 @@ pub mod notebook_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = St::Cid; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; type Cid = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -321,8 +321,8 @@ where impl NotebookRefBuilder where St: notebook_ref_state::State, - St::Uri: notebook_ref_state::IsSet, St::Cid: notebook_ref_state::IsSet, + St::Uri: notebook_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> NotebookRef { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/get_notebook_by_title.rs b/crates/jacquard-api/src/sh_weaver/notebook/get_notebook_by_title.rs index 9cac5c41e..2d209d047 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/get_notebook_by_title.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/get_notebook_by_title.rs @@ -112,37 +112,37 @@ pub mod get_notebook_by_title_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Actor; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Actor = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Actor = St::Actor; + type Title = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData St>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Title = St::Title; type Actor = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Actor = St::Actor; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `actor` field pub struct actor(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -212,8 +212,8 @@ where impl GetNotebookByTitleBuilder where St: get_notebook_by_title_state::State, - St::Title: get_notebook_by_title_state::IsSet, St::Actor: get_notebook_by_title_state::IsSet, + St::Title: get_notebook_by_title_state::IsSet, { /// Build the final struct. pub fn build(self) -> GetNotebookByTitle { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/get_suggested_notebooks.rs b/crates/jacquard-api/src/sh_weaver/notebook/get_suggested_notebooks.rs index 683407ad6..1701c0872 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/get_suggested_notebooks.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/get_suggested_notebooks.rs @@ -316,37 +316,37 @@ pub mod suggested_notebook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Reason; + 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 Reason = Unset; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData St>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; - type Reason = St::Reason; + type Notebook = Unset; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData St>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Notebook = St::Notebook; type Reason = Set; + type Notebook = St::Notebook; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData St>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Reason = St::Reason; + 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 `reason` field pub struct reason(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -433,8 +433,8 @@ impl SuggestedNotebookBuilder SuggestedNotebookBuilder where St: suggested_notebook_state::State, - St::Notebook: suggested_notebook_state::IsSet, St::Reason: suggested_notebook_state::IsSet, + St::Notebook: suggested_notebook_state::IsSet, { /// Build the final struct. pub fn build(self) -> SuggestedNotebook { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/page.rs b/crates/jacquard-api/src/sh_weaver/notebook/page.rs index a66a97da8..815c89070 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/page.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/page.rs @@ -124,50 +124,50 @@ pub mod page_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Authors; - type EntryList; type Notebook; + type EntryList; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Authors = Unset; - type EntryList = Unset; type Notebook = Unset; + type EntryList = Unset; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData St>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { type Authors = Set; - type EntryList = St::EntryList; - type Notebook = St::Notebook; - } - ///State transition - sets the `entry_list` field to Set - pub struct SetEntryList(PhantomData St>); - impl sealed::Sealed for SetEntryList {} - impl State for SetEntryList { - type Authors = St::Authors; - type EntryList = Set; type Notebook = St::Notebook; + type EntryList = St::EntryList; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData St>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { type Authors = St::Authors; - type EntryList = St::EntryList; type Notebook = Set; + type EntryList = St::EntryList; + } + ///State transition - sets the `entry_list` field to Set + pub struct SetEntryList(PhantomData St>); + impl sealed::Sealed for SetEntryList {} + impl State for SetEntryList { + type Authors = St::Authors; + type Notebook = St::Notebook; + type EntryList = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `authors` field pub struct authors(()); - ///Marker type for the `entry_list` field - pub struct entry_list(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `entry_list` field + pub struct entry_list(()); } } @@ -283,8 +283,8 @@ impl PageBuilder where St: page_state::State, St::Authors: page_state::IsSet, - St::EntryList: page_state::IsSet, St::Notebook: page_state::IsSet, + St::EntryList: page_state::IsSet, { /// Build the final struct. pub fn build(self) -> Page { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/resolve_entry.rs b/crates/jacquard-api/src/sh_weaver/notebook/resolve_entry.rs index 8e2e94959..b948f3a35 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/resolve_entry.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/resolve_entry.rs @@ -125,51 +125,51 @@ pub mod resolve_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Entry; - type Actor; type Notebook; + type Actor; + 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 Actor = Unset; type Notebook = Unset; + type Actor = Unset; + type Entry = Unset; } - ///State transition - sets the `entry` field to Set - pub struct SetEntry(PhantomData St>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Entry = Set; + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData St>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Notebook = Set; type Actor = St::Actor; - type Notebook = St::Notebook; + type Entry = St::Entry; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData St>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Entry = St::Entry; - type Actor = Set; type Notebook = St::Notebook; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData St>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { + type Actor = Set; type Entry = St::Entry; + } + ///State transition - sets the `entry` field to Set + pub struct SetEntry(PhantomData St>); + impl sealed::Sealed for SetEntry {} + impl State for SetEntry { + type Notebook = St::Notebook; type Actor = St::Actor; - type Notebook = Set; + 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 `actor` field - pub struct actor(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `actor` field + pub struct actor(()); + ///Marker type for the `entry` field + pub struct entry(()); } } @@ -258,9 +258,9 @@ where impl ResolveEntryBuilder where St: resolve_entry_state::State, - St::Entry: resolve_entry_state::IsSet, - St::Actor: resolve_entry_state::IsSet, St::Notebook: resolve_entry_state::IsSet, + St::Actor: resolve_entry_state::IsSet, + St::Entry: resolve_entry_state::IsSet, { /// Build the final struct. pub fn build(self) -> ResolveEntry { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/resolve_notebook.rs b/crates/jacquard-api/src/sh_weaver/notebook/resolve_notebook.rs index 1ea139604..d6edc9653 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/resolve_notebook.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/resolve_notebook.rs @@ -124,37 +124,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 St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Actor = St::Actor; + type Name = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData St>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Name = St::Name; type Actor = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Actor = St::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(()); } } @@ -250,8 +250,8 @@ where impl ResolveNotebookBuilder where St: resolve_notebook_state::State, - St::Name: resolve_notebook_state::IsSet, St::Actor: resolve_notebook_state::IsSet, + St::Name: resolve_notebook_state::IsSet, { /// Build the final struct. pub fn build(self) -> ResolveNotebook { diff --git a/crates/jacquard-api/src/sh_weaver/notebook/theme.rs b/crates/jacquard-api/src/sh_weaver/notebook/theme.rs index 2ee5868b6..3c5740c34 100644 --- a/crates/jacquard-api/src/sh_weaver/notebook/theme.rs +++ b/crates/jacquard-api/src/sh_weaver/notebook/theme.rs @@ -345,51 +345,51 @@ pub mod code_theme_file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; - type Content; type Did; + type Content; + 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 Content = Unset; type Did = Unset; + type Content = Unset; + type Name = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Content = St::Content; - type Did = St::Did; + type Name = St::Name; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Name = St::Name; - type Content = Set; type Did = St::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + type Content = Set; type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Did = St::Did; type Content = St::Content; - type Did = Set; + 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 `content` field - pub struct content(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -478,9 +478,9 @@ where impl CodeThemeFileBuilder where St: code_theme_file_state::State, - St::Name: code_theme_file_state::IsSet, - St::Content: code_theme_file_state::IsSet, St::Did: code_theme_file_state::IsSet, + St::Content: code_theme_file_state::IsSet, + St::Name: code_theme_file_state::IsSet, { /// Build the final struct. pub fn build(self) -> CodeThemeFile { @@ -1084,50 +1084,50 @@ pub mod theme_fonts_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Heading; - type Body; type Monospace; + type Body; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Heading = Unset; - type Body = Unset; type Monospace = Unset; + type Body = Unset; } ///State transition - sets the `heading` field to Set pub struct SetHeading(PhantomData St>); impl sealed::Sealed for SetHeading {} impl State for SetHeading { type Heading = Set; - type Body = St::Body; - type Monospace = St::Monospace; - } - ///State transition - sets the `body` field to Set - pub struct SetBody(PhantomData St>); - impl sealed::Sealed for SetBody {} - impl State for SetBody { - type Heading = St::Heading; - type Body = Set; type Monospace = St::Monospace; + type Body = St::Body; } ///State transition - sets the `monospace` field to Set pub struct SetMonospace(PhantomData St>); impl sealed::Sealed for SetMonospace {} impl State for SetMonospace { type Heading = St::Heading; - type Body = St::Body; type Monospace = Set; + type Body = St::Body; + } + ///State transition - sets the `body` field to Set + pub struct SetBody(PhantomData St>); + impl sealed::Sealed for SetBody {} + impl State for SetBody { + type Heading = St::Heading; + type Monospace = St::Monospace; + type Body = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `heading` field pub struct heading(()); - ///Marker type for the `body` field - pub struct body(()); ///Marker type for the `monospace` field pub struct monospace(()); + ///Marker type for the `body` field + pub struct body(()); } } @@ -1221,8 +1221,8 @@ impl ThemeFontsBuilder where St: theme_fonts_state::State, St::Heading: theme_fonts_state::IsSet, - St::Body: theme_fonts_state::IsSet, St::Monospace: theme_fonts_state::IsSet, + St::Body: theme_fonts_state::IsSet, { /// Build the final struct. pub fn build(self) -> ThemeFonts { @@ -1272,105 +1272,105 @@ pub mod theme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type LightScheme; - type Fonts; type Spacing; - type DarkScheme; + type LightScheme; type DarkCodeTheme; type LightCodeTheme; + type DarkScheme; + type Fonts; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type LightScheme = Unset; - type Fonts = Unset; type Spacing = Unset; - type DarkScheme = Unset; + type LightScheme = Unset; type DarkCodeTheme = Unset; type LightCodeTheme = Unset; - } - ///State transition - sets the `light_scheme` field to Set - pub struct SetLightScheme(PhantomData St>); - impl sealed::Sealed for SetLightScheme {} - impl State for SetLightScheme { - type LightScheme = Set; - type Fonts = St::Fonts; - type Spacing = St::Spacing; - type DarkScheme = St::DarkScheme; - type DarkCodeTheme = St::DarkCodeTheme; - type LightCodeTheme = St::LightCodeTheme; - } - ///State transition - sets the `fonts` field to Set - pub struct SetFonts(PhantomData St>); - impl sealed::Sealed for SetFonts {} - impl State for SetFonts { - type LightScheme = St::LightScheme; - type Fonts = Set; - type Spacing = St::Spacing; - type DarkScheme = St::DarkScheme; - type DarkCodeTheme = St::DarkCodeTheme; - type LightCodeTheme = St::LightCodeTheme; + type DarkScheme = Unset; + type Fonts = Unset; } ///State transition - sets the `spacing` field to Set pub struct SetSpacing(PhantomData St>); impl sealed::Sealed for SetSpacing {} impl State for SetSpacing { - type LightScheme = St::LightScheme; - type Fonts = St::Fonts; type Spacing = Set; - type DarkScheme = St::DarkScheme; + type LightScheme = St::LightScheme; type DarkCodeTheme = St::DarkCodeTheme; type LightCodeTheme = St::LightCodeTheme; - } - ///State transition - sets the `dark_scheme` field to Set - pub struct SetDarkScheme(PhantomData St>); - impl sealed::Sealed for SetDarkScheme {} - impl State for SetDarkScheme { - type LightScheme = St::LightScheme; + type DarkScheme = St::DarkScheme; type Fonts = St::Fonts; + } + ///State transition - sets the `light_scheme` field to Set + pub struct SetLightScheme(PhantomData St>); + impl sealed::Sealed for SetLightScheme {} + impl State for SetLightScheme { type Spacing = St::Spacing; - type DarkScheme = Set; + type LightScheme = Set; type DarkCodeTheme = St::DarkCodeTheme; type LightCodeTheme = St::LightCodeTheme; + type DarkScheme = St::DarkScheme; + type Fonts = St::Fonts; } ///State transition - sets the `dark_code_theme` field to Set pub struct SetDarkCodeTheme(PhantomData St>); impl sealed::Sealed for SetDarkCodeTheme {} impl State for SetDarkCodeTheme { - type LightScheme = St::LightScheme; - type Fonts = St::Fonts; type Spacing = St::Spacing; - type DarkScheme = St::DarkScheme; + type LightScheme = St::LightScheme; type DarkCodeTheme = Set; type LightCodeTheme = St::LightCodeTheme; + type DarkScheme = St::DarkScheme; + type Fonts = St::Fonts; } ///State transition - sets the `light_code_theme` field to Set pub struct SetLightCodeTheme(PhantomData St>); impl sealed::Sealed for SetLightCodeTheme {} impl State for SetLightCodeTheme { + type Spacing = St::Spacing; type LightScheme = St::LightScheme; + type DarkCodeTheme = St::DarkCodeTheme; + type LightCodeTheme = Set; + type DarkScheme = St::DarkScheme; type Fonts = St::Fonts; + } + ///State transition - sets the `dark_scheme` field to Set + pub struct SetDarkScheme(PhantomData St>); + impl sealed::Sealed for SetDarkScheme {} + impl State for SetDarkScheme { type Spacing = St::Spacing; - type DarkScheme = St::DarkScheme; + type LightScheme = St::LightScheme; type DarkCodeTheme = St::DarkCodeTheme; - type LightCodeTheme = Set; + type LightCodeTheme = St::LightCodeTheme; + type DarkScheme = Set; + type Fonts = St::Fonts; + } + ///State transition - sets the `fonts` field to Set + pub struct SetFonts(PhantomData St>); + impl sealed::Sealed for SetFonts {} + impl State for SetFonts { + type Spacing = St::Spacing; + type LightScheme = St::LightScheme; + type DarkCodeTheme = St::DarkCodeTheme; + type LightCodeTheme = St::LightCodeTheme; + type DarkScheme = St::DarkScheme; + type Fonts = 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 `fonts` field - pub struct fonts(()); ///Marker type for the `spacing` field pub struct spacing(()); - ///Marker type for the `dark_scheme` field - pub struct dark_scheme(()); + ///Marker type for the `light_scheme` field + pub struct light_scheme(()); ///Marker type for the `dark_code_theme` field pub struct dark_code_theme(()); ///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 `fonts` field + pub struct fonts(()); } } @@ -1537,12 +1537,12 @@ where impl ThemeBuilder where St: theme_state::State, - St::LightScheme: theme_state::IsSet, - St::Fonts: theme_state::IsSet, St::Spacing: theme_state::IsSet, - St::DarkScheme: theme_state::IsSet, + St::LightScheme: theme_state::IsSet, St::DarkCodeTheme: theme_state::IsSet, St::LightCodeTheme: theme_state::IsSet, + St::DarkScheme: theme_state::IsSet, + St::Fonts: theme_state::IsSet, { /// Build the final struct. pub fn build(self) -> Theme { diff --git a/crates/jacquard-api/src/sh_weaver/notification.rs b/crates/jacquard-api/src/sh_weaver/notification.rs index be9bbdc4e..0b9d1e375 100644 --- a/crates/jacquard-api/src/sh_weaver/notification.rs +++ b/crates/jacquard-api/src/sh_weaver/notification.rs @@ -285,105 +285,105 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Reason; - type Cid; - type Author; type IndexedAt; type IsRead; + type Uri; + type Cid; + type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Reason = Unset; - type Cid = Unset; - type Author = Unset; type IndexedAt = Unset; type IsRead = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Reason = St::Reason; - type Cid = St::Cid; - type Author = St::Author; - type IndexedAt = St::IndexedAt; - type IsRead = St::IsRead; + type Uri = Unset; + type Cid = Unset; + type Author = Unset; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData St>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type Uri = St::Uri; type Reason = Set; - type Cid = St::Cid; - type Author = St::Author; - type IndexedAt = St::IndexedAt; - type IsRead = St::IsRead; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = St::Uri; - type Reason = St::Reason; - type Cid = Set; - type Author = St::Author; type IndexedAt = St::IndexedAt; type IsRead = St::IsRead; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type Uri = St::Uri; - type Reason = St::Reason; type Cid = St::Cid; - type Author = Set; - type IndexedAt = St::IndexedAt; - type IsRead = St::IsRead; + type Author = St::Author; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Uri = St::Uri; type Reason = St::Reason; - type Cid = St::Cid; - type Author = St::Author; type IndexedAt = Set; type IsRead = St::IsRead; + type Uri = St::Uri; + type Cid = St::Cid; + type Author = St::Author; } ///State transition - sets the `is_read` field to Set pub struct SetIsRead(PhantomData St>); impl sealed::Sealed for SetIsRead {} impl State for SetIsRead { + type Reason = St::Reason; + type IndexedAt = St::IndexedAt; + type IsRead = Set; type Uri = St::Uri; + type Cid = St::Cid; + type Author = St::Author; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Reason = St::Reason; + type IndexedAt = St::IndexedAt; + type IsRead = St::IsRead; + type Uri = Set; type Cid = St::Cid; type Author = St::Author; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Reason = St::Reason; + type IndexedAt = St::IndexedAt; + type IsRead = St::IsRead; + type Uri = St::Uri; + type Cid = Set; + type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Reason = St::Reason; type IndexedAt = St::IndexedAt; - type IsRead = Set; + type IsRead = St::IsRead; + type Uri = St::Uri; + type Cid = St::Cid; + type Author = 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 `reason` field pub struct reason(()); - ///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 `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -564,12 +564,12 @@ where impl NotificationBuilder where St: notification_state::State, - St::Uri: notification_state::IsSet, St::Reason: notification_state::IsSet, - St::Cid: notification_state::IsSet, - St::Author: notification_state::IsSet, St::IndexedAt: notification_state::IsSet, St::IsRead: notification_state::IsSet, + St::Uri: notification_state::IsSet, + St::Cid: notification_state::IsSet, + St::Author: notification_state::IsSet, { /// Build the final struct. pub fn build(self) -> Notification { @@ -863,85 +863,85 @@ pub mod notification_group_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MostRecentAt; type Actors; - type Reason; - type Subject; type Count; + type Subject; + type MostRecentAt; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MostRecentAt = Unset; type Actors = Unset; - type Reason = Unset; - type Subject = Unset; type Count = Unset; - } - ///State transition - sets the `most_recent_at` field to Set - pub struct SetMostRecentAt(PhantomData St>); - impl sealed::Sealed for SetMostRecentAt {} - impl State for SetMostRecentAt { - type MostRecentAt = Set; - type Actors = St::Actors; - type Reason = St::Reason; - type Subject = St::Subject; - type Count = St::Count; + type Subject = Unset; + type MostRecentAt = Unset; + type Reason = Unset; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData St>); impl sealed::Sealed for SetActors {} impl State for SetActors { - type MostRecentAt = St::MostRecentAt; type Actors = Set; - type Reason = St::Reason; - type Subject = St::Subject; type Count = St::Count; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { + type Subject = St::Subject; type MostRecentAt = St::MostRecentAt; + type Reason = St::Reason; + } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData St>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { type Actors = St::Actors; - type Reason = Set; + type Count = Set; type Subject = St::Subject; - type Count = St::Count; + type MostRecentAt = St::MostRecentAt; + type Reason = St::Reason; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type MostRecentAt = St::MostRecentAt; type Actors = St::Actors; - type Reason = St::Reason; - type Subject = Set; type Count = St::Count; - } - ///State transition - sets the `count` field to Set - pub struct SetCount(PhantomData St>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { + type Subject = Set; type MostRecentAt = St::MostRecentAt; + type Reason = St::Reason; + } + ///State transition - sets the `most_recent_at` field to Set + pub struct SetMostRecentAt(PhantomData St>); + impl sealed::Sealed for SetMostRecentAt {} + impl State for SetMostRecentAt { type Actors = St::Actors; + type Count = St::Count; + type Subject = St::Subject; + type MostRecentAt = Set; type Reason = St::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Actors = St::Actors; + type Count = St::Count; type Subject = St::Subject; - type Count = Set; + type MostRecentAt = St::MostRecentAt; + type Reason = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `most_recent_at` field - pub struct most_recent_at(()); ///Marker type for the `actors` field pub struct actors(()); - ///Marker type for the `reason` field - pub struct reason(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `count` field pub struct count(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `most_recent_at` field + pub struct most_recent_at(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -1088,11 +1088,11 @@ where impl NotificationGroupBuilder where St: notification_group_state::State, - St::MostRecentAt: notification_group_state::IsSet, St::Actors: notification_group_state::IsSet, - St::Reason: notification_group_state::IsSet, - St::Subject: notification_group_state::IsSet, St::Count: notification_group_state::IsSet, + St::Subject: notification_group_state::IsSet, + St::MostRecentAt: notification_group_state::IsSet, + St::Reason: notification_group_state::IsSet, { /// Build the final struct. pub fn build(self) -> NotificationGroup { @@ -1133,49 +1133,49 @@ 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 NewEntries; type UpdatedAt; } /// 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 NewEntries = Unset; type UpdatedAt = Unset; } - ///State transition - sets the `new_entries` field to Set - pub struct SetNewEntries(PhantomData St>); - impl sealed::Sealed for SetNewEntries {} - impl State for SetNewEntries { - type NewEntries = Set; - type Notebook = St::Notebook; - type UpdatedAt = St::UpdatedAt; - } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData St>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type NewEntries = St::NewEntries; type Notebook = Set; + type NewEntries = St::NewEntries; + type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `new_entries` field to Set + pub struct SetNewEntries(PhantomData St>); + impl sealed::Sealed for SetNewEntries {} + impl State for SetNewEntries { + type Notebook = St::Notebook; + type NewEntries = Set; type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type NewEntries = St::NewEntries; type Notebook = St::Notebook; + type NewEntries = St::NewEntries; type UpdatedAt = 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 `new_entries` field + pub struct new_entries(()); ///Marker type for the `updated_at` field pub struct updated_at(()); } @@ -1305,8 +1305,8 @@ impl< impl SubscriptionUpdateViewBuilder where St: subscription_update_view_state::State, - St::NewEntries: subscription_update_view_state::IsSet, St::Notebook: subscription_update_view_state::IsSet, + St::NewEntries: subscription_update_view_state::IsSet, St::UpdatedAt: subscription_update_view_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/sh_weaver/publish/blob.rs b/crates/jacquard-api/src/sh_weaver/publish/blob.rs index b308249e5..7bca55889 100644 --- a/crates/jacquard-api/src/sh_weaver/publish/blob.rs +++ b/crates/jacquard-api/src/sh_weaver/publish/blob.rs @@ -166,37 +166,37 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Upload; type Path; + type Upload; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Upload = Unset; type Path = Unset; - } - ///State transition - sets the `upload` field to Set - pub struct SetUpload(PhantomData St>); - impl sealed::Sealed for SetUpload {} - impl State for SetUpload { - type Upload = Set; - type Path = St::Path; + type Upload = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData St>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Upload = St::Upload; type Path = Set; + type Upload = St::Upload; + } + ///State transition - sets the `upload` field to Set + pub struct SetUpload(PhantomData St>); + impl sealed::Sealed for SetUpload {} + impl State for SetUpload { + type Path = St::Path; + type Upload = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `upload` field - pub struct upload(()); ///Marker type for the `path` field pub struct path(()); + ///Marker type for the `upload` field + pub struct upload(()); } } @@ -266,8 +266,8 @@ where impl BlobBuilder where St: blob_state::State, - St::Upload: blob_state::IsSet, St::Path: blob_state::IsSet, + St::Upload: blob_state::IsSet, { /// Build the final struct. pub fn build(self) -> Blob { diff --git a/crates/jacquard-api/src/site_standard/document.rs b/crates/jacquard-api/src/site_standard/document.rs index b3444224c..39946c4bb 100644 --- a/crates/jacquard-api/src/site_standard/document.rs +++ b/crates/jacquard-api/src/site_standard/document.rs @@ -224,51 +224,51 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Site; type Title; type PublishedAt; + type Site; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Site = Unset; type Title = Unset; type PublishedAt = Unset; - } - ///State transition - sets the `site` field to Set - pub struct SetSite(PhantomData St>); - impl sealed::Sealed for SetSite {} - impl State for SetSite { - type Site = Set; - type Title = St::Title; - type PublishedAt = St::PublishedAt; + type Site = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Site = St::Site; type Title = Set; type PublishedAt = St::PublishedAt; + type Site = St::Site; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData St>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Site = St::Site; type Title = St::Title; type PublishedAt = Set; + type Site = St::Site; + } + ///State transition - sets the `site` field to Set + pub struct SetSite(PhantomData St>); + impl sealed::Sealed for SetSite {} + impl State for SetSite { + type Title = St::Title; + type PublishedAt = St::PublishedAt; + type Site = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `site` field - pub struct site(()); ///Marker type for the `title` field pub struct title(()); ///Marker type for the `published_at` field pub struct published_at(()); + ///Marker type for the `site` field + pub struct site(()); } } @@ -515,9 +515,9 @@ impl DocumentBuilder { impl DocumentBuilder where St: document_state::State, - St::Site: document_state::IsSet, St::Title: document_state::IsSet, St::PublishedAt: document_state::IsSet, + St::Site: document_state::IsSet, { /// Build the final struct. pub fn build(self) -> Document { diff --git a/crates/jacquard-api/src/site_standard/publication.rs b/crates/jacquard-api/src/site_standard/publication.rs index 99c3c3625..860ee5d11 100644 --- a/crates/jacquard-api/src/site_standard/publication.rs +++ b/crates/jacquard-api/src/site_standard/publication.rs @@ -252,37 +252,37 @@ pub mod publication_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Name; + 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 Name = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Name = St::Name; + type Url = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Url = St::Url; type Name = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Name = St::Name; + 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 `name` field pub struct name(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -431,8 +431,8 @@ where impl PublicationBuilder where St: publication_state::State, - St::Url: publication_state::IsSet, St::Name: publication_state::IsSet, + St::Url: publication_state::IsSet, { /// Build the final struct. pub fn build(self) -> Publication { diff --git a/crates/jacquard-api/src/site_standard/theme/basic.rs b/crates/jacquard-api/src/site_standard/theme/basic.rs index 433765503..97d05ed87 100644 --- a/crates/jacquard-api/src/site_standard/theme/basic.rs +++ b/crates/jacquard-api/src/site_standard/theme/basic.rs @@ -61,65 +61,65 @@ pub mod basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Background; type Foreground; type Accent; + type Background; type AccentForeground; } /// 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 Accent = Unset; + type Background = Unset; type AccentForeground = Unset; } - ///State transition - sets the `background` field to Set - pub struct SetBackground(PhantomData St>); - impl sealed::Sealed for SetBackground {} - impl State for SetBackground { - type Background = Set; - type Foreground = St::Foreground; - type Accent = St::Accent; - type AccentForeground = St::AccentForeground; - } ///State transition - sets the `foreground` field to Set pub struct SetForeground(PhantomData St>); impl sealed::Sealed for SetForeground {} impl State for SetForeground { - type Background = St::Background; type Foreground = Set; type Accent = St::Accent; + type Background = St::Background; type AccentForeground = St::AccentForeground; } ///State transition - sets the `accent` field to Set pub struct SetAccent(PhantomData St>); impl sealed::Sealed for SetAccent {} impl State for SetAccent { - type Background = St::Background; type Foreground = St::Foreground; type Accent = Set; + type Background = St::Background; + type AccentForeground = St::AccentForeground; + } + ///State transition - sets the `background` field to Set + pub struct SetBackground(PhantomData St>); + impl sealed::Sealed for SetBackground {} + impl State for SetBackground { + type Foreground = St::Foreground; + type Accent = St::Accent; + type Background = Set; type AccentForeground = St::AccentForeground; } ///State transition - sets the `accent_foreground` field to Set pub struct SetAccentForeground(PhantomData St>); impl sealed::Sealed for SetAccentForeground {} impl State for SetAccentForeground { - type Background = St::Background; type Foreground = St::Foreground; type Accent = St::Accent; + type Background = St::Background; type AccentForeground = 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` field pub struct accent(()); + ///Marker type for the `background` field + pub struct background(()); ///Marker type for the `accent_foreground` field pub struct accent_foreground(()); } @@ -229,9 +229,9 @@ where impl BasicBuilder where St: basic_state::State, - St::Background: basic_state::IsSet, St::Foreground: basic_state::IsSet, St::Accent: basic_state::IsSet, + St::Background: basic_state::IsSet, St::AccentForeground: basic_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/site_standard/theme/color.rs b/crates/jacquard-api/src/site_standard/theme/color.rs index ea4523d18..e11c346fa 100644 --- a/crates/jacquard-api/src/site_standard/theme/color.rs +++ b/crates/jacquard-api/src/site_standard/theme/color.rs @@ -226,51 +226,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 G; + 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 G = Unset; + type R = Unset; } - ///State transition - sets the `r` field to Set - pub struct SetR(PhantomData St>); - impl sealed::Sealed for SetR {} - impl State for SetR { - type R = Set; + ///State transition - sets the `b` field to Set + pub struct SetB(PhantomData St>); + impl sealed::Sealed for SetB {} + impl State for SetB { + type B = Set; type G = St::G; - type B = St::B; + type R = St::R; } ///State transition - sets the `g` field to Set pub struct SetG(PhantomData St>); impl sealed::Sealed for SetG {} impl State for SetG { - type R = St::R; - type G = Set; type B = St::B; - } - ///State transition - sets the `b` field to Set - pub struct SetB(PhantomData St>); - impl sealed::Sealed for SetB {} - impl State for SetB { + type G = Set; type R = St::R; + } + ///State transition - sets the `r` field to Set + pub struct SetR(PhantomData St>); + impl sealed::Sealed for SetR {} + impl State for SetR { + type B = St::B; type G = St::G; - type B = Set; + type R = 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 `g` field + pub struct g(()); + ///Marker type for the `r` field + pub struct r(()); } } @@ -350,9 +350,9 @@ where impl RgbBuilder where St: rgb_state::State, - St::R: rgb_state::IsSet, - St::G: rgb_state::IsSet, St::B: rgb_state::IsSet, + St::G: rgb_state::IsSet, + St::R: rgb_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rgb { @@ -491,66 +491,66 @@ pub mod rgba_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type R; - type A; type B; type G; + type A; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type R = Unset; - type A = Unset; type B = Unset; type G = Unset; + type A = Unset; } ///State transition - sets the `r` field to Set pub struct SetR(PhantomData St>); impl sealed::Sealed for SetR {} impl State for SetR { type R = Set; - type A = St::A; - type B = St::B; - type G = St::G; - } - ///State transition - sets the `a` field to Set - pub struct SetA(PhantomData St>); - impl sealed::Sealed for SetA {} - impl State for SetA { - type R = St::R; - type A = Set; type B = St::B; type G = St::G; + type A = St::A; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData St>); impl sealed::Sealed for SetB {} impl State for SetB { type R = St::R; - type A = St::A; type B = Set; type G = St::G; + type A = St::A; } ///State transition - sets the `g` field to Set pub struct SetG(PhantomData St>); impl sealed::Sealed for SetG {} impl State for SetG { type R = St::R; - type A = St::A; type B = St::B; type G = Set; + type A = St::A; + } + ///State transition - sets the `a` field to Set + pub struct SetA(PhantomData St>); + impl sealed::Sealed for SetA {} + impl State for SetA { + type R = St::R; + type B = St::B; + type G = St::G; + type A = 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 `a` field - pub struct a(()); ///Marker type for the `b` field pub struct b(()); ///Marker type for the `g` field pub struct g(()); + ///Marker type for the `a` field + pub struct a(()); } } @@ -647,9 +647,9 @@ impl RgbaBuilder where St: rgba_state::State, St::R: rgba_state::IsSet, - St::A: rgba_state::IsSet, St::B: rgba_state::IsSet, St::G: rgba_state::IsSet, + St::A: rgba_state::IsSet, { /// Build the final struct. pub fn build(self) -> Rgba { diff --git a/crates/jacquard-api/src/social_clippr/actor/profile.rs b/crates/jacquard-api/src/social_clippr/actor/profile.rs index 0d92900c6..6e87499f0 100644 --- a/crates/jacquard-api/src/social_clippr/actor/profile.rs +++ b/crates/jacquard-api/src/social_clippr/actor/profile.rs @@ -207,37 +207,37 @@ pub mod profile_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type DisplayName; type CreatedAt; + type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type DisplayName = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData St>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type DisplayName = Set; - type CreatedAt = St::CreatedAt; + type DisplayName = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type DisplayName = St::DisplayName; type CreatedAt = Set; + type DisplayName = St::DisplayName; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData St>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type CreatedAt = St::CreatedAt; + type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `display_name` field + pub struct display_name(()); } } @@ -333,8 +333,8 @@ where impl ProfileBuilder where St: profile_state::State, - St::DisplayName: profile_state::IsSet, St::CreatedAt: profile_state::IsSet, + St::DisplayName: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/social_clippr/feed.rs b/crates/jacquard-api/src/social_clippr/feed.rs index b9688fb1f..6fc88086a 100644 --- a/crates/jacquard-api/src/social_clippr/feed.rs +++ b/crates/jacquard-api/src/social_clippr/feed.rs @@ -112,83 +112,83 @@ pub mod clip_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IndexedAt; type Author; - type Uri; type Record; - type IndexedAt; + type Uri; 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 Author = Unset; - type Uri = Unset; type Record = Unset; - type IndexedAt = Unset; + type Uri = Unset; type Cid = Unset; } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type Author = St::Author; + type Record = St::Record; + type Uri = St::Uri; + type Cid = St::Cid; + } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Author = Set; - type Uri = St::Uri; - type Record = St::Record; type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Author = St::Author; - type Uri = Set; + type Author = Set; type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Uri = St::Uri; type Cid = St::Cid; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { + type IndexedAt = St::IndexedAt; type Author = St::Author; - type Uri = St::Uri; type Record = Set; - type IndexedAt = St::IndexedAt; + type Uri = St::Uri; type Cid = St::Cid; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type IndexedAt = St::IndexedAt; type Author = St::Author; - type Uri = St::Uri; type Record = St::Record; - type IndexedAt = Set; + type Uri = Set; type Cid = St::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type IndexedAt = St::IndexedAt; type Author = St::Author; - type Uri = St::Uri; type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Uri = St::Uri; 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 `author` field pub struct author(()); - ///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 `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -323,10 +323,10 @@ where impl ClipViewBuilder where St: clip_view_state::State, + St::IndexedAt: clip_view_state::IsSet, St::Author: clip_view_state::IsSet, - St::Uri: clip_view_state::IsSet, St::Record: clip_view_state::IsSet, - St::IndexedAt: clip_view_state::IsSet, + St::Uri: clip_view_state::IsSet, St::Cid: clip_view_state::IsSet, { /// Build the final struct. @@ -512,84 +512,84 @@ pub mod tag_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Record; - type IndexedAt; + type Author; type Cid; type Uri; - type Author; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Record = Unset; - type IndexedAt = Unset; + type Author = Unset; type Cid = Unset; type Uri = Unset; - type Author = Unset; + type IndexedAt = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Record = Set; - type IndexedAt = St::IndexedAt; + type Author = St::Author; type Cid = St::Cid; type Uri = St::Uri; - type Author = St::Author; + type IndexedAt = St::IndexedAt; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Record = St::Record; - type IndexedAt = Set; + type Author = Set; type Cid = St::Cid; type Uri = St::Uri; - type Author = St::Author; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Author = St::Author; type Cid = Set; type Uri = St::Uri; - type Author = St::Author; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Author = St::Author; type Cid = St::Cid; type Uri = Set; - type Author = St::Author; + type IndexedAt = St::IndexedAt; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Record = St::Record; - type IndexedAt = St::IndexedAt; + type Author = St::Author; type Cid = St::Cid; type Uri = St::Uri; - type Author = Set; + type IndexedAt = 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 `indexed_at` field - pub struct indexed_at(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -723,10 +723,10 @@ impl TagViewBuilder where St: tag_view_state::State, St::Record: tag_view_state::IsSet, - St::IndexedAt: tag_view_state::IsSet, + St::Author: tag_view_state::IsSet, St::Cid: tag_view_state::IsSet, St::Uri: tag_view_state::IsSet, - St::Author: tag_view_state::IsSet, + St::IndexedAt: tag_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TagView { diff --git a/crates/jacquard-api/src/social_clippr/feed/clip.rs b/crates/jacquard-api/src/social_clippr/feed/clip.rs index 23c2fc73d..fceb3c1d1 100644 --- a/crates/jacquard-api/src/social_clippr/feed/clip.rs +++ b/crates/jacquard-api/src/social_clippr/feed/clip.rs @@ -248,84 +248,84 @@ pub mod clip_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Description; + type Title; type Url; + type Description; type Unlisted; - type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Description = Unset; + type Title = Unset; type Url = Unset; + type Description = Unset; type Unlisted = Unset; - type Title = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type Description = St::Description; + type Title = St::Title; type Url = St::Url; + type Description = St::Description; type Unlisted = St::Unlisted; - type Title = St::Title; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData St>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { type CreatedAt = St::CreatedAt; - type Description = Set; + type Title = Set; type Url = St::Url; + type Description = St::Description; type Unlisted = St::Unlisted; - type Title = St::Title; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { type CreatedAt = St::CreatedAt; - type Description = St::Description; + type Title = St::Title; type Url = Set; + type Description = St::Description; type Unlisted = St::Unlisted; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData St>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type CreatedAt = St::CreatedAt; type Title = St::Title; + type Url = St::Url; + type Description = Set; + type Unlisted = St::Unlisted; } ///State transition - sets the `unlisted` field to Set pub struct SetUnlisted(PhantomData St>); impl sealed::Sealed for SetUnlisted {} impl State for SetUnlisted { type CreatedAt = St::CreatedAt; - type Description = St::Description; - type Url = St::Url; - type Unlisted = Set; type Title = St::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type CreatedAt = St::CreatedAt; - type Description = St::Description; type Url = St::Url; - type Unlisted = St::Unlisted; - type Title = Set; + type Description = St::Description; + type Unlisted = 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 `description` field - pub struct description(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `unlisted` field pub struct unlisted(()); - ///Marker type for the `title` field - pub struct title(()); } } @@ -515,10 +515,10 @@ impl ClipBuilder where St: clip_state::State, St::CreatedAt: clip_state::IsSet, - St::Description: clip_state::IsSet, + St::Title: clip_state::IsSet, St::Url: clip_state::IsSet, + St::Description: clip_state::IsSet, St::Unlisted: clip_state::IsSet, - St::Title: clip_state::IsSet, { /// Build the final struct. pub fn build(self) -> Clip { diff --git a/crates/jacquard-api/src/social_clippr/feed/tag.rs b/crates/jacquard-api/src/social_clippr/feed/tag.rs index 25ddd5dca..c43e4cdea 100644 --- a/crates/jacquard-api/src/social_clippr/feed/tag.rs +++ b/crates/jacquard-api/src/social_clippr/feed/tag.rs @@ -188,37 +188,37 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -311,8 +311,8 @@ where impl TagBuilder where St: tag_state::State, - St::Name: tag_state::IsSet, St::CreatedAt: tag_state::IsSet, + St::Name: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/social_colibri/approval.rs b/crates/jacquard-api/src/social_colibri/approval.rs index 17560a8db..b2c745449 100644 --- a/crates/jacquard-api/src/social_colibri/approval.rs +++ b/crates/jacquard-api/src/social_colibri/approval.rs @@ -114,51 +114,51 @@ pub mod approval_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Membership; type Community; type CreatedAt; + type Membership; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Membership = Unset; type Community = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `membership` field to Set - pub struct SetMembership(PhantomData St>); - impl sealed::Sealed for SetMembership {} - impl State for SetMembership { - type Membership = Set; - type Community = St::Community; - type CreatedAt = St::CreatedAt; + type Membership = Unset; } ///State transition - sets the `community` field to Set pub struct SetCommunity(PhantomData St>); impl sealed::Sealed for SetCommunity {} impl State for SetCommunity { - type Membership = St::Membership; type Community = Set; type CreatedAt = St::CreatedAt; + type Membership = St::Membership; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Membership = St::Membership; type Community = St::Community; type CreatedAt = Set; + type Membership = St::Membership; + } + ///State transition - sets the `membership` field to Set + pub struct SetMembership(PhantomData St>); + impl sealed::Sealed for SetMembership {} + impl State for SetMembership { + type Community = St::Community; + type CreatedAt = St::CreatedAt; + type Membership = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `membership` field - pub struct membership(()); ///Marker type for the `community` field pub struct community(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `membership` field + pub struct membership(()); } } @@ -247,9 +247,9 @@ where impl ApprovalBuilder where St: approval_state::State, - St::Membership: approval_state::IsSet, St::Community: approval_state::IsSet, St::CreatedAt: approval_state::IsSet, + St::Membership: approval_state::IsSet, { /// Build the final struct. pub fn build(self) -> Approval { diff --git a/crates/jacquard-api/src/social_drydown/fragrance.rs b/crates/jacquard-api/src/social_drydown/fragrance.rs index 4ed8a523b..ac5ad67dc 100644 --- a/crates/jacquard-api/src/social_drydown/fragrance.rs +++ b/crates/jacquard-api/src/social_drydown/fragrance.rs @@ -162,49 +162,49 @@ pub mod fragrance_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; + type CreatedAt; type House; } /// 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 CreatedAt = Unset; type House = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; - type House = St::House; - } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; + type CreatedAt = St::CreatedAt; + type House = St::House; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type CreatedAt = Set; type House = St::House; } ///State transition - sets the `house` field to Set pub struct SetHouse(PhantomData St>); impl sealed::Sealed for SetHouse {} impl State for SetHouse { - type CreatedAt = St::CreatedAt; type Name = St::Name; + type CreatedAt = St::CreatedAt; type House = 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 `created_at` field + pub struct created_at(()); ///Marker type for the `house` field pub struct house(()); } @@ -327,8 +327,8 @@ impl FragranceBuilder { impl FragranceBuilder where St: fragrance_state::State, - St::CreatedAt: fragrance_state::IsSet, St::Name: fragrance_state::IsSet, + St::CreatedAt: fragrance_state::IsSet, St::House: fragrance_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_drydown/house.rs b/crates/jacquard-api/src/social_drydown/house.rs index 074181df1..dc0c63275 100644 --- a/crates/jacquard-api/src/social_drydown/house.rs +++ b/crates/jacquard-api/src/social_drydown/house.rs @@ -139,37 +139,37 @@ pub mod house_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -252,8 +252,8 @@ impl HouseBuilder { impl HouseBuilder where St: house_state::State, - St::Name: house_state::IsSet, St::CreatedAt: house_state::IsSet, + St::Name: house_state::IsSet, { /// Build the final struct. pub fn build(self) -> House { diff --git a/crates/jacquard-api/src/social_drydown/review.rs b/crates/jacquard-api/src/social_drydown/review.rs index a8740b1b5..27dcc2be5 100644 --- a/crates/jacquard-api/src/social_drydown/review.rs +++ b/crates/jacquard-api/src/social_drydown/review.rs @@ -370,37 +370,37 @@ pub mod review_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Fragrance; + 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 Fragrance = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Fragrance = St::Fragrance; + type CreatedAt = Unset; } ///State transition - sets the `fragrance` field to Set pub struct SetFragrance(PhantomData St>); impl sealed::Sealed for SetFragrance {} impl State for SetFragrance { - type CreatedAt = St::CreatedAt; type Fragrance = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Fragrance = St::Fragrance; + 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 `fragrance` field pub struct fragrance(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -746,8 +746,8 @@ impl ReviewBuilder { impl ReviewBuilder where St: review_state::State, - St::CreatedAt: review_state::IsSet, St::Fragrance: review_state::IsSet, + St::CreatedAt: review_state::IsSet, { /// Build the final struct. pub fn build(self) -> Review { diff --git a/crates/jacquard-api/src/social_grain/actor.rs b/crates/jacquard-api/src/social_grain/actor.rs index a8c4d1803..9b41dd7a1 100644 --- a/crates/jacquard-api/src/social_grain/actor.rs +++ b/crates/jacquard-api/src/social_grain/actor.rs @@ -117,37 +117,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 St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = St::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = St::Did; type Handle = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = St::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(()); } } @@ -290,8 +290,8 @@ impl ProfileViewBuilder { impl ProfileViewBuilder where St: profile_view_state::State, - St::Did: profile_view_state::IsSet, St::Handle: profile_view_state::IsSet, + St::Did: profile_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ProfileView { diff --git a/crates/jacquard-api/src/social_grain/favorite.rs b/crates/jacquard-api/src/social_grain/favorite.rs index 93082fa5f..c039b0309 100644 --- a/crates/jacquard-api/src/social_grain/favorite.rs +++ b/crates/jacquard-api/src/social_grain/favorite.rs @@ -111,37 +111,37 @@ pub mod favorite_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 St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::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(()); } } @@ -211,8 +211,8 @@ where impl FavoriteBuilder where St: favorite_state::State, - St::Subject: favorite_state::IsSet, St::CreatedAt: favorite_state::IsSet, + St::Subject: favorite_state::IsSet, { /// Build the final struct. pub fn build(self) -> Favorite { diff --git a/crates/jacquard-api/src/social_grain/gallery.rs b/crates/jacquard-api/src/social_grain/gallery.rs index 04ea4948c..438fd238c 100644 --- a/crates/jacquard-api/src/social_grain/gallery.rs +++ b/crates/jacquard-api/src/social_grain/gallery.rs @@ -176,37 +176,37 @@ pub mod gallery_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Title; + 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 Title = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Title = St::Title; + type CreatedAt = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type CreatedAt = St::CreatedAt; type Title = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Title = St::Title; + 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 `title` field pub struct title(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -302,8 +302,8 @@ where impl GalleryBuilder where St: gallery_state::State, - St::CreatedAt: gallery_state::IsSet, St::Title: gallery_state::IsSet, + St::CreatedAt: gallery_state::IsSet, { /// Build the final struct. pub fn build(self) -> Gallery { @@ -409,85 +409,85 @@ pub mod gallery_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; - type Cid; type Record; type IndexedAt; + type Cid; type Uri; + type Creator; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; - type Cid = Unset; type Record = Unset; type IndexedAt = Unset; + type Cid = Unset; type Uri = Unset; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData St>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Creator = Set; - type Cid = St::Cid; - type Record = St::Record; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Creator = St::Creator; - type Cid = Set; - type Record = St::Record; - type IndexedAt = St::IndexedAt; - type Uri = St::Uri; + type Creator = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData St>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Creator = St::Creator; - type Cid = St::Cid; type Record = Set; type IndexedAt = St::IndexedAt; + type Cid = St::Cid; type Uri = St::Uri; + type Creator = St::Creator; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Creator = St::Creator; - type Cid = St::Cid; type Record = St::Record; type IndexedAt = Set; + type Cid = St::Cid; type Uri = St::Uri; + type Creator = St::Creator; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Record = St::Record; + type IndexedAt = St::IndexedAt; + type Cid = Set; + type Uri = St::Uri; + type Creator = St::Creator; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Creator = St::Creator; - type Cid = St::Cid; type Record = St::Record; type IndexedAt = St::IndexedAt; + type Cid = St::Cid; type Uri = Set; + type Creator = St::Creator; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData St>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { + type Record = St::Record; + type IndexedAt = St::IndexedAt; + type Cid = St::Cid; + type Uri = St::Uri; + type Creator = 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 `cid` field - pub struct cid(()); ///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(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `creator` field + pub struct creator(()); } } @@ -648,11 +648,11 @@ where impl GalleryViewBuilder where St: gallery_view_state::State, - St::Creator: gallery_view_state::IsSet, - St::Cid: gallery_view_state::IsSet, St::Record: gallery_view_state::IsSet, St::IndexedAt: gallery_view_state::IsSet, + St::Cid: gallery_view_state::IsSet, St::Uri: gallery_view_state::IsSet, + St::Creator: gallery_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> GalleryView { diff --git a/crates/jacquard-api/src/social_grain/gallery/item.rs b/crates/jacquard-api/src/social_grain/gallery/item.rs index fc23aaba6..ef8189720 100644 --- a/crates/jacquard-api/src/social_grain/gallery/item.rs +++ b/crates/jacquard-api/src/social_grain/gallery/item.rs @@ -120,51 +120,51 @@ pub mod item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Gallery; type CreatedAt; type Item; - type Gallery; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Gallery = Unset; type CreatedAt = Unset; type Item = Unset; - type Gallery = Unset; + } + ///State transition - sets the `gallery` field to Set + pub struct SetGallery(PhantomData St>); + impl sealed::Sealed for SetGallery {} + impl State for SetGallery { + type Gallery = Set; + type CreatedAt = St::CreatedAt; + type Item = St::Item; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Gallery = St::Gallery; type CreatedAt = Set; type Item = St::Item; - type Gallery = St::Gallery; } ///State transition - sets the `item` field to Set pub struct SetItem(PhantomData St>); impl sealed::Sealed for SetItem {} impl State for SetItem { - type CreatedAt = St::CreatedAt; - type Item = Set; type Gallery = St::Gallery; - } - ///State transition - sets the `gallery` field to Set - pub struct SetGallery(PhantomData St>); - impl sealed::Sealed for SetGallery {} - impl State for SetGallery { type CreatedAt = St::CreatedAt; - type Item = St::Item; - type Gallery = Set; + type Item = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `gallery` field + pub struct gallery(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `item` field pub struct item(()); - ///Marker type for the `gallery` field - pub struct gallery(()); } } @@ -266,9 +266,9 @@ impl ItemBuilder { impl ItemBuilder where St: item_state::State, + St::Gallery: item_state::IsSet, St::CreatedAt: item_state::IsSet, St::Item: item_state::IsSet, - St::Gallery: item_state::IsSet, { /// Build the final struct. pub fn build(self) -> Item { diff --git a/crates/jacquard-api/src/social_grain/photo.rs b/crates/jacquard-api/src/social_grain/photo.rs index bfe4f44ec..ac3b3af5f 100644 --- a/crates/jacquard-api/src/social_grain/photo.rs +++ b/crates/jacquard-api/src/social_grain/photo.rs @@ -1001,84 +1001,84 @@ pub mod photo_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; + type Thumb; + type Alt; type Uri; type Fullsize; - type Alt; - type Thumb; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Cid = Unset; + type Thumb = Unset; + type Alt = Unset; type Uri = Unset; type Fullsize = Unset; - type Alt = Unset; - type Thumb = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; + type Thumb = St::Thumb; + type Alt = St::Alt; type Uri = St::Uri; type Fullsize = St::Fullsize; + } + ///State transition - sets the `thumb` field to Set + pub struct SetThumb(PhantomData St>); + impl sealed::Sealed for SetThumb {} + impl State for SetThumb { + type Cid = St::Cid; + type Thumb = Set; type Alt = St::Alt; + type Uri = St::Uri; + type Fullsize = St::Fullsize; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData St>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Cid = St::Cid; type Thumb = St::Thumb; + type Alt = Set; + type Uri = St::Uri; + type Fullsize = St::Fullsize; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = St::Cid; + type Thumb = St::Thumb; + type Alt = St::Alt; type Uri = Set; type Fullsize = St::Fullsize; - type Alt = St::Alt; - type Thumb = St::Thumb; } ///State transition - sets the `fullsize` field to Set pub struct SetFullsize(PhantomData St>); impl sealed::Sealed for SetFullsize {} impl State for SetFullsize { type Cid = St::Cid; - type Uri = St::Uri; - type Fullsize = Set; - type Alt = St::Alt; - type Thumb = St::Thumb; - } - ///State transition - sets the `alt` field to Set - pub struct SetAlt(PhantomData St>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Cid = St::Cid; - type Uri = St::Uri; - type Fullsize = St::Fullsize; - type Alt = Set; type Thumb = St::Thumb; - } - ///State transition - sets the `thumb` field to Set - pub struct SetThumb(PhantomData St>); - impl sealed::Sealed for SetThumb {} - impl State for SetThumb { - type Cid = St::Cid; - type Uri = St::Uri; - type Fullsize = St::Fullsize; type Alt = St::Alt; - type Thumb = Set; + type Uri = St::Uri; + type Fullsize = 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 `thumb` field + pub struct thumb(()); + ///Marker type for the `alt` field + pub struct alt(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `fullsize` field pub struct fullsize(()); - ///Marker type for the `alt` field - pub struct alt(()); - ///Marker type for the `thumb` field - pub struct thumb(()); } } @@ -1240,10 +1240,10 @@ impl PhotoViewBuilder where St: photo_view_state::State, St::Cid: photo_view_state::IsSet, + St::Thumb: photo_view_state::IsSet, + St::Alt: photo_view_state::IsSet, St::Uri: photo_view_state::IsSet, St::Fullsize: photo_view_state::IsSet, - St::Alt: photo_view_state::IsSet, - St::Thumb: photo_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PhotoView { diff --git a/crates/jacquard-api/src/social_grain/photo/exif.rs b/crates/jacquard-api/src/social_grain/photo/exif.rs index 277c27454..dc1b80e0b 100644 --- a/crates/jacquard-api/src/social_grain/photo/exif.rs +++ b/crates/jacquard-api/src/social_grain/photo/exif.rs @@ -132,37 +132,37 @@ pub mod exif_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Photo; type CreatedAt; + type Photo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Photo = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `photo` field to Set - pub struct SetPhoto(PhantomData St>); - impl sealed::Sealed for SetPhoto {} - impl State for SetPhoto { - type Photo = Set; - type CreatedAt = St::CreatedAt; + type Photo = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Photo = St::Photo; type CreatedAt = Set; + type Photo = St::Photo; + } + ///State transition - sets the `photo` field to Set + pub struct SetPhoto(PhantomData St>); + impl sealed::Sealed for SetPhoto {} + impl State for SetPhoto { + type CreatedAt = St::CreatedAt; + type Photo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `photo` field - pub struct photo(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `photo` field + pub struct photo(()); } } @@ -388,8 +388,8 @@ where impl ExifBuilder where St: exif_state::State, - St::Photo: exif_state::IsSet, St::CreatedAt: exif_state::IsSet, + St::Photo: exif_state::IsSet, { /// Build the final struct. pub fn build(self) -> Exif { diff --git a/crates/jacquard-api/src/social_lexical/works/collection.rs b/crates/jacquard-api/src/social_lexical/works/collection.rs index 53d827a4e..c4a55bfba 100644 --- a/crates/jacquard-api/src/social_lexical/works/collection.rs +++ b/crates/jacquard-api/src/social_lexical/works/collection.rs @@ -139,37 +139,37 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Name = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + 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 `created_at` field + pub struct created_at(()); } } @@ -252,8 +252,8 @@ where impl CollectionBuilder where St: collection_state::State, - St::CreatedAt: collection_state::IsSet, St::Name: collection_state::IsSet, + St::CreatedAt: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/social_lexical/works/collectionitem.rs b/crates/jacquard-api/src/social_lexical/works/collectionitem.rs index 3bc94bd98..4e69b73b0 100644 --- a/crates/jacquard-api/src/social_lexical/works/collectionitem.rs +++ b/crates/jacquard-api/src/social_lexical/works/collectionitem.rs @@ -116,51 +116,51 @@ pub mod collectionitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type List; type Work; type CreatedAt; + type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type List = Unset; type Work = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData St>); - impl sealed::Sealed for SetList {} - impl State for SetList { - type List = Set; - type Work = St::Work; - type CreatedAt = St::CreatedAt; + type List = Unset; } ///State transition - sets the `work` field to Set pub struct SetWork(PhantomData St>); impl sealed::Sealed for SetWork {} impl State for SetWork { - type List = St::List; type Work = Set; type CreatedAt = St::CreatedAt; + type List = St::List; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type List = St::List; type Work = St::Work; type CreatedAt = Set; + type List = St::List; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData St>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type Work = St::Work; + type CreatedAt = St::CreatedAt; + type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `list` field - pub struct list(()); ///Marker type for the `work` field pub struct work(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `list` field + pub struct list(()); } } @@ -249,9 +249,9 @@ where impl CollectionitemBuilder where St: collectionitem_state::State, - St::List: collectionitem_state::IsSet, St::Work: collectionitem_state::IsSet, St::CreatedAt: collectionitem_state::IsSet, + St::List: collectionitem_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collectionitem { diff --git a/crates/jacquard-api/src/social_lexical/works/identifiers.rs b/crates/jacquard-api/src/social_lexical/works/identifiers.rs index 6d6bb1cc0..1e7421db6 100644 --- a/crates/jacquard-api/src/social_lexical/works/identifiers.rs +++ b/crates/jacquard-api/src/social_lexical/works/identifiers.rs @@ -333,37 +333,37 @@ pub mod identifiers_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Work; type Identifiers; + type Work; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Work = Unset; type Identifiers = Unset; - } - ///State transition - sets the `work` field to Set - pub struct SetWork(PhantomData St>); - impl sealed::Sealed for SetWork {} - impl State for SetWork { - type Work = Set; - type Identifiers = St::Identifiers; + type Work = Unset; } ///State transition - sets the `identifiers` field to Set pub struct SetIdentifiers(PhantomData St>); impl sealed::Sealed for SetIdentifiers {} impl State for SetIdentifiers { - type Work = St::Work; type Identifiers = Set; + type Work = St::Work; + } + ///State transition - sets the `work` field to Set + pub struct SetWork(PhantomData St>); + impl sealed::Sealed for SetWork {} + impl State for SetWork { + type Identifiers = St::Identifiers; + type Work = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `work` field - pub struct work(()); ///Marker type for the `identifiers` field pub struct identifiers(()); + ///Marker type for the `work` field + pub struct work(()); } } @@ -433,8 +433,8 @@ where impl IdentifiersBuilder where St: identifiers_state::State, - St::Work: identifiers_state::IsSet, St::Identifiers: identifiers_state::IsSet, + St::Work: identifiers_state::IsSet, { /// Build the final struct. pub fn build(self) -> Identifiers { diff --git a/crates/jacquard-api/src/social_octosphere/publication.rs b/crates/jacquard-api/src/social_octosphere/publication.rs index 936c3fe78..4bc12adf4 100644 --- a/crates/jacquard-api/src/social_octosphere/publication.rs +++ b/crates/jacquard-api/src/social_octosphere/publication.rs @@ -356,267 +356,267 @@ pub mod publication_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type UpdatedAt; - type Citations; - type ContentText; - type Status; - type LinkedTo; - type LinkedFrom; - type VersionId; type PublicationType; - type ContentHtml; type Title; + type Citations; type OctopusId; + type LinkedTo; + type Status; + type UpdatedAt; + type ContentHtml; + type VersionId; + type LinkedFrom; + type ContentText; + 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 Citations = Unset; - type ContentText = Unset; - type Status = Unset; - type LinkedTo = Unset; - type LinkedFrom = Unset; - type VersionId = Unset; type PublicationType = Unset; - type ContentHtml = Unset; type Title = Unset; + type Citations = Unset; type OctopusId = Unset; + type LinkedTo = Unset; + type Status = Unset; + type UpdatedAt = Unset; + type ContentHtml = Unset; + type VersionId = Unset; + type LinkedFrom = Unset; + type ContentText = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type UpdatedAt = St::UpdatedAt; + ///State transition - sets the `publication_type` field to Set + pub struct SetPublicationType(PhantomData St>); + impl sealed::Sealed for SetPublicationType {} + impl State for SetPublicationType { + type PublicationType = Set; + type Title = St::Title; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; - type PublicationType = St::PublicationType; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; type ContentHtml = St::ContentHtml; - type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; type CreatedAt = St::CreatedAt; - type UpdatedAt = Set; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type PublicationType = St::PublicationType; + type Title = Set; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; - type PublicationType = St::PublicationType; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; type ContentHtml = St::ContentHtml; - type Title = St::Title; - type OctopusId = St::OctopusId; + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `citations` field to Set pub struct SetCitations(PhantomData St>); impl sealed::Sealed for SetCitations {} impl State for SetCitations { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; + type PublicationType = St::PublicationType; + type Title = St::Title; type Citations = Set; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; + type ContentHtml = St::ContentHtml; type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `octopus_id` field to Set + pub struct SetOctopusId(PhantomData St>); + impl sealed::Sealed for SetOctopusId {} + impl State for SetOctopusId { type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `content_text` field to Set - pub struct SetContentText(PhantomData St>); - impl sealed::Sealed for SetContentText {} - impl State for SetContentText { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; type Citations = St::Citations; - type ContentText = Set; - type Status = St::Status; + type OctopusId = Set; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; + type ContentHtml = St::ContentHtml; type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `linked_to` field to Set + pub struct SetLinkedTo(PhantomData St>); + impl sealed::Sealed for SetLinkedTo {} + impl State for SetLinkedTo { type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; + type Citations = St::Citations; type OctopusId = St::OctopusId; + type LinkedTo = Set; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; + type ContentHtml = St::ContentHtml; + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData St>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = Set; - type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; + type Citations = St::Citations; type OctopusId = St::OctopusId; - } - ///State transition - sets the `linked_to` field to Set - pub struct SetLinkedTo(PhantomData St>); - impl sealed::Sealed for SetLinkedTo {} - impl State for SetLinkedTo { - type CreatedAt = St::CreatedAt; + type LinkedTo = St::LinkedTo; + type Status = Set; type UpdatedAt = St::UpdatedAt; - type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; - type LinkedTo = Set; - type LinkedFrom = St::LinkedFrom; + type ContentHtml = St::ContentHtml; type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `linked_from` field to Set - pub struct SetLinkedFrom(PhantomData St>); - impl sealed::Sealed for SetLinkedFrom {} - impl State for SetLinkedFrom { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = Set; + type Status = St::Status; + type UpdatedAt = Set; + type ContentHtml = St::ContentHtml; type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `content_html` field to Set + pub struct SetContentHtml(PhantomData St>); + impl sealed::Sealed for SetContentHtml {} + impl State for SetContentHtml { type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; + type Citations = St::Citations; type OctopusId = St::OctopusId; + type LinkedTo = St::LinkedTo; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; + type ContentHtml = Set; + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `version_id` field to Set pub struct SetVersionId(PhantomData St>); impl sealed::Sealed for SetVersionId {} impl State for SetVersionId { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; - type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = Set; type PublicationType = St::PublicationType; - type ContentHtml = St::ContentHtml; type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `publication_type` field to Set - pub struct SetPublicationType(PhantomData St>); - impl sealed::Sealed for SetPublicationType {} - impl State for SetPublicationType { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; - type PublicationType = Set; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; type ContentHtml = St::ContentHtml; - type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `content_html` field to Set - pub struct SetContentHtml(PhantomData St>); - impl sealed::Sealed for SetContentHtml {} - impl State for SetContentHtml { + type VersionId = Set; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `linked_from` field to Set + pub struct SetLinkedFrom(PhantomData St>); + impl sealed::Sealed for SetLinkedFrom {} + impl State for SetLinkedFrom { + type PublicationType = St::PublicationType; + type Title = St::Title; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; + type ContentHtml = St::ContentHtml; type VersionId = St::VersionId; + type LinkedFrom = Set; + type ContentText = St::ContentText; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `content_text` field to Set + pub struct SetContentText(PhantomData St>); + impl sealed::Sealed for SetContentText {} + impl State for SetContentText { type PublicationType = St::PublicationType; - type ContentHtml = Set; type Title = St::Title; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; - type PublicationType = St::PublicationType; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; type ContentHtml = St::ContentHtml; - type Title = Set; - type OctopusId = St::OctopusId; - } - ///State transition - sets the `octopus_id` field to Set - pub struct SetOctopusId(PhantomData St>); - impl sealed::Sealed for SetOctopusId {} - impl State for SetOctopusId { + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = Set; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type PublicationType = St::PublicationType; + type Title = St::Title; type Citations = St::Citations; - type ContentText = St::ContentText; - type Status = St::Status; + type OctopusId = St::OctopusId; type LinkedTo = St::LinkedTo; - type LinkedFrom = St::LinkedFrom; - type VersionId = St::VersionId; - type PublicationType = St::PublicationType; + type Status = St::Status; + type UpdatedAt = St::UpdatedAt; type ContentHtml = St::ContentHtml; - type Title = St::Title; - type OctopusId = Set; + type VersionId = St::VersionId; + type LinkedFrom = St::LinkedFrom; + type ContentText = St::ContentText; + 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 `citations` field - pub struct citations(()); - ///Marker type for the `content_text` field - pub struct content_text(()); - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `linked_to` field - pub struct linked_to(()); - ///Marker type for the `linked_from` field - pub struct linked_from(()); - ///Marker type for the `version_id` field - pub struct version_id(()); ///Marker type for the `publication_type` field pub struct publication_type(()); - ///Marker type for the `content_html` field - pub struct content_html(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `citations` field + pub struct citations(()); ///Marker type for the `octopus_id` field pub struct octopus_id(()); + ///Marker type for the `linked_to` field + pub struct linked_to(()); + ///Marker type for the `status` field + pub struct status(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `content_html` field + pub struct content_html(()); + ///Marker type for the `version_id` field + pub struct version_id(()); + ///Marker type for the `linked_from` field + pub struct linked_from(()); + ///Marker type for the `content_text` field + pub struct content_text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -962,18 +962,18 @@ where impl PublicationBuilder where St: publication_state::State, - St::CreatedAt: publication_state::IsSet, - St::UpdatedAt: publication_state::IsSet, - St::Citations: publication_state::IsSet, - St::ContentText: publication_state::IsSet, - St::Status: publication_state::IsSet, - St::LinkedTo: publication_state::IsSet, - St::LinkedFrom: publication_state::IsSet, - St::VersionId: publication_state::IsSet, St::PublicationType: publication_state::IsSet, - St::ContentHtml: publication_state::IsSet, St::Title: publication_state::IsSet, + St::Citations: publication_state::IsSet, St::OctopusId: publication_state::IsSet, + St::LinkedTo: publication_state::IsSet, + St::Status: publication_state::IsSet, + St::UpdatedAt: publication_state::IsSet, + St::ContentHtml: publication_state::IsSet, + St::VersionId: publication_state::IsSet, + St::LinkedFrom: publication_state::IsSet, + St::ContentText: publication_state::IsSet, + St::CreatedAt: publication_state::IsSet, { /// Build the final struct. pub fn build(self) -> Publication { diff --git a/crates/jacquard-api/src/social_pace/daily/ring.rs b/crates/jacquard-api/src/social_pace/daily/ring.rs index c7abb8cc2..9fed02762 100644 --- a/crates/jacquard-api/src/social_pace/daily/ring.rs +++ b/crates/jacquard-api/src/social_pace/daily/ring.rs @@ -123,117 +123,113 @@ pub mod ring_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MoveGoal; - type Move; type ExerciseGoal; type StandHours; type StandGoal; type CreatedAt; type Exercise; + type MoveGoal; + type Move; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MoveGoal = Unset; - type Move = Unset; type ExerciseGoal = Unset; type StandHours = Unset; type StandGoal = Unset; type CreatedAt = Unset; type Exercise = Unset; - } - ///State transition - sets the `move_goal` field to Set - pub struct SetMoveGoal(PhantomData St>); - impl sealed::Sealed for SetMoveGoal {} - impl State for SetMoveGoal { - type MoveGoal = Set; - type Move = St::Move; - type ExerciseGoal = St::ExerciseGoal; - type StandHours = St::StandHours; - type StandGoal = St::StandGoal; - type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; - } - ///State transition - sets the `move` field to Set - pub struct SetMove(PhantomData St>); - impl sealed::Sealed for SetMove {} - impl State for SetMove { - type MoveGoal = St::MoveGoal; - type Move = Set; - type ExerciseGoal = St::ExerciseGoal; - type StandHours = St::StandHours; - type StandGoal = St::StandGoal; - type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; + type MoveGoal = Unset; + type Move = Unset; } ///State transition - sets the `exercise_goal` field to Set pub struct SetExerciseGoal(PhantomData St>); impl sealed::Sealed for SetExerciseGoal {} impl State for SetExerciseGoal { - type MoveGoal = St::MoveGoal; - type Move = St::Move; type ExerciseGoal = Set; type StandHours = St::StandHours; type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; + type MoveGoal = St::MoveGoal; + type Move = St::Move; } ///State transition - sets the `stand_hours` field to Set pub struct SetStandHours(PhantomData St>); impl sealed::Sealed for SetStandHours {} impl State for SetStandHours { - type MoveGoal = St::MoveGoal; - type Move = St::Move; type ExerciseGoal = St::ExerciseGoal; type StandHours = Set; type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; + type MoveGoal = St::MoveGoal; + type Move = St::Move; } ///State transition - sets the `stand_goal` field to Set pub struct SetStandGoal(PhantomData St>); impl sealed::Sealed for SetStandGoal {} impl State for SetStandGoal { - type MoveGoal = St::MoveGoal; - type Move = St::Move; type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = Set; type CreatedAt = St::CreatedAt; type Exercise = St::Exercise; + type MoveGoal = St::MoveGoal; + type Move = St::Move; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type MoveGoal = St::MoveGoal; - type Move = St::Move; type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = St::StandGoal; type CreatedAt = Set; type Exercise = St::Exercise; + type MoveGoal = St::MoveGoal; + type Move = St::Move; } ///State transition - sets the `exercise` field to Set pub struct SetExercise(PhantomData St>); impl sealed::Sealed for SetExercise {} impl State for SetExercise { + type ExerciseGoal = St::ExerciseGoal; + type StandHours = St::StandHours; + type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; + type Exercise = Set; type MoveGoal = St::MoveGoal; type Move = St::Move; + } + ///State transition - sets the `move_goal` field to Set + pub struct SetMoveGoal(PhantomData St>); + impl sealed::Sealed for SetMoveGoal {} + impl State for SetMoveGoal { type ExerciseGoal = St::ExerciseGoal; type StandHours = St::StandHours; type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; - type Exercise = Set; + type Exercise = St::Exercise; + type MoveGoal = Set; + type Move = St::Move; + } + ///State transition - sets the `move` field to Set + pub struct SetMove(PhantomData St>); + impl sealed::Sealed for SetMove {} + impl State for SetMove { + type ExerciseGoal = St::ExerciseGoal; + type StandHours = St::StandHours; + type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; + type Exercise = St::Exercise; + type MoveGoal = St::MoveGoal; + type Move = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `move_goal` field - pub struct move_goal(()); - ///Marker type for the `move` field - pub struct r#move(()); ///Marker type for the `exercise_goal` field pub struct exercise_goal(()); ///Marker type for the `stand_hours` field @@ -244,6 +240,10 @@ pub mod ring_state { pub struct created_at(()); ///Marker type for the `exercise` field pub struct exercise(()); + ///Marker type for the `move_goal` field + pub struct move_goal(()); + ///Marker type for the `move` field + pub struct r#move(()); } } @@ -416,13 +416,13 @@ where impl RingBuilder where St: ring_state::State, - St::MoveGoal: ring_state::IsSet, - St::Move: ring_state::IsSet, St::ExerciseGoal: ring_state::IsSet, St::StandHours: ring_state::IsSet, St::StandGoal: ring_state::IsSet, St::CreatedAt: ring_state::IsSet, St::Exercise: ring_state::IsSet, + St::MoveGoal: ring_state::IsSet, + St::Move: ring_state::IsSet, { /// Build the final struct. pub fn build(self) -> Ring { diff --git a/crates/jacquard-api/src/social_pace/daily/step.rs b/crates/jacquard-api/src/social_pace/daily/step.rs index 3641e2821..29071a7a2 100644 --- a/crates/jacquard-api/src/social_pace/daily/step.rs +++ b/crates/jacquard-api/src/social_pace/daily/step.rs @@ -116,51 +116,51 @@ pub mod step_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Steps; type UpdatedAt; + 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 Steps = Unset; type UpdatedAt = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Steps = St::Steps; - type UpdatedAt = St::UpdatedAt; + type CreatedAt = Unset; } ///State transition - sets the `steps` field to Set pub struct SetSteps(PhantomData St>); impl sealed::Sealed for SetSteps {} impl State for SetSteps { - type CreatedAt = St::CreatedAt; type Steps = Set; type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type CreatedAt = St::CreatedAt; type Steps = St::Steps; type UpdatedAt = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Steps = St::Steps; + type UpdatedAt = St::UpdatedAt; + 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 `steps` field pub struct steps(()); ///Marker type for the `updated_at` field pub struct updated_at(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -249,9 +249,9 @@ where impl StepBuilder where St: step_state::State, - St::CreatedAt: step_state::IsSet, St::Steps: step_state::IsSet, St::UpdatedAt: step_state::IsSet, + St::CreatedAt: step_state::IsSet, { /// Build the final struct. pub fn build(self) -> Step { diff --git a/crates/jacquard-api/src/social_pace/feed.rs b/crates/jacquard-api/src/social_pace/feed.rs index d97e74a52..edafd61ac 100644 --- a/crates/jacquard-api/src/social_pace/feed.rs +++ b/crates/jacquard-api/src/social_pace/feed.rs @@ -279,49 +279,49 @@ pub mod split_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Distance; type Order; + type Distance; type Duration; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Distance = Unset; type Order = Unset; + type Distance = Unset; type Duration = Unset; } - ///State transition - sets the `distance` field to Set - pub struct SetDistance(PhantomData St>); - impl sealed::Sealed for SetDistance {} - impl State for SetDistance { - type Distance = Set; - type Order = St::Order; - type Duration = St::Duration; - } ///State transition - sets the `order` field to Set pub struct SetOrder(PhantomData St>); impl sealed::Sealed for SetOrder {} impl State for SetOrder { - type Distance = St::Distance; type Order = Set; + type Distance = St::Distance; + type Duration = St::Duration; + } + ///State transition - sets the `distance` field to Set + pub struct SetDistance(PhantomData St>); + impl sealed::Sealed for SetDistance {} + impl State for SetDistance { + type Order = St::Order; + type Distance = Set; type Duration = St::Duration; } ///State transition - sets the `duration` field to Set pub struct SetDuration(PhantomData St>); impl sealed::Sealed for SetDuration {} impl State for SetDuration { - type Distance = St::Distance; type Order = St::Order; + type Distance = St::Distance; type Duration = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `distance` field - pub struct distance(()); ///Marker type for the `order` field pub struct order(()); + ///Marker type for the `distance` field + pub struct distance(()); ///Marker type for the `duration` field pub struct duration(()); } @@ -412,8 +412,8 @@ where impl SplitBuilder where St: split_state::State, - St::Distance: split_state::IsSet, St::Order: split_state::IsSet, + St::Distance: split_state::IsSet, St::Duration: split_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_pace/feed/activity.rs b/crates/jacquard-api/src/social_pace/feed/activity.rs index f18866764..08e225d44 100644 --- a/crates/jacquard-api/src/social_pace/feed/activity.rs +++ b/crates/jacquard-api/src/social_pace/feed/activity.rs @@ -181,8 +181,8 @@ pub mod activity_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type EndedAt; - type CreatedAt; type Type; + type CreatedAt; type StartedAt; } /// Empty state - all required fields are unset @@ -190,8 +190,8 @@ pub mod activity_state { impl sealed::Sealed for Empty {} impl State for Empty { type EndedAt = Unset; - type CreatedAt = Unset; type Type = Unset; + type CreatedAt = Unset; type StartedAt = Unset; } ///State transition - sets the `ended_at` field to Set @@ -199,17 +199,8 @@ pub mod activity_state { impl sealed::Sealed for SetEndedAt {} impl State for SetEndedAt { type EndedAt = Set; - type CreatedAt = St::CreatedAt; - type Type = St::Type; - type StartedAt = St::StartedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type EndedAt = St::EndedAt; - type CreatedAt = Set; type Type = St::Type; + type CreatedAt = St::CreatedAt; type StartedAt = St::StartedAt; } ///State transition - sets the `type` field to Set @@ -217,8 +208,17 @@ pub mod activity_state { impl sealed::Sealed for SetType {} impl State for SetType { type EndedAt = St::EndedAt; - type CreatedAt = St::CreatedAt; type Type = Set; + type CreatedAt = St::CreatedAt; + type StartedAt = St::StartedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type EndedAt = St::EndedAt; + type Type = St::Type; + type CreatedAt = Set; type StartedAt = St::StartedAt; } ///State transition - sets the `started_at` field to Set @@ -226,8 +226,8 @@ pub mod activity_state { impl sealed::Sealed for SetStartedAt {} impl State for SetStartedAt { type EndedAt = St::EndedAt; - type CreatedAt = St::CreatedAt; type Type = St::Type; + type CreatedAt = St::CreatedAt; type StartedAt = Set; } /// Marker types for field names @@ -235,10 +235,10 @@ pub mod activity_state { pub mod members { ///Marker type for the `ended_at` field pub struct ended_at(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `started_at` field pub struct started_at(()); } @@ -438,8 +438,8 @@ impl ActivityBuilder where St: activity_state::State, St::EndedAt: activity_state::IsSet, - St::CreatedAt: activity_state::IsSet, St::Type: activity_state::IsSet, + St::CreatedAt: activity_state::IsSet, St::StartedAt: activity_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_pace/goal/ring.rs b/crates/jacquard-api/src/social_pace/goal/ring.rs index 6f75e4186..2daf29a53 100644 --- a/crates/jacquard-api/src/social_pace/goal/ring.rs +++ b/crates/jacquard-api/src/social_pace/goal/ring.rs @@ -123,127 +123,127 @@ pub mod ring_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ExerciseGoal; type StandGoal; type CreatedAt; + type Move; + type ExerciseGoal; + type MoveGoal; type Exercise; type StandHours; - type MoveGoal; - type Move; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ExerciseGoal = Unset; type StandGoal = Unset; type CreatedAt = Unset; + type Move = Unset; + type ExerciseGoal = Unset; + type MoveGoal = Unset; type Exercise = Unset; type StandHours = Unset; - type MoveGoal = Unset; - type Move = Unset; - } - ///State transition - sets the `exercise_goal` field to Set - pub struct SetExerciseGoal(PhantomData St>); - impl sealed::Sealed for SetExerciseGoal {} - impl State for SetExerciseGoal { - type ExerciseGoal = Set; - type StandGoal = St::StandGoal; - type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; - type StandHours = St::StandHours; - type MoveGoal = St::MoveGoal; - type Move = St::Move; } ///State transition - sets the `stand_goal` field to Set pub struct SetStandGoal(PhantomData St>); impl sealed::Sealed for SetStandGoal {} impl State for SetStandGoal { - type ExerciseGoal = St::ExerciseGoal; type StandGoal = Set; type CreatedAt = St::CreatedAt; + type Move = St::Move; + type ExerciseGoal = St::ExerciseGoal; + type MoveGoal = St::MoveGoal; type Exercise = St::Exercise; type StandHours = St::StandHours; - type MoveGoal = St::MoveGoal; - type Move = St::Move; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type ExerciseGoal = St::ExerciseGoal; type StandGoal = St::StandGoal; type CreatedAt = Set; + type Move = St::Move; + type ExerciseGoal = St::ExerciseGoal; + type MoveGoal = St::MoveGoal; type Exercise = St::Exercise; type StandHours = St::StandHours; - type MoveGoal = St::MoveGoal; - type Move = St::Move; } - ///State transition - sets the `exercise` field to Set - pub struct SetExercise(PhantomData St>); - impl sealed::Sealed for SetExercise {} - impl State for SetExercise { - type ExerciseGoal = St::ExerciseGoal; + ///State transition - sets the `move` field to Set + pub struct SetMove(PhantomData St>); + impl sealed::Sealed for SetMove {} + impl State for SetMove { type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; - type Exercise = Set; - type StandHours = St::StandHours; + type Move = Set; + type ExerciseGoal = St::ExerciseGoal; type MoveGoal = St::MoveGoal; - type Move = St::Move; + type Exercise = St::Exercise; + type StandHours = St::StandHours; } - ///State transition - sets the `stand_hours` field to Set - pub struct SetStandHours(PhantomData St>); - impl sealed::Sealed for SetStandHours {} - impl State for SetStandHours { - type ExerciseGoal = St::ExerciseGoal; + ///State transition - sets the `exercise_goal` field to Set + pub struct SetExerciseGoal(PhantomData St>); + impl sealed::Sealed for SetExerciseGoal {} + impl State for SetExerciseGoal { type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; - type StandHours = Set; - type MoveGoal = St::MoveGoal; type Move = St::Move; + type ExerciseGoal = Set; + type MoveGoal = St::MoveGoal; + type Exercise = St::Exercise; + type StandHours = St::StandHours; } ///State transition - sets the `move_goal` field to Set pub struct SetMoveGoal(PhantomData St>); impl sealed::Sealed for SetMoveGoal {} impl State for SetMoveGoal { - type ExerciseGoal = St::ExerciseGoal; type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; + type Move = St::Move; + type ExerciseGoal = St::ExerciseGoal; + type MoveGoal = Set; type Exercise = St::Exercise; type StandHours = St::StandHours; - type MoveGoal = Set; - type Move = St::Move; } - ///State transition - sets the `move` field to Set - pub struct SetMove(PhantomData St>); - impl sealed::Sealed for SetMove {} - impl State for SetMove { - type ExerciseGoal = St::ExerciseGoal; + ///State transition - sets the `exercise` field to Set + pub struct SetExercise(PhantomData St>); + impl sealed::Sealed for SetExercise {} + impl State for SetExercise { type StandGoal = St::StandGoal; type CreatedAt = St::CreatedAt; - type Exercise = St::Exercise; + type Move = St::Move; + type ExerciseGoal = St::ExerciseGoal; + type MoveGoal = St::MoveGoal; + type Exercise = Set; type StandHours = St::StandHours; + } + ///State transition - sets the `stand_hours` field to Set + pub struct SetStandHours(PhantomData St>); + impl sealed::Sealed for SetStandHours {} + impl State for SetStandHours { + type StandGoal = St::StandGoal; + type CreatedAt = St::CreatedAt; + type Move = St::Move; + type ExerciseGoal = St::ExerciseGoal; type MoveGoal = St::MoveGoal; - type Move = Set; + type Exercise = St::Exercise; + type StandHours = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `exercise_goal` field - pub struct exercise_goal(()); ///Marker type for the `stand_goal` field pub struct stand_goal(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `move` field + pub struct r#move(()); + ///Marker type for the `exercise_goal` field + pub struct exercise_goal(()); + ///Marker type for the `move_goal` field + pub struct move_goal(()); ///Marker type for the `exercise` field pub struct exercise(()); ///Marker type for the `stand_hours` field pub struct stand_hours(()); - ///Marker type for the `move_goal` field - pub struct move_goal(()); - ///Marker type for the `move` field - pub struct r#move(()); } } @@ -416,13 +416,13 @@ where impl RingBuilder where St: ring_state::State, - St::ExerciseGoal: ring_state::IsSet, St::StandGoal: ring_state::IsSet, St::CreatedAt: ring_state::IsSet, + St::Move: ring_state::IsSet, + St::ExerciseGoal: ring_state::IsSet, + St::MoveGoal: ring_state::IsSet, St::Exercise: ring_state::IsSet, St::StandHours: ring_state::IsSet, - St::MoveGoal: ring_state::IsSet, - St::Move: ring_state::IsSet, { /// Build the final struct. pub fn build(self) -> Ring { diff --git a/crates/jacquard-api/src/social_pace/goal/step.rs b/crates/jacquard-api/src/social_pace/goal/step.rs index 13dc3af71..f37680630 100644 --- a/crates/jacquard-api/src/social_pace/goal/step.rs +++ b/crates/jacquard-api/src/social_pace/goal/step.rs @@ -116,49 +116,49 @@ pub mod step_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Steps; + type CreatedAt; type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Steps = Unset; + type CreatedAt = Unset; type UpdatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Steps = St::Steps; - type UpdatedAt = St::UpdatedAt; - } ///State transition - sets the `steps` field to Set pub struct SetSteps(PhantomData St>); impl sealed::Sealed for SetSteps {} impl State for SetSteps { - type CreatedAt = St::CreatedAt; type Steps = Set; + type CreatedAt = St::CreatedAt; + type UpdatedAt = St::UpdatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Steps = St::Steps; + type CreatedAt = Set; type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type CreatedAt = St::CreatedAt; type Steps = St::Steps; + type CreatedAt = St::CreatedAt; type UpdatedAt = 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 `steps` field pub struct steps(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `updated_at` field pub struct updated_at(()); } @@ -249,8 +249,8 @@ where impl StepBuilder where St: step_state::State, - St::CreatedAt: step_state::IsSet, St::Steps: step_state::IsSet, + St::CreatedAt: step_state::IsSet, St::UpdatedAt: step_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_pmsky/proposal.rs b/crates/jacquard-api/src/social_pmsky/proposal.rs index b0f46fcd4..b787017a2 100644 --- a/crates/jacquard-api/src/social_pmsky/proposal.rs +++ b/crates/jacquard-api/src/social_pmsky/proposal.rs @@ -151,84 +151,84 @@ pub mod proposal_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Val; + type Uri; + type Typ; type Cts; type Src; - type Typ; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Val = Unset; + type Uri = Unset; + type Typ = Unset; type Cts = Unset; type Src = Unset; - type Typ = Unset; - type Uri = Unset; } ///State transition - sets the `val` field to Set pub struct SetVal(PhantomData St>); impl sealed::Sealed for SetVal {} impl State for SetVal { type Val = Set; + type Uri = St::Uri; + type Typ = St::Typ; type Cts = St::Cts; type Src = St::Src; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Val = St::Val; + type Uri = Set; type Typ = St::Typ; + type Cts = St::Cts; + type Src = St::Src; + } + ///State transition - sets the `typ` field to Set + pub struct SetTyp(PhantomData St>); + impl sealed::Sealed for SetTyp {} + impl State for SetTyp { + type Val = St::Val; type Uri = St::Uri; + type Typ = Set; + type Cts = St::Cts; + type Src = St::Src; } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData St>); impl sealed::Sealed for SetCts {} impl State for SetCts { type Val = St::Val; + type Uri = St::Uri; + type Typ = St::Typ; type Cts = Set; type Src = St::Src; - type Typ = St::Typ; - type Uri = St::Uri; } ///State transition - sets the `src` field to Set pub struct SetSrc(PhantomData St>); impl sealed::Sealed for SetSrc {} impl State for SetSrc { type Val = St::Val; - type Cts = St::Cts; - type Src = Set; - type Typ = St::Typ; - type Uri = St::Uri; - } - ///State transition - sets the `typ` field to Set - pub struct SetTyp(PhantomData St>); - impl sealed::Sealed for SetTyp {} - impl State for SetTyp { - type Val = St::Val; - type Cts = St::Cts; - type Src = St::Src; - type Typ = Set; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Val = St::Val; - type Cts = St::Cts; - type Src = St::Src; type Typ = St::Typ; - type Uri = Set; + type Cts = St::Cts; + type Src = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `val` field pub struct val(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `typ` field + pub struct typ(()); ///Marker type for the `cts` field pub struct cts(()); ///Marker type for the `src` field pub struct src(()); - ///Marker type for the `typ` field - pub struct typ(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -446,10 +446,10 @@ impl ProposalBuilder where St: proposal_state::State, St::Val: proposal_state::IsSet, + St::Uri: proposal_state::IsSet, + St::Typ: proposal_state::IsSet, St::Cts: proposal_state::IsSet, St::Src: proposal_state::IsSet, - St::Typ: proposal_state::IsSet, - St::Uri: proposal_state::IsSet, { /// Build the final struct. pub fn build(self) -> Proposal { diff --git a/crates/jacquard-api/src/social_pmsky/vote.rs b/crates/jacquard-api/src/social_pmsky/vote.rs index fc6526dba..7586db21e 100644 --- a/crates/jacquard-api/src/social_pmsky/vote.rs +++ b/crates/jacquard-api/src/social_pmsky/vote.rs @@ -131,65 +131,65 @@ pub mod vote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cts; type Src; + type Uri; type Val; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cts = Unset; type Src = Unset; + type Uri = Unset; type Val = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cts = St::Cts; - type Src = St::Src; - type Val = St::Val; - } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData St>); impl sealed::Sealed for SetCts {} impl State for SetCts { - type Uri = St::Uri; type Cts = Set; type Src = St::Src; + type Uri = St::Uri; type Val = St::Val; } ///State transition - sets the `src` field to Set pub struct SetSrc(PhantomData St>); impl sealed::Sealed for SetSrc {} impl State for SetSrc { - type Uri = St::Uri; type Cts = St::Cts; type Src = Set; + type Uri = St::Uri; + type Val = St::Val; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cts = St::Cts; + type Src = St::Src; + type Uri = Set; type Val = St::Val; } ///State transition - sets the `val` field to Set pub struct SetVal(PhantomData St>); impl sealed::Sealed for SetVal {} impl State for SetVal { - type Uri = St::Uri; type Cts = St::Cts; type Src = St::Src; + type Uri = St::Uri; type Val = 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 `cts` field pub struct cts(()); ///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(()); } @@ -360,9 +360,9 @@ where impl VoteBuilder where St: vote_state::State, - St::Uri: vote_state::IsSet, St::Cts: vote_state::IsSet, St::Src: vote_state::IsSet, + St::Uri: vote_state::IsSet, St::Val: vote_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_psky/chat/message.rs b/crates/jacquard-api/src/social_psky/chat/message.rs index 0f12914ed..7e5fc0eba 100644 --- a/crates/jacquard-api/src/social_psky/chat/message.rs +++ b/crates/jacquard-api/src/social_psky/chat/message.rs @@ -144,37 +144,37 @@ pub mod message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; type Room; + 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 Room = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData St>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Room = St::Room; + type Content = Unset; } ///State transition - sets the `room` field to Set pub struct SetRoom(PhantomData St>); impl sealed::Sealed for SetRoom {} impl State for SetRoom { - type Content = St::Content; type Room = Set; + type Content = St::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData St>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Room = St::Room; + 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 `room` field pub struct room(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -270,8 +270,8 @@ where impl MessageBuilder where St: message_state::State, - St::Content: message_state::IsSet, St::Room: message_state::IsSet, + St::Content: message_state::IsSet, { /// Build the final struct. pub fn build(self) -> Message { diff --git a/crates/jacquard-api/src/social_psky/chat/room.rs b/crates/jacquard-api/src/social_psky/chat/room.rs index dcf80e843..c5a031ac7 100644 --- a/crates/jacquard-api/src/social_psky/chat/room.rs +++ b/crates/jacquard-api/src/social_psky/chat/room.rs @@ -520,37 +520,37 @@ pub mod modlist_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Active; type Users; + type Active; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Active = Unset; type Users = Unset; - } - ///State transition - sets the `active` field to Set - pub struct SetActive(PhantomData St>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { - type Active = Set; - type Users = St::Users; + type Active = Unset; } ///State transition - sets the `users` field to Set pub struct SetUsers(PhantomData St>); impl sealed::Sealed for SetUsers {} impl State for SetUsers { - type Active = St::Active; type Users = Set; + type Active = St::Active; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData St>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Users = St::Users; + type Active = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `active` field - pub struct active(()); ///Marker type for the `users` field pub struct users(()); + ///Marker type for the `active` field + pub struct active(()); } } @@ -620,8 +620,8 @@ where impl ModlistRefBuilder where St: modlist_ref_state::State, - St::Active: modlist_ref_state::IsSet, St::Users: modlist_ref_state::IsSet, + St::Active: modlist_ref_state::IsSet, { /// Build the final struct. pub fn build(self) -> ModlistRef { diff --git a/crates/jacquard-api/src/social_psky/richtext/facet.rs b/crates/jacquard-api/src/social_psky/richtext/facet.rs index ae08e664d..b51c21356 100644 --- a/crates/jacquard-api/src/social_psky/richtext/facet.rs +++ b/crates/jacquard-api/src/social_psky/richtext/facet.rs @@ -219,37 +219,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 St>); - impl sealed::Sealed for SetByteStart {} - impl State for SetByteStart { - type ByteStart = Set; - type ByteEnd = St::ByteEnd; + type ByteStart = Unset; } ///State transition - sets the `byte_end` field to Set pub struct SetByteEnd(PhantomData St>); impl sealed::Sealed for SetByteEnd {} impl State for SetByteEnd { - type ByteStart = St::ByteStart; type ByteEnd = Set; + type ByteStart = St::ByteStart; + } + ///State transition - sets the `byte_start` field to Set + pub struct SetByteStart(PhantomData St>); + impl sealed::Sealed for SetByteStart {} + impl State for SetByteStart { + type ByteEnd = St::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(()); } } @@ -319,8 +319,8 @@ where impl ByteSliceBuilder where St: byte_slice_state::State, - St::ByteStart: byte_slice_state::IsSet, St::ByteEnd: byte_slice_state::IsSet, + St::ByteStart: byte_slice_state::IsSet, { /// Build the final struct. pub fn build(self) -> ByteSlice { diff --git a/crates/jacquard-api/src/social_showcase.rs b/crates/jacquard-api/src/social_showcase.rs index 1a55fd02d..5f7bdae76 100644 --- a/crates/jacquard-api/src/social_showcase.rs +++ b/crates/jacquard-api/src/social_showcase.rs @@ -2193,51 +2193,51 @@ pub mod collection_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AddedAt; type Order; type Uri; + type AddedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AddedAt = Unset; type Order = Unset; type Uri = Unset; - } - ///State transition - sets the `added_at` field to Set - pub struct SetAddedAt(PhantomData St>); - impl sealed::Sealed for SetAddedAt {} - impl State for SetAddedAt { - type AddedAt = Set; - type Order = St::Order; - type Uri = St::Uri; + type AddedAt = Unset; } ///State transition - sets the `order` field to Set pub struct SetOrder(PhantomData St>); impl sealed::Sealed for SetOrder {} impl State for SetOrder { - type AddedAt = St::AddedAt; type Order = Set; type Uri = St::Uri; + type AddedAt = St::AddedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type AddedAt = St::AddedAt; type Order = St::Order; type Uri = Set; + type AddedAt = St::AddedAt; + } + ///State transition - sets the `added_at` field to Set + pub struct SetAddedAt(PhantomData St>); + impl sealed::Sealed for SetAddedAt {} + impl State for SetAddedAt { + type Order = St::Order; + type Uri = St::Uri; + type AddedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `added_at` field - pub struct added_at(()); ///Marker type for the `order` field pub struct order(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `added_at` field + pub struct added_at(()); } } @@ -2326,9 +2326,9 @@ where impl CollectionItemBuilder where St: collection_item_state::State, - St::AddedAt: collection_item_state::IsSet, St::Order: collection_item_state::IsSet, St::Uri: collection_item_state::IsSet, + St::AddedAt: collection_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionItem { @@ -2363,151 +2363,151 @@ pub mod collection_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Name; - type Visibility; - type Author; - type Uri; type Cid; type Tags; type Type; + type CreatedAt; + type Uri; + type Visibility; + type Author; } /// 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 Visibility = Unset; - type Author = Unset; - type Uri = Unset; type Cid = Unset; type Tags = Unset; type Type = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Name = St::Name; - type Visibility = St::Visibility; - type Author = St::Author; - type Uri = St::Uri; - type Cid = St::Cid; - type Tags = St::Tags; - type Type = St::Type; + type CreatedAt = Unset; + type Uri = Unset; + type Visibility = Unset; + type Author = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; type Name = Set; - type Visibility = St::Visibility; - type Author = St::Author; - type Uri = St::Uri; - type Cid = St::Cid; - type Tags = St::Tags; - type Type = St::Type; - } - ///State transition - sets the `visibility` field to Set - pub struct SetVisibility(PhantomData St>); - impl sealed::Sealed for SetVisibility {} - impl State for SetVisibility { - type CreatedAt = St::CreatedAt; - type Name = St::Name; - type Visibility = Set; - type Author = St::Author; - type Uri = St::Uri; type Cid = St::Cid; type Tags = St::Tags; type Type = St::Type; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type CreatedAt = St::CreatedAt; - type Name = St::Name; - type Visibility = St::Visibility; - type Author = Set; type Uri = St::Uri; - type Cid = St::Cid; - type Tags = St::Tags; - type Type = St::Type; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type CreatedAt = St::CreatedAt; - type Name = St::Name; type Visibility = St::Visibility; type Author = St::Author; - type Uri = Set; - type Cid = St::Cid; - type Tags = St::Tags; - type Type = St::Type; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type CreatedAt = St::CreatedAt; type Name = St::Name; - type Visibility = St::Visibility; - type Author = St::Author; - type Uri = St::Uri; type Cid = Set; type Tags = St::Tags; type Type = St::Type; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type Visibility = St::Visibility; + type Author = St::Author; } ///State transition - sets the `tags` field to Set pub struct SetTags(PhantomData St>); impl sealed::Sealed for SetTags {} impl State for SetTags { - type CreatedAt = St::CreatedAt; type Name = St::Name; - type Visibility = St::Visibility; - type Author = St::Author; - type Uri = St::Uri; type Cid = St::Cid; type Tags = Set; type Type = St::Type; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type Visibility = St::Visibility; + type Author = St::Author; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { + type Name = St::Name; + type Cid = St::Cid; + type Tags = St::Tags; + type Type = Set; type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type Visibility = St::Visibility; + type Author = St::Author; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type Cid = St::Cid; + type Tags = St::Tags; + type Type = St::Type; + type CreatedAt = Set; + type Uri = St::Uri; + type Visibility = St::Visibility; + type Author = St::Author; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Name = St::Name; + type Cid = St::Cid; + type Tags = St::Tags; + type Type = St::Type; + type CreatedAt = St::CreatedAt; + type Uri = Set; type Visibility = St::Visibility; type Author = St::Author; + } + ///State transition - sets the `visibility` field to Set + pub struct SetVisibility(PhantomData St>); + impl sealed::Sealed for SetVisibility {} + impl State for SetVisibility { + type Name = St::Name; + type Cid = St::Cid; + type Tags = St::Tags; + type Type = St::Type; + type CreatedAt = St::CreatedAt; type Uri = St::Uri; + type Visibility = Set; + type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Name = St::Name; type Cid = St::Cid; type Tags = St::Tags; - type Type = Set; + type Type = St::Type; + type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type Visibility = St::Visibility; + type Author = 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 `visibility` field - pub struct visibility(()); - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `tags` field pub struct tags(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `visibility` field + pub struct visibility(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -2790,14 +2790,14 @@ where impl CollectionViewBuilder where St: collection_view_state::State, - St::CreatedAt: collection_view_state::IsSet, St::Name: collection_view_state::IsSet, - St::Visibility: collection_view_state::IsSet, - St::Author: collection_view_state::IsSet, - St::Uri: collection_view_state::IsSet, St::Cid: collection_view_state::IsSet, St::Tags: collection_view_state::IsSet, St::Type: collection_view_state::IsSet, + St::CreatedAt: collection_view_state::IsSet, + St::Uri: collection_view_state::IsSet, + St::Visibility: collection_view_state::IsSet, + St::Author: collection_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionView { @@ -2988,151 +2988,151 @@ pub mod item_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; - type Title; type Tags; - type Visibility; - type CreatedAt; type Cid; - type Images; + type Title; type Uri; + type Author; + type CreatedAt; + type Visibility; + type Images; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; - type Title = Unset; type Tags = Unset; - type Visibility = Unset; - type CreatedAt = Unset; type Cid = Unset; - type Images = Unset; + type Title = Unset; type Uri = Unset; + type Author = Unset; + type CreatedAt = Unset; + type Visibility = Unset; + type Images = Unset; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; + ///State transition - sets the `tags` field to Set + pub struct SetTags(PhantomData St>); + impl sealed::Sealed for SetTags {} + impl State for SetTags { + type Tags = Set; + type Cid = St::Cid; type Title = St::Title; - type Tags = St::Tags; - type Visibility = St::Visibility; + type Uri = St::Uri; + type Author = St::Author; type CreatedAt = St::CreatedAt; - type Cid = St::Cid; + type Visibility = St::Visibility; type Images = St::Images; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Tags = St::Tags; + type Cid = Set; + type Title = St::Title; type Uri = St::Uri; + type Author = St::Author; + type CreatedAt = St::CreatedAt; + type Visibility = St::Visibility; + type Images = St::Images; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Author = St::Author; - type Title = Set; type Tags = St::Tags; - type Visibility = St::Visibility; - type CreatedAt = St::CreatedAt; type Cid = St::Cid; - type Images = St::Images; + type Title = Set; type Uri = St::Uri; - } - ///State transition - sets the `tags` field to Set - pub struct SetTags(PhantomData St>); - impl sealed::Sealed for SetTags {} - impl State for SetTags { type Author = St::Author; - type Title = St::Title; - type Tags = Set; - type Visibility = St::Visibility; type CreatedAt = St::CreatedAt; - type Cid = St::Cid; + type Visibility = St::Visibility; type Images = St::Images; - type Uri = St::Uri; } - ///State transition - sets the `visibility` field to Set - pub struct SetVisibility(PhantomData St>); - impl sealed::Sealed for SetVisibility {} - impl State for SetVisibility { - type Author = St::Author; - type Title = St::Title; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Tags = St::Tags; - type Visibility = Set; - type CreatedAt = St::CreatedAt; type Cid = St::Cid; + type Title = St::Title; + type Uri = Set; + type Author = St::Author; + type CreatedAt = St::CreatedAt; + type Visibility = St::Visibility; type Images = St::Images; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Tags = St::Tags; + type Cid = St::Cid; + type Title = St::Title; type Uri = St::Uri; + type Author = Set; + type CreatedAt = St::CreatedAt; + type Visibility = St::Visibility; + type Images = St::Images; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Author = St::Author; - type Title = St::Title; type Tags = St::Tags; - type Visibility = St::Visibility; - type CreatedAt = Set; type Cid = St::Cid; - type Images = St::Images; + type Title = St::Title; type Uri = St::Uri; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Author = St::Author; - type Title = St::Title; - type Tags = St::Tags; + type CreatedAt = Set; type Visibility = St::Visibility; - type CreatedAt = St::CreatedAt; - type Cid = Set; type Images = St::Images; + } + ///State transition - sets the `visibility` field to Set + pub struct SetVisibility(PhantomData St>); + impl sealed::Sealed for SetVisibility {} + impl State for SetVisibility { + type Tags = St::Tags; + type Cid = St::Cid; + type Title = St::Title; type Uri = St::Uri; + type Author = St::Author; + type CreatedAt = St::CreatedAt; + type Visibility = Set; + type Images = St::Images; } ///State transition - sets the `images` field to Set pub struct SetImages(PhantomData St>); impl sealed::Sealed for SetImages {} impl State for SetImages { - type Author = St::Author; - type Title = St::Title; type Tags = St::Tags; - type Visibility = St::Visibility; - type CreatedAt = St::CreatedAt; type Cid = St::Cid; - type Images = Set; + type Title = St::Title; type Uri = St::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Author = St::Author; - type Title = St::Title; - type Tags = St::Tags; - type Visibility = St::Visibility; type CreatedAt = St::CreatedAt; - type Cid = St::Cid; - type Images = St::Images; - type Uri = Set; + type Visibility = St::Visibility; + type Images = 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 `title` field - pub struct title(()); ///Marker type for the `tags` field pub struct tags(()); - ///Marker type for the `visibility` field - pub struct visibility(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `images` field - pub struct images(()); + ///Marker type for the `title` field + pub struct title(()); ///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 + pub struct created_at(()); + ///Marker type for the `visibility` field + pub struct visibility(()); + ///Marker type for the `images` field + pub struct images(()); } } @@ -3424,14 +3424,14 @@ where impl ItemViewBuilder where St: item_view_state::State, - St::Author: item_view_state::IsSet, - St::Title: item_view_state::IsSet, St::Tags: item_view_state::IsSet, - St::Visibility: item_view_state::IsSet, - St::CreatedAt: item_view_state::IsSet, St::Cid: item_view_state::IsSet, - St::Images: item_view_state::IsSet, + St::Title: item_view_state::IsSet, St::Uri: item_view_state::IsSet, + St::Author: item_view_state::IsSet, + St::CreatedAt: item_view_state::IsSet, + St::Visibility: item_view_state::IsSet, + St::Images: item_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ItemView { @@ -3658,49 +3658,49 @@ pub mod privacy_settings_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Indexable; type AllowReactions; + type Indexable; type AllowComments; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Indexable = Unset; type AllowReactions = Unset; + type Indexable = Unset; type AllowComments = Unset; } - ///State transition - sets the `indexable` field to Set - pub struct SetIndexable(PhantomData St>); - impl sealed::Sealed for SetIndexable {} - impl State for SetIndexable { - type Indexable = Set; - type AllowReactions = St::AllowReactions; - type AllowComments = St::AllowComments; - } ///State transition - sets the `allow_reactions` field to Set pub struct SetAllowReactions(PhantomData St>); impl sealed::Sealed for SetAllowReactions {} impl State for SetAllowReactions { - type Indexable = St::Indexable; type AllowReactions = Set; + type Indexable = St::Indexable; + type AllowComments = St::AllowComments; + } + ///State transition - sets the `indexable` field to Set + pub struct SetIndexable(PhantomData St>); + impl sealed::Sealed for SetIndexable {} + impl State for SetIndexable { + type AllowReactions = St::AllowReactions; + type Indexable = Set; type AllowComments = St::AllowComments; } ///State transition - sets the `allow_comments` field to Set pub struct SetAllowComments(PhantomData St>); impl sealed::Sealed for SetAllowComments {} impl State for SetAllowComments { - type Indexable = St::Indexable; type AllowReactions = St::AllowReactions; + type Indexable = St::Indexable; type AllowComments = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexable` field - pub struct indexable(()); ///Marker type for the `allow_reactions` field pub struct allow_reactions(()); + ///Marker type for the `indexable` field + pub struct indexable(()); ///Marker type for the `allow_comments` field pub struct allow_comments(()); } @@ -3791,8 +3791,8 @@ where impl PrivacySettingsBuilder where St: privacy_settings_state::State, - St::Indexable: privacy_settings_state::IsSet, St::AllowReactions: privacy_settings_state::IsSet, + St::Indexable: privacy_settings_state::IsSet, St::AllowComments: privacy_settings_state::IsSet, { /// Build the final struct. @@ -3962,85 +3962,85 @@ pub mod reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Type; - type Actor; - type Subject; type CreatedAt; + type Subject; + type Uri; + type Actor; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Type = Unset; - type Actor = Unset; - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Type = St::Type; - type Actor = St::Actor; - type Subject = St::Subject; - type CreatedAt = St::CreatedAt; + type Subject = Unset; + type Uri = Unset; + type Actor = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Uri = St::Uri; type Type = Set; - type Actor = St::Actor; - type Subject = St::Subject; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData St>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { + type Subject = St::Subject; type Uri = St::Uri; + type Actor = St::Actor; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Type = St::Type; - type Actor = Set; + type CreatedAt = Set; type Subject = St::Subject; - type CreatedAt = St::CreatedAt; + type Uri = St::Uri; + type Actor = St::Actor; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Uri = St::Uri; type Type = St::Type; - type Actor = St::Actor; - type Subject = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Subject = Set; type Uri = St::Uri; + type Actor = St::Actor; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Type = St::Type; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; + type Uri = Set; type Actor = St::Actor; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData St>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type Type = St::Type; + type CreatedAt = St::CreatedAt; type Subject = St::Subject; - type CreatedAt = Set; + type Uri = St::Uri; + type Actor = 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 `type` field pub struct r#type(()); - ///Marker type for the `actor` field - pub struct actor(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -4173,11 +4173,11 @@ where impl ReactionViewBuilder where St: reaction_view_state::State, - St::Uri: reaction_view_state::IsSet, St::Type: reaction_view_state::IsSet, - St::Actor: reaction_view_state::IsSet, - St::Subject: reaction_view_state::IsSet, St::CreatedAt: reaction_view_state::IsSet, + St::Subject: reaction_view_state::IsSet, + St::Uri: reaction_view_state::IsSet, + St::Actor: reaction_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReactionView { @@ -4216,51 +4216,51 @@ pub mod showcase_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type AddedAt; type Order; + 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 AddedAt = Unset; type Order = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type AddedAt = St::AddedAt; - type Order = St::Order; + type Uri = Unset; } ///State transition - sets the `added_at` field to Set pub struct SetAddedAt(PhantomData St>); impl sealed::Sealed for SetAddedAt {} impl State for SetAddedAt { - type Uri = St::Uri; type AddedAt = Set; type Order = St::Order; + type Uri = St::Uri; } ///State transition - sets the `order` field to Set pub struct SetOrder(PhantomData St>); impl sealed::Sealed for SetOrder {} impl State for SetOrder { - type Uri = St::Uri; type AddedAt = St::AddedAt; type Order = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type AddedAt = St::AddedAt; + type Order = St::Order; + 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 `added_at` field pub struct added_at(()); ///Marker type for the `order` field pub struct order(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -4349,9 +4349,9 @@ where impl ShowcaseItemBuilder where St: showcase_item_state::State, - St::Uri: showcase_item_state::IsSet, St::AddedAt: showcase_item_state::IsSet, St::Order: showcase_item_state::IsSet, + St::Uri: showcase_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> ShowcaseItem { diff --git a/crates/jacquard-api/src/social_showcase/feed/reaction.rs b/crates/jacquard-api/src/social_showcase/feed/reaction.rs index d8dfe02a0..388d44ebe 100644 --- a/crates/jacquard-api/src/social_showcase/feed/reaction.rs +++ b/crates/jacquard-api/src/social_showcase/feed/reaction.rs @@ -126,51 +126,51 @@ pub mod reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Type; type CreatedAt; type Subject; - type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Type = Unset; type CreatedAt = Unset; type Subject = Unset; - type Type = Unset; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData St>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Type = Set; + type CreatedAt = St::CreatedAt; + type Subject = St::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Type = St::Type; type CreatedAt = Set; type Subject = St::Subject; - type Type = St::Type; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; - type Subject = Set; type Type = St::Type; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData St>); - impl sealed::Sealed for SetType {} - impl State for SetType { type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - type Type = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `type` field + pub struct r#type(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `type` field - pub struct r#type(()); } } @@ -259,9 +259,9 @@ where impl ReactionBuilder where St: reaction_state::State, + St::Type: reaction_state::IsSet, St::CreatedAt: reaction_state::IsSet, St::Subject: reaction_state::IsSet, - St::Type: reaction_state::IsSet, { /// Build the final struct. pub fn build(self) -> Reaction { diff --git a/crates/jacquard-api/src/social_showcase/library/create_item.rs b/crates/jacquard-api/src/social_showcase/library/create_item.rs index 12a12ac3c..c2f628915 100644 --- a/crates/jacquard-api/src/social_showcase/library/create_item.rs +++ b/crates/jacquard-api/src/social_showcase/library/create_item.rs @@ -170,8 +170,8 @@ pub mod create_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Tags; + type Title; type Visibility; type Images; } @@ -179,26 +179,26 @@ pub mod create_item_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Tags = Unset; + type Title = Unset; type Visibility = Unset; type Images = Unset; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Tags = St::Tags; - type Visibility = St::Visibility; - type Images = St::Images; - } ///State transition - sets the `tags` field to Set pub struct SetTags(PhantomData St>); impl sealed::Sealed for SetTags {} impl State for SetTags { - type Title = St::Title; type Tags = Set; + type Title = St::Title; + type Visibility = St::Visibility; + type Images = St::Images; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Tags = St::Tags; + type Title = Set; type Visibility = St::Visibility; type Images = St::Images; } @@ -206,8 +206,8 @@ pub mod create_item_state { pub struct SetVisibility(PhantomData St>); impl sealed::Sealed for SetVisibility {} impl State for SetVisibility { - type Title = St::Title; type Tags = St::Tags; + type Title = St::Title; type Visibility = Set; type Images = St::Images; } @@ -215,18 +215,18 @@ pub mod create_item_state { pub struct SetImages(PhantomData St>); impl sealed::Sealed for SetImages {} impl State for SetImages { - type Title = St::Title; type Tags = St::Tags; + type Title = St::Title; type Visibility = St::Visibility; type Images = 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 `tags` field pub struct tags(()); + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `visibility` field pub struct visibility(()); ///Marker type for the `images` field @@ -399,8 +399,8 @@ where impl CreateItemBuilder where St: create_item_state::State, - St::Title: create_item_state::IsSet, St::Tags: create_item_state::IsSet, + St::Title: create_item_state::IsSet, St::Visibility: create_item_state::IsSet, St::Images: create_item_state::IsSet, { diff --git a/crates/jacquard-api/src/social_showcase/library/item.rs b/crates/jacquard-api/src/social_showcase/library/item.rs index 66c219acf..8d2d1fec1 100644 --- a/crates/jacquard-api/src/social_showcase/library/item.rs +++ b/crates/jacquard-api/src/social_showcase/library/item.rs @@ -300,85 +300,85 @@ pub mod item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Tags; - type Images; type Title; + type Images; + type Tags; type Visibility; + 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 Tags = Unset; - type Images = Unset; type Title = Unset; + type Images = Unset; + type Tags = Unset; type Visibility = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Tags = St::Tags; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type Images = St::Images; - type Title = St::Title; + type Tags = St::Tags; type Visibility = St::Visibility; - } - ///State transition - sets the `tags` field to Set - pub struct SetTags(PhantomData St>); - impl sealed::Sealed for SetTags {} - impl State for SetTags { type CreatedAt = St::CreatedAt; - type Tags = Set; - type Images = St::Images; - type Title = St::Title; - type Visibility = St::Visibility; } ///State transition - sets the `images` field to Set pub struct SetImages(PhantomData St>); impl sealed::Sealed for SetImages {} impl State for SetImages { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; - type Images = Set; type Title = St::Title; + type Images = Set; + type Tags = St::Tags; type Visibility = St::Visibility; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { type CreatedAt = St::CreatedAt; - type Tags = St::Tags; + } + ///State transition - sets the `tags` field to Set + pub struct SetTags(PhantomData St>); + impl sealed::Sealed for SetTags {} + impl State for SetTags { + type Title = St::Title; type Images = St::Images; - type Title = Set; + type Tags = Set; type Visibility = St::Visibility; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `visibility` field to Set pub struct SetVisibility(PhantomData St>); impl sealed::Sealed for SetVisibility {} impl State for SetVisibility { - type CreatedAt = St::CreatedAt; - type Tags = St::Tags; - type Images = St::Images; type Title = St::Title; + type Images = St::Images; + type Tags = St::Tags; type Visibility = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Title = St::Title; + type Images = St::Images; + type Tags = St::Tags; + type Visibility = St::Visibility; + 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 `tags` field - pub struct tags(()); - ///Marker type for the `images` field - pub struct images(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `images` field + pub struct images(()); + ///Marker type for the `tags` field + pub struct tags(()); ///Marker type for the `visibility` field pub struct visibility(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -622,11 +622,11 @@ where impl ItemBuilder where St: item_state::State, - St::CreatedAt: item_state::IsSet, - St::Tags: item_state::IsSet, - St::Images: item_state::IsSet, St::Title: item_state::IsSet, + St::Images: item_state::IsSet, + St::Tags: item_state::IsSet, St::Visibility: item_state::IsSet, + St::CreatedAt: item_state::IsSet, { /// Build the final struct. pub fn build(self) -> Item { diff --git a/crates/jacquard-api/src/social_showcase/profile/preferences.rs b/crates/jacquard-api/src/social_showcase/profile/preferences.rs index 29d269b21..97c4a60bc 100644 --- a/crates/jacquard-api/src/social_showcase/profile/preferences.rs +++ b/crates/jacquard-api/src/social_showcase/profile/preferences.rs @@ -130,83 +130,83 @@ pub mod preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notifications; - type Privacy; - type UpdatedAt; type Activity; + type UpdatedAt; + type Privacy; + type Notifications; type Visibility; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notifications = Unset; - type Privacy = Unset; - type UpdatedAt = Unset; type Activity = Unset; + type UpdatedAt = Unset; + type Privacy = Unset; + type Notifications = Unset; type Visibility = Unset; } - ///State transition - sets the `notifications` field to Set - pub struct SetNotifications(PhantomData St>); - impl sealed::Sealed for SetNotifications {} - impl State for SetNotifications { - type Notifications = Set; - type Privacy = St::Privacy; + ///State transition - sets the `activity` field to Set + pub struct SetActivity(PhantomData St>); + impl sealed::Sealed for SetActivity {} + impl State for SetActivity { + type Activity = Set; type UpdatedAt = St::UpdatedAt; - type Activity = St::Activity; - type Visibility = St::Visibility; - } - ///State transition - sets the `privacy` field to Set - pub struct SetPrivacy(PhantomData St>); - impl sealed::Sealed for SetPrivacy {} - impl State for SetPrivacy { + type Privacy = St::Privacy; type Notifications = St::Notifications; - type Privacy = Set; - type UpdatedAt = St::UpdatedAt; - type Activity = St::Activity; type Visibility = St::Visibility; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Notifications = St::Notifications; - type Privacy = St::Privacy; - type UpdatedAt = Set; type Activity = St::Activity; + type UpdatedAt = Set; + type Privacy = St::Privacy; + type Notifications = St::Notifications; type Visibility = St::Visibility; } - ///State transition - sets the `activity` field to Set - pub struct SetActivity(PhantomData St>); - impl sealed::Sealed for SetActivity {} - impl State for SetActivity { + ///State transition - sets the `privacy` field to Set + pub struct SetPrivacy(PhantomData St>); + impl sealed::Sealed for SetPrivacy {} + impl State for SetPrivacy { + type Activity = St::Activity; + type UpdatedAt = St::UpdatedAt; + type Privacy = Set; type Notifications = St::Notifications; - type Privacy = St::Privacy; + type Visibility = St::Visibility; + } + ///State transition - sets the `notifications` field to Set + pub struct SetNotifications(PhantomData St>); + impl sealed::Sealed for SetNotifications {} + impl State for SetNotifications { + type Activity = St::Activity; type UpdatedAt = St::UpdatedAt; - type Activity = Set; + type Privacy = St::Privacy; + type Notifications = Set; type Visibility = St::Visibility; } ///State transition - sets the `visibility` field to Set pub struct SetVisibility(PhantomData St>); impl sealed::Sealed for SetVisibility {} impl State for SetVisibility { - type Notifications = St::Notifications; - type Privacy = St::Privacy; - type UpdatedAt = St::UpdatedAt; type Activity = St::Activity; + type UpdatedAt = St::UpdatedAt; + type Privacy = St::Privacy; + type Notifications = St::Notifications; type Visibility = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `notifications` field - pub struct notifications(()); - ///Marker type for the `privacy` field - pub struct privacy(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); ///Marker type for the `activity` field pub struct activity(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `privacy` field + pub struct privacy(()); + ///Marker type for the `notifications` field + pub struct notifications(()); ///Marker type for the `visibility` field pub struct visibility(()); } @@ -369,10 +369,10 @@ where impl PreferencesBuilder where St: preferences_state::State, - St::Notifications: preferences_state::IsSet, - St::Privacy: preferences_state::IsSet, - St::UpdatedAt: preferences_state::IsSet, St::Activity: preferences_state::IsSet, + St::UpdatedAt: preferences_state::IsSet, + St::Privacy: preferences_state::IsSet, + St::Notifications: preferences_state::IsSet, St::Visibility: preferences_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/social_showcase/profile/profile.rs b/crates/jacquard-api/src/social_showcase/profile/profile.rs index fbb1baaaf..226aee004 100644 --- a/crates/jacquard-api/src/social_showcase/profile/profile.rs +++ b/crates/jacquard-api/src/social_showcase/profile/profile.rs @@ -345,66 +345,66 @@ pub mod profile_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type CreatedAt; type Handle; type Tags; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type CreatedAt = Unset; type Handle = Unset; type Tags = Unset; + type CreatedAt = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type CreatedAt = St::CreatedAt; - type Handle = St::Handle; - type Tags = St::Tags; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Did = St::Did; - type CreatedAt = Set; type Handle = St::Handle; type Tags = St::Tags; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = St::Did; - type CreatedAt = St::CreatedAt; type Handle = Set; type Tags = St::Tags; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `tags` field to Set pub struct SetTags(PhantomData St>); impl sealed::Sealed for SetTags {} impl State for SetTags { type Did = St::Did; - type CreatedAt = St::CreatedAt; type Handle = St::Handle; type Tags = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Did = St::Did; + type Handle = St::Handle; + type Tags = St::Tags; + type CreatedAt = 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 `created_at` field - pub struct created_at(()); ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `tags` field pub struct tags(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -703,9 +703,9 @@ impl ProfileBuilder where St: profile_state::State, St::Did: profile_state::IsSet, - St::CreatedAt: profile_state::IsSet, St::Handle: profile_state::IsSet, St::Tags: profile_state::IsSet, + St::CreatedAt: profile_state::IsSet, { /// Build the final struct. pub fn build(self) -> Profile { diff --git a/crates/jacquard-api/src/social_tophhie/profile.rs b/crates/jacquard-api/src/social_tophhie/profile.rs index 6e13157ce..7db845362 100644 --- a/crates/jacquard-api/src/social_tophhie/profile.rs +++ b/crates/jacquard-api/src/social_tophhie/profile.rs @@ -601,37 +601,37 @@ pub mod pds_preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ShowOnHomepage; type AccessibilityScoring; + type ShowOnHomepage; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ShowOnHomepage = Unset; type AccessibilityScoring = Unset; - } - ///State transition - sets the `show_on_homepage` field to Set - pub struct SetShowOnHomepage(PhantomData St>); - impl sealed::Sealed for SetShowOnHomepage {} - impl State for SetShowOnHomepage { - type ShowOnHomepage = Set; - type AccessibilityScoring = St::AccessibilityScoring; + type ShowOnHomepage = Unset; } ///State transition - sets the `accessibility_scoring` field to Set pub struct SetAccessibilityScoring(PhantomData St>); impl sealed::Sealed for SetAccessibilityScoring {} impl State for SetAccessibilityScoring { - type ShowOnHomepage = St::ShowOnHomepage; type AccessibilityScoring = Set; + type ShowOnHomepage = St::ShowOnHomepage; + } + ///State transition - sets the `show_on_homepage` field to Set + pub struct SetShowOnHomepage(PhantomData St>); + impl sealed::Sealed for SetShowOnHomepage {} + impl State for SetShowOnHomepage { + type AccessibilityScoring = St::AccessibilityScoring; + type ShowOnHomepage = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `show_on_homepage` field - pub struct show_on_homepage(()); ///Marker type for the `accessibility_scoring` field pub struct accessibility_scoring(()); + ///Marker type for the `show_on_homepage` field + pub struct show_on_homepage(()); } } @@ -701,8 +701,8 @@ where impl PdsPreferencesBuilder where St: pds_preferences_state::State, - St::ShowOnHomepage: pds_preferences_state::IsSet, St::AccessibilityScoring: pds_preferences_state::IsSet, + St::ShowOnHomepage: pds_preferences_state::IsSet, { /// Build the final struct. pub fn build(self) -> PdsPreferences { diff --git a/crates/jacquard-api/src/st_lifepo/profile.rs b/crates/jacquard-api/src/st_lifepo/profile.rs index a5b0e3d24..e6ca81903 100644 --- a/crates/jacquard-api/src/st_lifepo/profile.rs +++ b/crates/jacquard-api/src/st_lifepo/profile.rs @@ -107,37 +107,37 @@ pub mod life_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type StartDate; + 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 StartDate = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData St>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type StartDate = St::StartDate; + type Title = Unset; } ///State transition - sets the `start_date` field to Set pub struct SetStartDate(PhantomData St>); impl sealed::Sealed for SetStartDate {} impl State for SetStartDate { - type Title = St::Title; type StartDate = Set; + type Title = St::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type StartDate = St::StartDate; + 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 `start_date` field pub struct start_date(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -233,8 +233,8 @@ where impl LifeEventBuilder where St: life_event_state::State, - St::Title: life_event_state::IsSet, St::StartDate: life_event_state::IsSet, + St::Title: life_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> LifeEvent { diff --git a/crates/jacquard-api/src/st_snowpo/post.rs b/crates/jacquard-api/src/st_snowpo/post.rs index 3a37a5191..fa13dd5a5 100644 --- a/crates/jacquard-api/src/st_snowpo/post.rs +++ b/crates/jacquard-api/src/st_snowpo/post.rs @@ -173,37 +173,37 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; 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; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Content = St::Content; + type CreatedAt = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; type Content = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Content = St::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 `created_at` field + pub struct created_at(()); } } @@ -318,8 +318,8 @@ impl PostBuilder { impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, St::Content: post_state::IsSet, + St::CreatedAt: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/systems_timker/hawlt/list_notes.rs b/crates/jacquard-api/src/systems_timker/hawlt/list_notes.rs index d522eb846..ae0bcd053 100644 --- a/crates/jacquard-api/src/systems_timker/hawlt/list_notes.rs +++ b/crates/jacquard-api/src/systems_timker/hawlt/list_notes.rs @@ -230,67 +230,67 @@ pub mod note_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type Uri; type Value; 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 Value = Unset; type Cid = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Uri = St::Uri; - type Value = St::Value; - type Cid = St::Cid; + type IndexedAt = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type IndexedAt = St::IndexedAt; type Uri = Set; type Value = St::Value; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type IndexedAt = St::IndexedAt; type Uri = St::Uri; type Value = Set; type Cid = St::Cid; + type IndexedAt = St::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type IndexedAt = St::IndexedAt; type Uri = St::Uri; type Value = St::Value; type Cid = Set; + type IndexedAt = St::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Uri = St::Uri; + type Value = St::Value; + type Cid = St::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 `uri` field pub struct uri(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -398,10 +398,10 @@ where impl NoteViewBuilder where St: note_view_state::State, - St::IndexedAt: note_view_state::IsSet, St::Uri: note_view_state::IsSet, St::Value: note_view_state::IsSet, St::Cid: note_view_state::IsSet, + St::IndexedAt: note_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> NoteView { diff --git a/crates/jacquard-api/src/systems_timker/hawlt/note.rs b/crates/jacquard-api/src/systems_timker/hawlt/note.rs index a2d6da04d..2517b3ed2 100644 --- a/crates/jacquard-api/src/systems_timker/hawlt/note.rs +++ b/crates/jacquard-api/src/systems_timker/hawlt/note.rs @@ -297,37 +297,37 @@ pub mod attachment_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 St>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Alt = Set; - type Image = St::Image; + type Alt = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Alt = St::Alt; type Image = Set; + type Alt = St::Alt; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData St>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Image = St::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(()); } } @@ -397,8 +397,8 @@ where impl AttachmentBuilder where St: attachment_state::State, - St::Alt: attachment_state::IsSet, St::Image: attachment_state::IsSet, + St::Alt: attachment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Attachment { @@ -597,37 +597,37 @@ pub mod note_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; 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; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Content = St::Content; + type CreatedAt = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type CreatedAt = St::CreatedAt; type Content = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Content = St::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 `created_at` field + pub struct created_at(()); } } @@ -759,8 +759,8 @@ impl NoteBuilder { impl NoteBuilder where St: note_state::State, - St::CreatedAt: note_state::IsSet, St::Content: note_state::IsSet, + St::CreatedAt: note_state::IsSet, { /// Build the final struct. pub fn build(self) -> Note { diff --git a/crates/jacquard-api/src/tech_lenooby09/didgit/signature_proof.rs b/crates/jacquard-api/src/tech_lenooby09/didgit/signature_proof.rs index 41bddcefc..608f12ec6 100644 --- a/crates/jacquard-api/src/tech_lenooby09/didgit/signature_proof.rs +++ b/crates/jacquard-api/src/tech_lenooby09/didgit/signature_proof.rs @@ -280,105 +280,105 @@ pub mod signature_proof_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SignedAt; + type Signer; + type ObjectType; type ObjectId; type SignatureType; + type SignedAt; type Signature; - type ObjectType; - type Signer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SignedAt = Unset; + type Signer = Unset; + type ObjectType = Unset; type ObjectId = Unset; type SignatureType = Unset; + type SignedAt = Unset; type Signature = Unset; - type ObjectType = Unset; - type Signer = Unset; } - ///State transition - sets the `signed_at` field to Set - pub struct SetSignedAt(PhantomData St>); - impl sealed::Sealed for SetSignedAt {} - impl State for SetSignedAt { - type SignedAt = Set; + ///State transition - sets the `signer` field to Set + pub struct SetSigner(PhantomData St>); + impl sealed::Sealed for SetSigner {} + impl State for SetSigner { + type Signer = Set; + type ObjectType = St::ObjectType; type ObjectId = St::ObjectId; type SignatureType = St::SignatureType; + type SignedAt = St::SignedAt; type Signature = St::Signature; - type ObjectType = St::ObjectType; + } + ///State transition - sets the `object_type` field to Set + pub struct SetObjectType(PhantomData St>); + impl sealed::Sealed for SetObjectType {} + impl State for SetObjectType { type Signer = St::Signer; + type ObjectType = Set; + type ObjectId = St::ObjectId; + type SignatureType = St::SignatureType; + type SignedAt = St::SignedAt; + type Signature = St::Signature; } ///State transition - sets the `object_id` field to Set pub struct SetObjectId(PhantomData St>); impl sealed::Sealed for SetObjectId {} impl State for SetObjectId { - type SignedAt = St::SignedAt; + type Signer = St::Signer; + type ObjectType = St::ObjectType; type ObjectId = Set; type SignatureType = St::SignatureType; + type SignedAt = St::SignedAt; type Signature = St::Signature; - type ObjectType = St::ObjectType; - type Signer = St::Signer; } ///State transition - sets the `signature_type` field to Set pub struct SetSignatureType(PhantomData St>); impl sealed::Sealed for SetSignatureType {} impl State for SetSignatureType { - type SignedAt = St::SignedAt; + type Signer = St::Signer; + type ObjectType = St::ObjectType; type ObjectId = St::ObjectId; type SignatureType = Set; + type SignedAt = St::SignedAt; type Signature = St::Signature; - type ObjectType = St::ObjectType; + } + ///State transition - sets the `signed_at` field to Set + pub struct SetSignedAt(PhantomData St>); + impl sealed::Sealed for SetSignedAt {} + impl State for SetSignedAt { type Signer = St::Signer; + type ObjectType = St::ObjectType; + type ObjectId = St::ObjectId; + type SignatureType = St::SignatureType; + type SignedAt = Set; + type Signature = St::Signature; } ///State transition - sets the `signature` field to Set pub struct SetSignature(PhantomData St>); impl sealed::Sealed for SetSignature {} impl State for SetSignature { - type SignedAt = St::SignedAt; - type ObjectId = St::ObjectId; - type SignatureType = St::SignatureType; - type Signature = Set; - type ObjectType = St::ObjectType; type Signer = St::Signer; - } - ///State transition - sets the `object_type` field to Set - pub struct SetObjectType(PhantomData St>); - impl sealed::Sealed for SetObjectType {} - impl State for SetObjectType { - type SignedAt = St::SignedAt; + type ObjectType = St::ObjectType; type ObjectId = St::ObjectId; type SignatureType = St::SignatureType; - type Signature = St::Signature; - type ObjectType = Set; - type Signer = St::Signer; - } - ///State transition - sets the `signer` field to Set - pub struct SetSigner(PhantomData St>); - impl sealed::Sealed for SetSigner {} - impl State for SetSigner { type SignedAt = St::SignedAt; - type ObjectId = St::ObjectId; - type SignatureType = St::SignatureType; - type Signature = St::Signature; - type ObjectType = St::ObjectType; - type Signer = Set; + type Signature = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signed_at` field - pub struct signed_at(()); + ///Marker type for the `signer` field + pub struct signer(()); + ///Marker type for the `object_type` field + pub struct object_type(()); ///Marker type for the `object_id` field pub struct object_id(()); ///Marker type for the `signature_type` field pub struct signature_type(()); + ///Marker type for the `signed_at` field + pub struct signed_at(()); ///Marker type for the `signature` field pub struct signature(()); - ///Marker type for the `object_type` field - pub struct object_type(()); - ///Marker type for the `signer` field - pub struct signer(()); } } @@ -545,12 +545,12 @@ where impl SignatureProofBuilder where St: signature_proof_state::State, - St::SignedAt: signature_proof_state::IsSet, + St::Signer: signature_proof_state::IsSet, + St::ObjectType: signature_proof_state::IsSet, St::ObjectId: signature_proof_state::IsSet, St::SignatureType: signature_proof_state::IsSet, + St::SignedAt: signature_proof_state::IsSet, St::Signature: signature_proof_state::IsSet, - St::ObjectType: signature_proof_state::IsSet, - St::Signer: signature_proof_state::IsSet, { /// Build the final struct. pub fn build(self) -> SignatureProof { diff --git a/crates/jacquard-api/src/tech_manos/twmirror/post.rs b/crates/jacquard-api/src/tech_manos/twmirror/post.rs index 06a90eaf6..e5abd00af 100644 --- a/crates/jacquard-api/src/tech_manos/twmirror/post.rs +++ b/crates/jacquard-api/src/tech_manos/twmirror/post.rs @@ -122,8 +122,8 @@ pub mod post_state { pub trait State: sealed::Sealed { type CreatedAt; type TwUserId; - type TweetId; type BskyPost; + type TweetId; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -131,8 +131,8 @@ pub mod post_state { impl State for Empty { type CreatedAt = Unset; type TwUserId = Unset; - type TweetId = Unset; type BskyPost = Unset; + type TweetId = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); @@ -140,8 +140,8 @@ pub mod post_state { impl State for SetCreatedAt { type CreatedAt = Set; type TwUserId = St::TwUserId; - type TweetId = St::TweetId; type BskyPost = St::BskyPost; + type TweetId = St::TweetId; } ///State transition - sets the `tw_user_id` field to Set pub struct SetTwUserId(PhantomData St>); @@ -149,17 +149,8 @@ pub mod post_state { impl State for SetTwUserId { type CreatedAt = St::CreatedAt; type TwUserId = Set; - type TweetId = St::TweetId; - type BskyPost = St::BskyPost; - } - ///State transition - sets the `tweet_id` field to Set - pub struct SetTweetId(PhantomData St>); - impl sealed::Sealed for SetTweetId {} - impl State for SetTweetId { - type CreatedAt = St::CreatedAt; - type TwUserId = St::TwUserId; - type TweetId = Set; type BskyPost = St::BskyPost; + type TweetId = St::TweetId; } ///State transition - sets the `bsky_post` field to Set pub struct SetBskyPost(PhantomData St>); @@ -167,8 +158,17 @@ pub mod post_state { impl State for SetBskyPost { type CreatedAt = St::CreatedAt; type TwUserId = St::TwUserId; - type TweetId = St::TweetId; type BskyPost = Set; + type TweetId = St::TweetId; + } + ///State transition - sets the `tweet_id` field to Set + pub struct SetTweetId(PhantomData St>); + impl sealed::Sealed for SetTweetId {} + impl State for SetTweetId { + type CreatedAt = St::CreatedAt; + type TwUserId = St::TwUserId; + type BskyPost = St::BskyPost; + type TweetId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -177,10 +177,10 @@ pub mod post_state { pub struct created_at(()); ///Marker type for the `tw_user_id` field pub struct tw_user_id(()); - ///Marker type for the `tweet_id` field - pub struct tweet_id(()); ///Marker type for the `bsky_post` field pub struct bsky_post(()); + ///Marker type for the `tweet_id` field + pub struct tweet_id(()); } } @@ -295,8 +295,8 @@ where St: post_state::State, St::CreatedAt: post_state::IsSet, St::TwUserId: post_state::IsSet, - St::TweetId: post_state::IsSet, St::BskyPost: post_state::IsSet, + St::TweetId: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku.rs b/crates/jacquard-api/src/tech_tokimeki/kaku.rs index 91d8ffaf0..8a763a64e 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku.rs @@ -1382,85 +1382,85 @@ pub mod collection_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Author; - type Name; type Cid; + type Name; type Uri; - 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 Author = Unset; - type Name = Unset; type Cid = Unset; + type Name = Unset; type Uri = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Author = St::Author; + type Cid = St::Cid; + type Name = St::Name; + type Uri = St::Uri; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Author = Set; - type Name = St::Name; - type Cid = St::Cid; - type Uri = St::Uri; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Author = St::Author; - type Name = Set; + type Author = Set; type Cid = St::Cid; + type Name = St::Name; type Uri = St::Uri; - type CreatedAt = St::CreatedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type CreatedAt = St::CreatedAt; type Author = St::Author; - type Name = St::Name; type Cid = Set; + type Name = St::Name; type Uri = St::Uri; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { type CreatedAt = St::CreatedAt; + type Author = St::Author; + type Cid = St::Cid; + type Name = Set; + type Uri = St::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Author = St::Author; - type Name = St::Name; - type Cid = St::Cid; - type Uri = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Author = St::Author; - type Name = St::Name; type Cid = St::Cid; - type Uri = St::Uri; - type CreatedAt = Set; + type Name = St::Name; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `author` field pub struct author(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -1649,11 +1649,11 @@ where impl CollectionViewBuilder where St: collection_view_state::State, + St::CreatedAt: collection_view_state::IsSet, St::Author: collection_view_state::IsSet, - St::Name: collection_view_state::IsSet, St::Cid: collection_view_state::IsSet, + St::Name: collection_view_state::IsSet, St::Uri: collection_view_state::IsSet, - St::CreatedAt: collection_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> CollectionView { @@ -1700,105 +1700,105 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Author; type Image; type Uri; - type AspectRatio; + type Author; type CreatedAt; + type AspectRatio; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Author = Unset; type Image = Unset; type Uri = Unset; - type AspectRatio = Unset; + type Author = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Author = St::Author; - type Image = St::Image; - type Uri = St::Uri; - type AspectRatio = St::AspectRatio; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Cid = St::Cid; - type Author = Set; - type Image = St::Image; - type Uri = St::Uri; - type AspectRatio = St::AspectRatio; - type CreatedAt = St::CreatedAt; + type AspectRatio = Unset; + type Cid = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Cid = St::Cid; - type Author = St::Author; type Image = Set; type Uri = St::Uri; - type AspectRatio = St::AspectRatio; + type Author = St::Author; type CreatedAt = St::CreatedAt; + type AspectRatio = St::AspectRatio; + type Cid = St::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = St::Cid; - type Author = St::Author; type Image = St::Image; type Uri = Set; - type AspectRatio = St::AspectRatio; + type Author = St::Author; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `aspect_ratio` field to Set - pub struct SetAspectRatio(PhantomData St>); - impl sealed::Sealed for SetAspectRatio {} - impl State for SetAspectRatio { + type AspectRatio = St::AspectRatio; type Cid = St::Cid; - type Author = St::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Image = St::Image; type Uri = St::Uri; - type AspectRatio = Set; + type Author = Set; type CreatedAt = St::CreatedAt; + type AspectRatio = St::AspectRatio; + type Cid = St::Cid; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Image = St::Image; + type Uri = St::Uri; + type Author = St::Author; + type CreatedAt = Set; + type AspectRatio = St::AspectRatio; type Cid = St::Cid; + } + ///State transition - sets the `aspect_ratio` field to Set + pub struct SetAspectRatio(PhantomData St>); + impl sealed::Sealed for SetAspectRatio {} + impl State for SetAspectRatio { + type Image = St::Image; + type Uri = St::Uri; type Author = St::Author; + type CreatedAt = St::CreatedAt; + type AspectRatio = Set; + type Cid = St::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Image = St::Image; type Uri = St::Uri; + type Author = St::Author; + type CreatedAt = St::CreatedAt; type AspectRatio = St::AspectRatio; - type CreatedAt = Set; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `image` field pub struct image(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `aspect_ratio` field - pub struct aspect_ratio(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `aspect_ratio` field + pub struct aspect_ratio(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -2060,12 +2060,12 @@ impl PostViewBuilder { impl PostViewBuilder where St: post_view_state::State, - St::Cid: post_view_state::IsSet, - St::Author: post_view_state::IsSet, St::Image: post_view_state::IsSet, St::Uri: post_view_state::IsSet, - St::AspectRatio: post_view_state::IsSet, + St::Author: post_view_state::IsSet, St::CreatedAt: post_view_state::IsSet, + St::AspectRatio: post_view_state::IsSet, + St::Cid: post_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> PostView { @@ -2148,83 +2148,83 @@ pub mod reply_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Cid; type Author; + type Cid; type Text; + type Uri; type CreatedAt; } /// 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 Cid = Unset; type Text = Unset; + type Uri = Unset; type CreatedAt = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Author = Set; type Cid = St::Cid; - type Author = St::Author; type Text = St::Text; + type Uri = St::Uri; type CreatedAt = St::CreatedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = St::Uri; - type Cid = Set; type Author = St::Author; + type Cid = Set; type Text = St::Text; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { type Uri = St::Uri; - type Cid = St::Cid; - type Author = Set; - type Text = St::Text; type CreatedAt = St::CreatedAt; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Uri = St::Uri; - type Cid = St::Cid; type Author = St::Author; + type Cid = St::Cid; type Text = Set; + type Uri = St::Uri; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Author = St::Author; + type Cid = St::Cid; + type Text = St::Text; + type Uri = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = St::Uri; - type Cid = St::Cid; type Author = St::Author; + type Cid = St::Cid; type Text = St::Text; + type Uri = St::Uri; type CreatedAt = 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 `cid` field + pub struct cid(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -2359,10 +2359,10 @@ where impl ReplyViewBuilder where St: reply_view_state::State, - St::Uri: reply_view_state::IsSet, - St::Cid: reply_view_state::IsSet, St::Author: reply_view_state::IsSet, + St::Cid: reply_view_state::IsSet, St::Text: reply_view_state::IsSet, + St::Uri: reply_view_state::IsSet, St::CreatedAt: reply_view_state::IsSet, { /// Build the final struct. @@ -2402,85 +2402,85 @@ pub mod request_response_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; + type Post; type Uri; - type Cid; type Author; - type Post; - type CreatedAt; + type Cid; } /// 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; type Uri = Unset; - type Cid = Unset; type Author = Unset; - type Post = Unset; - type CreatedAt = Unset; + type Cid = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Post = St::Post; + type Uri = St::Uri; + type Author = St::Author; + type Cid = St::Cid; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData St>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type CreatedAt = St::CreatedAt; + type Post = Set; + type Uri = St::Uri; + type Author = St::Author; + type Cid = St::Cid; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Uri = Set; - type Cid = St::Cid; - type Author = St::Author; - type Post = St::Post; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = St::Uri; - type Cid = Set; - type Author = St::Author; type Post = St::Post; - type CreatedAt = St::CreatedAt; + type Uri = Set; + type Author = St::Author; + type Cid = St::Cid; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData St>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = St::Uri; - type Cid = St::Cid; - type Author = Set; - type Post = St::Post; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData St>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { + type Post = St::Post; type Uri = St::Uri; + type Author = Set; type Cid = St::Cid; - type Author = St::Author; - type Post = Set; - type CreatedAt = St::CreatedAt; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type CreatedAt = St::CreatedAt; + type Post = St::Post; type Uri = St::Uri; - type Cid = St::Cid; type Author = St::Author; - type Post = St::Post; - type CreatedAt = Set; + type Cid = 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 `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 `post` field - pub struct post(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -2633,11 +2633,11 @@ where impl RequestResponseViewBuilder where St: request_response_view_state::State, + St::CreatedAt: request_response_view_state::IsSet, + St::Post: request_response_view_state::IsSet, St::Uri: request_response_view_state::IsSet, - St::Cid: request_response_view_state::IsSet, St::Author: request_response_view_state::IsSet, - St::Post: request_response_view_state::IsSet, - St::CreatedAt: request_response_view_state::IsSet, + St::Cid: request_response_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RequestResponseView { @@ -2678,105 +2678,105 @@ pub mod request_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; + type Uri; type Text; - type Author; type IsOpen; - type Cid; type CreatedAt; - type Uri; + type Author; } /// 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 Text = Unset; - type Author = Unset; type IsOpen = Unset; - type Cid = Unset; type CreatedAt = Unset; - type Uri = Unset; + type Author = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Uri = St::Uri; + type Text = St::Text; + type IsOpen = St::IsOpen; + type CreatedAt = St::CreatedAt; + type Author = St::Author; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = St::Cid; + type Uri = Set; + type Text = St::Text; + type IsOpen = St::IsOpen; + type CreatedAt = St::CreatedAt; + type Author = St::Author; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Text = Set; - type Author = St::Author; - type IsOpen = St::IsOpen; type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Uri = St::Uri; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData St>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Text = St::Text; - type Author = Set; + type Text = Set; type IsOpen = St::IsOpen; - type Cid = St::Cid; type CreatedAt = St::CreatedAt; - type Uri = St::Uri; + type Author = St::Author; } ///State transition - sets the `is_open` field to Set pub struct SetIsOpen(PhantomData St>); impl sealed::Sealed for SetIsOpen {} impl State for SetIsOpen { - type Text = St::Text; - type Author = St::Author; - type IsOpen = Set; type Cid = St::Cid; - type CreatedAt = St::CreatedAt; type Uri = St::Uri; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Text = St::Text; - type Author = St::Author; - type IsOpen = St::IsOpen; - type Cid = Set; + type IsOpen = Set; type CreatedAt = St::CreatedAt; - type Uri = St::Uri; + type Author = St::Author; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Cid = St::Cid; + type Uri = St::Uri; type Text = St::Text; - type Author = St::Author; type IsOpen = St::IsOpen; - type Cid = St::Cid; type CreatedAt = Set; - type Uri = St::Uri; + type Author = St::Author; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData St>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Cid = St::Cid; + type Uri = St::Uri; type Text = St::Text; - type Author = St::Author; type IsOpen = St::IsOpen; - type Cid = St::Cid; type CreatedAt = St::CreatedAt; - type Uri = Set; + type Author = 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 `text` field pub struct text(()); - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `is_open` field pub struct is_open(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `uri` field - pub struct uri(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -3005,12 +3005,12 @@ where impl RequestViewBuilder where St: request_view_state::State, + St::Cid: request_view_state::IsSet, + St::Uri: request_view_state::IsSet, St::Text: request_view_state::IsSet, - St::Author: request_view_state::IsSet, St::IsOpen: request_view_state::IsSet, - St::Cid: request_view_state::IsSet, St::CreatedAt: request_view_state::IsSet, - St::Uri: request_view_state::IsSet, + St::Author: request_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RequestView { diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/collection.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/collection.rs index 081f13540..c165bba9e 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/collection.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/collection.rs @@ -181,37 +181,37 @@ pub mod collection_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type CreatedAt; + 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 CreatedAt = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = St::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = St::Name; type CreatedAt = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = St::CreatedAt; + 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 `created_at` field pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -307,8 +307,8 @@ where impl CollectionBuilder where St: collection_state::State, - St::Name: collection_state::IsSet, St::CreatedAt: collection_state::IsSet, + St::Name: collection_state::IsSet, { /// Build the final struct. pub fn build(self) -> Collection { diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/collection_item.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/collection_item.rs index f54b9d513..afd056587 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/collection_item.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/collection_item.rs @@ -128,49 +128,49 @@ pub mod collection_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type Collection; + type Post; type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; type Collection = Unset; + type Post = Unset; type CreatedAt = Unset; } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData St>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type Collection = St::Collection; - type CreatedAt = St::CreatedAt; - } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData St>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Post = St::Post; type Collection = Set; + type Post = St::Post; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData St>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type Collection = St::Collection; + type Post = Set; type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Post = St::Post; type Collection = St::Collection; + type Post = St::Post; type CreatedAt = 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 `collection` field pub struct collection(()); + ///Marker type for the `post` field + pub struct post(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -274,8 +274,8 @@ where impl CollectionItemBuilder where St: collection_item_state::State, - St::Post: collection_item_state::IsSet, St::Collection: collection_item_state::IsSet, + St::Post: collection_item_state::IsSet, St::CreatedAt: collection_item_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/post.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/post.rs index 68362b9b2..79c1af0c9 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/post.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/post.rs @@ -205,51 +205,51 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type AspectRatio; type Image; + 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 AspectRatio = Unset; type Image = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type AspectRatio = St::AspectRatio; - type Image = St::Image; + type CreatedAt = Unset; } ///State transition - sets the `aspect_ratio` field to Set pub struct SetAspectRatio(PhantomData St>); impl sealed::Sealed for SetAspectRatio {} impl State for SetAspectRatio { - type CreatedAt = St::CreatedAt; type AspectRatio = Set; type Image = St::Image; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData St>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type CreatedAt = St::CreatedAt; type AspectRatio = St::AspectRatio; type Image = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type AspectRatio = St::AspectRatio; + type Image = St::Image; + 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 `aspect_ratio` field pub struct aspect_ratio(()); ///Marker type for the `image` field pub struct image(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -398,9 +398,9 @@ impl PostBuilder { impl PostBuilder where St: post_state::State, - St::CreatedAt: post_state::IsSet, St::AspectRatio: post_state::IsSet, St::Image: post_state::IsSet, + St::CreatedAt: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/reaction.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/reaction.rs index 87f4fbfdf..6d7f505fa 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/reaction.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/reaction.rs @@ -207,49 +207,49 @@ pub mod reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; + type Subject = Unset; type Type = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = St::CreatedAt; - type Type = St::Type; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = St::Subject; type CreatedAt = Set; + type Subject = St::Subject; + type Type = St::Type; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = St::CreatedAt; + type Subject = Set; type Type = St::Type; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Subject = St::Subject; type CreatedAt = St::CreatedAt; + type Subject = St::Subject; type Type = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `type` field pub struct r#type(()); } @@ -340,8 +340,8 @@ where impl ReactionBuilder where St: reaction_state::State, - St::Subject: reaction_state::IsSet, St::CreatedAt: reaction_state::IsSet, + St::Subject: reaction_state::IsSet, St::Type: reaction_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/request.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/request.rs index fd2838186..e08d3d9ba 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/request.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/request.rs @@ -175,37 +175,37 @@ pub mod request_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -337,8 +337,8 @@ where impl RequestBuilder where St: request_state::State, - St::CreatedAt: request_state::IsSet, St::Text: request_state::IsSet, + St::CreatedAt: request_state::IsSet, { /// Build the final struct. pub fn build(self) -> Request { diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/request_response.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/request_response.rs index 26437cd94..adbcb8d61 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/request_response.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/request_response.rs @@ -141,49 +141,49 @@ pub mod request_response_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Request; type CreatedAt; + type Request; type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Request = Unset; type CreatedAt = Unset; + type Request = Unset; type Post = Unset; } - ///State transition - sets the `request` field to Set - pub struct SetRequest(PhantomData St>); - impl sealed::Sealed for SetRequest {} - impl State for SetRequest { - type Request = Set; - type CreatedAt = St::CreatedAt; - type Post = St::Post; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Request = St::Request; type CreatedAt = Set; + type Request = St::Request; + type Post = St::Post; + } + ///State transition - sets the `request` field to Set + pub struct SetRequest(PhantomData St>); + impl sealed::Sealed for SetRequest {} + impl State for SetRequest { + type CreatedAt = St::CreatedAt; + type Request = Set; type Post = St::Post; } ///State transition - sets the `post` field to Set pub struct SetPost(PhantomData St>); impl sealed::Sealed for SetPost {} impl State for SetPost { - type Request = St::Request; type CreatedAt = St::CreatedAt; + type Request = St::Request; type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `request` field - pub struct request(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `request` field + pub struct request(()); ///Marker type for the `post` field pub struct post(()); } @@ -287,8 +287,8 @@ where impl RequestResponseBuilder where St: request_response_state::State, - St::Request: request_response_state::IsSet, St::CreatedAt: request_response_state::IsSet, + St::Request: request_response_state::IsSet, St::Post: request_response_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/tech_tokimeki/kaku/room_gate.rs b/crates/jacquard-api/src/tech_tokimeki/kaku/room_gate.rs index fa8b27418..4a1fe2718 100644 --- a/crates/jacquard-api/src/tech_tokimeki/kaku/room_gate.rs +++ b/crates/jacquard-api/src/tech_tokimeki/kaku/room_gate.rs @@ -123,37 +123,37 @@ pub mod room_gate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Room; type CreatedAt; + type Room; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Room = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `room` field to Set - pub struct SetRoom(PhantomData St>); - impl sealed::Sealed for SetRoom {} - impl State for SetRoom { - type Room = Set; - type CreatedAt = St::CreatedAt; + type Room = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Room = St::Room; type CreatedAt = Set; + type Room = St::Room; + } + ///State transition - sets the `room` field to Set + pub struct SetRoom(PhantomData St>); + impl sealed::Sealed for SetRoom {} + impl State for SetRoom { + type CreatedAt = St::CreatedAt; + type Room = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `room` field - pub struct room(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `room` field + pub struct room(()); } } @@ -236,8 +236,8 @@ where impl RoomGateBuilder where St: room_gate_state::State, - St::Room: room_gate_state::IsSet, St::CreatedAt: room_gate_state::IsSet, + St::Room: room_gate_state::IsSet, { /// Build the final struct. pub fn build(self) -> RoomGate { diff --git a/crates/jacquard-api/src/tech_tokimeki/poll/poll.rs b/crates/jacquard-api/src/tech_tokimeki/poll/poll.rs index c3572e85d..e8557c3a5 100644 --- a/crates/jacquard-api/src/tech_tokimeki/poll/poll.rs +++ b/crates/jacquard-api/src/tech_tokimeki/poll/poll.rs @@ -141,51 +141,51 @@ pub mod poll_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EndsAt; - type CreatedAt; type Options; + type CreatedAt; + type EndsAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type EndsAt = Unset; - type CreatedAt = Unset; type Options = Unset; + type CreatedAt = Unset; + type EndsAt = Unset; } - ///State transition - sets the `ends_at` field to Set - pub struct SetEndsAt(PhantomData St>); - impl sealed::Sealed for SetEndsAt {} - impl State for SetEndsAt { - type EndsAt = Set; + ///State transition - sets the `options` field to Set + pub struct SetOptions(PhantomData St>); + impl sealed::Sealed for SetOptions {} + impl State for SetOptions { + type Options = Set; type CreatedAt = St::CreatedAt; - type Options = St::Options; + type EndsAt = St::EndsAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type EndsAt = St::EndsAt; - type CreatedAt = Set; type Options = St::Options; - } - ///State transition - sets the `options` field to Set - pub struct SetOptions(PhantomData St>); - impl sealed::Sealed for SetOptions {} - impl State for SetOptions { + type CreatedAt = Set; type EndsAt = St::EndsAt; + } + ///State transition - sets the `ends_at` field to Set + pub struct SetEndsAt(PhantomData St>); + impl sealed::Sealed for SetEndsAt {} + impl State for SetEndsAt { + type Options = St::Options; type CreatedAt = St::CreatedAt; - type Options = Set; + type EndsAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ends_at` field - pub struct ends_at(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `options` field pub struct options(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `ends_at` field + pub struct ends_at(()); } } @@ -287,9 +287,9 @@ impl PollBuilder { impl PollBuilder where St: poll_state::State, - St::EndsAt: poll_state::IsSet, - St::CreatedAt: poll_state::IsSet, St::Options: poll_state::IsSet, + St::CreatedAt: poll_state::IsSet, + St::EndsAt: poll_state::IsSet, { /// Build the final struct. pub fn build(self) -> Poll { diff --git a/crates/jacquard-api/src/tech_tokimeki/takibi/spark.rs b/crates/jacquard-api/src/tech_tokimeki/takibi/spark.rs index 09ae34565..574cac30a 100644 --- a/crates/jacquard-api/src/tech_tokimeki/takibi/spark.rs +++ b/crates/jacquard-api/src/tech_tokimeki/takibi/spark.rs @@ -137,37 +137,37 @@ pub mod spark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -237,8 +237,8 @@ where impl SparkBuilder where St: spark_state::State, - St::CreatedAt: spark_state::IsSet, St::Text: spark_state::IsSet, + St::CreatedAt: spark_state::IsSet, { /// Build the final struct. pub fn build(self) -> Spark { diff --git a/crates/jacquard-api/src/to_atpr.rs b/crates/jacquard-api/src/to_atpr.rs new file mode 100644 index 000000000..9e49ee8d4 --- /dev/null +++ b/crates/jacquard-api/src/to_atpr.rs @@ -0,0 +1,6 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod link; \ No newline at end of file diff --git a/crates/jacquard-api/src/to_atpr/link.rs b/crates/jacquard-api/src/to_atpr/link.rs new file mode 100644 index 000000000..045c9d37a --- /dev/null +++ b/crates/jacquard-api/src/to_atpr/link.rs @@ -0,0 +1,297 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: to.atpr.link +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime, UriValue}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A shortened URL mapping + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "to.atpr.link", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Link { + pub updated_at: Datetime, + pub url: UriValue, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct LinkGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Link, +} + +impl Link { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct LinkRecord; +impl XrpcResp for LinkRecord { + const NSID: &'static str = "to.atpr.link"; + const ENCODING: &'static str = "application/json"; + type Output = LinkGetRecordOutput; + type Err = RecordError; +} + +impl From> for Link { + fn from(output: LinkGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Link { + const NSID: &'static str = "to.atpr.link"; + type Record = LinkRecord; +} + +impl Collection for LinkRecord { + const NSID: &'static str = "to.atpr.link"; + type Record = LinkRecord; +} + +impl LexiconSchema for Link { + fn nsid() -> &'static str { + "to.atpr.link" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_to_atpr_link() + } + fn validate(&self) -> Result<(), ConstraintError> { + { + let value = &self.url; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2048usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("url"), + max: 2048usize, + actual: ::len(value.as_ref()), + }); + } + } + Ok(()) + } +} + +pub mod link_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 UpdatedAt; + type Url; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type UpdatedAt = Unset; + type Url = Unset; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type UpdatedAt = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type UpdatedAt = St::UpdatedAt; + type Url = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `url` field + pub struct url(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct LinkBuilder { + _state: PhantomData St>, + _fields: (Option, Option>), + _type: PhantomData S>, +} + +impl Link { + /// Create a new builder for this type. + pub fn new() -> LinkBuilder { + LinkBuilder::new() + } +} + +impl LinkBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + LinkBuilder { + _state: PhantomData, + _fields: (None, None), + _type: PhantomData, + } + } +} + +impl LinkBuilder +where + St: link_state::State, + St::UpdatedAt: link_state::IsUnset, +{ + /// Set the `updatedAt` field (required) + pub fn updated_at( + mut self, + value: impl Into, + ) -> LinkBuilder> { + self._fields.0 = Option::Some(value.into()); + LinkBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LinkBuilder +where + St: link_state::State, + St::Url: link_state::IsUnset, +{ + /// Set the `url` field (required) + pub fn url( + mut self, + value: impl Into>, + ) -> LinkBuilder> { + self._fields.1 = Option::Some(value.into()); + LinkBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LinkBuilder +where + St: link_state::State, + St::UpdatedAt: link_state::IsSet, + St::Url: link_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Link { + Link { + updated_at: self._fields.0.unwrap(), + url: self._fields.1.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Link { + Link { + updated_at: self._fields.0.unwrap(), + url: self._fields.1.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_to_atpr_link() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("to.atpr.link"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some(CowStr::new_static("A shortened URL mapping")), + key: Some(CowStr::new_static("any")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("url"), SmolStr::new_static("updatedAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("updatedAt"), + LexObjectProperty::String(LexString { + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("url"), + LexObjectProperty::String(LexString { + format: Some(LexStringFormat::Uri), + max_length: Some(2048usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/tools_ozone/communication.rs b/crates/jacquard-api/src/tools_ozone/communication.rs index 05c2f10f5..eedc5ec5e 100644 --- a/crates/jacquard-api/src/tools_ozone/communication.rs +++ b/crates/jacquard-api/src/tools_ozone/communication.rs @@ -79,127 +79,127 @@ pub mod template_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type UpdatedAt; - type Id; type Disabled; + type UpdatedAt; + type CreatedAt; type LastUpdatedBy; type ContentMarkdown; type Name; + 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 UpdatedAt = Unset; - type Id = Unset; type Disabled = Unset; + type UpdatedAt = Unset; + type CreatedAt = Unset; type LastUpdatedBy = Unset; type ContentMarkdown = Unset; type Name = Unset; + type Id = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `disabled` field to Set + pub struct SetDisabled(PhantomData St>); + impl sealed::Sealed for SetDisabled {} + impl State for SetDisabled { + type Disabled = Set; type UpdatedAt = St::UpdatedAt; - type Id = St::Id; - type Disabled = St::Disabled; + type CreatedAt = St::CreatedAt; type LastUpdatedBy = St::LastUpdatedBy; type ContentMarkdown = St::ContentMarkdown; type Name = St::Name; + type Id = St::Id; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type CreatedAt = St::CreatedAt; - type UpdatedAt = Set; - type Id = St::Id; type Disabled = St::Disabled; - type LastUpdatedBy = St::LastUpdatedBy; - type ContentMarkdown = St::ContentMarkdown; - type Name = St::Name; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { + type UpdatedAt = Set; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Id = Set; - type Disabled = St::Disabled; type LastUpdatedBy = St::LastUpdatedBy; type ContentMarkdown = St::ContentMarkdown; type Name = St::Name; + type Id = St::Id; } - ///State transition - sets the `disabled` field to Set - pub struct SetDisabled(PhantomData St>); - impl sealed::Sealed for SetDisabled {} - impl State for SetDisabled { - type CreatedAt = St::CreatedAt; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Disabled = St::Disabled; type UpdatedAt = St::UpdatedAt; - type Id = St::Id; - type Disabled = Set; + type CreatedAt = Set; type LastUpdatedBy = St::LastUpdatedBy; type ContentMarkdown = St::ContentMarkdown; type Name = St::Name; + type Id = St::Id; } ///State transition - sets the `last_updated_by` field to Set pub struct SetLastUpdatedBy(PhantomData St>); impl sealed::Sealed for SetLastUpdatedBy {} impl State for SetLastUpdatedBy { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Id = St::Id; type Disabled = St::Disabled; + type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; type LastUpdatedBy = Set; type ContentMarkdown = St::ContentMarkdown; type Name = St::Name; + type Id = St::Id; } ///State transition - sets the `content_markdown` field to Set pub struct SetContentMarkdown(PhantomData St>); impl sealed::Sealed for SetContentMarkdown {} impl State for SetContentMarkdown { - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - type Id = St::Id; type Disabled = St::Disabled; + type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; type LastUpdatedBy = St::LastUpdatedBy; type ContentMarkdown = Set; type Name = St::Name; + type Id = St::Id; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = St::CreatedAt; + type Disabled = St::Disabled; type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; + type LastUpdatedBy = St::LastUpdatedBy; + type ContentMarkdown = St::ContentMarkdown; + type Name = Set; type Id = St::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { type Disabled = St::Disabled; + type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; type LastUpdatedBy = St::LastUpdatedBy; type ContentMarkdown = St::ContentMarkdown; - type Name = Set; + type Name = St::Name; + 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 `updated_at` field - pub struct updated_at(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `disabled` field pub struct disabled(()); + ///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 `last_updated_by` field pub struct last_updated_by(()); ///Marker type for the `content_markdown` field pub struct content_markdown(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -400,13 +400,13 @@ where impl TemplateViewBuilder where St: template_view_state::State, - St::CreatedAt: template_view_state::IsSet, - St::UpdatedAt: template_view_state::IsSet, - St::Id: template_view_state::IsSet, St::Disabled: template_view_state::IsSet, + St::UpdatedAt: template_view_state::IsSet, + St::CreatedAt: template_view_state::IsSet, St::LastUpdatedBy: template_view_state::IsSet, St::ContentMarkdown: template_view_state::IsSet, St::Name: template_view_state::IsSet, + St::Id: template_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> TemplateView { diff --git a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs index 7b0482c9c..a75808d3c 100644 --- a/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs +++ b/crates/jacquard-api/src/tools_ozone/hosting/get_account_history.rs @@ -439,51 +439,51 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; - type Details; type CreatedAt; + type Details; + type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedBy = Unset; - type Details = Unset; type CreatedAt = Unset; + type Details = Unset; + type CreatedBy = Unset; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Details = St::Details; - type CreatedAt = St::CreatedAt; + type CreatedBy = St::CreatedBy; } ///State transition - sets the `details` field to Set pub struct SetDetails(PhantomData St>); impl sealed::Sealed for SetDetails {} impl State for SetDetails { - type CreatedBy = St::CreatedBy; - type Details = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Details = Set; type CreatedBy = St::CreatedBy; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedAt = St::CreatedAt; type Details = St::Details; - type CreatedAt = Set; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_by` field - pub struct created_by(()); - ///Marker type for the `details` field - pub struct details(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `details` field + pub struct details(()); + ///Marker type for the `created_by` field + pub struct created_by(()); } } @@ -572,9 +572,9 @@ where impl EventBuilder where St: event_state::State, - St::CreatedBy: event_state::IsSet, - St::Details: event_state::IsSet, St::CreatedAt: event_state::IsSet, + St::Details: event_state::IsSet, + St::CreatedBy: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { diff --git a/crates/jacquard-api/src/tools_ozone/moderation.rs b/crates/jacquard-api/src/tools_ozone/moderation.rs index f3164af05..926170177 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation.rs @@ -2999,37 +2999,37 @@ pub mod account_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Active; type Timestamp; + type Active; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Active = Unset; type Timestamp = Unset; - } - ///State transition - sets the `active` field to Set - pub struct SetActive(PhantomData St>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { - type Active = Set; - type Timestamp = St::Timestamp; + type Active = Unset; } ///State transition - sets the `timestamp` field to Set pub struct SetTimestamp(PhantomData St>); impl sealed::Sealed for SetTimestamp {} impl State for SetTimestamp { - type Active = St::Active; type Timestamp = Set; + type Active = St::Active; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData St>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Timestamp = St::Timestamp; + type Active = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `active` field - pub struct active(()); ///Marker type for the `timestamp` field pub struct timestamp(()); + ///Marker type for the `active` field + pub struct active(()); } } @@ -3125,8 +3125,8 @@ where impl AccountEventBuilder where St: account_event_state::State, - St::Active: account_event_state::IsSet, St::Timestamp: account_event_state::IsSet, + St::Active: account_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> AccountEvent { @@ -5846,51 +5846,51 @@ pub mod age_assurance_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; - type AttemptId; type CreatedAt; + type AttemptId; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; - type AttemptId = Unset; type CreatedAt = Unset; + type AttemptId = Unset; + type Status = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type AttemptId = St::AttemptId; - type CreatedAt = St::CreatedAt; + type Status = St::Status; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData St>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type Status = St::Status; - type AttemptId = Set; type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type AttemptId = Set; type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = St::CreatedAt; type AttemptId = St::AttemptId; - type CreatedAt = Set; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `status` field - pub struct status(()); - ///Marker type for the `attempt_id` field - pub struct attempt_id(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `attempt_id` field + pub struct attempt_id(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -6081,9 +6081,9 @@ where impl AgeAssuranceEventBuilder where St: age_assurance_event_state::State, - St::Status: age_assurance_event_state::IsSet, - St::AttemptId: age_assurance_event_state::IsSet, St::CreatedAt: age_assurance_event_state::IsSet, + St::AttemptId: age_assurance_event_state::IsSet, + St::Status: age_assurance_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> AgeAssuranceEvent { @@ -6132,65 +6132,65 @@ pub mod blob_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type MimeType; type Size; + type CreatedAt; type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type MimeType = Unset; type Size = Unset; + type CreatedAt = Unset; type Cid = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type MimeType = St::MimeType; - type Size = St::Size; - type Cid = St::Cid; - } ///State transition - sets the `mime_type` field to Set pub struct SetMimeType(PhantomData St>); impl sealed::Sealed for SetMimeType {} impl State for SetMimeType { - type CreatedAt = St::CreatedAt; type MimeType = Set; type Size = St::Size; + type CreatedAt = St::CreatedAt; type Cid = St::Cid; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData St>); impl sealed::Sealed for SetSize {} impl State for SetSize { - type CreatedAt = St::CreatedAt; type MimeType = St::MimeType; type Size = Set; + type CreatedAt = St::CreatedAt; + type Cid = St::Cid; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type MimeType = St::MimeType; + type Size = St::Size; + type CreatedAt = Set; type Cid = St::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type CreatedAt = St::CreatedAt; type MimeType = St::MimeType; type Size = St::Size; + type CreatedAt = St::CreatedAt; type Cid = 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 `mime_type` field pub struct mime_type(()); ///Marker type for the `size` field pub struct size(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -6336,9 +6336,9 @@ where impl BlobViewBuilder where St: blob_view_state::State, - St::CreatedAt: blob_view_state::IsSet, St::MimeType: blob_view_state::IsSet, St::Size: blob_view_state::IsSet, + St::CreatedAt: blob_view_state::IsSet, St::Cid: blob_view_state::IsSet, { /// Build the final struct. @@ -6543,37 +6543,37 @@ pub mod image_details_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 St>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = St::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData St>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = St::Width; type Height = Set; + type Width = St::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData St>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = St::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(()); } } @@ -6643,8 +6643,8 @@ where impl ImageDetailsBuilder where St: image_details_state::State, - St::Width: image_details_state::IsSet, St::Height: image_details_state::IsSet, + St::Width: image_details_state::IsSet, { /// Build the final struct. pub fn build(self) -> ImageDetails { @@ -7210,37 +7210,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 St>); - impl sealed::Sealed for SetRemove {} - impl State for SetRemove { - type Remove = Set; - type Add = St::Add; + type Remove = Unset; } ///State transition - sets the `add` field to Set pub struct SetAdd(PhantomData St>); impl sealed::Sealed for SetAdd {} impl State for SetAdd { - type Remove = St::Remove; type Add = Set; + type Remove = St::Remove; + } + ///State transition - sets the `remove` field to Set + pub struct SetRemove(PhantomData St>); + impl sealed::Sealed for SetRemove {} + impl State for SetRemove { + type Add = St::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(()); } } @@ -7323,8 +7323,8 @@ where impl ModEventTagBuilder where St: mod_event_tag_state::State, - St::Remove: mod_event_tag_state::IsSet, St::Add: mod_event_tag_state::IsSet, + St::Remove: mod_event_tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> ModEventTag { @@ -7359,105 +7359,105 @@ pub mod mod_event_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type SubjectBlobCids; + type Subject; type CreatedAt; + type Event; type CreatedBy; type Id; - type Subject; - type SubjectBlobCids; - type Event; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type SubjectBlobCids = Unset; + type Subject = Unset; type CreatedAt = Unset; + type Event = Unset; type CreatedBy = Unset; type Id = Unset; - type Subject = Unset; - type SubjectBlobCids = Unset; - type Event = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type CreatedBy = St::CreatedBy; - type Id = St::Id; + ///State transition - sets the `subject_blob_cids` field to Set + pub struct SetSubjectBlobCids(PhantomData St>); + impl sealed::Sealed for SetSubjectBlobCids {} + impl State for SetSubjectBlobCids { + type SubjectBlobCids = Set; type Subject = St::Subject; - type SubjectBlobCids = St::SubjectBlobCids; - type Event = St::Event; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { type CreatedAt = St::CreatedAt; - type CreatedBy = Set; - type Id = St::Id; - type Subject = St::Subject; - type SubjectBlobCids = St::SubjectBlobCids; type Event = St::Event; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type CreatedAt = St::CreatedAt; type CreatedBy = St::CreatedBy; - type Id = Set; - type Subject = St::Subject; - type SubjectBlobCids = St::SubjectBlobCids; - type Event = St::Event; + type Id = St::Id; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type SubjectBlobCids = St::SubjectBlobCids; + type Subject = Set; type CreatedAt = St::CreatedAt; + type Event = St::Event; type CreatedBy = St::CreatedBy; type Id = St::Id; - type Subject = Set; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type SubjectBlobCids = St::SubjectBlobCids; + type Subject = St::Subject; + type CreatedAt = Set; type Event = St::Event; - } - ///State transition - sets the `subject_blob_cids` field to Set - pub struct SetSubjectBlobCids(PhantomData St>); - impl sealed::Sealed for SetSubjectBlobCids {} - impl State for SetSubjectBlobCids { - type CreatedAt = St::CreatedAt; type CreatedBy = St::CreatedBy; type Id = St::Id; - type Subject = St::Subject; - type SubjectBlobCids = Set; - type Event = St::Event; } ///State transition - sets the `event` field to Set pub struct SetEvent(PhantomData St>); impl sealed::Sealed for SetEvent {} impl State for SetEvent { + type SubjectBlobCids = St::SubjectBlobCids; + type Subject = St::Subject; type CreatedAt = St::CreatedAt; + type Event = Set; type CreatedBy = St::CreatedBy; type Id = St::Id; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type SubjectBlobCids = St::SubjectBlobCids; type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + type Event = St::Event; + type CreatedBy = Set; + type Id = St::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { type SubjectBlobCids = St::SubjectBlobCids; - type Event = Set; + type Subject = St::Subject; + type CreatedAt = St::CreatedAt; + type Event = St::Event; + type CreatedBy = St::CreatedBy; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `subject_blob_cids` field + pub struct subject_blob_cids(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `event` field + pub struct event(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `subject` field - pub struct subject(()); - ///Marker type for the `subject_blob_cids` field - pub struct subject_blob_cids(()); - ///Marker type for the `event` field - pub struct event(()); } } @@ -7652,12 +7652,12 @@ impl ModEventViewBuilder { impl ModEventViewBuilder where St: mod_event_view_state::State, + St::SubjectBlobCids: mod_event_view_state::IsSet, + St::Subject: mod_event_view_state::IsSet, St::CreatedAt: mod_event_view_state::IsSet, + St::Event: mod_event_view_state::IsSet, St::CreatedBy: mod_event_view_state::IsSet, St::Id: mod_event_view_state::IsSet, - St::Subject: mod_event_view_state::IsSet, - St::SubjectBlobCids: mod_event_view_state::IsSet, - St::Event: mod_event_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ModEventView { @@ -7704,105 +7704,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 SubjectBlobs; - type Event; type Id; + type SubjectBlobs; + type CreatedBy; type Subject; + type Event; } /// 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 SubjectBlobs = Unset; - type Event = Unset; type Id = Unset; + type SubjectBlobs = Unset; + type CreatedBy = Unset; type Subject = Unset; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; - type CreatedAt = St::CreatedAt; - type SubjectBlobs = St::SubjectBlobs; - type Event = St::Event; - type Id = St::Id; - type Subject = St::Subject; + type Event = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedBy = St::CreatedBy; type CreatedAt = Set; + type Id = St::Id; type SubjectBlobs = St::SubjectBlobs; + type CreatedBy = St::CreatedBy; + type Subject = St::Subject; type Event = St::Event; - type Id = St::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type CreatedAt = St::CreatedAt; + type Id = Set; + type SubjectBlobs = St::SubjectBlobs; + type CreatedBy = St::CreatedBy; type Subject = St::Subject; + type Event = St::Event; } ///State transition - sets the `subject_blobs` field to Set pub struct SetSubjectBlobs(PhantomData St>); impl sealed::Sealed for SetSubjectBlobs {} impl State for SetSubjectBlobs { - type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; - type SubjectBlobs = Set; - type Event = St::Event; type Id = St::Id; - type Subject = St::Subject; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData St>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { + type SubjectBlobs = Set; type CreatedBy = St::CreatedBy; - type CreatedAt = St::CreatedAt; - type SubjectBlobs = St::SubjectBlobs; - type Event = Set; - type Id = St::Id; type Subject = St::Subject; + type Event = St::Event; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type CreatedBy = St::CreatedBy; + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { type CreatedAt = St::CreatedAt; + type Id = St::Id; type SubjectBlobs = St::SubjectBlobs; - type Event = St::Event; - type Id = Set; + type CreatedBy = Set; type Subject = St::Subject; + type Event = St::Event; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; + type Id = St::Id; type SubjectBlobs = St::SubjectBlobs; + type CreatedBy = St::CreatedBy; + type Subject = Set; type Event = St::Event; + } + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData St>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type CreatedAt = St::CreatedAt; type Id = St::Id; - type Subject = Set; + type SubjectBlobs = St::SubjectBlobs; + type CreatedBy = St::CreatedBy; + type Subject = St::Subject; + type Event = 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 `subject_blobs` field - pub struct subject_blobs(()); - ///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_by` field + pub struct created_by(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `event` field + pub struct event(()); } } @@ -7972,12 +7972,12 @@ where impl ModEventViewDetailBuilder where St: mod_event_view_detail_state::State, - St::CreatedBy: mod_event_view_detail_state::IsSet, St::CreatedAt: mod_event_view_detail_state::IsSet, - St::SubjectBlobs: mod_event_view_detail_state::IsSet, - St::Event: mod_event_view_detail_state::IsSet, St::Id: mod_event_view_detail_state::IsSet, + St::SubjectBlobs: mod_event_view_detail_state::IsSet, + St::CreatedBy: mod_event_view_detail_state::IsSet, St::Subject: mod_event_view_detail_state::IsSet, + St::Event: mod_event_view_detail_state::IsSet, { /// Build the final struct. pub fn build(self) -> ModEventViewDetail { @@ -8020,37 +8020,37 @@ pub mod record_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Op; type Timestamp; + type Op; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Op = Unset; type Timestamp = Unset; - } - ///State transition - sets the `op` field to Set - pub struct SetOp(PhantomData St>); - impl sealed::Sealed for SetOp {} - impl State for SetOp { - type Op = Set; - type Timestamp = St::Timestamp; + type Op = Unset; } ///State transition - sets the `timestamp` field to Set pub struct SetTimestamp(PhantomData St>); impl sealed::Sealed for SetTimestamp {} impl State for SetTimestamp { - type Op = St::Op; type Timestamp = Set; + type Op = St::Op; + } + ///State transition - sets the `op` field to Set + pub struct SetOp(PhantomData St>); + impl sealed::Sealed for SetOp {} + impl State for SetOp { + type Timestamp = St::Timestamp; + type Op = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `op` field - pub struct op(()); ///Marker type for the `timestamp` field pub struct timestamp(()); + ///Marker type for the `op` field + pub struct op(()); } } @@ -8146,8 +8146,8 @@ where impl RecordEventBuilder where St: record_event_state::State, - St::Op: record_event_state::IsSet, St::Timestamp: record_event_state::IsSet, + St::Op: record_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecordEvent { @@ -8184,127 +8184,127 @@ pub mod record_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IndexedAt; + type Cid; + type Moderation; type Value; + type Uri; type Repo; type BlobCids; - type Moderation; - 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 Moderation = Unset; type Value = Unset; + type Uri = Unset; type Repo = Unset; type BlobCids = Unset; - type Moderation = Unset; - type Uri = Unset; - type Cid = Unset; - type IndexedAt = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Repo = St::Repo; - type BlobCids = St::BlobCids; - type Moderation = St::Moderation; - type Uri = St::Uri; + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData St>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Value = St::Value; - type Repo = Set; - type BlobCids = St::BlobCids; type Moderation = St::Moderation; - type Uri = St::Uri; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `blob_cids` field to Set - pub struct SetBlobCids(PhantomData St>); - impl sealed::Sealed for SetBlobCids {} - impl State for SetBlobCids { type Value = St::Value; + type Uri = St::Uri; type Repo = St::Repo; - type BlobCids = Set; + type BlobCids = St::BlobCids; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = St::IndexedAt; + type Cid = Set; type Moderation = St::Moderation; + type Value = St::Value; type Uri = St::Uri; - type Cid = St::Cid; - type IndexedAt = St::IndexedAt; + type Repo = St::Repo; + type BlobCids = St::BlobCids; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData St>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { + type IndexedAt = St::IndexedAt; + type Cid = St::Cid; + type Moderation = Set; type Value = St::Value; + type Uri = St::Uri; type Repo = St::Repo; type BlobCids = St::BlobCids; - type Moderation = Set; - type Uri = St::Uri; - type Cid = St::Cid; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type IndexedAt = St::IndexedAt; + type Cid = St::Cid; + type Moderation = St::Moderation; + type Value = Set; + type Uri = St::Uri; + type Repo = St::Repo; + type BlobCids = St::BlobCids; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Value = St::Value; - type Repo = St::Repo; - type BlobCids = St::BlobCids; - type Moderation = St::Moderation; - type Uri = Set; - type Cid = St::Cid; type IndexedAt = St::IndexedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Cid = St::Cid; + type Moderation = St::Moderation; type Value = St::Value; + type Uri = Set; type Repo = St::Repo; type BlobCids = St::BlobCids; - type Moderation = St::Moderation; - type Uri = St::Uri; - type Cid = Set; - type IndexedAt = St::IndexedAt; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData St>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type IndexedAt = St::IndexedAt; + type Cid = St::Cid; + type Moderation = St::Moderation; type Value = St::Value; - type Repo = St::Repo; + type Uri = St::Uri; + type Repo = Set; type BlobCids = St::BlobCids; + } + ///State transition - sets the `blob_cids` field to Set + pub struct SetBlobCids(PhantomData St>); + impl sealed::Sealed for SetBlobCids {} + impl State for SetBlobCids { + type IndexedAt = St::IndexedAt; + type Cid = St::Cid; type Moderation = St::Moderation; + type Value = St::Value; type Uri = St::Uri; - type Cid = St::Cid; - type IndexedAt = Set; + type Repo = St::Repo; + type BlobCids = 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 `moderation` field + pub struct moderation(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `blob_cids` field pub struct blob_cids(()); - ///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(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); } } @@ -8477,13 +8477,13 @@ where impl RecordViewBuilder where St: record_view_state::State, + St::IndexedAt: record_view_state::IsSet, + St::Cid: record_view_state::IsSet, + St::Moderation: record_view_state::IsSet, St::Value: record_view_state::IsSet, + St::Uri: record_view_state::IsSet, St::Repo: record_view_state::IsSet, St::BlobCids: record_view_state::IsSet, - St::Moderation: record_view_state::IsSet, - St::Uri: record_view_state::IsSet, - St::Cid: record_view_state::IsSet, - St::IndexedAt: record_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecordView { @@ -8526,127 +8526,127 @@ pub mod record_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; + type Cid; type Uri; - type Repo; - type Moderation; type Blobs; + type Repo; type IndexedAt; - type Cid; + type Moderation; + 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 Cid = Unset; type Uri = Unset; - type Repo = Unset; - type Moderation = Unset; type Blobs = Unset; + type Repo = Unset; type IndexedAt = Unset; - type Cid = Unset; + type Moderation = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; type Uri = St::Uri; - type Repo = St::Repo; - type Moderation = St::Moderation; type Blobs = St::Blobs; + type Repo = St::Repo; type IndexedAt = St::IndexedAt; - type Cid = St::Cid; + type Moderation = St::Moderation; + type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Value = St::Value; + type Cid = St::Cid; type Uri = Set; - type Repo = St::Repo; - type Moderation = St::Moderation; type Blobs = St::Blobs; + type Repo = St::Repo; type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Value = St::Value; - type Uri = St::Uri; - type Repo = Set; type Moderation = St::Moderation; - type Blobs = St::Blobs; - type IndexedAt = St::IndexedAt; - type Cid = St::Cid; - } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData St>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { type Value = St::Value; - type Uri = St::Uri; - type Repo = St::Repo; - type Moderation = Set; - type Blobs = St::Blobs; - type IndexedAt = St::IndexedAt; - type Cid = St::Cid; } ///State transition - sets the `blobs` field to Set pub struct SetBlobs(PhantomData St>); impl sealed::Sealed for SetBlobs {} impl State for SetBlobs { - type Value = St::Value; + type Cid = St::Cid; type Uri = St::Uri; - type Repo = St::Repo; - type Moderation = St::Moderation; type Blobs = Set; + type Repo = St::Repo; type IndexedAt = St::IndexedAt; + type Moderation = St::Moderation; + type Value = St::Value; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { type Cid = St::Cid; + type Uri = St::Uri; + type Blobs = St::Blobs; + type Repo = Set; + type IndexedAt = St::IndexedAt; + type Moderation = St::Moderation; + type Value = St::Value; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Value = St::Value; + type Cid = St::Cid; type Uri = St::Uri; - type Repo = St::Repo; - type Moderation = St::Moderation; type Blobs = St::Blobs; + type Repo = St::Repo; type IndexedAt = Set; - type Cid = St::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Moderation = St::Moderation; type Value = St::Value; + } + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData St>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { + type Cid = St::Cid; type Uri = St::Uri; + type Blobs = St::Blobs; type Repo = St::Repo; - type Moderation = St::Moderation; + type IndexedAt = St::IndexedAt; + type Moderation = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Cid = St::Cid; + type Uri = St::Uri; type Blobs = St::Blobs; + type Repo = St::Repo; type IndexedAt = St::IndexedAt; - type Cid = Set; + type Moderation = St::Moderation; + 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 `cid` field + pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `repo` field - pub struct repo(()); - ///Marker type for the `moderation` field - pub struct moderation(()); ///Marker type for the `blobs` field pub struct blobs(()); + ///Marker type for the `repo` field + pub struct repo(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `moderation` field + pub struct moderation(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -8833,13 +8833,13 @@ where impl RecordViewDetailBuilder where St: record_view_detail_state::State, - St::Value: record_view_detail_state::IsSet, + St::Cid: record_view_detail_state::IsSet, St::Uri: record_view_detail_state::IsSet, - St::Repo: record_view_detail_state::IsSet, - St::Moderation: record_view_detail_state::IsSet, St::Blobs: record_view_detail_state::IsSet, + St::Repo: record_view_detail_state::IsSet, St::IndexedAt: record_view_detail_state::IsSet, - St::Cid: record_view_detail_state::IsSet, + St::Moderation: record_view_detail_state::IsSet, + St::Value: record_view_detail_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecordViewDetail { @@ -8984,85 +8984,85 @@ pub mod repo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; + type Moderation; type IndexedAt; - type RelatedRecords; + type Did; type Handle; - type Moderation; + type RelatedRecords; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type IndexedAt = Unset; - type RelatedRecords = Unset; - type Handle = Unset; type Moderation = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + type IndexedAt = Unset; + type Did = Unset; + type Handle = Unset; + type RelatedRecords = Unset; + } + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData St>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { + type Moderation = Set; type IndexedAt = St::IndexedAt; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; type Handle = St::Handle; - type Moderation = St::Moderation; + type RelatedRecords = St::RelatedRecords; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Did = St::Did; + type Moderation = St::Moderation; type IndexedAt = Set; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; type Handle = St::Handle; - type Moderation = St::Moderation; + type RelatedRecords = St::RelatedRecords; } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData St>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { - type Did = St::Did; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Moderation = St::Moderation; type IndexedAt = St::IndexedAt; - type RelatedRecords = Set; + type Did = Set; type Handle = St::Handle; - type Moderation = St::Moderation; + type RelatedRecords = St::RelatedRecords; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = St::Did; + type Moderation = St::Moderation; type IndexedAt = St::IndexedAt; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; type Handle = Set; - type Moderation = St::Moderation; + type RelatedRecords = St::RelatedRecords; } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData St>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { - type Did = St::Did; + ///State transition - sets the `related_records` field to Set + pub struct SetRelatedRecords(PhantomData St>); + impl sealed::Sealed for SetRelatedRecords {} + impl State for SetRelatedRecords { + type Moderation = St::Moderation; type IndexedAt = St::IndexedAt; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; type Handle = St::Handle; - type Moderation = Set; + type RelatedRecords = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); + ///Marker type for the `moderation` field + pub struct moderation(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `related_records` field - pub struct related_records(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `moderation` field - pub struct moderation(()); + ///Marker type for the `related_records` field + pub struct related_records(()); } } @@ -9285,11 +9285,11 @@ impl RepoViewBuilder { impl RepoViewBuilder where St: repo_view_state::State, - St::Did: repo_view_state::IsSet, + St::Moderation: repo_view_state::IsSet, St::IndexedAt: repo_view_state::IsSet, - St::RelatedRecords: repo_view_state::IsSet, + St::Did: repo_view_state::IsSet, St::Handle: repo_view_state::IsSet, - St::Moderation: repo_view_state::IsSet, + St::RelatedRecords: repo_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RepoView { @@ -9338,84 +9338,84 @@ pub mod repo_view_detail_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Handle; + type RelatedRecords; type Moderation; - type Did; type IndexedAt; - type RelatedRecords; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Handle = Unset; + type RelatedRecords = Unset; type Moderation = Unset; - type Did = Unset; type IndexedAt = Unset; - type RelatedRecords = Unset; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Handle = Set; + type RelatedRecords = St::RelatedRecords; type Moderation = St::Moderation; + type IndexedAt = St::IndexedAt; type Did = St::Did; + } + ///State transition - sets the `related_records` field to Set + pub struct SetRelatedRecords(PhantomData St>); + impl sealed::Sealed for SetRelatedRecords {} + impl State for SetRelatedRecords { + type Handle = St::Handle; + type RelatedRecords = Set; + type Moderation = St::Moderation; type IndexedAt = St::IndexedAt; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData St>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { type Handle = St::Handle; - type Moderation = Set; - type Did = St::Did; - type IndexedAt = St::IndexedAt; type RelatedRecords = St::RelatedRecords; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Handle = St::Handle; - type Moderation = St::Moderation; - type Did = Set; + type Moderation = Set; type IndexedAt = St::IndexedAt; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData St>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Handle = St::Handle; + type RelatedRecords = St::RelatedRecords; type Moderation = St::Moderation; - type Did = St::Did; type IndexedAt = Set; - type RelatedRecords = St::RelatedRecords; + type Did = St::Did; } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData St>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { type Handle = St::Handle; + type RelatedRecords = St::RelatedRecords; type Moderation = St::Moderation; - type Did = St::Did; type IndexedAt = St::IndexedAt; - type RelatedRecords = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `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 `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `related_records` field - pub struct related_records(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -9696,10 +9696,10 @@ impl RepoViewDetailBuilder where St: repo_view_detail_state::State, St::Handle: repo_view_detail_state::IsSet, + St::RelatedRecords: repo_view_detail_state::IsSet, St::Moderation: repo_view_detail_state::IsSet, - St::Did: repo_view_detail_state::IsSet, St::IndexedAt: repo_view_detail_state::IsSet, - St::RelatedRecords: repo_view_detail_state::IsSet, + St::Did: repo_view_detail_state::IsSet, { /// Build the final struct. pub fn build(self) -> RepoViewDetail { @@ -9857,176 +9857,176 @@ pub mod reporter_stats_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type LabeledRecordCount; - type RecordReportCount; + type LabeledAccountCount; type ReportedRecordCount; type TakendownAccountCount; - type LabeledAccountCount; + type RecordReportCount; type AccountReportCount; - type ReportedAccountCount; type TakendownRecordCount; + type LabeledRecordCount; + type ReportedAccountCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type LabeledRecordCount = Unset; - type RecordReportCount = Unset; + type LabeledAccountCount = Unset; type ReportedRecordCount = Unset; type TakendownAccountCount = Unset; - type LabeledAccountCount = Unset; + type RecordReportCount = Unset; type AccountReportCount = Unset; - type ReportedAccountCount = Unset; type TakendownRecordCount = Unset; + type LabeledRecordCount = Unset; + type ReportedAccountCount = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; } - ///State transition - sets the `labeled_record_count` field to Set - pub struct SetLabeledRecordCount(PhantomData St>); - impl sealed::Sealed for SetLabeledRecordCount {} - impl State for SetLabeledRecordCount { + ///State transition - sets the `labeled_account_count` field to Set + pub struct SetLabeledAccountCount(PhantomData St>); + impl sealed::Sealed for SetLabeledAccountCount {} + impl State for SetLabeledAccountCount { type Did = St::Did; - type LabeledRecordCount = Set; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = Set; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; - } - ///State transition - sets the `record_report_count` field to Set - pub struct SetRecordReportCount(PhantomData St>); - impl sealed::Sealed for SetRecordReportCount {} - impl State for SetRecordReportCount { - type Did = St::Did; type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = Set; - type ReportedRecordCount = St::ReportedRecordCount; - type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; - type AccountReportCount = St::AccountReportCount; type ReportedAccountCount = St::ReportedAccountCount; - type TakendownRecordCount = St::TakendownRecordCount; } ///State transition - sets the `reported_record_count` field to Set pub struct SetReportedRecordCount(PhantomData St>); impl sealed::Sealed for SetReportedRecordCount {} impl State for SetReportedRecordCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = Set; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; } ///State transition - sets the `takendown_account_count` field to Set pub struct SetTakendownAccountCount(PhantomData St>); impl sealed::Sealed for SetTakendownAccountCount {} impl State for SetTakendownAccountCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = Set; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; } - ///State transition - sets the `labeled_account_count` field to Set - pub struct SetLabeledAccountCount(PhantomData St>); - impl sealed::Sealed for SetLabeledAccountCount {} - impl State for SetLabeledAccountCount { + ///State transition - sets the `record_report_count` field to Set + pub struct SetRecordReportCount(PhantomData St>); + impl sealed::Sealed for SetRecordReportCount {} + impl State for SetRecordReportCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = Set; + type RecordReportCount = Set; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; } ///State transition - sets the `account_report_count` field to Set pub struct SetAccountReportCount(PhantomData St>); impl sealed::Sealed for SetAccountReportCount {} impl State for SetAccountReportCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = Set; - type ReportedAccountCount = St::ReportedAccountCount; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; } - ///State transition - sets the `reported_account_count` field to Set - pub struct SetReportedAccountCount(PhantomData St>); - impl sealed::Sealed for SetReportedAccountCount {} - impl State for SetReportedAccountCount { + ///State transition - sets the `takendown_record_count` field to Set + pub struct SetTakendownRecordCount(PhantomData St>); + impl sealed::Sealed for SetTakendownRecordCount {} + impl State for SetTakendownRecordCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; + type RecordReportCount = St::RecordReportCount; + type AccountReportCount = St::AccountReportCount; + type TakendownRecordCount = Set; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = St::ReportedAccountCount; + } + ///State transition - sets the `labeled_record_count` field to Set + pub struct SetLabeledRecordCount(PhantomData St>); + impl sealed::Sealed for SetLabeledRecordCount {} + impl State for SetLabeledRecordCount { + type Did = St::Did; type LabeledAccountCount = St::LabeledAccountCount; + type ReportedRecordCount = St::ReportedRecordCount; + type TakendownAccountCount = St::TakendownAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = Set; type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = Set; + type ReportedAccountCount = St::ReportedAccountCount; } - ///State transition - sets the `takendown_record_count` field to Set - pub struct SetTakendownRecordCount(PhantomData St>); - impl sealed::Sealed for SetTakendownRecordCount {} - impl State for SetTakendownRecordCount { + ///State transition - sets the `reported_account_count` field to Set + pub struct SetReportedAccountCount(PhantomData St>); + impl sealed::Sealed for SetReportedAccountCount {} + impl State for SetReportedAccountCount { type Did = St::Did; - type LabeledRecordCount = St::LabeledRecordCount; - type RecordReportCount = St::RecordReportCount; + type LabeledAccountCount = St::LabeledAccountCount; type ReportedRecordCount = St::ReportedRecordCount; type TakendownAccountCount = St::TakendownAccountCount; - type LabeledAccountCount = St::LabeledAccountCount; + type RecordReportCount = St::RecordReportCount; type AccountReportCount = St::AccountReportCount; - type ReportedAccountCount = St::ReportedAccountCount; - type TakendownRecordCount = Set; + type TakendownRecordCount = St::TakendownRecordCount; + type LabeledRecordCount = St::LabeledRecordCount; + type ReportedAccountCount = 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 `labeled_record_count` field - pub struct labeled_record_count(()); - ///Marker type for the `record_report_count` field - pub struct record_report_count(()); + ///Marker type for the `labeled_account_count` field + pub struct labeled_account_count(()); ///Marker type for the `reported_record_count` field pub struct reported_record_count(()); ///Marker type for the `takendown_account_count` field pub struct takendown_account_count(()); - ///Marker type for the `labeled_account_count` field - pub struct labeled_account_count(()); + ///Marker type for the `record_report_count` field + pub struct record_report_count(()); ///Marker type for the `account_report_count` field pub struct account_report_count(()); - ///Marker type for the `reported_account_count` field - pub struct reported_account_count(()); ///Marker type for the `takendown_record_count` field pub struct takendown_record_count(()); + ///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(()); } } @@ -10240,14 +10240,14 @@ impl ReporterStatsBuilder where St: reporter_stats_state::State, St::Did: reporter_stats_state::IsSet, - St::LabeledRecordCount: reporter_stats_state::IsSet, - St::RecordReportCount: reporter_stats_state::IsSet, + St::LabeledAccountCount: reporter_stats_state::IsSet, St::ReportedRecordCount: reporter_stats_state::IsSet, St::TakendownAccountCount: reporter_stats_state::IsSet, - St::LabeledAccountCount: reporter_stats_state::IsSet, + St::RecordReportCount: reporter_stats_state::IsSet, St::AccountReportCount: reporter_stats_state::IsSet, - St::ReportedAccountCount: reporter_stats_state::IsSet, St::TakendownRecordCount: reporter_stats_state::IsSet, + St::LabeledRecordCount: reporter_stats_state::IsSet, + St::ReportedAccountCount: reporter_stats_state::IsSet, { /// Build the final struct. pub fn build(self) -> ReporterStats { @@ -10294,105 +10294,105 @@ pub mod scheduled_action_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; + type Did; type Id; + type Status; type Action; + type CreatedBy; type CreatedAt; - type Status; - type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedBy = Unset; + type Did = Unset; type Id = Unset; + type Status = Unset; type Action = Unset; + type CreatedBy = Unset; type CreatedAt = Unset; - type Status = Unset; - type Did = Unset; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Id = St::Id; + type Status = St::Status; type Action = St::Action; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; - type Status = St::Status; - type Did = St::Did; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type CreatedBy = St::CreatedBy; + type Did = St::Did; type Id = Set; + type Status = St::Status; type Action = St::Action; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; - type Status = St::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData St>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { type Did = St::Did; + type Id = St::Id; + type Status = Set; + type Action = St::Action; + type CreatedBy = St::CreatedBy; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData St>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type CreatedBy = St::CreatedBy; + type Did = St::Did; type Id = St::Id; + type Status = St::Status; type Action = Set; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; - type Status = St::Status; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { type Did = St::Did; + type Id = St::Id; + type Status = St::Status; + type Action = St::Action; + type CreatedBy = Set; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedBy = St::CreatedBy; - type Id = St::Id; - type Action = St::Action; - type CreatedAt = Set; - type Status = St::Status; type Did = St::Did; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData St>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type CreatedBy = St::CreatedBy; type Id = St::Id; + type Status = St::Status; type Action = St::Action; - type CreatedAt = St::CreatedAt; - type Status = Set; - type Did = St::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type CreatedBy = St::CreatedBy; - type Id = St::Id; - type Action = St::Action; - type CreatedAt = St::CreatedAt; - type Status = St::Status; - type Did = Set; + type CreatedAt = 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 `did` field + pub struct did(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `status` field + pub struct status(()); ///Marker type for the `action` field pub struct action(()); + ///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 `did` field - pub struct did(()); } } @@ -10717,12 +10717,12 @@ impl< impl ScheduledActionViewBuilder where St: scheduled_action_view_state::State, - St::CreatedBy: scheduled_action_view_state::IsSet, + St::Did: scheduled_action_view_state::IsSet, St::Id: scheduled_action_view_state::IsSet, + St::Status: scheduled_action_view_state::IsSet, St::Action: scheduled_action_view_state::IsSet, + St::CreatedBy: scheduled_action_view_state::IsSet, St::CreatedAt: scheduled_action_view_state::IsSet, - St::Status: scheduled_action_view_state::IsSet, - St::Did: scheduled_action_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScheduledActionView { @@ -10781,85 +10781,85 @@ pub mod subject_status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type ReviewState; type Subject; type Id; - type UpdatedAt; type CreatedAt; - type ReviewState; + type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type ReviewState = Unset; type Subject = Unset; type Id = Unset; - type UpdatedAt = Unset; type CreatedAt = Unset; - type ReviewState = Unset; + type UpdatedAt = Unset; + } + ///State transition - sets the `review_state` field to Set + pub struct SetReviewState(PhantomData St>); + impl sealed::Sealed for SetReviewState {} + impl State for SetReviewState { + type ReviewState = Set; + type Subject = St::Subject; + type Id = St::Id; + type CreatedAt = St::CreatedAt; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type ReviewState = St::ReviewState; type Subject = Set; type Id = St::Id; - type UpdatedAt = St::UpdatedAt; type CreatedAt = St::CreatedAt; - type ReviewState = St::ReviewState; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Subject = St::Subject; - type Id = Set; - type UpdatedAt = St::UpdatedAt; - type CreatedAt = St::CreatedAt; type ReviewState = St::ReviewState; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { type Subject = St::Subject; - type Id = St::Id; - type UpdatedAt = Set; + type Id = Set; type CreatedAt = St::CreatedAt; - type ReviewState = St::ReviewState; + type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type ReviewState = St::ReviewState; type Subject = St::Subject; type Id = St::Id; - type UpdatedAt = St::UpdatedAt; type CreatedAt = Set; - type ReviewState = St::ReviewState; + type UpdatedAt = St::UpdatedAt; } - ///State transition - sets the `review_state` field to Set - pub struct SetReviewState(PhantomData St>); - impl sealed::Sealed for SetReviewState {} - impl State for SetReviewState { + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type ReviewState = St::ReviewState; type Subject = St::Subject; type Id = St::Id; - type UpdatedAt = St::UpdatedAt; type CreatedAt = St::CreatedAt; - type ReviewState = Set; + type UpdatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `review_state` field + pub struct review_state(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `id` field pub struct id(()); - ///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 `review_state` field - pub struct review_state(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); } } @@ -11331,11 +11331,11 @@ where impl SubjectStatusViewBuilder where St: subject_status_view_state::State, + St::ReviewState: subject_status_view_state::IsSet, St::Subject: subject_status_view_state::IsSet, St::Id: subject_status_view_state::IsSet, - St::UpdatedAt: subject_status_view_state::IsSet, St::CreatedAt: subject_status_view_state::IsSet, - St::ReviewState: subject_status_view_state::IsSet, + St::UpdatedAt: subject_status_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SubjectStatusView { @@ -11414,37 +11414,37 @@ pub mod subject_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Type; + 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 Type = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Type = St::Type; + type Subject = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData St>); impl sealed::Sealed for SetType {} impl State for SetType { - type Subject = St::Subject; type Type = Set; + type Subject = St::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Type = St::Type; + 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 `type` field pub struct r#type(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -11588,8 +11588,8 @@ where impl SubjectViewBuilder where St: subject_view_state::State, - St::Subject: subject_view_state::IsSet, St::Type: subject_view_state::IsSet, + St::Subject: subject_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SubjectView { @@ -11630,49 +11630,49 @@ pub mod video_details_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Height; type Width; + type Height; type Length; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Height = Unset; type Width = Unset; + type Height = Unset; type Length = Unset; } - ///State transition - sets the `height` field to Set - pub struct SetHeight(PhantomData St>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = St::Width; - type Length = St::Length; - } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData St>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = St::Height; type Width = Set; + type Height = St::Height; + type Length = St::Length; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData St>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = St::Width; + type Height = Set; type Length = St::Length; } ///State transition - sets the `length` field to Set pub struct SetLength(PhantomData St>); impl sealed::Sealed for SetLength {} impl State for SetLength { - type Height = St::Height; type Width = St::Width; + type Height = St::Height; type Length = 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(()); ///Marker type for the `length` field pub struct length(()); } @@ -11763,8 +11763,8 @@ where impl VideoDetailsBuilder where St: video_details_state::State, - St::Height: video_details_state::IsSet, St::Width: video_details_state::IsSet, + St::Height: video_details_state::IsSet, St::Length: video_details_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs b/crates/jacquard-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs index abd9d931b..cec98bfb5 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs @@ -417,37 +417,37 @@ pub mod failed_cancellation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Error; type Did; + 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 Did = Unset; - } - ///State transition - sets the `error` field to Set - pub struct SetError(PhantomData St>); - impl sealed::Sealed for SetError {} - impl State for SetError { - type Error = Set; - type Did = St::Did; + type Error = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Error = St::Error; type Did = Set; + type Error = St::Error; + } + ///State transition - sets the `error` field to Set + pub struct SetError(PhantomData St>); + impl sealed::Sealed for SetError {} + impl State for SetError { + type Did = St::Did; + 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 `did` field pub struct did(()); + ///Marker type for the `error` field + pub struct error(()); } } @@ -530,8 +530,8 @@ impl FailedCancellationBuilder< impl FailedCancellationBuilder where St: failed_cancellation_state::State, - St::Error: failed_cancellation_state::IsSet, St::Did: failed_cancellation_state::IsSet, + St::Error: failed_cancellation_state::IsSet, { /// Build the final struct. pub fn build(self) -> FailedCancellation { diff --git a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs index 93656ec33..eaebc36d2 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/emit_event.rs @@ -231,51 +231,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 St>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type Event = Set; + type Subject = St::Subject; + type CreatedBy = St::CreatedBy; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type Event = St::Event; type Subject = Set; type CreatedBy = St::CreatedBy; - type Event = St::Event; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData St>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Subject = St::Subject; - type CreatedBy = Set; type Event = St::Event; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData St>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { type Subject = St::Subject; - type CreatedBy = St::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(()); } } @@ -410,9 +410,9 @@ impl EmitEventBuilder { impl EmitEventBuilder where St: emit_event_state::State, + St::Event: emit_event_state::IsSet, St::Subject: emit_event_state::IsSet, St::CreatedBy: emit_event_state::IsSet, - St::Event: emit_event_state::IsSet, { /// Build the final struct. pub fn build(self) -> EmitEvent { diff --git a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs index 2e0a55ac0..f35c872d6 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -671,37 +671,37 @@ pub mod timeline_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Day; type Summary; + type Day; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Day = Unset; type Summary = Unset; - } - ///State transition - sets the `day` field to Set - pub struct SetDay(PhantomData St>); - impl sealed::Sealed for SetDay {} - impl State for SetDay { - type Day = Set; - type Summary = St::Summary; + type Day = Unset; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData St>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { - type Day = St::Day; type Summary = Set; + type Day = St::Day; + } + ///State transition - sets the `day` field to Set + pub struct SetDay(PhantomData St>); + impl sealed::Sealed for SetDay {} + impl State for SetDay { + type Summary = St::Summary; + type Day = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `day` field - pub struct day(()); ///Marker type for the `summary` field pub struct summary(()); + ///Marker type for the `day` field + pub struct day(()); } } @@ -771,8 +771,8 @@ where impl TimelineItemBuilder where St: timeline_item_state::State, - St::Day: timeline_item_state::IsSet, St::Summary: timeline_item_state::IsSet, + St::Day: timeline_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> TimelineItem { @@ -905,51 +905,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 St>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { - type Count = Set; - type EventSubjectType = St::EventSubjectType; - type EventType = St::EventType; + type Count = Unset; } ///State transition - sets the `event_subject_type` field to Set pub struct SetEventSubjectType(PhantomData St>); impl sealed::Sealed for SetEventSubjectType {} impl State for SetEventSubjectType { - type Count = St::Count; type EventSubjectType = Set; type EventType = St::EventType; + type Count = St::Count; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData St>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type Count = St::Count; type EventSubjectType = St::EventSubjectType; type EventType = Set; + type Count = St::Count; + } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData St>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { + type EventSubjectType = St::EventSubjectType; + type EventType = St::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(()); } } @@ -1048,9 +1048,9 @@ where impl TimelineItemSummaryBuilder where St: timeline_item_summary_state::State, - St::Count: timeline_item_summary_state::IsSet, St::EventSubjectType: timeline_item_summary_state::IsSet, St::EventType: timeline_item_summary_state::IsSet, + St::Count: timeline_item_summary_state::IsSet, { /// Build the final struct. pub fn build(self) -> TimelineItemSummary { diff --git a/crates/jacquard-api/src/tools_ozone/moderation/schedule_action.rs b/crates/jacquard-api/src/tools_ozone/moderation/schedule_action.rs index 111d29a6f..f71738966 100644 --- a/crates/jacquard-api/src/tools_ozone/moderation/schedule_action.rs +++ b/crates/jacquard-api/src/tools_ozone/moderation/schedule_action.rs @@ -686,67 +686,67 @@ pub mod schedule_action_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subjects; + type Action; type CreatedBy; type Scheduling; - type Action; - type Subjects; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Subjects = Unset; + type Action = Unset; type CreatedBy = Unset; type Scheduling = Unset; - type Action = Unset; - type Subjects = Unset; + } + ///State transition - sets the `subjects` field to Set + pub struct SetSubjects(PhantomData St>); + impl sealed::Sealed for SetSubjects {} + impl State for SetSubjects { + type Subjects = Set; + type Action = St::Action; + type CreatedBy = St::CreatedBy; + type Scheduling = St::Scheduling; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData St>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Subjects = St::Subjects; + type Action = Set; + type CreatedBy = St::CreatedBy; + type Scheduling = St::Scheduling; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData St>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { + type Subjects = St::Subjects; + type Action = St::Action; type CreatedBy = Set; type Scheduling = St::Scheduling; - type Action = St::Action; - type Subjects = St::Subjects; } ///State transition - sets the `scheduling` field to Set pub struct SetScheduling(PhantomData St>); impl sealed::Sealed for SetScheduling {} impl State for SetScheduling { - type CreatedBy = St::CreatedBy; - type Scheduling = Set; - type Action = St::Action; - type Subjects = St::Subjects; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData St>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type CreatedBy = St::CreatedBy; - type Scheduling = St::Scheduling; - type Action = Set; type Subjects = St::Subjects; - } - ///State transition - sets the `subjects` field to Set - pub struct SetSubjects(PhantomData St>); - impl sealed::Sealed for SetSubjects {} - impl State for SetSubjects { - type CreatedBy = St::CreatedBy; - type Scheduling = St::Scheduling; type Action = St::Action; - type Subjects = Set; + type CreatedBy = St::CreatedBy; + type Scheduling = 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 `action` field + pub struct action(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `scheduling` field pub struct scheduling(()); - ///Marker type for the `action` field - pub struct action(()); - ///Marker type for the `subjects` field - pub struct subjects(()); } } @@ -873,10 +873,10 @@ where impl ScheduleActionBuilder where St: schedule_action_state::State, + St::Subjects: schedule_action_state::IsSet, + St::Action: schedule_action_state::IsSet, St::CreatedBy: schedule_action_state::IsSet, St::Scheduling: schedule_action_state::IsSet, - St::Action: schedule_action_state::IsSet, - St::Subjects: schedule_action_state::IsSet, { /// Build the final struct. pub fn build(self) -> ScheduleAction { diff --git a/crates/jacquard-api/src/tools_ozone/safelink.rs b/crates/jacquard-api/src/tools_ozone/safelink.rs index e54fdf63b..9f2a8b268 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink.rs @@ -422,151 +422,151 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; - type CreatedAt; type Pattern; - type Url; - type CreatedBy; - type Action; type Reason; type EventType; + type CreatedAt; + type Action; + type CreatedBy; + type Url; + type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; - type CreatedAt = Unset; type Pattern = Unset; - type Url = Unset; - type CreatedBy = Unset; - type Action = Unset; type Reason = Unset; type EventType = Unset; + type CreatedAt = Unset; + type Action = Unset; + type CreatedBy = Unset; + type Url = Unset; + type Id = Unset; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData St>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; + ///State transition - sets the `pattern` field to Set + pub struct SetPattern(PhantomData St>); + impl sealed::Sealed for SetPattern {} + impl State for SetPattern { + type Pattern = Set; + type Reason = St::Reason; + type EventType = St::EventType; type CreatedAt = St::CreatedAt; - type Pattern = St::Pattern; - type Url = St::Url; + type Action = St::Action; type CreatedBy = St::CreatedBy; + type Url = St::Url; + type Id = St::Id; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Pattern = St::Pattern; + type Reason = Set; + type EventType = St::EventType; + type CreatedAt = St::CreatedAt; type Action = St::Action; + type CreatedBy = St::CreatedBy; + type Url = St::Url; + type Id = St::Id; + } + ///State transition - sets the `event_type` field to Set + pub struct SetEventType(PhantomData St>); + impl sealed::Sealed for SetEventType {} + impl State for SetEventType { + type Pattern = St::Pattern; type Reason = St::Reason; - type EventType = St::EventType; + type EventType = Set; + type CreatedAt = St::CreatedAt; + type Action = St::Action; + type CreatedBy = St::CreatedBy; + type Url = St::Url; + type Id = St::Id; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Id = St::Id; - type CreatedAt = Set; type Pattern = St::Pattern; - type Url = St::Url; - type CreatedBy = St::CreatedBy; - type Action = St::Action; type Reason = St::Reason; type EventType = St::EventType; - } - ///State transition - sets the `pattern` field to Set - pub struct SetPattern(PhantomData St>); - impl sealed::Sealed for SetPattern {} - impl State for SetPattern { - type Id = St::Id; - type CreatedAt = St::CreatedAt; - type Pattern = Set; - type Url = St::Url; - type CreatedBy = St::CreatedBy; + type CreatedAt = Set; type Action = St::Action; - type Reason = St::Reason; - type EventType = St::EventType; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { + type CreatedBy = St::CreatedBy; + type Url = St::Url; type Id = St::Id; - type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData St>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type Pattern = St::Pattern; - type Url = Set; - type CreatedBy = St::CreatedBy; - type Action = St::Action; type Reason = St::Reason; type EventType = St::EventType; + type CreatedAt = St::CreatedAt; + type Action = Set; + type CreatedBy = St::CreatedBy; + type Url = St::Url; + type Id = St::Id; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData St>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Id = St::Id; - type CreatedAt = St::CreatedAt; type Pattern = St::Pattern; - type Url = St::Url; - type CreatedBy = Set; - type Action = St::Action; type Reason = St::Reason; type EventType = St::EventType; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData St>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Id = St::Id; type CreatedAt = St::CreatedAt; - type Pattern = St::Pattern; + type Action = St::Action; + type CreatedBy = Set; type Url = St::Url; - type CreatedBy = St::CreatedBy; - type Action = Set; + type Id = St::Id; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Pattern = St::Pattern; type Reason = St::Reason; type EventType = St::EventType; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Id = St::Id; type CreatedAt = St::CreatedAt; - type Pattern = St::Pattern; - type Url = St::Url; - type CreatedBy = St::CreatedBy; type Action = St::Action; - type Reason = Set; - type EventType = St::EventType; - } - ///State transition - sets the `event_type` field to Set - pub struct SetEventType(PhantomData St>); - impl sealed::Sealed for SetEventType {} - impl State for SetEventType { + type CreatedBy = St::CreatedBy; + type Url = Set; type Id = St::Id; - type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData St>); + impl sealed::Sealed for SetId {} + impl State for SetId { type Pattern = St::Pattern; - type Url = St::Url; - type CreatedBy = St::CreatedBy; - type Action = St::Action; type Reason = St::Reason; - type EventType = Set; + type EventType = St::EventType; + type CreatedAt = St::CreatedAt; + type Action = St::Action; + type CreatedBy = St::CreatedBy; + type Url = St::Url; + type Id = 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_at` field - pub struct created_at(()); ///Marker type for the `pattern` field pub struct pattern(()); - ///Marker type for the `url` field - pub struct url(()); - ///Marker type for the `created_by` field - pub struct created_by(()); - ///Marker type for the `action` field - pub struct action(()); ///Marker type for the `reason` field pub struct reason(()); ///Marker type for the `event_type` field pub struct event_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `action` field + pub struct action(()); + ///Marker type for the `created_by` field + pub struct created_by(()); + ///Marker type for the `url` field + pub struct url(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -773,14 +773,14 @@ where impl EventBuilder where St: event_state::State, - St::Id: event_state::IsSet, - St::CreatedAt: event_state::IsSet, St::Pattern: event_state::IsSet, - St::Url: event_state::IsSet, - St::CreatedBy: event_state::IsSet, - St::Action: event_state::IsSet, St::Reason: event_state::IsSet, St::EventType: event_state::IsSet, + St::CreatedAt: event_state::IsSet, + St::Action: event_state::IsSet, + St::CreatedBy: event_state::IsSet, + St::Url: event_state::IsSet, + St::Id: event_state::IsSet, { /// Build the final struct. pub fn build(self) -> Event { @@ -1042,127 +1042,127 @@ pub mod url_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; - type Url; type Pattern; type Action; type UpdatedAt; - type Reason; + type Url; + type CreatedBy; type CreatedAt; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedBy = Unset; - type Url = Unset; type Pattern = Unset; type Action = Unset; type UpdatedAt = Unset; - type Reason = Unset; + type Url = Unset; + type CreatedBy = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; - type Url = St::Url; - type Pattern = St::Pattern; - type Action = St::Action; - type UpdatedAt = St::UpdatedAt; - type Reason = St::Reason; - type CreatedAt = St::CreatedAt; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type CreatedBy = St::CreatedBy; - type Url = Set; - type Pattern = St::Pattern; - type Action = St::Action; - type UpdatedAt = St::UpdatedAt; - type Reason = St::Reason; - type CreatedAt = St::CreatedAt; + type Reason = Unset; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData St>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type CreatedBy = St::CreatedBy; - type Url = St::Url; type Pattern = Set; type Action = St::Action; type UpdatedAt = St::UpdatedAt; - type Reason = St::Reason; + type Url = St::Url; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; + type Reason = St::Reason; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData St>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type CreatedBy = St::CreatedBy; - type Url = St::Url; type Pattern = St::Pattern; type Action = Set; type UpdatedAt = St::UpdatedAt; - type Reason = St::Reason; + type Url = St::Url; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; + type Reason = St::Reason; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData St>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type CreatedBy = St::CreatedBy; - type Url = St::Url; type Pattern = St::Pattern; type Action = St::Action; type UpdatedAt = Set; - type Reason = St::Reason; + type Url = St::Url; + type CreatedBy = St::CreatedBy; type CreatedAt = St::CreatedAt; + type Reason = St::Reason; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Pattern = St::Pattern; + type Action = St::Action; + type UpdatedAt = St::UpdatedAt; + type Url = Set; type CreatedBy = St::CreatedBy; - type Url = St::Url; + type CreatedAt = St::CreatedAt; + type Reason = St::Reason; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { type Pattern = St::Pattern; type Action = St::Action; type UpdatedAt = St::UpdatedAt; - type Reason = Set; + type Url = St::Url; + type CreatedBy = Set; type CreatedAt = St::CreatedAt; + type Reason = St::Reason; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedBy = St::CreatedBy; - type Url = St::Url; type Pattern = St::Pattern; type Action = St::Action; type UpdatedAt = St::UpdatedAt; - type Reason = St::Reason; + type Url = St::Url; + type CreatedBy = St::CreatedBy; type CreatedAt = Set; + type Reason = St::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Pattern = St::Pattern; + type Action = St::Action; + type UpdatedAt = St::UpdatedAt; + type Url = St::Url; + type CreatedBy = St::CreatedBy; + type CreatedAt = St::CreatedAt; + type Reason = 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 `url` field - pub struct url(()); ///Marker type for the `pattern` field pub struct pattern(()); ///Marker type for the `action` field pub struct action(()); ///Marker type for the `updated_at` field pub struct updated_at(()); - ///Marker type for the `reason` field - pub struct reason(()); + ///Marker type for the `url` field + pub struct url(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -1349,13 +1349,13 @@ where impl UrlRuleBuilder where St: url_rule_state::State, - St::CreatedBy: url_rule_state::IsSet, - St::Url: url_rule_state::IsSet, St::Pattern: url_rule_state::IsSet, St::Action: url_rule_state::IsSet, St::UpdatedAt: url_rule_state::IsSet, - St::Reason: url_rule_state::IsSet, + St::Url: url_rule_state::IsSet, + St::CreatedBy: url_rule_state::IsSet, St::CreatedAt: url_rule_state::IsSet, + St::Reason: url_rule_state::IsSet, { /// Build the final struct. pub fn build(self) -> UrlRule { diff --git a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs index eb9384655..66f135eea 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/add_rule.rs @@ -140,67 +140,67 @@ pub mod add_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; type Action; - type Url; type Pattern; + type Url; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; type Action = Unset; - type Url = Unset; type Pattern = Unset; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData St>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type Action = St::Action; - type Url = St::Url; - type Pattern = St::Pattern; + type Url = Unset; + type Reason = Unset; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData St>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type Reason = St::Reason; type Action = Set; - type Url = St::Url; type Pattern = St::Pattern; + type Url = St::Url; + type Reason = St::Reason; + } + ///State transition - sets the `pattern` field to Set + pub struct SetPattern(PhantomData St>); + impl sealed::Sealed for SetPattern {} + impl State for SetPattern { + type Action = St::Action; + type Pattern = Set; + type Url = St::Url; + type Reason = St::Reason; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Reason = St::Reason; type Action = St::Action; - type Url = Set; type Pattern = St::Pattern; - } - ///State transition - sets the `pattern` field to Set - pub struct SetPattern(PhantomData St>); - impl sealed::Sealed for SetPattern {} - impl State for SetPattern { + type Url = Set; type Reason = St::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData St>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { type Action = St::Action; + type Pattern = St::Pattern; type Url = St::Url; - type Pattern = Set; + type Reason = 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 `action` field pub struct action(()); - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `pattern` field pub struct pattern(()); + ///Marker type for the `url` field + pub struct url(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -341,10 +341,10 @@ where impl AddRuleBuilder where St: add_rule_state::State, - St::Reason: add_rule_state::IsSet, St::Action: add_rule_state::IsSet, - St::Url: add_rule_state::IsSet, St::Pattern: add_rule_state::IsSet, + St::Url: add_rule_state::IsSet, + St::Reason: add_rule_state::IsSet, { /// Build the final struct. pub fn build(self) -> AddRule { diff --git a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs index 2624cad82..9635f79b3 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/remove_rule.rs @@ -126,37 +126,37 @@ pub mod remove_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Pattern; + 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 Pattern = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData St>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Pattern = St::Pattern; + type Url = Unset; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData St>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Url = St::Url; type Pattern = Set; + type Url = St::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData St>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Pattern = St::Pattern; + 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 `pattern` field pub struct pattern(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -252,8 +252,8 @@ where impl RemoveRuleBuilder where St: remove_rule_state::State, - St::Url: remove_rule_state::IsSet, St::Pattern: remove_rule_state::IsSet, + St::Url: remove_rule_state::IsSet, { /// Build the final struct. pub fn build(self) -> RemoveRule { diff --git a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs index 83965470e..35773be22 100644 --- a/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/jacquard-api/src/tools_ozone/safelink/update_rule.rs @@ -131,66 +131,66 @@ pub mod update_rule_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Url; + type Pattern; type Reason; type 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 Pattern = Unset; type Reason = Unset; type Action = Unset; - type Pattern = Unset; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData St>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { type Url = Set; + type Pattern = St::Pattern; + type Reason = St::Reason; + type Action = St::Action; + } + ///State transition - sets the `pattern` field to Set + pub struct SetPattern(PhantomData St>); + impl sealed::Sealed for SetPattern {} + impl State for SetPattern { + type Url = St::Url; + type Pattern = Set; type Reason = St::Reason; type Action = St::Action; - type Pattern = St::Pattern; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData St>); impl sealed::Sealed for SetReason {} impl State for SetReason { type Url = St::Url; + type Pattern = St::Pattern; type Reason = Set; type Action = St::Action; - type Pattern = St::Pattern; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData St>); impl sealed::Sealed for SetAction {} impl State for SetAction { type Url = St::Url; - type Reason = St::Reason; - type Action = Set; type Pattern = St::Pattern; - } - ///State transition - sets the `pattern` field to Set - pub struct SetPattern(PhantomData St>); - impl sealed::Sealed for SetPattern {} - impl State for SetPattern { - type Url = St::Url; type Reason = St::Reason; - type Action = St::Action; - type Pattern = Set; + type Action = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `pattern` field + pub struct pattern(()); ///Marker type for the `reason` field pub struct reason(()); ///Marker type for the `action` field pub struct action(()); - ///Marker type for the `pattern` field - pub struct pattern(()); } } @@ -332,9 +332,9 @@ impl UpdateRuleBuilder where St: update_rule_state::State, St::Url: update_rule_state::IsSet, + St::Pattern: update_rule_state::IsSet, St::Reason: update_rule_state::IsSet, St::Action: update_rule_state::IsSet, - St::Pattern: update_rule_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpdateRule { diff --git a/crates/jacquard-api/src/tools_ozone/set.rs b/crates/jacquard-api/src/tools_ozone/set.rs index 9964f4cdd..f70787487 100644 --- a/crates/jacquard-api/src/tools_ozone/set.rs +++ b/crates/jacquard-api/src/tools_ozone/set.rs @@ -283,67 +283,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 CreatedAt; type UpdatedAt; + type CreatedAt; + type Name; + type SetSize; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SetSize = Unset; - type Name = Unset; - type CreatedAt = Unset; type UpdatedAt = Unset; + type CreatedAt = Unset; + type Name = Unset; + type SetSize = Unset; } - ///State transition - sets the `set_size` field to Set - pub struct SetSetSize(PhantomData St>); - impl sealed::Sealed for SetSetSize {} - impl State for SetSetSize { - type SetSize = Set; - type Name = St::Name; + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData St>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type UpdatedAt = Set; type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type Name = St::Name; type SetSize = St::SetSize; - type Name = Set; - type CreatedAt = St::CreatedAt; - type UpdatedAt = St::UpdatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SetSize = St::SetSize; - type Name = St::Name; - type CreatedAt = Set; type UpdatedAt = St::UpdatedAt; + type CreatedAt = Set; + type Name = St::Name; + type SetSize = St::SetSize; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData St>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type UpdatedAt = St::UpdatedAt; + type CreatedAt = St::CreatedAt; + type Name = Set; type SetSize = St::SetSize; - type Name = St::Name; + } + ///State transition - sets the `set_size` field to Set + pub struct SetSetSize(PhantomData St>); + impl sealed::Sealed for SetSetSize {} + impl State for SetSetSize { + type UpdatedAt = St::UpdatedAt; type CreatedAt = St::CreatedAt; - type UpdatedAt = Set; + type Name = St::Name; + type SetSize = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `set_size` field - pub struct set_size(()); - ///Marker type for the `name` field - pub struct name(()); - ///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 `created_at` field + pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `set_size` field + pub struct set_size(()); } } @@ -464,10 +464,10 @@ where impl SetViewBuilder where St: set_view_state::State, - St::SetSize: set_view_state::IsSet, - St::Name: set_view_state::IsSet, - St::CreatedAt: set_view_state::IsSet, St::UpdatedAt: set_view_state::IsSet, + St::CreatedAt: set_view_state::IsSet, + St::Name: set_view_state::IsSet, + St::SetSize: set_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> SetView { diff --git a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs index 7831e7eec..85f3da40a 100644 --- a/crates/jacquard-api/src/tools_ozone/set/delete_values.rs +++ b/crates/jacquard-api/src/tools_ozone/set/delete_values.rs @@ -108,37 +108,37 @@ pub mod delete_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 St>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Values = St::Values; + type Name = Unset; } ///State transition - sets the `values` field to Set pub struct SetValues(PhantomData St>); impl sealed::Sealed for SetValues {} impl State for SetValues { - type Name = St::Name; type Values = Set; + type Name = St::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Values = St::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(()); } } @@ -208,8 +208,8 @@ where impl DeleteValuesBuilder where St: delete_values_state::State, - St::Name: delete_values_state::IsSet, St::Values: delete_values_state::IsSet, + St::Name: delete_values_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeleteValues { diff --git a/crates/jacquard-api/src/tools_ozone/setting.rs b/crates/jacquard-api/src/tools_ozone/setting.rs index ab085ee42..6f02f1936 100644 --- a/crates/jacquard-api/src/tools_ozone/setting.rs +++ b/crates/jacquard-api/src/tools_ozone/setting.rs @@ -264,105 +264,105 @@ pub mod defs_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Key; + type Value; + type CreatedBy; type Scope; type LastUpdatedBy; - type Value; - type Key; type Did; - type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Key = Unset; + type Value = Unset; + type CreatedBy = Unset; type Scope = Unset; type LastUpdatedBy = Unset; - type Value = Unset; - type Key = Unset; type Did = Unset; - type CreatedBy = Unset; } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData St>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { - type Scope = Set; - type LastUpdatedBy = St::LastUpdatedBy; + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData St>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Key = Set; type Value = St::Value; - type Key = St::Key; - type Did = St::Did; type CreatedBy = St::CreatedBy; - } - ///State transition - sets the `last_updated_by` field to Set - pub struct SetLastUpdatedBy(PhantomData St>); - impl sealed::Sealed for SetLastUpdatedBy {} - impl State for SetLastUpdatedBy { type Scope = St::Scope; - type LastUpdatedBy = Set; - type Value = St::Value; - type Key = St::Key; + type LastUpdatedBy = St::LastUpdatedBy; type Did = St::Did; - type CreatedBy = St::CreatedBy; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData St>); impl sealed::Sealed for SetValue {} impl State for SetValue { + type Key = St::Key; + type Value = Set; + type CreatedBy = St::CreatedBy; type Scope = St::Scope; type LastUpdatedBy = St::LastUpdatedBy; - type Value = Set; - type Key = St::Key; type Did = St::Did; - type CreatedBy = St::CreatedBy; } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData St>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData St>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Key = St::Key; + type Value = St::Value; + type CreatedBy = Set; type Scope = St::Scope; type LastUpdatedBy = St::LastUpdatedBy; + type Did = St::Did; + } + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData St>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type Key = St::Key; type Value = St::Value; - type Key = Set; + type CreatedBy = St::CreatedBy; + type Scope = Set; + type LastUpdatedBy = St::LastUpdatedBy; type Did = St::Did; + } + ///State transition - sets the `last_updated_by` field to Set + pub struct SetLastUpdatedBy(PhantomData St>); + impl sealed::Sealed for SetLastUpdatedBy {} + impl State for SetLastUpdatedBy { + type Key = St::Key; + type Value = St::Value; type CreatedBy = St::CreatedBy; + type Scope = St::Scope; + type LastUpdatedBy = Set; + type Did = St::Did; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData St>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Scope = St::Scope; - type LastUpdatedBy = St::LastUpdatedBy; - type Value = St::Value; type Key = St::Key; - type Did = Set; + type Value = St::Value; type CreatedBy = St::CreatedBy; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData St>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { type Scope = St::Scope; type LastUpdatedBy = St::LastUpdatedBy; - type Value = St::Value; - type Key = St::Key; - type Did = St::Did; - type CreatedBy = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `key` field + pub struct key(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///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 `value` field - pub struct value(()); - ///Marker type for the `key` field - pub struct key(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `created_by` field - pub struct created_by(()); } } @@ -577,12 +577,12 @@ where impl DefsOptionBuilder where St: defs_option_state::State, + St::Key: defs_option_state::IsSet, + St::Value: defs_option_state::IsSet, + St::CreatedBy: defs_option_state::IsSet, St::Scope: defs_option_state::IsSet, St::LastUpdatedBy: defs_option_state::IsSet, - St::Value: defs_option_state::IsSet, - St::Key: defs_option_state::IsSet, St::Did: defs_option_state::IsSet, - St::CreatedBy: defs_option_state::IsSet, { /// Build the final struct. pub fn build(self) -> DefsOption { diff --git a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs index d9870696a..eda0d549a 100644 --- a/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/jacquard-api/src/tools_ozone/setting/upsert_option.rs @@ -249,51 +249,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 Key; + 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 Key = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData St>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type Scope = Set; type Key = St::Key; - type Scope = St::Scope; + type Value = St::Value; } ///State transition - sets the `key` field to Set pub struct SetKey(PhantomData St>); impl sealed::Sealed for SetKey {} impl State for SetKey { - type Value = St::Value; - type Key = Set; type Scope = St::Scope; - } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData St>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { + type Key = Set; type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Scope = St::Scope; type Key = St::Key; - type Scope = 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 `key` field - pub struct key(()); ///Marker type for the `scope` field pub struct scope(()); + ///Marker type for the `key` field + pub struct key(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -420,9 +420,9 @@ where impl UpsertOptionBuilder where St: upsert_option_state::State, - St::Value: upsert_option_state::IsSet, - St::Key: upsert_option_state::IsSet, St::Scope: upsert_option_state::IsSet, + St::Key: upsert_option_state::IsSet, + St::Value: upsert_option_state::IsSet, { /// Build the final struct. pub fn build(self) -> UpsertOption { diff --git a/crates/jacquard-api/src/tools_ozone/team.rs b/crates/jacquard-api/src/tools_ozone/team.rs index ea28e8e68..ad63bb809 100644 --- a/crates/jacquard-api/src/tools_ozone/team.rs +++ b/crates/jacquard-api/src/tools_ozone/team.rs @@ -202,37 +202,37 @@ pub mod 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 St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Role = St::Role; + type Did = Unset; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData St>); impl sealed::Sealed for SetRole {} impl State for SetRole { - type Did = St::Did; type Role = Set; + type Did = St::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Role = St::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(()); } } @@ -375,8 +375,8 @@ impl MemberBuilder { impl MemberBuilder where St: member_state::State, - St::Did: member_state::IsSet, St::Role: member_state::IsSet, + St::Did: member_state::IsSet, { /// Build the final struct. pub fn build(self) -> Member { diff --git a/crates/jacquard-api/src/tools_ozone/verification.rs b/crates/jacquard-api/src/tools_ozone/verification.rs index 8494573a4..13aebf02b 100644 --- a/crates/jacquard-api/src/tools_ozone/verification.rs +++ b/crates/jacquard-api/src/tools_ozone/verification.rs @@ -116,105 +116,105 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Issuer; type Uri; - type CreatedAt; type Subject; type Handle; + type CreatedAt; type DisplayName; - type Issuer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Issuer = Unset; type Uri = Unset; - type CreatedAt = Unset; type Subject = Unset; type Handle = Unset; + type CreatedAt = Unset; type DisplayName = Unset; - type Issuer = Unset; + } + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData St>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { + type Issuer = Set; + type Uri = St::Uri; + type Subject = St::Subject; + type Handle = St::Handle; + type CreatedAt = St::CreatedAt; + type DisplayName = St::DisplayName; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Uri = Set; - type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - type Handle = St::Handle; - type DisplayName = St::DisplayName; type Issuer = St::Issuer; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Uri = St::Uri; - type CreatedAt = Set; + type Uri = Set; type Subject = St::Subject; type Handle = St::Handle; + type CreatedAt = St::CreatedAt; type DisplayName = St::DisplayName; - type Issuer = St::Issuer; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { + type Issuer = St::Issuer; type Uri = St::Uri; - type CreatedAt = St::CreatedAt; type Subject = Set; type Handle = St::Handle; + type CreatedAt = St::CreatedAt; type DisplayName = St::DisplayName; - type Issuer = St::Issuer; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { + type Issuer = St::Issuer; type Uri = St::Uri; - type CreatedAt = St::CreatedAt; type Subject = St::Subject; type Handle = Set; + type CreatedAt = St::CreatedAt; type DisplayName = St::DisplayName; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Issuer = St::Issuer; + type Uri = St::Uri; + type Subject = St::Subject; + type Handle = St::Handle; + type CreatedAt = Set; + type DisplayName = St::DisplayName; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Uri = St::Uri; - type CreatedAt = St::CreatedAt; - type Subject = St::Subject; - type Handle = St::Handle; - type DisplayName = Set; type Issuer = St::Issuer; - } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData St>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { type Uri = St::Uri; - type CreatedAt = St::CreatedAt; type Subject = St::Subject; type Handle = St::Handle; - type DisplayName = St::DisplayName; - type Issuer = Set; + type CreatedAt = St::CreatedAt; + type DisplayName = 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 `uri` field pub struct uri(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `issuer` field - pub struct issuer(()); } } @@ -491,12 +491,12 @@ where impl VerificationViewBuilder where St: verification_view_state::State, + St::Issuer: verification_view_state::IsSet, St::Uri: verification_view_state::IsSet, - St::CreatedAt: verification_view_state::IsSet, St::Subject: verification_view_state::IsSet, St::Handle: verification_view_state::IsSet, + St::CreatedAt: verification_view_state::IsSet, St::DisplayName: verification_view_state::IsSet, - St::Issuer: verification_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> VerificationView { diff --git a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs index f90448ffe..85755412c 100644 --- a/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/jacquard-api/src/tools_ozone/verification/grant_verifications.rs @@ -534,49 +534,49 @@ pub mod verification_input_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type DisplayName; + type Subject; type Handle; } /// 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 Subject = Unset; type Handle = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type DisplayName = St::DisplayName; - type Handle = St::Handle; - } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData St>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Subject = St::Subject; type DisplayName = Set; + type Subject = St::Subject; + type Handle = St::Handle; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type DisplayName = St::DisplayName; + type Subject = Set; type Handle = St::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData St>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Subject = St::Subject; type DisplayName = St::DisplayName; + type Subject = St::Subject; type Handle = 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 `subject` field + pub struct subject(()); ///Marker type for the `handle` field pub struct handle(()); } @@ -680,8 +680,8 @@ where impl VerificationInputBuilder where St: verification_input_state::State, - St::Subject: verification_input_state::IsSet, St::DisplayName: verification_input_state::IsSet, + St::Subject: verification_input_state::IsSet, St::Handle: verification_input_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/top_launchpadx/agent/ack.rs b/crates/jacquard-api/src/top_launchpadx/agent/ack.rs index 5fde63941..7d7ac1889 100644 --- a/crates/jacquard-api/src/top_launchpadx/agent/ack.rs +++ b/crates/jacquard-api/src/top_launchpadx/agent/ack.rs @@ -120,37 +120,37 @@ pub mod ack_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type WorkType; + 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 WorkType = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type WorkType = St::WorkType; + type CreatedAt = Unset; } ///State transition - sets the `work_type` field to Set pub struct SetWorkType(PhantomData St>); impl sealed::Sealed for SetWorkType {} impl State for SetWorkType { - type CreatedAt = St::CreatedAt; type WorkType = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type WorkType = St::WorkType; + 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 `work_type` field pub struct work_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -246,8 +246,8 @@ where impl AckBuilder where St: ack_state::State, - St::CreatedAt: ack_state::IsSet, St::WorkType: ack_state::IsSet, + St::CreatedAt: ack_state::IsSet, { /// Build the final struct. pub fn build(self) -> Ack { diff --git a/crates/jacquard-api/src/top_launchpadx/agent/thought.rs b/crates/jacquard-api/src/top_launchpadx/agent/thought.rs index b8035416c..8c92d319a 100644 --- a/crates/jacquard-api/src/top_launchpadx/agent/thought.rs +++ b/crates/jacquard-api/src/top_launchpadx/agent/thought.rs @@ -120,37 +120,37 @@ pub mod thought_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type WorkType; + 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 WorkType = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type WorkType = St::WorkType; + type CreatedAt = Unset; } ///State transition - sets the `work_type` field to Set pub struct SetWorkType(PhantomData St>); impl sealed::Sealed for SetWorkType {} impl State for SetWorkType { - type CreatedAt = St::CreatedAt; type WorkType = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type WorkType = St::WorkType; + 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 `work_type` field pub struct work_type(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -246,8 +246,8 @@ where impl ThoughtBuilder where St: thought_state::State, - St::CreatedAt: thought_state::IsSet, St::WorkType: thought_state::IsSet, + St::CreatedAt: thought_state::IsSet, { /// Build the final struct. pub fn build(self) -> Thought { diff --git a/crates/jacquard-api/src/uk_ewancroft/now.rs b/crates/jacquard-api/src/uk_ewancroft/now.rs index fccbfbccd..1791e3bc1 100644 --- a/crates/jacquard-api/src/uk_ewancroft/now.rs +++ b/crates/jacquard-api/src/uk_ewancroft/now.rs @@ -135,37 +135,37 @@ pub mod now_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + 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 Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = St::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = St::CreatedAt; type Text = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + 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 `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -232,8 +232,8 @@ where impl NowBuilder where St: now_state::State, - St::CreatedAt: now_state::IsSet, St::Text: now_state::IsSet, + St::CreatedAt: now_state::IsSet, { /// Build the final struct. pub fn build(self) -> Now { diff --git a/crates/jacquard-api/src/uk_skyblur/post.rs b/crates/jacquard-api/src/uk_skyblur/post.rs index 12afbafeb..79e6b42a5 100644 --- a/crates/jacquard-api/src/uk_skyblur/post.rs +++ b/crates/jacquard-api/src/uk_skyblur/post.rs @@ -201,67 +201,67 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Visibility; type Text; type CreatedAt; + 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 Visibility = Unset; type Text = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData St>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Visibility = St::Visibility; - type Text = St::Text; - type CreatedAt = St::CreatedAt; + type Uri = Unset; } ///State transition - sets the `visibility` field to Set pub struct SetVisibility(PhantomData St>); impl sealed::Sealed for SetVisibility {} impl State for SetVisibility { - type Uri = St::Uri; type Visibility = Set; type Text = St::Text; type CreatedAt = St::CreatedAt; + type Uri = St::Uri; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { - type Uri = St::Uri; type Visibility = St::Visibility; type Text = Set; type CreatedAt = St::CreatedAt; + type Uri = St::Uri; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = St::Uri; type Visibility = St::Visibility; type Text = St::Text; type CreatedAt = Set; + type Uri = St::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData St>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Visibility = St::Visibility; + type Text = St::Text; + type CreatedAt = St::CreatedAt; + 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 `visibility` field pub struct visibility(()); ///Marker type for the `text` field pub struct text(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -402,10 +402,10 @@ where impl PostBuilder where St: post_state::State, - St::Uri: post_state::IsSet, St::Visibility: post_state::IsSet, St::Text: post_state::IsSet, St::CreatedAt: post_state::IsSet, + St::Uri: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/uk_skyblur/post/decrypt_by_cid.rs b/crates/jacquard-api/src/uk_skyblur/post/decrypt_by_cid.rs index 137e5a4f7..437962280 100644 --- a/crates/jacquard-api/src/uk_skyblur/post/decrypt_by_cid.rs +++ b/crates/jacquard-api/src/uk_skyblur/post/decrypt_by_cid.rs @@ -80,67 +80,67 @@ pub mod decrypt_by_cid_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Pds; - type Repo; + type Cid; type Password; + type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Pds = Unset; - type Repo = Unset; + type Cid = Unset; type Password = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData St>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Pds = St::Pds; - type Repo = St::Repo; - type Password = St::Password; + type Repo = Unset; } ///State transition - sets the `pds` field to Set pub struct SetPds(PhantomData St>); impl sealed::Sealed for SetPds {} impl State for SetPds { - type Cid = St::Cid; type Pds = Set; - type Repo = St::Repo; + type Cid = St::Cid; type Password = St::Password; + type Repo = St::Repo; } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData St>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Cid = St::Cid; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData St>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Pds = St::Pds; - type Repo = Set; + type Cid = Set; type Password = St::Password; + type Repo = St::Repo; } ///State transition - sets the `password` field to Set pub struct SetPassword(PhantomData St>); impl sealed::Sealed for SetPassword {} impl State for SetPassword { - type Cid = St::Cid; type Pds = St::Pds; - type Repo = St::Repo; + type Cid = St::Cid; type Password = Set; + type Repo = St::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData St>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Pds = St::Pds; + type Cid = St::Cid; + type Password = St::Password; + type Repo = 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 `pds` field pub struct pds(()); - ///Marker type for the `repo` field - pub struct repo(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `password` field pub struct password(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -248,10 +248,10 @@ where impl DecryptByCidBuilder where St: decrypt_by_cid_state::State, - St::Cid: decrypt_by_cid_state::IsSet, St::Pds: decrypt_by_cid_state::IsSet, - St::Repo: decrypt_by_cid_state::IsSet, + St::Cid: decrypt_by_cid_state::IsSet, St::Password: decrypt_by_cid_state::IsSet, + St::Repo: decrypt_by_cid_state::IsSet, { /// Build the final struct. pub fn build(self) -> DecryptByCid { diff --git a/crates/jacquard-api/src/us_polhem/blog/content.rs b/crates/jacquard-api/src/us_polhem/blog/content.rs index 4d330ec88..f23f89645 100644 --- a/crates/jacquard-api/src/us_polhem/blog/content.rs +++ b/crates/jacquard-api/src/us_polhem/blog/content.rs @@ -137,49 +137,49 @@ pub mod content_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Slug; type CreatedAt; + type Slug; type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Slug = Unset; type CreatedAt = Unset; + type Slug = Unset; type Content = Unset; } - ///State transition - sets the `slug` field to Set - pub struct SetSlug(PhantomData St>); - impl sealed::Sealed for SetSlug {} - impl State for SetSlug { - type Slug = Set; - type CreatedAt = St::CreatedAt; - type Content = St::Content; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Slug = St::Slug; type CreatedAt = Set; + type Slug = St::Slug; + type Content = St::Content; + } + ///State transition - sets the `slug` field to Set + pub struct SetSlug(PhantomData St>); + impl sealed::Sealed for SetSlug {} + impl State for SetSlug { + type CreatedAt = St::CreatedAt; + type Slug = Set; type Content = St::Content; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type Slug = St::Slug; type CreatedAt = St::CreatedAt; + type Slug = St::Slug; type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `slug` field - pub struct slug(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `slug` field + pub struct slug(()); ///Marker type for the `content` field pub struct content(()); } @@ -283,8 +283,8 @@ where impl ContentBuilder where St: content_state::State, - St::Slug: content_state::IsSet, St::CreatedAt: content_state::IsSet, + St::Slug: content_state::IsSet, St::Content: content_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/us_polhem/blog/post.rs b/crates/jacquard-api/src/us_polhem/blog/post.rs index 51bce56a7..42f48da19 100644 --- a/crates/jacquard-api/src/us_polhem/blog/post.rs +++ b/crates/jacquard-api/src/us_polhem/blog/post.rs @@ -175,66 +175,66 @@ pub mod post_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; - type Slug; - type Content; type CreatedAt; + type Content; + type Slug; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; - type Slug = Unset; - type Content = Unset; type CreatedAt = Unset; + type Content = Unset; + type Slug = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData St>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { type Title = Set; - type Slug = St::Slug; - type Content = St::Content; type CreatedAt = St::CreatedAt; + type Content = St::Content; + type Slug = St::Slug; } - ///State transition - sets the `slug` field to Set - pub struct SetSlug(PhantomData St>); - impl sealed::Sealed for SetSlug {} - impl State for SetSlug { + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Title = St::Title; - type Slug = Set; + type CreatedAt = Set; type Content = St::Content; - type CreatedAt = St::CreatedAt; + type Slug = St::Slug; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData St>); impl sealed::Sealed for SetContent {} impl State for SetContent { type Title = St::Title; - type Slug = St::Slug; - type Content = Set; type CreatedAt = St::CreatedAt; + type Content = Set; + type Slug = St::Slug; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + ///State transition - sets the `slug` field to Set + pub struct SetSlug(PhantomData St>); + impl sealed::Sealed for SetSlug {} + impl State for SetSlug { type Title = St::Title; - type Slug = St::Slug; + type CreatedAt = St::CreatedAt; type Content = St::Content; - type CreatedAt = Set; + type Slug = 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 `slug` field - pub struct slug(()); - ///Marker type for the `content` field - pub struct content(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `content` field + pub struct content(()); + ///Marker type for the `slug` field + pub struct slug(()); } } @@ -418,9 +418,9 @@ impl PostBuilder where St: post_state::State, St::Title: post_state::IsSet, - St::Slug: post_state::IsSet, - St::Content: post_state::IsSet, St::CreatedAt: post_state::IsSet, + St::Content: post_state::IsSet, + St::Slug: post_state::IsSet, { /// Build the final struct. pub fn build(self) -> Post { diff --git a/crates/jacquard-api/src/us_polhem/blog/tag.rs b/crates/jacquard-api/src/us_polhem/blog/tag.rs index cc3423ce2..7b07cd2b5 100644 --- a/crates/jacquard-api/src/us_polhem/blog/tag.rs +++ b/crates/jacquard-api/src/us_polhem/blog/tag.rs @@ -147,67 +147,67 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Description; type Name; + type Description; type Slug; + 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 Description = Unset; type Name = Unset; + type Description = Unset; type Slug = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type Description = St::Description; - type Name = St::Name; type Slug = St::Slug; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData St>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type CreatedAt = St::CreatedAt; - type Description = Set; type Name = St::Name; + type Description = Set; type Slug = St::Slug; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData St>); - impl sealed::Sealed for SetName {} - impl State for SetName { type CreatedAt = St::CreatedAt; - type Description = St::Description; - type Name = Set; - type Slug = St::Slug; } ///State transition - sets the `slug` field to Set pub struct SetSlug(PhantomData St>); impl sealed::Sealed for SetSlug {} impl State for SetSlug { - type CreatedAt = St::CreatedAt; - type Description = St::Description; type Name = St::Name; + type Description = St::Description; type Slug = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type Description = St::Description; + type Slug = St::Slug; + 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 `description` field - pub struct description(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `slug` field pub struct slug(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -309,10 +309,10 @@ where impl TagBuilder where St: tag_state::State, - St::CreatedAt: tag_state::IsSet, - St::Description: tag_state::IsSet, St::Name: tag_state::IsSet, + St::Description: tag_state::IsSet, St::Slug: tag_state::IsSet, + St::CreatedAt: tag_state::IsSet, { /// Build the final struct. pub fn build(self) -> Tag { diff --git a/crates/jacquard-api/src/win_tomo_x/pushat.rs b/crates/jacquard-api/src/win_tomo_x/pushat.rs index c111f12ff..fdb152e97 100644 --- a/crates/jacquard-api/src/win_tomo_x/pushat.rs +++ b/crates/jacquard-api/src/win_tomo_x/pushat.rs @@ -129,51 +129,51 @@ pub mod device_list_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Current; type Name; type Id; + type Current; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Current = Unset; type Name = Unset; type Id = Unset; - } - ///State transition - sets the `current` field to Set - pub struct SetCurrent(PhantomData St>); - impl sealed::Sealed for SetCurrent {} - impl State for SetCurrent { - type Current = Set; - type Name = St::Name; - type Id = St::Id; + type Current = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData St>); impl sealed::Sealed for SetName {} impl State for SetName { - type Current = St::Current; type Name = Set; type Id = St::Id; + type Current = St::Current; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData St>); impl sealed::Sealed for SetId {} impl State for SetId { - type Current = St::Current; type Name = St::Name; type Id = Set; + type Current = St::Current; + } + ///State transition - sets the `current` field to Set + pub struct SetCurrent(PhantomData St>); + impl sealed::Sealed for SetCurrent {} + impl State for SetCurrent { + type Name = St::Name; + type Id = St::Id; + type Current = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `current` field - pub struct current(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `current` field + pub struct current(()); } } @@ -262,9 +262,9 @@ where impl DeviceListItemBuilder where St: device_list_item_state::State, - St::Current: device_list_item_state::IsSet, St::Name: device_list_item_state::IsSet, St::Id: device_list_item_state::IsSet, + St::Current: device_list_item_state::IsSet, { /// Build the final struct. pub fn build(self) -> DeviceListItem { diff --git a/crates/jacquard-api/src/win_tomo_x/pushat/push_notify.rs b/crates/jacquard-api/src/win_tomo_x/pushat/push_notify.rs index 44fdf00eb..b2dd80649 100644 --- a/crates/jacquard-api/src/win_tomo_x/pushat/push_notify.rs +++ b/crates/jacquard-api/src/win_tomo_x/pushat/push_notify.rs @@ -125,37 +125,37 @@ pub mod push_notify_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Target; type Body; + type Target; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Target = Unset; type Body = Unset; - } - ///State transition - sets the `target` field to Set - pub struct SetTarget(PhantomData St>); - impl sealed::Sealed for SetTarget {} - impl State for SetTarget { - type Target = Set; - type Body = St::Body; + type Target = Unset; } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData St>); impl sealed::Sealed for SetBody {} impl State for SetBody { - type Target = St::Target; type Body = Set; + type Target = St::Target; + } + ///State transition - sets the `target` field to Set + pub struct SetTarget(PhantomData St>); + impl sealed::Sealed for SetTarget {} + impl State for SetTarget { + type Body = St::Body; + type Target = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `target` field - pub struct target(()); ///Marker type for the `body` field pub struct body(()); + ///Marker type for the `target` field + pub struct target(()); } } @@ -225,8 +225,8 @@ where impl PushNotifyBuilder where St: push_notify_state::State, - St::Target: push_notify_state::IsSet, St::Body: push_notify_state::IsSet, + St::Target: push_notify_state::IsSet, { /// Build the final struct. pub fn build(self) -> PushNotify { diff --git a/crates/jacquard-api/src/world_ptah.rs b/crates/jacquard-api/src/world_ptah.rs new file mode 100644 index 000000000..8aaa080c5 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah.rs @@ -0,0 +1,6 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod temp; \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp.rs b/crates/jacquard-api/src/world_ptah/temp.rs new file mode 100644 index 000000000..5a7495aef --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp.rs @@ -0,0 +1,89 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.defs +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod action; +pub mod character; +pub mod contribution; +pub mod declaration; +pub mod event; +pub mod location; +pub mod lore; +pub mod role; +pub mod world; + +use jacquard_common::{BosStr, DefaultStr, FromStaticStr}; +use jacquard_derive::IntoStatic; +use serde::{Serialize, Deserialize}; +/// Record exists but is not recognized as part of any canonical timeline. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct CanonicalStatusApocryphal; +impl core::fmt::Display for CanonicalStatusApocryphal { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "canonicalStatusApocryphal") + } +} + +/// Record is community-contributed canon — valid but not originator-designated. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct CanonicalStatusCommunity; +impl core::fmt::Display for CanonicalStatusCommunity { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "canonicalStatusCommunity") + } +} + +/// Record is recognized as official canon within its world. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct CanonicalStatusOfficial; +impl core::fmt::Display for CanonicalStatusOfficial { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "canonicalStatusOfficial") + } +} + +/// Content originates as original intellectual property. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct SourceType; +impl core::fmt::Display for SourceType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "sourceType") + } +} + +/// Content is created under a collaborative commons framework. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct SourceTypeCollaborativeCommons; +impl core::fmt::Display for SourceTypeCollaborativeCommons { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "sourceTypeCollaborativeCommons") + } +} + +/// Content originates as original intellectual property. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct SourceTypeOriginalIp; +impl core::fmt::Display for SourceTypeOriginalIp { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "sourceTypeOriginalIP") + } +} + +/// Content is derived from public domain source material. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Hash)] +pub struct SourceTypePublicDomain; +impl core::fmt::Display for SourceTypePublicDomain { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "sourceTypePublicDomain") + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/action.rs b/crates/jacquard-api/src/world_ptah/temp/action.rs new file mode 100644 index 000000000..2a78f2745 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/action.rs @@ -0,0 +1,793 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.action +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// An entry in a ship's log. Something happened. Someone did it. The Opening of the Mouth ceremony — Ptah opens the mouth and the statue breathes, speaks, acts. The action record is the breath. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.action", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Action { + ///What kind of action. Open-ended. + #[serde(skip_serializing_if = "Option::is_none")] + pub action_type: Option>, + ///Who performed the action — the person behind the character. + pub actor_did: Did, + ///The AT URI of the character performing the action. Not the person — the character. + #[serde(skip_serializing_if = "Option::is_none")] + pub character_reference: Option>, + ///What actually happened. The text of the action. + #[serde(skip_serializing_if = "Option::is_none")] + pub content: Option, + ///Timestamp of the action. + pub created_at: Datetime, + ///The AT URI of the location record where this action took place. + #[serde(skip_serializing_if = "Option::is_none")] + pub location_reference: Option>, + ///Optional importance scoring hook. Null by default. Populated by the AppView or by originator designation when needed. Does not change v1 behavior — all actions are structurally flat by default. + #[serde(skip_serializing_if = "Option::is_none")] + pub narrative_weight: Option, + ///If this action was directed at another character or object, the AT URI of the target. + #[serde(skip_serializing_if = "Option::is_none")] + pub target_reference: Option>, + ///The narrative visibility tier of this action. + #[serde(skip_serializing_if = "Option::is_none")] + pub visibility: Option>, + ///The AT URI of the world this action happened in. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// What kind of action. Open-ended. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ActionActionType { + Movement, + Speech, + Conflict, + Creation, + Witness, + Other(S), +} + +impl ActionActionType { + pub fn as_str(&self) -> &str { + match self { + Self::Movement => "movement", + Self::Speech => "speech", + Self::Conflict => "conflict", + Self::Creation => "creation", + Self::Witness => "witness", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "movement" => Self::Movement, + "speech" => Self::Speech, + "conflict" => Self::Conflict, + "creation" => Self::Creation, + "witness" => Self::Witness, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ActionActionType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ActionActionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ActionActionType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ActionActionType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ActionActionType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ActionActionType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ActionActionType; + fn into_static(self) -> Self::Output { + match self { + ActionActionType::Movement => ActionActionType::Movement, + ActionActionType::Speech => ActionActionType::Speech, + ActionActionType::Conflict => ActionActionType::Conflict, + ActionActionType::Creation => ActionActionType::Creation, + ActionActionType::Witness => ActionActionType::Witness, + ActionActionType::Other(v) => ActionActionType::Other(v.into_static()), + } + } +} + +/// The narrative visibility tier of this action. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ActionVisibility { + Canon, + Community, + Experimental, + Other(S), +} + +impl ActionVisibility { + pub fn as_str(&self) -> &str { + match self { + Self::Canon => "canon", + Self::Community => "community", + Self::Experimental => "experimental", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "canon" => Self::Canon, + "community" => Self::Community, + "experimental" => Self::Experimental, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ActionVisibility { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ActionVisibility { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ActionVisibility { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for ActionVisibility { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ActionVisibility { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ActionVisibility +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ActionVisibility; + fn into_static(self) -> Self::Output { + match self { + ActionVisibility::Canon => ActionVisibility::Canon, + ActionVisibility::Community => ActionVisibility::Community, + ActionVisibility::Experimental => ActionVisibility::Experimental, + ActionVisibility::Other(v) => ActionVisibility::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ActionGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Action, +} + +impl Action { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ActionRecord; +impl XrpcResp for ActionRecord { + const NSID: &'static str = "world.ptah.temp.action"; + const ENCODING: &'static str = "application/json"; + type Output = ActionGetRecordOutput; + type Err = RecordError; +} + +impl From> for Action { + fn from(output: ActionGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Action { + const NSID: &'static str = "world.ptah.temp.action"; + type Record = ActionRecord; +} + +impl Collection for ActionRecord { + const NSID: &'static str = "world.ptah.temp.action"; + type Record = ActionRecord; +} + +impl LexiconSchema for Action { + fn nsid() -> &'static str { + "world.ptah.temp.action" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_action() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.action_type { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("action_type"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.action_type { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("action_type"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.content { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 30720usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("content"), + max: 30720usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.content { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 3000usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("content"), + max: 3000usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.narrative_weight { + if *value < 0i64 { + return Err(ConstraintError::Minimum { + path: ValidationPath::from_field("narrative_weight"), + min: 0i64, + actual: *value, + }); + } + } + Ok(()) + } +} + +pub mod action_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 ActorDid; + type WorldReference; + type CreatedAt; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type ActorDid = Unset; + type WorldReference = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `actor_did` field to Set + pub struct SetActorDid(PhantomData St>); + impl sealed::Sealed for SetActorDid {} + impl State for SetActorDid { + type ActorDid = Set; + type WorldReference = St::WorldReference; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type ActorDid = St::ActorDid; + type WorldReference = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type ActorDid = St::ActorDid; + type WorldReference = St::WorldReference; + type CreatedAt = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `actor_did` field + pub struct actor_did(()); + ///Marker type for the `world_reference` field + pub struct world_reference(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ActionBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option>, + Option>, + Option, + Option, + Option>, + Option, + Option>, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Action { + /// Create a new builder for this type. + pub fn new() -> ActionBuilder { + ActionBuilder::new() + } +} + +impl ActionBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ActionBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl ActionBuilder { + /// Set the `actionType` field (optional) + pub fn action_type(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `actionType` field to an Option value (optional) + pub fn maybe_action_type(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl ActionBuilder +where + St: action_state::State, + St::ActorDid: action_state::IsUnset, +{ + /// Set the `actorDID` field (required) + pub fn actor_did( + mut self, + value: impl Into>, + ) -> ActionBuilder> { + self._fields.1 = Option::Some(value.into()); + ActionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ActionBuilder { + /// Set the `characterReference` field (optional) + pub fn character_reference(mut self, value: impl Into>>) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `characterReference` field to an Option value (optional) + pub fn maybe_character_reference(mut self, value: Option>) -> Self { + self._fields.2 = value; + self + } +} + +impl ActionBuilder { + /// Set the `content` field (optional) + pub fn content(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `content` field to an Option value (optional) + pub fn maybe_content(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl ActionBuilder +where + St: action_state::State, + St::CreatedAt: action_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> ActionBuilder> { + self._fields.4 = Option::Some(value.into()); + ActionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ActionBuilder { + /// Set the `locationReference` field (optional) + pub fn location_reference(mut self, value: impl Into>>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `locationReference` field to an Option value (optional) + pub fn maybe_location_reference(mut self, value: Option>) -> Self { + self._fields.5 = value; + self + } +} + +impl ActionBuilder { + /// Set the `narrativeWeight` field (optional) + pub fn narrative_weight(mut self, value: impl Into>) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `narrativeWeight` field to an Option value (optional) + pub fn maybe_narrative_weight(mut self, value: Option) -> Self { + self._fields.6 = value; + self + } +} + +impl ActionBuilder { + /// Set the `targetReference` field (optional) + pub fn target_reference(mut self, value: impl Into>>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `targetReference` field to an Option value (optional) + pub fn maybe_target_reference(mut self, value: Option>) -> Self { + self._fields.7 = value; + self + } +} + +impl ActionBuilder { + /// Set the `visibility` field (optional) + pub fn visibility(mut self, value: impl Into>>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `visibility` field to an Option value (optional) + pub fn maybe_visibility(mut self, value: Option>) -> Self { + self._fields.8 = value; + self + } +} + +impl ActionBuilder +where + St: action_state::State, + St::WorldReference: action_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> ActionBuilder> { + self._fields.9 = Option::Some(value.into()); + ActionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ActionBuilder +where + St: action_state::State, + St::ActorDid: action_state::IsSet, + St::WorldReference: action_state::IsSet, + St::CreatedAt: action_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Action { + Action { + action_type: self._fields.0, + actor_did: self._fields.1.unwrap(), + character_reference: self._fields.2, + content: self._fields.3, + created_at: self._fields.4.unwrap(), + location_reference: self._fields.5, + narrative_weight: self._fields.6, + target_reference: self._fields.7, + visibility: self._fields.8, + world_reference: self._fields.9.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Action { + Action { + action_type: self._fields.0, + actor_did: self._fields.1.unwrap(), + character_reference: self._fields.2, + content: self._fields.3, + created_at: self._fields.4.unwrap(), + location_reference: self._fields.5, + narrative_weight: self._fields.6, + target_reference: self._fields.7, + visibility: self._fields.8, + world_reference: self._fields.9.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_action() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.action"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "An entry in a ship's log. Something happened. Someone did it. The Opening of the Mouth ceremony — Ptah opens the mouth and the statue breathes, speaks, acts. The action record is the breath.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("actorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("actionType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What kind of action. Open-ended."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("actorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Who performed the action — the person behind the character.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("characterReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the character performing the action. Not the person — the character.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("content"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "What actually happened. The text of the action.", + ), + ), + max_length: Some(30720usize), + max_graphemes: Some(3000usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of the action."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("locationReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the location record where this action took place.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("narrativeWeight"), + LexObjectProperty::Integer(LexInteger { + minimum: Some(0i64), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("targetReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "If this action was directed at another character or object, the AT URI of the target.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("visibility"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The narrative visibility tier of this action.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world this action happened in.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/character.rs b/crates/jacquard-api/src/world_ptah/temp/character.rs new file mode 100644 index 000000000..ab6062aa8 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/character.rs @@ -0,0 +1,1239 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.character +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +use crate::world_ptah::temp::character; +/// Flexible key-value properties for any kind of world. All fields optional — worlds define what matters. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct CharacterProperties { + ///Notable abilities or powers. + #[serde(skip_serializing_if = "Option::is_none")] + pub abilities: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub affiliation: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub age: Option, + ///Narrative or social role within the world. + #[serde(skip_serializing_if = "Option::is_none")] + pub role: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub species: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// A birth certificate crossed with a passport. Ptah speaks the name and the thing exists — the character exists because it was named and the naming is permanent. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.character", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Character { + ///Permanent, immutable link back to the creator. This never changes even if the character gets contributed to, built on, or rendered a thousand different ways. + #[serde(skip_serializing_if = "Option::is_none")] + pub authorship_record: Option>, + ///The canonical standing of this character within its world. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///How control of this character is governed. Solves the Ghost Character problem in public domain worlds. + #[serde(skip_serializing_if = "Option::is_none")] + pub control_type: Option>, + ///Timestamp of character creation. + pub created_at: Datetime, + ///Who created this character. This never changes — it is the provenance that travels. + pub creator_did: Did, + ///Who this character is, in plain language. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + ///What the character is called. + pub name: S, + ///The intellectual property origin of this character. + #[serde(skip_serializing_if = "Option::is_none")] + pub origin_type: Option>, + ///Flexible fields — species, age, role, affiliation, abilities. Open-ended so any kind of world can use the same record type. + #[serde(skip_serializing_if = "Option::is_none")] + pub properties: Option>, + ///The AT URI of the Role record this character is an instance of. If present, this character is a specific performance of a shared role rather than a wholly original character. + #[serde(skip_serializing_if = "Option::is_none")] + pub role_reference: Option>, + ///If originType is publicDomain, the specific source. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_reference: Option, + ///The AT URI of the world record this character belongs to. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// The canonical standing of this character within its world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum CharacterCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl CharacterCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for CharacterCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for CharacterCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for CharacterCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> +for CharacterCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for CharacterCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for CharacterCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = CharacterCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + CharacterCanonicalStatus::CanonicalStatusOfficial => { + CharacterCanonicalStatus::CanonicalStatusOfficial + } + CharacterCanonicalStatus::CanonicalStatusCommunity => { + CharacterCanonicalStatus::CanonicalStatusCommunity + } + CharacterCanonicalStatus::CanonicalStatusApocryphal => { + CharacterCanonicalStatus::CanonicalStatusApocryphal + } + CharacterCanonicalStatus::Other(v) => { + CharacterCanonicalStatus::Other(v.into_static()) + } + } + } +} + +/// How control of this character is governed. Solves the Ghost Character problem in public domain worlds. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum CharacterControlType { + Exclusive, + Open, + Delegated, + Other(S), +} + +impl CharacterControlType { + pub fn as_str(&self) -> &str { + match self { + Self::Exclusive => "exclusive", + Self::Open => "open", + Self::Delegated => "delegated", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "exclusive" => Self::Exclusive, + "open" => Self::Open, + "delegated" => Self::Delegated, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for CharacterControlType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for CharacterControlType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for CharacterControlType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for CharacterControlType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for CharacterControlType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for CharacterControlType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = CharacterControlType; + fn into_static(self) -> Self::Output { + match self { + CharacterControlType::Exclusive => CharacterControlType::Exclusive, + CharacterControlType::Open => CharacterControlType::Open, + CharacterControlType::Delegated => CharacterControlType::Delegated, + CharacterControlType::Other(v) => { + CharacterControlType::Other(v.into_static()) + } + } + } +} + +/// The intellectual property origin of this character. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum CharacterOriginType { + SourceTypeOriginalIp, + SourceTypePublicDomain, + Contributed, + Other(S), +} + +impl CharacterOriginType { + pub fn as_str(&self) -> &str { + match self { + Self::SourceTypeOriginalIp => "world.ptah.temp.defs#sourceTypeOriginalIP", + Self::SourceTypePublicDomain => "world.ptah.temp.defs#sourceTypePublicDomain", + Self::Contributed => "contributed", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#sourceTypeOriginalIP" => Self::SourceTypeOriginalIp, + "world.ptah.temp.defs#sourceTypePublicDomain" => Self::SourceTypePublicDomain, + "contributed" => Self::Contributed, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for CharacterOriginType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for CharacterOriginType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for CharacterOriginType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for CharacterOriginType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for CharacterOriginType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for CharacterOriginType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = CharacterOriginType; + fn into_static(self) -> Self::Output { + match self { + CharacterOriginType::SourceTypeOriginalIp => { + CharacterOriginType::SourceTypeOriginalIp + } + CharacterOriginType::SourceTypePublicDomain => { + CharacterOriginType::SourceTypePublicDomain + } + CharacterOriginType::Contributed => CharacterOriginType::Contributed, + CharacterOriginType::Other(v) => CharacterOriginType::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct CharacterGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Character, +} + +impl Character { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +impl LexiconSchema for CharacterProperties { + fn nsid() -> &'static str { + "world.ptah.temp.character" + } + fn def_name() -> &'static str { + "characterProperties" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_character() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.abilities { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("abilities"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.abilities { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("abilities"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.affiliation { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("affiliation"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.affiliation { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("affiliation"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.age { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("age"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.age { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("age"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.role { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("role"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.role { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("role"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.species { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("species"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.species { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("species"), + max: 64usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct CharacterRecord; +impl XrpcResp for CharacterRecord { + const NSID: &'static str = "world.ptah.temp.character"; + const ENCODING: &'static str = "application/json"; + type Output = CharacterGetRecordOutput; + type Err = RecordError; +} + +impl From> for Character { + fn from(output: CharacterGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Character { + const NSID: &'static str = "world.ptah.temp.character"; + type Record = CharacterRecord; +} + +impl Collection for CharacterRecord { + const NSID: &'static str = "world.ptah.temp.character"; + type Record = CharacterRecord; +} + +impl LexiconSchema for Character { + fn nsid() -> &'static str { + "world.ptah.temp.character" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_character() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.description { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("description"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.description { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("description"), + max: 1024usize, + actual: count, + }); + } + } + } + { + let value = &self.name; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.name; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("name"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.source_reference { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("source_reference"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.source_reference { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("source_reference"), + max: 1024usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +fn lexicon_doc_world_ptah_temp_character() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.character"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("characterProperties"), + LexUserType::Object(LexObject { + description: Some( + CowStr::new_static( + "Flexible key-value properties for any kind of world. All fields optional — worlds define what matters.", + ), + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("abilities"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Notable abilities or powers."), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("affiliation"), + LexObjectProperty::String(LexString { + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("age"), + LexObjectProperty::String(LexString { + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("role"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Narrative or social role within the world.", + ), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("species"), + LexObjectProperty::String(LexString { + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A birth certificate crossed with a passport. Ptah speaks the name and the thing exists — the character exists because it was named and the naming is permanent.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("name"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("authorshipRecord"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Permanent, immutable link back to the creator. This never changes even if the character gets contributed to, built on, or rendered a thousand different ways.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The canonical standing of this character within its world.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("controlType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "How control of this character is governed. Solves the Ghost Character problem in public domain worlds.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of character creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Who created this character. This never changes — it is the provenance that travels.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("description"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Who this character is, in plain language.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("name"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What the character is called."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("originType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The intellectual property origin of this character.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("properties"), + LexObjectProperty::Ref(LexRef { + r#ref: CowStr::new_static("#characterProperties"), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("roleReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the Role record this character is an instance of. If present, this character is a specific performance of a shared role rather than a wholly original character.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "If originType is publicDomain, the specific source.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world record this character belongs to.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} + +pub mod character_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 CreatorDid; + type CreatedAt; + type Name; + type WorldReference; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type CreatorDid = Unset; + type CreatedAt = Unset; + type Name = Unset; + type WorldReference = Unset; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type CreatorDid = Set; + type CreatedAt = St::CreatedAt; + type Name = St::Name; + type WorldReference = St::WorldReference; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatorDid = St::CreatorDid; + type CreatedAt = Set; + type Name = St::Name; + type WorldReference = St::WorldReference; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatorDid = St::CreatorDid; + type CreatedAt = St::CreatedAt; + type Name = Set; + type WorldReference = St::WorldReference; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type CreatorDid = St::CreatorDid; + type CreatedAt = St::CreatedAt; + type Name = St::Name; + type WorldReference = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `creator_did` field + pub struct creator_did(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `world_reference` field + pub struct world_reference(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct CharacterBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option>, + Option>, + Option, + Option>, + Option, + Option, + Option>, + Option>, + Option>, + Option, + Option>, + ), + _type: PhantomData S>, +} + +impl Character { + /// Create a new builder for this type. + pub fn new() -> CharacterBuilder { + CharacterBuilder::new() + } +} + +impl CharacterBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + CharacterBuilder { + _state: PhantomData, + _fields: ( + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + ), + _type: PhantomData, + } + } +} + +impl CharacterBuilder { + /// Set the `authorshipRecord` field (optional) + pub fn authorship_record(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `authorshipRecord` field to an Option value (optional) + pub fn maybe_authorship_record(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl CharacterBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.1 = value; + self + } +} + +impl CharacterBuilder { + /// Set the `controlType` field (optional) + pub fn control_type( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `controlType` field to an Option value (optional) + pub fn maybe_control_type(mut self, value: Option>) -> Self { + self._fields.2 = value; + self + } +} + +impl CharacterBuilder +where + St: character_state::State, + St::CreatedAt: character_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> CharacterBuilder> { + self._fields.3 = Option::Some(value.into()); + CharacterBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl CharacterBuilder +where + St: character_state::State, + St::CreatorDid: character_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> CharacterBuilder> { + self._fields.4 = Option::Some(value.into()); + CharacterBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl CharacterBuilder { + /// Set the `description` field (optional) + pub fn description(mut self, value: impl Into>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `description` field to an Option value (optional) + pub fn maybe_description(mut self, value: Option) -> Self { + self._fields.5 = value; + self + } +} + +impl CharacterBuilder +where + St: character_state::State, + St::Name: character_state::IsUnset, +{ + /// Set the `name` field (required) + pub fn name( + mut self, + value: impl Into, + ) -> CharacterBuilder> { + self._fields.6 = Option::Some(value.into()); + CharacterBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl CharacterBuilder { + /// Set the `originType` field (optional) + pub fn origin_type( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `originType` field to an Option value (optional) + pub fn maybe_origin_type(mut self, value: Option>) -> Self { + self._fields.7 = value; + self + } +} + +impl CharacterBuilder { + /// Set the `properties` field (optional) + pub fn properties( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `properties` field to an Option value (optional) + pub fn maybe_properties( + mut self, + value: Option>, + ) -> Self { + self._fields.8 = value; + self + } +} + +impl CharacterBuilder { + /// Set the `roleReference` field (optional) + pub fn role_reference(mut self, value: impl Into>>) -> Self { + self._fields.9 = value.into(); + self + } + /// Set the `roleReference` field to an Option value (optional) + pub fn maybe_role_reference(mut self, value: Option>) -> Self { + self._fields.9 = value; + self + } +} + +impl CharacterBuilder { + /// Set the `sourceReference` field (optional) + pub fn source_reference(mut self, value: impl Into>) -> Self { + self._fields.10 = value.into(); + self + } + /// Set the `sourceReference` field to an Option value (optional) + pub fn maybe_source_reference(mut self, value: Option) -> Self { + self._fields.10 = value; + self + } +} + +impl CharacterBuilder +where + St: character_state::State, + St::WorldReference: character_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> CharacterBuilder> { + self._fields.11 = Option::Some(value.into()); + CharacterBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl CharacterBuilder +where + St: character_state::State, + St::CreatorDid: character_state::IsSet, + St::CreatedAt: character_state::IsSet, + St::Name: character_state::IsSet, + St::WorldReference: character_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Character { + Character { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + control_type: self._fields.2, + created_at: self._fields.3.unwrap(), + creator_did: self._fields.4.unwrap(), + description: self._fields.5, + name: self._fields.6.unwrap(), + origin_type: self._fields.7, + properties: self._fields.8, + role_reference: self._fields.9, + source_reference: self._fields.10, + world_reference: self._fields.11.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Character { + Character { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + control_type: self._fields.2, + created_at: self._fields.3.unwrap(), + creator_did: self._fields.4.unwrap(), + description: self._fields.5, + name: self._fields.6.unwrap(), + origin_type: self._fields.7, + properties: self._fields.8, + role_reference: self._fields.9, + source_reference: self._fields.10, + world_reference: self._fields.11.unwrap(), + extra_data: Some(extra_data), + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/contribution.rs b/crates/jacquard-api/src/world_ptah/temp/contribution.rs new file mode 100644 index 000000000..1495ebc67 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/contribution.rs @@ -0,0 +1,876 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.contribution +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A deed of addition. Imhotep — the most famous architect in history, deified as the Son of Ptah. Every contributor to a world is an Imhotep. They build within the tradition of the master. Their work is attributed. The lineage is unbroken. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.contribution", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Contribution { + ///An array tracing every hand this contribution passed through. AT URIs of prior contribution records or DIDs. This is the Carryforward logic expressed at the protocol layer. + #[serde(skip_serializing_if = "Option::is_none")] + pub attribution_chain: Option>>, + ///The canonical standing of this contribution within the world. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///What kind of contribution and which record type it links to. + #[serde(skip_serializing_if = "Option::is_none")] + pub contribution_type: Option>, + ///Who is making the contribution. + pub contributor_did: Did, + ///Timestamp of the contribution. + pub created_at: Datetime, + ///The approval status of this contribution. + #[serde(skip_serializing_if = "Option::is_none")] + pub originator_approval: Option>, + ///Whether this contribution complies with public domain sourcing requirements. Relevant for catalog worlds. + #[serde(skip_serializing_if = "Option::is_none")] + pub public_domain_compliance: Option, + ///The AT URI of the primary record being contributed. The Contribution record is the anchor of attribution — not the exhaustive list of every record the contributor touched. The full scope is discoverable via DID query across record types. + #[serde(skip_serializing_if = "Option::is_none")] + pub record_reference: Option>, + ///The AT URI of the world being contributed to. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// The canonical standing of this contribution within the world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ContributionCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl ContributionCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ContributionCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ContributionCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ContributionCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> +for ContributionCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ContributionCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ContributionCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ContributionCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + ContributionCanonicalStatus::CanonicalStatusOfficial => { + ContributionCanonicalStatus::CanonicalStatusOfficial + } + ContributionCanonicalStatus::CanonicalStatusCommunity => { + ContributionCanonicalStatus::CanonicalStatusCommunity + } + ContributionCanonicalStatus::CanonicalStatusApocryphal => { + ContributionCanonicalStatus::CanonicalStatusApocryphal + } + ContributionCanonicalStatus::Other(v) => { + ContributionCanonicalStatus::Other(v.into_static()) + } + } + } +} + +/// What kind of contribution and which record type it links to. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ContributionContributionType { + Character, + Role, + Action, + Event, + Lore, + Location, + Other(S), +} + +impl ContributionContributionType { + pub fn as_str(&self) -> &str { + match self { + Self::Character => "character", + Self::Role => "role", + Self::Action => "action", + Self::Event => "event", + Self::Lore => "lore", + Self::Location => "location", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "character" => Self::Character, + "role" => Self::Role, + "action" => Self::Action, + "event" => Self::Event, + "lore" => Self::Lore, + "location" => Self::Location, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ContributionContributionType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ContributionContributionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ContributionContributionType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> +for ContributionContributionType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ContributionContributionType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ContributionContributionType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ContributionContributionType; + fn into_static(self) -> Self::Output { + match self { + ContributionContributionType::Character => { + ContributionContributionType::Character + } + ContributionContributionType::Role => ContributionContributionType::Role, + ContributionContributionType::Action => ContributionContributionType::Action, + ContributionContributionType::Event => ContributionContributionType::Event, + ContributionContributionType::Lore => ContributionContributionType::Lore, + ContributionContributionType::Location => { + ContributionContributionType::Location + } + ContributionContributionType::Other(v) => { + ContributionContributionType::Other(v.into_static()) + } + } + } +} + +/// The approval status of this contribution. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum ContributionOriginatorApproval { + Approved, + PreApproved, + CommunityCanon, + Other(S), +} + +impl ContributionOriginatorApproval { + pub fn as_str(&self) -> &str { + match self { + Self::Approved => "approved", + Self::PreApproved => "preApproved", + Self::CommunityCanon => "communityCanon", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "approved" => Self::Approved, + "preApproved" => Self::PreApproved, + "communityCanon" => Self::CommunityCanon, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for ContributionOriginatorApproval { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for ContributionOriginatorApproval { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for ContributionOriginatorApproval { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> +for ContributionOriginatorApproval { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for ContributionOriginatorApproval { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for ContributionOriginatorApproval +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = ContributionOriginatorApproval; + fn into_static(self) -> Self::Output { + match self { + ContributionOriginatorApproval::Approved => { + ContributionOriginatorApproval::Approved + } + ContributionOriginatorApproval::PreApproved => { + ContributionOriginatorApproval::PreApproved + } + ContributionOriginatorApproval::CommunityCanon => { + ContributionOriginatorApproval::CommunityCanon + } + ContributionOriginatorApproval::Other(v) => { + ContributionOriginatorApproval::Other(v.into_static()) + } + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct ContributionGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Contribution, +} + +impl Contribution { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct ContributionRecord; +impl XrpcResp for ContributionRecord { + const NSID: &'static str = "world.ptah.temp.contribution"; + const ENCODING: &'static str = "application/json"; + type Output = ContributionGetRecordOutput; + type Err = RecordError; +} + +impl From> for Contribution { + fn from(output: ContributionGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Contribution { + const NSID: &'static str = "world.ptah.temp.contribution"; + type Record = ContributionRecord; +} + +impl Collection for ContributionRecord { + const NSID: &'static str = "world.ptah.temp.contribution"; + type Record = ContributionRecord; +} + +impl LexiconSchema for Contribution { + fn nsid() -> &'static str { + "world.ptah.temp.contribution" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_contribution() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.contribution_type { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("contribution_type"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.contribution_type { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("contribution_type"), + max: 64usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod contribution_state { + + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; + #[allow(unused)] + use ::core::marker::PhantomData; + mod sealed { + pub trait Sealed {} + } + /// State trait tracking which required fields have been set + pub trait State: sealed::Sealed { + type CreatedAt; + type ContributorDid; + type WorldReference; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type CreatedAt = Unset; + type ContributorDid = Unset; + type WorldReference = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type ContributorDid = St::ContributorDid; + type WorldReference = St::WorldReference; + } + ///State transition - sets the `contributor_did` field to Set + pub struct SetContributorDid(PhantomData St>); + impl sealed::Sealed for SetContributorDid {} + impl State for SetContributorDid { + type CreatedAt = St::CreatedAt; + type ContributorDid = Set; + type WorldReference = St::WorldReference; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type CreatedAt = St::CreatedAt; + type ContributorDid = St::ContributorDid; + type WorldReference = 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 `contributor_did` field + pub struct contributor_did(()); + ///Marker type for the `world_reference` field + pub struct world_reference(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ContributionBuilder { + _state: PhantomData St>, + _fields: ( + Option>>, + Option>, + Option>, + Option>, + Option, + Option>, + Option, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Contribution { + /// Create a new builder for this type. + pub fn new() -> ContributionBuilder { + ContributionBuilder::new() + } +} + +impl ContributionBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ContributionBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl ContributionBuilder { + /// Set the `attributionChain` field (optional) + pub fn attribution_chain(mut self, value: impl Into>>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `attributionChain` field to an Option value (optional) + pub fn maybe_attribution_chain(mut self, value: Option>>) -> Self { + self._fields.0 = value; + self + } +} + +impl ContributionBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.1 = value; + self + } +} + +impl ContributionBuilder { + /// Set the `contributionType` field (optional) + pub fn contribution_type( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `contributionType` field to an Option value (optional) + pub fn maybe_contribution_type( + mut self, + value: Option>, + ) -> Self { + self._fields.2 = value; + self + } +} + +impl ContributionBuilder +where + St: contribution_state::State, + St::ContributorDid: contribution_state::IsUnset, +{ + /// Set the `contributorDID` field (required) + pub fn contributor_did( + mut self, + value: impl Into>, + ) -> ContributionBuilder> { + self._fields.3 = Option::Some(value.into()); + ContributionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ContributionBuilder +where + St: contribution_state::State, + St::CreatedAt: contribution_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> ContributionBuilder> { + self._fields.4 = Option::Some(value.into()); + ContributionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ContributionBuilder { + /// Set the `originatorApproval` field (optional) + pub fn originator_approval( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `originatorApproval` field to an Option value (optional) + pub fn maybe_originator_approval( + mut self, + value: Option>, + ) -> Self { + self._fields.5 = value; + self + } +} + +impl ContributionBuilder { + /// Set the `publicDomainCompliance` field (optional) + pub fn public_domain_compliance(mut self, value: impl Into>) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `publicDomainCompliance` field to an Option value (optional) + pub fn maybe_public_domain_compliance(mut self, value: Option) -> Self { + self._fields.6 = value; + self + } +} + +impl ContributionBuilder { + /// Set the `recordReference` field (optional) + pub fn record_reference(mut self, value: impl Into>>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `recordReference` field to an Option value (optional) + pub fn maybe_record_reference(mut self, value: Option>) -> Self { + self._fields.7 = value; + self + } +} + +impl ContributionBuilder +where + St: contribution_state::State, + St::WorldReference: contribution_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> ContributionBuilder> { + self._fields.8 = Option::Some(value.into()); + ContributionBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ContributionBuilder +where + St: contribution_state::State, + St::CreatedAt: contribution_state::IsSet, + St::ContributorDid: contribution_state::IsSet, + St::WorldReference: contribution_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Contribution { + Contribution { + attribution_chain: self._fields.0, + canonical_status: self._fields.1, + contribution_type: self._fields.2, + contributor_did: self._fields.3.unwrap(), + created_at: self._fields.4.unwrap(), + originator_approval: self._fields.5, + public_domain_compliance: self._fields.6, + record_reference: self._fields.7, + world_reference: self._fields.8.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Contribution { + Contribution { + attribution_chain: self._fields.0, + canonical_status: self._fields.1, + contribution_type: self._fields.2, + contributor_did: self._fields.3.unwrap(), + created_at: self._fields.4.unwrap(), + originator_approval: self._fields.5, + public_domain_compliance: self._fields.6, + record_reference: self._fields.7, + world_reference: self._fields.8.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_contribution() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.contribution"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A deed of addition. Imhotep — the most famous architect in history, deified as the Son of Ptah. Every contributor to a world is an Imhotep. They build within the tradition of the master. Their work is attributed. The lineage is unbroken.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("contributorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("attributionChain"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "An array tracing every hand this contribution passed through. AT URIs of prior contribution records or DIDs. This is the Carryforward logic expressed at the protocol layer.", + ), + ), + items: LexArrayItem::String(LexString { + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The canonical standing of this contribution within the world.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("contributionType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "What kind of contribution and which record type it links to.", + ), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("contributorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Who is making the contribution."), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of the contribution."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("originatorApproval"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The approval status of this contribution.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("publicDomainCompliance"), + LexObjectProperty::Boolean(LexBoolean { + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("recordReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the primary record being contributed. The Contribution record is the anchor of attribution — not the exhaustive list of every record the contributor touched. The full scope is discoverable via DID query across record types.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world being contributed to.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/declaration.rs b/crates/jacquard-api/src/world_ptah/temp/declaration.rs new file mode 100644 index 000000000..5e206b29a --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/declaration.rs @@ -0,0 +1,358 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.declaration +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// Declaration of participation in The Ptah Protocol. Create this record to signal that your account is active in the Ptah ecosystem. Delete it to deactivate. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.declaration", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Declaration { + ///Timestamp of when this account first declared participation. + pub created_at: Datetime, + ///Short description of the participant's role or interests in the Ptah ecosystem. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + ///Human-readable name for this participant. Not a character name — the person behind the characters. + #[serde(skip_serializing_if = "Option::is_none")] + pub display_name: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct DeclarationGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Declaration, +} + +impl Declaration { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct DeclarationRecord; +impl XrpcResp for DeclarationRecord { + const NSID: &'static str = "world.ptah.temp.declaration"; + const ENCODING: &'static str = "application/json"; + type Output = DeclarationGetRecordOutput; + type Err = RecordError; +} + +impl From> for Declaration { + fn from(output: DeclarationGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Declaration { + const NSID: &'static str = "world.ptah.temp.declaration"; + type Record = DeclarationRecord; +} + +impl Collection for DeclarationRecord { + const NSID: &'static str = "world.ptah.temp.declaration"; + type Record = DeclarationRecord; +} + +impl LexiconSchema for Declaration { + fn nsid() -> &'static str { + "world.ptah.temp.declaration" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_declaration() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.description { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("description"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.description { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("description"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.display_name { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("display_name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.display_name { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("display_name"), + max: 64usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod declaration_state { + + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; + #[allow(unused)] + use ::core::marker::PhantomData; + mod sealed { + pub trait Sealed {} + } + /// State trait tracking which required fields have been set + pub trait State: sealed::Sealed { + type CreatedAt; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + 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(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct DeclarationBuilder { + _state: PhantomData St>, + _fields: (Option, Option, Option), + _type: PhantomData S>, +} + +impl Declaration { + /// Create a new builder for this type. + pub fn new() -> DeclarationBuilder { + DeclarationBuilder::new() + } +} + +impl DeclarationBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + DeclarationBuilder { + _state: PhantomData, + _fields: (None, None, None), + _type: PhantomData, + } + } +} + +impl DeclarationBuilder +where + St: declaration_state::State, + St::CreatedAt: declaration_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> DeclarationBuilder> { + self._fields.0 = Option::Some(value.into()); + DeclarationBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl DeclarationBuilder { + /// Set the `description` field (optional) + pub fn description(mut self, value: impl Into>) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `description` field to an Option value (optional) + pub fn maybe_description(mut self, value: Option) -> Self { + self._fields.1 = value; + self + } +} + +impl DeclarationBuilder { + /// Set the `displayName` field (optional) + pub fn display_name(mut self, value: impl Into>) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `displayName` field to an Option value (optional) + pub fn maybe_display_name(mut self, value: Option) -> Self { + self._fields.2 = value; + self + } +} + +impl DeclarationBuilder +where + St: declaration_state::State, + St::CreatedAt: declaration_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Declaration { + Declaration { + created_at: self._fields.0.unwrap(), + description: self._fields.1, + display_name: self._fields.2, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data( + self, + extra_data: BTreeMap>, + ) -> Declaration { + Declaration { + created_at: self._fields.0.unwrap(), + description: self._fields.1, + display_name: self._fields.2, + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_declaration() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.declaration"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "Declaration of participation in The Ptah Protocol. Create this record to signal that your account is active in the Ptah ecosystem. Delete it to deactivate.", + ), + ), + key: Some(CowStr::new_static("literal:self")), + record: LexRecordRecord::Object(LexObject { + required: Some(vec![SmolStr::new_static("createdAt")]), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Timestamp of when this account first declared participation.", + ), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("description"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Short description of the participant's role or interests in the Ptah ecosystem.", + ), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("displayName"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Human-readable name for this participant. Not a character name — the person behind the characters.", + ), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/event.rs b/crates/jacquard-api/src/world_ptah/temp/event.rs new file mode 100644 index 000000000..b9c674521 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/event.rs @@ -0,0 +1,1199 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.event +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A boxing match program combined with a history book entry. Before the fight it is a schedule. After the fight it is a permanent record. Ptah-Seker-Osiris — creation, shadow, rebirth. The event holds all three phases simultaneously. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.event", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Event { + ///Timestamp of when the event concluded. + #[serde(skip_serializing_if = "Option::is_none")] + pub completed_at: Option, + ///Timestamp of event creation. + pub created_at: Datetime, + ///Who organized this event. + pub creator_did: Did, + ///What kind of event. Open-ended. + #[serde(skip_serializing_if = "Option::is_none")] + pub event_type: Option>, + ///The competitive or structural format of the event. + #[serde(skip_serializing_if = "Option::is_none")] + pub format: Option>, + ///The AT URI of the location where this event happened. + #[serde(skip_serializing_if = "Option::is_none")] + pub location_reference: Option>, + ///The narrative standing of this event in the world's timeline. + #[serde(skip_serializing_if = "Option::is_none")] + pub lore_status: Option>, + ///What this event is called. + pub name: S, + ///AT URIs of the character records participating. Not people — characters. + #[serde(skip_serializing_if = "Option::is_none")] + pub participants: Option>>, + ///The outcome. Populated when status moves to completed. + #[serde(skip_serializing_if = "Option::is_none")] + pub result: Option, + ///What is at risk or being contested. + #[serde(skip_serializing_if = "Option::is_none")] + pub stakes: Option, + ///The current phase of the event. + #[serde(skip_serializing_if = "Option::is_none")] + pub status: Option>, + ///AT URIs of individual witness action records. Each witness action is a real record created by a real DID at a real timestamp. Witnessing is a verifiable technical contribution, not just a tally. + #[serde(skip_serializing_if = "Option::is_none")] + pub witnesses: Option>>, + ///The AT URI of the world this event occurred in. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// What kind of event. Open-ended. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum EventEventType { + Tournament, + Battle, + Gathering, + Contest, + Ritual, + Other(S), +} + +impl EventEventType { + pub fn as_str(&self) -> &str { + match self { + Self::Tournament => "tournament", + Self::Battle => "battle", + Self::Gathering => "gathering", + Self::Contest => "contest", + Self::Ritual => "ritual", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "tournament" => Self::Tournament, + "battle" => Self::Battle, + "gathering" => Self::Gathering, + "contest" => Self::Contest, + "ritual" => Self::Ritual, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for EventEventType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for EventEventType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for EventEventType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for EventEventType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for EventEventType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for EventEventType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = EventEventType; + fn into_static(self) -> Self::Output { + match self { + EventEventType::Tournament => EventEventType::Tournament, + EventEventType::Battle => EventEventType::Battle, + EventEventType::Gathering => EventEventType::Gathering, + EventEventType::Contest => EventEventType::Contest, + EventEventType::Ritual => EventEventType::Ritual, + EventEventType::Other(v) => EventEventType::Other(v.into_static()), + } + } +} + +/// The competitive or structural format of the event. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum EventFormat { + Bracket, + RoundRobin, + OpenChallenge, + SingleElimination, + Other(S), +} + +impl EventFormat { + pub fn as_str(&self) -> &str { + match self { + Self::Bracket => "bracket", + Self::RoundRobin => "roundRobin", + Self::OpenChallenge => "openChallenge", + Self::SingleElimination => "singleElimination", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "bracket" => Self::Bracket, + "roundRobin" => Self::RoundRobin, + "openChallenge" => Self::OpenChallenge, + "singleElimination" => Self::SingleElimination, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for EventFormat { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for EventFormat { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for EventFormat { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for EventFormat { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for EventFormat { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for EventFormat +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = EventFormat; + fn into_static(self) -> Self::Output { + match self { + EventFormat::Bracket => EventFormat::Bracket, + EventFormat::RoundRobin => EventFormat::RoundRobin, + EventFormat::OpenChallenge => EventFormat::OpenChallenge, + EventFormat::SingleElimination => EventFormat::SingleElimination, + EventFormat::Other(v) => EventFormat::Other(v.into_static()), + } + } +} + +/// The narrative standing of this event in the world's timeline. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum EventLoreStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + Pending, + Other(S), +} + +impl EventLoreStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::Pending => "pending", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "pending" => Self::Pending, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for EventLoreStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for EventLoreStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for EventLoreStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for EventLoreStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for EventLoreStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for EventLoreStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = EventLoreStatus; + fn into_static(self) -> Self::Output { + match self { + EventLoreStatus::CanonicalStatusOfficial => { + EventLoreStatus::CanonicalStatusOfficial + } + EventLoreStatus::CanonicalStatusCommunity => { + EventLoreStatus::CanonicalStatusCommunity + } + EventLoreStatus::Pending => EventLoreStatus::Pending, + EventLoreStatus::Other(v) => EventLoreStatus::Other(v.into_static()), + } + } +} + +/// The current phase of the event. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum EventStatus { + Upcoming, + Active, + Completed, + Other(S), +} + +impl EventStatus { + pub fn as_str(&self) -> &str { + match self { + Self::Upcoming => "upcoming", + Self::Active => "active", + Self::Completed => "completed", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "upcoming" => Self::Upcoming, + "active" => Self::Active, + "completed" => Self::Completed, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for EventStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for EventStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for EventStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for EventStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for EventStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for EventStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = EventStatus; + fn into_static(self) -> Self::Output { + match self { + EventStatus::Upcoming => EventStatus::Upcoming, + EventStatus::Active => EventStatus::Active, + EventStatus::Completed => EventStatus::Completed, + EventStatus::Other(v) => EventStatus::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct EventGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Event, +} + +impl Event { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct EventRecord; +impl XrpcResp for EventRecord { + const NSID: &'static str = "world.ptah.temp.event"; + const ENCODING: &'static str = "application/json"; + type Output = EventGetRecordOutput; + type Err = RecordError; +} + +impl From> for Event { + fn from(output: EventGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Event { + const NSID: &'static str = "world.ptah.temp.event"; + type Record = EventRecord; +} + +impl Collection for EventRecord { + const NSID: &'static str = "world.ptah.temp.event"; + type Record = EventRecord; +} + +impl LexiconSchema for Event { + fn nsid() -> &'static str { + "world.ptah.temp.event" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_event() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.event_type { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("event_type"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.event_type { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("event_type"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.format { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("format"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.format { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("format"), + max: 64usize, + actual: count, + }); + } + } + } + { + let value = &self.name; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.name; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("name"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.result { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("result"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.result { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("result"), + max: 1024usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.stakes { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("stakes"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.stakes { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("stakes"), + max: 1024usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod event_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 Name; + type CreatedAt; + type WorldReference; + type CreatorDid; + } + /// 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 WorldReference = Unset; + type CreatorDid = Unset; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; + type CreatedAt = St::CreatedAt; + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type CreatedAt = Set; + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type WorldReference = Set; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type Name = St::Name; + type CreatedAt = St::CreatedAt; + type WorldReference = St::WorldReference; + type CreatorDid = 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 `world_reference` field + pub struct world_reference(()); + ///Marker type for the `creator_did` field + pub struct creator_did(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct EventBuilder { + _state: PhantomData St>, + _fields: ( + Option, + Option, + Option>, + Option>, + Option>, + Option>, + Option>, + Option, + Option>>, + Option, + Option, + Option>, + Option>>, + Option>, + ), + _type: PhantomData S>, +} + +impl Event { + /// Create a new builder for this type. + pub fn new() -> EventBuilder { + EventBuilder::new() + } +} + +impl EventBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + EventBuilder { + _state: PhantomData, + _fields: ( + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + ), + _type: PhantomData, + } + } +} + +impl EventBuilder { + /// Set the `completedAt` field (optional) + pub fn completed_at(mut self, value: impl Into>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `completedAt` field to an Option value (optional) + pub fn maybe_completed_at(mut self, value: Option) -> Self { + self._fields.0 = value; + self + } +} + +impl EventBuilder +where + St: event_state::State, + St::CreatedAt: event_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> EventBuilder> { + self._fields.1 = Option::Some(value.into()); + EventBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl EventBuilder +where + St: event_state::State, + St::CreatorDid: event_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> EventBuilder> { + self._fields.2 = Option::Some(value.into()); + EventBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl EventBuilder { + /// Set the `eventType` field (optional) + pub fn event_type(mut self, value: impl Into>>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `eventType` field to an Option value (optional) + pub fn maybe_event_type(mut self, value: Option>) -> Self { + self._fields.3 = value; + self + } +} + +impl EventBuilder { + /// Set the `format` field (optional) + pub fn format(mut self, value: impl Into>>) -> Self { + self._fields.4 = value.into(); + self + } + /// Set the `format` field to an Option value (optional) + pub fn maybe_format(mut self, value: Option>) -> Self { + self._fields.4 = value; + self + } +} + +impl EventBuilder { + /// Set the `locationReference` field (optional) + pub fn location_reference(mut self, value: impl Into>>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `locationReference` field to an Option value (optional) + pub fn maybe_location_reference(mut self, value: Option>) -> Self { + self._fields.5 = value; + self + } +} + +impl EventBuilder { + /// Set the `loreStatus` field (optional) + pub fn lore_status(mut self, value: impl Into>>) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `loreStatus` field to an Option value (optional) + pub fn maybe_lore_status(mut self, value: Option>) -> Self { + self._fields.6 = value; + self + } +} + +impl EventBuilder +where + St: event_state::State, + St::Name: event_state::IsUnset, +{ + /// Set the `name` field (required) + pub fn name( + mut self, + value: impl Into, + ) -> EventBuilder> { + self._fields.7 = Option::Some(value.into()); + EventBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl EventBuilder { + /// Set the `participants` field (optional) + pub fn participants(mut self, value: impl Into>>>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `participants` field to an Option value (optional) + pub fn maybe_participants(mut self, value: Option>>) -> Self { + self._fields.8 = value; + self + } +} + +impl EventBuilder { + /// Set the `result` field (optional) + pub fn result(mut self, value: impl Into>) -> Self { + self._fields.9 = value.into(); + self + } + /// Set the `result` field to an Option value (optional) + pub fn maybe_result(mut self, value: Option) -> Self { + self._fields.9 = value; + self + } +} + +impl EventBuilder { + /// Set the `stakes` field (optional) + pub fn stakes(mut self, value: impl Into>) -> Self { + self._fields.10 = value.into(); + self + } + /// Set the `stakes` field to an Option value (optional) + pub fn maybe_stakes(mut self, value: Option) -> Self { + self._fields.10 = value; + self + } +} + +impl EventBuilder { + /// Set the `status` field (optional) + pub fn status(mut self, value: impl Into>>) -> Self { + self._fields.11 = value.into(); + self + } + /// Set the `status` field to an Option value (optional) + pub fn maybe_status(mut self, value: Option>) -> Self { + self._fields.11 = value; + self + } +} + +impl EventBuilder { + /// Set the `witnesses` field (optional) + pub fn witnesses(mut self, value: impl Into>>>) -> Self { + self._fields.12 = value.into(); + self + } + /// Set the `witnesses` field to an Option value (optional) + pub fn maybe_witnesses(mut self, value: Option>>) -> Self { + self._fields.12 = value; + self + } +} + +impl EventBuilder +where + St: event_state::State, + St::WorldReference: event_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> EventBuilder> { + self._fields.13 = Option::Some(value.into()); + EventBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl EventBuilder +where + St: event_state::State, + St::Name: event_state::IsSet, + St::CreatedAt: event_state::IsSet, + St::WorldReference: event_state::IsSet, + St::CreatorDid: event_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Event { + Event { + completed_at: self._fields.0, + created_at: self._fields.1.unwrap(), + creator_did: self._fields.2.unwrap(), + event_type: self._fields.3, + format: self._fields.4, + location_reference: self._fields.5, + lore_status: self._fields.6, + name: self._fields.7.unwrap(), + participants: self._fields.8, + result: self._fields.9, + stakes: self._fields.10, + status: self._fields.11, + witnesses: self._fields.12, + world_reference: self._fields.13.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Event { + Event { + completed_at: self._fields.0, + created_at: self._fields.1.unwrap(), + creator_did: self._fields.2.unwrap(), + event_type: self._fields.3, + format: self._fields.4, + location_reference: self._fields.5, + lore_status: self._fields.6, + name: self._fields.7.unwrap(), + participants: self._fields.8, + result: self._fields.9, + stakes: self._fields.10, + status: self._fields.11, + witnesses: self._fields.12, + world_reference: self._fields.13.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_event() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.event"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A boxing match program combined with a history book entry. Before the fight it is a schedule. After the fight it is a permanent record. Ptah-Seker-Osiris — creation, shadow, rebirth. The event holds all three phases simultaneously.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("name"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("completedAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of when the event concluded."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of event creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Who organized this event."), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("eventType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What kind of event. Open-ended."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("format"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The competitive or structural format of the event.", + ), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("locationReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the location where this event happened.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("loreStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The narrative standing of this event in the world's timeline.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("name"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What this event is called."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("participants"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "AT URIs of the character records participating. Not people — characters.", + ), + ), + items: LexArrayItem::String(LexString { + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("result"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The outcome. Populated when status moves to completed.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("stakes"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What is at risk or being contested."), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("status"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The current phase of the event."), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("witnesses"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "AT URIs of individual witness action records. Each witness action is a real record created by a real DID at a real timestamp. Witnessing is a verifiable technical contribution, not just a tally.", + ), + ), + items: LexArrayItem::String(LexString { + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world this event occurred in.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/location.rs b/crates/jacquard-api/src/world_ptah/temp/location.rs new file mode 100644 index 000000000..a93f2093a --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/location.rs @@ -0,0 +1,1082 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.location +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +use crate::world_ptah::temp::location; +/// Flexible properties for any kind of world geography. All fields optional — worlds define what matters. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct LocationProperties { + #[serde(skip_serializing_if = "Option::is_none")] + pub climate: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub controlling_faction: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub notable_history: Option, + #[serde(skip_serializing_if = "Option::is_none")] + pub population: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// A pin dropped on a map that does not exist yet. The pin creates the place. Hwt-ka-Ptah — the House of the Ka of Ptah — gave Egypt its name. A place becomes so significant that it names everything around it. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.location", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Location { + ///Permanent link to the creator. Provenance travels. + #[serde(skip_serializing_if = "Option::is_none")] + pub authorship_record: Option>, + ///The canonical standing of this location within its world. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///Timestamp of location creation. + pub created_at: Datetime, + ///Who named and defined this place. + pub creator_did: Did, + ///How deep in the geographic hierarchy this location sits. World-level is 0, continent is 1, country is 2, city is 3, and so on. Any rendering layer can read this single number and decide how much geographic context it needs without traversing the full parent chain. + #[serde(skip_serializing_if = "Option::is_none")] + pub depth_index: Option, + ///What kind of place this is, in plain language. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + ///The geographic or spatial classification. Open-ended so any kind of world geography works. + #[serde(skip_serializing_if = "Option::is_none")] + pub location_type: Option>, + ///What this place is called. + pub name: S, + ///If this location exists inside a larger location — a tavern inside a city, a room inside a building. Lets geography nest infinitely. Places come into existence as people need them. + #[serde(skip_serializing_if = "Option::is_none")] + pub parent_location: Option>, + ///Flexible fields — climate, population, controlling faction, notable history. Whatever the world requires. + #[serde(skip_serializing_if = "Option::is_none")] + pub properties: Option>, + ///The AT URI of the world this location exists in. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// The canonical standing of this location within its world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum LocationCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl LocationCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for LocationCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for LocationCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for LocationCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for LocationCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for LocationCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for LocationCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = LocationCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + LocationCanonicalStatus::CanonicalStatusOfficial => { + LocationCanonicalStatus::CanonicalStatusOfficial + } + LocationCanonicalStatus::CanonicalStatusCommunity => { + LocationCanonicalStatus::CanonicalStatusCommunity + } + LocationCanonicalStatus::CanonicalStatusApocryphal => { + LocationCanonicalStatus::CanonicalStatusApocryphal + } + LocationCanonicalStatus::Other(v) => { + LocationCanonicalStatus::Other(v.into_static()) + } + } + } +} + +/// The geographic or spatial classification. Open-ended so any kind of world geography works. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum LocationLocationType { + City, + Region, + Building, + Territory, + Landmark, + Vessel, + AbstractSpace, + Other(S), +} + +impl LocationLocationType { + pub fn as_str(&self) -> &str { + match self { + Self::City => "city", + Self::Region => "region", + Self::Building => "building", + Self::Territory => "territory", + Self::Landmark => "landmark", + Self::Vessel => "vessel", + Self::AbstractSpace => "abstractSpace", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "city" => Self::City, + "region" => Self::Region, + "building" => Self::Building, + "territory" => Self::Territory, + "landmark" => Self::Landmark, + "vessel" => Self::Vessel, + "abstractSpace" => Self::AbstractSpace, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for LocationLocationType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for LocationLocationType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for LocationLocationType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for LocationLocationType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for LocationLocationType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for LocationLocationType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = LocationLocationType; + fn into_static(self) -> Self::Output { + match self { + LocationLocationType::City => LocationLocationType::City, + LocationLocationType::Region => LocationLocationType::Region, + LocationLocationType::Building => LocationLocationType::Building, + LocationLocationType::Territory => LocationLocationType::Territory, + LocationLocationType::Landmark => LocationLocationType::Landmark, + LocationLocationType::Vessel => LocationLocationType::Vessel, + LocationLocationType::AbstractSpace => LocationLocationType::AbstractSpace, + LocationLocationType::Other(v) => { + LocationLocationType::Other(v.into_static()) + } + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct LocationGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Location, +} + +impl Location { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +impl LexiconSchema for LocationProperties { + fn nsid() -> &'static str { + "world.ptah.temp.location" + } + fn def_name() -> &'static str { + "locationProperties" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_location() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.climate { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("climate"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.climate { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("climate"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.controlling_faction { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("controlling_faction"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.controlling_faction { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("controlling_faction"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.notable_history { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("notable_history"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.notable_history { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("notable_history"), + max: 1024usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.population { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("population"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.population { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("population"), + max: 256usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct LocationRecord; +impl XrpcResp for LocationRecord { + const NSID: &'static str = "world.ptah.temp.location"; + const ENCODING: &'static str = "application/json"; + type Output = LocationGetRecordOutput; + type Err = RecordError; +} + +impl From> for Location { + fn from(output: LocationGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Location { + const NSID: &'static str = "world.ptah.temp.location"; + type Record = LocationRecord; +} + +impl Collection for LocationRecord { + const NSID: &'static str = "world.ptah.temp.location"; + type Record = LocationRecord; +} + +impl LexiconSchema for Location { + fn nsid() -> &'static str { + "world.ptah.temp.location" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_location() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.depth_index { + if *value < 0i64 { + return Err(ConstraintError::Minimum { + path: ValidationPath::from_field("depth_index"), + min: 0i64, + actual: *value, + }); + } + } + if let Some(ref value) = self.description { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("description"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.description { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("description"), + max: 1024usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.location_type { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("location_type"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.location_type { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("location_type"), + max: 64usize, + actual: count, + }); + } + } + } + { + let value = &self.name; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.name; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("name"), + max: 64usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +fn lexicon_doc_world_ptah_temp_location() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.location"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("locationProperties"), + LexUserType::Object(LexObject { + description: Some( + CowStr::new_static( + "Flexible properties for any kind of world geography. All fields optional — worlds define what matters.", + ), + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("climate"), + LexObjectProperty::String(LexString { + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("controllingFaction"), + LexObjectProperty::String(LexString { + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("notableHistory"), + LexObjectProperty::String(LexString { + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("population"), + LexObjectProperty::String(LexString { + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A pin dropped on a map that does not exist yet. The pin creates the place. Hwt-ka-Ptah — the House of the Ka of Ptah — gave Egypt its name. A place becomes so significant that it names everything around it.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("name"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("authorshipRecord"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Permanent link to the creator. Provenance travels.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The canonical standing of this location within its world.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of location creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Who named and defined this place."), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("depthIndex"), + LexObjectProperty::Integer(LexInteger { + minimum: Some(0i64), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("description"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "What kind of place this is, in plain language.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("locationType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The geographic or spatial classification. Open-ended so any kind of world geography works.", + ), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("name"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What this place is called."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("parentLocation"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "If this location exists inside a larger location — a tavern inside a city, a room inside a building. Lets geography nest infinitely. Places come into existence as people need them.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("properties"), + LexObjectProperty::Ref(LexRef { + r#ref: CowStr::new_static("#locationProperties"), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world this location exists in.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} + +pub mod location_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 CreatorDid; + type Name; + type WorldReference; + type CreatedAt; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type CreatorDid = Unset; + type Name = Unset; + type WorldReference = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type CreatorDid = Set; + type Name = St::Name; + type WorldReference = St::WorldReference; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatorDid = St::CreatorDid; + type Name = Set; + type WorldReference = St::WorldReference; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type CreatorDid = St::CreatorDid; + type Name = St::Name; + type WorldReference = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatorDid = St::CreatorDid; + type Name = St::Name; + type WorldReference = St::WorldReference; + type CreatedAt = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `creator_did` field + pub struct creator_did(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `world_reference` field + pub struct world_reference(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct LocationBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option>, + Option, + Option>, + Option, + Option, + Option>, + Option, + Option>, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Location { + /// Create a new builder for this type. + pub fn new() -> LocationBuilder { + LocationBuilder::new() + } +} + +impl LocationBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + LocationBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl LocationBuilder { + /// Set the `authorshipRecord` field (optional) + pub fn authorship_record(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `authorshipRecord` field to an Option value (optional) + pub fn maybe_authorship_record(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl LocationBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.1 = value; + self + } +} + +impl LocationBuilder +where + St: location_state::State, + St::CreatedAt: location_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> LocationBuilder> { + self._fields.2 = Option::Some(value.into()); + LocationBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LocationBuilder +where + St: location_state::State, + St::CreatorDid: location_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> LocationBuilder> { + self._fields.3 = Option::Some(value.into()); + LocationBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LocationBuilder { + /// Set the `depthIndex` field (optional) + pub fn depth_index(mut self, value: impl Into>) -> Self { + self._fields.4 = value.into(); + self + } + /// Set the `depthIndex` field to an Option value (optional) + pub fn maybe_depth_index(mut self, value: Option) -> Self { + self._fields.4 = value; + self + } +} + +impl LocationBuilder { + /// Set the `description` field (optional) + pub fn description(mut self, value: impl Into>) -> Self { + self._fields.5 = value.into(); + self + } + /// Set the `description` field to an Option value (optional) + pub fn maybe_description(mut self, value: Option) -> Self { + self._fields.5 = value; + self + } +} + +impl LocationBuilder { + /// Set the `locationType` field (optional) + pub fn location_type( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `locationType` field to an Option value (optional) + pub fn maybe_location_type( + mut self, + value: Option>, + ) -> Self { + self._fields.6 = value; + self + } +} + +impl LocationBuilder +where + St: location_state::State, + St::Name: location_state::IsUnset, +{ + /// Set the `name` field (required) + pub fn name( + mut self, + value: impl Into, + ) -> LocationBuilder> { + self._fields.7 = Option::Some(value.into()); + LocationBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LocationBuilder { + /// Set the `parentLocation` field (optional) + pub fn parent_location(mut self, value: impl Into>>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `parentLocation` field to an Option value (optional) + pub fn maybe_parent_location(mut self, value: Option>) -> Self { + self._fields.8 = value; + self + } +} + +impl LocationBuilder { + /// Set the `properties` field (optional) + pub fn properties( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.9 = value.into(); + self + } + /// Set the `properties` field to an Option value (optional) + pub fn maybe_properties( + mut self, + value: Option>, + ) -> Self { + self._fields.9 = value; + self + } +} + +impl LocationBuilder +where + St: location_state::State, + St::WorldReference: location_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> LocationBuilder> { + self._fields.10 = Option::Some(value.into()); + LocationBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LocationBuilder +where + St: location_state::State, + St::CreatorDid: location_state::IsSet, + St::Name: location_state::IsSet, + St::WorldReference: location_state::IsSet, + St::CreatedAt: location_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Location { + Location { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + created_at: self._fields.2.unwrap(), + creator_did: self._fields.3.unwrap(), + depth_index: self._fields.4, + description: self._fields.5, + location_type: self._fields.6, + name: self._fields.7.unwrap(), + parent_location: self._fields.8, + properties: self._fields.9, + world_reference: self._fields.10.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Location { + Location { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + created_at: self._fields.2.unwrap(), + creator_did: self._fields.3.unwrap(), + depth_index: self._fields.4, + description: self._fields.5, + location_type: self._fields.6, + name: self._fields.7.unwrap(), + parent_location: self._fields.8, + properties: self._fields.9, + world_reference: self._fields.10.unwrap(), + extra_data: Some(extra_data), + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/lore.rs b/crates/jacquard-api/src/world_ptah/temp/lore.rs new file mode 100644 index 000000000..b51f83967 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/lore.rs @@ -0,0 +1,889 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.lore +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// The Shabaka Stone of the world. It preserves what happened. It cannot be erased. It names who made it. It is the theological text of a world that anyone can read and nobody can alter. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.lore", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Lore { + ///Permanent link to the creator. Provenance travels with every piece of history. + #[serde(skip_serializing_if = "Option::is_none")] + pub authorship_record: Option>, + ///The canonical standing of this lore within its world. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///AT URIs of the character records involved in this lore. + #[serde(skip_serializing_if = "Option::is_none")] + pub characters: Option>>, + ///The actual narrative. The history. + #[serde(skip_serializing_if = "Option::is_none")] + pub content: Option, + ///Whether this lore was written by the world originator or a community contributor. + #[serde(skip_serializing_if = "Option::is_none")] + pub contribution_type: Option>, + ///Real-world timestamp of creation. + pub created_at: Datetime, + ///Who authored this lore entry. + pub creator_did: Did, + ///AT URIs of the action and event records this lore was generated from. Lore does not appear from nowhere — it traces back to things that actually happened. This is the most important field in this record. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_references: Option>>, + ///Where this sits in the world's chronology. In-world time, era, epoch, cycle — whatever the world uses. + #[serde(skip_serializing_if = "Option::is_none")] + pub timeline_position: Option, + ///The name of this piece of lore. + pub title: S, + ///The AT URI of the world this lore belongs to. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// The canonical standing of this lore within its world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum LoreCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl LoreCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for LoreCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for LoreCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for LoreCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for LoreCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for LoreCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for LoreCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = LoreCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + LoreCanonicalStatus::CanonicalStatusOfficial => { + LoreCanonicalStatus::CanonicalStatusOfficial + } + LoreCanonicalStatus::CanonicalStatusCommunity => { + LoreCanonicalStatus::CanonicalStatusCommunity + } + LoreCanonicalStatus::CanonicalStatusApocryphal => { + LoreCanonicalStatus::CanonicalStatusApocryphal + } + LoreCanonicalStatus::Other(v) => LoreCanonicalStatus::Other(v.into_static()), + } + } +} + +/// Whether this lore was written by the world originator or a community contributor. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum LoreContributionType { + Originator, + Community, + Other(S), +} + +impl LoreContributionType { + pub fn as_str(&self) -> &str { + match self { + Self::Originator => "originator", + Self::Community => "community", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "originator" => Self::Originator, + "community" => Self::Community, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for LoreContributionType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for LoreContributionType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for LoreContributionType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for LoreContributionType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for LoreContributionType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for LoreContributionType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = LoreContributionType; + fn into_static(self) -> Self::Output { + match self { + LoreContributionType::Originator => LoreContributionType::Originator, + LoreContributionType::Community => LoreContributionType::Community, + LoreContributionType::Other(v) => { + LoreContributionType::Other(v.into_static()) + } + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct LoreGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Lore, +} + +impl Lore { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct LoreRecord; +impl XrpcResp for LoreRecord { + const NSID: &'static str = "world.ptah.temp.lore"; + const ENCODING: &'static str = "application/json"; + type Output = LoreGetRecordOutput; + type Err = RecordError; +} + +impl From> for Lore { + fn from(output: LoreGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Lore { + const NSID: &'static str = "world.ptah.temp.lore"; + type Record = LoreRecord; +} + +impl Collection for LoreRecord { + const NSID: &'static str = "world.ptah.temp.lore"; + type Record = LoreRecord; +} + +impl LexiconSchema for Lore { + fn nsid() -> &'static str { + "world.ptah.temp.lore" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_lore() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.content { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 102400usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("content"), + max: 102400usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.content { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 10000usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("content"), + max: 10000usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.timeline_position { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("timeline_position"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.timeline_position { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("timeline_position"), + max: 256usize, + actual: count, + }); + } + } + } + { + let value = &self.title; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("title"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.title; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("title"), + max: 64usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod lore_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 Title; + type CreatedAt; + type WorldReference; + type CreatorDid; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Title = Unset; + type CreatedAt = Unset; + type WorldReference = Unset; + type CreatorDid = Unset; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData St>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; + type CreatedAt = St::CreatedAt; + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Title = St::Title; + type CreatedAt = Set; + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type Title = St::Title; + type CreatedAt = St::CreatedAt; + type WorldReference = Set; + type CreatorDid = St::CreatorDid; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type Title = St::Title; + type CreatedAt = St::CreatedAt; + type WorldReference = St::WorldReference; + type CreatorDid = 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 `created_at` field + pub struct created_at(()); + ///Marker type for the `world_reference` field + pub struct world_reference(()); + ///Marker type for the `creator_did` field + pub struct creator_did(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct LoreBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option>, + Option>>, + Option, + Option>, + Option, + Option>, + Option>>, + Option, + Option, + Option>, + ), + _type: PhantomData S>, +} + +impl Lore { + /// Create a new builder for this type. + pub fn new() -> LoreBuilder { + LoreBuilder::new() + } +} + +impl LoreBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + LoreBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl LoreBuilder { + /// Set the `authorshipRecord` field (optional) + pub fn authorship_record(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `authorshipRecord` field to an Option value (optional) + pub fn maybe_authorship_record(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl LoreBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.1 = value; + self + } +} + +impl LoreBuilder { + /// Set the `characters` field (optional) + pub fn characters(mut self, value: impl Into>>>) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `characters` field to an Option value (optional) + pub fn maybe_characters(mut self, value: Option>>) -> Self { + self._fields.2 = value; + self + } +} + +impl LoreBuilder { + /// Set the `content` field (optional) + pub fn content(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `content` field to an Option value (optional) + pub fn maybe_content(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl LoreBuilder { + /// Set the `contributionType` field (optional) + pub fn contribution_type( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.4 = value.into(); + self + } + /// Set the `contributionType` field to an Option value (optional) + pub fn maybe_contribution_type( + mut self, + value: Option>, + ) -> Self { + self._fields.4 = value; + self + } +} + +impl LoreBuilder +where + St: lore_state::State, + St::CreatedAt: lore_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> LoreBuilder> { + self._fields.5 = Option::Some(value.into()); + LoreBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LoreBuilder +where + St: lore_state::State, + St::CreatorDid: lore_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> LoreBuilder> { + self._fields.6 = Option::Some(value.into()); + LoreBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LoreBuilder { + /// Set the `sourceReferences` field (optional) + pub fn source_references(mut self, value: impl Into>>>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `sourceReferences` field to an Option value (optional) + pub fn maybe_source_references(mut self, value: Option>>) -> Self { + self._fields.7 = value; + self + } +} + +impl LoreBuilder { + /// Set the `timelinePosition` field (optional) + pub fn timeline_position(mut self, value: impl Into>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `timelinePosition` field to an Option value (optional) + pub fn maybe_timeline_position(mut self, value: Option) -> Self { + self._fields.8 = value; + self + } +} + +impl LoreBuilder +where + St: lore_state::State, + St::Title: lore_state::IsUnset, +{ + /// Set the `title` field (required) + pub fn title( + mut self, + value: impl Into, + ) -> LoreBuilder> { + self._fields.9 = Option::Some(value.into()); + LoreBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LoreBuilder +where + St: lore_state::State, + St::WorldReference: lore_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> LoreBuilder> { + self._fields.10 = Option::Some(value.into()); + LoreBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl LoreBuilder +where + St: lore_state::State, + St::Title: lore_state::IsSet, + St::CreatedAt: lore_state::IsSet, + St::WorldReference: lore_state::IsSet, + St::CreatorDid: lore_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Lore { + Lore { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + characters: self._fields.2, + content: self._fields.3, + contribution_type: self._fields.4, + created_at: self._fields.5.unwrap(), + creator_did: self._fields.6.unwrap(), + source_references: self._fields.7, + timeline_position: self._fields.8, + title: self._fields.9.unwrap(), + world_reference: self._fields.10.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Lore { + Lore { + authorship_record: self._fields.0, + canonical_status: self._fields.1, + characters: self._fields.2, + content: self._fields.3, + contribution_type: self._fields.4, + created_at: self._fields.5.unwrap(), + creator_did: self._fields.6.unwrap(), + source_references: self._fields.7, + timeline_position: self._fields.8, + title: self._fields.9.unwrap(), + world_reference: self._fields.10.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_lore() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.lore"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "The Shabaka Stone of the world. It preserves what happened. It cannot be erased. It names who made it. It is the theological text of a world that anyone can read and nobody can alter.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("title"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("authorshipRecord"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Permanent link to the creator. Provenance travels with every piece of history.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The canonical standing of this lore within its world.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("characters"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "AT URIs of the character records involved in this lore.", + ), + ), + items: LexArrayItem::String(LexString { + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("content"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The actual narrative. The history."), + ), + max_length: Some(102400usize), + max_graphemes: Some(10000usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("contributionType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Whether this lore was written by the world originator or a community contributor.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Real-world timestamp of creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Who authored this lore entry."), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceReferences"), + LexObjectProperty::Array(LexArray { + description: Some( + CowStr::new_static( + "AT URIs of the action and event records this lore was generated from. Lore does not appear from nowhere — it traces back to things that actually happened. This is the most important field in this record.", + ), + ), + items: LexArrayItem::String(LexString { + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("timelinePosition"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Where this sits in the world's chronology. In-world time, era, epoch, cycle — whatever the world uses.", + ), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("title"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The name of this piece of lore."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world this lore belongs to.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/role.rs b/crates/jacquard-api/src/world_ptah/temp/role.rs new file mode 100644 index 000000000..198936165 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/role.rs @@ -0,0 +1,1112 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.role +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +/// A stage role vs a performance of that role. The Opening of the Mouth was performed on a type of figure — the Role is the type. The Character instance is the specific statue that gets its mouth opened. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.role", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct Role { + ///Permanent link to the role's creator. Provenance travels. + #[serde(skip_serializing_if = "Option::is_none")] + pub authorship_record: Option>, + ///The AT URI of the single Character record designated as the authoritative expression of this role. When present, this is the canonical instance. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_character_reference: Option>, + ///Governs how the canonicalCharacterReference behaves over time. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_reference_policy: Option>, + ///The canonical standing of this role within its world. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///Timestamp of role creation. + pub created_at: Datetime, + ///Who defined this role in the protocol. + pub creator_did: Did, + ///What this role is in the world's context — its narrative function, its archetypal weight. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + ///How instances of this role are governed. + #[serde(skip_serializing_if = "Option::is_none")] + pub instance_policy: Option>, + ///What this role is called. + pub name: S, + ///If sourceType is publicDomain, the specific source material. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_reference: Option, + ///The intellectual property origin of this role. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_type: Option>, + ///The AT URI of the world record this role exists in. + pub world_reference: AtUri, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Governs how the canonicalCharacterReference behaves over time. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum RoleCanonicalReferencePolicy { + Fixed, + Updatable, + Community, + Other(S), +} + +impl RoleCanonicalReferencePolicy { + pub fn as_str(&self) -> &str { + match self { + Self::Fixed => "fixed", + Self::Updatable => "updatable", + Self::Community => "community", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "fixed" => Self::Fixed, + "updatable" => Self::Updatable, + "community" => Self::Community, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for RoleCanonicalReferencePolicy { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for RoleCanonicalReferencePolicy { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for RoleCanonicalReferencePolicy { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> +for RoleCanonicalReferencePolicy { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for RoleCanonicalReferencePolicy { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for RoleCanonicalReferencePolicy +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = RoleCanonicalReferencePolicy; + fn into_static(self) -> Self::Output { + match self { + RoleCanonicalReferencePolicy::Fixed => RoleCanonicalReferencePolicy::Fixed, + RoleCanonicalReferencePolicy::Updatable => { + RoleCanonicalReferencePolicy::Updatable + } + RoleCanonicalReferencePolicy::Community => { + RoleCanonicalReferencePolicy::Community + } + RoleCanonicalReferencePolicy::Other(v) => { + RoleCanonicalReferencePolicy::Other(v.into_static()) + } + } + } +} + +/// The canonical standing of this role within its world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum RoleCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl RoleCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for RoleCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for RoleCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for RoleCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for RoleCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for RoleCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for RoleCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = RoleCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + RoleCanonicalStatus::CanonicalStatusOfficial => { + RoleCanonicalStatus::CanonicalStatusOfficial + } + RoleCanonicalStatus::CanonicalStatusCommunity => { + RoleCanonicalStatus::CanonicalStatusCommunity + } + RoleCanonicalStatus::CanonicalStatusApocryphal => { + RoleCanonicalStatus::CanonicalStatusApocryphal + } + RoleCanonicalStatus::Other(v) => RoleCanonicalStatus::Other(v.into_static()), + } + } +} + +/// How instances of this role are governed. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum RoleInstancePolicy { + OpenInstance, + ApprovedInstance, + SingleInstance, + Other(S), +} + +impl RoleInstancePolicy { + pub fn as_str(&self) -> &str { + match self { + Self::OpenInstance => "openInstance", + Self::ApprovedInstance => "approvedInstance", + Self::SingleInstance => "singleInstance", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "openInstance" => Self::OpenInstance, + "approvedInstance" => Self::ApprovedInstance, + "singleInstance" => Self::SingleInstance, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for RoleInstancePolicy { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for RoleInstancePolicy { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for RoleInstancePolicy { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for RoleInstancePolicy { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for RoleInstancePolicy { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for RoleInstancePolicy +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = RoleInstancePolicy; + fn into_static(self) -> Self::Output { + match self { + RoleInstancePolicy::OpenInstance => RoleInstancePolicy::OpenInstance, + RoleInstancePolicy::ApprovedInstance => RoleInstancePolicy::ApprovedInstance, + RoleInstancePolicy::SingleInstance => RoleInstancePolicy::SingleInstance, + RoleInstancePolicy::Other(v) => RoleInstancePolicy::Other(v.into_static()), + } + } +} + +/// The intellectual property origin of this role. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum RoleSourceType { + SourceTypeOriginalIp, + SourceTypePublicDomain, + Other(S), +} + +impl RoleSourceType { + pub fn as_str(&self) -> &str { + match self { + Self::SourceTypeOriginalIp => "world.ptah.temp.defs#sourceTypeOriginalIP", + Self::SourceTypePublicDomain => "world.ptah.temp.defs#sourceTypePublicDomain", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#sourceTypeOriginalIP" => Self::SourceTypeOriginalIp, + "world.ptah.temp.defs#sourceTypePublicDomain" => Self::SourceTypePublicDomain, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for RoleSourceType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for RoleSourceType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for RoleSourceType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for RoleSourceType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for RoleSourceType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for RoleSourceType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = RoleSourceType; + fn into_static(self) -> Self::Output { + match self { + RoleSourceType::SourceTypeOriginalIp => RoleSourceType::SourceTypeOriginalIp, + RoleSourceType::SourceTypePublicDomain => { + RoleSourceType::SourceTypePublicDomain + } + RoleSourceType::Other(v) => RoleSourceType::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct RoleGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: Role, +} + +impl Role { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct RoleRecord; +impl XrpcResp for RoleRecord { + const NSID: &'static str = "world.ptah.temp.role"; + const ENCODING: &'static str = "application/json"; + type Output = RoleGetRecordOutput; + type Err = RecordError; +} + +impl From> for Role { + fn from(output: RoleGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for Role { + const NSID: &'static str = "world.ptah.temp.role"; + type Record = RoleRecord; +} + +impl Collection for RoleRecord { + const NSID: &'static str = "world.ptah.temp.role"; + type Record = RoleRecord; +} + +impl LexiconSchema for Role { + fn nsid() -> &'static str { + "world.ptah.temp.role" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_role() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.description { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("description"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.description { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("description"), + max: 1024usize, + actual: count, + }); + } + } + } + { + let value = &self.name; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.name; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("name"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.source_reference { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("source_reference"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.source_reference { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("source_reference"), + max: 1024usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod role_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 WorldReference; + type CreatorDid; + type Name; + type CreatedAt; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type WorldReference = Unset; + type CreatorDid = Unset; + type Name = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `world_reference` field to Set + pub struct SetWorldReference(PhantomData St>); + impl sealed::Sealed for SetWorldReference {} + impl State for SetWorldReference { + type WorldReference = Set; + type CreatorDid = St::CreatorDid; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type WorldReference = St::WorldReference; + type CreatorDid = Set; + type Name = St::Name; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + type Name = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type WorldReference = St::WorldReference; + type CreatorDid = St::CreatorDid; + type Name = St::Name; + type CreatedAt = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `world_reference` field + pub struct world_reference(()); + ///Marker type for the `creator_did` field + pub struct creator_did(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct RoleBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option>, + Option>, + Option>, + Option, + Option>, + Option, + Option>, + Option, + Option, + Option>, + Option>, + ), + _type: PhantomData S>, +} + +impl Role { + /// Create a new builder for this type. + pub fn new() -> RoleBuilder { + RoleBuilder::new() + } +} + +impl RoleBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + RoleBuilder { + _state: PhantomData, + _fields: ( + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + ), + _type: PhantomData, + } + } +} + +impl RoleBuilder { + /// Set the `authorshipRecord` field (optional) + pub fn authorship_record(mut self, value: impl Into>>) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `authorshipRecord` field to an Option value (optional) + pub fn maybe_authorship_record(mut self, value: Option>) -> Self { + self._fields.0 = value; + self + } +} + +impl RoleBuilder { + /// Set the `canonicalCharacterReference` field (optional) + pub fn canonical_character_reference( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.1 = value.into(); + self + } + /// Set the `canonicalCharacterReference` field to an Option value (optional) + pub fn maybe_canonical_character_reference( + mut self, + value: Option>, + ) -> Self { + self._fields.1 = value; + self + } +} + +impl RoleBuilder { + /// Set the `canonicalReferencePolicy` field (optional) + pub fn canonical_reference_policy( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.2 = value.into(); + self + } + /// Set the `canonicalReferencePolicy` field to an Option value (optional) + pub fn maybe_canonical_reference_policy( + mut self, + value: Option>, + ) -> Self { + self._fields.2 = value; + self + } +} + +impl RoleBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.3 = value; + self + } +} + +impl RoleBuilder +where + St: role_state::State, + St::CreatedAt: role_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> RoleBuilder> { + self._fields.4 = Option::Some(value.into()); + RoleBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl RoleBuilder +where + St: role_state::State, + St::CreatorDid: role_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> RoleBuilder> { + self._fields.5 = Option::Some(value.into()); + RoleBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl RoleBuilder { + /// Set the `description` field (optional) + pub fn description(mut self, value: impl Into>) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `description` field to an Option value (optional) + pub fn maybe_description(mut self, value: Option) -> Self { + self._fields.6 = value; + self + } +} + +impl RoleBuilder { + /// Set the `instancePolicy` field (optional) + pub fn instance_policy( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `instancePolicy` field to an Option value (optional) + pub fn maybe_instance_policy( + mut self, + value: Option>, + ) -> Self { + self._fields.7 = value; + self + } +} + +impl RoleBuilder +where + St: role_state::State, + St::Name: role_state::IsUnset, +{ + /// Set the `name` field (required) + pub fn name( + mut self, + value: impl Into, + ) -> RoleBuilder> { + self._fields.8 = Option::Some(value.into()); + RoleBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl RoleBuilder { + /// Set the `sourceReference` field (optional) + pub fn source_reference(mut self, value: impl Into>) -> Self { + self._fields.9 = value.into(); + self + } + /// Set the `sourceReference` field to an Option value (optional) + pub fn maybe_source_reference(mut self, value: Option) -> Self { + self._fields.9 = value; + self + } +} + +impl RoleBuilder { + /// Set the `sourceType` field (optional) + pub fn source_type(mut self, value: impl Into>>) -> Self { + self._fields.10 = value.into(); + self + } + /// Set the `sourceType` field to an Option value (optional) + pub fn maybe_source_type(mut self, value: Option>) -> Self { + self._fields.10 = value; + self + } +} + +impl RoleBuilder +where + St: role_state::State, + St::WorldReference: role_state::IsUnset, +{ + /// Set the `worldReference` field (required) + pub fn world_reference( + mut self, + value: impl Into>, + ) -> RoleBuilder> { + self._fields.11 = Option::Some(value.into()); + RoleBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl RoleBuilder +where + St: role_state::State, + St::WorldReference: role_state::IsSet, + St::CreatorDid: role_state::IsSet, + St::Name: role_state::IsSet, + St::CreatedAt: role_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> Role { + Role { + authorship_record: self._fields.0, + canonical_character_reference: self._fields.1, + canonical_reference_policy: self._fields.2, + canonical_status: self._fields.3, + created_at: self._fields.4.unwrap(), + creator_did: self._fields.5.unwrap(), + description: self._fields.6, + instance_policy: self._fields.7, + name: self._fields.8.unwrap(), + source_reference: self._fields.9, + source_type: self._fields.10, + world_reference: self._fields.11.unwrap(), + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> Role { + Role { + authorship_record: self._fields.0, + canonical_character_reference: self._fields.1, + canonical_reference_policy: self._fields.2, + canonical_status: self._fields.3, + created_at: self._fields.4.unwrap(), + creator_did: self._fields.5.unwrap(), + description: self._fields.6, + instance_policy: self._fields.7, + name: self._fields.8.unwrap(), + source_reference: self._fields.9, + source_type: self._fields.10, + world_reference: self._fields.11.unwrap(), + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_role() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.role"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "A stage role vs a performance of that role. The Opening of the Mouth was performed on a type of figure — the Role is the type. The Character instance is the specific statue that gets its mouth opened.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("name"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("worldReference"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("authorshipRecord"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Permanent link to the role's creator. Provenance travels.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalCharacterReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the single Character record designated as the authoritative expression of this role. When present, this is the canonical instance.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalReferencePolicy"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Governs how the canonicalCharacterReference behaves over time.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The canonical standing of this role within its world.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of role creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Who defined this role in the protocol."), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("description"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "What this role is in the world's context — its narrative function, its archetypal weight.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("instancePolicy"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "How instances of this role are governed.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("name"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What this role is called."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "If sourceType is publicDomain, the specific source material.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The intellectual property origin of this role.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("worldReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The AT URI of the world record this role exists in.", + ), + ), + format: Some(LexStringFormat::AtUri), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/world_ptah/temp/world.rs b/crates/jacquard-api/src/world_ptah/temp/world.rs new file mode 100644 index 000000000..6a0aec6f4 --- /dev/null +++ b/crates/jacquard-api/src/world_ptah/temp/world.rs @@ -0,0 +1,1084 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: world.ptah.temp.world +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; + +#[allow(unused_imports)] +use jacquard_common::deps::codegen::unicode_segmentation::UnicodeSegmentation; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::collection::{Collection, RecordError}; +use jacquard_common::types::string::{Did, AtUri, Cid, Datetime}; +use jacquard_common::types::uri::{RecordUri, UriError}; +use jacquard_common::types::value::Data; +use jacquard_common::xrpc::XrpcResp; +use jacquard_derive::{IntoStatic, lexicon}; +use jacquard_lexicon::lexicon::LexiconDoc; +use jacquard_lexicon::schema::LexiconSchema; + +#[allow(unused_imports)] +use jacquard_lexicon::validation::{ConstraintError, ValidationPath}; +use serde::{Serialize, Deserialize}; +use crate::world_ptah::temp::world; +/// The deed. Establishes that a world exists, who created it, and what its basic properties are. Ptah conceives the world in his heart — this record is that conception made permanent. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde( + rename_all = "camelCase", + rename = "world.ptah.temp.world", + tag = "$type", + bound(deserialize = "S: Deserialize<'de> + BosStr") +)] +pub struct World { + ///Whether this world is open for contribution, controlled by the originator, or governed by community consensus. + #[serde(skip_serializing_if = "Option::is_none")] + pub canonical_status: Option>, + ///Timestamp of world creation. + pub created_at: Datetime, + ///The permanent identity of whoever seeded this world. This never changes. + pub creator_did: Did, + ///What kind of world this is, in plain language. + #[serde(skip_serializing_if = "Option::is_none")] + pub description: Option, + ///The constitutional posture of the world. Signals how contributions and canon are governed before anyone contributes. + #[serde(skip_serializing_if = "Option::is_none")] + pub governance_mode: Option>, + ///What the world is called. + pub name: S, + ///Loose metadata telling visual rendering layers what kind of world this is — tone, era, genre, aesthetic. + #[serde(skip_serializing_if = "Option::is_none")] + pub rendering_hints: Option>, + ///If sourceType is publicDomain, the specific source material this world is derived from. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_reference: Option, + ///The intellectual property origin of this world. + #[serde(skip_serializing_if = "Option::is_none")] + pub source_type: Option>, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Whether this world is open for contribution, controlled by the originator, or governed by community consensus. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum WorldCanonicalStatus { + CanonicalStatusOfficial, + CanonicalStatusCommunity, + CanonicalStatusApocryphal, + Other(S), +} + +impl WorldCanonicalStatus { + pub fn as_str(&self) -> &str { + match self { + Self::CanonicalStatusOfficial => { + "world.ptah.temp.defs#canonicalStatusOfficial" + } + Self::CanonicalStatusCommunity => { + "world.ptah.temp.defs#canonicalStatusCommunity" + } + Self::CanonicalStatusApocryphal => { + "world.ptah.temp.defs#canonicalStatusApocryphal" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#canonicalStatusOfficial" => { + Self::CanonicalStatusOfficial + } + "world.ptah.temp.defs#canonicalStatusCommunity" => { + Self::CanonicalStatusCommunity + } + "world.ptah.temp.defs#canonicalStatusApocryphal" => { + Self::CanonicalStatusApocryphal + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for WorldCanonicalStatus { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for WorldCanonicalStatus { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for WorldCanonicalStatus { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for WorldCanonicalStatus { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for WorldCanonicalStatus { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for WorldCanonicalStatus +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = WorldCanonicalStatus; + fn into_static(self) -> Self::Output { + match self { + WorldCanonicalStatus::CanonicalStatusOfficial => { + WorldCanonicalStatus::CanonicalStatusOfficial + } + WorldCanonicalStatus::CanonicalStatusCommunity => { + WorldCanonicalStatus::CanonicalStatusCommunity + } + WorldCanonicalStatus::CanonicalStatusApocryphal => { + WorldCanonicalStatus::CanonicalStatusApocryphal + } + WorldCanonicalStatus::Other(v) => { + WorldCanonicalStatus::Other(v.into_static()) + } + } + } +} + +/// The constitutional posture of the world. Signals how contributions and canon are governed before anyone contributes. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum WorldGovernanceMode { + Sandbox, + Governed, + Constitutional, + Other(S), +} + +impl WorldGovernanceMode { + pub fn as_str(&self) -> &str { + match self { + Self::Sandbox => "sandbox", + Self::Governed => "governed", + Self::Constitutional => "constitutional", + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "sandbox" => Self::Sandbox, + "governed" => Self::Governed, + "constitutional" => Self::Constitutional, + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for WorldGovernanceMode { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for WorldGovernanceMode { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for WorldGovernanceMode { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for WorldGovernanceMode { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for WorldGovernanceMode { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for WorldGovernanceMode +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = WorldGovernanceMode; + fn into_static(self) -> Self::Output { + match self { + WorldGovernanceMode::Sandbox => WorldGovernanceMode::Sandbox, + WorldGovernanceMode::Governed => WorldGovernanceMode::Governed, + WorldGovernanceMode::Constitutional => WorldGovernanceMode::Constitutional, + WorldGovernanceMode::Other(v) => WorldGovernanceMode::Other(v.into_static()), + } + } +} + +/// The intellectual property origin of this world. + +#[derive(Debug, Clone, PartialEq, Eq, Hash)] +pub enum WorldSourceType { + SourceTypeOriginalIp, + SourceTypePublicDomain, + SourceTypeCollaborativeCommons, + Other(S), +} + +impl WorldSourceType { + pub fn as_str(&self) -> &str { + match self { + Self::SourceTypeOriginalIp => "world.ptah.temp.defs#sourceTypeOriginalIP", + Self::SourceTypePublicDomain => "world.ptah.temp.defs#sourceTypePublicDomain", + Self::SourceTypeCollaborativeCommons => { + "world.ptah.temp.defs#sourceTypeCollaborativeCommons" + } + Self::Other(s) => s.as_ref(), + } + } + /// Construct from a string-like value, matching known values. + pub fn from_value(s: S) -> Self { + match s.as_ref() { + "world.ptah.temp.defs#sourceTypeOriginalIP" => Self::SourceTypeOriginalIp, + "world.ptah.temp.defs#sourceTypePublicDomain" => Self::SourceTypePublicDomain, + "world.ptah.temp.defs#sourceTypeCollaborativeCommons" => { + Self::SourceTypeCollaborativeCommons + } + _ => Self::Other(s), + } + } +} + +impl core::fmt::Display for WorldSourceType { + fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result { + write!(f, "{}", self.as_str()) + } +} + +impl AsRef for WorldSourceType { + fn as_ref(&self) -> &str { + self.as_str() + } +} + +impl Serialize for WorldSourceType { + fn serialize(&self, serializer: Ser) -> Result + where + Ser: serde::Serializer, + { + serializer.serialize_str(self.as_str()) + } +} + +impl<'de, S: Deserialize<'de> + BosStr> Deserialize<'de> for WorldSourceType { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let s = S::deserialize(deserializer)?; + Ok(Self::from_value(s)) + } +} + +impl Default for WorldSourceType { + fn default() -> Self { + Self::Other(Default::default()) + } +} + +impl jacquard_common::IntoStatic for WorldSourceType +where + S: BosStr + jacquard_common::IntoStatic, + S::Output: BosStr, +{ + type Output = WorldSourceType; + fn into_static(self) -> Self::Output { + match self { + WorldSourceType::SourceTypeOriginalIp => { + WorldSourceType::SourceTypeOriginalIp + } + WorldSourceType::SourceTypePublicDomain => { + WorldSourceType::SourceTypePublicDomain + } + WorldSourceType::SourceTypeCollaborativeCommons => { + WorldSourceType::SourceTypeCollaborativeCommons + } + WorldSourceType::Other(v) => WorldSourceType::Other(v.into_static()), + } + } +} + +/// Typed wrapper for GetRecord response with this collection's record type. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase")] +pub struct WorldGetRecordOutput { + #[serde(skip_serializing_if = "Option::is_none")] + pub cid: Option>, + pub uri: AtUri, + pub value: World, +} + +/// Visual and tonal metadata for rendering layers. The world has to feel like something before anything has happened in it yet. + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic, Default)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct RenderingHints { + ///Visual texture, materials, atmosphere. + #[serde(skip_serializing_if = "Option::is_none")] + pub aesthetic: Option, + ///The temporal setting or period. + #[serde(skip_serializing_if = "Option::is_none")] + pub era: Option, + ///The narrative genre. + #[serde(skip_serializing_if = "Option::is_none")] + pub genre: Option, + ///The emotional register of the world. + #[serde(skip_serializing_if = "Option::is_none")] + pub tone: Option, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +impl World { + pub fn uri(uri: S) -> Result, UriError> { + RecordUri::try_from_uri(AtUri::new(uri)?) + } +} + +/// Marker type for deserializing records from this collection. + +#[derive(Debug, Serialize, Deserialize)] +pub struct WorldRecord; +impl XrpcResp for WorldRecord { + const NSID: &'static str = "world.ptah.temp.world"; + const ENCODING: &'static str = "application/json"; + type Output = WorldGetRecordOutput; + type Err = RecordError; +} + +impl From> for World { + fn from(output: WorldGetRecordOutput) -> Self { + output.value + } +} + +impl Collection for World { + const NSID: &'static str = "world.ptah.temp.world"; + type Record = WorldRecord; +} + +impl Collection for WorldRecord { + const NSID: &'static str = "world.ptah.temp.world"; + type Record = WorldRecord; +} + +impl LexiconSchema for World { + fn nsid() -> &'static str { + "world.ptah.temp.world" + } + fn def_name() -> &'static str { + "main" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_world() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.description { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("description"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.description { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("description"), + max: 1024usize, + actual: count, + }); + } + } + } + { + let value = &self.name; + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 640usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("name"), + max: 640usize, + actual: ::len(value.as_ref()), + }); + } + } + { + let value = &self.name; + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 64usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("name"), + max: 64usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.source_reference { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 10240usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("source_reference"), + max: 10240usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.source_reference { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 1024usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("source_reference"), + max: 1024usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +impl LexiconSchema for RenderingHints { + fn nsid() -> &'static str { + "world.ptah.temp.world" + } + fn def_name() -> &'static str { + "renderingHints" + } + fn lexicon_doc() -> LexiconDoc<'static> { + lexicon_doc_world_ptah_temp_world() + } + fn validate(&self) -> Result<(), ConstraintError> { + if let Some(ref value) = self.aesthetic { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("aesthetic"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.aesthetic { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("aesthetic"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.era { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("era"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.era { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("era"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.genre { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("genre"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.genre { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("genre"), + max: 256usize, + actual: count, + }); + } + } + } + if let Some(ref value) = self.tone { + #[allow(unused_comparisons)] + if ::len(value.as_ref()) > 2560usize { + return Err(ConstraintError::MaxLength { + path: ValidationPath::from_field("tone"), + max: 2560usize, + actual: ::len(value.as_ref()), + }); + } + } + if let Some(ref value) = self.tone { + { + let count = UnicodeSegmentation::graphemes(value.as_ref(), true).count(); + if count > 256usize { + return Err(ConstraintError::MaxGraphemes { + path: ValidationPath::from_field("tone"), + max: 256usize, + actual: count, + }); + } + } + } + Ok(()) + } +} + +pub mod world_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 Name; + type CreatorDid; + 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 CreatorDid = Unset; + type CreatedAt = Unset; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData St>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; + type CreatorDid = St::CreatorDid; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `creator_did` field to Set + pub struct SetCreatorDid(PhantomData St>); + impl sealed::Sealed for SetCreatorDid {} + impl State for SetCreatorDid { + type Name = St::Name; + type CreatorDid = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Name = St::Name; + type CreatorDid = St::CreatorDid; + 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 `creator_did` field + pub struct creator_did(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct WorldBuilder { + _state: PhantomData St>, + _fields: ( + Option>, + Option, + Option>, + Option, + Option>, + Option, + Option>, + Option, + Option>, + ), + _type: PhantomData S>, +} + +impl World { + /// Create a new builder for this type. + pub fn new() -> WorldBuilder { + WorldBuilder::new() + } +} + +impl WorldBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + WorldBuilder { + _state: PhantomData, + _fields: (None, None, None, None, None, None, None, None, None), + _type: PhantomData, + } + } +} + +impl WorldBuilder { + /// Set the `canonicalStatus` field (optional) + pub fn canonical_status( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.0 = value.into(); + self + } + /// Set the `canonicalStatus` field to an Option value (optional) + pub fn maybe_canonical_status( + mut self, + value: Option>, + ) -> Self { + self._fields.0 = value; + self + } +} + +impl WorldBuilder +where + St: world_state::State, + St::CreatedAt: world_state::IsUnset, +{ + /// Set the `createdAt` field (required) + pub fn created_at( + mut self, + value: impl Into, + ) -> WorldBuilder> { + self._fields.1 = Option::Some(value.into()); + WorldBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl WorldBuilder +where + St: world_state::State, + St::CreatorDid: world_state::IsUnset, +{ + /// Set the `creatorDID` field (required) + pub fn creator_did( + mut self, + value: impl Into>, + ) -> WorldBuilder> { + self._fields.2 = Option::Some(value.into()); + WorldBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl WorldBuilder { + /// Set the `description` field (optional) + pub fn description(mut self, value: impl Into>) -> Self { + self._fields.3 = value.into(); + self + } + /// Set the `description` field to an Option value (optional) + pub fn maybe_description(mut self, value: Option) -> Self { + self._fields.3 = value; + self + } +} + +impl WorldBuilder { + /// Set the `governanceMode` field (optional) + pub fn governance_mode( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.4 = value.into(); + self + } + /// Set the `governanceMode` field to an Option value (optional) + pub fn maybe_governance_mode( + mut self, + value: Option>, + ) -> Self { + self._fields.4 = value; + self + } +} + +impl WorldBuilder +where + St: world_state::State, + St::Name: world_state::IsUnset, +{ + /// Set the `name` field (required) + pub fn name( + mut self, + value: impl Into, + ) -> WorldBuilder> { + self._fields.5 = Option::Some(value.into()); + WorldBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl WorldBuilder { + /// Set the `renderingHints` field (optional) + pub fn rendering_hints( + mut self, + value: impl Into>>, + ) -> Self { + self._fields.6 = value.into(); + self + } + /// Set the `renderingHints` field to an Option value (optional) + pub fn maybe_rendering_hints( + mut self, + value: Option>, + ) -> Self { + self._fields.6 = value; + self + } +} + +impl WorldBuilder { + /// Set the `sourceReference` field (optional) + pub fn source_reference(mut self, value: impl Into>) -> Self { + self._fields.7 = value.into(); + self + } + /// Set the `sourceReference` field to an Option value (optional) + pub fn maybe_source_reference(mut self, value: Option) -> Self { + self._fields.7 = value; + self + } +} + +impl WorldBuilder { + /// Set the `sourceType` field (optional) + pub fn source_type(mut self, value: impl Into>>) -> Self { + self._fields.8 = value.into(); + self + } + /// Set the `sourceType` field to an Option value (optional) + pub fn maybe_source_type(mut self, value: Option>) -> Self { + self._fields.8 = value; + self + } +} + +impl WorldBuilder +where + St: world_state::State, + St::Name: world_state::IsSet, + St::CreatorDid: world_state::IsSet, + St::CreatedAt: world_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> World { + World { + canonical_status: self._fields.0, + created_at: self._fields.1.unwrap(), + creator_did: self._fields.2.unwrap(), + description: self._fields.3, + governance_mode: self._fields.4, + name: self._fields.5.unwrap(), + rendering_hints: self._fields.6, + source_reference: self._fields.7, + source_type: self._fields.8, + extra_data: Default::default(), + } + } + /// Build the final struct with custom extra_data. + pub fn build_with_data(self, extra_data: BTreeMap>) -> World { + World { + canonical_status: self._fields.0, + created_at: self._fields.1.unwrap(), + creator_did: self._fields.2.unwrap(), + description: self._fields.3, + governance_mode: self._fields.4, + name: self._fields.5.unwrap(), + rendering_hints: self._fields.6, + source_reference: self._fields.7, + source_type: self._fields.8, + extra_data: Some(extra_data), + } + } +} + +fn lexicon_doc_world_ptah_temp_world() -> LexiconDoc<'static> { + #[allow(unused_imports)] + use jacquard_common::{CowStr, deps::smol_str::SmolStr, types::blob::MimeType}; + use jacquard_lexicon::lexicon::*; + use alloc::collections::BTreeMap; + LexiconDoc { + lexicon: Lexicon::Lexicon1, + id: CowStr::new_static("world.ptah.temp.world"), + defs: { + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("main"), + LexUserType::Record(LexRecord { + description: Some( + CowStr::new_static( + "The deed. Establishes that a world exists, who created it, and what its basic properties are. Ptah conceives the world in his heart — this record is that conception made permanent.", + ), + ), + key: Some(CowStr::new_static("tid")), + record: LexRecordRecord::Object(LexObject { + required: Some( + vec![ + SmolStr::new_static("name"), + SmolStr::new_static("creatorDID"), + SmolStr::new_static("createdAt") + ], + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("canonicalStatus"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "Whether this world is open for contribution, controlled by the originator, or governed by community consensus.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("createdAt"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Timestamp of world creation."), + ), + format: Some(LexStringFormat::Datetime), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("creatorDID"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The permanent identity of whoever seeded this world. This never changes.", + ), + ), + format: Some(LexStringFormat::Did), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("description"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "What kind of world this is, in plain language.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("governanceMode"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The constitutional posture of the world. Signals how contributions and canon are governed before anyone contributes.", + ), + ), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("name"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("What the world is called."), + ), + max_length: Some(640usize), + max_graphemes: Some(64usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("renderingHints"), + LexObjectProperty::Ref(LexRef { + r#ref: CowStr::new_static("#renderingHints"), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceReference"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "If sourceType is publicDomain, the specific source material this world is derived from.", + ), + ), + max_length: Some(10240usize), + max_graphemes: Some(1024usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("sourceType"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static( + "The intellectual property origin of this world.", + ), + ), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("renderingHints"), + LexUserType::Object(LexObject { + description: Some( + CowStr::new_static( + "Visual and tonal metadata for rendering layers. The world has to feel like something before anything has happened in it yet.", + ), + ), + properties: { + #[allow(unused_mut)] + let mut map = BTreeMap::new(); + map.insert( + SmolStr::new_static("aesthetic"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("Visual texture, materials, atmosphere."), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("era"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The temporal setting or period."), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("genre"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The narrative genre."), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map.insert( + SmolStr::new_static("tone"), + LexObjectProperty::String(LexString { + description: Some( + CowStr::new_static("The emotional register of the world."), + ), + max_length: Some(2560usize), + max_graphemes: Some(256usize), + ..Default::default() + }), + ); + map + }, + ..Default::default() + }), + ); + map + }, + ..Default::default() + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/xyz_atpoke/graph/poke.rs b/crates/jacquard-api/src/xyz_atpoke/graph/poke.rs index 13da6bf4e..93b5b8f1c 100644 --- a/crates/jacquard-api/src/xyz_atpoke/graph/poke.rs +++ b/crates/jacquard-api/src/xyz_atpoke/graph/poke.rs @@ -112,37 +112,37 @@ pub mod poke_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 St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = St::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData St>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = St::CreatedAt; type Subject = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = St::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(()); } } @@ -212,8 +212,8 @@ where impl PokeBuilder where St: poke_state::State, - St::CreatedAt: poke_state::IsSet, St::Subject: poke_state::IsSet, + St::CreatedAt: poke_state::IsSet, { /// Build the final struct. pub fn build(self) -> Poke { diff --git a/crates/jacquard-api/src/za_co/ciaran/cumulus/bet.rs b/crates/jacquard-api/src/za_co/ciaran/cumulus/bet.rs index 08cad659c..9224fd3ca 100644 --- a/crates/jacquard-api/src/za_co/ciaran/cumulus/bet.rs +++ b/crates/jacquard-api/src/za_co/ciaran/cumulus/bet.rs @@ -137,49 +137,49 @@ pub mod bet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Market; + type CreatedAt; type Position; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Market = Unset; + type CreatedAt = Unset; type Position = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Market = St::Market; - type Position = St::Position; - } ///State transition - sets the `market` field to Set pub struct SetMarket(PhantomData St>); impl sealed::Sealed for SetMarket {} impl State for SetMarket { - type CreatedAt = St::CreatedAt; type Market = Set; + type CreatedAt = St::CreatedAt; + type Position = St::Position; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Market = St::Market; + type CreatedAt = Set; type Position = St::Position; } ///State transition - sets the `position` field to Set pub struct SetPosition(PhantomData St>); impl sealed::Sealed for SetPosition {} impl State for SetPosition { - type CreatedAt = St::CreatedAt; type Market = St::Market; + type CreatedAt = St::CreatedAt; type Position = 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 `market` field pub struct market(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `position` field pub struct position(()); } @@ -270,8 +270,8 @@ where impl BetBuilder where St: bet_state::State, - St::CreatedAt: bet_state::IsSet, St::Market: bet_state::IsSet, + St::CreatedAt: bet_state::IsSet, St::Position: bet_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/za_co/ciaran/cumulus/market.rs b/crates/jacquard-api/src/za_co/ciaran/cumulus/market.rs index d4eb81145..3ae2ea7f3 100644 --- a/crates/jacquard-api/src/za_co/ciaran/cumulus/market.rs +++ b/crates/jacquard-api/src/za_co/ciaran/cumulus/market.rs @@ -125,67 +125,67 @@ pub mod market_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Question; - type CreatedAt; type ClosesAt; + type Question; type Liquidity; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Question = Unset; - type CreatedAt = Unset; type ClosesAt = Unset; + type Question = Unset; type Liquidity = Unset; - } - ///State transition - sets the `question` field to Set - pub struct SetQuestion(PhantomData St>); - impl sealed::Sealed for SetQuestion {} - impl State for SetQuestion { - type Question = Set; - type CreatedAt = St::CreatedAt; - type ClosesAt = St::ClosesAt; - type Liquidity = St::Liquidity; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Question = St::Question; - type CreatedAt = Set; - type ClosesAt = St::ClosesAt; - type Liquidity = St::Liquidity; + type CreatedAt = Unset; } ///State transition - sets the `closes_at` field to Set pub struct SetClosesAt(PhantomData St>); impl sealed::Sealed for SetClosesAt {} impl State for SetClosesAt { + type ClosesAt = Set; type Question = St::Question; + type Liquidity = St::Liquidity; type CreatedAt = St::CreatedAt; - type ClosesAt = Set; + } + ///State transition - sets the `question` field to Set + pub struct SetQuestion(PhantomData St>); + impl sealed::Sealed for SetQuestion {} + impl State for SetQuestion { + type ClosesAt = St::ClosesAt; + type Question = Set; type Liquidity = St::Liquidity; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `liquidity` field to Set pub struct SetLiquidity(PhantomData St>); impl sealed::Sealed for SetLiquidity {} impl State for SetLiquidity { + type ClosesAt = St::ClosesAt; type Question = St::Question; + type Liquidity = Set; type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type ClosesAt = St::ClosesAt; - type Liquidity = Set; + type Question = St::Question; + type Liquidity = St::Liquidity; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `question` field - pub struct question(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `closes_at` field pub struct closes_at(()); + ///Marker type for the `question` field + pub struct question(()); ///Marker type for the `liquidity` field pub struct liquidity(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -293,10 +293,10 @@ where impl MarketBuilder where St: market_state::State, - St::Question: market_state::IsSet, - St::CreatedAt: market_state::IsSet, St::ClosesAt: market_state::IsSet, + St::Question: market_state::IsSet, St::Liquidity: market_state::IsSet, + St::CreatedAt: market_state::IsSet, { /// Build the final struct. pub fn build(self) -> Market { diff --git a/crates/jacquard-api/src/za_co/ciaran/cumulus/resolution.rs b/crates/jacquard-api/src/za_co/ciaran/cumulus/resolution.rs index 662f1fde0..85bdefc15 100644 --- a/crates/jacquard-api/src/za_co/ciaran/cumulus/resolution.rs +++ b/crates/jacquard-api/src/za_co/ciaran/cumulus/resolution.rs @@ -137,49 +137,49 @@ pub mod resolution_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Market; + type CreatedAt; type Answer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Market = Unset; + type CreatedAt = Unset; type Answer = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Market = St::Market; - type Answer = St::Answer; - } ///State transition - sets the `market` field to Set pub struct SetMarket(PhantomData St>); impl sealed::Sealed for SetMarket {} impl State for SetMarket { - type CreatedAt = St::CreatedAt; type Market = Set; + type CreatedAt = St::CreatedAt; + type Answer = St::Answer; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Market = St::Market; + type CreatedAt = Set; type Answer = St::Answer; } ///State transition - sets the `answer` field to Set pub struct SetAnswer(PhantomData St>); impl sealed::Sealed for SetAnswer {} impl State for SetAnswer { - type CreatedAt = St::CreatedAt; type Market = St::Market; + type CreatedAt = St::CreatedAt; type Answer = 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 `market` field pub struct market(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `answer` field pub struct answer(()); } @@ -270,8 +270,8 @@ where impl ResolutionBuilder where St: resolution_state::State, - St::CreatedAt: resolution_state::IsSet, St::Market: resolution_state::IsSet, + St::CreatedAt: resolution_state::IsSet, St::Answer: resolution_state::IsSet, { /// Build the final struct. diff --git a/crates/jacquard-api/src/zip_viruus/chat/message.rs b/crates/jacquard-api/src/zip_viruus/chat/message.rs index c75feabb5..d9d0be3b4 100644 --- a/crates/jacquard-api/src/zip_viruus/chat/message.rs +++ b/crates/jacquard-api/src/zip_viruus/chat/message.rs @@ -152,50 +152,50 @@ pub mod message_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Text; - type CreatedAt; type Channel; + type CreatedAt; } /// 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; type Channel = Unset; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData St>); impl sealed::Sealed for SetText {} impl State for SetText { type Text = Set; - type CreatedAt = St::CreatedAt; - type Channel = St::Channel; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData St>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Text = St::Text; - type CreatedAt = Set; type Channel = St::Channel; + type CreatedAt = St::CreatedAt; } ///State transition - sets the `channel` field to Set pub struct SetChannel(PhantomData St>); impl sealed::Sealed for SetChannel {} impl State for SetChannel { type Text = St::Text; - type CreatedAt = St::CreatedAt; type Channel = Set; + type CreatedAt = St::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData St>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Text = St::Text; + type Channel = St::Channel; + type CreatedAt = 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 `channel` field pub struct channel(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -285,8 +285,8 @@ impl MessageBuilder where St: message_state::State, St::Text: message_state::IsSet, - St::CreatedAt: message_state::IsSet, St::Channel: message_state::IsSet, + St::CreatedAt: message_state::IsSet, { /// Build the final struct. pub fn build(self) -> Message { diff --git a/crates/jacquard-api/src/zone_stratos.rs b/crates/jacquard-api/src/zone_stratos.rs index bbfb2211d..8d4720dcf 100644 --- a/crates/jacquard-api/src/zone_stratos.rs +++ b/crates/jacquard-api/src/zone_stratos.rs @@ -9,6 +9,7 @@ pub mod actor; pub mod boundary; pub mod enrollment; pub mod feed; +pub mod identity; pub mod repo; pub mod sync; @@ -191,51 +192,51 @@ pub mod source_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subject; type Vary; type Service; - 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 Vary = Unset; type Service = Unset; - type Subject = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData St>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type Vary = St::Vary; + type Service = St::Service; } ///State transition - sets the `vary` field to Set pub struct SetVary(PhantomData St>); impl sealed::Sealed for SetVary {} impl State for SetVary { + type Subject = St::Subject; type Vary = Set; type Service = St::Service; - type Subject = St::Subject; } ///State transition - sets the `service` field to Set pub struct SetService(PhantomData St>); impl sealed::Sealed for SetService {} impl State for SetService { - type Vary = St::Vary; - type Service = Set; type Subject = St::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData St>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { type Vary = St::Vary; - type Service = St::Service; - type Subject = Set; + type Service = 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 `vary` field pub struct vary(()); ///Marker type for the `service` field pub struct service(()); - ///Marker type for the `subject` field - pub struct subject(()); } } @@ -328,9 +329,9 @@ where impl SourceBuilder where St: source_state::State, + St::Subject: source_state::IsSet, St::Vary: source_state::IsSet, St::Service: source_state::IsSet, - St::Subject: source_state::IsSet, { /// Build the final struct. pub fn build(self) -> Source { diff --git a/crates/jacquard-api/src/zone_stratos/actor/enrollment.rs b/crates/jacquard-api/src/zone_stratos/actor/enrollment.rs index 088f41ea8..549eb14ad 100644 --- a/crates/jacquard-api/src/zone_stratos/actor/enrollment.rs +++ b/crates/jacquard-api/src/zone_stratos/actor/enrollment.rs @@ -163,67 +163,67 @@ pub mod enrollment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SigningKey; type CreatedAt; type Service; type Attestation; + type SigningKey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SigningKey = Unset; type CreatedAt = Unset; type Service = Unset; type Attestation = Unset; - } - ///State transition - sets the `signing_key` field to Set - pub struct SetSigningKey(PhantomData St>); - impl sealed::Sealed for SetSigningKey {} - impl State for SetSigningKey { - type SigningKey = Set; - type CreatedAt = St::CreatedAt; - type Service = St::Service; - type Attestation = St::Attestation; + type SigningKey = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData St>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type SigningKey = St::SigningKey; type CreatedAt = Set; type Service = St::Service; type Attestation = St::Attestation; + type SigningKey = St::SigningKey; } ///State transition - sets the `service` field to Set pub struct SetService(PhantomData St>); impl sealed::Sealed for SetService {} impl State for SetService { - type SigningKey = St::SigningKey; type CreatedAt = St::CreatedAt; type Service = Set; type Attestation = St::Attestation; + type SigningKey = St::SigningKey; } ///State transition - sets the `attestation` field to Set pub struct SetAttestation(PhantomData St>); impl sealed::Sealed for SetAttestation {} impl State for SetAttestation { - type SigningKey = St::SigningKey; type CreatedAt = St::CreatedAt; type Service = St::Service; type Attestation = Set; + type SigningKey = St::SigningKey; + } + ///State transition - sets the `signing_key` field to Set + pub struct SetSigningKey(PhantomData St>); + impl sealed::Sealed for SetSigningKey {} + impl State for SetSigningKey { + type CreatedAt = St::CreatedAt; + type Service = St::Service; + type Attestation = St::Attestation; + type SigningKey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `signing_key` field - pub struct signing_key(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `service` field pub struct service(()); ///Marker type for the `attestation` field pub struct attestation(()); + ///Marker type for the `signing_key` field + pub struct signing_key(()); } } @@ -350,10 +350,10 @@ where impl EnrollmentBuilder where St: enrollment_state::State, - St::SigningKey: enrollment_state::IsSet, St::CreatedAt: enrollment_state::IsSet, St::Service: enrollment_state::IsSet, St::Attestation: enrollment_state::IsSet, + St::SigningKey: enrollment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Enrollment { @@ -532,37 +532,37 @@ pub mod service_attestation_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Sig; type SigningKey; + type Sig; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Sig = Unset; type SigningKey = Unset; - } - ///State transition - sets the `sig` field to Set - pub struct SetSig(PhantomData St>); - impl sealed::Sealed for SetSig {} - impl State for SetSig { - type Sig = Set; - type SigningKey = St::SigningKey; + type Sig = Unset; } ///State transition - sets the `signing_key` field to Set pub struct SetSigningKey(PhantomData St>); impl sealed::Sealed for SetSigningKey {} impl State for SetSigningKey { - type Sig = St::Sig; type SigningKey = Set; + type Sig = St::Sig; + } + ///State transition - sets the `sig` field to Set + pub struct SetSig(PhantomData St>); + impl sealed::Sealed for SetSig {} + impl State for SetSig { + type SigningKey = St::SigningKey; + type Sig = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `sig` field - pub struct sig(()); ///Marker type for the `signing_key` field pub struct signing_key(()); + ///Marker type for the `sig` field + pub struct sig(()); } } @@ -632,8 +632,8 @@ where impl ServiceAttestationBuilder where St: service_attestation_state::State, - St::Sig: service_attestation_state::IsSet, St::SigningKey: service_attestation_state::IsSet, + St::Sig: service_attestation_state::IsSet, { /// Build the final struct. pub fn build(self) -> ServiceAttestation { diff --git a/crates/jacquard-api/src/zone_stratos/identity.rs b/crates/jacquard-api/src/zone_stratos/identity.rs new file mode 100644 index 000000000..88d581594 --- /dev/null +++ b/crates/jacquard-api/src/zone_stratos/identity.rs @@ -0,0 +1,6 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +pub mod resolve_enrollments; \ No newline at end of file diff --git a/crates/jacquard-api/src/zone_stratos/identity/resolve_enrollments.rs b/crates/jacquard-api/src/zone_stratos/identity/resolve_enrollments.rs new file mode 100644 index 000000000..5751113b0 --- /dev/null +++ b/crates/jacquard-api/src/zone_stratos/identity/resolve_enrollments.rs @@ -0,0 +1,150 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: zone.stratos.identity.resolveEnrollments +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[allow(unused_imports)] +use alloc::collections::BTreeMap; + +#[allow(unused_imports)] +use core::marker::PhantomData; +use jacquard_common::{CowStr, BosStr, DefaultStr, FromStaticStr}; +use jacquard_common::deps::smol_str::SmolStr; +use jacquard_common::types::string::Did; +use jacquard_common::types::value::Data; +use jacquard_derive::IntoStatic; +use serde::{Serialize, Deserialize}; + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct ResolveEnrollments { + pub did: Did, +} + + +#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq, IntoStatic)] +#[serde(rename_all = "camelCase", bound(deserialize = "S: Deserialize<'de> + BosStr"))] +pub struct ResolveEnrollmentsOutput { + ///Boundary domains the user is enrolled in. Empty if not enrolled. + pub boundaries: Vec, + pub did: Did, + ///Whether the DID is enrolled in this Stratos service. + pub enrolled: bool, + #[serde(flatten, default, skip_serializing_if = "Option::is_none")] + pub extra_data: Option>>, +} + +/// Response type for zone.stratos.identity.resolveEnrollments +pub struct ResolveEnrollmentsResponse; +impl jacquard_common::xrpc::XrpcResp for ResolveEnrollmentsResponse { + const NSID: &'static str = "zone.stratos.identity.resolveEnrollments"; + const ENCODING: &'static str = "application/json"; + type Output = ResolveEnrollmentsOutput; + type Err = jacquard_common::xrpc::GenericError; +} + +impl jacquard_common::xrpc::XrpcRequest for ResolveEnrollments { + const NSID: &'static str = "zone.stratos.identity.resolveEnrollments"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = ResolveEnrollmentsResponse; +} + +/// Endpoint type for zone.stratos.identity.resolveEnrollments +pub struct ResolveEnrollmentsRequest; +impl jacquard_common::xrpc::XrpcEndpoint for ResolveEnrollmentsRequest { + const PATH: &'static str = "/xrpc/zone.stratos.identity.resolveEnrollments"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request = ResolveEnrollments; + type Response = ResolveEnrollmentsResponse; +} + +pub mod resolve_enrollments_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 Did; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Did = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + 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(()); + } +} + +/// Builder for constructing an instance of this type. +pub struct ResolveEnrollmentsBuilder { + _state: PhantomData St>, + _fields: (Option>,), + _type: PhantomData S>, +} + +impl ResolveEnrollments { + /// Create a new builder for this type. + pub fn new() -> ResolveEnrollmentsBuilder { + ResolveEnrollmentsBuilder::new() + } +} + +impl ResolveEnrollmentsBuilder { + /// Create a new builder with all fields unset. + pub fn new() -> Self { + ResolveEnrollmentsBuilder { + _state: PhantomData, + _fields: (None,), + _type: PhantomData, + } + } +} + +impl ResolveEnrollmentsBuilder +where + St: resolve_enrollments_state::State, + St::Did: resolve_enrollments_state::IsUnset, +{ + /// Set the `did` field (required) + pub fn did( + mut self, + value: impl Into>, + ) -> ResolveEnrollmentsBuilder> { + self._fields.0 = Option::Some(value.into()); + ResolveEnrollmentsBuilder { + _state: PhantomData, + _fields: self._fields, + _type: PhantomData, + } + } +} + +impl ResolveEnrollmentsBuilder +where + St: resolve_enrollments_state::State, + St::Did: resolve_enrollments_state::IsSet, +{ + /// Build the final struct. + pub fn build(self) -> ResolveEnrollments { + ResolveEnrollments { + did: self._fields.0.unwrap(), + } + } +} \ No newline at end of file diff --git a/crates/jacquard-api/src/zone_stratos/repo/hydrate_records.rs b/crates/jacquard-api/src/zone_stratos/repo/hydrate_records.rs index 64ce1e285..a769366f1 100644 --- a/crates/jacquard-api/src/zone_stratos/repo/hydrate_records.rs +++ b/crates/jacquard-api/src/zone_stratos/repo/hydrate_records.rs @@ -214,50 +214,50 @@ pub mod record_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; - type Value; type Uri; + 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 Value = Unset; type Uri = Unset; + type Value = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData St>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; - type Value = St::Value; - type Uri = St::Uri; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData St>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Cid = St::Cid; - type Value = Set; type Uri = St::Uri; + type Value = St::Value; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData St>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Cid = St::Cid; - type Value = St::Value; type Uri = Set; + type Value = St::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData St>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Cid = St::Cid; + type Uri = St::Uri; + 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 `value` field - pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -347,8 +347,8 @@ impl RecordViewBuilder where St: record_view_state::State, St::Cid: record_view_state::IsSet, - St::Value: record_view_state::IsSet, St::Uri: record_view_state::IsSet, + St::Value: record_view_state::IsSet, { /// Build the final struct. pub fn build(self) -> RecordView { diff --git a/crates/jacquard-api/src/zone_stratos/sync/subscribe_records.rs b/crates/jacquard-api/src/zone_stratos/sync/subscribe_records.rs index 3e95d6693..27b238e2b 100644 --- a/crates/jacquard-api/src/zone_stratos/sync/subscribe_records.rs +++ b/crates/jacquard-api/src/zone_stratos/sync/subscribe_records.rs @@ -605,9 +605,9 @@ pub mod commit_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Seq; + type Time; type Rev; type Ops; - type Time; type Did; } /// Empty state - all required fields are unset @@ -615,9 +615,9 @@ pub mod commit_state { impl sealed::Sealed for Empty {} impl State for Empty { type Seq = Unset; + type Time = Unset; type Rev = Unset; type Ops = Unset; - type Time = Unset; type Did = Unset; } ///State transition - sets the `seq` field to Set @@ -625,9 +625,19 @@ pub mod commit_state { impl sealed::Sealed for SetSeq {} impl State for SetSeq { type Seq = Set; + type Time = St::Time; + type Rev = St::Rev; + type Ops = St::Ops; + type Did = St::Did; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData St>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Seq = St::Seq; + type Time = Set; type Rev = St::Rev; type Ops = St::Ops; - type Time = St::Time; type Did = St::Did; } ///State transition - sets the `rev` field to Set @@ -635,9 +645,9 @@ pub mod commit_state { impl sealed::Sealed for SetRev {} impl State for SetRev { type Seq = St::Seq; + type Time = St::Time; type Rev = Set; type Ops = St::Ops; - type Time = St::Time; type Did = St::Did; } ///State transition - sets the `ops` field to Set @@ -645,19 +655,9 @@ pub mod commit_state { impl sealed::Sealed for SetOps {} impl State for SetOps { type Seq = St::Seq; - type Rev = St::Rev; - type Ops = Set; type Time = St::Time; - type Did = St::Did; - } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData St>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Seq = St::Seq; type Rev = St::Rev; - type Ops = St::Ops; - type Time = Set; + type Ops = Set; type Did = St::Did; } ///State transition - sets the `did` field to Set @@ -665,9 +665,9 @@ pub mod commit_state { impl sealed::Sealed for SetDid {} impl State for SetDid { type Seq = St::Seq; + type Time = St::Time; type Rev = St::Rev; type Ops = St::Ops; - type Time = St::Time; type Did = Set; } /// Marker types for field names @@ -675,12 +675,12 @@ pub mod commit_state { pub mod members { ///Marker type for the `seq` field pub struct seq(()); + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `ops` field pub struct ops(()); - ///Marker type for the `time` field - pub struct time(()); ///Marker type for the `did` field pub struct did(()); } @@ -816,9 +816,9 @@ impl CommitBuilder where St: commit_state::State, St::Seq: commit_state::IsSet, + St::Time: commit_state::IsSet, St::Rev: commit_state::IsSet, St::Ops: commit_state::IsSet, - St::Time: commit_state::IsSet, St::Did: commit_state::IsSet, { /// Build the final struct. @@ -1164,51 +1164,51 @@ pub mod enrollment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Action; - type Time; type Did; + type Time; + 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 Time = Unset; type Did = Unset; + type Time = Unset; + type Action = Unset; } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData St>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Action = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData St>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Time = St::Time; - type Did = St::Did; + type Action = St::Action; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData St>); impl sealed::Sealed for SetTime {} impl State for SetTime { - type Action = St::Action; - type Time = Set; type Did = St::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData St>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + type Time = Set; type Action = St::Action; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData St>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Did = St::Did; type Time = St::Time; - type Did = Set; + 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 `time` field - pub struct time(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `time` field + pub struct time(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -1329,9 +1329,9 @@ where impl EnrollmentBuilder where St: enrollment_state::State, - St::Action: enrollment_state::IsSet, - St::Time: enrollment_state::IsSet, St::Did: enrollment_state::IsSet, + St::Time: enrollment_state::IsSet, + St::Action: enrollment_state::IsSet, { /// Build the final struct. pub fn build(self) -> Enrollment { -- 2.51.2