From 25871687c0007191a5d09fba4cfd2602e14bdb27 Mon Sep 17 00:00:00 2001 From: Orual Date: Sat, 13 Dec 2025 17:00:55 -0500 Subject: [PATCH] first view endpoints --- .../sh_weaver_notebook_getBookEntry.json | 44 + .../lexicons/sh_weaver_notebook_getEntry.json | 19 +- crates/weaver-api/src/app_bsky/actor.rs | 198 ++-- .../weaver-api/src/app_bsky/actor/status.rs | 26 +- .../weaver-api/src/app_bsky/ageassurance.rs | 134 +-- crates/weaver-api/src/app_bsky/bookmark.rs | 26 +- crates/weaver-api/src/app_bsky/embed.rs | 26 +- .../weaver-api/src/app_bsky/embed/external.rs | 60 +- .../weaver-api/src/app_bsky/embed/images.rs | 30 +- .../weaver-api/src/app_bsky/embed/record.rs | 138 +-- .../src/app_bsky/embed/record_with_media.rs | 52 +- crates/weaver-api/src/app_bsky/feed.rs | 228 ++-- .../weaver-api/src/app_bsky/feed/generator.rs | 30 +- .../weaver-api/src/app_bsky/feed/get_likes.rs | 30 +- crates/weaver-api/src/app_bsky/feed/post.rs | 56 +- crates/weaver-api/src/app_bsky/feed/repost.rs | 26 +- crates/weaver-api/src/app_bsky/graph.rs | 272 ++--- crates/weaver-api/src/app_bsky/graph/block.rs | 26 +- .../weaver-api/src/app_bsky/graph/follow.rs | 26 +- crates/weaver-api/src/app_bsky/graph/list.rs | 48 +- .../weaver-api/src/app_bsky/graph/listitem.rs | 30 +- .../src/app_bsky/graph/verification.rs | 78 +- crates/weaver-api/src/app_bsky/labeler.rs | 140 +-- .../weaver-api/src/app_bsky/notification.rs | 448 ++++---- .../notification/list_notifications.rs | 156 +-- .../app_bsky/notification/register_push.rs | 34 +- .../app_bsky/notification/unregister_push.rs | 34 +- .../weaver-api/src/app_bsky/richtext/facet.rs | 26 +- crates/weaver-api/src/app_bsky/unspecced.rs | 156 +-- .../src/app_bsky/unspecced/get_config.rs | 26 +- .../unspecced/get_post_thread_other_v2.rs | 48 +- .../unspecced/get_tagged_suggestions.rs | 48 +- crates/weaver-api/src/chat_bsky/convo.rs | 420 ++++---- .../src/chat_bsky/convo/send_message.rs | 26 +- .../src/chat_bsky/convo/send_message_batch.rs | 26 +- .../moderation/get_actor_metadata.rs | 78 +- .../moderation/update_actor_access.rs | 26 +- crates/weaver-api/src/com_atproto/admin.rs | 30 +- .../src/com_atproto/admin/send_email.rs | 30 +- .../admin/update_account_handle.rs | 26 +- .../admin/update_account_password.rs | 26 +- crates/weaver-api/src/com_atproto/identity.rs | 30 +- crates/weaver-api/src/com_atproto/label.rs | 98 +- .../src/com_atproto/label/subscribe_labels.rs | 26 +- .../com_atproto/moderation/create_report.rs | 26 +- .../src/com_atproto/repo/apply_writes.rs | 52 +- .../src/com_atproto/repo/create_record.rs | 30 +- .../src/com_atproto/repo/delete_record.rs | 30 +- .../src/com_atproto/repo/get_record.rs | 30 +- .../com_atproto/repo/list_missing_blobs.rs | 26 +- .../src/com_atproto/repo/list_records.rs | 56 +- .../src/com_atproto/repo/put_record.rs | 34 +- crates/weaver-api/src/com_atproto/server.rs | 138 +-- .../com_atproto/server/create_invite_codes.rs | 52 +- .../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 | 756 ++++++++------ .../temp/check_handle_availability.rs | 26 +- crates/weaver-api/src/sh_weaver/actor.rs | 100 +- crates/weaver-api/src/sh_weaver/collab.rs | 318 +++--- .../weaver-api/src/sh_weaver/collab/accept.rs | 30 +- .../weaver-api/src/sh_weaver/collab/invite.rs | 48 +- crates/weaver-api/src/sh_weaver/edit.rs | 148 +-- .../weaver-api/src/sh_weaver/edit/cursor.rs | 56 +- crates/weaver-api/src/sh_weaver/embed.rs | 52 +- .../src/sh_weaver/embed/external.rs | 78 +- .../src/sh_weaver/embed/record_with_media.rs | 26 +- .../weaver-api/src/sh_weaver/embed/records.rs | 128 +-- .../src/sh_weaver/graph/bookmark.rs | 26 +- .../weaver-api/src/sh_weaver/graph/follow.rs | 26 +- .../src/sh_weaver/graph/follow_accept.rs | 26 +- crates/weaver-api/src/sh_weaver/graph/list.rs | 48 +- .../src/sh_weaver/graph/listitem.rs | 30 +- .../src/sh_weaver/graph/subscribe.rs | 26 +- crates/weaver-api/src/sh_weaver/notebook.rs | 565 +++++----- .../src/sh_weaver/notebook/chapter.rs | 30 +- .../src/sh_weaver/notebook/colour_scheme.rs | 30 +- .../src/sh_weaver/notebook/entry.rs | 64 +- .../src/sh_weaver/notebook/get_book_entry.rs | 216 ++++ .../src/sh_weaver/notebook/get_entry.rs | 65 +- .../sh_weaver/notebook/get_entry_by_title.rs | 26 +- .../src/sh_weaver/notebook/get_entry_feed.rs | 50 +- .../src/sh_weaver/notebook/resolve_entry.rs | 30 +- .../sh_weaver/notebook/resolve_notebook.rs | 26 +- .../src/sh_weaver/notebook/theme.rs | 194 ++-- .../weaver-api/src/sh_weaver/notification.rs | 220 ++-- .../src/tools_ozone/communication.rs | 114 +- .../hosting/get_account_history.rs | 30 +- .../weaver-api/src/tools_ozone/moderation.rs | 986 +++++++++--------- .../src/tools_ozone/moderation/emit_event.rs | 30 +- .../moderation/get_account_timeline.rs | 30 +- .../tools_ozone/moderation/schedule_action.rs | 114 +- crates/weaver-api/src/tools_ozone/safelink.rs | 264 ++--- .../src/tools_ozone/safelink/add_rule.rs | 34 +- .../src/tools_ozone/safelink/update_rule.rs | 64 +- crates/weaver-api/src/tools_ozone/set.rs | 60 +- .../src/tools_ozone/set/add_values.rs | 26 +- .../src/tools_ozone/set/delete_values.rs | 26 +- crates/weaver-api/src/tools_ozone/setting.rs | 78 +- .../src/tools_ozone/setting/remove_options.rs | 26 +- crates/weaver-api/src/tools_ozone/team.rs | 26 +- .../src/tools_ozone/team/add_member.rs | 26 +- .../src/tools_ozone/verification.rs | 120 +-- .../verification/grant_verifications.rs | 30 +- crates/weaver-common/src/agent.rs | 11 +- .../migrations/clickhouse/017_notebooks.sql | 13 +- .../clickhouse/018_notebooks_mv.sql | 5 +- .../migrations/clickhouse/020_entries.sql | 15 +- .../migrations/clickhouse/021_entries_mv.sql | 5 +- .../clickhouse/037_contributors.sql | 100 ++ .../clickhouse/038_notebook_entries.sql | 22 + .../clickhouse/039_notebook_entries_mv.sql | 31 + crates/weaver-index/src/clickhouse.rs | 2 + crates/weaver-index/src/clickhouse/client.rs | 1 + .../weaver-index/src/clickhouse/migrations.rs | 52 +- crates/weaver-index/src/clickhouse/queries.rs | 12 + .../src/clickhouse/queries/contributors.rs | 177 ++++ .../src/clickhouse/queries/identity.rs | 104 ++ .../src/clickhouse/queries/notebooks.rs | 340 ++++++ .../src/clickhouse/queries/profiles.rs | 168 +++ crates/weaver-index/src/clickhouse/schema.rs | 1 + crates/weaver-index/src/endpoints/actor.rs | 158 +++ crates/weaver-index/src/endpoints/mod.rs | 2 + crates/weaver-index/src/endpoints/notebook.rs | 524 ++++++++++ crates/weaver-index/src/indexer.rs | 1 + crates/weaver-index/src/parallel_tap.rs | 79 +- crates/weaver-index/src/server.rs | 14 +- lexicons/notebook/getBookEntry.json | 35 + lexicons/notebook/getEntry.json | 18 +- scripts/test-indexer.sh | 126 +++ 133 files changed, 7004 insertions(+), 4755 deletions(-) create mode 100644 crates/weaver-api/lexicons/sh_weaver_notebook_getBookEntry.json create mode 100644 crates/weaver-api/src/sh_weaver/notebook/get_book_entry.rs create mode 100644 crates/weaver-index/migrations/clickhouse/037_contributors.sql create mode 100644 crates/weaver-index/migrations/clickhouse/038_notebook_entries.sql create mode 100644 crates/weaver-index/migrations/clickhouse/039_notebook_entries_mv.sql create mode 100644 crates/weaver-index/src/clickhouse/queries.rs create mode 100644 crates/weaver-index/src/clickhouse/queries/contributors.rs create mode 100644 crates/weaver-index/src/clickhouse/queries/identity.rs create mode 100644 crates/weaver-index/src/clickhouse/queries/notebooks.rs create mode 100644 crates/weaver-index/src/clickhouse/queries/profiles.rs create mode 100644 crates/weaver-index/src/endpoints/actor.rs create mode 100644 crates/weaver-index/src/endpoints/notebook.rs create mode 100644 lexicons/notebook/getBookEntry.json create mode 100755 scripts/test-indexer.sh diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_getBookEntry.json b/crates/weaver-api/lexicons/sh_weaver_notebook_getBookEntry.json new file mode 100644 index 0000000..8d62217 --- /dev/null +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_getBookEntry.json @@ -0,0 +1,44 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.getBookEntry", + "defs": { + "main": { + "type": "query", + "description": "Get an entry view by notebook URI and index, including prev/next navigation within the book.", + "parameters": { + "type": "params", + "required": [ + "notebook" + ], + "properties": { + "index": { + "type": "integer", + "description": "Zero-based index of the entry in the notebook's entry list.", + "default": 0, + "minimum": 0 + }, + "notebook": { + "type": "string", + "description": "AT-URI of the notebook containing the entry.", + "format": "at-uri" + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.weaver.notebook.defs#bookEntryView" + } + }, + "errors": [ + { + "name": "NotebookNotFound" + }, + { + "name": "EntryNotFound" + } + ] + } + } +} \ No newline at end of file diff --git a/crates/weaver-api/lexicons/sh_weaver_notebook_getEntry.json b/crates/weaver-api/lexicons/sh_weaver_notebook_getEntry.json index 715c0d0..5dd1e28 100644 --- a/crates/weaver-api/lexicons/sh_weaver_notebook_getEntry.json +++ b/crates/weaver-api/lexicons/sh_weaver_notebook_getEntry.json @@ -4,22 +4,16 @@ "defs": { "main": { "type": "query", - "description": "Get an entry view by notebook URI and index, including prev/next navigation.", + "description": "Get an entry view by its AT-URI.", "parameters": { "type": "params", "required": [ - "notebook" + "uri" ], "properties": { - "index": { - "type": "integer", - "description": "Zero-based index of the entry in the notebook's entry list.", - "default": 0, - "minimum": 0 - }, - "notebook": { + "uri": { "type": "string", - "description": "AT-URI of the notebook containing the entry.", + "description": "AT-URI of the entry to fetch.", "format": "at-uri" } } @@ -28,13 +22,10 @@ "encoding": "application/json", "schema": { "type": "ref", - "ref": "sh.weaver.notebook.defs#bookEntryView" + "ref": "sh.weaver.notebook.defs#entryView" } }, "errors": [ - { - "name": "NotebookNotFound" - }, { "name": "EntryNotFound" } diff --git a/crates/weaver-api/src/app_bsky/actor.rs b/crates/weaver-api/src/app_bsky/actor.rs index 51730b7..e423f06 100644 --- a/crates/weaver-api/src/app_bsky/actor.rs +++ b/crates/weaver-api/src/app_bsky/actor.rs @@ -4016,37 +4016,37 @@ pub mod nux_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Completed; type Id; + type Completed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Completed = Unset; type Id = Unset; - } - ///State transition - sets the `completed` field to Set - pub struct SetCompleted(PhantomData S>); - impl sealed::Sealed for SetCompleted {} - impl State for SetCompleted { - type Completed = Set; - type Id = S::Id; + type Completed = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Completed = S::Completed; type Id = Set; + type Completed = S::Completed; + } + ///State transition - sets the `completed` field to Set + pub struct SetCompleted(PhantomData S>); + impl sealed::Sealed for SetCompleted {} + impl State for SetCompleted { + type Id = S::Id; + type Completed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `completed` field - pub struct completed(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `completed` field + pub struct completed(()); } } @@ -4156,8 +4156,8 @@ where impl<'a, S> NuxBuilder<'a, S> where S: nux_state::State, - S::Completed: nux_state::IsSet, S::Id: nux_state::IsSet, + S::Completed: nux_state::IsSet, { /// Build the final struct pub fn build(self) -> Nux<'a> { @@ -4600,37 +4600,37 @@ pub mod profile_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -4955,8 +4955,8 @@ impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, - S::Did: profile_view_state::IsSet, S::Handle: profile_view_state::IsSet, + S::Did: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { @@ -6290,67 +6290,67 @@ pub mod saved_feed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Pinned; - type Id; type Value; + type Id; type Type; + type Pinned; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Pinned = Unset; - type Id = Unset; type Value = Unset; + type Id = Unset; type Type = Unset; + type Pinned = Unset; } - ///State transition - sets the `pinned` field to Set - pub struct SetPinned(PhantomData S>); - impl sealed::Sealed for SetPinned {} - impl State for SetPinned { - type Pinned = Set; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; type Id = S::Id; - type Value = S::Value; type Type = S::Type; + type Pinned = S::Pinned; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Pinned = S::Pinned; - type Id = Set; type Value = S::Value; + type Id = Set; type Type = S::Type; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { type Pinned = S::Pinned; - type Id = S::Id; - type Value = Set; - type Type = S::Type; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { - type Pinned = S::Pinned; - type Id = S::Id; type Value = S::Value; + type Id = S::Id; type Type = Set; + type Pinned = S::Pinned; + } + ///State transition - sets the `pinned` field to Set + pub struct SetPinned(PhantomData S>); + impl sealed::Sealed for SetPinned {} + impl State for SetPinned { + type Value = S::Value; + type Id = S::Id; + type Type = S::Type; + type Pinned = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `pinned` field - pub struct pinned(()); - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `pinned` field + pub struct pinned(()); } } @@ -6463,10 +6463,10 @@ where impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, - S::Pinned: saved_feed_state::IsSet, - S::Id: saved_feed_state::IsSet, S::Value: saved_feed_state::IsSet, + S::Id: saved_feed_state::IsSet, S::Type: saved_feed_state::IsSet, + S::Pinned: saved_feed_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeed<'a> { @@ -6883,37 +6883,37 @@ pub mod status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type Record; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; type Record = Unset; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type Record = S::Record; + type Status = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Status = S::Status; type Record = Set; + type Status = S::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Record = S::Record; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `status` field - pub struct status(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -7040,8 +7040,8 @@ where impl<'a, S> StatusViewBuilder<'a, S> where S: status_view_state::State, - S::Status: status_view_state::IsSet, S::Record: status_view_state::IsSet, + S::Status: status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StatusView<'a> { @@ -7196,51 +7196,51 @@ pub mod verification_state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type TrustedVerifierStatus; type Verifications; type VerifiedStatus; - type TrustedVerifierStatus; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type TrustedVerifierStatus = Unset; type Verifications = Unset; type VerifiedStatus = Unset; - type TrustedVerifierStatus = Unset; + } + ///State transition - sets the `trusted_verifier_status` field to Set + pub struct SetTrustedVerifierStatus(PhantomData S>); + impl sealed::Sealed for SetTrustedVerifierStatus {} + impl State for SetTrustedVerifierStatus { + type TrustedVerifierStatus = Set; + type Verifications = S::Verifications; + type VerifiedStatus = S::VerifiedStatus; } ///State transition - sets the `verifications` field to Set pub struct SetVerifications(PhantomData S>); impl sealed::Sealed for SetVerifications {} impl State for SetVerifications { + type TrustedVerifierStatus = S::TrustedVerifierStatus; type Verifications = Set; type VerifiedStatus = S::VerifiedStatus; - type TrustedVerifierStatus = S::TrustedVerifierStatus; } ///State transition - sets the `verified_status` field to Set pub struct SetVerifiedStatus(PhantomData S>); impl sealed::Sealed for SetVerifiedStatus {} impl State for SetVerifiedStatus { - type Verifications = S::Verifications; - type VerifiedStatus = Set; type TrustedVerifierStatus = S::TrustedVerifierStatus; - } - ///State transition - sets the `trusted_verifier_status` field to Set - pub struct SetTrustedVerifierStatus(PhantomData S>); - impl sealed::Sealed for SetTrustedVerifierStatus {} - impl State for SetTrustedVerifierStatus { type Verifications = S::Verifications; - type VerifiedStatus = S::VerifiedStatus; - type TrustedVerifierStatus = Set; + type VerifiedStatus = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///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(()); - ///Marker type for the `trusted_verifier_status` field - pub struct trusted_verifier_status(()); } } @@ -7336,9 +7336,9 @@ where impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, + S::TrustedVerifierStatus: verification_state_state::IsSet, S::Verifications: verification_state_state::IsSet, S::VerifiedStatus: verification_state_state::IsSet, - S::TrustedVerifierStatus: verification_state_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationState<'a> { @@ -7419,66 +7419,66 @@ pub mod verification_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; + type Issuer; type Uri; type IsValid; - type Issuer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; + type Issuer = Unset; type Uri = Unset; type IsValid = Unset; - type Issuer = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; + type Issuer = S::Issuer; + type Uri = S::Uri; + type IsValid = S::IsValid; + } + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { + type CreatedAt = S::CreatedAt; + type Issuer = Set; type Uri = S::Uri; type IsValid = S::IsValid; - type Issuer = S::Issuer; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; type Uri = Set; type IsValid = S::IsValid; - type Issuer = S::Issuer; } ///State transition - sets the `is_valid` field to Set pub struct SetIsValid(PhantomData S>); impl sealed::Sealed for SetIsValid {} impl State for SetIsValid { type CreatedAt = S::CreatedAt; - type Uri = S::Uri; - type IsValid = Set; type Issuer = S::Issuer; - } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData S>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { - type CreatedAt = S::CreatedAt; type Uri = S::Uri; - type IsValid = S::IsValid; - type Issuer = Set; + type IsValid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `issuer` field + pub struct issuer(()); ///Marker type for the `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(()); } } @@ -7592,9 +7592,9 @@ impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, S::CreatedAt: verification_view_state::IsSet, + S::Issuer: verification_view_state::IsSet, S::Uri: verification_view_state::IsSet, S::IsValid: verification_view_state::IsSet, - S::Issuer: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { diff --git a/crates/weaver-api/src/app_bsky/actor/status.rs b/crates/weaver-api/src/app_bsky/actor/status.rs index 1d27df6..468ba6c 100644 --- a/crates/weaver-api/src/app_bsky/actor/status.rs +++ b/crates/weaver-api/src/app_bsky/actor/status.rs @@ -59,37 +59,37 @@ pub mod status_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 S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type CreatedAt = S::CreatedAt; + type Status = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = S::Status; type CreatedAt = Set; + type Status = S::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = S::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(()); } } @@ -196,8 +196,8 @@ where impl<'a, S> StatusBuilder<'a, S> where S: status_state::State, - S::Status: status_state::IsSet, S::CreatedAt: status_state::IsSet, + S::Status: status_state::IsSet, { /// Build the final struct pub fn build(self) -> Status<'a> { diff --git a/crates/weaver-api/src/app_bsky/ageassurance.rs b/crates/weaver-api/src/app_bsky/ageassurance.rs index f355b19..82bc4fa 100644 --- a/crates/weaver-api/src/app_bsky/ageassurance.rs +++ b/crates/weaver-api/src/app_bsky/ageassurance.rs @@ -1500,37 +1500,37 @@ pub mod config_region_rule_if_account_newer_than_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Date; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Date = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Date = S::Date; + type Access = Unset; } ///State transition - sets the `date` field to Set pub struct SetDate(PhantomData S>); impl sealed::Sealed for SetDate {} impl State for SetDate { - type Access = S::Access; type Date = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Date = S::Date; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `date` field pub struct date(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -1620,8 +1620,8 @@ where impl<'a, S> ConfigRegionRuleIfAccountNewerThanBuilder<'a, S> where S: config_region_rule_if_account_newer_than_state::State, - S::Access: config_region_rule_if_account_newer_than_state::IsSet, S::Date: config_region_rule_if_account_newer_than_state::IsSet, + S::Access: config_region_rule_if_account_newer_than_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAccountNewerThan<'a> { @@ -1694,37 +1694,37 @@ pub mod config_region_rule_if_account_older_than_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Date; type Access; + type Date; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Date = Unset; type Access = Unset; - } - ///State transition - sets the `date` field to Set - pub struct SetDate(PhantomData S>); - impl sealed::Sealed for SetDate {} - impl State for SetDate { - type Date = Set; - type Access = S::Access; + type Date = Unset; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData S>); impl sealed::Sealed for SetAccess {} impl State for SetAccess { - type Date = S::Date; type Access = Set; + type Date = S::Date; + } + ///State transition - sets the `date` field to Set + pub struct SetDate(PhantomData S>); + impl sealed::Sealed for SetDate {} + impl State for SetDate { + type Access = S::Access; + type Date = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `date` field - pub struct date(()); ///Marker type for the `access` field pub struct access(()); + ///Marker type for the `date` field + pub struct date(()); } } @@ -1814,8 +1814,8 @@ where impl<'a, S> ConfigRegionRuleIfAccountOlderThanBuilder<'a, S> where S: config_region_rule_if_account_older_than_state::State, - S::Date: config_region_rule_if_account_older_than_state::IsSet, S::Access: config_region_rule_if_account_older_than_state::IsSet, + S::Date: config_region_rule_if_account_older_than_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAccountOlderThan<'a> { @@ -2700,9 +2700,9 @@ pub mod event_state { pub trait State: sealed::Sealed { type Status; type Access; - type CountryCode; - type CreatedAt; type AttemptId; + type CreatedAt; + type CountryCode; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -2710,9 +2710,9 @@ pub mod event_state { impl State for Empty { type Status = Unset; type Access = Unset; - type CountryCode = Unset; - type CreatedAt = Unset; type AttemptId = Unset; + type CreatedAt = Unset; + type CountryCode = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); @@ -2720,9 +2720,9 @@ pub mod event_state { impl State for SetStatus { type Status = Set; type Access = S::Access; - type CountryCode = S::CountryCode; - type CreatedAt = S::CreatedAt; type AttemptId = S::AttemptId; + type CreatedAt = S::CreatedAt; + type CountryCode = S::CountryCode; } ///State transition - sets the `access` field to Set pub struct SetAccess(PhantomData S>); @@ -2730,19 +2730,19 @@ pub mod event_state { impl State for SetAccess { type Status = S::Status; type Access = Set; - type CountryCode = S::CountryCode; - type CreatedAt = S::CreatedAt; type AttemptId = S::AttemptId; + type CreatedAt = S::CreatedAt; + type CountryCode = S::CountryCode; } - ///State transition - sets the `country_code` field to Set - pub struct SetCountryCode(PhantomData S>); - impl sealed::Sealed for SetCountryCode {} - impl State for SetCountryCode { + ///State transition - sets the `attempt_id` field to Set + pub struct SetAttemptId(PhantomData S>); + impl sealed::Sealed for SetAttemptId {} + impl State for SetAttemptId { type Status = S::Status; type Access = S::Access; - type CountryCode = Set; + type AttemptId = Set; type CreatedAt = S::CreatedAt; - type AttemptId = S::AttemptId; + type CountryCode = S::CountryCode; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); @@ -2750,19 +2750,19 @@ pub mod event_state { impl State for SetCreatedAt { type Status = S::Status; type Access = S::Access; - type CountryCode = S::CountryCode; - type CreatedAt = Set; type AttemptId = S::AttemptId; + type CreatedAt = Set; + type CountryCode = S::CountryCode; } - ///State transition - sets the `attempt_id` field to Set - pub struct SetAttemptId(PhantomData S>); - impl sealed::Sealed for SetAttemptId {} - impl State for SetAttemptId { + ///State transition - sets the `country_code` field to Set + pub struct SetCountryCode(PhantomData S>); + impl sealed::Sealed for SetCountryCode {} + impl State for SetCountryCode { type Status = S::Status; type Access = S::Access; - type CountryCode = S::CountryCode; + type AttemptId = S::AttemptId; type CreatedAt = S::CreatedAt; - type AttemptId = Set; + type CountryCode = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -2771,12 +2771,12 @@ pub mod event_state { pub struct status(()); ///Marker type for the `access` field pub struct access(()); - ///Marker type for the `country_code` field - pub struct country_code(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `country_code` field + pub struct country_code(()); } } @@ -3034,9 +3034,9 @@ where S: event_state::State, S::Status: event_state::IsSet, S::Access: event_state::IsSet, - S::CountryCode: event_state::IsSet, - S::CreatedAt: event_state::IsSet, S::AttemptId: event_state::IsSet, + S::CreatedAt: event_state::IsSet, + S::CountryCode: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -3129,37 +3129,37 @@ pub mod state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Status; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Status = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Status = S::Status; + type Access = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Access = S::Access; type Status = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Status = S::Status; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -3252,8 +3252,8 @@ where impl<'a, S> StateBuilder<'a, S> where S: state_state::State, - S::Access: state_state::IsSet, S::Status: state_state::IsSet, + S::Access: state_state::IsSet, { /// Build the final struct pub fn build(self) -> State<'a> { diff --git a/crates/weaver-api/src/app_bsky/bookmark.rs b/crates/weaver-api/src/app_bsky/bookmark.rs index 626984f..8d79fda 100644 --- a/crates/weaver-api/src/app_bsky/bookmark.rs +++ b/crates/weaver-api/src/app_bsky/bookmark.rs @@ -281,37 +281,37 @@ pub mod bookmark_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Item; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type Item = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Item = S::Item; + type Subject = Unset; } ///State transition - sets the `item` field to Set pub struct SetItem(PhantomData S>); impl sealed::Sealed for SetItem {} impl State for SetItem { - type Subject = S::Subject; type Item = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Item = S::Item; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `item` field pub struct item(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -404,8 +404,8 @@ where impl<'a, S> BookmarkViewBuilder<'a, S> where S: bookmark_view_state::State, - S::Subject: bookmark_view_state::IsSet, S::Item: bookmark_view_state::IsSet, + S::Subject: bookmark_view_state::IsSet, { /// Build the final struct pub fn build(self) -> BookmarkView<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed.rs b/crates/weaver-api/src/app_bsky/embed.rs index edfa136..27ec288 100644 --- a/crates/weaver-api/src/app_bsky/embed.rs +++ b/crates/weaver-api/src/app_bsky/embed.rs @@ -38,37 +38,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData S>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = S::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = S::Width; type Height = Set; + type Width = S::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = S::Height; + type Width = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `height` field pub struct height(()); + ///Marker type for the `width` field + pub struct width(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AspectRatioBuilder<'a, S> where S: aspect_ratio_state::State, - S::Width: aspect_ratio_state::IsSet, S::Height: aspect_ratio_state::IsSet, + S::Width: aspect_ratio_state::IsSet, { /// Build the final struct pub fn build(self) -> AspectRatio<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/external.rs b/crates/weaver-api/src/app_bsky/embed/external.rs index 0dc245f..cc6067e 100644 --- a/crates/weaver-api/src/app_bsky/embed/external.rs +++ b/crates/weaver-api/src/app_bsky/embed/external.rs @@ -38,51 +38,51 @@ pub mod external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Title; type Description; type Uri; + type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Title = Unset; type Description = Unset; type Uri = Unset; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Title = Set; - type Description = S::Description; - type Uri = S::Uri; + type Title = Unset; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Title = S::Title; type Description = Set; type Uri = S::Uri; + type Title = S::Title; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Title = S::Title; type Description = S::Description; type Uri = Set; + type Title = S::Title; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Description = S::Description; + type Uri = S::Uri; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `description` field pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, - S::Title: external_state::IsSet, S::Description: external_state::IsSet, S::Uri: external_state::IsSet, + S::Title: external_state::IsSet, { /// Build the final struct pub fn build(self) -> External<'a> { @@ -784,49 +784,49 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type 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 Uri = Unset; type Title = Unset; + type Uri = Unset; type Description = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Title = S::Title; - type Description = S::Description; - } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Uri = S::Uri; type Title = Set; + type Uri = S::Uri; + type Description = S::Description; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Title = S::Title; + type Uri = Set; type Description = S::Description; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Uri = S::Uri; type Title = S::Title; + type Uri = S::Uri; type Description = 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 `title` field pub struct title(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `description` field pub struct description(()); } @@ -941,8 +941,8 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Uri: view_external_state::IsSet, S::Title: view_external_state::IsSet, + S::Uri: view_external_state::IsSet, S::Description: view_external_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/embed/images.rs b/crates/weaver-api/src/app_bsky/embed/images.rs index 091af05..1f125f8 100644 --- a/crates/weaver-api/src/app_bsky/embed/images.rs +++ b/crates/weaver-api/src/app_bsky/embed/images.rs @@ -760,51 +760,51 @@ pub mod view_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Thumb; 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 Thumb = Unset; type Fullsize = Unset; type Alt = Unset; - type Thumb = Unset; + } + ///State transition - sets the `thumb` field to Set + pub struct SetThumb(PhantomData S>); + impl sealed::Sealed for SetThumb {} + impl State for SetThumb { + type Thumb = Set; + type Fullsize = S::Fullsize; + type Alt = S::Alt; } ///State transition - sets the `fullsize` field to Set pub struct SetFullsize(PhantomData S>); impl sealed::Sealed for SetFullsize {} impl State for SetFullsize { + type Thumb = S::Thumb; type Fullsize = Set; type Alt = S::Alt; - type Thumb = S::Thumb; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Fullsize = S::Fullsize; - type Alt = Set; type Thumb = S::Thumb; - } - ///State transition - sets the `thumb` field to Set - pub struct SetThumb(PhantomData S>); - impl sealed::Sealed for SetThumb {} - impl State for SetThumb { type Fullsize = S::Fullsize; - type Alt = S::Alt; - type Thumb = Set; + type Alt = 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 `alt` field pub struct alt(()); - ///Marker type for the `thumb` field - pub struct thumb(()); } } @@ -917,9 +917,9 @@ where impl<'a, S> ViewImageBuilder<'a, S> where S: view_image_state::State, + S::Thumb: view_image_state::IsSet, S::Fullsize: view_image_state::IsSet, S::Alt: view_image_state::IsSet, - S::Thumb: view_image_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewImage<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/record.rs b/crates/weaver-api/src/app_bsky/embed/record.rs index 57ff086..a8ab8c7 100644 --- a/crates/weaver-api/src/app_bsky/embed/record.rs +++ b/crates/weaver-api/src/app_bsky/embed/record.rs @@ -724,50 +724,50 @@ pub mod view_blocked_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; - type Blocked; type Author; + 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 Blocked = Unset; type Author = Unset; + type Blocked = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Uri = Set; - type Blocked = S::Blocked; - type Author = S::Author; - } - ///State transition - sets the `blocked` field to Set - pub struct SetBlocked(PhantomData S>); - impl sealed::Sealed for SetBlocked {} - impl State for SetBlocked { - type Uri = S::Uri; - type Blocked = Set; type Author = S::Author; + type Blocked = S::Blocked; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type Uri = S::Uri; - type Blocked = S::Blocked; type Author = Set; + type Blocked = S::Blocked; + } + ///State transition - sets the `blocked` field to Set + pub struct SetBlocked(PhantomData S>); + impl sealed::Sealed for SetBlocked {} + impl State for SetBlocked { + type Uri = S::Uri; + type Author = S::Author; + type 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 `blocked` field - pub struct blocked(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `blocked` field + pub struct blocked(()); } } @@ -861,8 +861,8 @@ impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, S::Uri: view_blocked_state::IsSet, - S::Blocked: view_blocked_state::IsSet, S::Author: view_blocked_state::IsSet, + S::Blocked: view_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewBlocked<'a> { @@ -934,37 +934,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Detached; type Uri; + type Detached; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Detached = Unset; type Uri = Unset; - } - ///State transition - sets the `detached` field to Set - pub struct SetDetached(PhantomData S>); - impl sealed::Sealed for SetDetached {} - impl State for SetDetached { - type Detached = Set; - type Uri = S::Uri; + type Detached = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Detached = S::Detached; type Uri = Set; + type Detached = S::Detached; + } + ///State transition - sets the `detached` field to Set + pub struct SetDetached(PhantomData S>); + impl sealed::Sealed for SetDetached {} + impl State for SetDetached { + type Uri = S::Uri; + type Detached = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `detached` field - pub struct detached(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `detached` field + pub struct detached(()); } } @@ -1037,8 +1037,8 @@ where impl<'a, S> ViewDetachedBuilder<'a, S> where S: view_detached_state::State, - S::Detached: view_detached_state::IsSet, S::Uri: view_detached_state::IsSet, + S::Detached: view_detached_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewDetached<'a> { @@ -1108,37 +1108,37 @@ pub mod view_not_found_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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 S>); - impl sealed::Sealed for SetNotFound {} - impl State for SetNotFound { - type NotFound = Set; - type Uri = S::Uri; + type NotFound = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type NotFound = S::NotFound; type Uri = Set; + type NotFound = S::NotFound; + } + ///State transition - sets the `not_found` field to Set + pub struct SetNotFound(PhantomData S>); + impl sealed::Sealed for SetNotFound {} + impl State for SetNotFound { + type Uri = S::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(()); } } @@ -1211,8 +1211,8 @@ where impl<'a, S> ViewNotFoundBuilder<'a, S> where S: view_not_found_state::State, - S::NotFound: view_not_found_state::IsSet, S::Uri: view_not_found_state::IsSet, + S::NotFound: view_not_found_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewNotFound<'a> { @@ -1305,9 +1305,9 @@ pub mod view_record_state { pub trait State: sealed::Sealed { type Author; type Cid; - type IndexedAt; - type Uri; type Value; + type Uri; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -1315,9 +1315,9 @@ pub mod view_record_state { impl State for Empty { type Author = Unset; type Cid = Unset; - type IndexedAt = Unset; - type Uri = Unset; type Value = Unset; + type Uri = Unset; + type IndexedAt = Unset; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); @@ -1325,9 +1325,9 @@ pub mod view_record_state { impl State for SetAuthor { type Author = Set; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; type Value = S::Value; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); @@ -1335,19 +1335,19 @@ pub mod view_record_state { impl State for SetCid { type Author = S::Author; type Cid = Set; - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; type Value = S::Value; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type Author = S::Author; type Cid = S::Cid; - type IndexedAt = Set; + type Value = Set; type Uri = S::Uri; - type Value = S::Value; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); @@ -1355,19 +1355,19 @@ pub mod view_record_state { impl State for SetUri { type Author = S::Author; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Uri = Set; type Value = S::Value; + type Uri = Set; + type IndexedAt = S::IndexedAt; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Author = S::Author; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; + type Value = S::Value; type Uri = S::Uri; - type Value = Set; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -1376,12 +1376,12 @@ pub mod view_record_state { 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 `uri` field - pub struct uri(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -1621,9 +1621,9 @@ where S: view_record_state::State, S::Author: view_record_state::IsSet, S::Cid: view_record_state::IsSet, - S::IndexedAt: view_record_state::IsSet, - S::Uri: view_record_state::IsSet, S::Value: view_record_state::IsSet, + S::Uri: view_record_state::IsSet, + S::IndexedAt: view_record_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewRecord<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/record_with_media.rs b/crates/weaver-api/src/app_bsky/embed/record_with_media.rs index e90e597..622ed2b 100644 --- a/crates/weaver-api/src/app_bsky/embed/record_with_media.rs +++ b/crates/weaver-api/src/app_bsky/embed/record_with_media.rs @@ -33,37 +33,37 @@ pub mod record_with_media_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = S::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData S>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = S::Record; type Media = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = S::Media; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RecordWithMediaBuilder<'a, S> where S: record_with_media_state::State, - S::Record: record_with_media_state::IsSet, S::Media: record_with_media_state::IsSet, + S::Record: record_with_media_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordWithMedia<'a> { @@ -322,37 +322,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Media; type Record; + type Media; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Media = Unset; type Record = Unset; - } - ///State transition - sets the `media` field to Set - pub struct SetMedia(PhantomData S>); - impl sealed::Sealed for SetMedia {} - impl State for SetMedia { - type Media = Set; - type Record = S::Record; + type Media = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Media = S::Media; type Record = Set; + type Media = S::Media; + } + ///State transition - sets the `media` field to Set + pub struct SetMedia(PhantomData S>); + impl sealed::Sealed for SetMedia {} + impl State for SetMedia { + type Record = S::Record; + type Media = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `media` field - pub struct media(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `media` field + pub struct media(()); } } @@ -425,8 +425,8 @@ where impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, - S::Media: view_state::IsSet, S::Record: view_state::IsSet, + S::Media: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed.rs b/crates/weaver-api/src/app_bsky/feed.rs index 463cc06..23857a3 100644 --- a/crates/weaver-api/src/app_bsky/feed.rs +++ b/crates/weaver-api/src/app_bsky/feed.rs @@ -1609,51 +1609,51 @@ pub mod blocked_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Blocked; type Author; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type Blocked = Unset; type Author = Unset; - type Uri = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type Blocked = S::Blocked; + type Author = S::Author; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { + type Uri = S::Uri; type Blocked = Set; type Author = S::Author; - type Uri = S::Uri; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Blocked = S::Blocked; - type Author = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Blocked = S::Blocked; - type Author = S::Author; - type Uri = Set; + 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 `blocked` field pub struct blocked(()); ///Marker type for the `author` field pub struct author(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -1746,9 +1746,9 @@ where impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, + S::Uri: blocked_post_state::IsSet, S::Blocked: blocked_post_state::IsSet, S::Author: blocked_post_state::IsSet, - S::Uri: blocked_post_state::IsSet, { /// Build the final struct pub fn build(self) -> BlockedPost<'a> { @@ -2235,10 +2235,10 @@ pub mod generator_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Creator; - type DisplayName; - type IndexedAt; type Uri; type Did; + type IndexedAt; + type DisplayName; type Cid; } /// Empty state - all required fields are unset @@ -2246,10 +2246,10 @@ pub mod generator_view_state { impl sealed::Sealed for Empty {} impl State for Empty { type Creator = Unset; - type DisplayName = Unset; - type IndexedAt = Unset; type Uri = Unset; type Did = Unset; + type IndexedAt = Unset; + type DisplayName = Unset; type Cid = Unset; } ///State transition - sets the `creator` field to Set @@ -2257,32 +2257,10 @@ pub mod generator_view_state { impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Creator = Set; - type DisplayName = S::DisplayName; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Did = S::Did; - type Cid = S::Cid; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type Creator = S::Creator; - type DisplayName = Set; type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Did = S::Did; - type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Creator = S::Creator; type DisplayName = S::DisplayName; - type IndexedAt = Set; - type Uri = S::Uri; - type Did = S::Did; type Cid = S::Cid; } ///State transition - sets the `uri` field to Set @@ -2290,10 +2268,10 @@ pub mod generator_view_state { impl sealed::Sealed for SetUri {} impl State for SetUri { type Creator = S::Creator; - type DisplayName = S::DisplayName; - type IndexedAt = S::IndexedAt; type Uri = Set; type Did = S::Did; + type IndexedAt = S::IndexedAt; + type DisplayName = S::DisplayName; type Cid = S::Cid; } ///State transition - sets the `did` field to Set @@ -2301,10 +2279,32 @@ pub mod generator_view_state { impl sealed::Sealed for SetDid {} impl State for SetDid { type Creator = S::Creator; - type DisplayName = S::DisplayName; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Did = Set; + type IndexedAt = S::IndexedAt; + type DisplayName = S::DisplayName; + type Cid = S::Cid; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Creator = S::Creator; + type Uri = S::Uri; + type Did = S::Did; + type IndexedAt = Set; + type DisplayName = S::DisplayName; + type Cid = S::Cid; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type Creator = S::Creator; + type Uri = S::Uri; + type Did = S::Did; + type IndexedAt = S::IndexedAt; + type DisplayName = Set; type Cid = S::Cid; } ///State transition - sets the `cid` field to Set @@ -2312,10 +2312,10 @@ pub mod generator_view_state { impl sealed::Sealed for SetCid {} impl State for SetCid { type Creator = S::Creator; - type DisplayName = S::DisplayName; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; type Did = S::Did; + type IndexedAt = S::IndexedAt; + type DisplayName = S::DisplayName; type Cid = Set; } /// Marker types for field names @@ -2323,14 +2323,14 @@ pub mod generator_view_state { pub mod members { ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `display_name` field - pub struct display_name(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `display_name` field + pub struct display_name(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -2649,10 +2649,10 @@ impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, S::Creator: generator_view_state::IsSet, - S::DisplayName: generator_view_state::IsSet, - S::IndexedAt: generator_view_state::IsSet, S::Uri: generator_view_state::IsSet, S::Did: generator_view_state::IsSet, + S::IndexedAt: generator_view_state::IsSet, + S::DisplayName: generator_view_state::IsSet, S::Cid: generator_view_state::IsSet, { /// Build the final struct @@ -3001,37 +3001,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 S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = S::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = S::Uri; type NotFound = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = S::NotFound; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `not_found` field pub struct not_found(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -3104,8 +3104,8 @@ where impl<'a, S> NotFoundPostBuilder<'a, S> where S: not_found_post_state::State, - S::Uri: not_found_post_state::IsSet, S::NotFound: not_found_post_state::IsSet, + S::Uri: not_found_post_state::IsSet, { /// Build the final struct pub fn build(self) -> NotFoundPost<'a> { @@ -3207,85 +3207,85 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type Record; - type Uri; type Author; + 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 Record = Unset; - type Uri = Unset; type Author = Unset; + type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Record = S::Record; - type Uri = S::Uri; - type Author = S::Author; - type Cid = S::Cid; + type IndexedAt = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type IndexedAt = S::IndexedAt; type Record = Set; - type Uri = S::Uri; type Author = S::Author; + type Uri = S::Uri; type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type IndexedAt = S::IndexedAt; - type Record = S::Record; - type Uri = Set; - type Author = S::Author; - type Cid = S::Cid; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type IndexedAt = S::IndexedAt; type Record = S::Record; - type Uri = S::Uri; type Author = Set; + type Uri = S::Uri; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Record = S::Record; + type Author = S::Author; + type Uri = Set; type Cid = S::Cid; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type IndexedAt = S::IndexedAt; type Record = S::Record; - type Uri = S::Uri; type Author = S::Author; + type Uri = S::Uri; type Cid = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Record = S::Record; + type Author = S::Author; + type Uri = S::Uri; + type Cid = S::Cid; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `record` field pub struct record(()); - ///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 `cid` field pub struct cid(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -3598,11 +3598,11 @@ impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, - S::IndexedAt: post_view_state::IsSet, S::Record: post_view_state::IsSet, - S::Uri: post_view_state::IsSet, S::Author: post_view_state::IsSet, + S::Uri: post_view_state::IsSet, S::Cid: post_view_state::IsSet, + S::IndexedAt: post_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PostView<'a> { @@ -3984,37 +3984,37 @@ pub mod reply_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Root; type Parent; + type Root; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Root = Unset; type Parent = Unset; - } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData S>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Parent = S::Parent; + type Root = Unset; } ///State transition - sets the `parent` field to Set pub struct SetParent(PhantomData S>); impl sealed::Sealed for SetParent {} impl State for SetParent { - type Root = S::Root; type Parent = Set; + type Root = S::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData S>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Parent = S::Parent; + type Root = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `root` field - pub struct root(()); ///Marker type for the `parent` field pub struct parent(()); + ///Marker type for the `root` field + pub struct root(()); } } @@ -4107,8 +4107,8 @@ where impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, - S::Root: reply_ref_state::IsSet, S::Parent: reply_ref_state::IsSet, + S::Root: reply_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> ReplyRef<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/generator.rs b/crates/weaver-api/src/app_bsky/feed/generator.rs index 26c10e8..113990d 100644 --- a/crates/weaver-api/src/app_bsky/feed/generator.rs +++ b/crates/weaver-api/src/app_bsky/feed/generator.rs @@ -56,51 +56,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 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 Did = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; + type DisplayName = S::DisplayName; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type Did = S::Did; type DisplayName = Set; type CreatedAt = S::CreatedAt; - type Did = S::Did; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type DisplayName = S::DisplayName; - type CreatedAt = Set; type Did = S::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type DisplayName = S::DisplayName; - type CreatedAt = S::CreatedAt; - type Did = Set; + 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 `display_name` field pub struct display_name(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `did` field - pub struct did(()); } } @@ -317,9 +317,9 @@ impl<'a, S: generator_state::State> GeneratorBuilder<'a, S> { impl<'a, S> GeneratorBuilder<'a, S> where S: generator_state::State, + S::Did: generator_state::IsSet, S::DisplayName: generator_state::IsSet, S::CreatedAt: generator_state::IsSet, - S::Did: generator_state::IsSet, { /// Build the final struct pub fn build(self) -> Generator<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/get_likes.rs b/crates/weaver-api/src/app_bsky/feed/get_likes.rs index ddb9418..e108641 100644 --- a/crates/weaver-api/src/app_bsky/feed/get_likes.rs +++ b/crates/weaver-api/src/app_bsky/feed/get_likes.rs @@ -33,51 +33,51 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IndexedAt; type CreatedAt; type Actor; - 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 CreatedAt = Unset; type Actor = Unset; - type IndexedAt = Unset; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type CreatedAt = S::CreatedAt; + type Actor = S::Actor; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type IndexedAt = S::IndexedAt; type CreatedAt = Set; type Actor = S::Actor; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type CreatedAt = S::CreatedAt; - type Actor = Set; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { type CreatedAt = S::CreatedAt; - type Actor = S::Actor; - type IndexedAt = Set; + type Actor = 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 `created_at` field pub struct created_at(()); ///Marker type for the `actor` field pub struct actor(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); } } @@ -170,9 +170,9 @@ where impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, + S::IndexedAt: like_state::IsSet, S::CreatedAt: like_state::IsSet, S::Actor: like_state::IsSet, - S::IndexedAt: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/post.rs b/crates/weaver-api/src/app_bsky/feed/post.rs index 9caf070..66ae701 100644 --- a/crates/weaver-api/src/app_bsky/feed/post.rs +++ b/crates/weaver-api/src/app_bsky/feed/post.rs @@ -37,49 +37,49 @@ pub mod entity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Type; type Index; + type Type; type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Type = Unset; type Index = Unset; + type Type = Unset; type Value = Unset; } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData S>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Type = Set; - type Index = S::Index; - type Value = S::Value; - } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Type = S::Type; type Index = Set; + type Type = S::Type; + type Value = S::Value; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData S>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Index = S::Index; + type Type = Set; type Value = S::Value; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Type = S::Type; type Index = S::Index; + type Type = S::Type; type Value = 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 `index` field pub struct index(()); + ///Marker type for the `type` field + pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); } @@ -174,8 +174,8 @@ where impl<'a, S> EntityBuilder<'a, S> where S: entity_state::State, - S::Type: entity_state::IsSet, S::Index: entity_state::IsSet, + S::Type: entity_state::IsSet, S::Value: entity_state::IsSet, { /// Build the final struct @@ -1271,37 +1271,37 @@ pub mod text_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - 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 End = Unset; type Start = Unset; - } - ///State transition - sets the `end` field to Set - pub struct SetEnd(PhantomData S>); - impl sealed::Sealed for SetEnd {} - impl State for SetEnd { - type End = Set; - type Start = S::Start; + type End = Unset; } ///State transition - sets the `start` field to Set pub struct SetStart(PhantomData S>); impl sealed::Sealed for SetStart {} impl State for SetStart { - type End = S::End; type Start = Set; + type End = S::End; + } + ///State transition - sets the `end` field to Set + pub struct SetEnd(PhantomData S>); + impl sealed::Sealed for SetEnd {} + impl State for SetEnd { + type Start = S::Start; + type End = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); } } @@ -1371,8 +1371,8 @@ where impl<'a, S> TextSliceBuilder<'a, S> where S: text_slice_state::State, - S::End: text_slice_state::IsSet, S::Start: text_slice_state::IsSet, + S::End: text_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> TextSlice<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/repost.rs b/crates/weaver-api/src/app_bsky/feed/repost.rs index bd94244..3c88b6b 100644 --- a/crates/weaver-api/src/app_bsky/feed/repost.rs +++ b/crates/weaver-api/src/app_bsky/feed/repost.rs @@ -36,37 +36,37 @@ pub mod repost_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -159,8 +159,8 @@ impl<'a, S: repost_state::State> RepostBuilder<'a, S> { impl<'a, S> RepostBuilder<'a, S> where S: repost_state::State, - S::CreatedAt: repost_state::IsSet, S::Subject: repost_state::IsSet, + S::CreatedAt: repost_state::IsSet, { /// Build the final struct pub fn build(self) -> Repost<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph.rs b/crates/weaver-api/src/app_bsky/graph.rs index 6ad5f4e..888bc9f 100644 --- a/crates/weaver-api/src/app_bsky/graph.rs +++ b/crates/weaver-api/src/app_bsky/graph.rs @@ -1277,105 +1277,105 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Creator; type Uri; type Purpose; type Name; + type Cid; type IndexedAt; + type Creator; } /// 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 Uri = Unset; type Purpose = Unset; type Name = Unset; + type Cid = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Creator = S::Creator; - type Uri = S::Uri; - type Purpose = S::Purpose; - type Name = S::Name; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Cid = S::Cid; - type Creator = Set; - type Uri = S::Uri; - type Purpose = S::Purpose; - type Name = S::Name; - type IndexedAt = S::IndexedAt; + type Creator = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = S::Cid; - type Creator = S::Creator; type Uri = Set; type Purpose = S::Purpose; type Name = S::Name; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Cid = S::Cid; - type Creator = S::Creator; type Uri = S::Uri; type Purpose = Set; type Name = S::Name; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type Uri = S::Uri; + type Purpose = S::Purpose; + type Name = Set; type Cid = S::Cid; + type IndexedAt = S::IndexedAt; type Creator = S::Creator; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Uri = S::Uri; type Purpose = S::Purpose; - type Name = Set; + type Name = S::Name; + type Cid = Set; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Uri = S::Uri; + type Purpose = S::Purpose; + type Name = S::Name; type Cid = S::Cid; + type IndexedAt = Set; type Creator = S::Creator; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Uri = S::Uri; type Purpose = S::Purpose; type Name = S::Name; - type IndexedAt = Set; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Creator = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `creator` field + pub struct creator(()); } } @@ -1655,12 +1655,12 @@ impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, - S::Cid: list_view_state::IsSet, - S::Creator: list_view_state::IsSet, S::Uri: list_view_state::IsSet, S::Purpose: list_view_state::IsSet, S::Name: list_view_state::IsSet, + S::Cid: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, + S::Creator: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { @@ -1835,67 +1835,67 @@ pub mod list_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; type Name; type Purpose; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; type Name = Unset; type Purpose = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = S::Cid; - type Name = S::Name; - type Purpose = S::Purpose; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; type Cid = Set; type Name = S::Name; type Purpose = S::Purpose; + type Uri = S::Uri; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Uri = S::Uri; type Cid = S::Cid; type Name = Set; type Purpose = S::Purpose; + type Uri = S::Uri; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Uri = S::Uri; type Cid = S::Cid; type Name = S::Name; type Purpose = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type Name = S::Name; + type Purpose = S::Purpose; + 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 `name` field pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -2112,10 +2112,10 @@ impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, - S::Uri: list_view_basic_state::IsSet, S::Cid: list_view_basic_state::IsSet, S::Name: list_view_basic_state::IsSet, S::Purpose: list_view_basic_state::IsSet, + S::Uri: list_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ListViewBasic<'a> { @@ -2292,37 +2292,37 @@ pub mod not_found_actor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Actor; type NotFound; + 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 NotFound = Unset; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData S>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { - type Actor = Set; - type NotFound = S::NotFound; + type Actor = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Actor = S::Actor; type NotFound = Set; + type Actor = S::Actor; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData S>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type NotFound = S::NotFound; + type Actor = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `actor` field - pub struct actor(()); ///Marker type for the `not_found` field pub struct not_found(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -2395,8 +2395,8 @@ where impl<'a, S> NotFoundActorBuilder<'a, S> where S: not_found_actor_state::State, - S::Actor: not_found_actor_state::IsSet, S::NotFound: not_found_actor_state::IsSet, + S::Actor: not_found_actor_state::IsSet, { /// Build the final struct pub fn build(self) -> NotFoundActor<'a> { @@ -2700,84 +2700,84 @@ pub mod starter_pack_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Record; - type Uri; - type IndexedAt; type Creator; type Cid; + type Uri; + 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 Uri = Unset; - type IndexedAt = Unset; type Creator = Unset; type Cid = Unset; + type Uri = Unset; + type IndexedAt = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Record = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Creator = S::Creator; - type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Record = S::Record; - type Uri = Set; - type IndexedAt = S::IndexedAt; type Creator = S::Creator; type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Record = S::Record; type Uri = S::Uri; - type IndexedAt = Set; - type Creator = S::Creator; - type Cid = S::Cid; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { type Record = S::Record; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; type Creator = Set; type Cid = S::Cid; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Record = S::Record; + type Creator = S::Creator; + type Cid = Set; type Uri = S::Uri; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Record = S::Record; type Creator = S::Creator; - type Cid = Set; + type Cid = S::Cid; + type Uri = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Record = S::Record; + type Creator = S::Creator; + type Cid = S::Cid; + type Uri = S::Uri; + 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 `uri` field - pub struct uri(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `creator` field pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -3031,10 +3031,10 @@ impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, S::Record: starter_pack_view_state::IsSet, - S::Uri: starter_pack_view_state::IsSet, - S::IndexedAt: starter_pack_view_state::IsSet, S::Creator: starter_pack_view_state::IsSet, S::Cid: starter_pack_view_state::IsSet, + S::Uri: starter_pack_view_state::IsSet, + S::IndexedAt: starter_pack_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackView<'a> { @@ -3183,85 +3183,85 @@ pub mod starter_pack_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; type Uri; - type Cid; type Record; 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 Creator = Unset; type Uri = Unset; - type Cid = Unset; type Record = Unset; type IndexedAt = Unset; - } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Creator = Set; - type Uri = S::Uri; - type Cid = S::Cid; - type Record = S::Record; - type IndexedAt = S::IndexedAt; + type Creator = Unset; + type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Creator = S::Creator; type Uri = Set; - type Cid = S::Cid; type Record = S::Record; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Creator = S::Creator; - type Uri = S::Uri; - type Cid = Set; - type Record = S::Record; - type IndexedAt = S::IndexedAt; + type Cid = S::Cid; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Creator = S::Creator; type Uri = S::Uri; - type Cid = S::Cid; type Record = Set; type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Uri = S::Uri; + type Record = S::Record; + type IndexedAt = Set; type Creator = S::Creator; + type Cid = S::Cid; + } + ///State transition - sets the `creator` field to Set + pub struct SetCreator(PhantomData S>); + impl sealed::Sealed for SetCreator {} + impl State for SetCreator { type Uri = S::Uri; + type Record = S::Record; + type IndexedAt = S::IndexedAt; + type Creator = Set; type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; type Record = S::Record; - type IndexedAt = Set; + type IndexedAt = S::IndexedAt; + type Creator = S::Creator; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `record` field pub struct record(()); ///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(()); } } @@ -3472,11 +3472,11 @@ where impl<'a, S> StarterPackViewBasicBuilder<'a, S> where S: starter_pack_view_basic_state::State, - S::Creator: starter_pack_view_basic_state::IsSet, S::Uri: starter_pack_view_basic_state::IsSet, - S::Cid: starter_pack_view_basic_state::IsSet, S::Record: starter_pack_view_basic_state::IsSet, S::IndexedAt: starter_pack_view_basic_state::IsSet, + S::Creator: starter_pack_view_basic_state::IsSet, + S::Cid: starter_pack_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackViewBasic<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/block.rs b/crates/weaver-api/src/app_bsky/graph/block.rs index 8fb41f0..e7fceb5 100644 --- a/crates/weaver-api/src/app_bsky/graph/block.rs +++ b/crates/weaver-api/src/app_bsky/graph/block.rs @@ -34,37 +34,37 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> BlockBuilder<'a, S> where S: block_state::State, - S::CreatedAt: block_state::IsSet, S::Subject: block_state::IsSet, + S::CreatedAt: block_state::IsSet, { /// Build the final struct pub fn build(self) -> Block<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/follow.rs b/crates/weaver-api/src/app_bsky/graph/follow.rs index 0fa2f29..d21ea03 100644 --- a/crates/weaver-api/src/app_bsky/graph/follow.rs +++ b/crates/weaver-api/src/app_bsky/graph/follow.rs @@ -36,37 +36,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -159,8 +159,8 @@ impl<'a, S: follow_state::State> FollowBuilder<'a, S> { impl<'a, S> FollowBuilder<'a, S> where S: follow_state::State, - S::CreatedAt: follow_state::IsSet, S::Subject: follow_state::IsSet, + S::CreatedAt: follow_state::IsSet, { /// Build the final struct pub fn build(self) -> Follow<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/list.rs b/crates/weaver-api/src/app_bsky/graph/list.rs index 6d28785..e746790 100644 --- a/crates/weaver-api/src/app_bsky/graph/list.rs +++ b/crates/weaver-api/src/app_bsky/graph/list.rs @@ -51,51 +51,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Name; type Purpose; + type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type Name = Unset; type Purpose = Unset; + type Name = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `purpose` field to Set + pub struct SetPurpose(PhantomData S>); + impl sealed::Sealed for SetPurpose {} + impl State for SetPurpose { + type Purpose = Set; type Name = S::Name; - type Purpose = S::Purpose; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = S::CreatedAt; - type Name = Set; type Purpose = S::Purpose; - } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData S>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { + type Name = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Purpose = S::Purpose; type Name = S::Name; - type Purpose = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -268,9 +268,9 @@ where impl<'a, S> ListBuilder<'a, S> where S: list_state::State, - S::CreatedAt: list_state::IsSet, - S::Name: list_state::IsSet, S::Purpose: list_state::IsSet, + S::Name: list_state::IsSet, + S::CreatedAt: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/listitem.rs b/crates/weaver-api/src/app_bsky/graph/listitem.rs index 0c870cf..791ac20 100644 --- a/crates/weaver-api/src/app_bsky/graph/listitem.rs +++ b/crates/weaver-api/src/app_bsky/graph/listitem.rs @@ -37,51 +37,51 @@ pub mod listitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type List; type 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 S>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type List = Set; + type CreatedAt = S::CreatedAt; + type Subject = S::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type List = S::List; type CreatedAt = Set; type Subject = S::Subject; - type List = S::List; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; - type Subject = Set; type List = S::List; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData S>); - impl sealed::Sealed for SetList {} - impl State for SetList { type CreatedAt = S::CreatedAt; - type Subject = S::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(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, + S::List: listitem_state::IsSet, S::CreatedAt: listitem_state::IsSet, S::Subject: listitem_state::IsSet, - S::List: listitem_state::IsSet, { /// Build the final struct pub fn build(self) -> Listitem<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/verification.rs b/crates/weaver-api/src/app_bsky/graph/verification.rs index 6247ebd..42af8a3 100644 --- a/crates/weaver-api/src/app_bsky/graph/verification.rs +++ b/crates/weaver-api/src/app_bsky/graph/verification.rs @@ -41,67 +41,67 @@ pub mod verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Handle; - type Subject; type DisplayName; + 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 CreatedAt = Unset; - type Handle = Unset; - type Subject = Unset; type DisplayName = Unset; + type Subject = Unset; + type Handle = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Handle = S::Handle; + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type DisplayName = Set; type Subject = S::Subject; - type DisplayName = S::DisplayName; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { + type Handle = S::Handle; type CreatedAt = S::CreatedAt; - type Handle = Set; - type Subject = S::Subject; - type DisplayName = S::DisplayName; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; - type Handle = S::Handle; - type Subject = Set; type DisplayName = S::DisplayName; + type Subject = Set; + type Handle = S::Handle; + type CreatedAt = S::CreatedAt; } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type DisplayName = S::DisplayName; + type Subject = S::Subject; + type Handle = Set; type CreatedAt = S::CreatedAt; - type Handle = S::Handle; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type DisplayName = S::DisplayName; type Subject = S::Subject; - type DisplayName = Set; + type Handle = S::Handle; + 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 `handle` field - pub struct handle(()); - ///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(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -214,10 +214,10 @@ where impl<'a, S> VerificationBuilder<'a, S> where S: verification_state::State, - S::CreatedAt: verification_state::IsSet, - S::Handle: verification_state::IsSet, - S::Subject: verification_state::IsSet, S::DisplayName: verification_state::IsSet, + S::Subject: verification_state::IsSet, + S::Handle: verification_state::IsSet, + S::CreatedAt: verification_state::IsSet, { /// Build the final struct pub fn build(self) -> Verification<'a> { diff --git a/crates/weaver-api/src/app_bsky/labeler.rs b/crates/weaver-api/src/app_bsky/labeler.rs index f6f0d72..0716bf9 100644 --- a/crates/weaver-api/src/app_bsky/labeler.rs +++ b/crates/weaver-api/src/app_bsky/labeler.rs @@ -632,67 +632,67 @@ pub mod labeler_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type IndexedAt; - type Creator; type Cid; + type Creator; + type IndexedAt; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type IndexedAt = Unset; - type Creator = Unset; type Cid = Unset; + type Creator = Unset; + type IndexedAt = Unset; + type Uri = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type IndexedAt = S::IndexedAt; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; type Creator = S::Creator; - type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type IndexedAt = Set; - type Creator = S::Creator; - type Cid = S::Cid; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Creator = Set; type Cid = S::Cid; + type Creator = Set; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Cid = S::Cid; + type Creator = S::Creator; + type IndexedAt = Set; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; type Creator = S::Creator; - type Cid = Set; + type IndexedAt = S::IndexedAt; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `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(()); } } @@ -859,10 +859,10 @@ impl<'a, S: labeler_view_state::State> LabelerViewBuilder<'a, S> { impl<'a, S> LabelerViewBuilder<'a, S> where S: labeler_view_state::State, - S::Uri: labeler_view_state::IsSet, - S::IndexedAt: labeler_view_state::IsSet, - S::Creator: labeler_view_state::IsSet, S::Cid: labeler_view_state::IsSet, + S::Creator: labeler_view_state::IsSet, + S::IndexedAt: labeler_view_state::IsSet, + S::Uri: labeler_view_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerView<'a> { @@ -985,85 +985,85 @@ pub mod labeler_view_detailed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Policies; + type IndexedAt; type Cid; type Creator; + type Policies; type Uri; - type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Policies = Unset; + type IndexedAt = Unset; type Cid = Unset; type Creator = Unset; + type Policies = Unset; type Uri = Unset; - type IndexedAt = Unset; } - ///State transition - sets the `policies` field to Set - pub struct SetPolicies(PhantomData S>); - impl sealed::Sealed for SetPolicies {} - impl State for SetPolicies { - type Policies = Set; + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; type Cid = S::Cid; type Creator = S::Creator; + type Policies = S::Policies; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Policies = S::Policies; + type IndexedAt = S::IndexedAt; type Cid = Set; type Creator = S::Creator; + type Policies = S::Policies; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Policies = S::Policies; + type IndexedAt = S::IndexedAt; type Cid = S::Cid; type Creator = Set; + type Policies = S::Policies; type Uri = S::Uri; + } + ///State transition - sets the `policies` field to Set + pub struct SetPolicies(PhantomData S>); + impl sealed::Sealed for SetPolicies {} + impl State for SetPolicies { type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Creator = S::Creator; + type Policies = Set; + type Uri = S::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Policies = S::Policies; - type Cid = S::Cid; - type Creator = S::Creator; - type Uri = Set; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Policies = S::Policies; type Cid = S::Cid; type Creator = S::Creator; - type Uri = S::Uri; - type IndexedAt = Set; + type Policies = S::Policies; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `policies` field - pub struct policies(()); + ///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 `policies` field + pub struct policies(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); } } @@ -1322,11 +1322,11 @@ impl<'a, S: labeler_view_detailed_state::State> LabelerViewDetailedBuilder<'a, S impl<'a, S> LabelerViewDetailedBuilder<'a, S> where S: labeler_view_detailed_state::State, - S::Policies: labeler_view_detailed_state::IsSet, + S::IndexedAt: labeler_view_detailed_state::IsSet, S::Cid: labeler_view_detailed_state::IsSet, S::Creator: labeler_view_detailed_state::IsSet, + S::Policies: labeler_view_detailed_state::IsSet, S::Uri: labeler_view_detailed_state::IsSet, - S::IndexedAt: labeler_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelerViewDetailed<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification.rs b/crates/weaver-api/src/app_bsky/notification.rs index 2195f6c..fa93411 100644 --- a/crates/weaver-api/src/app_bsky/notification.rs +++ b/crates/weaver-api/src/app_bsky/notification.rs @@ -43,37 +43,37 @@ pub mod activity_subscription_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type Reply; + type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; type Reply = Unset; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type Reply = S::Reply; + type Post = Unset; } ///State transition - sets the `reply` field to Set pub struct SetReply(PhantomData S>); impl sealed::Sealed for SetReply {} impl State for SetReply { - type Post = S::Post; type Reply = Set; + type Post = S::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type Reply = S::Reply; + type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `post` field - pub struct post(()); ///Marker type for the `reply` field pub struct reply(()); + ///Marker type for the `post` field + pub struct post(()); } } @@ -143,8 +143,8 @@ where impl<'a, S> ActivitySubscriptionBuilder<'a, S> where S: activity_subscription_state::State, - S::Post: activity_subscription_state::IsSet, S::Reply: activity_subscription_state::IsSet, + S::Post: activity_subscription_state::IsSet, { /// Build the final struct pub fn build(self) -> ActivitySubscription<'a> { @@ -601,37 +601,37 @@ pub mod chat_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Push; type Include; + type Push; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Push = Unset; type Include = Unset; - } - ///State transition - sets the `push` field to Set - pub struct SetPush(PhantomData S>); - impl sealed::Sealed for SetPush {} - impl State for SetPush { - type Push = Set; - type Include = S::Include; + type Push = Unset; } ///State transition - sets the `include` field to Set pub struct SetInclude(PhantomData S>); impl sealed::Sealed for SetInclude {} impl State for SetInclude { - type Push = S::Push; type Include = Set; + type Push = S::Push; + } + ///State transition - sets the `push` field to Set + pub struct SetPush(PhantomData S>); + impl sealed::Sealed for SetPush {} + impl State for SetPush { + type Include = S::Include; + type Push = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `push` field - pub struct push(()); ///Marker type for the `include` field pub struct include(()); + ///Marker type for the `push` field + pub struct push(()); } } @@ -704,8 +704,8 @@ where impl<'a, S> ChatPreferenceBuilder<'a, S> where S: chat_preference_state::State, - S::Push: chat_preference_state::IsSet, S::Include: chat_preference_state::IsSet, + S::Push: chat_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> ChatPreference<'a> { @@ -776,51 +776,51 @@ pub mod filterable_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Include; type Push; type List; - 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 Include = Unset; + } + ///State transition - sets the `include` field to Set + pub struct SetInclude(PhantomData S>); + impl sealed::Sealed for SetInclude {} + impl State for SetInclude { + type Include = Set; + type Push = S::Push; + type List = S::List; } ///State transition - sets the `push` field to Set pub struct SetPush(PhantomData S>); impl sealed::Sealed for SetPush {} impl State for SetPush { + type Include = S::Include; type Push = Set; type List = S::List; - type Include = S::Include; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData S>); impl sealed::Sealed for SetList {} impl State for SetList { - type Push = S::Push; - type List = Set; type Include = S::Include; - } - ///State transition - sets the `include` field to Set - pub struct SetInclude(PhantomData S>); - impl sealed::Sealed for SetInclude {} - impl State for SetInclude { type Push = S::Push; - type List = S::List; - type Include = Set; + type List = 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 `include` field - pub struct include(()); } } @@ -913,9 +913,9 @@ where impl<'a, S> FilterablePreferenceBuilder<'a, S> where S: filterable_preference_state::State, + S::Include: filterable_preference_state::IsSet, S::Push: filterable_preference_state::IsSet, S::List: filterable_preference_state::IsSet, - S::Include: filterable_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> FilterablePreference<'a> { @@ -986,37 +986,37 @@ pub mod preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type List; type Push; + type List; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type List = Unset; type Push = Unset; - } - ///State transition - sets the `list` field to Set - pub struct SetList(PhantomData S>); - impl sealed::Sealed for SetList {} - impl State for SetList { - type List = Set; - type Push = S::Push; + type List = Unset; } ///State transition - sets the `push` field to Set pub struct SetPush(PhantomData S>); impl sealed::Sealed for SetPush {} impl State for SetPush { - type List = S::List; type Push = Set; + type List = S::List; + } + ///State transition - sets the `list` field to Set + pub struct SetList(PhantomData S>); + impl sealed::Sealed for SetList {} + impl State for SetList { + type Push = S::Push; + type List = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `list` field - pub struct list(()); ///Marker type for the `push` field pub struct push(()); + ///Marker type for the `list` field + pub struct list(()); } } @@ -1086,8 +1086,8 @@ where impl<'a, S> PreferenceBuilder<'a, S> where S: preference_state::State, - S::List: preference_state::IsSet, S::Push: preference_state::IsSet, + S::List: preference_state::IsSet, { /// Build the final struct pub fn build(self) -> Preference<'a> { @@ -1180,299 +1180,299 @@ pub mod preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type LikeViaRepost; - type RepostViaRepost; - type SubscribedPost; - type Verified; type Reply; type Chat; - type Repost; + type Follow; + type Like; + type RepostViaRepost; type StarterpackJoined; + type SubscribedPost; type Unverified; - type Like; - type Follow; + type LikeViaRepost; + type Repost; type Mention; + type Verified; type Quote; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type LikeViaRepost = Unset; - type RepostViaRepost = Unset; - type SubscribedPost = Unset; - type Verified = Unset; type Reply = Unset; type Chat = Unset; - type Repost = Unset; + type Follow = Unset; + type Like = Unset; + type RepostViaRepost = Unset; type StarterpackJoined = Unset; + type SubscribedPost = Unset; type Unverified = Unset; - type Like = Unset; - type Follow = Unset; + type LikeViaRepost = Unset; + type Repost = Unset; type Mention = Unset; + type Verified = Unset; type Quote = Unset; } - ///State transition - sets the `like_via_repost` field to Set - pub struct SetLikeViaRepost(PhantomData S>); - impl sealed::Sealed for SetLikeViaRepost {} - impl State for SetLikeViaRepost { - type LikeViaRepost = Set; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; - type Reply = S::Reply; + ///State transition - sets the `reply` field to Set + pub struct SetReply(PhantomData S>); + impl sealed::Sealed for SetReply {} + impl State for SetReply { + type Reply = Set; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `repost_via_repost` field to Set - pub struct SetRepostViaRepost(PhantomData S>); - impl sealed::Sealed for SetRepostViaRepost {} - impl State for SetRepostViaRepost { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = Set; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + ///State transition - sets the `chat` field to Set + pub struct SetChat(PhantomData S>); + impl sealed::Sealed for SetChat {} + impl State for SetChat { type Reply = S::Reply; - type Chat = S::Chat; - type Repost = S::Repost; + type Chat = Set; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `subscribed_post` field to Set - pub struct SetSubscribedPost(PhantomData S>); - impl sealed::Sealed for SetSubscribedPost {} - impl State for SetSubscribedPost { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = Set; - type Verified = S::Verified; + ///State transition - sets the `follow` field to Set + pub struct SetFollow(PhantomData S>); + impl sealed::Sealed for SetFollow {} + impl State for SetFollow { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = Set; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `verified` field to Set - pub struct SetVerified(PhantomData S>); - impl sealed::Sealed for SetVerified {} - impl State for SetVerified { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = Set; + ///State transition - sets the `like` field to Set + pub struct SetLike(PhantomData S>); + impl sealed::Sealed for SetLike {} + impl State for SetLike { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; - type StarterpackJoined = S::StarterpackJoined; - type Unverified = S::Unverified; - type Like = S::Like; type Follow = S::Follow; - type Mention = S::Mention; - type Quote = S::Quote; - } - ///State transition - sets the `reply` field to Set - pub struct SetReply(PhantomData S>); - impl sealed::Sealed for SetReply {} - impl State for SetReply { - type LikeViaRepost = S::LikeViaRepost; + type Like = Set; type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; - type Reply = Set; - type Chat = S::Chat; - type Repost = S::Repost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; - type Mention = S::Mention; - type Quote = S::Quote; - } - ///State transition - sets the `chat` field to Set - pub struct SetChat(PhantomData S>); - impl sealed::Sealed for SetChat {} - impl State for SetChat { type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = Set; type Repost = S::Repost; - type StarterpackJoined = S::StarterpackJoined; - type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `repost` field to Set - pub struct SetRepost(PhantomData S>); - impl sealed::Sealed for SetRepost {} - impl State for SetRepost { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + ///State transition - sets the `repost_via_repost` field to Set + pub struct SetRepostViaRepost(PhantomData S>); + impl sealed::Sealed for SetRepostViaRepost {} + impl State for SetRepostViaRepost { type Reply = S::Reply; type Chat = S::Chat; - type Repost = Set; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = Set; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } ///State transition - sets the `starterpack_joined` field to Set pub struct SetStarterpackJoined(PhantomData S>); impl sealed::Sealed for SetStarterpackJoined {} impl State for SetStarterpackJoined { - type LikeViaRepost = S::LikeViaRepost; + type Reply = S::Reply; + type Chat = S::Chat; + type Follow = S::Follow; + type Like = S::Like; type RepostViaRepost = S::RepostViaRepost; + type StarterpackJoined = Set; type SubscribedPost = S::SubscribedPost; + type Unverified = S::Unverified; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; + type Mention = S::Mention; type Verified = S::Verified; + type Quote = S::Quote; + } + ///State transition - sets the `subscribed_post` field to Set + pub struct SetSubscribedPost(PhantomData S>); + impl sealed::Sealed for SetSubscribedPost {} + impl State for SetSubscribedPost { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; - type StarterpackJoined = Set; - type Unverified = S::Unverified; - type Like = S::Like; type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; + type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = Set; + type Unverified = S::Unverified; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } ///State transition - sets the `unverified` field to Set pub struct SetUnverified(PhantomData S>); impl sealed::Sealed for SetUnverified {} impl State for SetUnverified { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = Set; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `like` field to Set - pub struct SetLike(PhantomData S>); - impl sealed::Sealed for SetLike {} - impl State for SetLike { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + ///State transition - sets the `like_via_repost` field to Set + pub struct SetLikeViaRepost(PhantomData S>); + impl sealed::Sealed for SetLikeViaRepost {} + impl State for SetLikeViaRepost { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = Set; - type Follow = S::Follow; + type LikeViaRepost = Set; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData S>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; + ///State transition - sets the `repost` field to Set + pub struct SetRepost(PhantomData S>); + impl sealed::Sealed for SetRepost {} + impl State for SetRepost { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = Set; + type LikeViaRepost = S::LikeViaRepost; + type Repost = Set; type Mention = S::Mention; + type Verified = S::Verified; type Quote = S::Quote; } ///State transition - sets the `mention` field to Set pub struct SetMention(PhantomData S>); impl sealed::Sealed for SetMention {} impl State for SetMention { - type LikeViaRepost = S::LikeViaRepost; + type Reply = S::Reply; + type Chat = S::Chat; + type Follow = S::Follow; + type Like = S::Like; type RepostViaRepost = S::RepostViaRepost; + type StarterpackJoined = S::StarterpackJoined; type SubscribedPost = S::SubscribedPost; + type Unverified = S::Unverified; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; + type Mention = Set; type Verified = S::Verified; + type Quote = S::Quote; + } + ///State transition - sets the `verified` field to Set + pub struct SetVerified(PhantomData S>); + impl sealed::Sealed for SetVerified {} + impl State for SetVerified { type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; - type Mention = Set; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; + type Mention = S::Mention; + type Verified = Set; type Quote = S::Quote; } ///State transition - sets the `quote` field to Set pub struct SetQuote(PhantomData S>); impl sealed::Sealed for SetQuote {} impl State for SetQuote { - type LikeViaRepost = S::LikeViaRepost; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type Verified = S::Verified; type Reply = S::Reply; type Chat = S::Chat; - type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type RepostViaRepost = S::RepostViaRepost; type StarterpackJoined = S::StarterpackJoined; + type SubscribedPost = S::SubscribedPost; type Unverified = S::Unverified; - type Like = S::Like; - type Follow = S::Follow; + type LikeViaRepost = S::LikeViaRepost; + type Repost = S::Repost; type Mention = S::Mention; + type Verified = S::Verified; type Quote = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `like_via_repost` field - pub struct like_via_repost(()); - ///Marker type for the `repost_via_repost` field - pub struct repost_via_repost(()); - ///Marker type for the `subscribed_post` field - pub struct subscribed_post(()); - ///Marker type for the `verified` field - pub struct verified(()); ///Marker type for the `reply` field pub struct reply(()); ///Marker type for the `chat` field pub struct chat(()); - ///Marker type for the `repost` field - pub struct repost(()); + ///Marker type for the `follow` field + pub struct follow(()); + ///Marker type for the `like` field + pub struct like(()); + ///Marker type for the `repost_via_repost` field + pub struct repost_via_repost(()); ///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 `unverified` field pub struct unverified(()); - ///Marker type for the `like` field - pub struct like(()); - ///Marker type for the `follow` field - pub struct follow(()); + ///Marker type for the `like_via_repost` field + pub struct like_via_repost(()); + ///Marker type for the `repost` field + pub struct repost(()); ///Marker type for the `mention` field pub struct mention(()); + ///Marker type for the `verified` field + pub struct verified(()); ///Marker type for the `quote` field pub struct quote(()); } @@ -1781,18 +1781,18 @@ where impl<'a, S> PreferencesBuilder<'a, S> where S: preferences_state::State, - S::LikeViaRepost: preferences_state::IsSet, - S::RepostViaRepost: preferences_state::IsSet, - S::SubscribedPost: preferences_state::IsSet, - S::Verified: preferences_state::IsSet, S::Reply: preferences_state::IsSet, S::Chat: preferences_state::IsSet, - S::Repost: preferences_state::IsSet, + S::Follow: preferences_state::IsSet, + S::Like: preferences_state::IsSet, + S::RepostViaRepost: preferences_state::IsSet, S::StarterpackJoined: preferences_state::IsSet, + S::SubscribedPost: preferences_state::IsSet, S::Unverified: preferences_state::IsSet, - S::Like: preferences_state::IsSet, - S::Follow: preferences_state::IsSet, + S::LikeViaRepost: preferences_state::IsSet, + S::Repost: preferences_state::IsSet, S::Mention: preferences_state::IsSet, + S::Verified: preferences_state::IsSet, S::Quote: preferences_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs index df04601..60531c2 100644 --- a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs +++ b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs @@ -271,127 +271,127 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type IsRead; - type Uri; - type Author; - type IndexedAt; type Reason; + type Uri; type Record; + type IsRead; + type IndexedAt; + type Cid; + 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 IsRead = Unset; - type Uri = Unset; - type Author = Unset; - type IndexedAt = Unset; type Reason = Unset; + type Uri = Unset; type Record = Unset; + type IsRead = Unset; + type IndexedAt = Unset; + type Cid = Unset; + type Author = Unset; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type IsRead = S::IsRead; + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Reason = Set; type Uri = S::Uri; - type Author = S::Author; - type IndexedAt = S::IndexedAt; - type Reason = S::Reason; type Record = S::Record; - } - ///State transition - sets the `is_read` field to Set - pub struct SetIsRead(PhantomData S>); - impl sealed::Sealed for SetIsRead {} - impl State for SetIsRead { + type IsRead = S::IsRead; + type IndexedAt = S::IndexedAt; type Cid = S::Cid; - type IsRead = Set; - type Uri = S::Uri; type Author = S::Author; - type IndexedAt = S::IndexedAt; - type Reason = S::Reason; - type Record = S::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = S::Cid; - type IsRead = S::IsRead; - type Uri = Set; - type Author = S::Author; - type IndexedAt = S::IndexedAt; type Reason = S::Reason; + type Uri = Set; type Record = S::Record; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Cid = S::Cid; type IsRead = S::IsRead; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Author = S::Author; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Reason = S::Reason; type Uri = S::Uri; - type Author = Set; + type Record = Set; + type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Author = S::Author; + } + ///State transition - sets the `is_read` field to Set + pub struct SetIsRead(PhantomData S>); + impl sealed::Sealed for SetIsRead {} + impl State for SetIsRead { type Reason = S::Reason; + type Uri = S::Uri; type Record = S::Record; + type IsRead = Set; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Author = S::Author; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Cid = S::Cid; - type IsRead = S::IsRead; + type Reason = S::Reason; type Uri = S::Uri; - type Author = S::Author; + type Record = S::Record; + type IsRead = S::IsRead; type IndexedAt = Set; + type Cid = S::Cid; + type Author = S::Author; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Reason = S::Reason; + type Uri = S::Uri; type Record = S::Record; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Cid = S::Cid; type IsRead = S::IsRead; - type Uri = S::Uri; - type Author = S::Author; type IndexedAt = S::IndexedAt; - type Reason = Set; - type Record = S::Record; + type Cid = Set; + type Author = S::Author; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Cid = S::Cid; - type IsRead = S::IsRead; + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Reason = S::Reason; type Uri = S::Uri; - type Author = S::Author; + type Record = S::Record; + type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; - type Reason = S::Reason; - type Record = Set; + type Cid = S::Cid; + 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 `is_read` field - pub struct is_read(()); - ///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(()); ///Marker type for the `reason` field pub struct reason(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `is_read` field + pub struct is_read(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -614,13 +614,13 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, - S::Cid: notification_state::IsSet, - S::IsRead: notification_state::IsSet, - S::Uri: notification_state::IsSet, - S::Author: notification_state::IsSet, - S::IndexedAt: notification_state::IsSet, S::Reason: notification_state::IsSet, + S::Uri: notification_state::IsSet, S::Record: notification_state::IsSet, + S::IsRead: notification_state::IsSet, + S::IndexedAt: notification_state::IsSet, + S::Cid: notification_state::IsSet, + S::Author: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/register_push.rs b/crates/weaver-api/src/app_bsky/notification/register_push.rs index dd39b47..59309d0 100644 --- a/crates/weaver-api/src/app_bsky/notification/register_push.rs +++ b/crates/weaver-api/src/app_bsky/notification/register_push.rs @@ -40,67 +40,67 @@ pub mod register_push_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Platform; type AppId; type ServiceDid; type Token; + type Platform; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Platform = Unset; type AppId = Unset; type ServiceDid = Unset; type Token = Unset; - } - ///State transition - sets the `platform` field to Set - pub struct SetPlatform(PhantomData S>); - impl sealed::Sealed for SetPlatform {} - impl State for SetPlatform { - type Platform = Set; - type AppId = S::AppId; - type ServiceDid = S::ServiceDid; - type Token = S::Token; + type Platform = Unset; } ///State transition - sets the `app_id` field to Set pub struct SetAppId(PhantomData S>); impl sealed::Sealed for SetAppId {} impl State for SetAppId { - type Platform = S::Platform; type AppId = Set; type ServiceDid = S::ServiceDid; type Token = S::Token; + type Platform = S::Platform; } ///State transition - sets the `service_did` field to Set pub struct SetServiceDid(PhantomData S>); impl sealed::Sealed for SetServiceDid {} impl State for SetServiceDid { - type Platform = S::Platform; type AppId = S::AppId; type ServiceDid = Set; type Token = S::Token; + type Platform = S::Platform; } ///State transition - sets the `token` field to Set pub struct SetToken(PhantomData S>); impl sealed::Sealed for SetToken {} impl State for SetToken { - type Platform = S::Platform; type AppId = S::AppId; type ServiceDid = S::ServiceDid; type Token = Set; + type Platform = S::Platform; + } + ///State transition - sets the `platform` field to Set + pub struct SetPlatform(PhantomData S>); + impl sealed::Sealed for SetPlatform {} + impl State for SetPlatform { + type AppId = S::AppId; + type ServiceDid = S::ServiceDid; + type Token = S::Token; + type Platform = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `platform` field - pub struct platform(()); ///Marker type for the `app_id` field pub struct app_id(()); ///Marker type for the `service_did` field pub struct service_did(()); ///Marker type for the `token` field pub struct token(()); + ///Marker type for the `platform` field + pub struct platform(()); } } @@ -227,10 +227,10 @@ where impl<'a, S> RegisterPushBuilder<'a, S> where S: register_push_state::State, - S::Platform: register_push_state::IsSet, S::AppId: register_push_state::IsSet, S::ServiceDid: register_push_state::IsSet, S::Token: register_push_state::IsSet, + S::Platform: register_push_state::IsSet, { /// Build the final struct pub fn build(self) -> RegisterPush<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/unregister_push.rs b/crates/weaver-api/src/app_bsky/notification/unregister_push.rs index fd6244f..75c37f4 100644 --- a/crates/weaver-api/src/app_bsky/notification/unregister_push.rs +++ b/crates/weaver-api/src/app_bsky/notification/unregister_push.rs @@ -37,67 +37,67 @@ pub mod unregister_push_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Platform; type ServiceDid; type Token; type AppId; + 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 ServiceDid = Unset; type Token = Unset; type AppId = Unset; - } - ///State transition - sets the `platform` field to Set - pub struct SetPlatform(PhantomData S>); - impl sealed::Sealed for SetPlatform {} - impl State for SetPlatform { - type Platform = Set; - type ServiceDid = S::ServiceDid; - type Token = S::Token; - type AppId = S::AppId; + type Platform = Unset; } ///State transition - sets the `service_did` field to Set pub struct SetServiceDid(PhantomData S>); impl sealed::Sealed for SetServiceDid {} impl State for SetServiceDid { - type Platform = S::Platform; type ServiceDid = Set; type Token = S::Token; type AppId = S::AppId; + type Platform = S::Platform; } ///State transition - sets the `token` field to Set pub struct SetToken(PhantomData S>); impl sealed::Sealed for SetToken {} impl State for SetToken { - type Platform = S::Platform; type ServiceDid = S::ServiceDid; type Token = Set; type AppId = S::AppId; + type Platform = S::Platform; } ///State transition - sets the `app_id` field to Set pub struct SetAppId(PhantomData S>); impl sealed::Sealed for SetAppId {} impl State for SetAppId { - type Platform = S::Platform; type ServiceDid = S::ServiceDid; type Token = S::Token; type AppId = Set; + type Platform = S::Platform; + } + ///State transition - sets the `platform` field to Set + pub struct SetPlatform(PhantomData S>); + impl sealed::Sealed for SetPlatform {} + impl State for SetPlatform { + type ServiceDid = S::ServiceDid; + type Token = S::Token; + type AppId = S::AppId; + 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 `service_did` field pub struct service_did(()); ///Marker type for the `token` field pub struct token(()); ///Marker type for the `app_id` field pub struct app_id(()); + ///Marker type for the `platform` field + pub struct platform(()); } } @@ -210,10 +210,10 @@ where impl<'a, S> UnregisterPushBuilder<'a, S> where S: unregister_push_state::State, - S::Platform: unregister_push_state::IsSet, S::ServiceDid: unregister_push_state::IsSet, S::Token: unregister_push_state::IsSet, S::AppId: unregister_push_state::IsSet, + S::Platform: unregister_push_state::IsSet, { /// Build the final struct pub fn build(self) -> UnregisterPush<'a> { diff --git a/crates/weaver-api/src/app_bsky/richtext/facet.rs b/crates/weaver-api/src/app_bsky/richtext/facet.rs index 46a7337..2b225b3 100644 --- a/crates/weaver-api/src/app_bsky/richtext/facet.rs +++ b/crates/weaver-api/src/app_bsky/richtext/facet.rs @@ -581,37 +581,37 @@ pub mod facet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Features; + type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Index = Unset; type Features = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Features = S::Features; + type Index = Unset; } ///State transition - sets the `features` field to Set pub struct SetFeatures(PhantomData S>); impl sealed::Sealed for SetFeatures {} impl State for SetFeatures { - type Index = S::Index; type Features = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Features = S::Features; + type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `index` field - pub struct index(()); ///Marker type for the `features` field pub struct features(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -684,8 +684,8 @@ where impl<'a, S> FacetBuilder<'a, S> where S: facet_state::State, - S::Index: facet_state::IsSet, S::Features: facet_state::IsSet, + S::Index: facet_state::IsSet, { /// Build the final struct pub fn build(self) -> Facet<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced.rs b/crates/weaver-api/src/app_bsky/unspecced.rs index 34ce3a6..71fd394 100644 --- a/crates/weaver-api/src/app_bsky/unspecced.rs +++ b/crates/weaver-api/src/app_bsky/unspecced.rs @@ -1743,103 +1743,103 @@ pub mod skeleton_trend_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Link; type Topic; + type Link; type DisplayName; - type Dids; type PostCount; + type Dids; type StartedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Link = Unset; type Topic = Unset; + type Link = Unset; type DisplayName = Unset; - type Dids = Unset; type PostCount = Unset; + type Dids = Unset; type StartedAt = Unset; } - ///State transition - sets the `link` field to Set - pub struct SetLink(PhantomData S>); - impl sealed::Sealed for SetLink {} - impl State for SetLink { - type Link = Set; - type Topic = S::Topic; - type DisplayName = S::DisplayName; - type Dids = S::Dids; - type PostCount = S::PostCount; - type StartedAt = S::StartedAt; - } ///State transition - sets the `topic` field to Set pub struct SetTopic(PhantomData S>); impl sealed::Sealed for SetTopic {} impl State for SetTopic { - type Link = S::Link; type Topic = Set; + type Link = S::Link; type DisplayName = S::DisplayName; + type PostCount = S::PostCount; type Dids = S::Dids; + type StartedAt = S::StartedAt; + } + ///State transition - sets the `link` field to Set + pub struct SetLink(PhantomData S>); + impl sealed::Sealed for SetLink {} + impl State for SetLink { + type Topic = S::Topic; + type Link = Set; + type DisplayName = S::DisplayName; type PostCount = S::PostCount; + type Dids = S::Dids; type StartedAt = S::StartedAt; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Link = S::Link; type Topic = S::Topic; - type DisplayName = Set; - type Dids = S::Dids; - type PostCount = S::PostCount; - type StartedAt = S::StartedAt; - } - ///State transition - sets the `dids` field to Set - pub struct SetDids(PhantomData S>); - impl sealed::Sealed for SetDids {} - impl State for SetDids { type Link = S::Link; - type Topic = S::Topic; - type DisplayName = S::DisplayName; - type Dids = Set; + type DisplayName = Set; type PostCount = S::PostCount; + type Dids = S::Dids; type StartedAt = S::StartedAt; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); impl sealed::Sealed for SetPostCount {} impl State for SetPostCount { - type Link = S::Link; type Topic = S::Topic; + type Link = S::Link; type DisplayName = S::DisplayName; - type Dids = S::Dids; type PostCount = Set; + type Dids = S::Dids; + type StartedAt = S::StartedAt; + } + ///State transition - sets the `dids` field to Set + pub struct SetDids(PhantomData S>); + impl sealed::Sealed for SetDids {} + impl State for SetDids { + type Topic = S::Topic; + type Link = S::Link; + type DisplayName = S::DisplayName; + type PostCount = S::PostCount; + type Dids = Set; type StartedAt = S::StartedAt; } ///State transition - sets the `started_at` field to Set pub struct SetStartedAt(PhantomData S>); impl sealed::Sealed for SetStartedAt {} impl State for SetStartedAt { - type Link = S::Link; type Topic = S::Topic; + type Link = S::Link; type DisplayName = S::DisplayName; - type Dids = S::Dids; type PostCount = S::PostCount; + type Dids = S::Dids; type StartedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `link` field - pub struct link(()); ///Marker type for the `topic` field pub struct topic(()); + ///Marker type for the `link` field + pub struct link(()); ///Marker type for the `display_name` field pub struct display_name(()); - ///Marker type for the `dids` field - pub struct dids(()); ///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(()); } @@ -2028,11 +2028,11 @@ where impl<'a, S> SkeletonTrendBuilder<'a, S> where S: skeleton_trend_state::State, - S::Link: skeleton_trend_state::IsSet, S::Topic: skeleton_trend_state::IsSet, + S::Link: skeleton_trend_state::IsSet, S::DisplayName: skeleton_trend_state::IsSet, - S::Dids: skeleton_trend_state::IsSet, S::PostCount: skeleton_trend_state::IsSet, + S::Dids: skeleton_trend_state::IsSet, S::StartedAt: skeleton_trend_state::IsSet, { /// Build the final struct @@ -2322,105 +2322,105 @@ pub mod thread_item_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type OpThread; type MoreReplies; - type HiddenByThreadgate; type MoreParents; + type HiddenByThreadgate; type MutedByViewer; + 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 OpThread = Unset; type MoreReplies = Unset; - type HiddenByThreadgate = Unset; type MoreParents = Unset; + type HiddenByThreadgate = Unset; type MutedByViewer = Unset; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type OpThread = S::OpThread; - type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = S::HiddenByThreadgate; - type MoreParents = S::MoreParents; - type MutedByViewer = S::MutedByViewer; + type Post = Unset; } ///State transition - sets the `op_thread` field to Set pub struct SetOpThread(PhantomData S>); impl sealed::Sealed for SetOpThread {} impl State for SetOpThread { - type Post = S::Post; type OpThread = Set; type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = S::HiddenByThreadgate; type MoreParents = S::MoreParents; + type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; + type Post = S::Post; } ///State transition - sets the `more_replies` field to Set pub struct SetMoreReplies(PhantomData S>); impl sealed::Sealed for SetMoreReplies {} impl State for SetMoreReplies { - type Post = S::Post; type OpThread = S::OpThread; type MoreReplies = Set; - type HiddenByThreadgate = S::HiddenByThreadgate; type MoreParents = S::MoreParents; + type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; - } - ///State transition - sets the `hidden_by_threadgate` field to Set - pub struct SetHiddenByThreadgate(PhantomData S>); - impl sealed::Sealed for SetHiddenByThreadgate {} - impl State for SetHiddenByThreadgate { type Post = S::Post; - type OpThread = S::OpThread; - type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = Set; - type MoreParents = S::MoreParents; - type MutedByViewer = S::MutedByViewer; } ///State transition - sets the `more_parents` field to Set pub struct SetMoreParents(PhantomData S>); impl sealed::Sealed for SetMoreParents {} impl State for SetMoreParents { - type Post = S::Post; type OpThread = S::OpThread; type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = S::HiddenByThreadgate; type MoreParents = Set; + type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = S::MutedByViewer; + type Post = S::Post; + } + ///State transition - sets the `hidden_by_threadgate` field to Set + pub struct SetHiddenByThreadgate(PhantomData S>); + impl sealed::Sealed for SetHiddenByThreadgate {} + impl State for SetHiddenByThreadgate { + type OpThread = S::OpThread; + type MoreReplies = S::MoreReplies; + type MoreParents = S::MoreParents; + type HiddenByThreadgate = Set; + type MutedByViewer = S::MutedByViewer; + type Post = S::Post; } ///State transition - sets the `muted_by_viewer` field to Set pub struct SetMutedByViewer(PhantomData S>); impl sealed::Sealed for SetMutedByViewer {} impl State for SetMutedByViewer { - type Post = S::Post; type OpThread = S::OpThread; type MoreReplies = S::MoreReplies; - type HiddenByThreadgate = S::HiddenByThreadgate; type MoreParents = S::MoreParents; + type HiddenByThreadgate = S::HiddenByThreadgate; type MutedByViewer = Set; + type Post = S::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type OpThread = S::OpThread; + type MoreReplies = S::MoreReplies; + type MoreParents = S::MoreParents; + type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = S::MutedByViewer; + 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 `op_thread` field pub struct op_thread(()); ///Marker type for the `more_replies` field pub struct more_replies(()); - ///Marker type for the `hidden_by_threadgate` field - pub struct hidden_by_threadgate(()); ///Marker type for the `more_parents` field pub struct more_parents(()); + ///Marker type for the `hidden_by_threadgate` field + pub struct hidden_by_threadgate(()); ///Marker type for the `muted_by_viewer` field pub struct muted_by_viewer(()); + ///Marker type for the `post` field + pub struct post(()); } } @@ -2573,12 +2573,12 @@ where impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, - S::Post: thread_item_post_state::IsSet, S::OpThread: thread_item_post_state::IsSet, S::MoreReplies: thread_item_post_state::IsSet, - S::HiddenByThreadgate: thread_item_post_state::IsSet, S::MoreParents: thread_item_post_state::IsSet, + S::HiddenByThreadgate: thread_item_post_state::IsSet, S::MutedByViewer: thread_item_post_state::IsSet, + S::Post: thread_item_post_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItemPost<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_config.rs b/crates/weaver-api/src/app_bsky/unspecced/get_config.rs index 93b7596..08bdc64 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_config.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_config.rs @@ -33,37 +33,37 @@ pub mod live_now_config_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Domains; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Domains = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Domains = S::Domains; + type Did = Unset; } ///State transition - sets the `domains` field to Set pub struct SetDomains(PhantomData S>); impl sealed::Sealed for SetDomains {} impl State for SetDomains { - type Did = S::Did; type Domains = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Domains = S::Domains; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `domains` field pub struct domains(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> LiveNowConfigBuilder<'a, S> where S: live_now_config_state::State, - S::Did: live_now_config_state::IsSet, S::Domains: live_now_config_state::IsSet, + S::Did: live_now_config_state::IsSet, { /// Build the final struct pub fn build(self) -> LiveNowConfig<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs index acc76f5..752df1f 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -189,51 +189,51 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Depth; - type Value; type Uri; + type Value; + type Depth; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Depth = Unset; - type Value = Unset; type Uri = Unset; + type Value = Unset; + type Depth = Unset; } - ///State transition - sets the `depth` field to Set - pub struct SetDepth(PhantomData S>); - impl sealed::Sealed for SetDepth {} - impl State for SetDepth { - type Depth = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Value = S::Value; - type Uri = S::Uri; + type Depth = S::Depth; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Depth = S::Depth; - type Value = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Value = Set; type Depth = S::Depth; + } + ///State transition - sets the `depth` field to Set + pub struct SetDepth(PhantomData S>); + impl sealed::Sealed for SetDepth {} + impl State for SetDepth { + type Uri = S::Uri; type Value = S::Value; - type Uri = Set; + type Depth = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `depth` field - pub struct depth(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `depth` field + pub struct depth(()); } } @@ -326,9 +326,9 @@ where impl<'a, S> ThreadItemBuilder<'a, S> where S: thread_item_state::State, - S::Depth: thread_item_state::IsSet, - S::Value: thread_item_state::IsSet, S::Uri: thread_item_state::IsSet, + S::Value: thread_item_state::IsSet, + S::Depth: thread_item_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItem<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs b/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs index 3bceb81..c581972 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_tagged_suggestions.rs @@ -90,51 +90,51 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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 S>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type Tag = Set; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; type SubjectType = S::SubjectType; - type Subject = S::Subject; + type Tag = S::Tag; } ///State transition - sets the `subject_type` field to Set pub struct SetSubjectType(PhantomData S>); impl sealed::Sealed for SetSubjectType {} impl State for SetSubjectType { - type Tag = S::Tag; - type SubjectType = Set; type Subject = S::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + type SubjectType = Set; type Tag = S::Tag; + } + ///State transition - sets the `tag` field to Set + pub struct SetTag(PhantomData S>); + impl sealed::Sealed for SetTag {} + impl State for SetTag { + type Subject = S::Subject; type SubjectType = S::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(()); } } @@ -227,9 +227,9 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, - S::Tag: suggestion_state::IsSet, - S::SubjectType: suggestion_state::IsSet, S::Subject: suggestion_state::IsSet, + S::SubjectType: suggestion_state::IsSet, + S::Tag: suggestion_state::IsSet, { /// Build the final struct pub fn build(self) -> Suggestion<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo.rs b/crates/weaver-api/src/chat_bsky/convo.rs index 0aff1d6..abc7f8f 100644 --- a/crates/weaver-api/src/chat_bsky/convo.rs +++ b/crates/weaver-api/src/chat_bsky/convo.rs @@ -66,85 +66,85 @@ pub mod convo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Members; + type Rev; type Muted; type UnreadCount; - type Members; type Id; - type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Members = Unset; + type Rev = Unset; type Muted = Unset; type UnreadCount = Unset; - type Members = Unset; type Id = Unset; - type Rev = Unset; + } + ///State transition - sets the `members` field to Set + pub struct SetMembers(PhantomData S>); + impl sealed::Sealed for SetMembers {} + impl State for SetMembers { + type Members = Set; + type Rev = S::Rev; + type Muted = S::Muted; + type UnreadCount = S::UnreadCount; + type Id = S::Id; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Members = S::Members; + type Rev = Set; + type Muted = S::Muted; + type UnreadCount = S::UnreadCount; + type Id = S::Id; } ///State transition - sets the `muted` field to Set pub struct SetMuted(PhantomData S>); impl sealed::Sealed for SetMuted {} impl State for SetMuted { + type Members = S::Members; + type Rev = S::Rev; type Muted = Set; type UnreadCount = S::UnreadCount; - type Members = S::Members; type Id = S::Id; - type Rev = S::Rev; } ///State transition - sets the `unread_count` field to Set pub struct SetUnreadCount(PhantomData S>); impl sealed::Sealed for SetUnreadCount {} impl State for SetUnreadCount { - type Muted = S::Muted; - type UnreadCount = Set; type Members = S::Members; - type Id = S::Id; type Rev = S::Rev; - } - ///State transition - sets the `members` field to Set - pub struct SetMembers(PhantomData S>); - impl sealed::Sealed for SetMembers {} - impl State for SetMembers { type Muted = S::Muted; - type UnreadCount = S::UnreadCount; - type Members = Set; + type UnreadCount = Set; type Id = S::Id; - type Rev = S::Rev; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Muted = S::Muted; - type UnreadCount = S::UnreadCount; type Members = S::Members; - type Id = Set; type Rev = S::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type Muted = S::Muted; type UnreadCount = S::UnreadCount; - type Members = S::Members; - type Id = S::Id; - type Rev = Set; + type Id = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `members` field + pub struct members(()); + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `muted` field pub struct muted(()); ///Marker type for the `unread_count` field pub struct unread_count(()); - ///Marker type for the `members` field - pub struct members(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `rev` field - pub struct rev(()); } } @@ -334,11 +334,11 @@ where impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, + S::Members: convo_view_state::IsSet, + S::Rev: convo_view_state::IsSet, S::Muted: convo_view_state::IsSet, S::UnreadCount: convo_view_state::IsSet, - S::Members: convo_view_state::IsSet, S::Id: convo_view_state::IsSet, - S::Rev: convo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ConvoView<'a> { @@ -1648,67 +1648,67 @@ pub mod deleted_message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SentAt; type Rev; type Id; type Sender; + type SentAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SentAt = Unset; type Rev = Unset; type Id = Unset; type Sender = Unset; - } - ///State transition - sets the `sent_at` field to Set - pub struct SetSentAt(PhantomData S>); - impl sealed::Sealed for SetSentAt {} - impl State for SetSentAt { - type SentAt = Set; - type Rev = S::Rev; - type Id = S::Id; - type Sender = S::Sender; + type SentAt = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type SentAt = S::SentAt; type Rev = Set; type Id = S::Id; type Sender = S::Sender; + type SentAt = S::SentAt; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type SentAt = S::SentAt; type Rev = S::Rev; type Id = Set; type Sender = S::Sender; + type SentAt = S::SentAt; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type SentAt = S::SentAt; type Rev = S::Rev; type Id = S::Id; type Sender = Set; + type SentAt = S::SentAt; + } + ///State transition - sets the `sent_at` field to Set + pub struct SetSentAt(PhantomData S>); + impl sealed::Sealed for SetSentAt {} + impl State for SetSentAt { + type Rev = S::Rev; + type Id = S::Id; + type Sender = S::Sender; + type SentAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `sent_at` field - pub struct sent_at(()); ///Marker type for the `rev` field pub struct rev(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `sender` field pub struct sender(()); + ///Marker type for the `sent_at` field + pub struct sent_at(()); } } @@ -1821,10 +1821,10 @@ where impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, - S::SentAt: deleted_message_view_state::IsSet, S::Rev: deleted_message_view_state::IsSet, S::Id: deleted_message_view_state::IsSet, S::Sender: deleted_message_view_state::IsSet, + S::SentAt: deleted_message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DeletedMessageView<'a> { @@ -1939,65 +1939,65 @@ pub mod log_add_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ConvoId; type Message; type Rev; + type ConvoId; type Reaction; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ConvoId = Unset; type Message = Unset; type Rev = Unset; + type ConvoId = Unset; type Reaction = Unset; } - ///State transition - sets the `convo_id` field to Set - pub struct SetConvoId(PhantomData S>); - impl sealed::Sealed for SetConvoId {} - impl State for SetConvoId { - type ConvoId = Set; - type Message = S::Message; - type Rev = S::Rev; - type Reaction = S::Reaction; - } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = S::ConvoId; type Message = Set; type Rev = S::Rev; + type ConvoId = S::ConvoId; type Reaction = S::Reaction; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type ConvoId = S::ConvoId; type Message = S::Message; type Rev = Set; + type ConvoId = S::ConvoId; + type Reaction = S::Reaction; + } + ///State transition - sets the `convo_id` field to Set + pub struct SetConvoId(PhantomData S>); + impl sealed::Sealed for SetConvoId {} + impl State for SetConvoId { + type Message = S::Message; + type Rev = S::Rev; + type ConvoId = Set; type Reaction = S::Reaction; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { - type ConvoId = S::ConvoId; type Message = S::Message; type Rev = S::Rev; + type ConvoId = S::ConvoId; type Reaction = 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 `message` field pub struct message(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `convo_id` field + pub struct convo_id(()); ///Marker type for the `reaction` field pub struct reaction(()); } @@ -2112,9 +2112,9 @@ where impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, - S::ConvoId: log_add_reaction_state::IsSet, S::Message: log_add_reaction_state::IsSet, S::Rev: log_add_reaction_state::IsSet, + S::ConvoId: log_add_reaction_state::IsSet, S::Reaction: log_add_reaction_state::IsSet, { /// Build the final struct @@ -2247,51 +2247,51 @@ pub mod log_create_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type Message; type ConvoId; - 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 Message = Unset; type ConvoId = Unset; - type Rev = Unset; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Rev = Set; + type Message = S::Message; + type ConvoId = S::ConvoId; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { + type Rev = S::Rev; type Message = Set; type ConvoId = S::ConvoId; - type Rev = S::Rev; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Message = S::Message; - type ConvoId = Set; type Rev = S::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type Message = S::Message; - type ConvoId = S::ConvoId; - type Rev = Set; + type ConvoId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `message` field pub struct message(()); ///Marker type for the `convo_id` field pub struct convo_id(()); - ///Marker type for the `rev` field - pub struct rev(()); } } @@ -2384,9 +2384,9 @@ where impl<'a, S> LogCreateMessageBuilder<'a, S> where S: log_create_message_state::State, + S::Rev: log_create_message_state::IsSet, S::Message: log_create_message_state::IsSet, S::ConvoId: log_create_message_state::IsSet, - S::Rev: log_create_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogCreateMessage<'a> { @@ -2480,49 +2480,49 @@ pub mod log_delete_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev; type Message; + type Rev; type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev = Unset; type Message = Unset; + type Rev = Unset; type ConvoId = Unset; } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { - type Rev = Set; - type Message = S::Message; - type ConvoId = S::ConvoId; - } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Rev = S::Rev; type Message = Set; + type Rev = S::Rev; + type ConvoId = S::ConvoId; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Message = S::Message; + type Rev = Set; type ConvoId = S::ConvoId; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type Rev = S::Rev; type Message = S::Message; + type Rev = S::Rev; type ConvoId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `message` field pub struct message(()); + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); } @@ -2617,8 +2617,8 @@ where impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, - S::Rev: log_delete_message_state::IsSet, S::Message: log_delete_message_state::IsSet, + S::Rev: log_delete_message_state::IsSet, S::ConvoId: log_delete_message_state::IsSet, { /// Build the final struct @@ -3020,67 +3020,67 @@ pub mod log_remove_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ConvoId; type Rev; - type Reaction; + type ConvoId; type Message; + type Reaction; } /// 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 Reaction = Unset; + type ConvoId = Unset; type Message = Unset; - } - ///State transition - sets the `convo_id` field to Set - pub struct SetConvoId(PhantomData S>); - impl sealed::Sealed for SetConvoId {} - impl State for SetConvoId { - type ConvoId = Set; - type Rev = S::Rev; - type Reaction = S::Reaction; - type Message = S::Message; + type Reaction = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type ConvoId = S::ConvoId; type Rev = Set; - type Reaction = S::Reaction; + type ConvoId = S::ConvoId; type Message = S::Message; + type Reaction = S::Reaction; } - ///State transition - sets the `reaction` field to Set - pub struct SetReaction(PhantomData S>); - impl sealed::Sealed for SetReaction {} - impl State for SetReaction { - type ConvoId = S::ConvoId; + ///State transition - sets the `convo_id` field to Set + pub struct SetConvoId(PhantomData S>); + impl sealed::Sealed for SetConvoId {} + impl State for SetConvoId { type Rev = S::Rev; - type Reaction = Set; + type ConvoId = Set; type Message = S::Message; + type Reaction = S::Reaction; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = S::ConvoId; type Rev = S::Rev; - type Reaction = S::Reaction; + type ConvoId = S::ConvoId; type Message = Set; + type Reaction = S::Reaction; + } + ///State transition - sets the `reaction` field to Set + pub struct SetReaction(PhantomData S>); + impl sealed::Sealed for SetReaction {} + impl State for SetReaction { + type Rev = S::Rev; + type ConvoId = S::ConvoId; + type Message = S::Message; + type Reaction = 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 `reaction` field - pub struct reaction(()); + ///Marker type for the `convo_id` field + pub struct convo_id(()); ///Marker type for the `message` field pub struct message(()); + ///Marker type for the `reaction` field + pub struct reaction(()); } } @@ -3193,10 +3193,10 @@ where impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, - S::ConvoId: log_remove_reaction_state::IsSet, S::Rev: log_remove_reaction_state::IsSet, - S::Reaction: log_remove_reaction_state::IsSet, + S::ConvoId: log_remove_reaction_state::IsSet, S::Message: log_remove_reaction_state::IsSet, + S::Reaction: log_remove_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogRemoveReaction<'a> { @@ -3585,51 +3585,51 @@ pub mod message_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type MessageId; - type ConvoId; type Did; + type ConvoId; + type MessageId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MessageId = Unset; - type ConvoId = Unset; type Did = Unset; + type ConvoId = Unset; + type MessageId = Unset; } - ///State transition - sets the `message_id` field to Set - pub struct SetMessageId(PhantomData S>); - impl sealed::Sealed for SetMessageId {} - impl State for SetMessageId { - type MessageId = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type ConvoId = S::ConvoId; - type Did = S::Did; + type MessageId = S::MessageId; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { - type MessageId = S::MessageId; - type ConvoId = Set; type Did = S::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + type ConvoId = Set; type MessageId = S::MessageId; + } + ///State transition - sets the `message_id` field to Set + pub struct SetMessageId(PhantomData S>); + impl sealed::Sealed for SetMessageId {} + impl State for SetMessageId { + type Did = S::Did; type ConvoId = S::ConvoId; - type Did = Set; + type MessageId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message_id` field - pub struct message_id(()); - ///Marker type for the `convo_id` field - pub struct convo_id(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `convo_id` field + pub struct convo_id(()); + ///Marker type for the `message_id` field + pub struct message_id(()); } } @@ -3722,9 +3722,9 @@ where impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, - S::MessageId: message_ref_state::IsSet, - S::ConvoId: message_ref_state::IsSet, S::Did: message_ref_state::IsSet, + S::ConvoId: message_ref_state::IsSet, + S::MessageId: message_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageRef<'a> { @@ -3813,85 +3813,85 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Text; + type SentAt; type Rev; + type Id; type Sender; - type SentAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; type Text = Unset; + type SentAt = Unset; type Rev = Unset; + type Id = Unset; type Sender = Unset; - type SentAt = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type Text = S::Text; - type Rev = S::Rev; - type Sender = S::Sender; - type SentAt = S::SentAt; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData S>); impl sealed::Sealed for SetText {} impl State for SetText { - type Id = S::Id; type Text = Set; + type SentAt = S::SentAt; type Rev = S::Rev; + type Id = S::Id; + type Sender = S::Sender; + } + ///State transition - sets the `sent_at` field to Set + pub struct SetSentAt(PhantomData S>); + impl sealed::Sealed for SetSentAt {} + impl State for SetSentAt { + type Text = S::Text; + type SentAt = Set; + type Rev = S::Rev; + type Id = S::Id; type Sender = S::Sender; - type SentAt = S::SentAt; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Id = S::Id; type Text = S::Text; + type SentAt = S::SentAt; type Rev = Set; + type Id = S::Id; type Sender = S::Sender; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Text = S::Text; type SentAt = S::SentAt; + type Rev = S::Rev; + type Id = Set; + type Sender = S::Sender; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type Id = S::Id; type Text = S::Text; - type Rev = S::Rev; - type Sender = Set; type SentAt = S::SentAt; - } - ///State transition - sets the `sent_at` field to Set - pub struct SetSentAt(PhantomData S>); - impl sealed::Sealed for SetSentAt {} - impl State for SetSentAt { - type Id = S::Id; - type Text = S::Text; type Rev = S::Rev; - type Sender = S::Sender; - type SentAt = Set; + type Id = S::Id; + type Sender = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `id` field - pub struct id(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `sent_at` field + pub struct sent_at(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `sender` field pub struct sender(()); - ///Marker type for the `sent_at` field - pub struct sent_at(()); } } @@ -4084,11 +4084,11 @@ where impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, - S::Id: message_view_state::IsSet, S::Text: message_view_state::IsSet, + S::SentAt: message_view_state::IsSet, S::Rev: message_view_state::IsSet, + S::Id: message_view_state::IsSet, S::Sender: message_view_state::IsSet, - S::SentAt: message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageView<'a> { @@ -4342,51 +4342,51 @@ pub mod reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type Sender; type CreatedAt; + type Sender; + 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 Sender = Unset; type CreatedAt = Unset; + type Sender = Unset; + type Value = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Sender = S::Sender; - type CreatedAt = S::CreatedAt; + type Value = S::Value; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type Value = S::Value; - type Sender = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { + type Sender = Set; type Value = S::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type CreatedAt = S::CreatedAt; type Sender = S::Sender; - type CreatedAt = 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 `sender` field - pub struct sender(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `sender` field + pub struct sender(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -4479,9 +4479,9 @@ where impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, - S::Value: reaction_view_state::IsSet, - S::Sender: reaction_view_state::IsSet, S::CreatedAt: reaction_view_state::IsSet, + S::Sender: reaction_view_state::IsSet, + S::Value: reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionView<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo/send_message.rs b/crates/weaver-api/src/chat_bsky/convo/send_message.rs index 5950b13..a6b37be 100644 --- a/crates/weaver-api/src/chat_bsky/convo/send_message.rs +++ b/crates/weaver-api/src/chat_bsky/convo/send_message.rs @@ -33,37 +33,37 @@ pub mod send_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ConvoId; type Message; + type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ConvoId = Unset; type Message = Unset; - } - ///State transition - sets the `convo_id` field to Set - pub struct SetConvoId(PhantomData S>); - impl sealed::Sealed for SetConvoId {} - impl State for SetConvoId { - type ConvoId = Set; - type Message = S::Message; + type ConvoId = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = S::ConvoId; type Message = Set; + type ConvoId = S::ConvoId; + } + ///State transition - sets the `convo_id` field to Set + pub struct SetConvoId(PhantomData S>); + impl sealed::Sealed for SetConvoId {} + impl State for SetConvoId { + type Message = S::Message; + type ConvoId = 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 `message` field pub struct message(()); + ///Marker type for the `convo_id` field + pub struct convo_id(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> SendMessageBuilder<'a, S> where S: send_message_state::State, - S::ConvoId: send_message_state::IsSet, S::Message: send_message_state::IsSet, + S::ConvoId: send_message_state::IsSet, { /// Build the final struct pub fn build(self) -> SendMessage<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs b/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs index 0cc7b4b..4b541df 100644 --- a/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs +++ b/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs @@ -33,37 +33,37 @@ pub mod batch_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ConvoId; type Message; + type ConvoId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ConvoId = Unset; type Message = Unset; - } - ///State transition - sets the `convo_id` field to Set - pub struct SetConvoId(PhantomData S>); - impl sealed::Sealed for SetConvoId {} - impl State for SetConvoId { - type ConvoId = Set; - type Message = S::Message; + type ConvoId = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type ConvoId = S::ConvoId; type Message = Set; + type ConvoId = S::ConvoId; + } + ///State transition - sets the `convo_id` field to Set + pub struct SetConvoId(PhantomData S>); + impl sealed::Sealed for SetConvoId {} + impl State for SetConvoId { + type Message = S::Message; + type ConvoId = 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 `message` field pub struct message(()); + ///Marker type for the `convo_id` field + pub struct convo_id(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> BatchItemBuilder<'a, S> where S: batch_item_state::State, - S::ConvoId: batch_item_state::IsSet, S::Message: batch_item_state::IsSet, + S::ConvoId: batch_item_state::IsSet, { /// Build the final struct pub fn build(self) -> BatchItem<'a> { diff --git a/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs b/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs index 151d313..5199531 100644 --- a/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs +++ b/crates/weaver-api/src/chat_bsky/moderation/get_actor_metadata.rs @@ -185,67 +185,67 @@ pub mod metadata_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ConvosStarted; - type Convos; - type MessagesSent; type MessagesReceived; + type MessagesSent; + type Convos; + type ConvosStarted; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ConvosStarted = Unset; - type Convos = Unset; - type MessagesSent = Unset; type MessagesReceived = Unset; + type MessagesSent = Unset; + type Convos = Unset; + type ConvosStarted = Unset; } - ///State transition - sets the `convos_started` field to Set - pub struct SetConvosStarted(PhantomData S>); - impl sealed::Sealed for SetConvosStarted {} - impl State for SetConvosStarted { - type ConvosStarted = Set; - type Convos = S::Convos; + ///State transition - sets the `messages_received` field to Set + pub struct SetMessagesReceived(PhantomData S>); + impl sealed::Sealed for SetMessagesReceived {} + impl State for SetMessagesReceived { + type MessagesReceived = Set; type MessagesSent = S::MessagesSent; - type MessagesReceived = S::MessagesReceived; - } - ///State transition - sets the `convos` field to Set - pub struct SetConvos(PhantomData S>); - impl sealed::Sealed for SetConvos {} - impl State for SetConvos { + type Convos = S::Convos; type ConvosStarted = S::ConvosStarted; - type Convos = Set; - type MessagesSent = S::MessagesSent; - type MessagesReceived = S::MessagesReceived; } ///State transition - sets the `messages_sent` field to Set pub struct SetMessagesSent(PhantomData S>); impl sealed::Sealed for SetMessagesSent {} impl State for SetMessagesSent { - type ConvosStarted = S::ConvosStarted; - type Convos = S::Convos; - type MessagesSent = Set; type MessagesReceived = S::MessagesReceived; + type MessagesSent = Set; + type Convos = S::Convos; + type ConvosStarted = S::ConvosStarted; } - ///State transition - sets the `messages_received` field to Set - pub struct SetMessagesReceived(PhantomData S>); - impl sealed::Sealed for SetMessagesReceived {} - impl State for SetMessagesReceived { + ///State transition - sets the `convos` field to Set + pub struct SetConvos(PhantomData S>); + impl sealed::Sealed for SetConvos {} + impl State for SetConvos { + type MessagesReceived = S::MessagesReceived; + type MessagesSent = S::MessagesSent; + type Convos = Set; type ConvosStarted = S::ConvosStarted; - type Convos = S::Convos; + } + ///State transition - sets the `convos_started` field to Set + pub struct SetConvosStarted(PhantomData S>); + impl sealed::Sealed for SetConvosStarted {} + impl State for SetConvosStarted { + type MessagesReceived = S::MessagesReceived; type MessagesSent = S::MessagesSent; - type MessagesReceived = Set; + type Convos = S::Convos; + type ConvosStarted = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `convos_started` field - pub struct convos_started(()); - ///Marker type for the `convos` field - pub struct convos(()); - ///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 `messages_sent` field + pub struct messages_sent(()); + ///Marker type for the `convos` field + pub struct convos(()); + ///Marker type for the `convos_started` field + pub struct convos_started(()); } } @@ -358,10 +358,10 @@ where impl<'a, S> MetadataBuilder<'a, S> where S: metadata_state::State, - S::ConvosStarted: metadata_state::IsSet, - S::Convos: metadata_state::IsSet, - S::MessagesSent: metadata_state::IsSet, S::MessagesReceived: metadata_state::IsSet, + S::MessagesSent: metadata_state::IsSet, + S::Convos: metadata_state::IsSet, + S::ConvosStarted: metadata_state::IsSet, { /// Build the final struct pub fn build(self) -> Metadata<'a> { diff --git a/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs b/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs index b93c5d1..ebdd92b 100644 --- a/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs +++ b/crates/weaver-api/src/chat_bsky/moderation/update_actor_access.rs @@ -35,37 +35,37 @@ pub mod update_actor_access_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AllowAccess; type Actor; + type AllowAccess; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AllowAccess = Unset; type Actor = Unset; - } - ///State transition - sets the `allow_access` field to Set - pub struct SetAllowAccess(PhantomData S>); - impl sealed::Sealed for SetAllowAccess {} - impl State for SetAllowAccess { - type AllowAccess = Set; - type Actor = S::Actor; + type AllowAccess = Unset; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type AllowAccess = S::AllowAccess; type Actor = Set; + type AllowAccess = S::AllowAccess; + } + ///State transition - sets the `allow_access` field to Set + pub struct SetAllowAccess(PhantomData S>); + impl sealed::Sealed for SetAllowAccess {} + impl State for SetAllowAccess { + type Actor = S::Actor; + type AllowAccess = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `allow_access` field - pub struct allow_access(()); ///Marker type for the `actor` field pub struct actor(()); + ///Marker type for the `allow_access` field + pub struct allow_access(()); } } @@ -155,8 +155,8 @@ impl<'a, S: update_actor_access_state::State> UpdateActorAccessBuilder<'a, S> { impl<'a, S> UpdateActorAccessBuilder<'a, S> where S: update_actor_access_state::State, - S::AllowAccess: update_actor_access_state::IsSet, S::Actor: update_actor_access_state::IsSet, + S::AllowAccess: update_actor_access_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateActorAccess<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin.rs b/crates/weaver-api/src/com_atproto/admin.rs index 2990ddf..b6c30c1 100644 --- a/crates/weaver-api/src/com_atproto/admin.rs +++ b/crates/weaver-api/src/com_atproto/admin.rs @@ -80,51 +80,51 @@ pub mod account_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type IndexedAt; 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 IndexedAt = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type IndexedAt = S::IndexedAt; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Did = S::Did; type IndexedAt = Set; type Handle = S::Handle; + type Did = S::Did; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type IndexedAt = S::IndexedAt; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type IndexedAt = S::IndexedAt; + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -401,9 +401,9 @@ impl<'a, S: account_view_state::State> AccountViewBuilder<'a, S> { impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, - S::Did: account_view_state::IsSet, S::IndexedAt: account_view_state::IsSet, S::Handle: account_view_state::IsSet, + S::Did: account_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountView<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/send_email.rs b/crates/weaver-api/src/com_atproto/admin/send_email.rs index b386221..47b3dfe 100644 --- a/crates/weaver-api/src/com_atproto/admin/send_email.rs +++ b/crates/weaver-api/src/com_atproto/admin/send_email.rs @@ -42,51 +42,51 @@ pub mod send_email_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SenderDid; type RecipientDid; type Content; + type SenderDid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SenderDid = Unset; type RecipientDid = Unset; type Content = Unset; - } - ///State transition - sets the `sender_did` field to Set - pub struct SetSenderDid(PhantomData S>); - impl sealed::Sealed for SetSenderDid {} - impl State for SetSenderDid { - type SenderDid = Set; - type RecipientDid = S::RecipientDid; - type Content = S::Content; + type SenderDid = Unset; } ///State transition - sets the `recipient_did` field to Set pub struct SetRecipientDid(PhantomData S>); impl sealed::Sealed for SetRecipientDid {} impl State for SetRecipientDid { - type SenderDid = S::SenderDid; type RecipientDid = Set; type Content = S::Content; + type SenderDid = S::SenderDid; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData S>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type SenderDid = S::SenderDid; type RecipientDid = S::RecipientDid; type Content = Set; + type SenderDid = S::SenderDid; + } + ///State transition - sets the `sender_did` field to Set + pub struct SetSenderDid(PhantomData S>); + impl sealed::Sealed for SetSenderDid {} + impl State for SetSenderDid { + type RecipientDid = S::RecipientDid; + type Content = S::Content; + type SenderDid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `sender_did` field - pub struct sender_did(()); ///Marker type for the `recipient_did` field pub struct recipient_did(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `sender_did` field + pub struct sender_did(()); } } @@ -213,9 +213,9 @@ impl<'a, S: send_email_state::State> SendEmailBuilder<'a, S> { impl<'a, S> SendEmailBuilder<'a, S> where S: send_email_state::State, - S::SenderDid: send_email_state::IsSet, S::RecipientDid: send_email_state::IsSet, S::Content: send_email_state::IsSet, + S::SenderDid: send_email_state::IsSet, { /// Build the final struct pub fn build(self) -> SendEmail<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_handle.rs b/crates/weaver-api/src/com_atproto/admin/update_account_handle.rs index edb8971..021ff61 100644 --- a/crates/weaver-api/src/com_atproto/admin/update_account_handle.rs +++ b/crates/weaver-api/src/com_atproto/admin/update_account_handle.rs @@ -33,37 +33,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 S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = S::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Did = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> UpdateAccountHandleBuilder<'a, S> where S: update_account_handle_state::State, - S::Handle: update_account_handle_state::IsSet, S::Did: update_account_handle_state::IsSet, + S::Handle: update_account_handle_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateAccountHandle<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_password.rs b/crates/weaver-api/src/com_atproto/admin/update_account_password.rs index 47c11d7..fdf105f 100644 --- a/crates/weaver-api/src/com_atproto/admin/update_account_password.rs +++ b/crates/weaver-api/src/com_atproto/admin/update_account_password.rs @@ -33,37 +33,37 @@ pub mod update_account_password_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Password; type Did; + type Password; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Password = Unset; type Did = Unset; - } - ///State transition - sets the `password` field to Set - pub struct SetPassword(PhantomData S>); - impl sealed::Sealed for SetPassword {} - impl State for SetPassword { - type Password = Set; - type Did = S::Did; + type Password = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Password = S::Password; type Did = Set; + type Password = S::Password; + } + ///State transition - sets the `password` field to Set + pub struct SetPassword(PhantomData S>); + impl sealed::Sealed for SetPassword {} + impl State for SetPassword { + type Did = S::Did; + type Password = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `password` field - pub struct password(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `password` field + pub struct password(()); } } @@ -142,8 +142,8 @@ where impl<'a, S> UpdateAccountPasswordBuilder<'a, S> where S: update_account_password_state::State, - S::Password: update_account_password_state::IsSet, S::Did: update_account_password_state::IsSet, + S::Password: update_account_password_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateAccountPassword<'a> { diff --git a/crates/weaver-api/src/com_atproto/identity.rs b/crates/weaver-api/src/com_atproto/identity.rs index 6e752d0..ef51b79 100644 --- a/crates/weaver-api/src/com_atproto/identity.rs +++ b/crates/weaver-api/src/com_atproto/identity.rs @@ -48,50 +48,50 @@ pub mod identity_info_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Handle; type DidDoc; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Handle = Unset; type DidDoc = Unset; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Handle = S::Handle; - type DidDoc = S::DidDoc; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Did = S::Did; - type Handle = Set; type DidDoc = S::DidDoc; + type Handle = S::Handle; } ///State transition - sets the `did_doc` field to Set pub struct SetDidDoc(PhantomData S>); impl sealed::Sealed for SetDidDoc {} impl State for SetDidDoc { type Did = S::Did; - type Handle = S::Handle; type DidDoc = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type DidDoc = S::DidDoc; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did_doc` field pub struct did_doc(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -185,8 +185,8 @@ impl<'a, S> IdentityInfoBuilder<'a, S> where S: identity_info_state::State, S::Did: identity_info_state::IsSet, - S::Handle: identity_info_state::IsSet, S::DidDoc: identity_info_state::IsSet, + S::Handle: identity_info_state::IsSet, { /// Build the final struct pub fn build(self) -> IdentityInfo<'a> { diff --git a/crates/weaver-api/src/com_atproto/label.rs b/crates/weaver-api/src/com_atproto/label.rs index 0dabae0..6790ce0 100644 --- a/crates/weaver-api/src/com_atproto/label.rs +++ b/crates/weaver-api/src/com_atproto/label.rs @@ -64,66 +64,66 @@ pub mod label_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Val; - type Src; type Cts; type Uri; + 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 Cts = Unset; type Uri = Unset; + type Src = Unset; } ///State transition - sets the `val` field to Set pub struct SetVal(PhantomData S>); impl sealed::Sealed for SetVal {} impl State for SetVal { type Val = Set; - type Src = S::Src; - type Cts = S::Cts; - type Uri = S::Uri; - } - ///State transition - sets the `src` field to Set - pub struct SetSrc(PhantomData S>); - impl sealed::Sealed for SetSrc {} - impl State for SetSrc { - type Val = S::Val; - type Src = Set; type Cts = S::Cts; type Uri = S::Uri; + type Src = S::Src; } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData S>); impl sealed::Sealed for SetCts {} impl State for SetCts { type Val = S::Val; - type Src = S::Src; type Cts = Set; type Uri = S::Uri; + type Src = S::Src; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Val = S::Val; - type Src = S::Src; type Cts = S::Cts; type Uri = Set; + type Src = S::Src; + } + ///State transition - sets the `src` field to Set + pub struct SetSrc(PhantomData S>); + impl sealed::Sealed for SetSrc {} + impl State for SetSrc { + type Val = S::Val; + type Cts = S::Cts; + type Uri = S::Uri; + 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 `cts` field pub struct cts(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `src` field + pub struct src(()); } } @@ -329,9 +329,9 @@ impl<'a, S> LabelBuilder<'a, S> where S: label_state::State, S::Val: label_state::IsSet, - S::Src: label_state::IsSet, S::Cts: label_state::IsSet, S::Uri: label_state::IsSet, + S::Src: label_state::IsSet, { /// Build the final struct pub fn build(self) -> Label<'a> { @@ -1054,66 +1054,66 @@ pub mod label_value_definition_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Severity; + type Locales; type Identifier; type Blurs; - type Locales; } /// 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 Identifier = Unset; type Blurs = Unset; - type Locales = Unset; } ///State transition - sets the `severity` field to Set pub struct SetSeverity(PhantomData S>); impl sealed::Sealed for SetSeverity {} impl State for SetSeverity { type Severity = Set; + type Locales = S::Locales; + type Identifier = S::Identifier; + type Blurs = S::Blurs; + } + ///State transition - sets the `locales` field to Set + pub struct SetLocales(PhantomData S>); + impl sealed::Sealed for SetLocales {} + impl State for SetLocales { + type Severity = S::Severity; + type Locales = Set; type Identifier = S::Identifier; type Blurs = S::Blurs; - type Locales = S::Locales; } ///State transition - sets the `identifier` field to Set pub struct SetIdentifier(PhantomData S>); impl sealed::Sealed for SetIdentifier {} impl State for SetIdentifier { type Severity = S::Severity; + type Locales = S::Locales; type Identifier = Set; type Blurs = S::Blurs; - type Locales = S::Locales; } ///State transition - sets the `blurs` field to Set pub struct SetBlurs(PhantomData S>); impl sealed::Sealed for SetBlurs {} impl State for SetBlurs { type Severity = S::Severity; - type Identifier = S::Identifier; - type Blurs = Set; type Locales = S::Locales; - } - ///State transition - sets the `locales` field to Set - pub struct SetLocales(PhantomData S>); - impl sealed::Sealed for SetLocales {} - impl State for SetLocales { - type Severity = S::Severity; type Identifier = S::Identifier; - type Blurs = S::Blurs; - type Locales = Set; + 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 `identifier` field pub struct identifier(()); ///Marker type for the `blurs` field pub struct blurs(()); - ///Marker type for the `locales` field - pub struct locales(()); } } @@ -1269,9 +1269,9 @@ impl<'a, S> LabelValueDefinitionBuilder<'a, S> where S: label_value_definition_state::State, S::Severity: label_value_definition_state::IsSet, + S::Locales: label_value_definition_state::IsSet, S::Identifier: label_value_definition_state::IsSet, S::Blurs: label_value_definition_state::IsSet, - S::Locales: label_value_definition_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinition<'a> { @@ -1388,50 +1388,50 @@ pub mod label_value_definition_strings_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Name; - type Lang; type Description; + type Lang; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Name = Unset; - type Lang = Unset; type Description = Unset; + type Lang = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type Name = Set; - type Lang = S::Lang; - type Description = S::Description; - } - ///State transition - sets the `lang` field to Set - pub struct SetLang(PhantomData S>); - impl sealed::Sealed for SetLang {} - impl State for SetLang { - type Name = S::Name; - type Lang = Set; type Description = S::Description; + type Lang = S::Lang; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { type Name = S::Name; - type Lang = S::Lang; type Description = Set; + type Lang = S::Lang; + } + ///State transition - sets the `lang` field to Set + pub struct SetLang(PhantomData S>); + impl sealed::Sealed for SetLang {} + impl State for SetLang { + type Name = S::Name; + type Description = S::Description; + type Lang = 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 `lang` field - pub struct lang(()); ///Marker type for the `description` field pub struct description(()); + ///Marker type for the `lang` field + pub struct lang(()); } } @@ -1542,8 +1542,8 @@ impl<'a, S> LabelValueDefinitionStringsBuilder<'a, S> where S: label_value_definition_strings_state::State, S::Name: label_value_definition_strings_state::IsSet, - S::Lang: label_value_definition_strings_state::IsSet, S::Description: label_value_definition_strings_state::IsSet, + S::Lang: label_value_definition_strings_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinitionStrings<'a> { diff --git a/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs index 6ae8520..77ad97f 100644 --- a/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs +++ b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs @@ -203,37 +203,37 @@ pub mod labels_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; type Labels; + type Seq; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Seq = Unset; type Labels = Unset; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { - type Seq = Set; - type Labels = S::Labels; + type Seq = Unset; } ///State transition - sets the `labels` field to Set pub struct SetLabels(PhantomData S>); impl sealed::Sealed for SetLabels {} impl State for SetLabels { - type Seq = S::Seq; type Labels = Set; + type Seq = S::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Labels = S::Labels; + type Seq = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `seq` field - pub struct seq(()); ///Marker type for the `labels` field pub struct labels(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -306,8 +306,8 @@ where impl<'a, S> LabelsBuilder<'a, S> where S: labels_state::State, - S::Seq: labels_state::IsSet, S::Labels: labels_state::IsSet, + S::Seq: labels_state::IsSet, { /// Build the final struct pub fn build(self) -> Labels<'a> { diff --git a/crates/weaver-api/src/com_atproto/moderation/create_report.rs b/crates/weaver-api/src/com_atproto/moderation/create_report.rs index a782470..bdf6181 100644 --- a/crates/weaver-api/src/com_atproto/moderation/create_report.rs +++ b/crates/weaver-api/src/com_atproto/moderation/create_report.rs @@ -43,37 +43,37 @@ pub mod create_report_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type ReasonType; + 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 ReasonType = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type ReasonType = S::ReasonType; + type Subject = Unset; } ///State transition - sets the `reason_type` field to Set pub struct SetReasonType(PhantomData S>); impl sealed::Sealed for SetReasonType {} impl State for SetReasonType { - type Subject = S::Subject; type ReasonType = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type ReasonType = S::ReasonType; + 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 `reason_type` field pub struct reason_type(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -187,8 +187,8 @@ where impl<'a, S> CreateReportBuilder<'a, S> where S: create_report_state::State, - S::Subject: create_report_state::IsSet, S::ReasonType: create_report_state::IsSet, + S::Subject: create_report_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateReport<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs index fd8c1bf..a21d55a 100644 --- a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs @@ -42,37 +42,37 @@ pub mod create_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Collection; + type Value; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; type Collection = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Collection = S::Collection; + type Value = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Value = S::Value; type Collection = Set; + type Value = S::Value; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Collection = S::Collection; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `value` field + pub struct value(()); } } @@ -179,8 +179,8 @@ where impl<'a, S> CreateBuilder<'a, S> where S: create_state::State, - S::Value: create_state::IsSet, S::Collection: create_state::IsSet, + S::Value: create_state::IsSet, { /// Build the final struct pub fn build(self) -> Create<'a> { @@ -928,37 +928,37 @@ pub mod delete_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; type Rkey; + type Collection; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; type Rkey = Unset; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; - type Rkey = S::Rkey; + type Collection = Unset; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Collection = S::Collection; type Rkey = Set; + type Collection = S::Collection; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Rkey = S::Rkey; + type Collection = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); ///Marker type for the `rkey` field pub struct rkey(()); + ///Marker type for the `collection` field + pub struct collection(()); } } @@ -1039,8 +1039,8 @@ where impl<'a, S> DeleteBuilder<'a, S> where S: delete_state::State, - S::Collection: delete_state::IsSet, S::Rkey: delete_state::IsSet, + S::Collection: delete_state::IsSet, { /// Build the final struct pub fn build(self) -> Delete<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/create_record.rs b/crates/weaver-api/src/com_atproto/repo/create_record.rs index 0bebd18..5382176 100644 --- a/crates/weaver-api/src/com_atproto/repo/create_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/create_record.rs @@ -53,51 +53,51 @@ pub mod create_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Record; 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 Record = Unset; type Collection = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Record = S::Record; - type Collection = S::Collection; + type Repo = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Repo = S::Repo; type Record = Set; type Collection = S::Collection; + type Repo = S::Repo; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Repo = S::Repo; type Record = S::Record; type Collection = Set; + type Repo = S::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Record = S::Record; + type Collection = S::Collection; + type 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 `record` field pub struct record(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -258,9 +258,9 @@ impl<'a, S: create_record_state::State> CreateRecordBuilder<'a, S> { impl<'a, S> CreateRecordBuilder<'a, S> where S: create_record_state::State, - S::Repo: create_record_state::IsSet, S::Record: create_record_state::IsSet, S::Collection: create_record_state::IsSet, + S::Repo: create_record_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/delete_record.rs b/crates/weaver-api/src/com_atproto/repo/delete_record.rs index b546dff..dfad98a 100644 --- a/crates/weaver-api/src/com_atproto/repo/delete_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/delete_record.rs @@ -48,51 +48,51 @@ pub mod delete_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; 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 Collection = Unset; type Rkey = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Collection = S::Collection; - type Rkey = S::Rkey; + type Repo = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Repo = S::Repo; type Collection = Set; type Rkey = S::Rkey; + type Repo = S::Repo; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Repo = S::Repo; type Collection = S::Collection; type Rkey = Set; + type Repo = S::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Collection = S::Collection; + type Rkey = S::Rkey; + 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 `rkey` field pub struct rkey(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -233,9 +233,9 @@ impl<'a, S: delete_record_state::State> DeleteRecordBuilder<'a, S> { impl<'a, S> DeleteRecordBuilder<'a, S> where S: delete_record_state::State, - S::Repo: delete_record_state::IsSet, S::Collection: delete_record_state::IsSet, S::Rkey: delete_record_state::IsSet, + S::Repo: delete_record_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/get_record.rs b/crates/weaver-api/src/com_atproto/repo/get_record.rs index 1691fbc..a6e7059 100644 --- a/crates/weaver-api/src/com_atproto/repo/get_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/get_record.rs @@ -39,49 +39,49 @@ pub mod get_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Collection; type Rkey; + type Collection; type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Collection = Unset; type Rkey = Unset; + type Collection = Unset; type Repo = Unset; } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { - type Collection = Set; - type Rkey = S::Rkey; - type Repo = S::Repo; - } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Collection = S::Collection; type Rkey = Set; + type Collection = S::Collection; + type Repo = S::Repo; + } + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Rkey = S::Rkey; + type Collection = Set; type Repo = S::Repo; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Collection = S::Collection; type Rkey = S::Rkey; + type Collection = S::Collection; type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `collection` field - pub struct collection(()); ///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(()); } @@ -204,8 +204,8 @@ where impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, - S::Collection: get_record_state::IsSet, S::Rkey: get_record_state::IsSet, + S::Collection: get_record_state::IsSet, S::Repo: get_record_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs b/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs index 62c775e..3295674 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs @@ -186,37 +186,37 @@ pub mod record_blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RecordUri; type Cid; + type RecordUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RecordUri = Unset; type Cid = Unset; - } - ///State transition - sets the `record_uri` field to Set - pub struct SetRecordUri(PhantomData S>); - impl sealed::Sealed for SetRecordUri {} - impl State for SetRecordUri { - type RecordUri = Set; - type Cid = S::Cid; + type RecordUri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type RecordUri = S::RecordUri; type Cid = Set; + type RecordUri = S::RecordUri; + } + ///State transition - sets the `record_uri` field to Set + pub struct SetRecordUri(PhantomData S>); + impl sealed::Sealed for SetRecordUri {} + impl State for SetRecordUri { + type Cid = S::Cid; + type RecordUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record_uri` field - pub struct record_uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `record_uri` field + pub struct record_uri(()); } } @@ -289,8 +289,8 @@ where impl<'a, S> RecordBlobBuilder<'a, S> where S: record_blob_state::State, - S::RecordUri: record_blob_state::IsSet, S::Cid: record_blob_state::IsSet, + S::RecordUri: record_blob_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordBlob<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/list_records.rs b/crates/weaver-api/src/com_atproto/repo/list_records.rs index d6cf99b..664a243 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_records.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_records.rs @@ -40,37 +40,37 @@ pub mod list_records_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Repo; type Collection; + type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Repo = Unset; type Collection = Unset; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Repo = Set; - type Collection = S::Collection; + type Repo = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Repo = S::Repo; type Collection = Set; + type Repo = S::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Collection = S::Collection; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `repo` field - pub struct repo(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -188,8 +188,8 @@ impl<'a, S: list_records_state::State> ListRecordsBuilder<'a, S> { impl<'a, S> ListRecordsBuilder<'a, S> where S: list_records_state::State, - S::Repo: list_records_state::IsSet, S::Collection: list_records_state::IsSet, + S::Repo: list_records_state::IsSet, { /// Build the final struct pub fn build(self) -> ListRecords<'a> { @@ -278,51 +278,51 @@ pub mod record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Value; 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 Value = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Value = S::Value; - type Cid = S::Cid; + type Uri = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Uri = S::Uri; type Value = Set; type Cid = S::Cid; + type Uri = S::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; type Value = S::Value; type Cid = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Value = S::Value; + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -415,9 +415,9 @@ where impl<'a, S> RecordBuilder<'a, S> where S: record_state::State, - S::Uri: record_state::IsSet, S::Value: record_state::IsSet, S::Cid: record_state::IsSet, + S::Uri: record_state::IsSet, { /// Build the final struct pub fn build(self) -> Record<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/put_record.rs b/crates/weaver-api/src/com_atproto/repo/put_record.rs index 111cf1b..5da28ae 100644 --- a/crates/weaver-api/src/com_atproto/repo/put_record.rs +++ b/crates/weaver-api/src/com_atproto/repo/put_record.rs @@ -54,67 +54,67 @@ pub mod put_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rkey; type Collection; type Repo; type Record; + 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 Record = Unset; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData S>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Rkey = Set; - type Collection = S::Collection; - type Repo = S::Repo; - type Record = S::Record; + type Rkey = Unset; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Rkey = S::Rkey; type Collection = Set; type Repo = S::Repo; type Record = S::Record; + type Rkey = S::Rkey; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Rkey = S::Rkey; type Collection = S::Collection; type Repo = Set; type Record = S::Record; + type Rkey = S::Rkey; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Rkey = S::Rkey; type Collection = S::Collection; type Repo = S::Repo; type Record = Set; + type Rkey = S::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Collection = S::Collection; + type Repo = S::Repo; + type Record = S::Record; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rkey` field - pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); ///Marker type for the `repo` field pub struct repo(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -289,10 +289,10 @@ impl<'a, S: put_record_state::State> PutRecordBuilder<'a, S> { impl<'a, S> PutRecordBuilder<'a, S> where S: put_record_state::State, - S::Rkey: put_record_state::IsSet, S::Collection: put_record_state::IsSet, S::Repo: put_record_state::IsSet, S::Record: put_record_state::IsSet, + S::Rkey: put_record_state::IsSet, { /// Build the final struct pub fn build(self) -> PutRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/server.rs b/crates/weaver-api/src/com_atproto/server.rs index 7685ad9..f8c1f1c 100644 --- a/crates/weaver-api/src/com_atproto/server.rs +++ b/crates/weaver-api/src/com_atproto/server.rs @@ -66,127 +66,127 @@ pub mod invite_code_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Available; - type CreatedAt; type Uses; - type Disabled; - type Code; + type Available; type ForAccount; + type Code; type CreatedBy; + type CreatedAt; + type Disabled; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Available = Unset; - type CreatedAt = Unset; type Uses = Unset; - type Disabled = Unset; - type Code = Unset; + type Available = Unset; type ForAccount = Unset; + type Code = Unset; type CreatedBy = Unset; + type CreatedAt = Unset; + type Disabled = Unset; + } + ///State transition - sets the `uses` field to Set + pub struct SetUses(PhantomData S>); + impl sealed::Sealed for SetUses {} + impl State for SetUses { + type Uses = Set; + type Available = S::Available; + type ForAccount = S::ForAccount; + type Code = S::Code; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Disabled = S::Disabled; } ///State transition - sets the `available` field to Set pub struct SetAvailable(PhantomData S>); impl sealed::Sealed for SetAvailable {} impl State for SetAvailable { - type Available = Set; - type CreatedAt = S::CreatedAt; type Uses = S::Uses; - type Disabled = S::Disabled; - type Code = S::Code; + type Available = Set; type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Available = S::Available; - type CreatedAt = Set; - type Uses = S::Uses; - type Disabled = S::Disabled; type Code = S::Code; - type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `uses` field to Set - pub struct SetUses(PhantomData S>); - impl sealed::Sealed for SetUses {} - impl State for SetUses { - type Available = S::Available; type CreatedAt = S::CreatedAt; - type Uses = Set; type Disabled = S::Disabled; - type Code = S::Code; - type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; } - ///State transition - sets the `disabled` field to Set - pub struct SetDisabled(PhantomData S>); - impl sealed::Sealed for SetDisabled {} - impl State for SetDisabled { - type Available = S::Available; - type CreatedAt = S::CreatedAt; + ///State transition - sets the `for_account` field to Set + pub struct SetForAccount(PhantomData S>); + impl sealed::Sealed for SetForAccount {} + impl State for SetForAccount { type Uses = S::Uses; - type Disabled = Set; + type Available = S::Available; + type ForAccount = Set; type Code = S::Code; - type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Disabled = S::Disabled; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData S>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type Available = S::Available; - type CreatedAt = S::CreatedAt; type Uses = S::Uses; - type Disabled = S::Disabled; - type Code = Set; + type Available = S::Available; type ForAccount = S::ForAccount; + type Code = Set; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `for_account` field to Set - pub struct SetForAccount(PhantomData S>); - impl sealed::Sealed for SetForAccount {} - impl State for SetForAccount { - type Available = S::Available; type CreatedAt = S::CreatedAt; - type Uses = S::Uses; type Disabled = S::Disabled; - type Code = S::Code; - type ForAccount = Set; - type CreatedBy = S::CreatedBy; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { + type Uses = S::Uses; type Available = S::Available; + type ForAccount = S::ForAccount; + type Code = S::Code; + type CreatedBy = Set; type CreatedAt = S::CreatedAt; - type Uses = S::Uses; type Disabled = S::Disabled; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Uses = S::Uses; + type Available = S::Available; + type ForAccount = S::ForAccount; type Code = S::Code; + type CreatedBy = S::CreatedBy; + type CreatedAt = Set; + type Disabled = S::Disabled; + } + ///State transition - sets the `disabled` field to Set + pub struct SetDisabled(PhantomData S>); + impl sealed::Sealed for SetDisabled {} + impl State for SetDisabled { + type Uses = S::Uses; + type Available = S::Available; type ForAccount = S::ForAccount; - type CreatedBy = Set; + type Code = S::Code; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Disabled = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `available` field - pub struct available(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `uses` field pub struct uses(()); - ///Marker type for the `disabled` field - pub struct disabled(()); - ///Marker type for the `code` field - pub struct code(()); + ///Marker type for the `available` field + pub struct available(()); ///Marker type for the `for_account` field pub struct for_account(()); + ///Marker type for the `code` field + pub struct code(()); ///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 `disabled` field + pub struct disabled(()); } } @@ -359,13 +359,13 @@ where impl<'a, S> InviteCodeBuilder<'a, S> where S: invite_code_state::State, - S::Available: invite_code_state::IsSet, - S::CreatedAt: invite_code_state::IsSet, S::Uses: invite_code_state::IsSet, - S::Disabled: invite_code_state::IsSet, - S::Code: invite_code_state::IsSet, + S::Available: invite_code_state::IsSet, S::ForAccount: invite_code_state::IsSet, + S::Code: invite_code_state::IsSet, S::CreatedBy: invite_code_state::IsSet, + S::CreatedAt: invite_code_state::IsSet, + S::Disabled: invite_code_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteCode<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs b/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs index eace7a5..4eb9651 100644 --- a/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs +++ b/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs @@ -33,37 +33,37 @@ pub mod account_codes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Codes; type Account; + type Codes; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Codes = Unset; type Account = Unset; - } - ///State transition - sets the `codes` field to Set - pub struct SetCodes(PhantomData S>); - impl sealed::Sealed for SetCodes {} - impl State for SetCodes { - type Codes = Set; - type Account = S::Account; + type Codes = Unset; } ///State transition - sets the `account` field to Set pub struct SetAccount(PhantomData S>); impl sealed::Sealed for SetAccount {} impl State for SetAccount { - type Codes = S::Codes; type Account = Set; + type Codes = S::Codes; + } + ///State transition - sets the `codes` field to Set + pub struct SetCodes(PhantomData S>); + impl sealed::Sealed for SetCodes {} + impl State for SetCodes { + type Account = S::Account; + type Codes = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `codes` field - pub struct codes(()); ///Marker type for the `account` field pub struct account(()); + ///Marker type for the `codes` field + pub struct codes(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> AccountCodesBuilder<'a, S> where S: account_codes_state::State, - S::Codes: account_codes_state::IsSet, S::Account: account_codes_state::IsSet, + S::Codes: account_codes_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountCodes<'a> { @@ -361,37 +361,37 @@ pub mod create_invite_codes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UseCount; type CodeCount; + 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 CodeCount = Unset; - } - ///State transition - sets the `use_count` field to Set - pub struct SetUseCount(PhantomData S>); - impl sealed::Sealed for SetUseCount {} - impl State for SetUseCount { - type UseCount = Set; - type CodeCount = S::CodeCount; + type UseCount = Unset; } ///State transition - sets the `code_count` field to Set pub struct SetCodeCount(PhantomData S>); impl sealed::Sealed for SetCodeCount {} impl State for SetCodeCount { - type UseCount = S::UseCount; type CodeCount = Set; + type UseCount = S::UseCount; + } + ///State transition - sets the `use_count` field to Set + pub struct SetUseCount(PhantomData S>); + impl sealed::Sealed for SetUseCount {} + impl State for SetUseCount { + type CodeCount = S::CodeCount; + type UseCount = Set; } /// 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 `code_count` field pub struct code_count(()); + ///Marker type for the `use_count` field + pub struct use_count(()); } } @@ -484,8 +484,8 @@ where impl<'a, S> CreateInviteCodesBuilder<'a, S> where S: create_invite_codes_state::State, - S::UseCount: create_invite_codes_state::IsSet, S::CodeCount: create_invite_codes_state::IsSet, + S::UseCount: create_invite_codes_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateInviteCodes<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/delete_account.rs b/crates/weaver-api/src/com_atproto/server/delete_account.rs index 9805d89..15f1dfe 100644 --- a/crates/weaver-api/src/com_atproto/server/delete_account.rs +++ b/crates/weaver-api/src/com_atproto/server/delete_account.rs @@ -35,51 +35,51 @@ pub mod delete_account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type Password; type Token; + type Password; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type Password = Unset; type Token = Unset; + type Password = Unset; + type Did = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData S>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Token = Set; type Password = S::Password; - type Token = S::Token; + type Did = S::Did; } ///State transition - sets the `password` field to Set pub struct SetPassword(PhantomData S>); impl sealed::Sealed for SetPassword {} impl State for SetPassword { - type Did = S::Did; - type Password = Set; type Token = S::Token; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData S>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { + type Password = Set; type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Token = S::Token; type Password = S::Password; - type Token = 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 `password` field - pub struct password(()); ///Marker type for the `token` field pub struct token(()); + ///Marker type for the `password` field + pub struct password(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -172,9 +172,9 @@ where impl<'a, S> DeleteAccountBuilder<'a, S> where S: delete_account_state::State, - S::Did: delete_account_state::IsSet, - S::Password: delete_account_state::IsSet, S::Token: delete_account_state::IsSet, + S::Password: delete_account_state::IsSet, + S::Did: delete_account_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteAccount<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/list_app_passwords.rs b/crates/weaver-api/src/com_atproto/server/list_app_passwords.rs index 0500c91..905d864 100644 --- a/crates/weaver-api/src/com_atproto/server/list_app_passwords.rs +++ b/crates/weaver-api/src/com_atproto/server/list_app_passwords.rs @@ -34,37 +34,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 S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type CreatedAt = S::CreatedAt; + type Name = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Name = S::Name; type CreatedAt = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type CreatedAt = S::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(()); } } @@ -151,8 +151,8 @@ impl<'a, S: app_password_state::State> AppPasswordBuilder<'a, S> { impl<'a, S> AppPasswordBuilder<'a, S> where S: app_password_state::State, - S::Name: app_password_state::IsSet, S::CreatedAt: app_password_state::IsSet, + S::Name: app_password_state::IsSet, { /// Build the final struct pub fn build(self) -> AppPassword<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_blocks.rs b/crates/weaver-api/src/com_atproto/sync/get_blocks.rs index 4c82750..3022ba6 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_blocks.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_blocks.rs @@ -32,37 +32,37 @@ pub mod get_blocks_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cids; type Did; + type Cids; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cids = Unset; type Did = Unset; - } - ///State transition - sets the `cids` field to Set - pub struct SetCids(PhantomData S>); - impl sealed::Sealed for SetCids {} - impl State for SetCids { - type Cids = Set; - type Did = S::Did; + type Cids = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Cids = S::Cids; type Did = Set; + type Cids = S::Cids; + } + ///State transition - sets the `cids` field to Set + pub struct SetCids(PhantomData S>); + impl sealed::Sealed for SetCids {} + impl State for SetCids { + type Did = S::Did; + type Cids = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cids` field - pub struct cids(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `cids` field + pub struct cids(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetBlocksBuilder<'a, S> where S: get_blocks_state::State, - S::Cids: get_blocks_state::IsSet, S::Did: get_blocks_state::IsSet, + S::Cids: get_blocks_state::IsSet, { /// Build the final struct pub fn build(self) -> GetBlocks<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_record.rs b/crates/weaver-api/src/com_atproto/sync/get_record.rs index 45509de..03e0cca 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_record.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_record.rs @@ -37,50 +37,50 @@ pub mod get_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Rkey; - type Did; type Collection; + type Did; } /// 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; type Collection = Unset; + type Did = Unset; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { type Rkey = Set; - type Did = S::Did; - type Collection = S::Collection; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Rkey = S::Rkey; - type Did = Set; type Collection = S::Collection; + type Did = S::Did; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Rkey = S::Rkey; - type Did = S::Did; type Collection = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Rkey = S::Rkey; + type Collection = S::Collection; + type Did = Set; } /// 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 `collection` field pub struct collection(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -182,8 +182,8 @@ impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, S::Rkey: get_record_state::IsSet, - S::Did: get_record_state::IsSet, S::Collection: get_record_state::IsSet, + S::Did: get_record_state::IsSet, { /// Build the final struct pub fn build(self) -> GetRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/list_repos.rs b/crates/weaver-api/src/com_atproto/sync/list_repos.rs index 5a4ba79..a6ef385 100644 --- a/crates/weaver-api/src/com_atproto/sync/list_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/list_repos.rs @@ -194,51 +194,51 @@ pub mod repo_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Did; type Head; type Rev; - type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Did = Unset; type Head = Unset; type Rev = Unset; - type Did = Unset; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; + type Head = S::Head; + type Rev = S::Rev; } ///State transition - sets the `head` field to Set pub struct SetHead(PhantomData S>); impl sealed::Sealed for SetHead {} impl State for SetHead { + type Did = S::Did; type Head = Set; type Rev = S::Rev; - type Did = S::Did; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Head = S::Head; - type Rev = Set; type Did = S::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type Head = S::Head; - type Rev = S::Rev; - type Did = Set; + type Rev = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `head` field pub struct head(()); ///Marker type for the `rev` field pub struct rev(()); - ///Marker type for the `did` field - pub struct did(()); } } @@ -362,9 +362,9 @@ impl<'a, S: repo_state::State> RepoBuilder<'a, S> { impl<'a, S> RepoBuilder<'a, S> where S: repo_state::State, + S::Did: repo_state::IsSet, S::Head: repo_state::IsSet, S::Rev: repo_state::IsSet, - S::Did: repo_state::IsSet, { /// Build the final struct pub fn build(self) -> Repo<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs index 7a3ee31..e17767b 100644 --- a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs @@ -8,7 +8,13 @@ /// Represents a change to an account's status on a host (eg, PDS or Relay). The semantics of this event are that the status is at the host which emitted the event, not necessarily that at the currently active PDS. Eg, a Relay takedown would emit a takedown with active=false, even if the PDS is still active. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Account<'a> { @@ -26,7 +32,7 @@ pub struct Account<'a> { pub mod account_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -34,67 +40,67 @@ pub mod account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; + type Time; type Seq; + type Did; type Active; - 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 Time = Unset; type Seq = Unset; + type Did = Unset; type Active = Unset; - type Time = Unset; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Time = Set; type Seq = S::Seq; + type Did = S::Did; type Active = S::Active; - type Time = S::Time; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { - type Did = S::Did; + type Time = S::Time; type Seq = Set; + type Did = S::Did; type Active = S::Active; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { type Time = S::Time; + type Seq = S::Seq; + type Did = Set; + type Active = S::Active; } ///State transition - sets the `active` field to Set pub struct SetActive(PhantomData S>); impl sealed::Sealed for SetActive {} impl State for SetActive { - type Did = S::Did; - type Seq = S::Seq; - type Active = Set; type Time = S::Time; - } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Did = S::Did; type Seq = S::Seq; - type Active = S::Active; - type Time = Set; + type Did = S::Did; + type Active = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `seq` field pub struct seq(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `active` field pub struct active(()); - ///Marker type for the `time` field - pub struct time(()); } } @@ -173,7 +179,10 @@ where S::Seq: account_state::IsUnset, { /// Set the `seq` field (required) - pub fn seq(mut self, value: impl Into) -> AccountBuilder<'a, account_state::SetSeq> { + pub fn seq( + mut self, + value: impl Into, + ) -> AccountBuilder<'a, account_state::SetSeq> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); AccountBuilder { _phantom_state: ::core::marker::PhantomData, @@ -185,7 +194,10 @@ where impl<'a, S: account_state::State> AccountBuilder<'a, S> { /// Set the `status` field (optional) - pub fn status(mut self, value: impl Into>>) -> Self { + pub fn status( + mut self, + value: impl Into>>, + ) -> Self { self.__unsafe_private_named.3 = value.into(); self } @@ -218,10 +230,10 @@ where impl<'a, S> AccountBuilder<'a, S> where S: account_state::State, - S::Did: account_state::IsSet, + S::Time: account_state::IsSet, S::Seq: account_state::IsSet, + S::Did: account_state::IsSet, S::Active: account_state::IsSet, - S::Time: account_state::IsSet, { /// Build the final struct pub fn build(self) -> Account<'a> { @@ -253,8 +265,9 @@ where } } -fn lexicon_doc_com_atproto_sync_subscribeRepos() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> -{ +fn lexicon_doc_com_atproto_sync_subscribeRepos() -> ::jacquard_lexicon::lexicon::LexiconDoc< + 'static, +> { ::jacquard_lexicon::lexicon::LexiconDoc { lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1, id: ::jacquard_common::CowStr::new_static("com.atproto.sync.subscribeRepos"), @@ -634,54 +647,48 @@ fn lexicon_doc_com_atproto_sync_subscribeRepos() -> ::jacquard_lexicon::lexicon: ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("info"), - ::jacquard_lexicon::lexicon::LexUserType::Object( - ::jacquard_lexicon::lexicon::LexObject { - description: None, - required: Some(vec![::jacquard_common::smol_str::SmolStr::new_static( - "name", - )]), - nullable: None, - properties: { - #[allow(unused_mut)] - let mut map = ::std::collections::BTreeMap::new(); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("message"), - ::jacquard_lexicon::lexicon::LexObjectProperty::String( - ::jacquard_lexicon::lexicon::LexString { - description: None, - format: None, - default: None, - min_length: None, - max_length: None, - min_graphemes: None, - max_graphemes: None, - r#enum: None, - r#const: None, - known_values: None, - }, - ), - ); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("name"), - ::jacquard_lexicon::lexicon::LexObjectProperty::String( - ::jacquard_lexicon::lexicon::LexString { - description: None, - format: None, - default: None, - min_length: None, - max_length: None, - min_graphemes: None, - max_graphemes: None, - r#enum: None, - r#const: None, - known_values: None, - }, - ), - ); - map - }, + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { + description: None, + required: Some( + vec![::jacquard_common::smol_str::SmolStr::new_static("name")], + ), + nullable: None, + properties: { + #[allow(unused_mut)] + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("message"), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: None, + format: None, + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("name"), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: None, + format: None, + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map }, - ), + }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("main"), @@ -716,70 +723,68 @@ fn lexicon_doc_com_atproto_sync_subscribeRepos() -> ::jacquard_lexicon::lexicon: ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("repoOp"), - ::jacquard_lexicon::lexicon::LexUserType::Object( - ::jacquard_lexicon::lexicon::LexObject { - description: Some(::jacquard_common::CowStr::new_static( + ::jacquard_lexicon::lexicon::LexUserType::Object(::jacquard_lexicon::lexicon::LexObject { + description: Some( + ::jacquard_common::CowStr::new_static( "A repo operation, ie a mutation of a single record.", - )), - required: Some(vec![ + ), + ), + required: Some( + vec![ ::jacquard_common::smol_str::SmolStr::new_static("action"), ::jacquard_common::smol_str::SmolStr::new_static("path"), + ::jacquard_common::smol_str::SmolStr::new_static("cid") + ], + ), + nullable: None, + properties: { + #[allow(unused_mut)] + let mut map = ::std::collections::BTreeMap::new(); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("action"), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: None, + format: None, + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( ::jacquard_common::smol_str::SmolStr::new_static("cid"), - ]), - nullable: None, - properties: { - #[allow(unused_mut)] - let mut map = ::std::collections::BTreeMap::new(); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("action"), - ::jacquard_lexicon::lexicon::LexObjectProperty::String( - ::jacquard_lexicon::lexicon::LexString { - description: None, - format: None, - default: None, - min_length: None, - max_length: None, - min_graphemes: None, - max_graphemes: None, - r#enum: None, - r#const: None, - known_values: None, - }, - ), - ); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("cid"), - ::jacquard_lexicon::lexicon::LexObjectProperty::CidLink( - ::jacquard_lexicon::lexicon::LexCidLink { description: None }, - ), - ); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("path"), - ::jacquard_lexicon::lexicon::LexObjectProperty::String( - ::jacquard_lexicon::lexicon::LexString { - description: None, - format: None, - default: None, - min_length: None, - max_length: None, - min_graphemes: None, - max_graphemes: None, - r#enum: None, - r#const: None, - known_values: None, - }, - ), - ); - map.insert( - ::jacquard_common::smol_str::SmolStr::new_static("prev"), - ::jacquard_lexicon::lexicon::LexObjectProperty::CidLink( - ::jacquard_lexicon::lexicon::LexCidLink { description: None }, - ), - ); - map - }, + ::jacquard_lexicon::lexicon::LexObjectProperty::CidLink(::jacquard_lexicon::lexicon::LexCidLink { + description: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("path"), + ::jacquard_lexicon::lexicon::LexObjectProperty::String(::jacquard_lexicon::lexicon::LexString { + description: None, + format: None, + default: None, + min_length: None, + max_length: None, + min_graphemes: None, + max_graphemes: None, + r#enum: None, + r#const: None, + known_values: None, + }), + ); + map.insert( + ::jacquard_common::smol_str::SmolStr::new_static("prev"), + ::jacquard_lexicon::lexicon::LexObjectProperty::CidLink(::jacquard_lexicon::lexicon::LexCidLink { + description: None, + }), + ); + map }, - ), + }), ); map.insert( ::jacquard_common::smol_str::SmolStr::new_static("sync"), @@ -911,7 +916,13 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Account<'a> { /// Represents an update of repository state. Note that empty commits are allowed, which include no repo data changes, but an update to rev and signature. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Commit<'a> { @@ -948,7 +959,7 @@ pub struct Commit<'a> { pub mod commit_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -957,204 +968,204 @@ pub mod commit_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Seq; - type Rebase; - type Time; - type Ops; - type Repo; + type Blocks; type Commit; - type Rev; type Blobs; + type Ops; + type Rev; + type Time; type TooBig; - type Blocks; + type Rebase; + type Repo; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Seq = Unset; - type Rebase = Unset; - type Time = Unset; - type Ops = Unset; - type Repo = Unset; + type Blocks = Unset; type Commit = Unset; - type Rev = Unset; type Blobs = Unset; + type Ops = Unset; + type Rev = Unset; + type Time = Unset; type TooBig = Unset; - type Blocks = Unset; + type Rebase = Unset; + type Repo = Unset; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { type Seq = Set; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; - type Repo = S::Repo; + type Blocks = S::Blocks; type Commit = S::Commit; - type Rev = S::Rev; type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } - ///State transition - sets the `rebase` field to Set - pub struct SetRebase(PhantomData S>); - impl sealed::Sealed for SetRebase {} - impl State for SetRebase { + ///State transition - sets the `blocks` field to Set + pub struct SetBlocks(PhantomData S>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { type Seq = S::Seq; - type Rebase = Set; - type Time = S::Time; - type Ops = S::Ops; - type Repo = S::Repo; + type Blocks = Set; type Commit = S::Commit; - type Rev = S::Rev; type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { + ///State transition - sets the `commit` field to Set + pub struct SetCommit(PhantomData S>); + impl sealed::Sealed for SetCommit {} + impl State for SetCommit { type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = Set; + type Blocks = S::Blocks; + type Commit = Set; + type Blobs = S::Blobs; type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; + type TooBig = S::TooBig; + type Rebase = S::Rebase; type Repo = S::Repo; + } + ///State transition - sets the `blobs` field to Set + pub struct SetBlobs(PhantomData S>); + impl sealed::Sealed for SetBlobs {} + impl State for SetBlobs { + type Seq = S::Seq; + type Blocks = S::Blocks; type Commit = S::Commit; + type Blobs = Set; + type Ops = S::Ops; type Rev = S::Rev; - type Blobs = S::Blobs; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } ///State transition - sets the `ops` field to Set pub struct SetOps(PhantomData S>); impl sealed::Sealed for SetOps {} impl State for SetOps { type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = Set; - type Repo = S::Repo; - type Commit = S::Commit; - type Rev = S::Rev; - type Blobs = S::Blobs; - type TooBig = S::TooBig; type Blocks = S::Blocks; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { - type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; - type Repo = Set; type Commit = S::Commit; - type Rev = S::Rev; type Blobs = S::Blobs; - type TooBig = S::TooBig; - type Blocks = S::Blocks; - } - ///State transition - sets the `commit` field to Set - pub struct SetCommit(PhantomData S>); - impl sealed::Sealed for SetCommit {} - impl State for SetCommit { - type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; - type Repo = S::Repo; - type Commit = Set; + type Ops = Set; type Rev = S::Rev; - type Blobs = S::Blobs; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; - type Repo = S::Repo; + type Blocks = S::Blocks; type Commit = S::Commit; - type Rev = Set; type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = Set; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = S::Blocks; - } - ///State transition - sets the `blobs` field to Set - pub struct SetBlobs(PhantomData S>); - impl sealed::Sealed for SetBlobs {} - impl State for SetBlobs { - type Seq = S::Seq; type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; type Repo = S::Repo; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Seq = S::Seq; + type Blocks = S::Blocks; type Commit = S::Commit; + type Blobs = S::Blobs; + type Ops = S::Ops; type Rev = S::Rev; - type Blobs = Set; + type Time = Set; type TooBig = S::TooBig; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } ///State transition - sets the `too_big` field to Set pub struct SetTooBig(PhantomData S>); impl sealed::Sealed for SetTooBig {} impl State for SetTooBig { type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; - type Ops = S::Ops; - type Repo = S::Repo; + type Blocks = S::Blocks; type Commit = S::Commit; - type Rev = S::Rev; type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; type TooBig = Set; - type Blocks = S::Blocks; + type Rebase = S::Rebase; + type Repo = S::Repo; } - ///State transition - sets the `blocks` field to Set - pub struct SetBlocks(PhantomData S>); - impl sealed::Sealed for SetBlocks {} - impl State for SetBlocks { + ///State transition - sets the `rebase` field to Set + pub struct SetRebase(PhantomData S>); + impl sealed::Sealed for SetRebase {} + impl State for SetRebase { type Seq = S::Seq; - type Rebase = S::Rebase; - type Time = S::Time; + type Blocks = S::Blocks; + type Commit = S::Commit; + type Blobs = S::Blobs; type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; + type TooBig = S::TooBig; + type Rebase = Set; type Repo = S::Repo; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Seq = S::Seq; + type Blocks = S::Blocks; type Commit = S::Commit; - type Rev = S::Rev; type Blobs = S::Blobs; + type Ops = S::Ops; + type Rev = S::Rev; + type Time = S::Time; type TooBig = S::TooBig; - type Blocks = Set; + type Rebase = S::Rebase; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `seq` field pub struct seq(()); - ///Marker type for the `rebase` field - pub struct rebase(()); - ///Marker type for the `time` field - pub struct time(()); - ///Marker type for the `ops` field - pub struct ops(()); - ///Marker type for the `repo` field - pub struct repo(()); + ///Marker type for the `blocks` field + pub struct blocks(()); ///Marker type for the `commit` field pub struct commit(()); - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `blobs` field pub struct blobs(()); + ///Marker type for the `ops` field + pub struct ops(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `too_big` field pub struct too_big(()); - ///Marker type for the `blocks` field - pub struct blocks(()); + ///Marker type for the `rebase` field + pub struct rebase(()); + ///Marker type for the `repo` field + pub struct repo(()); } } @@ -1165,7 +1176,9 @@ pub struct CommitBuilder<'a, S: commit_state::State> { ::core::option::Option>>, ::core::option::Option, ::core::option::Option>, - ::core::option::Option>>, + ::core::option::Option< + Vec>, + >, ::core::option::Option>, ::core::option::Option, ::core::option::Option>, @@ -1191,7 +1204,18 @@ impl<'a> CommitBuilder<'a, commit_state::Empty> { CommitBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: ( - None, None, None, None, None, None, None, None, None, None, None, None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, + None, ), _phantom: ::core::marker::PhantomData, } @@ -1356,7 +1380,10 @@ where S::Seq: commit_state::IsUnset, { /// Set the `seq` field (required) - pub fn seq(mut self, value: impl Into) -> CommitBuilder<'a, commit_state::SetSeq> { + pub fn seq( + mut self, + value: impl Into, + ) -> CommitBuilder<'a, commit_state::SetSeq> { self.__unsafe_private_named.8 = ::core::option::Option::Some(value.into()); CommitBuilder { _phantom_state: ::core::marker::PhantomData, @@ -1368,12 +1395,18 @@ where impl<'a, S: commit_state::State> CommitBuilder<'a, S> { /// Set the `since` field (optional) - pub fn since(mut self, value: impl Into>) -> Self { + pub fn since( + mut self, + value: impl Into>, + ) -> Self { self.__unsafe_private_named.9 = value.into(); self } /// Set the `since` field to an Option value (optional) - pub fn maybe_since(mut self, value: Option) -> Self { + pub fn maybe_since( + mut self, + value: Option, + ) -> Self { self.__unsafe_private_named.9 = value; self } @@ -1421,15 +1454,15 @@ impl<'a, S> CommitBuilder<'a, S> where S: commit_state::State, S::Seq: commit_state::IsSet, - S::Rebase: commit_state::IsSet, - S::Time: commit_state::IsSet, - S::Ops: commit_state::IsSet, - S::Repo: commit_state::IsSet, + S::Blocks: commit_state::IsSet, S::Commit: commit_state::IsSet, - S::Rev: commit_state::IsSet, S::Blobs: commit_state::IsSet, + S::Ops: commit_state::IsSet, + S::Rev: commit_state::IsSet, + S::Time: commit_state::IsSet, S::TooBig: commit_state::IsSet, - S::Blocks: commit_state::IsSet, + S::Rebase: commit_state::IsSet, + S::Repo: commit_state::IsSet, { /// Build the final struct pub fn build(self) -> Commit<'a> { @@ -1493,7 +1526,9 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Commit<'a> { #[allow(unused_comparisons)] if value.len() > 200usize { return Err(::jacquard_lexicon::validation::ConstraintError::MaxLength { - path: ::jacquard_lexicon::validation::ValidationPath::from_field("ops"), + path: ::jacquard_lexicon::validation::ValidationPath::from_field( + "ops", + ), max: 200usize, actual: value.len(), }); @@ -1506,7 +1541,13 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Commit<'a> { /// Represents a change to an account's identity. Could be an updated handle, signing key, or pds hosting endpoint. Serves as a prod to all downstream services to refresh their identity cache. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Identity<'a> { @@ -1522,7 +1563,7 @@ pub struct Identity<'a> { pub mod identity_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -1530,51 +1571,51 @@ pub mod identity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Time; type Did; type Seq; - type Time; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Time = Unset; type Did = Unset; type Seq = Unset; - type Time = Unset; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Time = Set; + type Did = S::Did; + type Seq = S::Seq; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type Time = S::Time; type Did = Set; type Seq = S::Seq; - type Time = S::Time; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { - type Did = S::Did; - type Seq = Set; type Time = S::Time; - } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { type Did = S::Did; - type Seq = S::Seq; - type Time = Set; + type Seq = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `time` field + pub struct time(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `seq` field pub struct seq(()); - ///Marker type for the `time` field - pub struct time(()); } } @@ -1652,7 +1693,10 @@ where S::Seq: identity_state::IsUnset, { /// Set the `seq` field (required) - pub fn seq(mut self, value: impl Into) -> IdentityBuilder<'a, identity_state::SetSeq> { + pub fn seq( + mut self, + value: impl Into, + ) -> IdentityBuilder<'a, identity_state::SetSeq> { self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); IdentityBuilder { _phantom_state: ::core::marker::PhantomData, @@ -1684,9 +1728,9 @@ where impl<'a, S> IdentityBuilder<'a, S> where S: identity_state::State, + S::Time: identity_state::IsSet, S::Did: identity_state::IsSet, S::Seq: identity_state::IsSet, - S::Time: identity_state::IsSet, { /// Build the final struct pub fn build(self) -> Identity<'a> { @@ -1742,7 +1786,7 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Identity<'a> { PartialEq, Eq, jacquard_derive::IntoStatic, - Default, + Default )] #[serde(rename_all = "camelCase")] pub struct Info<'a> { @@ -1771,7 +1815,13 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Info<'a> { } #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct SubscribeRepos { @@ -1781,7 +1831,7 @@ pub struct SubscribeRepos { pub mod subscribe_repos_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -1848,7 +1898,13 @@ where #[jacquard_derive::open_union] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(tag = "$type")] #[serde(bound(deserialize = "'de: 'a"))] @@ -1870,7 +1926,9 @@ impl<'a> SubscribeReposMessage<'a> { pub fn decode_framed<'de: 'a>( bytes: &'de [u8], ) -> Result, jacquard_common::error::DecodeError> { - let (header, body) = jacquard_common::xrpc::subscription::parse_event_header(bytes)?; + let (header, body) = jacquard_common::xrpc::subscription::parse_event_header( + bytes, + )?; match header.t.as_str() { "#commit" => { let variant = serde_ipld_dagcbor::from_slice(body)?; @@ -1892,9 +1950,11 @@ impl<'a> SubscribeReposMessage<'a> { let variant = serde_ipld_dagcbor::from_slice(body)?; Ok(Self::Info(Box::new(variant))) } - unknown => Err(jacquard_common::error::DecodeError::UnknownEventType( - unknown.into(), - )), + unknown => { + Err( + jacquard_common::error::DecodeError::UnknownEventType(unknown.into()), + ) + } } } } @@ -1909,7 +1969,7 @@ impl<'a> SubscribeReposMessage<'a> { Eq, thiserror::Error, miette::Diagnostic, - jacquard_derive::IntoStatic, + jacquard_derive::IntoStatic )] #[serde(tag = "error", content = "message")] #[serde(bound(deserialize = "'de: 'a"))] @@ -1948,8 +2008,7 @@ impl std::fmt::Display for SubscribeReposError<'_> { pub struct SubscribeReposStream; impl jacquard_common::xrpc::SubscriptionResp for SubscribeReposStream { const NSID: &'static str = "com.atproto.sync.subscribeRepos"; - const ENCODING: jacquard_common::xrpc::MessageEncoding = - jacquard_common::xrpc::MessageEncoding::DagCbor; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::DagCbor; type Message<'de> = SubscribeReposMessage<'de>; type Error<'de> = SubscribeReposError<'de>; fn decode_message<'de>( @@ -1961,16 +2020,14 @@ impl jacquard_common::xrpc::SubscriptionResp for SubscribeReposStream { impl jacquard_common::xrpc::XrpcSubscription for SubscribeRepos { const NSID: &'static str = "com.atproto.sync.subscribeRepos"; - const ENCODING: jacquard_common::xrpc::MessageEncoding = - jacquard_common::xrpc::MessageEncoding::DagCbor; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::DagCbor; type Stream = SubscribeReposStream; } pub struct SubscribeReposEndpoint; impl jacquard_common::xrpc::SubscriptionEndpoint for SubscribeReposEndpoint { const PATH: &'static str = "/xrpc/com.atproto.sync.subscribeRepos"; - const ENCODING: jacquard_common::xrpc::MessageEncoding = - jacquard_common::xrpc::MessageEncoding::DagCbor; + const ENCODING: jacquard_common::xrpc::MessageEncoding = jacquard_common::xrpc::MessageEncoding::DagCbor; type Params<'de> = SubscribeRepos; type Stream = SubscribeReposStream; } @@ -1978,7 +2035,13 @@ impl jacquard_common::xrpc::SubscriptionEndpoint for SubscribeReposEndpoint { /// A repo operation, ie a mutation of a single record. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct RepoOp<'a> { @@ -1997,7 +2060,7 @@ pub struct RepoOp<'a> { pub mod repo_op_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -2098,7 +2161,10 @@ impl<'a, S: repo_op_state::State> RepoOpBuilder<'a, S> { self } /// Set the `cid` field to an Option value (optional) - pub fn maybe_cid(mut self, value: Option>) -> Self { + pub fn maybe_cid( + mut self, + value: Option>, + ) -> Self { self.__unsafe_private_named.1 = value; self } @@ -2133,7 +2199,10 @@ impl<'a, S: repo_op_state::State> RepoOpBuilder<'a, S> { self } /// Set the `prev` field to an Option value (optional) - pub fn maybe_prev(mut self, value: Option>) -> Self { + pub fn maybe_prev( + mut self, + value: Option>, + ) -> Self { self.__unsafe_private_named.3 = value; self } @@ -2193,7 +2262,13 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for RepoOp<'a> { /// Updates the repo to a new state, without necessarily including that state on the firehose. Used to recover from broken commit streams, data loss incidents, or in situations where upstream host does not know recent state of the repository. #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct Sync<'a> { @@ -2214,7 +2289,7 @@ pub struct Sync<'a> { pub mod sync_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -2222,85 +2297,85 @@ pub mod sync_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Seq; type Blocks; - type Time; + type Did; type Rev; + 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 Blocks = Unset; - type Time = Unset; + type Did = Unset; type Rev = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Seq = S::Seq; - type Blocks = S::Blocks; - type Time = S::Time; - type Rev = S::Rev; + type Time = Unset; } ///State transition - sets the `seq` field to Set pub struct SetSeq(PhantomData S>); impl sealed::Sealed for SetSeq {} impl State for SetSeq { - type Did = S::Did; type Seq = Set; type Blocks = S::Blocks; - type Time = S::Time; + type Did = S::Did; type Rev = S::Rev; + type Time = S::Time; } ///State transition - sets the `blocks` field to Set pub struct SetBlocks(PhantomData S>); impl sealed::Sealed for SetBlocks {} impl State for SetBlocks { - type Did = S::Did; type Seq = S::Seq; type Blocks = Set; - type Time = S::Time; + type Did = S::Did; type Rev = S::Rev; + type Time = S::Time; } - ///State transition - sets the `time` field to Set - pub struct SetTime(PhantomData S>); - impl sealed::Sealed for SetTime {} - impl State for SetTime { - type Did = S::Did; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { type Seq = S::Seq; type Blocks = S::Blocks; - type Time = Set; + type Did = Set; type Rev = S::Rev; + type Time = S::Time; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Did = S::Did; type Seq = S::Seq; type Blocks = S::Blocks; - type Time = S::Time; + type Did = S::Did; type Rev = Set; + type Time = S::Time; + } + ///State transition - sets the `time` field to Set + pub struct SetTime(PhantomData S>); + impl sealed::Sealed for SetTime {} + impl State for SetTime { + type Seq = S::Seq; + type Blocks = S::Blocks; + type Did = S::Did; + type Rev = S::Rev; + 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 `blocks` field pub struct blocks(()); - ///Marker type for the `time` field - pub struct time(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `time` field + pub struct time(()); } } @@ -2398,7 +2473,10 @@ where S::Seq: sync_state::IsUnset, { /// Set the `seq` field (required) - pub fn seq(mut self, value: impl Into) -> SyncBuilder<'a, sync_state::SetSeq> { + pub fn seq( + mut self, + value: impl Into, + ) -> SyncBuilder<'a, sync_state::SetSeq> { self.__unsafe_private_named.3 = ::core::option::Option::Some(value.into()); SyncBuilder { _phantom_state: ::core::marker::PhantomData, @@ -2430,11 +2508,11 @@ where impl<'a, S> SyncBuilder<'a, S> where S: sync_state::State, - S::Did: sync_state::IsSet, S::Seq: sync_state::IsSet, S::Blocks: sync_state::IsSet, - S::Time: sync_state::IsSet, + S::Did: sync_state::IsSet, S::Rev: sync_state::IsSet, + S::Time: sync_state::IsSet, { /// Build the final struct pub fn build(self) -> Sync<'a> { @@ -2481,4 +2559,4 @@ impl<'a> ::jacquard_lexicon::schema::LexiconSchema for Sync<'a> { ) -> ::std::result::Result<(), ::jacquard_lexicon::validation::ConstraintError> { Ok(()) } -} +} \ No newline at end of file diff --git a/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs b/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs index 3a09b2d..6590cd1 100644 --- a/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs +++ b/crates/weaver-api/src/com_atproto/temp/check_handle_availability.rs @@ -692,37 +692,37 @@ pub mod suggestion_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Method; type Handle; + type Method; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Method = Unset; type Handle = Unset; - } - ///State transition - sets the `method` field to Set - pub struct SetMethod(PhantomData S>); - impl sealed::Sealed for SetMethod {} - impl State for SetMethod { - type Method = Set; - type Handle = S::Handle; + type Method = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Method = S::Method; type Handle = Set; + type Method = S::Method; + } + ///State transition - sets the `method` field to Set + pub struct SetMethod(PhantomData S>); + impl sealed::Sealed for SetMethod {} + impl State for SetMethod { + type Handle = S::Handle; + type Method = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `method` field - pub struct method(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `method` field + pub struct method(()); } } @@ -795,8 +795,8 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, - S::Method: suggestion_state::IsSet, S::Handle: suggestion_state::IsSet, + S::Method: suggestion_state::IsSet, { /// Build the final struct pub fn build(self) -> Suggestion<'a> { diff --git a/crates/weaver-api/src/sh_weaver/actor.rs b/crates/weaver-api/src/sh_weaver/actor.rs index f655532..c46adc9 100644 --- a/crates/weaver-api/src/sh_weaver/actor.rs +++ b/crates/weaver-api/src/sh_weaver/actor.rs @@ -1979,37 +1979,37 @@ pub mod profile_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -2388,8 +2388,8 @@ impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, - S::Did: profile_view_state::IsSet, S::Handle: profile_view_state::IsSet, + S::Did: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { @@ -2623,37 +2623,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -2846,8 +2846,8 @@ impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, - S::Did: profile_view_basic_state::IsSet, S::Handle: profile_view_basic_state::IsSet, + S::Did: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { @@ -3166,51 +3166,51 @@ pub mod tangled_profile_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; - type Bluesky; type Did; + type Bluesky; + 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 Bluesky = Unset; type Did = Unset; + type Bluesky = Unset; + type Handle = Unset; } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Did = Set; type Bluesky = S::Bluesky; - type Did = S::Did; + type Handle = S::Handle; } ///State transition - sets the `bluesky` field to Set pub struct SetBluesky(PhantomData S>); impl sealed::Sealed for SetBluesky {} impl State for SetBluesky { - type Handle = S::Handle; - type Bluesky = Set; type Did = S::Did; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + type Bluesky = Set; type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; type Bluesky = S::Bluesky; - type Did = Set; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); - ///Marker type for the `bluesky` field - pub struct bluesky(()); ///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(()); } } @@ -3400,9 +3400,9 @@ impl<'a, S: tangled_profile_view_state::State> TangledProfileViewBuilder<'a, S> impl<'a, S> TangledProfileViewBuilder<'a, S> where S: tangled_profile_view_state::State, - S::Handle: tangled_profile_view_state::IsSet, - S::Bluesky: tangled_profile_view_state::IsSet, S::Did: tangled_profile_view_state::IsSet, + S::Bluesky: tangled_profile_view_state::IsSet, + S::Handle: tangled_profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TangledProfileView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab.rs b/crates/weaver-api/src/sh_weaver/collab.rs index c4de5cb..a2ba006 100644 --- a/crates/weaver-api/src/sh_weaver/collab.rs +++ b/crates/weaver-api/src/sh_weaver/collab.rs @@ -95,50 +95,50 @@ pub mod collaboration_state_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Participants; - type Status; type Resource; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Participants = Unset; - type Status = Unset; type Resource = Unset; + type Status = Unset; } ///State transition - sets the `participants` field to Set pub struct SetParticipants(PhantomData S>); impl sealed::Sealed for SetParticipants {} impl State for SetParticipants { type Participants = Set; - type Status = S::Status; - type Resource = S::Resource; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Participants = S::Participants; - type Status = Set; type Resource = S::Resource; + type Status = S::Status; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { type Participants = S::Participants; - type Status = S::Status; type Resource = Set; + type Status = S::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type Participants = S::Participants; + type Resource = S::Resource; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `participants` field pub struct participants(()); - ///Marker type for the `status` field - pub struct status(()); ///Marker type for the `resource` field pub struct resource(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -427,8 +427,8 @@ impl<'a, S> CollaborationStateViewBuilder<'a, S> where S: collaboration_state_view_state::State, S::Participants: collaboration_state_view_state::IsSet, - S::Status: collaboration_state_view_state::IsSet, S::Resource: collaboration_state_view_state::IsSet, + S::Status: collaboration_state_view_state::IsSet, { /// Build the final struct pub fn build(self) -> CollaborationStateView<'a> { @@ -1505,67 +1505,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 WasActiveFrom; type EndReason; + type WasActiveFrom; + type User; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type User = Unset; type WasActiveUntil = Unset; - type WasActiveFrom = Unset; type EndReason = Unset; - } - ///State transition - sets the `user` field to Set - pub struct SetUser(PhantomData S>); - impl sealed::Sealed for SetUser {} - impl State for SetUser { - type User = Set; - type WasActiveUntil = S::WasActiveUntil; - type WasActiveFrom = S::WasActiveFrom; - type EndReason = S::EndReason; + type WasActiveFrom = Unset; + type User = Unset; } ///State transition - sets the `was_active_until` field to Set pub struct SetWasActiveUntil(PhantomData S>); impl sealed::Sealed for SetWasActiveUntil {} impl State for SetWasActiveUntil { - type User = S::User; type WasActiveUntil = Set; - type WasActiveFrom = S::WasActiveFrom; type EndReason = S::EndReason; + type WasActiveFrom = S::WasActiveFrom; + type User = S::User; + } + ///State transition - sets the `end_reason` field to Set + pub struct SetEndReason(PhantomData S>); + impl sealed::Sealed for SetEndReason {} + impl State for SetEndReason { + type WasActiveUntil = S::WasActiveUntil; + type EndReason = Set; + type WasActiveFrom = S::WasActiveFrom; + type User = S::User; } ///State transition - sets the `was_active_from` field to Set pub struct SetWasActiveFrom(PhantomData S>); impl sealed::Sealed for SetWasActiveFrom {} impl State for SetWasActiveFrom { - type User = S::User; type WasActiveUntil = S::WasActiveUntil; - type WasActiveFrom = Set; type EndReason = S::EndReason; - } - ///State transition - sets the `end_reason` field to Set - pub struct SetEndReason(PhantomData S>); - impl sealed::Sealed for SetEndReason {} - impl State for SetEndReason { + type WasActiveFrom = Set; type User = S::User; + } + ///State transition - sets the `user` field to Set + pub struct SetUser(PhantomData S>); + impl sealed::Sealed for SetUser {} + impl State for SetUser { type WasActiveUntil = S::WasActiveUntil; + type EndReason = S::EndReason; type WasActiveFrom = S::WasActiveFrom; - type EndReason = Set; + type User = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user` field - pub struct user(()); ///Marker type for the `was_active_until` field pub struct was_active_until(()); - ///Marker type for the `was_active_from` field - pub struct was_active_from(()); ///Marker type for the `end_reason` field pub struct end_reason(()); + ///Marker type for the `was_active_from` field + pub struct was_active_from(()); + ///Marker type for the `user` field + pub struct user(()); } } @@ -1738,10 +1738,10 @@ where impl<'a, S> FormerCollaboratorViewBuilder<'a, S> where S: former_collaborator_view_state::State, - S::User: former_collaborator_view_state::IsSet, S::WasActiveUntil: former_collaborator_view_state::IsSet, - S::WasActiveFrom: former_collaborator_view_state::IsSet, S::EndReason: former_collaborator_view_state::IsSet, + S::WasActiveFrom: former_collaborator_view_state::IsSet, + S::User: former_collaborator_view_state::IsSet, { /// Build the final struct pub fn build(self) -> FormerCollaboratorView<'a> { @@ -1848,127 +1848,127 @@ pub mod invite_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; - type Uri; type Cid; - type Resource; + type Uri; type Invitee; - type CreatedAt; type Inviter; + type Resource; + 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 Uri = Unset; type Cid = Unset; - type Resource = Unset; + type Uri = Unset; type Invitee = Unset; - type CreatedAt = Unset; type Inviter = Unset; + type Resource = Unset; + type CreatedAt = Unset; + type Status = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; type Uri = S::Uri; - type Cid = S::Cid; - type Resource = S::Resource; type Invitee = S::Invitee; - type CreatedAt = S::CreatedAt; type Inviter = S::Inviter; + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; + type Status = S::Status; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Status = S::Status; - type Uri = Set; type Cid = S::Cid; - type Resource = S::Resource; + type Uri = Set; type Invitee = S::Invitee; - type CreatedAt = S::CreatedAt; type Inviter = S::Inviter; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; type Status = S::Status; + } + ///State transition - sets the `invitee` field to Set + pub struct SetInvitee(PhantomData S>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Cid = S::Cid; type Uri = S::Uri; - type Cid = Set; + type Invitee = Set; + type Inviter = S::Inviter; type Resource = S::Resource; + type CreatedAt = S::CreatedAt; + type Status = S::Status; + } + ///State transition - sets the `inviter` field to Set + pub struct SetInviter(PhantomData S>); + impl sealed::Sealed for SetInviter {} + impl State for SetInviter { + type Cid = S::Cid; + type Uri = S::Uri; type Invitee = S::Invitee; + type Inviter = Set; + type Resource = S::Resource; type CreatedAt = S::CreatedAt; - type Inviter = S::Inviter; + type Status = S::Status; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type Status = S::Status; - type Uri = S::Uri; type Cid = S::Cid; - type Resource = Set; + type Uri = S::Uri; type Invitee = S::Invitee; - type CreatedAt = S::CreatedAt; type Inviter = S::Inviter; - } - ///State transition - sets the `invitee` field to Set - pub struct SetInvitee(PhantomData S>); - impl sealed::Sealed for SetInvitee {} - impl State for SetInvitee { - type Status = S::Status; - type Uri = S::Uri; - type Cid = S::Cid; - type Resource = S::Resource; - type Invitee = Set; + type Resource = Set; type CreatedAt = S::CreatedAt; - type Inviter = S::Inviter; + type Status = S::Status; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = S::Status; - type Uri = S::Uri; type Cid = S::Cid; - type Resource = S::Resource; + type Uri = S::Uri; type Invitee = S::Invitee; - type CreatedAt = Set; type Inviter = S::Inviter; - } - ///State transition - sets the `inviter` field to Set - pub struct SetInviter(PhantomData S>); - impl sealed::Sealed for SetInviter {} - impl State for SetInviter { + type Resource = S::Resource; + type CreatedAt = Set; type Status = S::Status; - type Uri = S::Uri; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { type Cid = S::Cid; - type Resource = S::Resource; + type Uri = S::Uri; type Invitee = S::Invitee; + type Inviter = S::Inviter; + type Resource = S::Resource; type CreatedAt = S::CreatedAt; - type Inviter = 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 `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `resource` field - pub struct resource(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `invitee` field pub struct invitee(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `inviter` field pub struct inviter(()); + ///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(()); } } @@ -2269,13 +2269,13 @@ where impl<'a, S> InviteViewBuilder<'a, S> where S: invite_view_state::State, - S::Status: invite_view_state::IsSet, - S::Uri: invite_view_state::IsSet, S::Cid: invite_view_state::IsSet, - S::Resource: invite_view_state::IsSet, + S::Uri: invite_view_state::IsSet, S::Invitee: invite_view_state::IsSet, - S::CreatedAt: invite_view_state::IsSet, S::Inviter: invite_view_state::IsSet, + S::Resource: invite_view_state::IsSet, + S::CreatedAt: invite_view_state::IsSet, + S::Status: invite_view_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteView<'a> { @@ -2421,50 +2421,50 @@ pub mod participant_state_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type User; - type Status; type Role; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type User = Unset; - type Status = Unset; type Role = Unset; + type Status = Unset; } ///State transition - sets the `user` field to Set pub struct SetUser(PhantomData S>); impl sealed::Sealed for SetUser {} impl State for SetUser { type User = Set; - type Status = S::Status; - type Role = S::Role; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type User = S::User; - type Status = Set; type Role = S::Role; + type Status = S::Status; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData S>); impl sealed::Sealed for SetRole {} impl State for SetRole { type User = S::User; - type Status = S::Status; type Role = Set; + type Status = S::Status; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type User = S::User; + type Role = S::Role; + type Status = 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 `status` field - pub struct status(()); ///Marker type for the `role` field pub struct role(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -2727,8 +2727,8 @@ impl<'a, S> ParticipantStateViewBuilder<'a, S> where S: participant_state_view_state::State, S::User: participant_state_view_state::IsSet, - S::Status: participant_state_view_state::IsSet, S::Role: participant_state_view_state::IsSet, + S::Status: participant_state_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ParticipantStateView<'a> { @@ -2829,84 +2829,84 @@ pub mod session_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Resource; + type NodeId; + type CreatedAt; type Uri; type User; - type CreatedAt; - type NodeId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Resource = Unset; + type NodeId = Unset; + type CreatedAt = Unset; type Uri = Unset; type User = Unset; - type CreatedAt = Unset; - type NodeId = Unset; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { type Resource = Set; + type NodeId = S::NodeId; + type CreatedAt = S::CreatedAt; type Uri = S::Uri; type User = S::User; + } + ///State transition - sets the `node_id` field to Set + pub struct SetNodeId(PhantomData S>); + impl sealed::Sealed for SetNodeId {} + impl State for SetNodeId { + type Resource = S::Resource; + type NodeId = Set; type CreatedAt = S::CreatedAt; + type Uri = S::Uri; + type User = S::User; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Resource = S::Resource; type NodeId = S::NodeId; + type CreatedAt = Set; + type Uri = S::Uri; + type User = S::User; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { type Resource = S::Resource; + type NodeId = S::NodeId; + type CreatedAt = S::CreatedAt; type Uri = Set; type User = S::User; - type CreatedAt = S::CreatedAt; - type NodeId = S::NodeId; } ///State transition - sets the `user` field to Set pub struct SetUser(PhantomData S>); impl sealed::Sealed for SetUser {} impl State for SetUser { type Resource = S::Resource; - type Uri = S::Uri; - type User = Set; - type CreatedAt = S::CreatedAt; - type NodeId = S::NodeId; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Resource = S::Resource; - type Uri = S::Uri; - type User = S::User; - type CreatedAt = Set; type NodeId = S::NodeId; - } - ///State transition - sets the `node_id` field to Set - pub struct SetNodeId(PhantomData S>); - impl sealed::Sealed for SetNodeId {} - impl State for SetNodeId { - type Resource = S::Resource; - type Uri = S::Uri; - type User = S::User; type CreatedAt = S::CreatedAt; - type NodeId = Set; + type Uri = S::Uri; + type User = 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 `node_id` field + pub struct node_id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `user` field pub struct user(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `node_id` field - pub struct node_id(()); } } @@ -3080,10 +3080,10 @@ impl<'a, S> SessionViewBuilder<'a, S> where S: session_view_state::State, S::Resource: session_view_state::IsSet, + S::NodeId: session_view_state::IsSet, + S::CreatedAt: session_view_state::IsSet, S::Uri: session_view_state::IsSet, S::User: session_view_state::IsSet, - S::CreatedAt: session_view_state::IsSet, - S::NodeId: session_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SessionView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab/accept.rs b/crates/weaver-api/src/sh_weaver/collab/accept.rs index e3b0e42..0684118 100644 --- a/crates/weaver-api/src/sh_weaver/collab/accept.rs +++ b/crates/weaver-api/src/sh_weaver/collab/accept.rs @@ -38,50 +38,50 @@ pub mod accept_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Resource; - type Invite; type CreatedAt; + type Invite; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Resource = Unset; - type Invite = Unset; type CreatedAt = Unset; + type Invite = Unset; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { type Resource = Set; - type Invite = S::Invite; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `invite` field to Set - pub struct SetInvite(PhantomData S>); - impl sealed::Sealed for SetInvite {} - impl State for SetInvite { - type Resource = S::Resource; - type Invite = Set; type CreatedAt = S::CreatedAt; + type Invite = S::Invite; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Resource = S::Resource; - type Invite = S::Invite; type CreatedAt = Set; + type Invite = S::Invite; + } + ///State transition - sets the `invite` field to Set + pub struct SetInvite(PhantomData S>); + impl sealed::Sealed for SetInvite {} + impl State for SetInvite { + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; + type Invite = Set; } /// 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 `invite` field - pub struct invite(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `invite` field + pub struct invite(()); } } @@ -175,8 +175,8 @@ impl<'a, S> AcceptBuilder<'a, S> where S: accept_state::State, S::Resource: accept_state::IsSet, - S::Invite: accept_state::IsSet, S::CreatedAt: accept_state::IsSet, + S::Invite: accept_state::IsSet, { /// Build the final struct pub fn build(self) -> Accept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab/invite.rs b/crates/weaver-api/src/sh_weaver/collab/invite.rs index ec74351..c1a5752 100644 --- a/crates/weaver-api/src/sh_weaver/collab/invite.rs +++ b/crates/weaver-api/src/sh_weaver/collab/invite.rs @@ -134,51 +134,51 @@ pub mod invite_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Resource; type Invitee; + type Resource; + 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 Resource = Unset; type Invitee = Unset; + type Resource = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `invitee` field to Set + pub struct SetInvitee(PhantomData S>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Invitee = Set; type Resource = S::Resource; - type Invitee = S::Invitee; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type CreatedAt = S::CreatedAt; - type Resource = Set; type Invitee = S::Invitee; - } - ///State transition - sets the `invitee` field to Set - pub struct SetInvitee(PhantomData S>); - impl sealed::Sealed for SetInvitee {} - impl State for SetInvitee { + type Resource = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Invitee = S::Invitee; type Resource = S::Resource; - type Invitee = 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 `resource` field - pub struct resource(()); ///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(()); } } @@ -328,9 +328,9 @@ impl<'a, S: invite_state::State> InviteBuilder<'a, S> { impl<'a, S> InviteBuilder<'a, S> where S: invite_state::State, - S::CreatedAt: invite_state::IsSet, - S::Resource: invite_state::IsSet, S::Invitee: invite_state::IsSet, + S::Resource: invite_state::IsSet, + S::CreatedAt: invite_state::IsSet, { /// Build the final struct pub fn build(self) -> Invite<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit.rs b/crates/weaver-api/src/sh_weaver/edit.rs index 04c8e2f..afa065c 100644 --- a/crates/weaver-api/src/sh_weaver/edit.rs +++ b/crates/weaver-api/src/sh_weaver/edit.rs @@ -720,8 +720,8 @@ pub mod edit_branch_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Head; - type Author; type Length; + type Author; type LastUpdated; } /// Empty state - all required fields are unset @@ -729,8 +729,8 @@ pub mod edit_branch_view_state { impl sealed::Sealed for Empty {} impl State for Empty { type Head = Unset; - type Author = Unset; type Length = Unset; + type Author = Unset; type LastUpdated = Unset; } ///State transition - sets the `head` field to Set @@ -738,17 +738,8 @@ pub mod edit_branch_view_state { impl sealed::Sealed for SetHead {} impl State for SetHead { type Head = Set; - type Author = S::Author; - type Length = S::Length; - type LastUpdated = S::LastUpdated; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Head = S::Head; - type Author = Set; type Length = S::Length; + type Author = S::Author; type LastUpdated = S::LastUpdated; } ///State transition - sets the `length` field to Set @@ -756,8 +747,17 @@ pub mod edit_branch_view_state { impl sealed::Sealed for SetLength {} impl State for SetLength { type Head = S::Head; - type Author = S::Author; type Length = Set; + type Author = S::Author; + type LastUpdated = S::LastUpdated; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Head = S::Head; + type Length = S::Length; + type Author = Set; type LastUpdated = S::LastUpdated; } ///State transition - sets the `last_updated` field to Set @@ -765,8 +765,8 @@ pub mod edit_branch_view_state { impl sealed::Sealed for SetLastUpdated {} impl State for SetLastUpdated { type Head = S::Head; - type Author = S::Author; type Length = S::Length; + type Author = S::Author; type LastUpdated = Set; } /// Marker types for field names @@ -774,10 +774,10 @@ pub mod edit_branch_view_state { pub mod members { ///Marker type for the `head` field pub struct head(()); - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `length` field pub struct length(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `last_updated` field pub struct last_updated(()); } @@ -947,8 +947,8 @@ impl<'a, S> EditBranchViewBuilder<'a, S> where S: edit_branch_view_state::State, S::Head: edit_branch_view_state::IsSet, - S::Author: edit_branch_view_state::IsSet, S::Length: edit_branch_view_state::IsSet, + S::Author: edit_branch_view_state::IsSet, S::LastUpdated: edit_branch_view_state::IsSet, { /// Build the final struct @@ -1051,85 +1051,85 @@ pub mod edit_history_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Author; type Cid; - type Type; + type Author; + type Uri; type CreatedAt; + type Type; } /// 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 Cid = Unset; - type Type = Unset; + type Author = Unset; + type Uri = Unset; type CreatedAt = Unset; + type Type = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; type Author = S::Author; - type Cid = S::Cid; - type Type = S::Type; + type Uri = S::Uri; type CreatedAt = S::CreatedAt; + type Type = S::Type; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = S::Uri; - type Author = Set; type Cid = S::Cid; - type Type = S::Type; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + type Author = Set; type Uri = S::Uri; - type Author = S::Author; - type Cid = Set; - type Type = S::Type; type CreatedAt = S::CreatedAt; + type Type = S::Type; } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData S>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type Uri = S::Uri; - type Author = S::Author; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Cid = S::Cid; - type Type = Set; + type Author = S::Author; + type Uri = Set; type CreatedAt = S::CreatedAt; + type Type = S::Type; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Uri = S::Uri; - type Author = S::Author; type Cid = S::Cid; - type Type = S::Type; + type Author = S::Author; + type Uri = S::Uri; type CreatedAt = Set; + type Type = S::Type; + } + ///State transition - sets the `type` field to Set + pub struct SetType(PhantomData S>); + impl sealed::Sealed for SetType {} + impl State for SetType { + type Cid = S::Cid; + type Author = S::Author; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; + type Type = 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 `cid` field pub struct cid(()); - ///Marker type for the `type` field - pub struct r#type(()); + ///Marker type for the `author` field + pub struct author(()); + ///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(()); } } @@ -1346,11 +1346,11 @@ where impl<'a, S> EditHistoryEntryBuilder<'a, S> where S: edit_history_entry_state::State, - S::Uri: edit_history_entry_state::IsSet, - S::Author: edit_history_entry_state::IsSet, S::Cid: edit_history_entry_state::IsSet, - S::Type: edit_history_entry_state::IsSet, + S::Author: edit_history_entry_state::IsSet, + S::Uri: edit_history_entry_state::IsSet, S::CreatedAt: edit_history_entry_state::IsSet, + S::Type: edit_history_entry_state::IsSet, { /// Build the final struct pub fn build(self) -> EditHistoryEntry<'a> { @@ -1447,37 +1447,37 @@ pub mod edit_tree_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Branches; type Resource; + type Branches; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Branches = Unset; type Resource = Unset; - } - ///State transition - sets the `branches` field to Set - pub struct SetBranches(PhantomData S>); - impl sealed::Sealed for SetBranches {} - impl State for SetBranches { - type Branches = Set; - type Resource = S::Resource; + type Branches = Unset; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type Branches = S::Branches; type Resource = Set; + type Branches = S::Branches; + } + ///State transition - sets the `branches` field to Set + pub struct SetBranches(PhantomData S>); + impl sealed::Sealed for SetBranches {} + impl State for SetBranches { + type Resource = S::Resource; + type Branches = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `branches` field - pub struct branches(()); ///Marker type for the `resource` field pub struct resource(()); + ///Marker type for the `branches` field + pub struct branches(()); } } @@ -1606,8 +1606,8 @@ where impl<'a, S> EditTreeViewBuilder<'a, S> where S: edit_tree_view_state::State, - S::Branches: edit_tree_view_state::IsSet, S::Resource: edit_tree_view_state::IsSet, + S::Branches: edit_tree_view_state::IsSet, { /// Build the final struct pub fn build(self) -> EditTreeView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/cursor.rs b/crates/weaver-api/src/sh_weaver/edit/cursor.rs index 00f070f..2861a92 100644 --- a/crates/weaver-api/src/sh_weaver/edit/cursor.rs +++ b/crates/weaver-api/src/sh_weaver/edit/cursor.rs @@ -759,37 +759,37 @@ pub mod cursor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; type Container; + 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 Container = Unset; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; - type Container = S::Container; + type Id = Unset; } ///State transition - sets the `container` field to Set pub struct SetContainer(PhantomData S>); impl sealed::Sealed for SetContainer {} impl State for SetContainer { - type Id = S::Id; type Container = Set; + type Id = S::Id; + } + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Container = S::Container; + 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 `container` field pub struct container(()); + ///Marker type for the `id` field + pub struct id(()); } } @@ -882,8 +882,8 @@ impl<'a, S: cursor_state::State> CursorBuilder<'a, S> { impl<'a, S> CursorBuilder<'a, S> where S: cursor_state::State, - S::Id: cursor_state::IsSet, S::Container: cursor_state::IsSet, + S::Id: cursor_state::IsSet, { /// Build the final struct pub fn build(self) -> Cursor<'a> { @@ -1018,50 +1018,50 @@ pub mod normal_container_id_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Counter; - type Peer; type ContainerType; + type Peer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Counter = Unset; - type Peer = Unset; type ContainerType = Unset; + type Peer = Unset; } ///State transition - sets the `counter` field to Set pub struct SetCounter(PhantomData S>); impl sealed::Sealed for SetCounter {} impl State for SetCounter { type Counter = Set; - type Peer = S::Peer; - type ContainerType = S::ContainerType; - } - ///State transition - sets the `peer` field to Set - pub struct SetPeer(PhantomData S>); - impl sealed::Sealed for SetPeer {} - impl State for SetPeer { - type Counter = S::Counter; - type Peer = Set; type ContainerType = S::ContainerType; + type Peer = S::Peer; } ///State transition - sets the `container_type` field to Set pub struct SetContainerType(PhantomData S>); impl sealed::Sealed for SetContainerType {} impl State for SetContainerType { type Counter = S::Counter; - type Peer = S::Peer; type ContainerType = Set; + type Peer = S::Peer; + } + ///State transition - sets the `peer` field to Set + pub struct SetPeer(PhantomData S>); + impl sealed::Sealed for SetPeer {} + impl State for SetPeer { + type Counter = S::Counter; + type ContainerType = S::ContainerType; + type Peer = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `counter` field pub struct counter(()); - ///Marker type for the `peer` field - pub struct peer(()); ///Marker type for the `container_type` field pub struct container_type(()); + ///Marker type for the `peer` field + pub struct peer(()); } } @@ -1155,8 +1155,8 @@ impl<'a, S> NormalContainerIdBuilder<'a, S> where S: normal_container_id_state::State, S::Counter: normal_container_id_state::IsSet, - S::Peer: normal_container_id_state::IsSet, S::ContainerType: normal_container_id_state::IsSet, + S::Peer: normal_container_id_state::IsSet, { /// Build the final struct pub fn build(self) -> NormalContainerId<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed.rs b/crates/weaver-api/src/sh_weaver/embed.rs index f1389d2..c63b4e7 100644 --- a/crates/weaver-api/src/sh_weaver/embed.rs +++ b/crates/weaver-api/src/sh_weaver/embed.rs @@ -38,37 +38,37 @@ pub mod percent_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Height; type Width; + type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Height = Unset; type Width = Unset; - } - ///State transition - sets the `height` field to Set - pub struct SetHeight(PhantomData S>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = S::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData S>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = S::Height; type Width = Set; + type Height = S::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData S>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = S::Width; + type Height = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `height` field - pub struct height(()); ///Marker type for the `width` field pub struct width(()); + ///Marker type for the `height` field + pub struct height(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> PercentSizeBuilder<'a, S> where S: percent_size_state::State, - S::Height: percent_size_state::IsSet, S::Width: percent_size_state::IsSet, + S::Height: percent_size_state::IsSet, { /// Build the final struct pub fn build(self) -> PercentSize<'a> { @@ -312,37 +312,37 @@ pub mod pixel_size_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Width; type Height; + type Width; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Width = Unset; type Height = Unset; - } - ///State transition - sets the `width` field to Set - pub struct SetWidth(PhantomData S>); - impl sealed::Sealed for SetWidth {} - impl State for SetWidth { - type Width = Set; - type Height = S::Height; + type Width = Unset; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Width = S::Width; type Height = Set; + type Width = S::Width; + } + ///State transition - sets the `width` field to Set + pub struct SetWidth(PhantomData S>); + impl sealed::Sealed for SetWidth {} + impl State for SetWidth { + type Height = S::Height; + type Width = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `width` field - pub struct width(()); ///Marker type for the `height` field pub struct height(()); + ///Marker type for the `width` field + pub struct width(()); } } @@ -412,8 +412,8 @@ where impl<'a, S> PixelSizeBuilder<'a, S> where S: pixel_size_state::State, - S::Width: pixel_size_state::IsSet, S::Height: pixel_size_state::IsSet, + S::Width: pixel_size_state::IsSet, { /// Build the final struct pub fn build(self) -> PixelSize<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/external.rs b/crates/weaver-api/src/sh_weaver/embed/external.rs index 5585778..a8621b7 100644 --- a/crates/weaver-api/src/sh_weaver/embed/external.rs +++ b/crates/weaver-api/src/sh_weaver/embed/external.rs @@ -38,51 +38,51 @@ pub mod external_embed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Description; - type Title; type Uri; + type Title; + type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; - type Title = Unset; type Uri = Unset; + type Title = Unset; + type Description = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; type Title = S::Title; - type Uri = S::Uri; + type Description = S::Description; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = S::Description; - type Title = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + type Title = Set; type Description = S::Description; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData S>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Uri = S::Uri; type Title = S::Title; - type Uri = Set; + type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, - S::Description: external_embed_state::IsSet, - S::Title: external_embed_state::IsSet, S::Uri: external_embed_state::IsSet, + S::Title: external_embed_state::IsSet, + S::Description: external_embed_state::IsSet, { /// Build the final struct pub fn build(self) -> ExternalEmbed<'a> { @@ -817,51 +817,51 @@ pub mod view_external_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Title; type Description; + 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 Title = Unset; type Description = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Title = S::Title; - type Description = S::Description; + type Uri = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Uri = S::Uri; type Title = Set; type Description = S::Description; + type Uri = S::Uri; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { - type Uri = S::Uri; type Title = S::Title; type Description = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Title = S::Title; + type Description = S::Description; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///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(()); } } @@ -974,9 +974,9 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Uri: view_external_state::IsSet, S::Title: view_external_state::IsSet, S::Description: view_external_state::IsSet, + S::Uri: view_external_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewExternal<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs b/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs index 2a25c43..a286344 100644 --- a/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs +++ b/crates/weaver-api/src/sh_weaver/embed/record_with_media.rs @@ -33,37 +33,37 @@ pub mod record_with_media_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Records; type Media; + type Records; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Records = Unset; type Media = Unset; - } - ///State transition - sets the `records` field to Set - pub struct SetRecords(PhantomData S>); - impl sealed::Sealed for SetRecords {} - impl State for SetRecords { - type Records = Set; - type Media = S::Media; + type Records = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData S>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Records = S::Records; type Media = Set; + type Records = S::Records; + } + ///State transition - sets the `records` field to Set + pub struct SetRecords(PhantomData S>); + impl sealed::Sealed for SetRecords {} + impl State for SetRecords { + type Media = S::Media; + type Records = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `records` field - pub struct records(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `records` field + pub struct records(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RecordWithMediaBuilder<'a, S> where S: record_with_media_state::State, - S::Records: record_with_media_state::IsSet, S::Media: record_with_media_state::IsSet, + S::Records: record_with_media_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordWithMedia<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/records.rs b/crates/weaver-api/src/sh_weaver/embed/records.rs index 46d5c23..baccf06 100644 --- a/crates/weaver-api/src/sh_weaver/embed/records.rs +++ b/crates/weaver-api/src/sh_weaver/embed/records.rs @@ -1187,49 +1187,49 @@ pub mod view_blocked_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; type Uri; + type Author; type Blocked; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; type Uri = Unset; + type Author = Unset; type Blocked = Unset; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type Uri = S::Uri; - type Blocked = S::Blocked; - } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Author = S::Author; type Uri = Set; + type Author = S::Author; + type Blocked = S::Blocked; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Uri = S::Uri; + type Author = Set; type Blocked = S::Blocked; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Author = S::Author; type Uri = S::Uri; + type Author = S::Author; type Blocked = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `author` field + pub struct author(()); ///Marker type for the `blocked` field pub struct blocked(()); } @@ -1324,8 +1324,8 @@ where impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, - S::Author: view_blocked_state::IsSet, S::Uri: view_blocked_state::IsSet, + S::Author: view_blocked_state::IsSet, S::Blocked: view_blocked_state::IsSet, { /// Build the final struct @@ -1398,37 +1398,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Detached; type Uri; + type Detached; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Detached = Unset; type Uri = Unset; - } - ///State transition - sets the `detached` field to Set - pub struct SetDetached(PhantomData S>); - impl sealed::Sealed for SetDetached {} - impl State for SetDetached { - type Detached = Set; - type Uri = S::Uri; + type Detached = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Detached = S::Detached; type Uri = Set; + type Detached = S::Detached; + } + ///State transition - sets the `detached` field to Set + pub struct SetDetached(PhantomData S>); + impl sealed::Sealed for SetDetached {} + impl State for SetDetached { + type Uri = S::Uri; + type Detached = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `detached` field - pub struct detached(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `detached` field + pub struct detached(()); } } @@ -1501,8 +1501,8 @@ where impl<'a, S> ViewDetachedBuilder<'a, S> where S: view_detached_state::State, - S::Detached: view_detached_state::IsSet, S::Uri: view_detached_state::IsSet, + S::Detached: view_detached_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewDetached<'a> { @@ -1769,83 +1769,83 @@ pub mod view_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Value; + type Author; type IndexedAt; type Uri; - type Author; - type Value; type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Value = Unset; + type Author = Unset; type IndexedAt = Unset; type Uri = Unset; - type Author = Unset; - type Value = Unset; type Cid = Unset; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type Uri = S::Uri; + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Value = Set; type Author = S::Author; - type Value = S::Value; - type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type IndexedAt = S::IndexedAt; - type Uri = Set; - type Author = S::Author; - type Value = S::Value; + type Uri = S::Uri; type Cid = S::Cid; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { + type Value = S::Value; + type Author = Set; type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Author = Set; - type Value = S::Value; type Cid = S::Cid; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type IndexedAt = S::IndexedAt; + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Value = S::Value; + type Author = S::Author; + type IndexedAt = Set; type Uri = S::Uri; + type Cid = S::Cid; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Value = S::Value; type Author = S::Author; - type Value = Set; + type IndexedAt = S::IndexedAt; + type Uri = Set; type Cid = S::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Value = S::Value; + type Author = S::Author; type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Author = S::Author; - type Value = S::Value; type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `author` field + pub struct author(()); ///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 `value` field - pub struct value(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -2092,10 +2092,10 @@ where impl<'a, S> ViewRecordBuilder<'a, S> where S: view_record_state::State, + S::Value: view_record_state::IsSet, + S::Author: view_record_state::IsSet, S::IndexedAt: view_record_state::IsSet, S::Uri: view_record_state::IsSet, - S::Author: view_record_state::IsSet, - S::Value: view_record_state::IsSet, S::Cid: view_record_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs index 3021db2..efc3d29 100644 --- a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs +++ b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs @@ -38,37 +38,37 @@ pub mod bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -158,8 +158,8 @@ where impl<'a, S> BookmarkBuilder<'a, S> where S: bookmark_state::State, - S::Subject: bookmark_state::IsSet, S::CreatedAt: bookmark_state::IsSet, + S::Subject: bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> Bookmark<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/follow.rs b/crates/weaver-api/src/sh_weaver/graph/follow.rs index c20dc16..f618fef 100644 --- a/crates/weaver-api/src/sh_weaver/graph/follow.rs +++ b/crates/weaver-api/src/sh_weaver/graph/follow.rs @@ -34,37 +34,37 @@ pub mod follow_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> FollowBuilder<'a, S> where S: follow_state::State, - S::Subject: follow_state::IsSet, S::CreatedAt: follow_state::IsSet, + S::Subject: follow_state::IsSet, { /// Build the final struct pub fn build(self) -> Follow<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs b/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs index f92a05f..19d3517 100644 --- a/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs +++ b/crates/weaver-api/src/sh_weaver/graph/follow_accept.rs @@ -34,37 +34,37 @@ pub mod follow_accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Follow; type CreatedAt; + type Follow; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Follow = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData S>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { - type Follow = Set; - type CreatedAt = S::CreatedAt; + type Follow = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Follow = S::Follow; type CreatedAt = Set; + type Follow = S::Follow; + } + ///State transition - sets the `follow` field to Set + pub struct SetFollow(PhantomData S>); + impl sealed::Sealed for SetFollow {} + impl State for SetFollow { + type CreatedAt = S::CreatedAt; + type Follow = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `follow` field - pub struct follow(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `follow` field + pub struct follow(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> FollowAcceptBuilder<'a, S> where S: follow_accept_state::State, - S::Follow: follow_accept_state::IsSet, S::CreatedAt: follow_accept_state::IsSet, + S::Follow: follow_accept_state::IsSet, { /// Build the final struct pub fn build(self) -> FollowAccept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/list.rs b/crates/weaver-api/src/sh_weaver/graph/list.rs index 9381f54..61cb1d8 100644 --- a/crates/weaver-api/src/sh_weaver/graph/list.rs +++ b/crates/weaver-api/src/sh_weaver/graph/list.rs @@ -123,51 +123,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Purpose; - type CreatedAt; type Name; + type CreatedAt; + type Purpose; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Purpose = Unset; - type CreatedAt = Unset; type Name = Unset; + type CreatedAt = Unset; + type Purpose = Unset; } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData S>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { - type Purpose = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type CreatedAt = S::CreatedAt; - type Name = S::Name; + type Purpose = S::Purpose; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Purpose = S::Purpose; - type CreatedAt = Set; type Name = S::Name; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { + type CreatedAt = Set; type Purpose = S::Purpose; + } + ///State transition - sets the `purpose` field to Set + pub struct SetPurpose(PhantomData S>); + impl sealed::Sealed for SetPurpose {} + impl State for SetPurpose { + type Name = S::Name; type CreatedAt = S::CreatedAt; - type Name = Set; + type Purpose = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `purpose` field - pub struct purpose(()); - ///Marker type for the `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 `purpose` field + pub struct purpose(()); } } @@ -300,9 +300,9 @@ where impl<'a, S> ListBuilder<'a, S> where S: list_state::State, - S::Purpose: list_state::IsSet, - S::CreatedAt: list_state::IsSet, S::Name: list_state::IsSet, + S::CreatedAt: list_state::IsSet, + S::Purpose: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/listitem.rs b/crates/weaver-api/src/sh_weaver/graph/listitem.rs index 05c4248..07064c0 100644 --- a/crates/weaver-api/src/sh_weaver/graph/listitem.rs +++ b/crates/weaver-api/src/sh_weaver/graph/listitem.rs @@ -38,50 +38,50 @@ 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 CreatedAt; } /// 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 CreatedAt = Unset; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData S>); impl sealed::Sealed for SetList {} impl State for SetList { type List = Set; - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type List = S::List; - type CreatedAt = Set; type Subject = S::Subject; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { type List = S::List; - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type List = S::List; + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `list` field pub struct list(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -175,8 +175,8 @@ impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, S::List: listitem_state::IsSet, - S::CreatedAt: listitem_state::IsSet, S::Subject: listitem_state::IsSet, + S::CreatedAt: listitem_state::IsSet, { /// Build the final struct pub fn build(self) -> Listitem<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/subscribe.rs b/crates/weaver-api/src/sh_weaver/graph/subscribe.rs index eae9514..88e2b72 100644 --- a/crates/weaver-api/src/sh_weaver/graph/subscribe.rs +++ b/crates/weaver-api/src/sh_weaver/graph/subscribe.rs @@ -34,37 +34,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 S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Notebook = S::Notebook; + type CreatedAt = Unset; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type CreatedAt = S::CreatedAt; type Notebook = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Notebook = S::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(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> SubscribeBuilder<'a, S> where S: subscribe_state::State, - S::CreatedAt: subscribe_state::IsSet, S::Notebook: subscribe_state::IsSet, + S::CreatedAt: subscribe_state::IsSet, { /// Build the final struct pub fn build(self) -> Subscribe<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook.rs b/crates/weaver-api/src/sh_weaver/notebook.rs index d80ac56..d7086dd 100644 --- a/crates/weaver-api/src/sh_weaver/notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook.rs @@ -10,6 +10,7 @@ pub mod book; pub mod chapter; pub mod colour_scheme; pub mod entry; +pub mod get_book_entry; pub mod get_chapter; pub mod get_continue_reading; pub mod get_entry; @@ -2244,37 +2245,37 @@ pub mod book_entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Entry; + 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 Entry = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Entry = S::Entry; + type Index = Unset; } ///State transition - sets the `entry` field to Set pub struct SetEntry(PhantomData S>); impl sealed::Sealed for SetEntry {} impl State for SetEntry { - type Index = S::Index; type Entry = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Entry = S::Entry; + 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 `entry` field pub struct entry(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -2387,8 +2388,8 @@ impl<'a, S: book_entry_view_state::State> BookEntryViewBuilder<'a, S> { impl<'a, S> BookEntryViewBuilder<'a, S> where S: book_entry_view_state::State, - S::Index: book_entry_view_state::IsSet, S::Entry: book_entry_view_state::IsSet, + S::Index: book_entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> BookEntryView<'a> { @@ -2463,37 +2464,37 @@ pub mod chapter_entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Entry; type Index; + type Entry; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Entry = Unset; type Index = Unset; - } - ///State transition - sets the `entry` field to Set - pub struct SetEntry(PhantomData S>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Entry = Set; - type Index = S::Index; + type Entry = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Entry = S::Entry; type Index = Set; + type Entry = S::Entry; + } + ///State transition - sets the `entry` field to Set + pub struct SetEntry(PhantomData S>); + impl sealed::Sealed for SetEntry {} + impl State for SetEntry { + type Index = S::Index; + type Entry = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `entry` field - pub struct entry(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `entry` field + pub struct entry(()); } } @@ -2606,8 +2607,8 @@ impl<'a, S: chapter_entry_view_state::State> ChapterEntryViewBuilder<'a, S> { impl<'a, S> ChapterEntryViewBuilder<'a, S> where S: chapter_entry_view_state::State, - S::Entry: chapter_entry_view_state::IsSet, S::Index: chapter_entry_view_state::IsSet, + S::Entry: chapter_entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterEntryView<'a> { @@ -2692,105 +2693,105 @@ pub mod chapter_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; - type Cid; type Record; - type IndexedAt; - type Notebook; type Uri; + type Notebook; + type Cid; + type Authors; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; - type Cid = Unset; type Record = Unset; - type IndexedAt = Unset; - type Notebook = Unset; type Uri = Unset; + type Notebook = Unset; + type Cid = Unset; + type Authors = Unset; + type IndexedAt = Unset; } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Record = Set; + type Uri = S::Uri; + type Notebook = S::Notebook; type Cid = S::Cid; - type Record = S::Record; + type Authors = S::Authors; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Record = S::Record; + type Uri = Set; type Notebook = S::Notebook; + type Cid = S::Cid; + type Authors = S::Authors; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Record = S::Record; type Uri = S::Uri; + type Notebook = Set; + type Cid = S::Cid; + type Authors = S::Authors; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Authors = S::Authors; - type Cid = Set; type Record = S::Record; - type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; type Uri = S::Uri; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + type Notebook = S::Notebook; + type Cid = Set; type Authors = S::Authors; - type Cid = S::Cid; - type Record = Set; type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Record = S::Record; type Uri = S::Uri; + type Notebook = S::Notebook; + type Cid = S::Cid; + type Authors = Set; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Authors = S::Authors; - type Cid = S::Cid; type Record = S::Record; - type IndexedAt = Set; - type Notebook = S::Notebook; type Uri = S::Uri; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Authors = S::Authors; + type Notebook = S::Notebook; type Cid = S::Cid; - type Record = S::Record; - type IndexedAt = S::IndexedAt; - type Notebook = Set; - type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Authors = S::Authors; - type Cid = S::Cid; - type Record = S::Record; - type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; - type Uri = Set; + type IndexedAt = 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 `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 `notebook` field - pub struct notebook(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `notebook` field + pub struct notebook(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `authors` field + pub struct authors(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -2988,12 +2989,12 @@ where impl<'a, S> ChapterViewBuilder<'a, S> where S: chapter_view_state::State, - S::Authors: chapter_view_state::IsSet, - S::Cid: chapter_view_state::IsSet, S::Record: chapter_view_state::IsSet, - S::IndexedAt: chapter_view_state::IsSet, - S::Notebook: chapter_view_state::IsSet, S::Uri: chapter_view_state::IsSet, + S::Notebook: chapter_view_state::IsSet, + S::Cid: chapter_view_state::IsSet, + S::Authors: chapter_view_state::IsSet, + S::IndexedAt: chapter_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterView<'a> { @@ -3354,85 +3355,85 @@ pub mod entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; - type IndexedAt; - type Record; type Uri; type Cid; + type Authors; + type Record; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; - type IndexedAt = Unset; - type Record = Unset; type Uri = Unset; type Cid = Unset; + type Authors = Unset; + type Record = Unset; + type IndexedAt = Unset; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = Set; + type Cid = S::Cid; + type Authors = S::Authors; + type Record = S::Record; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; + type Cid = Set; + type Authors = S::Authors; + type Record = S::Record; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `authors` field to Set pub struct SetAuthors(PhantomData S>); impl sealed::Sealed for SetAuthors {} impl State for SetAuthors { - type Authors = Set; - type IndexedAt = S::IndexedAt; - type Record = S::Record; type Uri = S::Uri; type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Authors = S::Authors; - type IndexedAt = Set; + type Authors = Set; type Record = S::Record; - type Uri = S::Uri; - type Cid = S::Cid; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { - type Authors = S::Authors; - type IndexedAt = S::IndexedAt; - type Record = Set; type Uri = S::Uri; type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Authors = S::Authors; + type Record = Set; type IndexedAt = S::IndexedAt; - type Record = S::Record; - type Uri = Set; - type Cid = S::Cid; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Uri = S::Uri; + type Cid = S::Cid; type Authors = S::Authors; - type IndexedAt = S::IndexedAt; type Record = S::Record; - type Uri = S::Uri; - type Cid = Set; + type IndexedAt = 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 `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(()); ///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 `indexed_at` field + pub struct indexed_at(()); } } @@ -3741,11 +3742,11 @@ impl<'a, S: entry_view_state::State> EntryViewBuilder<'a, S> { impl<'a, S> EntryViewBuilder<'a, S> where S: entry_view_state::State, - S::Authors: entry_view_state::IsSet, - S::IndexedAt: entry_view_state::IsSet, - S::Record: entry_view_state::IsSet, S::Uri: entry_view_state::IsSet, S::Cid: entry_view_state::IsSet, + S::Authors: entry_view_state::IsSet, + S::Record: entry_view_state::IsSet, + S::IndexedAt: entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> EntryView<'a> { @@ -4262,85 +4263,85 @@ pub mod notebook_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; type Uri; + type Record; + type Authors; type IndexedAt; type Cid; - type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; type Uri = Unset; + type Record = Unset; + type Authors = Unset; type IndexedAt = Unset; type Cid = Unset; - type Record = Unset; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Record = S::Record; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Authors = S::Authors; type Uri = Set; + type Record = S::Record; + type Authors = S::Authors; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Uri = S::Uri; + type Record = Set; + type Authors = S::Authors; type IndexedAt = S::IndexedAt; type Cid = S::Cid; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Uri = S::Uri; type Record = S::Record; + type Authors = Set; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Uri = S::Uri; + type Record = S::Record; type Authors = S::Authors; - type Uri = S::Uri; type IndexedAt = Set; type Cid = S::Cid; - type Record = S::Record; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Authors = S::Authors; type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Cid = Set; type Record = S::Record; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { type Authors = S::Authors; - type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Record = Set; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `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 `authors` field + pub struct authors(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `record` field - pub struct record(()); } } @@ -4677,11 +4678,11 @@ impl<'a, S: notebook_view_state::State> NotebookViewBuilder<'a, S> { impl<'a, S> NotebookViewBuilder<'a, S> where S: notebook_view_state::State, - S::Authors: notebook_view_state::IsSet, S::Uri: notebook_view_state::IsSet, + S::Record: notebook_view_state::IsSet, + S::Authors: notebook_view_state::IsSet, S::IndexedAt: notebook_view_state::IsSet, S::Cid: notebook_view_state::IsSet, - S::Record: notebook_view_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookView<'a> { @@ -4791,84 +4792,84 @@ pub mod page_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Record; - type Cid; + type Uri; type IndexedAt; + type Cid; type Notebook; - 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 Cid = Unset; + type Uri = Unset; type IndexedAt = Unset; + type Cid = Unset; type Notebook = Unset; - type Uri = Unset; } ///State transition - sets the `record` field to Set pub struct SetRecord(PhantomData S>); impl sealed::Sealed for SetRecord {} impl State for SetRecord { type Record = Set; - type Cid = S::Cid; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; type Notebook = S::Notebook; - type Uri = S::Uri; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Record = S::Record; - type Cid = Set; + type Uri = Set; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; type Notebook = S::Notebook; - type Uri = S::Uri; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Record = S::Record; - type Cid = S::Cid; + type Uri = S::Uri; type IndexedAt = Set; + type Cid = S::Cid; type Notebook = S::Notebook; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Record = S::Record; type Uri = S::Uri; + type IndexedAt = S::IndexedAt; + type Cid = Set; + type Notebook = S::Notebook; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { type Record = S::Record; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Notebook = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Record = S::Record; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; - type Uri = Set; + type Cid = S::Cid; + type Notebook = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `record` field pub struct record(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `uri` field + 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 `notebook` field pub struct notebook(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -5047,10 +5048,10 @@ impl<'a, S> PageViewBuilder<'a, S> where S: page_view_state::State, S::Record: page_view_state::IsSet, - S::Cid: page_view_state::IsSet, + S::Uri: page_view_state::IsSet, S::IndexedAt: page_view_state::IsSet, + S::Cid: page_view_state::IsSet, S::Notebook: page_view_state::IsSet, - S::Uri: page_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PageView<'a> { @@ -5136,67 +5137,67 @@ pub mod permission_grant_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Source; + type GrantedAt; type Did; type Scope; - type GrantedAt; + 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 GrantedAt = Unset; type Did = Unset; type Scope = Unset; - type GrantedAt = Unset; + type Source = Unset; } - ///State transition - sets the `source` field to Set - pub struct SetSource(PhantomData S>); - impl sealed::Sealed for SetSource {} - impl State for SetSource { - type Source = Set; + ///State transition - sets the `granted_at` field to Set + pub struct SetGrantedAt(PhantomData S>); + impl sealed::Sealed for SetGrantedAt {} + impl State for SetGrantedAt { + type GrantedAt = Set; type Did = S::Did; type Scope = S::Scope; - type GrantedAt = S::GrantedAt; + type Source = S::Source; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Source = S::Source; + type GrantedAt = S::GrantedAt; type Did = Set; type Scope = S::Scope; - type GrantedAt = S::GrantedAt; + type Source = S::Source; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type Source = S::Source; + type GrantedAt = S::GrantedAt; type Did = S::Did; type Scope = Set; - type GrantedAt = S::GrantedAt; - } - ///State transition - sets the `granted_at` field to Set - pub struct SetGrantedAt(PhantomData S>); - impl sealed::Sealed for SetGrantedAt {} - impl State for SetGrantedAt { type Source = S::Source; + } + ///State transition - sets the `source` field to Set + pub struct SetSource(PhantomData S>); + impl sealed::Sealed for SetSource {} + impl State for SetSource { + type GrantedAt = S::GrantedAt; type Did = S::Did; type Scope = S::Scope; - type GrantedAt = Set; + 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 `granted_at` field + pub struct granted_at(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `scope` field pub struct scope(()); - ///Marker type for the `granted_at` field - pub struct granted_at(()); + ///Marker type for the `source` field + pub struct source(()); } } @@ -5309,10 +5310,10 @@ where impl<'a, S> PermissionGrantBuilder<'a, S> where S: permission_grant_state::State, - S::Source: permission_grant_state::IsSet, + S::GrantedAt: permission_grant_state::IsSet, S::Did: permission_grant_state::IsSet, S::Scope: permission_grant_state::IsSet, - S::GrantedAt: permission_grant_state::IsSet, + S::Source: permission_grant_state::IsSet, { /// Build the final struct pub fn build(self) -> PermissionGrant<'a> { @@ -5554,67 +5555,67 @@ pub mod published_version_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; + type Uri; type Publisher; type PublishedAt; - type Uri; - type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Cid = Unset; + type Uri = Unset; type Publisher = Unset; type PublishedAt = Unset; - type Uri = Unset; - type Cid = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Uri = S::Uri; + type Publisher = S::Publisher; + type PublishedAt = S::PublishedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type Uri = Set; + type Publisher = S::Publisher; + type PublishedAt = S::PublishedAt; } ///State transition - sets the `publisher` field to Set pub struct SetPublisher(PhantomData S>); impl sealed::Sealed for SetPublisher {} impl State for SetPublisher { + type Cid = S::Cid; + type Uri = S::Uri; type Publisher = Set; type PublishedAt = S::PublishedAt; - type Uri = S::Uri; - type Cid = S::Cid; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData S>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Publisher = S::Publisher; - type PublishedAt = Set; - type Uri = S::Uri; - type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Publisher = S::Publisher; - type PublishedAt = S::PublishedAt; - type Uri = Set; type Cid = S::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Publisher = S::Publisher; - type PublishedAt = S::PublishedAt; type Uri = S::Uri; - type Cid = Set; + type Publisher = S::Publisher; + type PublishedAt = 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 `publisher` field pub struct publisher(()); ///Marker type for the `published_at` field pub struct published_at(()); - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); } } @@ -5781,10 +5782,10 @@ where impl<'a, S> PublishedVersionViewBuilder<'a, S> where S: published_version_view_state::State, + S::Cid: published_version_view_state::IsSet, + S::Uri: published_version_view_state::IsSet, S::Publisher: published_version_view_state::IsSet, S::PublishedAt: published_version_view_state::IsSet, - S::Uri: published_version_view_state::IsSet, - S::Cid: published_version_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PublishedVersionView<'a> { @@ -5928,37 +5929,37 @@ pub mod reason_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; type By = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type By = S::By; + type IndexedAt = Unset; } ///State transition - sets the `by` field to Set pub struct SetBy(PhantomData S>); impl sealed::Sealed for SetBy {} impl State for SetBy { - type IndexedAt = S::IndexedAt; type By = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type By = S::By; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6031,8 +6032,8 @@ where impl<'a, S> ReasonBookmarkBuilder<'a, S> where S: reason_bookmark_state::State, - S::IndexedAt: reason_bookmark_state::IsSet, S::By: reason_bookmark_state::IsSet, + S::IndexedAt: reason_bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonBookmark<'a> { @@ -6096,37 +6097,37 @@ pub mod reason_like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; type By = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type By = S::By; + type IndexedAt = Unset; } ///State transition - sets the `by` field to Set pub struct SetBy(PhantomData S>); impl sealed::Sealed for SetBy {} impl State for SetBy { - type IndexedAt = S::IndexedAt; type By = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type By = S::By; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6199,8 +6200,8 @@ where impl<'a, S> ReasonLikeBuilder<'a, S> where S: reason_like_state::State, - S::IndexedAt: reason_like_state::IsSet, S::By: reason_like_state::IsSet, + S::IndexedAt: reason_like_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonLike<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs index 8583f0f..dd59e10 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs @@ -54,49 +54,49 @@ pub mod chapter_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; type Notebook; + type Authors; 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 Notebook = Unset; + type Authors = Unset; type EntryList = Unset; } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; - type Notebook = S::Notebook; - type EntryList = S::EntryList; - } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type Authors = S::Authors; type Notebook = Set; + type Authors = S::Authors; + type EntryList = S::EntryList; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type Notebook = S::Notebook; + type Authors = Set; type EntryList = S::EntryList; } ///State transition - sets the `entry_list` field to Set pub struct SetEntryList(PhantomData S>); impl sealed::Sealed for SetEntryList {} impl State for SetEntryList { - type Authors = S::Authors; type Notebook = S::Notebook; + type Authors = S::Authors; 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 `notebook` field pub struct notebook(()); + ///Marker type for the `authors` field + pub struct authors(()); ///Marker type for the `entry_list` field pub struct entry_list(()); } @@ -291,8 +291,8 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { impl<'a, S> ChapterBuilder<'a, S> where S: chapter_state::State, - S::Authors: chapter_state::IsSet, S::Notebook: chapter_state::IsSet, + S::Authors: chapter_state::IsSet, S::EntryList: chapter_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs b/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs index bdd7df2..1f3bee8 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/colour_scheme.rs @@ -38,51 +38,51 @@ pub mod colour_scheme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Variant; type Colours; + 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 Variant = Unset; type Colours = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Variant = S::Variant; - type Colours = S::Colours; + type Name = Unset; } ///State transition - sets the `variant` field to Set pub struct SetVariant(PhantomData S>); impl sealed::Sealed for SetVariant {} impl State for SetVariant { - type Name = S::Name; type Variant = Set; type Colours = S::Colours; + type Name = S::Name; } ///State transition - sets the `colours` field to Set pub struct SetColours(PhantomData S>); impl sealed::Sealed for SetColours {} impl State for SetColours { - type Name = S::Name; type Variant = S::Variant; type Colours = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Variant = S::Variant; + type Colours = S::Colours; + 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 `variant` field pub struct variant(()); ///Marker type for the `colours` field pub struct colours(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -175,9 +175,9 @@ where impl<'a, S> ColourSchemeBuilder<'a, S> where S: colour_scheme_state::State, - S::Name: colour_scheme_state::IsSet, S::Variant: colour_scheme_state::IsSet, S::Colours: colour_scheme_state::IsSet, + S::Name: colour_scheme_state::IsSet, { /// Build the final struct pub fn build(self) -> ColourScheme<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/entry.rs b/crates/weaver-api/src/sh_weaver/notebook/entry.rs index 051727c..c003c85 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/entry.rs @@ -60,67 +60,67 @@ pub mod entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Content; - type Title; type Path; type CreatedAt; + type Title; + 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 Title = Unset; type Path = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { - type Content = Set; - type Title = S::Title; - type Path = S::Path; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Content = S::Content; - type Title = Set; - type Path = S::Path; - type CreatedAt = S::CreatedAt; + type Title = Unset; + type Content = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Content = S::Content; - type Title = S::Title; type Path = Set; type CreatedAt = S::CreatedAt; + type Title = S::Title; + type Content = S::Content; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Content = S::Content; - type Title = S::Title; type Path = S::Path; type CreatedAt = Set; + type Title = S::Title; + type Content = S::Content; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Path = S::Path; + type CreatedAt = S::CreatedAt; + type Title = Set; + type Content = S::Content; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData S>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Path = S::Path; + type CreatedAt = S::CreatedAt; + type Title = S::Title; + 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 `title` field - pub struct title(()); ///Marker type for the `path` field pub struct path(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `content` field + pub struct content(()); } } @@ -358,10 +358,10 @@ impl<'a, S: entry_state::State> EntryBuilder<'a, S> { impl<'a, S> EntryBuilder<'a, S> where S: entry_state::State, - S::Content: entry_state::IsSet, - S::Title: entry_state::IsSet, S::Path: entry_state::IsSet, S::CreatedAt: entry_state::IsSet, + S::Title: entry_state::IsSet, + S::Content: entry_state::IsSet, { /// Build the final struct pub fn build(self) -> Entry<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_book_entry.rs b/crates/weaver-api/src/sh_weaver/notebook/get_book_entry.rs new file mode 100644 index 0000000..71ee049 --- /dev/null +++ b/crates/weaver-api/src/sh_weaver/notebook/get_book_entry.rs @@ -0,0 +1,216 @@ +// @generated by jacquard-lexicon. DO NOT EDIT. +// +// Lexicon: sh.weaver.notebook.getBookEntry +// +// This file was automatically generated from Lexicon schemas. +// Any manual changes will be overwritten on the next regeneration. + +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetBookEntry<'a> { + ///(default: 0, min: 0) + #[serde(skip_serializing_if = "std::option::Option::is_none")] + pub index: std::option::Option, + #[serde(borrow)] + pub notebook: jacquard_common::types::string::AtUri<'a>, +} + +pub mod get_book_entry_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 Notebook; + } + /// Empty state - all required fields are unset + pub struct Empty(()); + impl sealed::Sealed for Empty {} + impl State for Empty { + type Notebook = Unset; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Notebook = Set; + } + /// Marker types for field names + #[allow(non_camel_case_types)] + pub mod members { + ///Marker type for the `notebook` field + pub struct notebook(()); + } +} + +/// Builder for constructing an instance of this type +pub struct GetBookEntryBuilder<'a, S: get_book_entry_state::State> { + _phantom_state: ::core::marker::PhantomData S>, + __unsafe_private_named: ( + ::core::option::Option, + ::core::option::Option>, + ), + _phantom: ::core::marker::PhantomData<&'a ()>, +} + +impl<'a> GetBookEntry<'a> { + /// Create a new builder for this type + pub fn new() -> GetBookEntryBuilder<'a, get_book_entry_state::Empty> { + GetBookEntryBuilder::new() + } +} + +impl<'a> GetBookEntryBuilder<'a, get_book_entry_state::Empty> { + /// Create a new builder with all fields unset + pub fn new() -> Self { + GetBookEntryBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: (None, None), + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S: get_book_entry_state::State> GetBookEntryBuilder<'a, S> { + /// Set the `index` field (optional) + pub fn index(mut self, value: impl Into>) -> Self { + self.__unsafe_private_named.0 = value.into(); + self + } + /// Set the `index` field to an Option value (optional) + pub fn maybe_index(mut self, value: Option) -> Self { + self.__unsafe_private_named.0 = value; + self + } +} + +impl<'a, S> GetBookEntryBuilder<'a, S> +where + S: get_book_entry_state::State, + S::Notebook: get_book_entry_state::IsUnset, +{ + /// Set the `notebook` field (required) + pub fn notebook( + mut self, + value: impl Into>, + ) -> GetBookEntryBuilder<'a, get_book_entry_state::SetNotebook> { + self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + GetBookEntryBuilder { + _phantom_state: ::core::marker::PhantomData, + __unsafe_private_named: self.__unsafe_private_named, + _phantom: ::core::marker::PhantomData, + } + } +} + +impl<'a, S> GetBookEntryBuilder<'a, S> +where + S: get_book_entry_state::State, + S::Notebook: get_book_entry_state::IsSet, +{ + /// Build the final struct + pub fn build(self) -> GetBookEntry<'a> { + GetBookEntry { + index: self.__unsafe_private_named.0, + notebook: self.__unsafe_private_named.1.unwrap(), + } + } +} + +#[jacquard_derive::lexicon] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic +)] +#[serde(rename_all = "camelCase")] +pub struct GetBookEntryOutput<'a> { + #[serde(flatten)] + #[serde(borrow)] + pub value: crate::sh_weaver::notebook::BookEntryView<'a>, +} + +#[jacquard_derive::open_union] +#[derive( + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + thiserror::Error, + miette::Diagnostic, + jacquard_derive::IntoStatic +)] +#[serde(tag = "error", content = "message")] +#[serde(bound(deserialize = "'de: 'a"))] +pub enum GetBookEntryError<'a> { + #[serde(rename = "NotebookNotFound")] + NotebookNotFound(std::option::Option), + #[serde(rename = "EntryNotFound")] + EntryNotFound(std::option::Option), +} + +impl std::fmt::Display for GetBookEntryError<'_> { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match self { + Self::NotebookNotFound(msg) => { + write!(f, "NotebookNotFound")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::EntryNotFound(msg) => { + write!(f, "EntryNotFound")?; + if let Some(msg) = msg { + write!(f, ": {}", msg)?; + } + Ok(()) + } + Self::Unknown(err) => write!(f, "Unknown error: {:?}", err), + } + } +} + +/// Response type for +///sh.weaver.notebook.getBookEntry +pub struct GetBookEntryResponse; +impl jacquard_common::xrpc::XrpcResp for GetBookEntryResponse { + const NSID: &'static str = "sh.weaver.notebook.getBookEntry"; + const ENCODING: &'static str = "application/json"; + type Output<'de> = GetBookEntryOutput<'de>; + type Err<'de> = GetBookEntryError<'de>; +} + +impl<'a> jacquard_common::xrpc::XrpcRequest for GetBookEntry<'a> { + const NSID: &'static str = "sh.weaver.notebook.getBookEntry"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Response = GetBookEntryResponse; +} + +/// Endpoint type for +///sh.weaver.notebook.getBookEntry +pub struct GetBookEntryRequest; +impl jacquard_common::xrpc::XrpcEndpoint for GetBookEntryRequest { + const PATH: &'static str = "/xrpc/sh.weaver.notebook.getBookEntry"; + const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; + type Request<'de> = GetBookEntry<'de>; + type Response = GetBookEntryResponse; +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_entry.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry.rs index 3b90a3f..b177962 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry.rs @@ -16,11 +16,8 @@ )] #[serde(rename_all = "camelCase")] pub struct GetEntry<'a> { - ///(default: 0, min: 0) - #[serde(skip_serializing_if = "std::option::Option::is_none")] - pub index: std::option::Option, #[serde(borrow)] - pub notebook: jacquard_common::types::string::AtUri<'a>, + pub uri: jacquard_common::types::string::AtUri<'a>, } pub mod get_entry_state { @@ -33,25 +30,25 @@ pub mod get_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; + type Uri = Unset; } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Uri = 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 `uri` field + pub struct uri(()); } } @@ -59,7 +56,6 @@ pub mod get_entry_state { pub struct GetEntryBuilder<'a, S: get_entry_state::State> { _phantom_state: ::core::marker::PhantomData S>, __unsafe_private_named: ( - ::core::option::Option, ::core::option::Option>, ), _phantom: ::core::marker::PhantomData<&'a ()>, @@ -77,36 +73,23 @@ impl<'a> GetEntryBuilder<'a, get_entry_state::Empty> { pub fn new() -> Self { GetEntryBuilder { _phantom_state: ::core::marker::PhantomData, - __unsafe_private_named: (None, None), + __unsafe_private_named: (None,), _phantom: ::core::marker::PhantomData, } } } -impl<'a, S: get_entry_state::State> GetEntryBuilder<'a, S> { - /// Set the `index` field (optional) - pub fn index(mut self, value: impl Into>) -> Self { - self.__unsafe_private_named.0 = value.into(); - self - } - /// Set the `index` field to an Option value (optional) - pub fn maybe_index(mut self, value: Option) -> Self { - self.__unsafe_private_named.0 = value; - self - } -} - impl<'a, S> GetEntryBuilder<'a, S> where S: get_entry_state::State, - S::Notebook: get_entry_state::IsUnset, + S::Uri: get_entry_state::IsUnset, { - /// Set the `notebook` field (required) - pub fn notebook( + /// Set the `uri` field (required) + pub fn uri( mut self, value: impl Into>, - ) -> GetEntryBuilder<'a, get_entry_state::SetNotebook> { - self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into()); + ) -> GetEntryBuilder<'a, get_entry_state::SetUri> { + self.__unsafe_private_named.0 = ::core::option::Option::Some(value.into()); GetEntryBuilder { _phantom_state: ::core::marker::PhantomData, __unsafe_private_named: self.__unsafe_private_named, @@ -118,13 +101,12 @@ where impl<'a, S> GetEntryBuilder<'a, S> where S: get_entry_state::State, - S::Notebook: get_entry_state::IsSet, + S::Uri: get_entry_state::IsSet, { /// Build the final struct pub fn build(self) -> GetEntry<'a> { GetEntry { - index: self.__unsafe_private_named.0, - notebook: self.__unsafe_private_named.1.unwrap(), + uri: self.__unsafe_private_named.0.unwrap(), } } } @@ -143,7 +125,7 @@ where pub struct GetEntryOutput<'a> { #[serde(flatten)] #[serde(borrow)] - pub value: crate::sh_weaver::notebook::BookEntryView<'a>, + pub value: crate::sh_weaver::notebook::EntryView<'a>, } #[jacquard_derive::open_union] @@ -161,8 +143,6 @@ pub struct GetEntryOutput<'a> { #[serde(tag = "error", content = "message")] #[serde(bound(deserialize = "'de: 'a"))] pub enum GetEntryError<'a> { - #[serde(rename = "NotebookNotFound")] - NotebookNotFound(std::option::Option), #[serde(rename = "EntryNotFound")] EntryNotFound(std::option::Option), } @@ -170,13 +150,6 @@ pub enum GetEntryError<'a> { impl std::fmt::Display for GetEntryError<'_> { fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { match self { - Self::NotebookNotFound(msg) => { - write!(f, "NotebookNotFound")?; - if let Some(msg) = msg { - write!(f, ": {}", msg)?; - } - Ok(()) - } Self::EntryNotFound(msg) => { write!(f, "EntryNotFound")?; if let Some(msg) = msg { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs index d0bb77c..7ef15dc 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry_by_title.rs @@ -32,37 +32,37 @@ pub mod get_entry_by_title_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Title; + type Notebook; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; type Title = Unset; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; - type Title = S::Title; + type Notebook = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Notebook = S::Notebook; type Title = Set; + type Notebook = S::Notebook; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Title = S::Title; + type Notebook = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `notebook` field + pub struct notebook(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetEntryByTitleBuilder<'a, S> where S: get_entry_by_title_state::State, - S::Notebook: get_entry_by_title_state::IsSet, S::Title: get_entry_by_title_state::IsSet, + S::Notebook: get_entry_by_title_state::IsSet, { /// Build the final struct pub fn build(self) -> GetEntryByTitle<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_entry_feed.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry_feed.rs index 15c1ed2..dd82c45 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry_feed.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry_feed.rs @@ -6,7 +6,13 @@ // Any manual changes will be overwritten on the next regeneration. #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GetEntryFeed<'a> { @@ -30,7 +36,7 @@ pub struct GetEntryFeed<'a> { pub mod get_entry_feed_state { - pub use crate::builder_types::{IsSet, IsUnset, Set, Unset}; + pub use crate::builder_types::{Set, Unset, IsSet, IsUnset}; #[allow(unused)] use ::core::marker::PhantomData; mod sealed { @@ -80,12 +86,18 @@ impl<'a> GetEntryFeedBuilder<'a, get_entry_feed_state::Empty> { impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { /// Set the `algorithm` field (optional) - pub fn algorithm(mut self, value: impl Into>>) -> Self { + pub fn algorithm( + mut self, + value: impl Into>>, + ) -> Self { self.__unsafe_private_named.0 = value.into(); self } /// Set the `algorithm` field to an Option value (optional) - pub fn maybe_algorithm(mut self, value: Option>) -> Self { + pub fn maybe_algorithm( + mut self, + value: Option>, + ) -> Self { self.__unsafe_private_named.0 = value; self } @@ -93,7 +105,10 @@ impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { /// Set the `cursor` field (optional) - pub fn cursor(mut self, value: impl Into>>) -> Self { + pub fn cursor( + mut self, + value: impl Into>>, + ) -> Self { self.__unsafe_private_named.1 = value.into(); self } @@ -114,7 +129,10 @@ impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { self } /// Set the `feed` field to an Option value (optional) - pub fn maybe_feed(mut self, value: Option>) -> Self { + pub fn maybe_feed( + mut self, + value: Option>, + ) -> Self { self.__unsafe_private_named.2 = value; self } @@ -135,12 +153,18 @@ impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { impl<'a, S: get_entry_feed_state::State> GetEntryFeedBuilder<'a, S> { /// Set the `tags` field (optional) - pub fn tags(mut self, value: impl Into>>>) -> Self { + pub fn tags( + mut self, + value: impl Into>>>, + ) -> Self { self.__unsafe_private_named.4 = value.into(); self } /// Set the `tags` field to an Option value (optional) - pub fn maybe_tags(mut self, value: Option>>) -> Self { + pub fn maybe_tags( + mut self, + value: Option>>, + ) -> Self { self.__unsafe_private_named.4 = value; self } @@ -164,7 +188,13 @@ where #[jacquard_derive::lexicon] #[derive( - serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic, + serde::Serialize, + serde::Deserialize, + Debug, + Clone, + PartialEq, + Eq, + jacquard_derive::IntoStatic )] #[serde(rename_all = "camelCase")] pub struct GetEntryFeedOutput<'a> { @@ -199,4 +229,4 @@ impl jacquard_common::xrpc::XrpcEndpoint for GetEntryFeedRequest { const METHOD: jacquard_common::xrpc::XrpcMethod = jacquard_common::xrpc::XrpcMethod::Query; type Request<'de> = GetEntryFeed<'de>; type Response = GetEntryFeedResponse; -} +} \ No newline at end of file diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs index 57ea4c1..dc30001 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs @@ -34,49 +34,49 @@ pub mod resolve_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Notebook; type Entry; + type Notebook; type Actor; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Notebook = Unset; type Entry = Unset; + type Notebook = Unset; type Actor = Unset; } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Notebook = Set; - type Entry = S::Entry; - type Actor = S::Actor; - } ///State transition - sets the `entry` field to Set pub struct SetEntry(PhantomData S>); impl sealed::Sealed for SetEntry {} impl State for SetEntry { - type Notebook = S::Notebook; type Entry = Set; + type Notebook = S::Notebook; + type Actor = S::Actor; + } + ///State transition - sets the `notebook` field to Set + pub struct SetNotebook(PhantomData S>); + impl sealed::Sealed for SetNotebook {} + impl State for SetNotebook { + type Entry = S::Entry; + type Notebook = Set; type Actor = S::Actor; } ///State transition - sets the `actor` field to Set pub struct SetActor(PhantomData S>); impl sealed::Sealed for SetActor {} impl State for SetActor { - type Notebook = S::Notebook; type Entry = S::Entry; + type Notebook = S::Notebook; type Actor = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `entry` field pub struct entry(()); + ///Marker type for the `notebook` field + pub struct notebook(()); ///Marker type for the `actor` field pub struct actor(()); } @@ -171,8 +171,8 @@ where impl<'a, S> ResolveEntryBuilder<'a, S> where S: resolve_entry_state::State, - S::Notebook: resolve_entry_state::IsSet, S::Entry: resolve_entry_state::IsSet, + S::Notebook: resolve_entry_state::IsSet, S::Actor: resolve_entry_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs index 8e27ef7..cd53b77 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_notebook.rs @@ -38,37 +38,37 @@ pub mod resolve_notebook_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Actor; type Name; + 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 Name = Unset; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData S>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { - type Actor = Set; - type Name = S::Name; + type Actor = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Actor = S::Actor; type Name = Set; + type Actor = S::Actor; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData S>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type Name = S::Name; + type Actor = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `actor` field - pub struct actor(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -175,8 +175,8 @@ where impl<'a, S> ResolveNotebookBuilder<'a, S> where S: resolve_notebook_state::State, - S::Actor: resolve_notebook_state::IsSet, S::Name: resolve_notebook_state::IsSet, + S::Actor: resolve_notebook_state::IsSet, { /// Build the final struct pub fn build(self) -> ResolveNotebook<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/theme.rs b/crates/weaver-api/src/sh_weaver/notebook/theme.rs index 55ad5a3..c0989a6 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/theme.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/theme.rs @@ -36,51 +36,51 @@ pub mod code_theme_file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Content; type Name; type Did; - type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Content = Unset; type Name = Unset; type Did = Unset; - type Content = Unset; + } + ///State transition - sets the `content` field to Set + pub struct SetContent(PhantomData S>); + impl sealed::Sealed for SetContent {} + impl State for SetContent { + type Content = Set; + type Name = S::Name; + type Did = S::Did; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type Content = S::Content; type Name = Set; type Did = S::Did; - type Content = S::Content; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Name = S::Name; - type Did = Set; type Content = S::Content; - } - ///State transition - sets the `content` field to Set - pub struct SetContent(PhantomData S>); - impl sealed::Sealed for SetContent {} - impl State for SetContent { type Name = S::Name; - type Did = S::Did; - type Content = Set; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `content` field + pub struct content(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `content` field - pub struct content(()); } } @@ -173,9 +173,9 @@ where impl<'a, S> CodeThemeFileBuilder<'a, S> where S: code_theme_file_state::State, + S::Content: code_theme_file_state::IsSet, S::Name: code_theme_file_state::IsSet, S::Did: code_theme_file_state::IsSet, - S::Content: code_theme_file_state::IsSet, { /// Build the final struct pub fn build(self) -> CodeThemeFile<'a> { @@ -838,50 +838,50 @@ pub mod font_file_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Name; type Content; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Name = Unset; type Content = Unset; + type Name = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Name = S::Name; - type Content = S::Content; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Did = S::Did; - type Name = Set; type Content = S::Content; + type Name = S::Name; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData S>); impl sealed::Sealed for SetContent {} impl State for SetContent { type Did = S::Did; - type Name = S::Name; type Content = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Did = S::Did; + type Content = S::Content; + type Name = 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 `name` field - pub struct name(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -975,8 +975,8 @@ impl<'a, S> FontFileBuilder<'a, S> where S: font_file_state::State, S::Did: font_file_state::IsSet, - S::Name: font_file_state::IsSet, S::Content: font_file_state::IsSet, + S::Name: font_file_state::IsSet, { /// Build the final struct pub fn build(self) -> FontFile<'a> { @@ -1067,105 +1067,105 @@ pub mod theme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Spacing; - type Fonts; type LightScheme; + type DarkScheme; type DarkCodeTheme; type LightCodeTheme; - type DarkScheme; + type Fonts; + type Spacing; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Spacing = Unset; - type Fonts = Unset; type LightScheme = Unset; + type DarkScheme = Unset; type DarkCodeTheme = Unset; type LightCodeTheme = Unset; - type DarkScheme = Unset; - } - ///State transition - sets the `spacing` field to Set - pub struct SetSpacing(PhantomData S>); - impl sealed::Sealed for SetSpacing {} - impl State for SetSpacing { - type Spacing = Set; - type Fonts = S::Fonts; - type LightScheme = S::LightScheme; - type DarkCodeTheme = S::DarkCodeTheme; - type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = S::DarkScheme; - } - ///State transition - sets the `fonts` field to Set - pub struct SetFonts(PhantomData S>); - impl sealed::Sealed for SetFonts {} - impl State for SetFonts { - type Spacing = S::Spacing; - type Fonts = Set; - type LightScheme = S::LightScheme; - type DarkCodeTheme = S::DarkCodeTheme; - type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = S::DarkScheme; + type Fonts = Unset; + type Spacing = Unset; } ///State transition - sets the `light_scheme` field to Set pub struct SetLightScheme(PhantomData S>); impl sealed::Sealed for SetLightScheme {} impl State for SetLightScheme { - type Spacing = S::Spacing; - type Fonts = S::Fonts; type LightScheme = Set; + type DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type Spacing = S::Spacing; + } + ///State transition - sets the `dark_scheme` field to Set + pub struct SetDarkScheme(PhantomData S>); + impl sealed::Sealed for SetDarkScheme {} + impl State for SetDarkScheme { + type LightScheme = S::LightScheme; + type DarkScheme = Set; + type DarkCodeTheme = S::DarkCodeTheme; + type LightCodeTheme = S::LightCodeTheme; + type Fonts = S::Fonts; + type Spacing = S::Spacing; } ///State transition - sets the `dark_code_theme` field to Set pub struct SetDarkCodeTheme(PhantomData S>); impl sealed::Sealed for SetDarkCodeTheme {} impl State for SetDarkCodeTheme { - type Spacing = S::Spacing; - type Fonts = S::Fonts; type LightScheme = S::LightScheme; + type DarkScheme = S::DarkScheme; type DarkCodeTheme = Set; type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type Spacing = S::Spacing; } ///State transition - sets the `light_code_theme` field to Set pub struct SetLightCodeTheme(PhantomData S>); impl sealed::Sealed for SetLightCodeTheme {} impl State for SetLightCodeTheme { - type Spacing = S::Spacing; - type Fonts = S::Fonts; type LightScheme = S::LightScheme; + type DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; type LightCodeTheme = Set; - type DarkScheme = S::DarkScheme; + type Fonts = S::Fonts; + type Spacing = S::Spacing; } - ///State transition - sets the `dark_scheme` field to Set - pub struct SetDarkScheme(PhantomData S>); - impl sealed::Sealed for SetDarkScheme {} - impl State for SetDarkScheme { + ///State transition - sets the `fonts` field to Set + pub struct SetFonts(PhantomData S>); + impl sealed::Sealed for SetFonts {} + impl State for SetFonts { + type LightScheme = S::LightScheme; + type DarkScheme = S::DarkScheme; + type DarkCodeTheme = S::DarkCodeTheme; + type LightCodeTheme = S::LightCodeTheme; + type Fonts = Set; type Spacing = S::Spacing; - type Fonts = S::Fonts; + } + ///State transition - sets the `spacing` field to Set + pub struct SetSpacing(PhantomData S>); + impl sealed::Sealed for SetSpacing {} + impl State for SetSpacing { type LightScheme = S::LightScheme; + type DarkScheme = S::DarkScheme; type DarkCodeTheme = S::DarkCodeTheme; type LightCodeTheme = S::LightCodeTheme; - type DarkScheme = Set; + type Fonts = S::Fonts; + type Spacing = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `spacing` field - pub struct spacing(()); - ///Marker type for the `fonts` field - pub struct fonts(()); ///Marker type for the `light_scheme` field pub struct light_scheme(()); + ///Marker type for the `dark_scheme` field + pub struct dark_scheme(()); ///Marker type for the `dark_code_theme` field pub struct dark_code_theme(()); ///Marker type for the `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(()); + ///Marker type for the `spacing` field + pub struct spacing(()); } } @@ -1338,12 +1338,12 @@ where impl<'a, S> ThemeBuilder<'a, S> where S: theme_state::State, - S::Spacing: theme_state::IsSet, - S::Fonts: theme_state::IsSet, S::LightScheme: theme_state::IsSet, + S::DarkScheme: theme_state::IsSet, S::DarkCodeTheme: theme_state::IsSet, S::LightCodeTheme: theme_state::IsSet, - S::DarkScheme: theme_state::IsSet, + S::Fonts: theme_state::IsSet, + S::Spacing: theme_state::IsSet, { /// Build the final struct pub fn build(self) -> Theme<'a> { @@ -1442,49 +1442,49 @@ pub mod theme_fonts_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Heading; type Body; + type Heading; type Monospace; } /// 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 Heading = Unset; type Monospace = Unset; } - ///State transition - sets the `heading` field to Set - pub struct SetHeading(PhantomData S>); - impl sealed::Sealed for SetHeading {} - impl State for SetHeading { - type Heading = Set; - type Body = S::Body; - type Monospace = S::Monospace; - } ///State transition - sets the `body` field to Set pub struct SetBody(PhantomData S>); impl sealed::Sealed for SetBody {} impl State for SetBody { - type Heading = S::Heading; type Body = Set; + type Heading = S::Heading; + type Monospace = S::Monospace; + } + ///State transition - sets the `heading` field to Set + pub struct SetHeading(PhantomData S>); + impl sealed::Sealed for SetHeading {} + impl State for SetHeading { + type Body = S::Body; + type Heading = Set; type Monospace = S::Monospace; } ///State transition - sets the `monospace` field to Set pub struct SetMonospace(PhantomData S>); impl sealed::Sealed for SetMonospace {} impl State for SetMonospace { - type Heading = S::Heading; type Body = S::Body; + type Heading = S::Heading; type Monospace = 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 `heading` field + pub struct heading(()); ///Marker type for the `monospace` field pub struct monospace(()); } @@ -1579,8 +1579,8 @@ where impl<'a, S> ThemeFontsBuilder<'a, S> where S: theme_fonts_state::State, - S::Heading: theme_fonts_state::IsSet, S::Body: theme_fonts_state::IsSet, + S::Heading: theme_fonts_state::IsSet, S::Monospace: theme_fonts_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/notification.rs b/crates/weaver-api/src/sh_weaver/notification.rs index 4463c6b..a1b3b3d 100644 --- a/crates/weaver-api/src/sh_weaver/notification.rs +++ b/crates/weaver-api/src/sh_weaver/notification.rs @@ -51,105 +51,105 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IsRead; - type IndexedAt; type Cid; type Reason; - type Uri; type Author; + type Uri; + type IsRead; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IsRead = Unset; - type IndexedAt = Unset; type Cid = Unset; type Reason = Unset; - type Uri = Unset; type Author = Unset; - } - ///State transition - sets the `is_read` field to Set - pub struct SetIsRead(PhantomData S>); - impl sealed::Sealed for SetIsRead {} - impl State for SetIsRead { - type IsRead = Set; - type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - type Reason = S::Reason; - type Uri = S::Uri; - type Author = S::Author; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IsRead = S::IsRead; - type IndexedAt = Set; - type Cid = S::Cid; - type Reason = S::Reason; - type Uri = S::Uri; - type Author = S::Author; + type Uri = Unset; + type IsRead = Unset; + type IndexedAt = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type IsRead = S::IsRead; - type IndexedAt = S::IndexedAt; type Cid = Set; type Reason = S::Reason; - type Uri = S::Uri; type Author = S::Author; + type Uri = S::Uri; + type IsRead = S::IsRead; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { + type Cid = S::Cid; + type Reason = Set; + type Author = S::Author; + type Uri = S::Uri; type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { type Cid = S::Cid; - type Reason = Set; + type Reason = S::Reason; + type Author = Set; type Uri = S::Uri; - type Author = S::Author; + type IsRead = S::IsRead; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type Cid = S::Cid; + type Reason = S::Reason; + type Author = S::Author; + type Uri = Set; type IsRead = S::IsRead; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `is_read` field to Set + pub struct SetIsRead(PhantomData S>); + impl sealed::Sealed for SetIsRead {} + impl State for SetIsRead { type Cid = S::Cid; type Reason = S::Reason; - type Uri = Set; type Author = S::Author; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type IsRead = S::IsRead; + type Uri = S::Uri; + type IsRead = Set; type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Cid = S::Cid; type Reason = S::Reason; + type Author = S::Author; type Uri = S::Uri; - type Author = Set; + type IsRead = S::IsRead; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `is_read` field - pub struct is_read(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `cid` field pub struct cid(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `is_read` field + pub struct is_read(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -342,12 +342,12 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, - S::IsRead: notification_state::IsSet, - S::IndexedAt: notification_state::IsSet, S::Cid: notification_state::IsSet, S::Reason: notification_state::IsSet, - S::Uri: notification_state::IsSet, S::Author: notification_state::IsSet, + S::Uri: notification_state::IsSet, + S::IsRead: notification_state::IsSet, + S::IndexedAt: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { @@ -800,85 +800,85 @@ pub mod notification_group_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; - type Count; type Actors; - type MostRecentAt; type Subject; + type MostRecentAt; + type Reason; + type Count; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; - type Count = Unset; type Actors = Unset; - type MostRecentAt = Unset; type Subject = Unset; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type Count = S::Count; - type Actors = S::Actors; - type MostRecentAt = S::MostRecentAt; - type Subject = S::Subject; - } - ///State transition - sets the `count` field to Set - pub struct SetCount(PhantomData S>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { - type Reason = S::Reason; - type Count = Set; - type Actors = S::Actors; - type MostRecentAt = S::MostRecentAt; - type Subject = S::Subject; + type MostRecentAt = Unset; + type Reason = Unset; + type Count = Unset; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData S>); impl sealed::Sealed for SetActors {} impl State for SetActors { + type Actors = Set; + type Subject = S::Subject; + type MostRecentAt = S::MostRecentAt; type Reason = S::Reason; type Count = S::Count; - type Actors = Set; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Actors = S::Actors; + type Subject = Set; type MostRecentAt = S::MostRecentAt; - type Subject = S::Subject; + type Reason = S::Reason; + type Count = S::Count; } ///State transition - sets the `most_recent_at` field to Set pub struct SetMostRecentAt(PhantomData S>); impl sealed::Sealed for SetMostRecentAt {} impl State for SetMostRecentAt { + type Actors = S::Actors; + type Subject = S::Subject; + type MostRecentAt = Set; type Reason = S::Reason; type Count = S::Count; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { type Actors = S::Actors; - type MostRecentAt = Set; type Subject = S::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Reason = S::Reason; + type MostRecentAt = S::MostRecentAt; + type Reason = Set; type Count = S::Count; + } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData S>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { type Actors = S::Actors; + type Subject = S::Subject; type MostRecentAt = S::MostRecentAt; - type Subject = Set; + type Reason = S::Reason; + type Count = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reason` field - pub struct reason(()); - ///Marker type for the `count` field - pub struct count(()); ///Marker type for the `actors` field pub struct actors(()); - ///Marker type for the `most_recent_at` field - pub struct most_recent_at(()); ///Marker type for the `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(()); + ///Marker type for the `count` field + pub struct count(()); } } @@ -1025,11 +1025,11 @@ where impl<'a, S> NotificationGroupBuilder<'a, S> where S: notification_group_state::State, - S::Reason: notification_group_state::IsSet, - S::Count: notification_group_state::IsSet, S::Actors: notification_group_state::IsSet, - S::MostRecentAt: notification_group_state::IsSet, S::Subject: notification_group_state::IsSet, + S::MostRecentAt: notification_group_state::IsSet, + S::Reason: notification_group_state::IsSet, + S::Count: notification_group_state::IsSet, { /// Build the final struct pub fn build(self) -> NotificationGroup<'a> { @@ -1285,51 +1285,51 @@ pub mod subscription_update_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type NewEntries; type UpdatedAt; type Notebook; + type NewEntries; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type NewEntries = Unset; type UpdatedAt = Unset; type Notebook = Unset; - } - ///State transition - sets the `new_entries` field to Set - pub struct SetNewEntries(PhantomData S>); - impl sealed::Sealed for SetNewEntries {} - impl State for SetNewEntries { - type NewEntries = Set; - type UpdatedAt = S::UpdatedAt; - type Notebook = S::Notebook; + type NewEntries = Unset; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type NewEntries = S::NewEntries; type UpdatedAt = Set; type Notebook = S::Notebook; + type NewEntries = S::NewEntries; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type NewEntries = S::NewEntries; type UpdatedAt = S::UpdatedAt; type Notebook = Set; + type NewEntries = S::NewEntries; + } + ///State transition - sets the `new_entries` field to Set + pub struct SetNewEntries(PhantomData S>); + impl sealed::Sealed for SetNewEntries {} + impl State for SetNewEntries { + type UpdatedAt = S::UpdatedAt; + type Notebook = S::Notebook; + type NewEntries = 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 `updated_at` field pub struct updated_at(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `new_entries` field + pub struct new_entries(()); } } @@ -1454,9 +1454,9 @@ impl<'a, S: subscription_update_view_state::State> SubscriptionUpdateViewBuilder impl<'a, S> SubscriptionUpdateViewBuilder<'a, S> where S: subscription_update_view_state::State, - S::NewEntries: subscription_update_view_state::IsSet, S::UpdatedAt: subscription_update_view_state::IsSet, S::Notebook: subscription_update_view_state::IsSet, + S::NewEntries: subscription_update_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscriptionUpdateView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/communication.rs b/crates/weaver-api/src/tools_ozone/communication.rs index 8c97541..6231fa9 100644 --- a/crates/weaver-api/src/tools_ozone/communication.rs +++ b/crates/weaver-api/src/tools_ozone/communication.rs @@ -55,127 +55,127 @@ pub mod template_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Disabled; + type Name; type LastUpdatedBy; type UpdatedAt; + type Disabled; + type Id; type ContentMarkdown; - type Name; type CreatedAt; - type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Disabled = Unset; + type Name = Unset; type LastUpdatedBy = Unset; type UpdatedAt = Unset; + type Disabled = Unset; + type Id = Unset; type ContentMarkdown = Unset; - type Name = Unset; type CreatedAt = Unset; - type Id = Unset; } - ///State transition - sets the `disabled` field to Set - pub struct SetDisabled(PhantomData S>); - impl sealed::Sealed for SetDisabled {} - impl State for SetDisabled { - type Disabled = Set; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Name = Set; type LastUpdatedBy = S::LastUpdatedBy; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; + type Id = S::Id; type ContentMarkdown = S::ContentMarkdown; - type Name = S::Name; type CreatedAt = S::CreatedAt; - type Id = S::Id; } ///State transition - sets the `last_updated_by` field to Set pub struct SetLastUpdatedBy(PhantomData S>); impl sealed::Sealed for SetLastUpdatedBy {} impl State for SetLastUpdatedBy { - type Disabled = S::Disabled; + type Name = S::Name; type LastUpdatedBy = Set; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; + type Id = S::Id; type ContentMarkdown = S::ContentMarkdown; - type Name = S::Name; type CreatedAt = S::CreatedAt; - type Id = S::Id; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { - type Disabled = S::Disabled; + type Name = S::Name; type LastUpdatedBy = S::LastUpdatedBy; type UpdatedAt = Set; + type Disabled = S::Disabled; + type Id = S::Id; type ContentMarkdown = S::ContentMarkdown; - type Name = S::Name; type CreatedAt = S::CreatedAt; - type Id = S::Id; } - ///State transition - sets the `content_markdown` field to Set - pub struct SetContentMarkdown(PhantomData S>); - impl sealed::Sealed for SetContentMarkdown {} - impl State for SetContentMarkdown { - type Disabled = S::Disabled; + ///State transition - sets the `disabled` field to Set + pub struct SetDisabled(PhantomData S>); + impl sealed::Sealed for SetDisabled {} + impl State for SetDisabled { + type Name = S::Name; type LastUpdatedBy = S::LastUpdatedBy; type UpdatedAt = S::UpdatedAt; - type ContentMarkdown = Set; - type Name = S::Name; - type CreatedAt = S::CreatedAt; + type Disabled = Set; type Id = S::Id; + type ContentMarkdown = S::ContentMarkdown; + type CreatedAt = S::CreatedAt; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Disabled = S::Disabled; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Name = S::Name; type LastUpdatedBy = S::LastUpdatedBy; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; + type Id = Set; type ContentMarkdown = S::ContentMarkdown; - type Name = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `content_markdown` field to Set + pub struct SetContentMarkdown(PhantomData S>); + impl sealed::Sealed for SetContentMarkdown {} + impl State for SetContentMarkdown { + type Name = S::Name; + type LastUpdatedBy = S::LastUpdatedBy; + type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; type Id = S::Id; + type ContentMarkdown = Set; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Disabled = S::Disabled; - type LastUpdatedBy = S::LastUpdatedBy; - type UpdatedAt = S::UpdatedAt; - type ContentMarkdown = S::ContentMarkdown; type Name = S::Name; - type CreatedAt = Set; - type Id = S::Id; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Disabled = S::Disabled; type LastUpdatedBy = S::LastUpdatedBy; type UpdatedAt = S::UpdatedAt; + type Disabled = S::Disabled; + type Id = S::Id; type ContentMarkdown = S::ContentMarkdown; - type Name = S::Name; - type CreatedAt = S::CreatedAt; - type Id = Set; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `disabled` field - pub struct disabled(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `last_updated_by` field pub struct last_updated_by(()); ///Marker type for the `updated_at` field pub struct updated_at(()); + ///Marker type for the `disabled` field + pub struct disabled(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `content_markdown` field pub struct content_markdown(()); - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `id` field - pub struct id(()); } } @@ -395,13 +395,13 @@ where impl<'a, S> TemplateViewBuilder<'a, S> where S: template_view_state::State, - S::Disabled: template_view_state::IsSet, + S::Name: template_view_state::IsSet, S::LastUpdatedBy: template_view_state::IsSet, S::UpdatedAt: template_view_state::IsSet, + S::Disabled: template_view_state::IsSet, + S::Id: template_view_state::IsSet, S::ContentMarkdown: template_view_state::IsSet, - S::Name: template_view_state::IsSet, S::CreatedAt: template_view_state::IsSet, - S::Id: template_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TemplateView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs b/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs index b8ee1f3..68a3969 100644 --- a/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs +++ b/crates/weaver-api/src/tools_ozone/hosting/get_account_history.rs @@ -462,49 +462,49 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; type Details; + type CreatedBy; type CreatedAt; } /// 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 CreatedBy = Unset; type CreatedAt = Unset; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; - type Details = S::Details; - type CreatedAt = S::CreatedAt; - } ///State transition - sets the `details` field to Set pub struct SetDetails(PhantomData S>); impl sealed::Sealed for SetDetails {} impl State for SetDetails { - type CreatedBy = S::CreatedBy; type Details = Set; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Details = S::Details; + type CreatedBy = Set; type CreatedAt = S::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type CreatedBy = S::CreatedBy; type Details = S::Details; + type CreatedBy = S::CreatedBy; 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 `details` field pub struct details(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); } @@ -599,8 +599,8 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::CreatedBy: event_state::IsSet, S::Details: event_state::IsSet, + S::CreatedBy: event_state::IsSet, S::CreatedAt: event_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/tools_ozone/moderation.rs b/crates/weaver-api/src/tools_ozone/moderation.rs index f721668..91d6fa6 100644 --- a/crates/weaver-api/src/tools_ozone/moderation.rs +++ b/crates/weaver-api/src/tools_ozone/moderation.rs @@ -55,37 +55,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 S>); - impl sealed::Sealed for SetActive {} - impl State for SetActive { - type Active = Set; - type Timestamp = S::Timestamp; + type Active = Unset; } ///State transition - sets the `timestamp` field to Set pub struct SetTimestamp(PhantomData S>); impl sealed::Sealed for SetTimestamp {} impl State for SetTimestamp { - type Active = S::Active; type Timestamp = Set; + type Active = S::Active; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData S>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Timestamp = S::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(()); } } @@ -192,8 +192,8 @@ where impl<'a, S> AccountEventBuilder<'a, S> where S: account_event_state::State, - S::Active: account_event_state::IsSet, S::Timestamp: account_event_state::IsSet, + S::Active: account_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountEvent<'a> { @@ -5097,51 +5097,51 @@ pub mod age_assurance_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type AttemptId; 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 AttemptId = Unset; type Status = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type AttemptId = S::AttemptId; - type Status = S::Status; + type CreatedAt = Unset; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type CreatedAt = S::CreatedAt; type AttemptId = Set; type Status = S::Status; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type CreatedAt = S::CreatedAt; type AttemptId = S::AttemptId; type Status = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type AttemptId = S::AttemptId; + type Status = S::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 `attempt_id` field pub struct attempt_id(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -5379,9 +5379,9 @@ where impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, - S::CreatedAt: age_assurance_event_state::IsSet, S::AttemptId: age_assurance_event_state::IsSet, S::Status: age_assurance_event_state::IsSet, + S::CreatedAt: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -5519,66 +5519,66 @@ pub mod blob_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Cid; + type CreatedAt; type MimeType; type Size; - 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 CreatedAt = Unset; type MimeType = Unset; type Size = Unset; - type CreatedAt = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { type Cid = Set; + type CreatedAt = S::CreatedAt; + type MimeType = S::MimeType; + type Size = S::Size; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Cid = S::Cid; + type CreatedAt = Set; type MimeType = S::MimeType; type Size = S::Size; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `mime_type` field to Set pub struct SetMimeType(PhantomData S>); impl sealed::Sealed for SetMimeType {} impl State for SetMimeType { type Cid = S::Cid; + type CreatedAt = S::CreatedAt; type MimeType = Set; type Size = S::Size; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData S>); impl sealed::Sealed for SetSize {} impl State for SetSize { type Cid = S::Cid; - type MimeType = S::MimeType; - type Size = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Cid = S::Cid; type MimeType = S::MimeType; - type Size = S::Size; - type CreatedAt = Set; + type Size = 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 `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(()); } } @@ -5726,9 +5726,9 @@ impl<'a, S> BlobViewBuilder<'a, S> where S: blob_view_state::State, S::Cid: blob_view_state::IsSet, + S::CreatedAt: blob_view_state::IsSet, S::MimeType: blob_view_state::IsSet, S::Size: blob_view_state::IsSet, - S::CreatedAt: blob_view_state::IsSet, { /// Build the final struct pub fn build(self) -> BlobView<'a> { @@ -7726,9 +7726,9 @@ pub mod mod_event_view_state { pub trait State: sealed::Sealed { type Id; type Event; - type SubjectBlobCids; - type Subject; type CreatedBy; + type Subject; + type SubjectBlobCids; type CreatedAt; } /// Empty state - all required fields are unset @@ -7737,9 +7737,9 @@ pub mod mod_event_view_state { impl State for Empty { type Id = Unset; type Event = Unset; - type SubjectBlobCids = Unset; - type Subject = Unset; type CreatedBy = Unset; + type Subject = Unset; + type SubjectBlobCids = Unset; type CreatedAt = Unset; } ///State transition - sets the `id` field to Set @@ -7748,9 +7748,9 @@ pub mod mod_event_view_state { impl State for SetId { type Id = Set; type Event = S::Event; - type SubjectBlobCids = S::SubjectBlobCids; - type Subject = S::Subject; type CreatedBy = S::CreatedBy; + type Subject = S::Subject; + type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; } ///State transition - sets the `event` field to Set @@ -7759,20 +7759,20 @@ pub mod mod_event_view_state { impl State for SetEvent { type Id = S::Id; type Event = Set; - type SubjectBlobCids = S::SubjectBlobCids; - type Subject = S::Subject; type CreatedBy = S::CreatedBy; + type Subject = S::Subject; + type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; } - ///State transition - sets the `subject_blob_cids` field to Set - pub struct SetSubjectBlobCids(PhantomData S>); - impl sealed::Sealed for SetSubjectBlobCids {} - impl State for SetSubjectBlobCids { + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { type Id = S::Id; type Event = S::Event; - type SubjectBlobCids = Set; + type CreatedBy = Set; type Subject = S::Subject; - type CreatedBy = S::CreatedBy; + type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject` field to Set @@ -7781,20 +7781,20 @@ pub mod mod_event_view_state { impl State for SetSubject { type Id = S::Id; type Event = S::Event; - type SubjectBlobCids = S::SubjectBlobCids; - type Subject = Set; type CreatedBy = S::CreatedBy; + type Subject = Set; + type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { + ///State transition - sets the `subject_blob_cids` field to Set + pub struct SetSubjectBlobCids(PhantomData S>); + impl sealed::Sealed for SetSubjectBlobCids {} + impl State for SetSubjectBlobCids { type Id = S::Id; type Event = S::Event; - type SubjectBlobCids = S::SubjectBlobCids; + type CreatedBy = S::CreatedBy; type Subject = S::Subject; - type CreatedBy = Set; + type SubjectBlobCids = Set; type CreatedAt = S::CreatedAt; } ///State transition - sets the `created_at` field to Set @@ -7803,9 +7803,9 @@ pub mod mod_event_view_state { impl State for SetCreatedAt { type Id = S::Id; type Event = S::Event; - type SubjectBlobCids = S::SubjectBlobCids; - type Subject = S::Subject; type CreatedBy = S::CreatedBy; + type Subject = S::Subject; + type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = Set; } /// Marker types for field names @@ -7815,12 +7815,12 @@ pub mod mod_event_view_state { pub struct id(()); ///Marker type for the `event` field pub struct event(()); - ///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_by` field pub struct created_by(()); + ///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 `created_at` field pub struct created_at(()); } @@ -8047,9 +8047,9 @@ where S: mod_event_view_state::State, S::Id: mod_event_view_state::IsSet, S::Event: mod_event_view_state::IsSet, - S::SubjectBlobCids: mod_event_view_state::IsSet, - S::Subject: mod_event_view_state::IsSet, S::CreatedBy: mod_event_view_state::IsSet, + S::Subject: mod_event_view_state::IsSet, + S::SubjectBlobCids: mod_event_view_state::IsSet, S::CreatedAt: mod_event_view_state::IsSet, { /// Build the final struct @@ -8244,105 +8244,105 @@ pub mod mod_event_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Subject; type Id; + type Subject; type SubjectBlobs; - type Event; type CreatedBy; + type Event; + 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 Id = Unset; + type Subject = Unset; type SubjectBlobs = Unset; - type Event = Unset; type CreatedBy = Unset; + type Event = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; type Subject = S::Subject; - type Id = S::Id; type SubjectBlobs = S::SubjectBlobs; - type Event = S::Event; type CreatedBy = S::CreatedBy; + type Event = S::Event; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; - type Subject = Set; type Id = S::Id; + type Subject = Set; type SubjectBlobs = S::SubjectBlobs; - type Event = S::Event; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type Id = Set; - type SubjectBlobs = S::SubjectBlobs; type Event = S::Event; - type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject_blobs` field to Set pub struct SetSubjectBlobs(PhantomData S>); impl sealed::Sealed for SetSubjectBlobs {} impl State for SetSubjectBlobs { - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; type Id = S::Id; + type Subject = S::Subject; type SubjectBlobs = Set; - type Event = S::Event; type CreatedBy = S::CreatedBy; + type Event = S::Event; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Id = S::Id; + type Subject = S::Subject; + type SubjectBlobs = S::SubjectBlobs; + type CreatedBy = Set; + type Event = S::Event; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `event` field to Set pub struct SetEvent(PhantomData S>); impl sealed::Sealed for SetEvent {} impl State for SetEvent { - type CreatedAt = S::CreatedAt; - type Subject = S::Subject; type Id = S::Id; + type Subject = S::Subject; type SubjectBlobs = S::SubjectBlobs; - type Event = Set; type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { + type Event = Set; type CreatedAt = S::CreatedAt; - type Subject = S::Subject; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Id = S::Id; + type Subject = S::Subject; type SubjectBlobs = S::SubjectBlobs; + type CreatedBy = S::CreatedBy; type Event = S::Event; - type CreatedBy = 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 `id` field pub struct id(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `subject_blobs` field pub struct subject_blobs(()); - ///Marker type for the `event` field - pub struct event(()); ///Marker type for the `created_by` field pub struct created_by(()); + ///Marker type for the `event` field + pub struct event(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -8515,12 +8515,12 @@ where impl<'a, S> ModEventViewDetailBuilder<'a, S> where S: mod_event_view_detail_state::State, - S::CreatedAt: mod_event_view_detail_state::IsSet, - S::Subject: mod_event_view_detail_state::IsSet, S::Id: mod_event_view_detail_state::IsSet, + S::Subject: mod_event_view_detail_state::IsSet, S::SubjectBlobs: mod_event_view_detail_state::IsSet, - S::Event: mod_event_view_detail_state::IsSet, S::CreatedBy: mod_event_view_detail_state::IsSet, + S::Event: mod_event_view_detail_state::IsSet, + S::CreatedAt: mod_event_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventViewDetail<'a> { @@ -8823,37 +8823,37 @@ pub mod record_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Timestamp; type Op; + 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 Op = Unset; - } - ///State transition - sets the `timestamp` field to Set - pub struct SetTimestamp(PhantomData S>); - impl sealed::Sealed for SetTimestamp {} - impl State for SetTimestamp { - type Timestamp = Set; - type Op = S::Op; + type Timestamp = Unset; } ///State transition - sets the `op` field to Set pub struct SetOp(PhantomData S>); impl sealed::Sealed for SetOp {} impl State for SetOp { - type Timestamp = S::Timestamp; type Op = Set; + type Timestamp = S::Timestamp; + } + ///State transition - sets the `timestamp` field to Set + pub struct SetTimestamp(PhantomData S>); + impl sealed::Sealed for SetTimestamp {} + impl State for SetTimestamp { + type Op = S::Op; + 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 `op` field pub struct op(()); + ///Marker type for the `timestamp` field + pub struct timestamp(()); } } @@ -8963,8 +8963,8 @@ where impl<'a, S> RecordEventBuilder<'a, S> where S: record_event_state::State, - S::Timestamp: record_event_state::IsSet, S::Op: record_event_state::IsSet, + S::Timestamp: record_event_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordEvent<'a> { @@ -9088,127 +9088,127 @@ pub mod record_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; - type BlobCids; - type Repo; - type Uri; type Cid; - type IndexedAt; type Moderation; + type IndexedAt; + type Repo; + type Uri; + type Value; + type BlobCids; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; - type BlobCids = Unset; - type Repo = Unset; - type Uri = Unset; type Cid = Unset; - type IndexedAt = Unset; type Moderation = Unset; + type IndexedAt = Unset; + type Repo = Unset; + type Uri = Unset; + type Value = Unset; + type BlobCids = Unset; } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type BlobCids = S::BlobCids; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; type Repo = S::Repo; type Uri = S::Uri; + type Value = S::Value; + type BlobCids = S::BlobCids; + } + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData S>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { type Cid = S::Cid; + type Moderation = Set; type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; - } - ///State transition - sets the `blob_cids` field to Set - pub struct SetBlobCids(PhantomData S>); - impl sealed::Sealed for SetBlobCids {} - impl State for SetBlobCids { - type Value = S::Value; - type BlobCids = Set; type Repo = S::Repo; type Uri = S::Uri; + type Value = S::Value; + type BlobCids = S::BlobCids; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { type Cid = S::Cid; - type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; + type IndexedAt = Set; + type Repo = S::Repo; + type Uri = S::Uri; + type Value = S::Value; + type BlobCids = S::BlobCids; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Value = S::Value; - type BlobCids = S::BlobCids; - type Repo = Set; - type Uri = S::Uri; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; + type IndexedAt = S::IndexedAt; + type Repo = Set; + type Uri = S::Uri; + type Value = S::Value; + type BlobCids = S::BlobCids; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Value = S::Value; - type BlobCids = S::BlobCids; - type Repo = S::Repo; - type Uri = Set; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Value = S::Value; - type BlobCids = S::BlobCids; - type Repo = S::Repo; - type Uri = S::Uri; - type Cid = Set; type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + type Repo = S::Repo; + type Uri = Set; type Value = S::Value; type BlobCids = S::BlobCids; - type Repo = S::Repo; - type Uri = S::Uri; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type Cid = S::Cid; - type IndexedAt = Set; type Moderation = S::Moderation; - } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData S>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { - type Value = S::Value; - type BlobCids = S::BlobCids; + type IndexedAt = S::IndexedAt; type Repo = S::Repo; type Uri = S::Uri; + type Value = Set; + type BlobCids = S::BlobCids; + } + ///State transition - sets the `blob_cids` field to Set + pub struct SetBlobCids(PhantomData S>); + impl sealed::Sealed for SetBlobCids {} + impl State for SetBlobCids { type Cid = S::Cid; + type Moderation = S::Moderation; type IndexedAt = S::IndexedAt; - type Moderation = Set; + type Repo = S::Repo; + type Uri = S::Uri; + type Value = S::Value; + type BlobCids = 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 `blob_cids` field - pub struct blob_cids(()); - ///Marker type for the `repo` field - pub struct repo(()); - ///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 `moderation` field pub struct moderation(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `blob_cids` field + pub struct blob_cids(()); } } @@ -9381,13 +9381,13 @@ where impl<'a, S> RecordViewBuilder<'a, S> where S: record_view_state::State, - S::Value: record_view_state::IsSet, - S::BlobCids: record_view_state::IsSet, - S::Repo: record_view_state::IsSet, - S::Uri: record_view_state::IsSet, S::Cid: record_view_state::IsSet, - S::IndexedAt: record_view_state::IsSet, S::Moderation: record_view_state::IsSet, + S::IndexedAt: record_view_state::IsSet, + S::Repo: record_view_state::IsSet, + S::Uri: record_view_state::IsSet, + S::Value: record_view_state::IsSet, + S::BlobCids: record_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordView<'a> { @@ -9480,113 +9480,115 @@ pub mod record_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Repo; type Cid; type Value; type Blobs; type IndexedAt; type Moderation; - type Repo; type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Repo = Unset; type Cid = Unset; type Value = Unset; type Blobs = Unset; type IndexedAt = Unset; type Moderation = Unset; - type Repo = Unset; type Uri = Unset; } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; + type Cid = S::Cid; + type Value = S::Value; + type Blobs = S::Blobs; + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + type Uri = S::Uri; + } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Repo = S::Repo; type Cid = Set; type Value = S::Value; type Blobs = S::Blobs; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type Repo = S::Repo; type Uri = S::Uri; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { + type Repo = S::Repo; type Cid = S::Cid; type Value = Set; type Blobs = S::Blobs; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type Repo = S::Repo; type Uri = S::Uri; } ///State transition - sets the `blobs` field to Set pub struct SetBlobs(PhantomData S>); impl sealed::Sealed for SetBlobs {} impl State for SetBlobs { + type Repo = S::Repo; type Cid = S::Cid; type Value = S::Value; type Blobs = Set; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type Repo = S::Repo; type Uri = S::Uri; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Repo = S::Repo; type Cid = S::Cid; type Value = S::Value; type Blobs = S::Blobs; type IndexedAt = Set; type Moderation = S::Moderation; - type Repo = S::Repo; type Uri = S::Uri; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { - type Cid = S::Cid; - type Value = S::Value; - type Blobs = S::Blobs; - type IndexedAt = S::IndexedAt; - type Moderation = Set; type Repo = S::Repo; - type Uri = S::Uri; - } - ///State transition - sets the `repo` field to Set - pub struct SetRepo(PhantomData S>); - impl sealed::Sealed for SetRepo {} - impl State for SetRepo { type Cid = S::Cid; type Value = S::Value; type Blobs = S::Blobs; type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; - type Repo = Set; + type Moderation = Set; type Uri = S::Uri; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type Repo = S::Repo; type Cid = S::Cid; type Value = S::Value; type Blobs = S::Blobs; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; - type Repo = S::Repo; type Uri = 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 `cid` field pub struct cid(()); ///Marker type for the `value` field @@ -9597,8 +9599,6 @@ pub mod record_view_detail_state { pub struct indexed_at(()); ///Marker type for the `moderation` field pub struct moderation(()); - ///Marker type for the `repo` field - pub struct repo(()); ///Marker type for the `uri` field pub struct uri(()); } @@ -9793,12 +9793,12 @@ where impl<'a, S> RecordViewDetailBuilder<'a, S> where S: record_view_detail_state::State, + S::Repo: record_view_detail_state::IsSet, S::Cid: record_view_detail_state::IsSet, S::Value: record_view_detail_state::IsSet, S::Blobs: record_view_detail_state::IsSet, S::IndexedAt: record_view_detail_state::IsSet, S::Moderation: record_view_detail_state::IsSet, - S::Repo: record_view_detail_state::IsSet, S::Uri: record_view_detail_state::IsSet, { /// Build the final struct @@ -10100,85 +10100,85 @@ pub mod repo_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type RelatedRecords; + type IndexedAt; type Moderation; + type Did; type Handle; - 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 RelatedRecords = Unset; + type IndexedAt = Unset; type Moderation = Unset; + type Did = Unset; type Handle = Unset; - type IndexedAt = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type RelatedRecords = S::RelatedRecords; - type Moderation = S::Moderation; - type Handle = S::Handle; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `related_records` field to Set pub struct SetRelatedRecords(PhantomData S>); impl sealed::Sealed for SetRelatedRecords {} impl State for SetRelatedRecords { - type Did = S::Did; type RelatedRecords = Set; + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + type Did = S::Did; + type Handle = S::Handle; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type RelatedRecords = S::RelatedRecords; + type IndexedAt = Set; type Moderation = S::Moderation; + type Did = S::Did; type Handle = S::Handle; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { - type Did = S::Did; type RelatedRecords = S::RelatedRecords; + type IndexedAt = S::IndexedAt; type Moderation = Set; + type Did = S::Did; type Handle = S::Handle; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type RelatedRecords = S::RelatedRecords; type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + type Did = Set; + type Handle = S::Handle; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type RelatedRecords = S::RelatedRecords; - type Moderation = S::Moderation; - type Handle = Set; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Did = S::Did; - type RelatedRecords = S::RelatedRecords; type Moderation = S::Moderation; - type Handle = S::Handle; - type IndexedAt = Set; + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `related_records` field pub struct related_records(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); } } @@ -10434,11 +10434,11 @@ impl<'a, S: repo_view_state::State> RepoViewBuilder<'a, S> { impl<'a, S> RepoViewBuilder<'a, S> where S: repo_view_state::State, - S::Did: repo_view_state::IsSet, S::RelatedRecords: repo_view_state::IsSet, + S::IndexedAt: repo_view_state::IsSet, S::Moderation: repo_view_state::IsSet, + S::Did: repo_view_state::IsSet, S::Handle: repo_view_state::IsSet, - S::IndexedAt: repo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoView<'a> { @@ -10561,9 +10561,9 @@ pub mod repo_view_detail_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type IndexedAt; type Handle; type RelatedRecords; + type IndexedAt; type Moderation; } /// Empty state - all required fields are unset @@ -10571,9 +10571,9 @@ pub mod repo_view_detail_state { impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type IndexedAt = Unset; type Handle = Unset; type RelatedRecords = Unset; + type IndexedAt = Unset; type Moderation = Unset; } ///State transition - sets the `did` field to Set @@ -10581,19 +10581,9 @@ pub mod repo_view_detail_state { impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type IndexedAt = S::IndexedAt; - type Handle = S::Handle; - type RelatedRecords = S::RelatedRecords; - type Moderation = S::Moderation; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Did = S::Did; - type IndexedAt = Set; type Handle = S::Handle; type RelatedRecords = S::RelatedRecords; + type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; } ///State transition - sets the `handle` field to Set @@ -10601,9 +10591,9 @@ pub mod repo_view_detail_state { impl sealed::Sealed for SetHandle {} impl State for SetHandle { type Did = S::Did; - type IndexedAt = S::IndexedAt; type Handle = Set; type RelatedRecords = S::RelatedRecords; + type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; } ///State transition - sets the `related_records` field to Set @@ -10611,9 +10601,19 @@ pub mod repo_view_detail_state { impl sealed::Sealed for SetRelatedRecords {} impl State for SetRelatedRecords { type Did = S::Did; - type IndexedAt = S::IndexedAt; type Handle = S::Handle; type RelatedRecords = Set; + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type Did = S::Did; + type Handle = S::Handle; + type RelatedRecords = S::RelatedRecords; + type IndexedAt = Set; type Moderation = S::Moderation; } ///State transition - sets the `moderation` field to Set @@ -10621,9 +10621,9 @@ pub mod repo_view_detail_state { impl sealed::Sealed for SetModeration {} impl State for SetModeration { type Did = S::Did; - type IndexedAt = S::IndexedAt; type Handle = S::Handle; type RelatedRecords = S::RelatedRecords; + type IndexedAt = S::IndexedAt; type Moderation = Set; } /// Marker types for field names @@ -10631,12 +10631,12 @@ pub mod repo_view_detail_state { pub mod members { ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `related_records` field pub struct related_records(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `moderation` field pub struct moderation(()); } @@ -10958,9 +10958,9 @@ impl<'a, S> RepoViewDetailBuilder<'a, S> where S: repo_view_detail_state::State, S::Did: repo_view_detail_state::IsSet, - S::IndexedAt: repo_view_detail_state::IsSet, S::Handle: repo_view_detail_state::IsSet, S::RelatedRecords: repo_view_detail_state::IsSet, + S::IndexedAt: repo_view_detail_state::IsSet, S::Moderation: repo_view_detail_state::IsSet, { /// Build the final struct @@ -11208,177 +11208,177 @@ pub mod reporter_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; - type RecordReportCount; - type AccountReportCount; - type ReportedAccountCount; - type TakendownAccountCount; - type TakendownRecordCount; type ReportedRecordCount; + type Did; type LabeledRecordCount; + type TakendownAccountCount; type LabeledAccountCount; + type ReportedAccountCount; + type TakendownRecordCount; + type AccountReportCount; + type RecordReportCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; - type RecordReportCount = Unset; - type AccountReportCount = Unset; - type ReportedAccountCount = Unset; - type TakendownAccountCount = Unset; - type TakendownRecordCount = Unset; type ReportedRecordCount = Unset; + type Did = Unset; type LabeledRecordCount = Unset; + type TakendownAccountCount = Unset; type LabeledAccountCount = Unset; + type ReportedAccountCount = Unset; + type TakendownRecordCount = Unset; + type AccountReportCount = Unset; + type RecordReportCount = Unset; + } + ///State transition - sets the `reported_record_count` field to Set + pub struct SetReportedRecordCount(PhantomData S>); + impl sealed::Sealed for SetReportedRecordCount {} + impl State for SetReportedRecordCount { + type ReportedRecordCount = Set; + type Did = S::Did; + type LabeledRecordCount = S::LabeledRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Did = Set; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; type ReportedRecordCount = S::ReportedRecordCount; + type Did = Set; type LabeledRecordCount = S::LabeledRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; } - ///State transition - sets the `record_report_count` field to Set - pub struct SetRecordReportCount(PhantomData S>); - impl sealed::Sealed for SetRecordReportCount {} - impl State for SetRecordReportCount { + ///State transition - sets the `labeled_record_count` field to Set + pub struct SetLabeledRecordCount(PhantomData S>); + impl sealed::Sealed for SetLabeledRecordCount {} + impl State for SetLabeledRecordCount { + type ReportedRecordCount = S::ReportedRecordCount; type Did = S::Did; - type RecordReportCount = Set; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; + type LabeledRecordCount = Set; type TakendownAccountCount = S::TakendownAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; + } + ///State transition - sets the `takendown_account_count` field to Set + pub struct SetTakendownAccountCount(PhantomData S>); + impl sealed::Sealed for SetTakendownAccountCount {} + impl State for SetTakendownAccountCount { type ReportedRecordCount = S::ReportedRecordCount; + type Did = S::Did; type LabeledRecordCount = S::LabeledRecordCount; + type TakendownAccountCount = Set; type LabeledAccountCount = S::LabeledAccountCount; - } - ///State transition - sets the `account_report_count` field to Set - pub struct SetAccountReportCount(PhantomData S>); - impl sealed::Sealed for SetAccountReportCount {} - impl State for SetAccountReportCount { - type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = Set; type ReportedAccountCount = S::ReportedAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; + } + ///State transition - sets the `labeled_account_count` field to Set + pub struct SetLabeledAccountCount(PhantomData S>); + impl sealed::Sealed for SetLabeledAccountCount {} + impl State for SetLabeledAccountCount { type ReportedRecordCount = S::ReportedRecordCount; + type Did = S::Did; type LabeledRecordCount = S::LabeledRecordCount; - type LabeledAccountCount = S::LabeledAccountCount; + type TakendownAccountCount = S::TakendownAccountCount; + type LabeledAccountCount = Set; + type ReportedAccountCount = S::ReportedAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; } ///State transition - sets the `reported_account_count` field to Set pub struct SetReportedAccountCount(PhantomData S>); impl sealed::Sealed for SetReportedAccountCount {} impl State for SetReportedAccountCount { - type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = Set; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; type ReportedRecordCount = S::ReportedRecordCount; - type LabeledRecordCount = S::LabeledRecordCount; - type LabeledAccountCount = S::LabeledAccountCount; - } - ///State transition - sets the `takendown_account_count` field to Set - pub struct SetTakendownAccountCount(PhantomData S>); - impl sealed::Sealed for SetTakendownAccountCount {} - impl State for SetTakendownAccountCount { type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; - type TakendownAccountCount = Set; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; type LabeledRecordCount = S::LabeledRecordCount; + type TakendownAccountCount = S::TakendownAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = Set; + type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; } ///State transition - sets the `takendown_record_count` field to Set pub struct SetTakendownRecordCount(PhantomData S>); impl sealed::Sealed for SetTakendownRecordCount {} impl State for SetTakendownRecordCount { + type ReportedRecordCount = S::ReportedRecordCount; type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = Set; - type ReportedRecordCount = S::ReportedRecordCount; - type LabeledRecordCount = S::LabeledRecordCount; - type LabeledAccountCount = S::LabeledAccountCount; - } - ///State transition - sets the `reported_record_count` field to Set - pub struct SetReportedRecordCount(PhantomData S>); - impl sealed::Sealed for SetReportedRecordCount {} - impl State for SetReportedRecordCount { - type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = Set; - type LabeledRecordCount = S::LabeledRecordCount; - type LabeledAccountCount = S::LabeledAccountCount; - } - ///State transition - sets the `labeled_record_count` field to Set - pub struct SetLabeledRecordCount(PhantomData S>); - impl sealed::Sealed for SetLabeledRecordCount {} - impl State for SetLabeledRecordCount { - type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; + type LabeledRecordCount = S::LabeledRecordCount; type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedRecordCount = S::ReportedRecordCount; - type LabeledRecordCount = Set; type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; + type TakendownRecordCount = Set; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = S::RecordReportCount; } - ///State transition - sets the `labeled_account_count` field to Set - pub struct SetLabeledAccountCount(PhantomData S>); - impl sealed::Sealed for SetLabeledAccountCount {} - impl State for SetLabeledAccountCount { + ///State transition - sets the `account_report_count` field to Set + pub struct SetAccountReportCount(PhantomData S>); + impl sealed::Sealed for SetAccountReportCount {} + impl State for SetAccountReportCount { + type ReportedRecordCount = S::ReportedRecordCount; type Did = S::Did; - type RecordReportCount = S::RecordReportCount; - type AccountReportCount = S::AccountReportCount; - type ReportedAccountCount = S::ReportedAccountCount; + type LabeledRecordCount = S::LabeledRecordCount; type TakendownAccountCount = S::TakendownAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = Set; + type RecordReportCount = S::RecordReportCount; + } + ///State transition - sets the `record_report_count` field to Set + pub struct SetRecordReportCount(PhantomData S>); + impl sealed::Sealed for SetRecordReportCount {} + impl State for SetRecordReportCount { type ReportedRecordCount = S::ReportedRecordCount; + type Did = S::Did; type LabeledRecordCount = S::LabeledRecordCount; - type LabeledAccountCount = Set; + type TakendownAccountCount = S::TakendownAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type ReportedAccountCount = S::ReportedAccountCount; + type TakendownRecordCount = S::TakendownRecordCount; + type AccountReportCount = S::AccountReportCount; + type RecordReportCount = 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 `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_account_count` field - pub struct takendown_account_count(()); - ///Marker type for the `takendown_record_count` field - pub struct takendown_record_count(()); ///Marker type for the `reported_record_count` field pub struct reported_record_count(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `labeled_record_count` field pub struct labeled_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 `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 `account_report_count` field + pub struct account_report_count(()); + ///Marker type for the `record_report_count` field + pub struct record_report_count(()); } } @@ -11601,15 +11601,15 @@ where impl<'a, S> ReporterStatsBuilder<'a, S> where S: reporter_stats_state::State, - S::Did: reporter_stats_state::IsSet, - S::RecordReportCount: reporter_stats_state::IsSet, - S::AccountReportCount: reporter_stats_state::IsSet, - S::ReportedAccountCount: reporter_stats_state::IsSet, - S::TakendownAccountCount: reporter_stats_state::IsSet, - S::TakendownRecordCount: reporter_stats_state::IsSet, S::ReportedRecordCount: reporter_stats_state::IsSet, + S::Did: reporter_stats_state::IsSet, S::LabeledRecordCount: reporter_stats_state::IsSet, + S::TakendownAccountCount: reporter_stats_state::IsSet, S::LabeledAccountCount: reporter_stats_state::IsSet, + S::ReportedAccountCount: reporter_stats_state::IsSet, + S::TakendownRecordCount: reporter_stats_state::IsSet, + S::AccountReportCount: reporter_stats_state::IsSet, + S::RecordReportCount: reporter_stats_state::IsSet, { /// Build the final struct pub fn build(self) -> ReporterStats<'a> { @@ -11887,10 +11887,10 @@ pub mod scheduled_action_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Id; + type CreatedAt; type Action; type Did; - type CreatedAt; + type Id; type CreatedBy; type Status; } @@ -11898,21 +11898,21 @@ pub mod scheduled_action_view_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Id = Unset; + type CreatedAt = Unset; type Action = Unset; type Did = Unset; - type CreatedAt = Unset; + type Id = Unset; type CreatedBy = Unset; type Status = Unset; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Id = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Action = S::Action; type Did = S::Did; - type CreatedAt = S::CreatedAt; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Status = S::Status; } @@ -11920,10 +11920,10 @@ pub mod scheduled_action_view_state { pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type Id = S::Id; + type CreatedAt = S::CreatedAt; type Action = Set; type Did = S::Did; - type CreatedAt = S::CreatedAt; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Status = S::Status; } @@ -11931,21 +11931,21 @@ pub mod scheduled_action_view_state { pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Id = S::Id; + type CreatedAt = S::CreatedAt; type Action = S::Action; type Did = Set; - type CreatedAt = S::CreatedAt; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Status = S::Status; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Id = S::Id; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type CreatedAt = S::CreatedAt; type Action = S::Action; type Did = S::Did; - type CreatedAt = Set; + type Id = Set; type CreatedBy = S::CreatedBy; type Status = S::Status; } @@ -11953,10 +11953,10 @@ pub mod scheduled_action_view_state { pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Id = S::Id; + type CreatedAt = S::CreatedAt; type Action = S::Action; type Did = S::Did; - type CreatedAt = S::CreatedAt; + type Id = S::Id; type CreatedBy = Set; type Status = S::Status; } @@ -11964,24 +11964,24 @@ pub mod scheduled_action_view_state { pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Id = S::Id; + type CreatedAt = S::CreatedAt; type Action = S::Action; type Did = S::Did; - type CreatedAt = S::CreatedAt; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Status = 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 `action` field pub struct action(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `status` field @@ -12322,10 +12322,10 @@ impl<'a, S: scheduled_action_view_state::State> ScheduledActionViewBuilder<'a, S impl<'a, S> ScheduledActionViewBuilder<'a, S> where S: scheduled_action_view_state::State, - S::Id: scheduled_action_view_state::IsSet, + S::CreatedAt: scheduled_action_view_state::IsSet, S::Action: scheduled_action_view_state::IsSet, S::Did: scheduled_action_view_state::IsSet, - S::CreatedAt: scheduled_action_view_state::IsSet, + S::Id: scheduled_action_view_state::IsSet, S::CreatedBy: scheduled_action_view_state::IsSet, S::Status: scheduled_action_view_state::IsSet, { @@ -12617,85 +12617,85 @@ pub mod subject_status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UpdatedAt; - type ReviewState; - type Subject; type Id; + type ReviewState; type CreatedAt; + type UpdatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UpdatedAt = Unset; - type ReviewState = Unset; - type Subject = Unset; type Id = Unset; + type ReviewState = Unset; type CreatedAt = Unset; + type UpdatedAt = Unset; + type Subject = Unset; } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type UpdatedAt = Set; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; type ReviewState = S::ReviewState; - type Subject = S::Subject; - type Id = S::Id; type CreatedAt = S::CreatedAt; + type UpdatedAt = S::UpdatedAt; + type Subject = S::Subject; } ///State transition - sets the `review_state` field to Set pub struct SetReviewState(PhantomData S>); impl sealed::Sealed for SetReviewState {} impl State for SetReviewState { - type UpdatedAt = S::UpdatedAt; - type ReviewState = Set; - type Subject = S::Subject; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type UpdatedAt = S::UpdatedAt; - type ReviewState = S::ReviewState; - type Subject = Set; type Id = S::Id; + type ReviewState = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { type UpdatedAt = S::UpdatedAt; - type ReviewState = S::ReviewState; type Subject = S::Subject; - type Id = Set; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Id = S::Id; + type ReviewState = S::ReviewState; + type CreatedAt = Set; type UpdatedAt = S::UpdatedAt; + type Subject = S::Subject; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type Id = S::Id; type ReviewState = S::ReviewState; + type CreatedAt = S::CreatedAt; + type UpdatedAt = Set; type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { type Id = S::Id; - type CreatedAt = Set; + type ReviewState = S::ReviewState; + type CreatedAt = S::CreatedAt; + type UpdatedAt = S::UpdatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `updated_at` field - pub struct updated_at(()); - ///Marker type for the `review_state` field - pub struct review_state(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `review_state` field + pub struct review_state(()); ///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 `subject` field + pub struct subject(()); } } @@ -13230,11 +13230,11 @@ where impl<'a, S> SubjectStatusViewBuilder<'a, S> where S: subject_status_view_state::State, - S::UpdatedAt: subject_status_view_state::IsSet, - S::ReviewState: subject_status_view_state::IsSet, - S::Subject: subject_status_view_state::IsSet, S::Id: subject_status_view_state::IsSet, + S::ReviewState: subject_status_view_state::IsSet, S::CreatedAt: subject_status_view_state::IsSet, + S::UpdatedAt: subject_status_view_state::IsSet, + S::Subject: subject_status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectStatusView<'a> { @@ -13746,49 +13746,49 @@ pub mod video_details_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Length; type Width; + type Length; type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Length = Unset; type Width = Unset; + type Length = Unset; type Height = Unset; } - ///State transition - sets the `length` field to Set - pub struct SetLength(PhantomData S>); - impl sealed::Sealed for SetLength {} - impl State for SetLength { - type Length = Set; - type Width = S::Width; - type Height = S::Height; - } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData S>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Length = S::Length; type Width = Set; + type Length = S::Length; + type Height = S::Height; + } + ///State transition - sets the `length` field to Set + pub struct SetLength(PhantomData S>); + impl sealed::Sealed for SetLength {} + impl State for SetLength { + type Width = S::Width; + type Length = Set; type Height = S::Height; } ///State transition - sets the `height` field to Set pub struct SetHeight(PhantomData S>); impl sealed::Sealed for SetHeight {} impl State for SetHeight { - type Length = S::Length; type Width = S::Width; + type Length = S::Length; type Height = 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 `width` field pub struct width(()); + ///Marker type for the `length` field + pub struct length(()); ///Marker type for the `height` field pub struct height(()); } @@ -13883,8 +13883,8 @@ where impl<'a, S> VideoDetailsBuilder<'a, S> where S: video_details_state::State, - S::Length: video_details_state::IsSet, S::Width: video_details_state::IsSet, + S::Length: video_details_state::IsSet, S::Height: video_details_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs index 44efe9f..4e31137 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs @@ -47,51 +47,51 @@ pub mod emit_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedBy; type Event; type Subject; + type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedBy = Unset; type Event = Unset; type Subject = Unset; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedBy = Set; - type Event = S::Event; - type Subject = S::Subject; + type CreatedBy = Unset; } ///State transition - sets the `event` field to Set pub struct SetEvent(PhantomData S>); impl sealed::Sealed for SetEvent {} impl State for SetEvent { - type CreatedBy = S::CreatedBy; type Event = Set; type Subject = S::Subject; + type CreatedBy = S::CreatedBy; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedBy = S::CreatedBy; type Event = S::Event; type Subject = Set; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Event = S::Event; + type Subject = S::Subject; + type 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 `event` field pub struct event(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_by` field + pub struct created_by(()); } } @@ -244,9 +244,9 @@ impl<'a, S: emit_event_state::State> EmitEventBuilder<'a, S> { impl<'a, S> EmitEventBuilder<'a, S> where S: emit_event_state::State, - S::CreatedBy: emit_event_state::IsSet, S::Event: emit_event_state::IsSet, S::Subject: emit_event_state::IsSet, + S::CreatedBy: emit_event_state::IsSet, { /// Build the final struct pub fn build(self) -> EmitEvent<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs b/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs index f604561..fe63878 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -575,51 +575,51 @@ pub mod timeline_item_summary_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EventSubjectType; type EventType; type Count; + type EventSubjectType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type EventSubjectType = Unset; type EventType = Unset; type Count = Unset; - } - ///State transition - sets the `event_subject_type` field to Set - pub struct SetEventSubjectType(PhantomData S>); - impl sealed::Sealed for SetEventSubjectType {} - impl State for SetEventSubjectType { - type EventSubjectType = Set; - type EventType = S::EventType; - type Count = S::Count; + type EventSubjectType = Unset; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData S>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type EventSubjectType = S::EventSubjectType; type EventType = Set; type Count = S::Count; + type EventSubjectType = S::EventSubjectType; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData S>); impl sealed::Sealed for SetCount {} impl State for SetCount { - type EventSubjectType = S::EventSubjectType; type EventType = S::EventType; type Count = Set; + type EventSubjectType = S::EventSubjectType; + } + ///State transition - sets the `event_subject_type` field to Set + pub struct SetEventSubjectType(PhantomData S>); + impl sealed::Sealed for SetEventSubjectType {} + impl State for SetEventSubjectType { + type EventType = S::EventType; + type Count = S::Count; + type EventSubjectType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); + ///Marker type for the `event_subject_type` field + pub struct event_subject_type(()); } } @@ -715,9 +715,9 @@ where impl<'a, S> TimelineItemSummaryBuilder<'a, S> where S: timeline_item_summary_state::State, - S::EventSubjectType: timeline_item_summary_state::IsSet, S::EventType: timeline_item_summary_state::IsSet, S::Count: timeline_item_summary_state::IsSet, + S::EventSubjectType: timeline_item_summary_state::IsSet, { /// Build the final struct pub fn build(self) -> TimelineItemSummary<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs b/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs index a695bc3..5c6433f 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/schedule_action.rs @@ -36,37 +36,37 @@ pub mod failed_scheduling_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Error; type Subject; + type Error; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Error = Unset; type Subject = Unset; - } - ///State transition - sets the `error` field to Set - pub struct SetError(PhantomData S>); - impl sealed::Sealed for SetError {} - impl State for SetError { - type Error = Set; - type Subject = S::Subject; + type Error = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type Error = S::Error; type Subject = Set; + type Error = S::Error; + } + ///State transition - sets the `error` field to Set + pub struct SetError(PhantomData S>); + impl sealed::Sealed for SetError {} + impl State for SetError { + type Subject = S::Subject; + type Error = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `error` field - pub struct error(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `error` field + pub struct error(()); } } @@ -159,8 +159,8 @@ where impl<'a, S> FailedSchedulingBuilder<'a, S> where S: failed_scheduling_state::State, - S::Error: failed_scheduling_state::IsSet, S::Subject: failed_scheduling_state::IsSet, + S::Error: failed_scheduling_state::IsSet, { /// Build the final struct pub fn build(self) -> FailedScheduling<'a> { @@ -761,67 +761,67 @@ pub mod schedule_action_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Action; - type Scheduling; type CreatedBy; type Subjects; + type Action; + type Scheduling; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Action = Unset; - type Scheduling = Unset; type CreatedBy = Unset; type Subjects = Unset; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Action = Set; - type Scheduling = S::Scheduling; - type CreatedBy = S::CreatedBy; - type Subjects = S::Subjects; - } - ///State transition - sets the `scheduling` field to Set - pub struct SetScheduling(PhantomData S>); - impl sealed::Sealed for SetScheduling {} - impl State for SetScheduling { - type Action = S::Action; - type Scheduling = Set; - type CreatedBy = S::CreatedBy; - type Subjects = S::Subjects; + type Action = Unset; + type Scheduling = Unset; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Action = S::Action; - type Scheduling = S::Scheduling; type CreatedBy = Set; type Subjects = S::Subjects; + type Action = S::Action; + type Scheduling = S::Scheduling; } ///State transition - sets the `subjects` field to Set pub struct SetSubjects(PhantomData S>); impl sealed::Sealed for SetSubjects {} impl State for SetSubjects { + type CreatedBy = S::CreatedBy; + type Subjects = Set; type Action = S::Action; type Scheduling = S::Scheduling; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type CreatedBy = S::CreatedBy; - type Subjects = Set; + type Subjects = S::Subjects; + type Action = Set; + type Scheduling = S::Scheduling; + } + ///State transition - sets the `scheduling` field to Set + pub struct SetScheduling(PhantomData S>); + impl sealed::Sealed for SetScheduling {} + impl State for SetScheduling { + type CreatedBy = S::CreatedBy; + type Subjects = S::Subjects; + type Action = S::Action; + type Scheduling = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `action` field - pub struct action(()); - ///Marker type for the `scheduling` field - pub struct scheduling(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `subjects` field pub struct subjects(()); + ///Marker type for the `action` field + pub struct action(()); + ///Marker type for the `scheduling` field + pub struct scheduling(()); } } @@ -960,10 +960,10 @@ where impl<'a, S> ScheduleActionBuilder<'a, S> where S: schedule_action_state::State, - S::Action: schedule_action_state::IsSet, - S::Scheduling: schedule_action_state::IsSet, S::CreatedBy: schedule_action_state::IsSet, S::Subjects: schedule_action_state::IsSet, + S::Action: schedule_action_state::IsSet, + S::Scheduling: schedule_action_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduleAction<'a> { @@ -1072,37 +1072,37 @@ pub mod scheduled_action_results_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Failed; type Succeeded; + type Failed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Failed = Unset; type Succeeded = Unset; - } - ///State transition - sets the `failed` field to Set - pub struct SetFailed(PhantomData S>); - impl sealed::Sealed for SetFailed {} - impl State for SetFailed { - type Failed = Set; - type Succeeded = S::Succeeded; + type Failed = Unset; } ///State transition - sets the `succeeded` field to Set pub struct SetSucceeded(PhantomData S>); impl sealed::Sealed for SetSucceeded {} impl State for SetSucceeded { - type Failed = S::Failed; type Succeeded = Set; + type Failed = S::Failed; + } + ///State transition - sets the `failed` field to Set + pub struct SetFailed(PhantomData S>); + impl sealed::Sealed for SetFailed {} + impl State for SetFailed { + type Succeeded = S::Succeeded; + type Failed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `failed` field - pub struct failed(()); ///Marker type for the `succeeded` field pub struct succeeded(()); + ///Marker type for the `failed` field + pub struct failed(()); } } @@ -1188,8 +1188,8 @@ where impl<'a, S> ScheduledActionResultsBuilder<'a, S> where S: scheduled_action_results_state::State, - S::Failed: scheduled_action_results_state::IsSet, S::Succeeded: scheduled_action_results_state::IsSet, + S::Failed: scheduled_action_results_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduledActionResults<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink.rs b/crates/weaver-api/src/tools_ozone/safelink.rs index a0ff395..b812912 100644 --- a/crates/weaver-api/src/tools_ozone/safelink.rs +++ b/crates/weaver-api/src/tools_ozone/safelink.rs @@ -138,149 +138,149 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; type Url; - type Id; - type CreatedAt; type Action; + type Reason; + type Id; type CreatedBy; type Pattern; + type CreatedAt; type EventType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; type Url = Unset; - type Id = Unset; - type CreatedAt = Unset; type Action = Unset; + type Reason = Unset; + type Id = Unset; type CreatedBy = Unset; type Pattern = Unset; + type CreatedAt = Unset; type EventType = Unset; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type Url = S::Url; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - type Action = S::Action; - type CreatedBy = S::CreatedBy; - type Pattern = S::Pattern; - type EventType = S::EventType; - } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Reason = S::Reason; type Url = Set; - type Id = S::Id; - type CreatedAt = S::CreatedAt; type Action = S::Action; + type Reason = S::Reason; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { - type Reason = S::Reason; + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type Url = S::Url; - type Id = Set; - type CreatedAt = S::CreatedAt; - type Action = S::Action; + type Action = Set; + type Reason = S::Reason; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Reason = S::Reason; + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { type Url = S::Url; - type Id = S::Id; - type CreatedAt = Set; type Action = S::Action; + type Reason = Set; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Reason = S::Reason; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { type Url = S::Url; - type Id = S::Id; - type CreatedAt = S::CreatedAt; - type Action = Set; + type Action = S::Action; + type Reason = S::Reason; + type Id = Set; type CreatedBy = S::CreatedBy; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Reason = S::Reason; type Url = S::Url; - type Id = S::Id; - type CreatedAt = S::CreatedAt; type Action = S::Action; + type Reason = S::Reason; + type Id = S::Id; type CreatedBy = Set; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = S::EventType; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Reason = S::Reason; type Url = S::Url; + type Action = S::Action; + type Reason = S::Reason; type Id = S::Id; + type CreatedBy = S::CreatedBy; + type Pattern = Set; type CreatedAt = S::CreatedAt; + type EventType = S::EventType; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Url = S::Url; type Action = S::Action; + type Reason = S::Reason; + type Id = S::Id; type CreatedBy = S::CreatedBy; - type Pattern = Set; + type Pattern = S::Pattern; + type CreatedAt = Set; type EventType = S::EventType; } ///State transition - sets the `event_type` field to Set pub struct SetEventType(PhantomData S>); impl sealed::Sealed for SetEventType {} impl State for SetEventType { - type Reason = S::Reason; type Url = S::Url; - type Id = S::Id; - type CreatedAt = S::CreatedAt; type Action = S::Action; + type Reason = S::Reason; + type Id = S::Id; type CreatedBy = S::CreatedBy; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; type EventType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `url` field pub struct url(()); - ///Marker type for the `id` field - pub struct id(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `action` field pub struct action(()); + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `pattern` field pub struct pattern(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `event_type` field pub struct event_type(()); } @@ -502,13 +502,13 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::Reason: event_state::IsSet, S::Url: event_state::IsSet, - S::Id: event_state::IsSet, - S::CreatedAt: event_state::IsSet, S::Action: event_state::IsSet, + S::Reason: event_state::IsSet, + S::Id: event_state::IsSet, S::CreatedBy: event_state::IsSet, S::Pattern: event_state::IsSet, + S::CreatedAt: event_state::IsSet, S::EventType: event_state::IsSet, { /// Build the final struct @@ -1233,127 +1233,127 @@ pub mod url_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Url; - type Pattern; - type Action; type UpdatedAt; + type Pattern; type Reason; + type Url; + type CreatedAt; type CreatedBy; + type Action; } /// 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 Pattern = Unset; - type Action = Unset; type UpdatedAt = Unset; + type Pattern = Unset; type Reason = Unset; + type Url = Unset; + type CreatedAt = Unset; type CreatedBy = Unset; + type Action = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Url = S::Url; + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type UpdatedAt = Set; type Pattern = S::Pattern; - type Action = S::Action; - type UpdatedAt = S::UpdatedAt; type Reason = S::Reason; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData S>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { + type Url = S::Url; type CreatedAt = S::CreatedAt; - type Url = Set; - type Pattern = S::Pattern; - type Action = S::Action; - type UpdatedAt = S::UpdatedAt; - type Reason = S::Reason; type CreatedBy = S::CreatedBy; + type Action = S::Action; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type CreatedAt = S::CreatedAt; - type Url = S::Url; - type Pattern = Set; - type Action = S::Action; type UpdatedAt = S::UpdatedAt; + type Pattern = Set; type Reason = S::Reason; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type CreatedAt = S::CreatedAt; type Url = S::Url; - type Pattern = S::Pattern; - type Action = Set; - type UpdatedAt = S::UpdatedAt; - type Reason = S::Reason; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { type CreatedAt = S::CreatedAt; - type Url = S::Url; - type Pattern = S::Pattern; - type Action = S::Action; - type UpdatedAt = Set; - type Reason = S::Reason; type CreatedBy = S::CreatedBy; + type Action = S::Action; } ///State transition - sets the `reason` field to Set pub struct SetReason(PhantomData S>); impl sealed::Sealed for SetReason {} impl State for SetReason { - type CreatedAt = S::CreatedAt; + type UpdatedAt = S::UpdatedAt; + type Pattern = S::Pattern; + type Reason = Set; type Url = S::Url; + type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; + type Action = S::Action; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData S>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; + type Reason = S::Reason; + type Url = Set; + type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; type Action = S::Action; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type UpdatedAt = S::UpdatedAt; - type Reason = Set; + type Pattern = S::Pattern; + type Reason = S::Reason; + type Url = S::Url; + type CreatedAt = Set; type CreatedBy = S::CreatedBy; + type Action = S::Action; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type CreatedAt = S::CreatedAt; - type Url = S::Url; + type UpdatedAt = S::UpdatedAt; type Pattern = S::Pattern; + type Reason = S::Reason; + type Url = S::Url; + type CreatedAt = S::CreatedAt; + type CreatedBy = Set; type Action = S::Action; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type UpdatedAt = S::UpdatedAt; + type Pattern = S::Pattern; type Reason = S::Reason; - type CreatedBy = Set; + type Url = S::Url; + type CreatedAt = S::CreatedAt; + type CreatedBy = S::CreatedBy; + type Action = 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 `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 `pattern` field + pub struct pattern(()); ///Marker type for the `reason` field pub struct reason(()); + ///Marker type for the `url` field + pub struct url(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `created_by` field pub struct created_by(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -1543,13 +1543,13 @@ where impl<'a, S> UrlRuleBuilder<'a, S> where S: url_rule_state::State, - S::CreatedAt: url_rule_state::IsSet, - S::Url: url_rule_state::IsSet, - S::Pattern: url_rule_state::IsSet, - S::Action: url_rule_state::IsSet, S::UpdatedAt: url_rule_state::IsSet, + S::Pattern: url_rule_state::IsSet, S::Reason: url_rule_state::IsSet, + S::Url: url_rule_state::IsSet, + S::CreatedAt: url_rule_state::IsSet, S::CreatedBy: url_rule_state::IsSet, + S::Action: url_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> UrlRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs index 83eb139..7b2a7f7 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs @@ -46,8 +46,8 @@ pub mod add_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Reason; type Pattern; + type Reason; type Action; type Url; } @@ -55,26 +55,26 @@ pub mod add_rule_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Reason = Unset; type Pattern = Unset; + type Reason = Unset; type Action = Unset; type Url = Unset; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Reason = Set; - type Pattern = S::Pattern; - type Action = S::Action; - type Url = S::Url; - } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Reason = S::Reason; type Pattern = Set; + type Reason = S::Reason; + type Action = S::Action; + type Url = S::Url; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Pattern = S::Pattern; + type Reason = Set; type Action = S::Action; type Url = S::Url; } @@ -82,8 +82,8 @@ pub mod add_rule_state { pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type Reason = S::Reason; type Pattern = S::Pattern; + type Reason = S::Reason; type Action = Set; type Url = S::Url; } @@ -91,18 +91,18 @@ pub mod add_rule_state { pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type Reason = S::Reason; type Pattern = S::Pattern; + type Reason = S::Reason; type Action = S::Action; type Url = 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 `pattern` field pub struct pattern(()); + ///Marker type for the `reason` field + pub struct reason(()); ///Marker type for the `action` field pub struct action(()); ///Marker type for the `url` field @@ -256,8 +256,8 @@ where impl<'a, S> AddRuleBuilder<'a, S> where S: add_rule_state::State, - S::Reason: add_rule_state::IsSet, S::Pattern: add_rule_state::IsSet, + S::Reason: add_rule_state::IsSet, S::Action: add_rule_state::IsSet, S::Url: add_rule_state::IsSet, { diff --git a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs index fd668e2..fb94be1 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs @@ -46,67 +46,67 @@ pub mod update_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 Action; - 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; - type Action = Unset; - type Reason = Unset; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Reason = Set; + type Action = S::Action; + type Url = S::Url; + type Pattern = S::Pattern; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Reason = S::Reason; + type Action = Set; + type Url = S::Url; + type Pattern = S::Pattern; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { + type Reason = S::Reason; + type Action = S::Action; type Url = Set; type Pattern = S::Pattern; - type Action = S::Action; - type Reason = S::Reason; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { - type Url = S::Url; - type Pattern = Set; - type Action = S::Action; - type Reason = S::Reason; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Url = S::Url; - type Pattern = S::Pattern; - type Action = Set; type Reason = S::Reason; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Url = S::Url; - type Pattern = S::Pattern; type Action = S::Action; - type Reason = Set; + type Url = S::Url; + type Pattern = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `reason` field + pub struct reason(()); + ///Marker type for the `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 `action` field - pub struct action(()); - ///Marker type for the `reason` field - pub struct reason(()); } } @@ -256,10 +256,10 @@ where impl<'a, S> UpdateRuleBuilder<'a, S> where S: update_rule_state::State, + S::Reason: update_rule_state::IsSet, + S::Action: update_rule_state::IsSet, S::Url: update_rule_state::IsSet, S::Pattern: update_rule_state::IsSet, - S::Action: update_rule_state::IsSet, - S::Reason: update_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set.rs b/crates/weaver-api/src/tools_ozone/set.rs index 6e389a9..2c00443 100644 --- a/crates/weaver-api/src/tools_ozone/set.rs +++ b/crates/weaver-api/src/tools_ozone/set.rs @@ -300,67 +300,67 @@ pub mod set_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SetSize; - type CreatedAt; type Name; + type SetSize; type UpdatedAt; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SetSize = Unset; - type CreatedAt = Unset; type Name = Unset; + type SetSize = Unset; type UpdatedAt = Unset; - } - ///State transition - sets the `set_size` field to Set - pub struct SetSetSize(PhantomData S>); - impl sealed::Sealed for SetSetSize {} - impl State for SetSetSize { - type SetSize = Set; - type CreatedAt = S::CreatedAt; - type Name = S::Name; - type UpdatedAt = S::UpdatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type SetSize = S::SetSize; - type CreatedAt = Set; - type Name = S::Name; - type UpdatedAt = S::UpdatedAt; + type CreatedAt = Unset; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type Name = Set; type SetSize = S::SetSize; + type UpdatedAt = S::UpdatedAt; type CreatedAt = S::CreatedAt; - type Name = Set; + } + ///State transition - sets the `set_size` field to Set + pub struct SetSetSize(PhantomData S>); + impl sealed::Sealed for SetSetSize {} + impl State for SetSetSize { + type Name = S::Name; + type SetSize = Set; type UpdatedAt = S::UpdatedAt; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `updated_at` field to Set pub struct SetUpdatedAt(PhantomData S>); impl sealed::Sealed for SetUpdatedAt {} impl State for SetUpdatedAt { + type Name = S::Name; type SetSize = S::SetSize; + type UpdatedAt = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { type Name = S::Name; - type UpdatedAt = Set; + type SetSize = S::SetSize; + type UpdatedAt = S::UpdatedAt; + type CreatedAt = 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 `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(()); ///Marker type for the `updated_at` field pub struct updated_at(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -493,10 +493,10 @@ where impl<'a, S> SetViewBuilder<'a, S> where S: set_view_state::State, - S::SetSize: set_view_state::IsSet, - S::CreatedAt: set_view_state::IsSet, S::Name: set_view_state::IsSet, + S::SetSize: set_view_state::IsSet, S::UpdatedAt: set_view_state::IsSet, + S::CreatedAt: set_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SetView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set/add_values.rs b/crates/weaver-api/src/tools_ozone/set/add_values.rs index 06c548b..426fd0d 100644 --- a/crates/weaver-api/src/tools_ozone/set/add_values.rs +++ b/crates/weaver-api/src/tools_ozone/set/add_values.rs @@ -35,37 +35,37 @@ pub mod add_values_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Values; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Values = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Values = S::Values; + type Name = Unset; } ///State transition - sets the `values` field to Set pub struct SetValues(PhantomData S>); impl sealed::Sealed for SetValues {} impl State for SetValues { - type Name = S::Name; type Values = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Values = S::Values; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `values` field pub struct values(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AddValuesBuilder<'a, S> where S: add_values_state::State, - S::Name: add_values_state::IsSet, S::Values: add_values_state::IsSet, + S::Name: add_values_state::IsSet, { /// Build the final struct pub fn build(self) -> AddValues<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set/delete_values.rs b/crates/weaver-api/src/tools_ozone/set/delete_values.rs index e81aea4..24f250c 100644 --- a/crates/weaver-api/src/tools_ozone/set/delete_values.rs +++ b/crates/weaver-api/src/tools_ozone/set/delete_values.rs @@ -35,37 +35,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 S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Values = S::Values; + type Name = Unset; } ///State transition - sets the `values` field to Set pub struct SetValues(PhantomData S>); impl sealed::Sealed for SetValues {} impl State for SetValues { - type Name = S::Name; type Values = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Values = S::Values; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `values` field pub struct values(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> DeleteValuesBuilder<'a, S> where S: delete_values_state::State, - S::Name: delete_values_state::IsSet, S::Values: delete_values_state::IsSet, + S::Name: delete_values_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteValues<'a> { diff --git a/crates/weaver-api/src/tools_ozone/setting.rs b/crates/weaver-api/src/tools_ozone/setting.rs index e5fa5b9..b4b04ce 100644 --- a/crates/weaver-api/src/tools_ozone/setting.rs +++ b/crates/weaver-api/src/tools_ozone/setting.rs @@ -55,103 +55,103 @@ pub mod defs_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Key; - type Scope; type LastUpdatedBy; type Value; type Did; + type Key; + type Scope; 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 Scope = Unset; type LastUpdatedBy = Unset; type Value = Unset; type Did = Unset; + type Key = Unset; + type Scope = Unset; type CreatedBy = Unset; } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData S>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { - type Key = Set; - type Scope = S::Scope; - type LastUpdatedBy = S::LastUpdatedBy; - type Value = S::Value; - type Did = S::Did; - type CreatedBy = S::CreatedBy; - } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData S>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { - type Key = S::Key; - type Scope = Set; - type LastUpdatedBy = S::LastUpdatedBy; - type Value = S::Value; - type Did = S::Did; - type CreatedBy = S::CreatedBy; - } ///State transition - sets the `last_updated_by` field to Set pub struct SetLastUpdatedBy(PhantomData S>); impl sealed::Sealed for SetLastUpdatedBy {} impl State for SetLastUpdatedBy { - type Key = S::Key; - type Scope = S::Scope; type LastUpdatedBy = Set; type Value = S::Value; type Did = S::Did; + type Key = S::Key; + type Scope = S::Scope; type CreatedBy = S::CreatedBy; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Key = S::Key; - type Scope = S::Scope; type LastUpdatedBy = S::LastUpdatedBy; type Value = Set; type Did = S::Did; + type Key = S::Key; + type Scope = S::Scope; type CreatedBy = S::CreatedBy; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type LastUpdatedBy = S::LastUpdatedBy; + type Value = S::Value; + type Did = Set; type Key = S::Key; type Scope = S::Scope; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData S>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { type LastUpdatedBy = S::LastUpdatedBy; type Value = S::Value; - type Did = Set; + type Did = S::Did; + type Key = Set; + type Scope = S::Scope; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData S>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type LastUpdatedBy = S::LastUpdatedBy; + type Value = S::Value; + type Did = S::Did; + type Key = S::Key; + type Scope = Set; type CreatedBy = S::CreatedBy; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Key = S::Key; - type Scope = S::Scope; type LastUpdatedBy = S::LastUpdatedBy; type Value = S::Value; type Did = S::Did; + type Key = S::Key; + type Scope = S::Scope; type CreatedBy = 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 `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 `did` field pub struct did(()); + ///Marker type for the `key` field + pub struct key(()); + ///Marker type for the `scope` field + pub struct scope(()); ///Marker type for the `created_by` field pub struct created_by(()); } @@ -397,11 +397,11 @@ where impl<'a, S> DefsOptionBuilder<'a, S> where S: defs_option_state::State, - S::Key: defs_option_state::IsSet, - S::Scope: defs_option_state::IsSet, S::LastUpdatedBy: defs_option_state::IsSet, S::Value: defs_option_state::IsSet, S::Did: defs_option_state::IsSet, + S::Key: defs_option_state::IsSet, + S::Scope: defs_option_state::IsSet, S::CreatedBy: defs_option_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/tools_ozone/setting/remove_options.rs b/crates/weaver-api/src/tools_ozone/setting/remove_options.rs index 70b0fdf..9c7ffe8 100644 --- a/crates/weaver-api/src/tools_ozone/setting/remove_options.rs +++ b/crates/weaver-api/src/tools_ozone/setting/remove_options.rs @@ -33,37 +33,37 @@ pub mod remove_options_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Keys; type Scope; + type Keys; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Keys = Unset; type Scope = Unset; - } - ///State transition - sets the `keys` field to Set - pub struct SetKeys(PhantomData S>); - impl sealed::Sealed for SetKeys {} - impl State for SetKeys { - type Keys = Set; - type Scope = S::Scope; + type Keys = Unset; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type Keys = S::Keys; type Scope = Set; + type Keys = S::Keys; + } + ///State transition - sets the `keys` field to Set + pub struct SetKeys(PhantomData S>); + impl sealed::Sealed for SetKeys {} + impl State for SetKeys { + type Scope = S::Scope; + type Keys = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `keys` field - pub struct keys(()); ///Marker type for the `scope` field pub struct scope(()); + ///Marker type for the `keys` field + pub struct keys(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RemoveOptionsBuilder<'a, S> where S: remove_options_state::State, - S::Keys: remove_options_state::IsSet, S::Scope: remove_options_state::IsSet, + S::Keys: remove_options_state::IsSet, { /// Build the final struct pub fn build(self) -> RemoveOptions<'a> { diff --git a/crates/weaver-api/src/tools_ozone/team.rs b/crates/weaver-api/src/tools_ozone/team.rs index 51545dc..9fd6383 100644 --- a/crates/weaver-api/src/tools_ozone/team.rs +++ b/crates/weaver-api/src/tools_ozone/team.rs @@ -50,37 +50,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 S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Role = S::Role; + type Did = Unset; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData S>); impl sealed::Sealed for SetRole {} impl State for SetRole { - type Did = S::Did; type Role = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Role = S::Role; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `role` field pub struct role(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -247,8 +247,8 @@ impl<'a, S: member_state::State> MemberBuilder<'a, S> { impl<'a, S> MemberBuilder<'a, S> where S: member_state::State, - S::Did: member_state::IsSet, S::Role: member_state::IsSet, + S::Did: member_state::IsSet, { /// Build the final struct pub fn build(self) -> Member<'a> { diff --git a/crates/weaver-api/src/tools_ozone/team/add_member.rs b/crates/weaver-api/src/tools_ozone/team/add_member.rs index 13a8670..0697889 100644 --- a/crates/weaver-api/src/tools_ozone/team/add_member.rs +++ b/crates/weaver-api/src/tools_ozone/team/add_member.rs @@ -33,37 +33,37 @@ pub mod add_member_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Role; type Did; + type Role; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Role = Unset; type Did = Unset; - } - ///State transition - sets the `role` field to Set - pub struct SetRole(PhantomData S>); - impl sealed::Sealed for SetRole {} - impl State for SetRole { - type Role = Set; - type Did = S::Did; + type Role = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Role = S::Role; type Did = Set; + type Role = S::Role; + } + ///State transition - sets the `role` field to Set + pub struct SetRole(PhantomData S>); + impl sealed::Sealed for SetRole {} + impl State for SetRole { + type Did = S::Did; + type Role = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `role` field - pub struct role(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `role` field + pub struct role(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> AddMemberBuilder<'a, S> where S: add_member_state::State, - S::Role: add_member_state::IsSet, S::Did: add_member_state::IsSet, + S::Role: add_member_state::IsSet, { /// Build the final struct pub fn build(self) -> AddMember<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification.rs b/crates/weaver-api/src/tools_ozone/verification.rs index b85896b..702b0d2 100644 --- a/crates/weaver-api/src/tools_ozone/verification.rs +++ b/crates/weaver-api/src/tools_ozone/verification.rs @@ -74,105 +74,105 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type DisplayName; - type Uri; - type Subject; type Issuer; type Handle; + type DisplayName; + type Subject; + 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 DisplayName = Unset; - type Uri = Unset; - type Subject = Unset; type Issuer = Unset; type Handle = Unset; + type DisplayName = Unset; + type Subject = Unset; + type Uri = Unset; + type CreatedAt = Unset; } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { + type Issuer = Set; + type Handle = S::Handle; type DisplayName = S::DisplayName; - type Uri = S::Uri; type Subject = S::Subject; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { type Issuer = S::Issuer; - type Handle = S::Handle; + type Handle = Set; + type DisplayName = S::DisplayName; + type Subject = S::Subject; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type CreatedAt = S::CreatedAt; - type DisplayName = Set; - type Uri = S::Uri; - type Subject = S::Subject; type Issuer = S::Issuer; type Handle = S::Handle; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type CreatedAt = S::CreatedAt; - type DisplayName = S::DisplayName; - type Uri = Set; + type DisplayName = Set; type Subject = S::Subject; - type Issuer = S::Issuer; - type Handle = S::Handle; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; + type Handle = S::Handle; type DisplayName = S::DisplayName; - type Uri = S::Uri; type Subject = Set; + type Uri = S::Uri; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Issuer = S::Issuer; type Handle = S::Handle; - } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData S>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { - type CreatedAt = S::CreatedAt; type DisplayName = S::DisplayName; - type Uri = S::Uri; type Subject = S::Subject; - type Issuer = Set; - type Handle = S::Handle; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { + type Uri = Set; type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Issuer = S::Issuer; + type Handle = S::Handle; type DisplayName = S::DisplayName; - type Uri = S::Uri; type Subject = S::Subject; - type Issuer = S::Issuer; - type Handle = Set; + type Uri = S::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 `display_name` field - pub struct display_name(()); - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `issuer` field pub struct issuer(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -479,12 +479,12 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, - S::CreatedAt: verification_view_state::IsSet, - S::DisplayName: verification_view_state::IsSet, - S::Uri: verification_view_state::IsSet, - S::Subject: verification_view_state::IsSet, S::Issuer: verification_view_state::IsSet, S::Handle: verification_view_state::IsSet, + S::DisplayName: verification_view_state::IsSet, + S::Subject: verification_view_state::IsSet, + S::Uri: verification_view_state::IsSet, + S::CreatedAt: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs b/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs index ceff4a4..97cfcb1 100644 --- a/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs @@ -640,51 +640,51 @@ pub mod verification_input_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Handle; 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 Handle = Unset; type DisplayName = Unset; type Subject = Unset; - type Handle = Unset; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Handle = Set; + type DisplayName = S::DisplayName; + type Subject = S::Subject; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { + type Handle = S::Handle; type DisplayName = Set; type Subject = S::Subject; - type Handle = S::Handle; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type DisplayName = S::DisplayName; - type Subject = Set; type Handle = S::Handle; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { type DisplayName = S::DisplayName; - type Subject = S::Subject; - type Handle = Set; + type Subject = 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 `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(()); } } @@ -797,9 +797,9 @@ where impl<'a, S> VerificationInputBuilder<'a, S> where S: verification_input_state::State, + S::Handle: verification_input_state::IsSet, S::DisplayName: verification_input_state::IsSet, S::Subject: verification_input_state::IsSet, - S::Handle: verification_input_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationInput<'a> { diff --git a/crates/weaver-common/src/agent.rs b/crates/weaver-common/src/agent.rs index 59d14da..a4eae6f 100644 --- a/crates/weaver-common/src/agent.rs +++ b/crates/weaver-common/src/agent.rs @@ -12,11 +12,11 @@ use jacquard::bytes::Bytes; use jacquard::client::{AgentError, AgentErrorKind, AgentSession, AgentSessionExt}; use jacquard::error::ClientError; use jacquard::prelude::*; +use jacquard::smol_str::SmolStr; use jacquard::types::blob::{BlobRef, MimeType}; use jacquard::types::string::{AtUri, Did, RecordKey, Rkey}; use jacquard::types::tid::Tid; use jacquard::types::uri::Uri; -use jacquard::smol_str::SmolStr; use jacquard::url::Url; use jacquard::{CowStr, IntoStatic}; use mime_sniffer::MimeTypeSniffer; @@ -2014,9 +2014,7 @@ pub trait WeaverExt: AgentSessionExt + XrpcExt + Send + Sync + Sized { /// Delete all expired session records for the current user. /// /// Called before creating a new session to clean up stale records. - fn cleanup_expired_sessions<'a>( - &'a self, - ) -> impl Future> + 'a + fn cleanup_expired_sessions<'a>(&'a self) -> impl Future> + 'a where Self: Sized, { @@ -2182,10 +2180,7 @@ pub trait WeaverExt: AgentSessionExt + XrpcExt + Send + Sync + Sized { peers.push(SessionPeer { did: record_id.did.into_static(), node_id: session_record.value.node_id.as_ref().into(), - relay_url: session_record - .value - .relay_url - .map(|u| u.as_ref().into()), + relay_url: session_record.value.relay_url.map(|u| u.as_ref().into()), created_at: session_record.value.created_at, expires_at: session_record.value.expires_at, }); diff --git a/crates/weaver-index/migrations/clickhouse/017_notebooks.sql b/crates/weaver-index/migrations/clickhouse/017_notebooks.sql index b92665d..cc9c349 100644 --- a/crates/weaver-index/migrations/clickhouse/017_notebooks.sql +++ b/crates/weaver-index/migrations/clickhouse/017_notebooks.sql @@ -10,19 +10,13 @@ CREATE TABLE IF NOT EXISTS notebooks ( -- Materialized URI for convenience uri String MATERIALIZED concat('at://', did, '/sh.weaver.notebook.book/', rkey), - -- Extracted fields + -- Queryable fields title String DEFAULT '', path String DEFAULT '', - description String DEFAULT '', tags Array(String) DEFAULT [], publish_global UInt8 DEFAULT 0, - - -- Authors array (DIDs) author_dids Array(String) DEFAULT [], - -- Entry count (length of entryList) - entry_count UInt32 DEFAULT 0, - -- Timestamps created_at DateTime64(3) DEFAULT toDateTime64(0, 3), updated_at DateTime64(3) DEFAULT toDateTime64(0, 3), @@ -30,7 +24,10 @@ CREATE TABLE IF NOT EXISTS notebooks ( indexed_at DateTime64(3) DEFAULT now64(3), -- Soft delete (epoch = not deleted) - deleted_at DateTime64(3) DEFAULT toDateTime64(0, 3) + deleted_at DateTime64(3) DEFAULT toDateTime64(0, 3), + + -- Full record JSON for hydration + record JSON DEFAULT '{}' ) ENGINE = ReplacingMergeTree(indexed_at) ORDER BY (did, rkey) diff --git a/crates/weaver-index/migrations/clickhouse/018_notebooks_mv.sql b/crates/weaver-index/migrations/clickhouse/018_notebooks_mv.sql index c1382d3..487583a 100644 --- a/crates/weaver-index/migrations/clickhouse/018_notebooks_mv.sql +++ b/crates/weaver-index/migrations/clickhouse/018_notebooks_mv.sql @@ -7,15 +7,14 @@ SELECT cid, coalesce(record.title, '') as title, coalesce(record.path, '') as path, - '' as description, -- notebooks don't have description field JSONExtract(toString(record), 'tags', 'Array(String)') as tags, if(record.publishGlobal = true, 1, 0) as publish_global, arrayMap(x -> JSONExtractString(x, 'did'), JSONExtractArrayRaw(toString(record), 'authors')) as author_dids, - length(JSONExtractArrayRaw(toString(record), 'entryList')) as entry_count, parseDateTime64BestEffortOrZero(toString(record.createdAt), 3) as created_at, parseDateTime64BestEffortOrZero(toString(record.updatedAt), 3) as updated_at, event_time, now64(3) as indexed_at, - if(operation = 'delete', event_time, toDateTime64(0, 3)) as deleted_at + if(operation = 'delete', event_time, toDateTime64(0, 3)) as deleted_at, + record FROM raw_records WHERE collection = 'sh.weaver.notebook.book' diff --git a/crates/weaver-index/migrations/clickhouse/020_entries.sql b/crates/weaver-index/migrations/clickhouse/020_entries.sql index 075612f..04a1da4 100644 --- a/crates/weaver-index/migrations/clickhouse/020_entries.sql +++ b/crates/weaver-index/migrations/clickhouse/020_entries.sql @@ -10,18 +10,12 @@ CREATE TABLE IF NOT EXISTS entries ( -- Materialized URI for convenience uri String MATERIALIZED concat('at://', did, '/sh.weaver.notebook.entry/', rkey), - -- Extracted fields + -- Queryable fields title String DEFAULT '', path String DEFAULT '', - content String DEFAULT '', tags Array(String) DEFAULT [], - - -- Authors array (DIDs) author_dids Array(String) DEFAULT [], - -- Content preview (first 500 chars for feeds) - content_preview String DEFAULT '', - -- Timestamps created_at DateTime64(3) DEFAULT toDateTime64(0, 3), updated_at DateTime64(3) DEFAULT toDateTime64(0, 3), @@ -29,7 +23,10 @@ CREATE TABLE IF NOT EXISTS entries ( indexed_at DateTime64(3) DEFAULT now64(3), -- Soft delete (epoch = not deleted) - deleted_at DateTime64(3) DEFAULT toDateTime64(0, 3) + deleted_at DateTime64(3) DEFAULT toDateTime64(0, 3), + + -- Full record JSON for hydration + record JSON DEFAULT '{}' ) ENGINE = ReplacingMergeTree(indexed_at) -ORDER BY (did, rkey) +ORDER BY (did, rkey, event_time, cid) diff --git a/crates/weaver-index/migrations/clickhouse/021_entries_mv.sql b/crates/weaver-index/migrations/clickhouse/021_entries_mv.sql index b098eaf..4f53d47 100644 --- a/crates/weaver-index/migrations/clickhouse/021_entries_mv.sql +++ b/crates/weaver-index/migrations/clickhouse/021_entries_mv.sql @@ -7,14 +7,13 @@ SELECT cid, coalesce(record.title, '') as title, coalesce(record.path, '') as path, - coalesce(record.content, '') as content, JSONExtract(toString(record), 'tags', 'Array(String)') as tags, arrayMap(x -> JSONExtractString(x, 'did'), JSONExtractArrayRaw(toString(record), 'authors')) as author_dids, - substring(coalesce(record.content, ''), 1, 500) as content_preview, parseDateTime64BestEffortOrZero(toString(record.createdAt), 3) as created_at, parseDateTime64BestEffortOrZero(toString(record.updatedAt), 3) as updated_at, event_time, now64(3) as indexed_at, - if(operation = 'delete', event_time, toDateTime64(0, 3)) as deleted_at + if(operation = 'delete', event_time, toDateTime64(0, 3)) as deleted_at, + record FROM raw_records WHERE collection = 'sh.weaver.notebook.entry' diff --git a/crates/weaver-index/migrations/clickhouse/037_contributors.sql b/crates/weaver-index/migrations/clickhouse/037_contributors.sql new file mode 100644 index 0000000..a1f79cd --- /dev/null +++ b/crates/weaver-index/migrations/clickhouse/037_contributors.sql @@ -0,0 +1,100 @@ +-- Resource contributors +-- Precomputed MV that tracks who has contributed to each resource +-- Contributors = owners + editors (edit nodes) + collaborators who published + +CREATE MATERIALIZED VIEW IF NOT EXISTS contributors +REFRESH EVERY 1 MINUTE +ENGINE = ReplacingMergeTree(indexed_at) +ORDER BY (resource_did, resource_collection, resource_rkey, contributor_did) +AS +-- Owners: resource creator is always a contributor +SELECT + did as resource_did, + 'sh.weaver.notebook.entry' as resource_collection, + rkey as resource_rkey, + + did as contributor_did, + 'owner' as contribution_type, + + concat('at://', did, '/sh.weaver.notebook.entry/', rkey) as source_uri, + created_at as contributed_at, + now64(3) as indexed_at +FROM entries +WHERE deleted_at = toDateTime64(0, 3) + +UNION ALL + +SELECT + did as resource_did, + 'sh.weaver.notebook.book' as resource_collection, + rkey as resource_rkey, + + did as contributor_did, + 'owner' as contribution_type, + + concat('at://', did, '/sh.weaver.notebook.book/', rkey) as source_uri, + created_at as contributed_at, + now64(3) as indexed_at +FROM notebooks +WHERE deleted_at = toDateTime64(0, 3) + +UNION ALL + +-- Editors: anyone with edit nodes for the resource +SELECT + resource_did, + resource_collection, + resource_rkey, + + did as contributor_did, + 'editor' as contribution_type, + + uri as source_uri, + created_at as contributed_at, + now64(3) as indexed_at +FROM edit_nodes +WHERE deleted_at = toDateTime64(0, 3) + AND resource_did != '' + +UNION ALL + +-- Collaborators who have published (same rkey in their repo) +-- Entry collaborators +SELECT + p.resource_did, + p.resource_collection, + p.resource_rkey, + + e.did as contributor_did, + 'collaborator' as contribution_type, + + e.uri as source_uri, + e.created_at as contributed_at, + now64(3) as indexed_at +FROM entries e +INNER JOIN permissions p ON e.did = p.grantee_did + AND e.rkey = p.resource_rkey + AND p.resource_collection = 'sh.weaver.notebook.entry' + AND p.scope = 'collaborator' +WHERE e.deleted_at = toDateTime64(0, 3) + +UNION ALL + +-- Notebook collaborators +SELECT + p.resource_did, + p.resource_collection, + p.resource_rkey, + + n.did as contributor_did, + 'collaborator' as contribution_type, + + n.uri as source_uri, + n.created_at as contributed_at, + now64(3) as indexed_at +FROM notebooks n +INNER JOIN permissions p ON n.did = p.grantee_did + AND n.rkey = p.resource_rkey + AND p.resource_collection = 'sh.weaver.notebook.book' + AND p.scope = 'collaborator' +WHERE n.deleted_at = toDateTime64(0, 3) diff --git a/crates/weaver-index/migrations/clickhouse/038_notebook_entries.sql b/crates/weaver-index/migrations/clickhouse/038_notebook_entries.sql new file mode 100644 index 0000000..1de2048 --- /dev/null +++ b/crates/weaver-index/migrations/clickhouse/038_notebook_entries.sql @@ -0,0 +1,22 @@ +-- Notebook entries mapping (denormalized for reverse lookup) +-- Maps entries to the notebooks that contain them +-- Enables reverse lookup: find notebooks containing an entry + +CREATE TABLE IF NOT EXISTS notebook_entries ( + -- Entry being referenced + entry_did String, + entry_rkey String, + + -- Notebook containing this entry + notebook_did String, + notebook_rkey String, + + -- Position in entry list (for ordering) + position UInt32, + + -- Timestamps + indexed_at DateTime64(3) DEFAULT now64(3) +) +ENGINE = ReplacingMergeTree(indexed_at) +-- Primary lookup: find notebooks for an entry +ORDER BY (entry_did, entry_rkey, notebook_did, notebook_rkey) diff --git a/crates/weaver-index/migrations/clickhouse/039_notebook_entries_mv.sql b/crates/weaver-index/migrations/clickhouse/039_notebook_entries_mv.sql new file mode 100644 index 0000000..e148899 --- /dev/null +++ b/crates/weaver-index/migrations/clickhouse/039_notebook_entries_mv.sql @@ -0,0 +1,31 @@ +-- Populate notebook_entries from notebooks +-- Extracts entry references from the entryList in notebook records +-- Incremental MV: triggers on INSERT to notebooks, writes to notebook_entries + +CREATE MATERIALIZED VIEW IF NOT EXISTS notebook_entries_mv +TO notebook_entries +AS +SELECT + -- Parse entry URI to extract did and rkey + -- URI format: at://did:plc:xxx/sh.weaver.notebook.entry/rkey + -- assumeNotNull is safe here because WHERE filters guarantee non-null + assumeNotNull(extract(entry_uri, 'at://([^/]+)/')) as entry_did, + assumeNotNull(extract(entry_uri, '/sh\\.weaver\\.notebook\\.entry/([^/]+)$')) as entry_rkey, + + -- Notebook that contains this entry + did as notebook_did, + rkey as notebook_rkey, + + -- Position from array index + assumeNotNull(entry_position) as position, + + now64(3) as indexed_at +FROM notebooks +ARRAY JOIN + record.entryList[].uri as entry_uri, + arrayEnumerate(record.entryList[].uri) as entry_position +WHERE deleted_at = toDateTime64(0, 3) + AND isNotNull(entry_uri) + AND entry_uri != '' + AND extract(entry_uri, 'at://([^/]+)/') != '' + AND extract(entry_uri, '/sh\\.weaver\\.notebook\\.entry/([^/]+)$') != '' diff --git a/crates/weaver-index/src/clickhouse.rs b/crates/weaver-index/src/clickhouse.rs index be2d149..0685c0a 100644 --- a/crates/weaver-index/src/clickhouse.rs +++ b/crates/weaver-index/src/clickhouse.rs @@ -1,10 +1,12 @@ mod client; mod migrations; +mod queries; mod resilient_inserter; mod schema; pub use client::{Client, TableSize}; pub use migrations::{DbObject, MigrationResult, Migrator, ObjectType}; +pub use queries::{EntryRow, HandleMappingRow, NotebookRow, ProfileCountsRow, ProfileRow, ProfileWithCounts}; pub use resilient_inserter::{InserterConfig, ResilientRecordInserter}; pub use schema::{ AccountRevState, FirehoseCursor, RawAccountEvent, RawEventDlq, RawIdentityEvent, diff --git a/crates/weaver-index/src/clickhouse/client.rs b/crates/weaver-index/src/clickhouse/client.rs index d82d840..4bd97d3 100644 --- a/crates/weaver-index/src/clickhouse/client.rs +++ b/crates/weaver-index/src/clickhouse/client.rs @@ -160,6 +160,7 @@ impl Client { seq: 0, // Not from firehose event_time: DateTime::UNIX_EPOCH, // Sort behind canonical firehose data is_live: false, // Fetched on-demand, not from firehose + validation_state: SmolStr::new_static("unchecked"), }; let mut insert = self diff --git a/crates/weaver-index/src/clickhouse/migrations.rs b/crates/weaver-index/src/clickhouse/migrations.rs index 64b2a7a..7db7085 100644 --- a/crates/weaver-index/src/clickhouse/migrations.rs +++ b/crates/weaver-index/src/clickhouse/migrations.rs @@ -16,6 +16,25 @@ pub enum ObjectType { View, } +/// Incremental MV that needs backfill after historical data load +/// +/// These are MVs with `TO table` syntax that only trigger on new inserts, +/// not on existing data. After backfill completes, we need to run the +/// SELECT query as an INSERT to populate the target table. +#[derive(Debug, Clone)] +pub struct IncrementalMv { + pub name: String, + pub target_table: String, + pub select_query: String, +} + +impl IncrementalMv { + /// Generate INSERT query for backfill + pub fn backfill_query(&self) -> String { + format!("INSERT INTO {} {}", self.target_table, self.select_query) + } +} + /// A database object (table or view) extracted from migrations #[derive(Debug, Clone)] pub struct DbObject { @@ -63,12 +82,10 @@ impl<'a> Migrator<'a> { /// Extract all database objects (tables, views) from migrations /// Returns them in reverse order for safe dropping (MVs before their source tables) pub fn all_objects() -> Vec { - let table_re = - Regex::new(r"(?i)CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+(\w+)").unwrap(); + let table_re = Regex::new(r"(?i)CREATE\s+TABLE\s+IF\s+NOT\s+EXISTS\s+(\w+)").unwrap(); let mv_re = Regex::new(r"(?i)CREATE\s+MATERIALIZED\s+VIEW\s+IF\s+NOT\s+EXISTS\s+(\w+)").unwrap(); - let view_re = - Regex::new(r"(?i)CREATE\s+VIEW\s+IF\s+NOT\s+EXISTS\s+(\w+)").unwrap(); + let view_re = Regex::new(r"(?i)CREATE\s+VIEW\s+IF\s+NOT\s+EXISTS\s+(\w+)").unwrap(); let mut objects = Vec::new(); @@ -105,6 +122,33 @@ impl<'a> Migrator<'a> { objects } + /// Extract incremental MVs (those with TO clause) for backfill + /// + /// These MVs write to a separate target table and only trigger on new inserts. + /// After loading historical data, we need to run their SELECT as an INSERT + /// to populate the target tables. + pub fn incremental_mvs() -> Vec { + // Match: CREATE MATERIALIZED VIEW [IF NOT EXISTS] name TO target AS SELECT ... + // The (?s) flag makes . match newlines, (?i) for case insensitive + let mv_re = Regex::new( + r"(?is)CREATE\s+MATERIALIZED\s+VIEW\s+(?:IF\s+NOT\s+EXISTS\s+)?(\w+)\s+TO\s+(\w+)\s+AS\s+(SELECT\s+.+?)(?:;|\z)" + ).unwrap(); + + let mut mvs = Vec::new(); + + for (_, sql) in Self::migrations() { + for caps in mv_re.captures_iter(sql) { + mvs.push(IncrementalMv { + name: caps[1].to_string(), + target_table: caps[2].to_string(), + select_query: caps[3].trim().to_string(), + }); + } + } + + mvs + } + /// Run all pending migrations pub async fn run(&self) -> Result { // First, ensure the migrations table exists (bootstrap) diff --git a/crates/weaver-index/src/clickhouse/queries.rs b/crates/weaver-index/src/clickhouse/queries.rs new file mode 100644 index 0000000..8f6c4b9 --- /dev/null +++ b/crates/weaver-index/src/clickhouse/queries.rs @@ -0,0 +1,12 @@ +//! Query modules for different domains +//! +//! These modules add query methods to the ClickHouse Client via impl blocks. + +mod contributors; +mod identity; +mod notebooks; +mod profiles; + +pub use identity::HandleMappingRow; +pub use notebooks::{EntryRow, NotebookRow}; +pub use profiles::{ProfileCountsRow, ProfileRow, ProfileWithCounts}; diff --git a/crates/weaver-index/src/clickhouse/queries/contributors.rs b/crates/weaver-index/src/clickhouse/queries/contributors.rs new file mode 100644 index 0000000..54719a3 --- /dev/null +++ b/crates/weaver-index/src/clickhouse/queries/contributors.rs @@ -0,0 +1,177 @@ +//! Contributor queries +//! +//! Finds contributors (authors) for resources based on evidence. +//! Uses the precomputed `contributors` MV which tracks: +//! - Resource owners +//! - Editors (edit nodes) +//! - Collaborators who have published (same rkey in their repo) + +use clickhouse::Row; +use serde::Deserialize; +use smol_str::SmolStr; + +use crate::clickhouse::Client; +use crate::error::{ClickHouseError, IndexError}; + +/// Single-column row for contributor DID +#[derive(Debug, Clone, Row, Deserialize)] +struct ContributorRow { + contributor_did: SmolStr, +} + +/// Row for notebook lookup +#[derive(Debug, Clone, Row, Deserialize)] +struct NotebookRefRow { + notebook_did: SmolStr, + notebook_rkey: SmolStr, +} + +impl Client { + /// Find notebooks containing an entry. + /// + /// Returns (notebook_did, notebook_rkey) pairs for notebooks that contain this entry. + pub async fn get_notebooks_for_entry( + &self, + entry_did: &str, + entry_rkey: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT notebook_did, notebook_rkey + FROM notebook_entries FINAL + WHERE entry_did = ? + AND entry_rkey = ? + "#; + + let rows = self + .inner() + .query(query) + .bind(entry_did) + .bind(entry_rkey) + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get notebooks for entry".into(), + source: e, + })?; + + Ok(rows + .into_iter() + .map(|r| (r.notebook_did, r.notebook_rkey)) + .collect()) + } + + /// Get contributors for an entry (direct only, no cascade). + /// + /// Returns DIDs of users who have directly contributed to this entry. + pub async fn get_entry_contributors_direct( + &self, + resource_did: &str, + resource_rkey: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT DISTINCT contributor_did + FROM contributors FINAL + WHERE resource_did = ? + AND resource_rkey = ? + AND resource_collection = 'sh.weaver.notebook.entry' + "#; + + let rows = self + .inner() + .query(query) + .bind(resource_did) + .bind(resource_rkey) + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get entry contributors".into(), + source: e, + })?; + + Ok(rows.into_iter().map(|r| r.contributor_did).collect()) + } + + /// Get contributors for an entry, including cascaded notebook-level collaborators. + /// + /// Returns DIDs of users who have contributed to this entry OR are + /// notebook-level collaborators for a notebook containing this entry. + pub async fn get_entry_contributors( + &self, + entry_did: &str, + entry_rkey: &str, + ) -> Result, IndexError> { + // Single query that unions: + // 1. Direct entry contributors + // 2. Notebook collaborators for notebooks containing this entry + let query = r#" + SELECT DISTINCT contributor_did FROM ( + -- Direct entry contributors + SELECT contributor_did + FROM contributors FINAL + WHERE resource_did = ? + AND resource_rkey = ? + AND resource_collection = 'sh.weaver.notebook.entry' + + UNION ALL + + -- Notebook-level collaborators (cascaded) + SELECT c.contributor_did + FROM notebook_entries ne FINAL + INNER JOIN contributors c FINAL ON + c.resource_did = ne.notebook_did + AND c.resource_rkey = ne.notebook_rkey + AND c.resource_collection = 'sh.weaver.notebook.book' + WHERE ne.entry_did = ? + AND ne.entry_rkey = ? + ) + "#; + + let rows = self + .inner() + .query(query) + .bind(entry_did) + .bind(entry_rkey) + .bind(entry_did) + .bind(entry_rkey) + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get entry contributors".into(), + source: e, + })?; + + Ok(rows.into_iter().map(|r| r.contributor_did).collect()) + } + + /// Get contributors for a notebook. + /// + /// Returns DIDs of users who have contributed to this notebook. + /// Uses the precomputed contributors MV. + pub async fn get_notebook_contributors( + &self, + resource_did: &str, + resource_rkey: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT DISTINCT contributor_did + FROM contributors FINAL + WHERE resource_did = ? + AND resource_rkey = ? + AND resource_collection = 'sh.weaver.notebook.book' + "#; + + let rows = self + .inner() + .query(query) + .bind(resource_did) + .bind(resource_rkey) + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get notebook contributors".into(), + source: e, + })?; + + Ok(rows.into_iter().map(|r| r.contributor_did).collect()) + } +} diff --git a/crates/weaver-index/src/clickhouse/queries/identity.rs b/crates/weaver-index/src/clickhouse/queries/identity.rs new file mode 100644 index 0000000..f824ec3 --- /dev/null +++ b/crates/weaver-index/src/clickhouse/queries/identity.rs @@ -0,0 +1,104 @@ +//! Identity resolution queries (handle <-> DID mappings) + +use clickhouse::Row; +use serde::Deserialize; +use smol_str::SmolStr; + +use crate::clickhouse::Client; +use crate::error::{ClickHouseError, IndexError}; + +/// Handle mapping row from handle_mappings table +#[derive(Debug, Clone, Row, Deserialize)] +pub struct HandleMappingRow { + pub handle: SmolStr, + pub did: SmolStr, + pub freed: u8, + pub account_status: SmolStr, +} + +impl Client { + /// Resolve a handle to a DID using the handle_mappings table. + /// + /// Returns the active (non-freed) mapping for the handle, if one exists. + /// Query orders by freed ASC, event_time DESC to get active mapping first. + pub async fn resolve_handle(&self, handle: &str) -> Result, IndexError> { + let query = r#" + SELECT handle, did, freed, account_status + FROM handle_mappings + WHERE handle = ? + ORDER BY freed ASC, event_time DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(handle) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to resolve handle".into(), + source: e, + })?; + + // Only return if not freed (active mapping) + Ok(row.filter(|r| r.freed == 0)) + } + + /// Resolve a DID to its current handle using the handle_mappings table. + /// + /// Uses the by_did projection for efficient lookup. + pub async fn resolve_did_to_handle(&self, did: &str) -> Result, IndexError> { + let query = r#" + SELECT handle, did, freed, account_status + FROM handle_mappings + WHERE did = ? + ORDER BY freed ASC, event_time DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to resolve DID to handle".into(), + source: e, + })?; + + // Only return if not freed (active mapping) + Ok(row.filter(|r| r.freed == 0)) + } + + /// Cache a handle resolution result in handle_mappings. + /// + /// Used when we resolve via external resolver and want to cache the result. + pub async fn cache_handle_resolution( + &self, + handle: &str, + did: &str, + ) -> Result<(), IndexError> { + use chrono::Utc; + + let query = r#" + INSERT INTO handle_mappings (handle, did, freed, account_status, source, event_time) + VALUES (?, ?, 0, 'active', 'resolution', ?) + "#; + + self.inner() + .query(query) + .bind(handle) + .bind(did) + .bind(Utc::now().timestamp_millis()) + .execute() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to cache handle resolution".into(), + source: e, + })?; + + Ok(()) + } +} diff --git a/crates/weaver-index/src/clickhouse/queries/notebooks.rs b/crates/weaver-index/src/clickhouse/queries/notebooks.rs new file mode 100644 index 0000000..683de42 --- /dev/null +++ b/crates/weaver-index/src/clickhouse/queries/notebooks.rs @@ -0,0 +1,340 @@ +//! Notebook and entry queries + +use clickhouse::Row; +use serde::Deserialize; +use smol_str::SmolStr; + +use crate::clickhouse::Client; +use crate::error::{ClickHouseError, IndexError}; + +/// Notebook row from the notebooks table +#[derive(Debug, Clone, Row, Deserialize)] +pub struct NotebookRow { + pub did: SmolStr, + pub rkey: SmolStr, + pub cid: SmolStr, + pub uri: SmolStr, + pub title: SmolStr, + pub path: SmolStr, + pub tags: Vec, + pub author_dids: Vec, + #[serde(with = "clickhouse::serde::chrono::datetime64::millis")] + pub indexed_at: chrono::DateTime, + pub record: SmolStr, +} + +/// Entry row from the entries table +#[derive(Debug, Clone, Row, Deserialize)] +pub struct EntryRow { + pub did: SmolStr, + pub rkey: SmolStr, + pub cid: SmolStr, + pub uri: SmolStr, + pub title: SmolStr, + pub path: SmolStr, + pub tags: Vec, + pub author_dids: Vec, + #[serde(with = "clickhouse::serde::chrono::datetime64::millis")] + pub indexed_at: chrono::DateTime, + pub record: SmolStr, +} + +impl Client { + /// Resolve a notebook by actor DID and path/title. + /// + /// Searches both path and title fields for flexibility. + pub async fn resolve_notebook( + &self, + did: &str, + name: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM notebooks + WHERE did = ? + AND (path = ? OR title = ?) + AND deleted_at = toDateTime64(0, 3) + ORDER BY event_time DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .bind(name) + .bind(name) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to resolve notebook".into(), + source: e, + })?; + + Ok(row) + } + + /// Get a notebook by DID + rkey. + /// + /// Use this after parsing/resolving AT URIs in the handler. + pub async fn get_notebook( + &self, + did: &str, + rkey: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM notebooks + WHERE did = ? + AND rkey = ? + AND deleted_at = toDateTime64(0, 3) + ORDER BY event_time DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .bind(rkey) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get notebook".into(), + source: e, + })?; + + Ok(row) + } + + /// List entries for a notebook's author (did). + /// + /// Note: This is a simplified version. The full implementation would + /// need to join with notebook's entryList to get proper ordering. + /// For now, we just list entries by the same author. + pub async fn list_notebook_entries( + &self, + did: &str, + limit: u32, + cursor: Option<&str>, + ) -> Result, IndexError> { + let query = if cursor.is_some() { + r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM entries + WHERE did = ? + AND deleted_at = toDateTime64(0, 3) + AND rkey > ? + ORDER BY rkey ASC + LIMIT ? + "# + } else { + r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM entries + WHERE did = ? + AND deleted_at = toDateTime64(0, 3) + ORDER BY rkey ASC + LIMIT ? + "# + }; + + let mut q = self.inner().query(query).bind(did); + + if let Some(c) = cursor { + q = q.bind(c); + } + + let rows = + q.bind(limit) + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to list notebook entries".into(), + source: e, + })?; + + Ok(rows) + } + + /// Get an entry by rkey, picking the most recent version across collaborators. + /// + /// For collaborative entries, the same rkey may exist in multiple repos. + /// This returns the most recently updated version, with indexed_at as tiebreaker. + /// + /// `candidate_dids` should include the notebook owner + all collaborator DIDs. + pub async fn get_entry( + &self, + rkey: &str, + candidate_dids: &[&str], + ) -> Result, IndexError> { + if candidate_dids.is_empty() { + return Ok(None); + } + + // Build placeholders for IN clause + let placeholders: Vec<_> = candidate_dids.iter().map(|_| "?").collect(); + let query = format!( + r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM entries + WHERE rkey = ? + AND did IN ({}) + AND deleted_at = toDateTime64(0, 3) + ORDER BY updated_at DESC, indexed_at DESC + LIMIT 1 + "#, + placeholders.join(", ") + ); + + let mut q = self.inner().query(&query).bind(rkey); + for did in candidate_dids { + q = q.bind(*did); + } + + let row = q + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get entry".into(), + source: e, + })?; + + Ok(row) + } + + /// Get an entry by exact DID + rkey (no collaborator lookup). + /// + /// Use when you know the specific repo you want. + pub async fn get_entry_exact( + &self, + did: &str, + rkey: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM entries + WHERE did = ? + AND rkey = ? + AND deleted_at = toDateTime64(0, 3) + ORDER BY updated_at DESC, indexed_at DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .bind(rkey) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get entry".into(), + source: e, + })?; + + Ok(row) + } + + /// Resolve an entry by actor DID and path/title. + pub async fn resolve_entry( + &self, + did: &str, + name: &str, + ) -> Result, IndexError> { + let query = r#" + SELECT + did, + rkey, + cid, + uri, + title, + path, + tags, + author_dids, + indexed_at, + record + FROM entries + WHERE did = ? + AND (path = ? OR title = ?) + AND deleted_at = toDateTime64(0, 3) + ORDER BY event_time DESC + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .bind(name) + .bind(name) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to resolve entry".into(), + source: e, + })?; + + Ok(row) + } +} diff --git a/crates/weaver-index/src/clickhouse/queries/profiles.rs b/crates/weaver-index/src/clickhouse/queries/profiles.rs new file mode 100644 index 0000000..c563cf4 --- /dev/null +++ b/crates/weaver-index/src/clickhouse/queries/profiles.rs @@ -0,0 +1,168 @@ +//! Profile queries + +use clickhouse::Row; +use serde::Deserialize; +use smol_str::SmolStr; + +use crate::clickhouse::Client; +use crate::error::{ClickHouseError, IndexError}; + +/// Profile row from the profiles materialized view +#[derive(Debug, Clone, Row, Deserialize)] +pub struct ProfileRow { + pub did: SmolStr, + pub handle: SmolStr, + pub weaver_profile: SmolStr, + pub bsky_profile: SmolStr, + pub display_name: SmolStr, + pub description: SmolStr, + pub avatar_cid: SmolStr, + pub banner_cid: SmolStr, + pub has_weaver: u8, + pub has_bsky: u8, +} + +/// Profile counts from the profile_counts table (SummingMergeTree) +#[derive(Debug, Clone, Row, Deserialize)] +pub struct ProfileCountsRow { + pub did: SmolStr, + pub follower_count: i64, + pub following_count: i64, + pub notebook_count: i64, + pub entry_count: i64, +} + +/// Combined profile with counts for getProfile response +#[derive(Debug, Clone)] +pub struct ProfileWithCounts { + pub profile: ProfileRow, + pub counts: Option, +} + +impl Client { + /// Get a profile by DID from the profiles materialized view. + pub async fn get_profile(&self, did: &str) -> Result, IndexError> { + let query = r#" + SELECT + did, + handle, + weaver_profile, + bsky_profile, + display_name, + description, + avatar_cid, + banner_cid, + has_weaver, + has_bsky + FROM profiles + WHERE did = ? + LIMIT 1 + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get profile".into(), + source: e, + })?; + + Ok(row) + } + + /// Get profile counts for a DID from profile_counts (SummingMergeTree). + /// + /// Note: SummingMergeTree requires sum() to get final values. + pub async fn get_profile_counts(&self, did: &str) -> Result, IndexError> { + let query = r#" + SELECT + did, + sum(follower_count) as follower_count, + sum(following_count) as following_count, + sum(notebook_count) as notebook_count, + sum(entry_count) as entry_count + FROM profile_counts + WHERE did = ? + GROUP BY did + "#; + + let row = self + .inner() + .query(query) + .bind(did) + .fetch_optional::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to get profile counts".into(), + source: e, + })?; + + Ok(row) + } + + /// Get a profile with counts in a single call. + /// + /// Runs both queries concurrently for efficiency. + pub async fn get_profile_with_counts(&self, did: &str) -> Result, IndexError> { + let (profile, counts) = tokio::join!( + self.get_profile(did), + self.get_profile_counts(did) + ); + + let profile = profile?; + let counts = counts?; + + Ok(profile.map(|p| ProfileWithCounts { + profile: p, + counts, + })) + } + + /// Batch get profiles for multiple DIDs. + /// + /// Useful for hydrating author lists on notebooks/entries. + pub async fn get_profiles_batch(&self, dids: &[&str]) -> Result, IndexError> { + if dids.is_empty() { + return Ok(Vec::new()); + } + + // Build placeholders for IN clause + let placeholders: Vec<_> = dids.iter().map(|_| "?").collect(); + let query = format!( + r#" + SELECT + did, + handle, + weaver_profile, + bsky_profile, + display_name, + description, + avatar_cid, + banner_cid, + has_weaver, + has_bsky + FROM profiles + WHERE did IN ({}) + "#, + placeholders.join(", ") + ); + + let mut q = self.inner().query(&query); + for did in dids { + q = q.bind(*did); + } + + let rows = q + .fetch_all::() + .await + .map_err(|e| ClickHouseError::Query { + message: "failed to batch get profiles".into(), + source: e, + })?; + + Ok(rows) + } +} diff --git a/crates/weaver-index/src/clickhouse/schema.rs b/crates/weaver-index/src/clickhouse/schema.rs index c5b6b95..5b41f9f 100644 --- a/crates/weaver-index/src/clickhouse/schema.rs +++ b/crates/weaver-index/src/clickhouse/schema.rs @@ -58,6 +58,7 @@ pub struct RawRecordInsert { pub event_time: DateTime, /// Whether this came from live firehose (true) or backfill (false) pub is_live: bool, + pub validation_state: SmolStr, // Note: indexed_at has DEFAULT now64(3), omit from insert // Note: validation_state has DEFAULT 'unchecked', omit from insert } diff --git a/crates/weaver-index/src/endpoints/actor.rs b/crates/weaver-index/src/endpoints/actor.rs new file mode 100644 index 0000000..5b5a33a --- /dev/null +++ b/crates/weaver-index/src/endpoints/actor.rs @@ -0,0 +1,158 @@ +//! sh.weaver.actor.* endpoint handlers + +use axum::{Json, extract::State}; +use jacquard::IntoStatic; +use jacquard::cowstr::ToCowStr; +use jacquard::identity::resolver::IdentityResolver; +use jacquard::types::ident::AtIdentifier; +use jacquard::types::string::{Did, Handle}; +use jacquard_axum::ExtractXrpc; +use weaver_api::sh_weaver::actor::{ + ProfileDataView, ProfileDataViewInner, ProfileView, + get_profile::{GetProfileOutput, GetProfileRequest}, +}; + +use crate::endpoints::repo::XrpcErrorResponse; +use crate::server::AppState; + +/// Handle sh.weaver.actor.getProfile +/// +/// Returns a profile view with counts for the requested actor. +pub async fn get_profile( + State(state): State, + ExtractXrpc(args): ExtractXrpc, +) -> Result>, XrpcErrorResponse> { + // Resolve identifier to DID + let did = resolve_actor(&state, &args.actor).await?; + let did_str = did.as_str(); + + // Fetch profile with counts from ClickHouse + let profile_data = state + .clickhouse + .get_profile_with_counts(did_str) + .await + .map_err(|e| { + tracing::error!("Failed to get profile: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + let Some(data) = profile_data else { + return Err(XrpcErrorResponse::not_found("Profile not found")); + }; + + // Build the response + let profile = &data.profile; + + // Determine handle - use from profile row, or resolve if empty + let handle_str = if profile.handle.is_empty() { + // Try to resolve DID -> handle + match state.clickhouse.resolve_did_to_handle(did_str).await { + Ok(Some(mapping)) => mapping.handle.to_string(), + _ => { + // Last resort: use a placeholder or try external resolver + // For now, use the DID as handle (not ideal but functional) + did_str.to_string() + } + } + } else { + profile.handle.to_string() + }; + + let handle = Handle::new(&handle_str).map_err(|e| { + tracing::error!("Invalid handle in database: {}", e); + XrpcErrorResponse::internal_error("Invalid handle stored") + })?; + + // Build ProfileView (weaver native profile) + let inner_profile = ProfileView::new() + .did(did.clone()) + .handle(handle) + .maybe_display_name(non_empty_str(&profile.display_name)) + .maybe_description(non_empty_str(&profile.description)) + // TODO: avatar/banner need URL construction from CID + .build(); + + let inner = ProfileDataViewInner::ProfileView(Box::new(inner_profile)); + + // Build ProfileDataView with counts + let counts = data.counts.as_ref(); + + let output = ProfileDataView::new() + .inner(inner) + .maybe_follower_count(counts.map(|c| c.follower_count)) + .maybe_following_count(counts.map(|c| c.following_count)) + .maybe_notebook_count(counts.map(|c| c.notebook_count)) + .maybe_entry_count(counts.map(|c| c.entry_count)) + .build(); + + Ok(Json( + GetProfileOutput { + value: output, + extra_data: None, + } + .into_static(), + )) +} + +/// Resolve an AtIdentifier to a DID. +/// +/// For handles: tries handle_mappings first, falls back to external resolver. +/// For DIDs: returns as-is. +pub async fn resolve_actor<'a>( + state: &AppState, + actor: &AtIdentifier<'a>, +) -> Result, XrpcErrorResponse> { + match actor { + AtIdentifier::Did(did) => Ok(did.clone().into_static()), + AtIdentifier::Handle(handle) => { + let handle_str = handle.as_str(); + + // Try handle_mappings first + match state.clickhouse.resolve_handle(handle_str).await { + Ok(Some(mapping)) => { + let did = Did::new(&mapping.did).map_err(|e| { + tracing::error!("Invalid DID in handle_mappings: {}", e); + XrpcErrorResponse::internal_error("Invalid DID stored") + })?; + return Ok(did.into_static()); + } + Ok(None) => { + tracing::debug!("Handle {} not in cache, trying resolver", handle_str); + } + Err(e) => { + tracing::warn!("Handle lookup failed, trying resolver: {}", e); + } + } + + // Fall back to external resolver + let resolved = state.resolver.resolve_handle(handle).await.map_err(|e| { + tracing::warn!("Handle resolution failed for {}: {}", handle, e); + XrpcErrorResponse::invalid_request(format!("Could not resolve handle: {}", handle)) + })?; + + // Cache the result (fire-and-forget) + let clickhouse = state.clickhouse.clone(); + let handle_owned = handle_str.to_string(); + let did_owned = resolved.as_str().to_string(); + tokio::spawn(async move { + if let Err(e) = clickhouse + .cache_handle_resolution(&handle_owned, &did_owned) + .await + { + tracing::warn!("Failed to cache handle resolution: {}", e); + } + }); + + Ok(resolved.into_static()) + } + } +} + +/// Convert SmolStr to Option if non-empty +fn non_empty_str(s: &smol_str::SmolStr) -> Option> { + if s.is_empty() { + None + } else { + Some(s.to_cowstr().into_static()) + } +} diff --git a/crates/weaver-index/src/endpoints/mod.rs b/crates/weaver-index/src/endpoints/mod.rs index 3fa549d..6a54377 100644 --- a/crates/weaver-index/src/endpoints/mod.rs +++ b/crates/weaver-index/src/endpoints/mod.rs @@ -1,3 +1,5 @@ //! XRPC endpoint handlers for the appview. +pub mod actor; +pub mod notebook; pub mod repo; diff --git a/crates/weaver-index/src/endpoints/notebook.rs b/crates/weaver-index/src/endpoints/notebook.rs new file mode 100644 index 0000000..6bf8552 --- /dev/null +++ b/crates/weaver-index/src/endpoints/notebook.rs @@ -0,0 +1,524 @@ +//! sh.weaver.notebook.* endpoint handlers + +use std::collections::{HashMap, HashSet}; + +use axum::{Json, extract::State}; +use jacquard::IntoStatic; +use jacquard::cowstr::ToCowStr; +use jacquard::types::string::{AtUri, Cid, Did, Handle, Uri}; +use jacquard::types::value::Data; +use jacquard_axum::ExtractXrpc; +use smol_str::SmolStr; +use weaver_api::sh_weaver::actor::{ProfileDataView, ProfileDataViewInner, ProfileView}; +use weaver_api::sh_weaver::notebook::{ + AuthorListView, BookEntryView, EntryView, NotebookView, + get_entry::{GetEntryOutput, GetEntryRequest}, + resolve_entry::{ResolveEntryOutput, ResolveEntryRequest}, + resolve_notebook::{ResolveNotebookOutput, ResolveNotebookRequest}, +}; + +use crate::clickhouse::ProfileRow; +use crate::endpoints::actor::resolve_actor; +use crate::endpoints::repo::XrpcErrorResponse; +use crate::server::AppState; + +/// Handle sh.weaver.notebook.resolveNotebook +/// +/// Resolves a notebook by actor + path/title, returns notebook with entries. +pub async fn resolve_notebook( + State(state): State, + ExtractXrpc(args): ExtractXrpc, +) -> Result>, XrpcErrorResponse> { + // Resolve actor to DID + let did = resolve_actor(&state, &args.actor).await?; + let did_str = did.as_str(); + let name = args.name.as_ref(); + + // Fetch notebook and entries in parallel - both just need the DID + let limit = args.entry_limit.unwrap_or(50).clamp(1, 100) as u32; + let cursor = args.entry_cursor.as_deref(); + + let (notebook_result, entries_result) = tokio::try_join!( + async { + state + .clickhouse + .resolve_notebook(did_str, name) + .await + .map_err(|e| { + tracing::error!("Failed to resolve notebook: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + }, + async { + state + .clickhouse + .list_notebook_entries(did_str, limit + 1, cursor) + .await + .map_err(|e| { + tracing::error!("Failed to list entries: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + } + )?; + + let notebook_row = + notebook_result.ok_or_else(|| XrpcErrorResponse::not_found("Notebook not found"))?; + let entry_rows = entries_result; + + // Fetch notebook contributors (evidence-based) + let notebook_contributors = state + .clickhouse + .get_notebook_contributors(did_str, ¬ebook_row.rkey) + .await + .map_err(|e| { + tracing::error!("Failed to get notebook contributors: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + // Check if there are more entries + let has_more = entry_rows.len() > limit as usize; + let entry_rows: Vec<_> = entry_rows.into_iter().take(limit as usize).collect(); + + // Collect all unique author DIDs for batch hydration + // Start with evidence-based notebook contributors + let mut all_author_dids: HashSet<&str> = + notebook_contributors.iter().map(|s| s.as_str()).collect(); + // Also include author_dids from the record (explicit declarations) + for did in ¬ebook_row.author_dids { + all_author_dids.insert(did.as_str()); + } + for entry in &entry_rows { + for did in &entry.author_dids { + all_author_dids.insert(did.as_str()); + } + } + + // Batch fetch profiles + let author_dids_vec: Vec<&str> = all_author_dids.into_iter().collect(); + let profiles = state + .clickhouse + .get_profiles_batch(&author_dids_vec) + .await + .map_err(|e| { + tracing::error!("Failed to batch fetch profiles: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + // Build lookup map + let profile_map: HashMap<&str, &ProfileRow> = + profiles.iter().map(|p| (p.did.as_str(), p)).collect(); + + // Build NotebookView + let notebook_uri = AtUri::new(¬ebook_row.uri).map_err(|e| { + tracing::error!("Invalid notebook URI in db: {}", e); + XrpcErrorResponse::internal_error("Invalid URI stored") + })?; + + let notebook_cid = Cid::new(notebook_row.cid.as_bytes()).map_err(|e| { + tracing::error!("Invalid notebook CID in db: {}", e); + XrpcErrorResponse::internal_error("Invalid CID stored") + })?; + + // Hydrate notebook authors (evidence-based contributors) + let authors = hydrate_authors(¬ebook_contributors, &profile_map)?; + + // Parse record JSON + let record = parse_record_json(¬ebook_row.record)?; + + let notebook = NotebookView::new() + .uri(notebook_uri.into_static()) + .cid(notebook_cid.into_static()) + .authors(authors) + .record(record) + .indexed_at(notebook_row.indexed_at.fixed_offset()) + .maybe_title(non_empty_cowstr(¬ebook_row.title)) + .maybe_path(non_empty_cowstr(¬ebook_row.path)) + .build(); + + // Build entry views + let mut entries: Vec> = Vec::with_capacity(entry_rows.len()); + for (idx, entry_row) in entry_rows.iter().enumerate() { + let entry_uri = AtUri::new(&entry_row.uri).map_err(|e| { + tracing::error!("Invalid entry URI in db: {}", e); + XrpcErrorResponse::internal_error("Invalid URI stored") + })?; + + let entry_cid = Cid::new(entry_row.cid.as_bytes()).map_err(|e| { + tracing::error!("Invalid entry CID in db: {}", e); + XrpcErrorResponse::internal_error("Invalid CID stored") + })?; + + // Hydrate entry authors + let entry_authors = hydrate_authors(&entry_row.author_dids, &profile_map)?; + + // Parse record JSON + let entry_record = parse_record_json(&entry_row.record)?; + + let entry_view = EntryView::new() + .uri(entry_uri.into_static()) + .cid(entry_cid.into_static()) + .authors(entry_authors) + .record(entry_record) + .indexed_at(entry_row.indexed_at.fixed_offset()) + .maybe_title(non_empty_cowstr(&entry_row.title)) + .maybe_path(non_empty_cowstr(&entry_row.path)) + .build(); + + let book_entry = BookEntryView::new() + .entry(entry_view) + .index(idx as i64) + .build(); + + entries.push(book_entry); + } + + // Build cursor for pagination + let next_cursor = if has_more { + entry_rows.last().map(|e| e.rkey.to_string().into()) + } else { + None + }; + + Ok(Json( + ResolveNotebookOutput { + notebook, + entries, + entry_cursor: next_cursor, + extra_data: None, + } + .into_static(), + )) +} + +/// Handle sh.weaver.notebook.getEntry +/// +/// Gets an entry by AT URI. +pub async fn get_entry( + State(state): State, + ExtractXrpc(args): ExtractXrpc, +) -> Result>, XrpcErrorResponse> { + // Parse the AT URI to extract authority and rkey + let uri = &args.uri; + let authority = uri.authority(); + let rkey = uri + .rkey() + .ok_or_else(|| XrpcErrorResponse::invalid_request("URI must include rkey"))?; + let rkey_str = rkey.as_ref(); + + // Resolve authority to DID (could be handle or DID) + let did = resolve_actor(&state, authority).await?; + let did_str = did.as_str(); + + // Fetch entry and contributors in parallel + let (entry_result, contributors_result) = tokio::try_join!( + async { + state + .clickhouse + .get_entry_exact(did_str, rkey_str) + .await + .map_err(|e| { + tracing::error!("Failed to get entry: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + }, + async { + state + .clickhouse + .get_entry_contributors(did_str, rkey_str) + .await + .map_err(|e| { + tracing::error!("Failed to get contributors: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + } + )?; + + let entry_row = entry_result.ok_or_else(|| XrpcErrorResponse::not_found("Entry not found"))?; + + // Merge contributors with author_dids from record (dedupe) + let mut all_author_dids: HashSet<&str> = + contributors_result.iter().map(|s| s.as_str()).collect(); + for did in &entry_row.author_dids { + all_author_dids.insert(did.as_str()); + } + + // Fetch profiles for all authors + let author_dids_vec: Vec<&str> = all_author_dids.into_iter().collect(); + let profiles = state + .clickhouse + .get_profiles_batch(&author_dids_vec) + .await + .map_err(|e| { + tracing::error!("Failed to fetch profiles: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + let profile_map: HashMap<&str, &ProfileRow> = + profiles.iter().map(|p| (p.did.as_str(), p)).collect(); + + // Build EntryView - use contributors as the author list (evidence-based) + let entry_view = build_entry_view_with_authors(&entry_row, &contributors_result, &profile_map)?; + + Ok(Json( + GetEntryOutput { + value: entry_view, + extra_data: None, + } + .into_static(), + )) +} + +/// Handle sh.weaver.notebook.resolveEntry +/// +/// Resolves an entry by actor + notebook name + entry name. +pub async fn resolve_entry( + State(state): State, + ExtractXrpc(args): ExtractXrpc, +) -> Result>, XrpcErrorResponse> { + // Resolve actor to DID + let did = resolve_actor(&state, &args.actor).await?; + let did_str = did.as_str(); + + // Resolve notebook and entry in parallel - both just need the DID + let notebook_name = args.notebook.as_ref(); + let entry_name = args.entry.as_ref(); + + let (notebook_result, entry_result) = tokio::try_join!( + async { + state + .clickhouse + .resolve_notebook(did_str, notebook_name) + .await + .map_err(|e| { + tracing::error!("Failed to resolve notebook: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + }, + async { + state + .clickhouse + .resolve_entry(did_str, entry_name) + .await + .map_err(|e| { + tracing::error!("Failed to resolve entry: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + } + )?; + + let _notebook_row = + notebook_result.ok_or_else(|| XrpcErrorResponse::not_found("Notebook not found"))?; + let entry_row = entry_result.ok_or_else(|| XrpcErrorResponse::not_found("Entry not found"))?; + + // Fetch contributors and notebooks in parallel (need entry rkey, so must wait for entry resolution) + let (contributors, notebooks) = tokio::try_join!( + async { + state + .clickhouse + .get_entry_contributors(did_str, &entry_row.rkey) + .await + .map_err(|e| { + tracing::error!("Failed to get contributors: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + }, + async { + state + .clickhouse + .get_notebooks_for_entry(did_str, &entry_row.rkey) + .await + .map_err(|e| { + tracing::error!("Failed to get notebooks for entry: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + }) + } + )?; + + // Merge contributors with author_dids from record (dedupe) + let mut all_author_dids: HashSet<&str> = contributors.iter().map(|s| s.as_str()).collect(); + for did in &entry_row.author_dids { + all_author_dids.insert(did.as_str()); + } + + // Fetch profiles for all authors + let author_dids_vec: Vec<&str> = all_author_dids.into_iter().collect(); + let profiles = state + .clickhouse + .get_profiles_batch(&author_dids_vec) + .await + .map_err(|e| { + tracing::error!("Failed to fetch profiles: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + + let profile_map: HashMap<&str, &ProfileRow> = + profiles.iter().map(|p| (p.did.as_str(), p)).collect(); + + // Build EntryView - use contributors as the author list (evidence-based) + let entry_view = build_entry_view_with_authors(&entry_row, &contributors, &profile_map)?; + + // Parse the record for the output + let record = parse_record_json(&entry_row.record)?; + + // Actual count of notebooks containing this entry + let notebook_count = notebooks.len() as i64; + + Ok(Json( + ResolveEntryOutput { + entry: entry_view, + notebook_count, + notebooks: None, + record, + extra_data: None, + } + .into_static(), + )) +} + +/// Build an EntryView from an EntryRow with explicit author list (evidence-based contributors) +fn build_entry_view_with_authors( + entry_row: &crate::clickhouse::EntryRow, + author_dids: &[SmolStr], + profile_map: &HashMap<&str, &ProfileRow>, +) -> Result, XrpcErrorResponse> { + let entry_uri = AtUri::new(&entry_row.uri).map_err(|e| { + tracing::error!("Invalid entry URI in db: {}", e); + XrpcErrorResponse::internal_error("Invalid URI stored") + })?; + + let entry_cid = Cid::new(entry_row.cid.as_bytes()).map_err(|e| { + tracing::error!("Invalid entry CID in db: {}", e); + XrpcErrorResponse::internal_error("Invalid CID stored") + })?; + + let authors = hydrate_authors(author_dids, profile_map)?; + let record = parse_record_json(&entry_row.record)?; + + let entry_view = EntryView::new() + .uri(entry_uri.into_static()) + .cid(entry_cid.into_static()) + .authors(authors) + .record(record) + .indexed_at(entry_row.indexed_at.fixed_offset()) + .maybe_title(non_empty_cowstr(&entry_row.title)) + .maybe_path(non_empty_cowstr(&entry_row.path)) + .build(); + + Ok(entry_view) +} + +/// Convert SmolStr to Option if non-empty +fn non_empty_cowstr(s: &smol_str::SmolStr) -> Option> { + if s.is_empty() { + None + } else { + Some(s.to_cowstr().into_static()) + } +} + +/// Parse record JSON string into owned Data +fn parse_record_json(json: &str) -> Result, XrpcErrorResponse> { + let data: Data<'_> = serde_json::from_str(json).map_err(|e| { + tracing::error!("Failed to parse record JSON: {}", e); + XrpcErrorResponse::internal_error("Invalid record JSON stored") + })?; + Ok(data.into_static()) +} + +/// Hydrate author list from DIDs using profile map +fn hydrate_authors( + author_dids: &[SmolStr], + profile_map: &HashMap<&str, &ProfileRow>, +) -> Result>, XrpcErrorResponse> { + let mut authors = Vec::with_capacity(author_dids.len()); + + for (idx, did_str) in author_dids.iter().enumerate() { + let profile_data = if let Some(profile) = profile_map.get(did_str.as_str()) { + profile_to_data_view(profile)? + } else { + // No profile found - create minimal view with just the DID + let did = Did::new(did_str).map_err(|e| { + tracing::error!("Invalid DID in author_dids: {}", e); + XrpcErrorResponse::internal_error("Invalid DID stored") + })?; + + let inner_profile = ProfileView::new() + .did(did.into_static()) + .handle( + Handle::new(did_str) + .unwrap_or_else(|_| Handle::new("unknown.invalid").unwrap()), + ) + .build(); + + ProfileDataView::new() + .inner(ProfileDataViewInner::ProfileView(Box::new(inner_profile))) + .build() + }; + + let author_view = AuthorListView::new() + .index(idx as i64) + .record(profile_data.into_static()) + .build(); + + authors.push(author_view); + } + + Ok(authors) +} + +/// Convert ProfileRow to ProfileDataView +fn profile_to_data_view( + profile: &ProfileRow, +) -> Result, XrpcErrorResponse> { + let did = Did::new(&profile.did).map_err(|e| { + tracing::error!("Invalid DID in profile: {}", e); + XrpcErrorResponse::internal_error("Invalid DID stored") + })?; + + let handle = if profile.handle.is_empty() { + // Use DID as fallback handle (not ideal but functional) + Handle::new(&profile.did).unwrap_or_else(|_| Handle::new("unknown.invalid").unwrap()) + } else { + Handle::new(&profile.handle).map_err(|e| { + tracing::error!("Invalid handle in profile: {}", e); + XrpcErrorResponse::internal_error("Invalid handle stored") + })? + }; + + // Build avatar URL from CID if present + let avatar = if !profile.avatar_cid.is_empty() { + let url = format!( + "https://cdn.bsky.app/img/avatar/plain/{}/{}@jpeg", + profile.did, profile.avatar_cid + ); + Uri::new_owned(url).ok() + } else { + None + }; + + // Build banner URL from CID if present + let banner = if !profile.banner_cid.is_empty() { + let url = format!( + "https://cdn.bsky.app/img/banner/plain/{}/{}@jpeg", + profile.did, profile.banner_cid + ); + Uri::new_owned(url).ok() + } else { + None + }; + + let inner_profile = ProfileView::new() + .did(did.into_static()) + .handle(handle.into_static()) + .maybe_display_name(non_empty_cowstr(&profile.display_name)) + .maybe_description(non_empty_cowstr(&profile.description)) + .maybe_avatar(avatar) + .maybe_banner(banner) + .build(); + + let profile_data = ProfileDataView::new() + .inner(ProfileDataViewInner::ProfileView(Box::new(inner_profile))) + .build(); + + Ok(profile_data) +} diff --git a/crates/weaver-index/src/indexer.rs b/crates/weaver-index/src/indexer.rs index a028480..89f3c0a 100644 --- a/crates/weaver-index/src/indexer.rs +++ b/crates/weaver-index/src/indexer.rs @@ -331,6 +331,7 @@ impl FirehoseIndexer { seq: record.seq as u64, event_time: record.event_time, is_live: true, + validation_state: SmolStr::new_static("unchecked"), }) .await?; } diff --git a/crates/weaver-index/src/parallel_tap.rs b/crates/weaver-index/src/parallel_tap.rs index 974b57c..5ce15df 100644 --- a/crates/weaver-index/src/parallel_tap.rs +++ b/crates/weaver-index/src/parallel_tap.rs @@ -1,11 +1,13 @@ +use std::sync::atomic::{AtomicBool, Ordering}; use std::sync::Arc; use std::time::{Duration, Instant}; use chrono::Utc; -use smol_str::ToSmolStr; +use smol_str::{SmolStr, ToSmolStr}; use tokio::task::JoinHandle; use tracing::{debug, error, info, trace, warn}; +use crate::clickhouse::migrations::Migrator; use crate::clickhouse::{ Client, InserterConfig, RawIdentityEvent, RawRecordInsert, ResilientRecordInserter, }; @@ -25,6 +27,8 @@ pub struct TapIndexer { inserter_config: InserterConfig, config: Arc, num_workers: usize, + /// Tracks whether backfill has been triggered (first live event seen) + backfill_triggered: Arc, } impl TapIndexer { @@ -41,6 +45,7 @@ impl TapIndexer { inserter_config, config: Arc::new(config), num_workers, + backfill_triggered: Arc::new(AtomicBool::new(false)), } } @@ -58,9 +63,18 @@ impl TapIndexer { let tap_config = self.tap_config.clone(); let inserter_config = self.inserter_config.clone(); let config = self.config.clone(); + let backfill_triggered = self.backfill_triggered.clone(); let handle = tokio::spawn(async move { - run_tap_worker(worker_id, client, tap_config, inserter_config, config).await + run_tap_worker( + worker_id, + client, + tap_config, + inserter_config, + config, + backfill_triggered, + ) + .await }); handles.push(handle); @@ -97,6 +111,7 @@ async fn run_tap_worker( tap_config: TapConfig, inserter_config: InserterConfig, config: Arc, + backfill_triggered: Arc, ) -> Result<()> { info!(worker_id, url = %tap_config.url, "tap worker starting"); @@ -206,6 +221,8 @@ async fn run_tap_worker( seq: event_id, event_time: Utc::now(), is_live: record.live, + // records from tap are pre-validated + validation_state: SmolStr::new_static("valid"), }) .await?; records.commit().await?; @@ -214,6 +231,23 @@ async fn run_tap_worker( let _ = ack_tx.send(event_id).await; processed += 1; + + // Trigger backfill on first live event + // compare_exchange ensures only one worker triggers this + if record.live + && backfill_triggered + .compare_exchange(false, true, Ordering::SeqCst, Ordering::SeqCst) + .is_ok() + { + info!( + worker_id, + "first live event received, scheduling backfill" + ); + let backfill_client = client.clone(); + tokio::spawn(async move { + run_backfill(backfill_client).await; + }); + } } TapEvent::Identity(envelope) => { let identity = &envelope.identity; @@ -259,3 +293,44 @@ async fn run_tap_worker( info!(worker_id, processed, "tap worker finished"); Ok(()) } + +/// Run backfill queries for incremental MVs +/// +/// Called once when the first live event is received, indicating historical +/// data load is complete. Waits briefly to let in-flight inserts settle, +/// then runs INSERT queries to populate target tables for incremental MVs. +async fn run_backfill(client: Arc) { + // Wait for in-flight inserts to settle + info!("backfill: waiting 10s for in-flight inserts to settle"); + tokio::time::sleep(Duration::from_secs(10)).await; + + let mvs = Migrator::incremental_mvs(); + if mvs.is_empty() { + info!("backfill: no incremental MVs found, nothing to do"); + return; + } + + info!(count = mvs.len(), "backfill: starting incremental MV backfill"); + + for mv in mvs { + info!( + mv = %mv.name, + table = %mv.target_table, + "backfill: running backfill query" + ); + + let query = mv.backfill_query(); + debug!(query = %query, "backfill query"); + + match client.execute(&query).await { + Ok(()) => { + info!(mv = %mv.name, "backfill: completed successfully"); + } + Err(e) => { + error!(mv = %mv.name, error = ?e, "backfill: query failed"); + } + } + } + + info!("backfill: all incremental MVs processed"); +} diff --git a/crates/weaver-index/src/server.rs b/crates/weaver-index/src/server.rs index 1d56e4a..7c3631b 100644 --- a/crates/weaver-index/src/server.rs +++ b/crates/weaver-index/src/server.rs @@ -5,6 +5,12 @@ use axum::{Json, Router, extract::State, http::StatusCode, response::IntoRespons use jacquard::api::com_atproto::repo::{ get_record::GetRecordRequest, list_records::ListRecordsRequest, }; +use weaver_api::sh_weaver::actor::get_profile::GetProfileRequest; +use weaver_api::sh_weaver::notebook::{ + get_entry::GetEntryRequest, + resolve_entry::ResolveEntryRequest, + resolve_notebook::ResolveNotebookRequest, +}; use jacquard::client::UnauthenticatedSession; use jacquard::identity::JacquardResolver; use jacquard_axum::IntoRouter; @@ -14,7 +20,7 @@ use tracing::info; use crate::clickhouse::Client; use crate::config::ShardConfig; -use crate::endpoints::repo; +use crate::endpoints::{actor, notebook, repo}; use crate::error::{IndexError, ServerError}; use crate::sqlite::ShardRouter; @@ -49,6 +55,12 @@ pub fn router(state: AppState) -> Router { // com.atproto.repo.* endpoints (record cache) .merge(GetRecordRequest::into_router(repo::get_record)) .merge(ListRecordsRequest::into_router(repo::list_records)) + // sh.weaver.actor.* endpoints + .merge(GetProfileRequest::into_router(actor::get_profile)) + // sh.weaver.notebook.* endpoints + .merge(ResolveNotebookRequest::into_router(notebook::resolve_notebook)) + .merge(GetEntryRequest::into_router(notebook::get_entry)) + .merge(ResolveEntryRequest::into_router(notebook::resolve_entry)) .layer(TraceLayer::new_for_http()) .with_state(state) } diff --git a/lexicons/notebook/getBookEntry.json b/lexicons/notebook/getBookEntry.json new file mode 100644 index 0000000..1a23928 --- /dev/null +++ b/lexicons/notebook/getBookEntry.json @@ -0,0 +1,35 @@ +{ + "lexicon": 1, + "id": "sh.weaver.notebook.getBookEntry", + "defs": { + "main": { + "type": "query", + "description": "Get an entry view by notebook URI and index, including prev/next navigation within the book.", + "parameters": { + "type": "params", + "required": ["notebook"], + "properties": { + "notebook": { + "type": "string", + "format": "at-uri", + "description": "AT-URI of the notebook containing the entry." + }, + "index": { + "type": "integer", + "minimum": 0, + "default": 0, + "description": "Zero-based index of the entry in the notebook's entry list." + } + } + }, + "output": { + "encoding": "application/json", + "schema": { + "type": "ref", + "ref": "sh.weaver.notebook.defs#bookEntryView" + } + }, + "errors": [{ "name": "NotebookNotFound" }, { "name": "EntryNotFound" }] + } + } +} diff --git a/lexicons/notebook/getEntry.json b/lexicons/notebook/getEntry.json index 68debd5..6d68044 100644 --- a/lexicons/notebook/getEntry.json +++ b/lexicons/notebook/getEntry.json @@ -4,21 +4,15 @@ "defs": { "main": { "type": "query", - "description": "Get an entry view by notebook URI and index, including prev/next navigation.", + "description": "Get an entry view by its AT-URI.", "parameters": { "type": "params", - "required": ["notebook"], + "required": ["uri"], "properties": { - "notebook": { + "uri": { "type": "string", "format": "at-uri", - "description": "AT-URI of the notebook containing the entry." - }, - "index": { - "type": "integer", - "minimum": 0, - "default": 0, - "description": "Zero-based index of the entry in the notebook's entry list." + "description": "AT-URI of the entry to fetch." } } }, @@ -26,10 +20,10 @@ "encoding": "application/json", "schema": { "type": "ref", - "ref": "sh.weaver.notebook.defs#bookEntryView" + "ref": "sh.weaver.notebook.defs#entryView" } }, - "errors": [{ "name": "NotebookNotFound" }, { "name": "EntryNotFound" }] + "errors": [{ "name": "EntryNotFound" }] } } } diff --git a/scripts/test-indexer.sh b/scripts/test-indexer.sh new file mode 100755 index 0000000..65c4320 --- /dev/null +++ b/scripts/test-indexer.sh @@ -0,0 +1,126 @@ +#!/usr/bin/env bash +# Test scripts for weaver-index XRPC endpoints + +set -euo pipefail + +BASE_URL="${INDEXER_URL:-http://localhost:3000}" +DID="did:plc:yfvwmnlztr4dwkb7hwz55r2g" + +# Colors for output +RED='\033[0;31m' +GREEN='\033[0;32m' +BLUE='\033[0;34m' +NC='\033[0m' # No Color + +info() { echo -e "${BLUE}==>${NC} $1"; } +success() { echo -e "${GREEN}✓${NC} $1"; } +error() { echo -e "${RED}✗${NC} $1"; } + +# Health check +test_health() { + info "Testing health endpoint..." + curl -s "${BASE_URL}/xrpc/_health" | jq . +} + +# Get profile +test_get_profile() { + info "Testing sh.weaver.actor.getProfile..." + curl -s "${BASE_URL}/xrpc/sh.weaver.actor.getProfile?actor=${DID}" | jq . +} + +# Resolve notebook +test_resolve_notebook() { + local name="${1:-weaver}" + info "Testing sh.weaver.notebook.resolveNotebook (name=${name})..." + curl -s "${BASE_URL}/xrpc/sh.weaver.notebook.resolveNotebook?actor=${DID}&name=${name}" | jq . +} + +# Get entry by URI +test_get_entry() { + local rkey="${1:-3m7tg3ni77tqx}" + local uri="at://${DID}/sh.weaver.notebook.entry/${rkey}" + info "Testing sh.weaver.notebook.getEntry (rkey=${rkey})..." + curl -s "${BASE_URL}/xrpc/sh.weaver.notebook.getEntry?uri=$(urlencode "${uri}")" | jq . +} + +# Resolve entry by name +test_resolve_entry() { + local notebook="${1:-weaver}" + local entry="${2:-drafts_privacy}" + info "Testing sh.weaver.notebook.resolveEntry (notebook=${notebook}, entry=${entry})..." + curl -s "${BASE_URL}/xrpc/sh.weaver.notebook.resolveEntry?actor=${DID}¬ebook=${notebook}&entry=${entry}" | jq . +} + +# URL encode helper +urlencode() { + python3 -c "import urllib.parse; print(urllib.parse.quote('$1', safe=''))" +} + +# Test all entry rkeys +test_all_entries() { + local rkeys=( + "3m7tg3ni77tqx" + "3m7gtl3v4t3kn" + "3m7ekja42a32v" + "3m746pdxlldfq" + "3m6wvayeoqdx4" + "3m6ug3zrwb22v" + "3m6sy3qur622v" + "3m6mnvrkoeq2v" + "3m5mepkowvy2a" + "3m4rbphjzt62b" + "3m4oy5go4742b" + "3m4okwb7wp42b" + "3m4ojkfioom2b" + ) + + for rkey in "${rkeys[@]}"; do + test_get_entry "$rkey" + echo + done +} + +# Run all tests +test_all() { + test_health + echo + test_get_profile + echo + test_resolve_notebook "weaver" + echo + test_resolve_entry "weaver" "drafts_privacy" + echo + test_get_entry "3m7tg3ni77tqx" +} + +# Main +case "${1:-all}" in + health) + test_health + ;; + profile) + test_get_profile + ;; + notebook) + test_resolve_notebook "${2:-weaver}" + ;; + entry) + test_get_entry "${2:-3m7tg3ni77tqx}" + ;; + resolve) + test_resolve_entry "${2:-weaver}" "${3:-drafts_privacy}" + ;; + entries) + test_all_entries + ;; + all) + test_all + ;; + *) + echo "Usage: $0 {health|profile|notebook [name]|entry [rkey]|resolve [notebook] [entry]|entries|all}" + echo + echo "Environment:" + echo " INDEXER_URL Base URL (default: http://localhost:3000)" + exit 1 + ;; +esac -- 2.51.2