diff --git a/crates/weaver-api/lexicons/sh_weaver_domain_generateDocument.json b/crates/weaver-api/lexicons/sh_weaver_domain_generateDocument.json index 2e1ed72..d06c4a8 100644 --- a/crates/weaver-api/lexicons/sh_weaver_domain_generateDocument.json +++ b/crates/weaver-api/lexicons/sh_weaver_domain_generateDocument.json @@ -9,8 +9,7 @@ "type": "params", "required": [ "entry", - "publication", - "path" + "publication" ], "properties": { "entry": { @@ -24,7 +23,7 @@ }, "path": { "type": "string", - "description": "URL path for the document." + "description": "URL path for the document. Defaults to entry's path if not provided." }, "publication": { "type": "string", diff --git a/crates/weaver-api/src/app_bsky/actor.rs b/crates/weaver-api/src/app_bsky/actor.rs index 1d3d675..94dbecc 100644 --- a/crates/weaver-api/src/app_bsky/actor.rs +++ b/crates/weaver-api/src/app_bsky/actor.rs @@ -5007,37 +5007,37 @@ pub mod profile_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Handle; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Handle = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Handle = S::Handle; + type Did = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type Did = S::Did; type Handle = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Handle = S::Handle; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `handle` field pub struct handle(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -5362,8 +5362,8 @@ impl<'a, S: profile_view_state::State> ProfileViewBuilder<'a, S> { impl<'a, S> ProfileViewBuilder<'a, S> where S: profile_view_state::State, - S::Did: profile_view_state::IsSet, S::Handle: profile_view_state::IsSet, + S::Did: profile_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileView<'a> { @@ -6040,37 +6040,37 @@ pub mod profile_view_detailed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Did; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Did = Unset; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = S::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Did = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -6524,8 +6524,8 @@ impl<'a, S: profile_view_detailed_state::State> ProfileViewDetailedBuilder<'a, S impl<'a, S> ProfileViewDetailedBuilder<'a, S> where S: profile_view_detailed_state::State, - S::Handle: profile_view_detailed_state::IsSet, S::Did: profile_view_detailed_state::IsSet, + S::Handle: profile_view_detailed_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewDetailed<'a> { @@ -6697,67 +6697,67 @@ pub mod saved_feed_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Value; type Id; - type Pinned; type Type; + type Value; + type Pinned; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Value = Unset; type Id = Unset; - type Pinned = Unset; type Type = Unset; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Value = Set; - type Id = S::Id; - type Pinned = S::Pinned; - type Type = S::Type; + type Value = Unset; + type Pinned = Unset; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type Value = S::Value; type Id = Set; - type Pinned = S::Pinned; type Type = S::Type; - } - ///State transition - sets the `pinned` field to Set - pub struct SetPinned(PhantomData S>); - impl sealed::Sealed for SetPinned {} - impl State for SetPinned { type Value = S::Value; - type Id = S::Id; - type Pinned = Set; - type Type = S::Type; + type Pinned = S::Pinned; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { + type Id = S::Id; + type Type = Set; type Value = S::Value; + type Pinned = S::Pinned; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { type Id = S::Id; + type Type = S::Type; + type Value = Set; type Pinned = S::Pinned; - type Type = Set; + } + ///State transition - sets the `pinned` field to Set + pub struct SetPinned(PhantomData S>); + impl sealed::Sealed for SetPinned {} + impl State for SetPinned { + type Id = S::Id; + type Type = S::Type; + type Value = S::Value; + type Pinned = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `pinned` field - pub struct pinned(()); ///Marker type for the `type` field pub struct r#type(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `pinned` field + pub struct pinned(()); } } @@ -6870,10 +6870,10 @@ where impl<'a, S> SavedFeedBuilder<'a, S> where S: saved_feed_state::State, - S::Value: saved_feed_state::IsSet, S::Id: saved_feed_state::IsSet, - S::Pinned: saved_feed_state::IsSet, S::Type: saved_feed_state::IsSet, + S::Value: saved_feed_state::IsSet, + S::Pinned: saved_feed_state::IsSet, { /// Build the final struct pub fn build(self) -> SavedFeed<'a> { @@ -7884,51 +7884,51 @@ pub mod verification_state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Verifications; type VerifiedStatus; type TrustedVerifierStatus; + type Verifications; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Verifications = Unset; type VerifiedStatus = Unset; type TrustedVerifierStatus = Unset; - } - ///State transition - sets the `verifications` field to Set - pub struct SetVerifications(PhantomData S>); - impl sealed::Sealed for SetVerifications {} - impl State for SetVerifications { - type Verifications = Set; - type VerifiedStatus = S::VerifiedStatus; - type TrustedVerifierStatus = S::TrustedVerifierStatus; + type Verifications = Unset; } ///State transition - sets the `verified_status` field to Set pub struct SetVerifiedStatus(PhantomData S>); impl sealed::Sealed for SetVerifiedStatus {} impl State for SetVerifiedStatus { - type Verifications = S::Verifications; type VerifiedStatus = Set; type TrustedVerifierStatus = S::TrustedVerifierStatus; + type Verifications = S::Verifications; } ///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 Verifications = S::Verifications; + } + ///State transition - sets the `verifications` field to Set + pub struct SetVerifications(PhantomData S>); + impl sealed::Sealed for SetVerifications {} + impl State for SetVerifications { + type VerifiedStatus = S::VerifiedStatus; + type TrustedVerifierStatus = S::TrustedVerifierStatus; + type Verifications = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///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(()); + ///Marker type for the `verifications` field + pub struct verifications(()); } } @@ -8024,9 +8024,9 @@ where impl<'a, S> VerificationStateBuilder<'a, S> where S: verification_state_state::State, - S::Verifications: verification_state_state::IsSet, S::VerifiedStatus: verification_state_state::IsSet, S::TrustedVerifierStatus: verification_state_state::IsSet, + S::Verifications: verification_state_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationState<'a> { @@ -8310,67 +8310,67 @@ pub mod verification_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type CreatedAt; - type IsValid; type Issuer; + type Uri; + type IsValid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type CreatedAt = Unset; - type IsValid = Unset; type Issuer = 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 CreatedAt = S::CreatedAt; - type IsValid = S::IsValid; - type Issuer = S::Issuer; + type Uri = Unset; + type IsValid = 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 Uri = S::Uri; type CreatedAt = 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 Uri = S::Uri; - type CreatedAt = S::CreatedAt; - type IsValid = Set; - type Issuer = S::Issuer; + type IsValid = S::IsValid; } ///State transition - sets the `issuer` field to Set pub struct SetIssuer(PhantomData S>); impl sealed::Sealed for SetIssuer {} impl State for SetIssuer { + type CreatedAt = S::CreatedAt; + type Issuer = Set; type Uri = S::Uri; + type IsValid = S::IsValid; + } + ///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 = Set; + } + ///State transition - sets the `is_valid` field to Set + pub struct SetIsValid(PhantomData S>); + impl sealed::Sealed for SetIsValid {} + impl State for SetIsValid { + type CreatedAt = S::CreatedAt; + type Issuer = S::Issuer; + type Uri = S::Uri; + type IsValid = 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 `created_at` field pub struct created_at(()); - ///Marker type for the `is_valid` field - pub struct is_valid(()); ///Marker type for the `issuer` field pub struct issuer(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `is_valid` field + pub struct is_valid(()); } } @@ -8483,10 +8483,10 @@ where impl<'a, S> VerificationViewBuilder<'a, S> where S: verification_view_state::State, - S::Uri: verification_view_state::IsSet, S::CreatedAt: verification_view_state::IsSet, - S::IsValid: verification_view_state::IsSet, S::Issuer: verification_view_state::IsSet, + S::Uri: verification_view_state::IsSet, + S::IsValid: verification_view_state::IsSet, { /// Build the final struct pub fn build(self) -> VerificationView<'a> { diff --git a/crates/weaver-api/src/app_bsky/ageassurance.rs b/crates/weaver-api/src/app_bsky/ageassurance.rs index e4b5e27..1ef4386 100644 --- a/crates/weaver-api/src/app_bsky/ageassurance.rs +++ b/crates/weaver-api/src/app_bsky/ageassurance.rs @@ -1700,37 +1700,37 @@ pub mod config_region_rule_if_account_older_than_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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(()); } } @@ -1820,8 +1820,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> { @@ -1894,37 +1894,37 @@ pub mod config_region_rule_if_assured_over_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = S::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData S>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = S::Access; type Age = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = S::Age; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `age` field pub struct age(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -2014,8 +2014,8 @@ where impl<'a, S> ConfigRegionRuleIfAssuredOverAgeBuilder<'a, S> where S: config_region_rule_if_assured_over_age_state::State, - S::Access: config_region_rule_if_assured_over_age_state::IsSet, S::Age: config_region_rule_if_assured_over_age_state::IsSet, + S::Access: config_region_rule_if_assured_over_age_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAssuredOverAge<'a> { @@ -2088,37 +2088,37 @@ pub mod config_region_rule_if_assured_under_age_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Age; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Age = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Age = S::Age; + type Access = Unset; } ///State transition - sets the `age` field to Set pub struct SetAge(PhantomData S>); impl sealed::Sealed for SetAge {} impl State for SetAge { - type Access = S::Access; type Age = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Age = S::Age; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `age` field pub struct age(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -2208,8 +2208,8 @@ where impl<'a, S> ConfigRegionRuleIfAssuredUnderAgeBuilder<'a, S> where S: config_region_rule_if_assured_under_age_state::State, - S::Access: config_region_rule_if_assured_under_age_state::IsSet, S::Age: config_region_rule_if_assured_under_age_state::IsSet, + S::Access: config_region_rule_if_assured_under_age_state::IsSet, { /// Build the final struct pub fn build(self) -> ConfigRegionRuleIfAssuredUnderAge<'a> { @@ -2704,85 +2704,85 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type AttemptId; type Status; - type CreatedAt; type CountryCode; + type Access; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type AttemptId = Unset; type Status = Unset; - type CreatedAt = Unset; type CountryCode = 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 AttemptId = S::AttemptId; - type Status = S::Status; - type CreatedAt = S::CreatedAt; - type CountryCode = S::CountryCode; + type Access = Unset; + type CreatedAt = Unset; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type Access = S::Access; type AttemptId = Set; type Status = S::Status; - type CreatedAt = S::CreatedAt; type CountryCode = S::CountryCode; + type Access = S::Access; + 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 Access = S::Access; type AttemptId = S::AttemptId; type Status = Set; - type CreatedAt = S::CreatedAt; type CountryCode = S::CountryCode; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Access = S::Access; - type AttemptId = S::AttemptId; - type Status = S::Status; - type CreatedAt = Set; - type CountryCode = S::CountryCode; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `country_code` field to Set pub struct SetCountryCode(PhantomData S>); impl sealed::Sealed for SetCountryCode {} impl State for SetCountryCode { + type AttemptId = S::AttemptId; + type Status = S::Status; + type CountryCode = Set; type Access = S::Access; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { type AttemptId = S::AttemptId; type Status = S::Status; + type CountryCode = S::CountryCode; + type Access = Set; type CreatedAt = S::CreatedAt; - type CountryCode = 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 AttemptId = S::AttemptId; + type Status = S::Status; + type CountryCode = S::CountryCode; + type Access = S::Access; + type CreatedAt = 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 `attempt_id` field pub struct attempt_id(()); ///Marker type for the `status` field pub struct status(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `country_code` field pub struct country_code(()); + ///Marker type for the `access` field + pub struct access(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -3038,11 +3038,11 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::Access: event_state::IsSet, S::AttemptId: event_state::IsSet, S::Status: event_state::IsSet, - S::CreatedAt: event_state::IsSet, S::CountryCode: event_state::IsSet, + S::Access: event_state::IsSet, + S::CreatedAt: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -3333,37 +3333,37 @@ pub mod state_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Access; type Status; + type Access; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Access = Unset; type Status = Unset; - } - ///State transition - sets the `access` field to Set - pub struct SetAccess(PhantomData S>); - impl sealed::Sealed for SetAccess {} - impl State for SetAccess { - type Access = Set; - type Status = S::Status; + type Access = Unset; } ///State transition - sets the `status` field to Set pub struct SetStatus(PhantomData S>); impl sealed::Sealed for SetStatus {} impl State for SetStatus { - type Access = S::Access; type Status = Set; + type Access = S::Access; + } + ///State transition - sets the `access` field to Set + pub struct SetAccess(PhantomData S>); + impl sealed::Sealed for SetAccess {} + impl State for SetAccess { + type Status = S::Status; + type Access = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `access` field - pub struct access(()); ///Marker type for the `status` field pub struct status(()); + ///Marker type for the `access` field + pub struct access(()); } } @@ -3456,8 +3456,8 @@ where impl<'a, S> StateBuilder<'a, S> where S: state_state::State, - S::Access: state_state::IsSet, S::Status: state_state::IsSet, + S::Access: state_state::IsSet, { /// Build the final struct pub fn build(self) -> State<'a> { diff --git a/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs b/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs index 6cdf6a4..f592179 100644 --- a/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs +++ b/crates/weaver-api/src/app_bsky/bookmark/create_bookmark.rs @@ -33,37 +33,37 @@ pub mod create_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Uri; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Uri = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Uri = S::Uri; + type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = S::Cid; type Uri = Set; + type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> CreateBookmarkBuilder<'a, S> where S: create_bookmark_state::State, - S::Cid: create_bookmark_state::IsSet, S::Uri: create_bookmark_state::IsSet, + S::Cid: create_bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateBookmark<'a> { diff --git a/crates/weaver-api/src/app_bsky/embed/external.rs b/crates/weaver-api/src/app_bsky/embed/external.rs index f4f4e41..b372394 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 Description; - type Uri; type Title; + type Uri; + type Description; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; - type Uri = Unset; type Title = Unset; + type Uri = Unset; + type Description = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; type Uri = S::Uri; - type Title = S::Title; + type Description = S::Description; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Description = S::Description; - type Uri = Set; type Title = S::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { + type Uri = Set; type Description = S::Description; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData S>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Title = S::Title; type Uri = S::Uri; - type Title = Set; + type Description = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalBuilder<'a, S> where S: external_state::State, - S::Description: external_state::IsSet, - S::Uri: external_state::IsSet, S::Title: external_state::IsSet, + S::Uri: external_state::IsSet, + S::Description: 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 Description; type Uri; + type Description; type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Description = Unset; type Uri = Unset; + type Description = Unset; type Title = Unset; } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Description = Set; - type Uri = S::Uri; - type Title = S::Title; - } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Description = S::Description; type Uri = Set; + type Description = S::Description; + type Title = S::Title; + } + ///State transition - sets the `description` field to Set + pub struct SetDescription(PhantomData S>); + impl sealed::Sealed for SetDescription {} + impl State for SetDescription { + type Uri = S::Uri; + type Description = Set; type Title = S::Title; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = S::Description; type Uri = S::Uri; + type Description = S::Description; type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `description` field - pub struct description(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `description` field + pub struct description(()); ///Marker type for the `title` field pub struct title(()); } @@ -941,8 +941,8 @@ where impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, - S::Description: view_external_state::IsSet, S::Uri: view_external_state::IsSet, + S::Description: view_external_state::IsSet, S::Title: view_external_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/embed/images.rs b/crates/weaver-api/src/app_bsky/embed/images.rs index 609cd26..0559b33 100644 --- a/crates/weaver-api/src/app_bsky/embed/images.rs +++ b/crates/weaver-api/src/app_bsky/embed/images.rs @@ -37,37 +37,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Alt; type Image; + type Alt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Alt = Unset; type Image = Unset; - } - ///State transition - sets the `alt` field to Set - pub struct SetAlt(PhantomData S>); - impl sealed::Sealed for SetAlt {} - impl State for SetAlt { - type Alt = Set; - type Image = S::Image; + type Alt = Unset; } ///State transition - sets the `image` field to Set pub struct SetImage(PhantomData S>); impl sealed::Sealed for SetImage {} impl State for SetImage { - type Alt = S::Alt; type Image = Set; + type Alt = S::Alt; + } + ///State transition - sets the `alt` field to Set + pub struct SetAlt(PhantomData S>); + impl sealed::Sealed for SetAlt {} + impl State for SetAlt { + type Image = S::Image; + type Alt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `alt` field - pub struct alt(()); ///Marker type for the `image` field pub struct image(()); + ///Marker type for the `alt` field + pub struct alt(()); } } @@ -160,8 +160,8 @@ where impl<'a, S> ImageBuilder<'a, S> where S: image_state::State, - S::Alt: image_state::IsSet, S::Image: image_state::IsSet, + S::Alt: image_state::IsSet, { /// Build the final struct pub fn build(self) -> Image<'a> { @@ -760,49 +760,49 @@ pub mod view_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Fullsize; type Thumb; + type Fullsize; type Alt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Fullsize = Unset; type Thumb = Unset; + type Fullsize = Unset; type Alt = Unset; } - ///State transition - sets the `fullsize` field to Set - pub struct SetFullsize(PhantomData S>); - impl sealed::Sealed for SetFullsize {} - impl State for SetFullsize { - type Fullsize = Set; - type Thumb = S::Thumb; - type Alt = S::Alt; - } ///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 Thumb = Set; + type Fullsize = S::Fullsize; + type Alt = S::Alt; + } + ///State transition - sets the `fullsize` field to Set + pub struct SetFullsize(PhantomData S>); + impl sealed::Sealed for SetFullsize {} + impl State for SetFullsize { + type Thumb = S::Thumb; + type Fullsize = Set; type Alt = S::Alt; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Fullsize = S::Fullsize; type Thumb = S::Thumb; + type Fullsize = S::Fullsize; type Alt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `fullsize` field - pub struct fullsize(()); ///Marker type for the `thumb` field pub struct thumb(()); + ///Marker type for the `fullsize` field + pub struct fullsize(()); ///Marker type for the `alt` field pub struct alt(()); } @@ -917,8 +917,8 @@ where impl<'a, S> ViewImageBuilder<'a, S> where S: view_image_state::State, - S::Fullsize: view_image_state::IsSet, S::Thumb: view_image_state::IsSet, + S::Fullsize: view_image_state::IsSet, S::Alt: view_image_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/embed/record.rs b/crates/weaver-api/src/app_bsky/embed/record.rs index 72d98c2..133b9c6 100644 --- a/crates/weaver-api/src/app_bsky/embed/record.rs +++ b/crates/weaver-api/src/app_bsky/embed/record.rs @@ -723,51 +723,51 @@ pub mod view_blocked_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Author; 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 Author = 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; + ///State transition - sets the `blocked` field to Set + pub struct SetBlocked(PhantomData S>); + impl sealed::Sealed for SetBlocked {} + impl State for SetBlocked { + type Blocked = Set; type Author = S::Author; - type Blocked = S::Blocked; + 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 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 = Set; type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Blocked = S::Blocked; type Author = S::Author; - type Blocked = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `author` field - pub struct author(()); ///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(()); } } @@ -860,9 +860,9 @@ where impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, - S::Uri: view_blocked_state::IsSet, - S::Author: view_blocked_state::IsSet, S::Blocked: view_blocked_state::IsSet, + S::Author: view_blocked_state::IsSet, + S::Uri: view_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewBlocked<'a> { @@ -1108,37 +1108,37 @@ pub mod view_not_found_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type NotFound; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type NotFound = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = S::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = S::Uri; type NotFound = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = S::NotFound; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `not_found` field pub struct not_found(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1211,8 +1211,8 @@ where impl<'a, S> ViewNotFoundBuilder<'a, S> where S: view_not_found_state::State, - S::Uri: view_not_found_state::IsSet, S::NotFound: view_not_found_state::IsSet, + S::Uri: view_not_found_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewNotFound<'a> { @@ -1304,9 +1304,9 @@ pub mod view_record_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Value; - type Uri; type IndexedAt; type Author; + type Uri; type Cid; } /// Empty state - all required fields are unset @@ -1314,9 +1314,9 @@ pub mod view_record_state { impl sealed::Sealed for Empty {} impl State for Empty { type Value = Unset; - type Uri = Unset; type IndexedAt = Unset; type Author = Unset; + type Uri = Unset; type Cid = Unset; } ///State transition - sets the `value` field to Set @@ -1324,19 +1324,9 @@ pub mod view_record_state { impl sealed::Sealed for SetValue {} impl State for SetValue { type Value = Set; - type Uri = S::Uri; - type IndexedAt = S::IndexedAt; - type Author = S::Author; - type Cid = S::Cid; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Value = S::Value; - type Uri = Set; type IndexedAt = S::IndexedAt; type Author = S::Author; + type Uri = S::Uri; type Cid = S::Cid; } ///State transition - sets the `indexed_at` field to Set @@ -1344,9 +1334,9 @@ pub mod view_record_state { impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type Value = S::Value; - type Uri = S::Uri; type IndexedAt = Set; type Author = S::Author; + type Uri = S::Uri; type Cid = S::Cid; } ///State transition - sets the `author` field to Set @@ -1354,9 +1344,19 @@ pub mod view_record_state { impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { type Value = S::Value; - type Uri = S::Uri; type IndexedAt = S::IndexedAt; type Author = 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 IndexedAt = S::IndexedAt; + type Author = S::Author; + type Uri = Set; type Cid = S::Cid; } ///State transition - sets the `cid` field to Set @@ -1364,9 +1364,9 @@ pub mod view_record_state { impl sealed::Sealed for SetCid {} impl State for SetCid { type Value = S::Value; - type Uri = S::Uri; type IndexedAt = S::IndexedAt; type Author = S::Author; + type Uri = S::Uri; type Cid = Set; } /// Marker types for field names @@ -1374,12 +1374,12 @@ pub mod view_record_state { pub mod members { ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -1620,9 +1620,9 @@ impl<'a, S> ViewRecordBuilder<'a, S> where S: view_record_state::State, S::Value: view_record_state::IsSet, - S::Uri: view_record_state::IsSet, S::IndexedAt: view_record_state::IsSet, S::Author: view_record_state::IsSet, + S::Uri: view_record_state::IsSet, S::Cid: view_record_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/embed/record_with_media.rs b/crates/weaver-api/src/app_bsky/embed/record_with_media.rs index e530d9e..6f6f492 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 @@ -322,37 +322,37 @@ pub mod view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; type Media; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; type Media = Unset; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - type Media = S::Media; + type Record = Unset; } ///State transition - sets the `media` field to Set pub struct SetMedia(PhantomData S>); impl sealed::Sealed for SetMedia {} impl State for SetMedia { - type Record = S::Record; type Media = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Media = S::Media; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `media` field pub struct media(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -425,8 +425,8 @@ where impl<'a, S> ViewBuilder<'a, S> where S: view_state::State, - S::Record: view_state::IsSet, S::Media: view_state::IsSet, + S::Record: view_state::IsSet, { /// Build the final struct pub fn build(self) -> View<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed.rs b/crates/weaver-api/src/app_bsky/feed.rs index 1e650df..fd528b0 100644 --- a/crates/weaver-api/src/app_bsky/feed.rs +++ b/crates/weaver-api/src/app_bsky/feed.rs @@ -1609,51 +1609,51 @@ pub mod blocked_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; type Uri; type Blocked; + type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; type Uri = Unset; type Blocked = Unset; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type Uri = S::Uri; - type Blocked = S::Blocked; + type Author = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Author = S::Author; type Uri = Set; type Blocked = S::Blocked; + type Author = S::Author; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Author = S::Author; type Uri = S::Uri; type Blocked = Set; + type Author = S::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type Uri = S::Uri; + type Blocked = S::Blocked; + type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `blocked` field pub struct blocked(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -1746,9 +1746,9 @@ where impl<'a, S> BlockedPostBuilder<'a, S> where S: blocked_post_state::State, - S::Author: blocked_post_state::IsSet, S::Uri: blocked_post_state::IsSet, S::Blocked: blocked_post_state::IsSet, + S::Author: blocked_post_state::IsSet, { /// Build the final struct pub fn build(self) -> BlockedPost<'a> { @@ -2234,105 +2234,105 @@ pub mod generator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Creator; type DisplayName; - type Cid; type IndexedAt; type Did; + type Creator; + 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 Creator = Unset; type DisplayName = Unset; - type Cid = Unset; type IndexedAt = Unset; type Did = Unset; + type Creator = Unset; + type Cid = Unset; + type Uri = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type DisplayName = Set; + type IndexedAt = S::IndexedAt; + type Did = S::Did; type Creator = S::Creator; + type Cid = S::Cid; + 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 DisplayName = S::DisplayName; + type IndexedAt = Set; + type Did = S::Did; + type Creator = S::Creator; type Cid = S::Cid; + type Uri = S::Uri; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type DisplayName = S::DisplayName; type IndexedAt = S::IndexedAt; - type Did = S::Did; + type Did = Set; + type Creator = S::Creator; + type Cid = S::Cid; + type Uri = S::Uri; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Uri = S::Uri; - type Creator = Set; type DisplayName = S::DisplayName; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; type Did = S::Did; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type Uri = S::Uri; - type Creator = S::Creator; - type DisplayName = Set; + type Creator = Set; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Did = S::Did; + 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 Creator = S::Creator; type DisplayName = S::DisplayName; - type Cid = Set; type IndexedAt = S::IndexedAt; type Did = S::Did; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Uri = S::Uri; type Creator = S::Creator; + 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 DisplayName = S::DisplayName; - type Cid = S::Cid; - type IndexedAt = Set; + type IndexedAt = S::IndexedAt; 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 Uri = S::Uri; type Creator = S::Creator; - type DisplayName = S::DisplayName; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Did = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `display_name` field pub struct display_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 `did` field pub struct did(()); + ///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(()); } } @@ -2648,12 +2648,12 @@ impl<'a, S: generator_view_state::State> GeneratorViewBuilder<'a, S> { impl<'a, S> GeneratorViewBuilder<'a, S> where S: generator_view_state::State, - S::Uri: generator_view_state::IsSet, - S::Creator: generator_view_state::IsSet, S::DisplayName: generator_view_state::IsSet, - S::Cid: generator_view_state::IsSet, S::IndexedAt: generator_view_state::IsSet, S::Did: generator_view_state::IsSet, + S::Creator: generator_view_state::IsSet, + S::Cid: generator_view_state::IsSet, + S::Uri: generator_view_state::IsSet, { /// Build the final struct pub fn build(self) -> GeneratorView<'a> { @@ -3441,85 +3441,85 @@ pub mod post_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Record; type IndexedAt; - type Author; + type Uri; type Cid; + type Author; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Record = Unset; type IndexedAt = Unset; - type Author = Unset; + type Uri = Unset; type Cid = Unset; + type Author = Unset; + type Record = Unset; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type Uri = S::Uri; + type Cid = S::Cid; + type Author = S::Author; + 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 Uri = Set; - type Record = S::Record; type IndexedAt = S::IndexedAt; - type Author = S::Author; + type Uri = Set; 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 IndexedAt = S::IndexedAt; type Author = S::Author; - type Cid = S::Cid; + type Record = S::Record; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Record = S::Record; - type IndexedAt = Set; + type Cid = Set; type Author = S::Author; - type Cid = S::Cid; + type Record = S::Record; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = S::Uri; - type Record = S::Record; type IndexedAt = S::IndexedAt; - type Author = Set; - type Cid = S::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Uri = S::Uri; + type Cid = S::Cid; + type Author = Set; type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { type IndexedAt = S::IndexedAt; + type Uri = S::Uri; + type Cid = S::Cid; type Author = S::Author; - type Cid = Set; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `author` field - pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `author` field + pub struct author(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -3832,11 +3832,11 @@ impl<'a, S: post_view_state::State> PostViewBuilder<'a, S> { impl<'a, S> PostViewBuilder<'a, S> where S: post_view_state::State, - S::Uri: post_view_state::IsSet, - S::Record: post_view_state::IsSet, S::IndexedAt: post_view_state::IsSet, - S::Author: post_view_state::IsSet, + S::Uri: post_view_state::IsSet, S::Cid: post_view_state::IsSet, + S::Author: post_view_state::IsSet, + S::Record: post_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PostView<'a> { @@ -3993,37 +3993,37 @@ pub mod reason_repost_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(()); } } @@ -4136,8 +4136,8 @@ impl<'a, S: reason_repost_state::State> ReasonRepostBuilder<'a, S> { impl<'a, S> ReasonRepostBuilder<'a, S> where S: reason_repost_state::State, - S::IndexedAt: reason_repost_state::IsSet, S::By: reason_repost_state::IsSet, + S::IndexedAt: reason_repost_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonRepost<'a> { @@ -4218,37 +4218,37 @@ pub mod reply_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Parent; type Root; + type Parent; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Parent = Unset; type Root = Unset; - } - ///State transition - sets the `parent` field to Set - pub struct SetParent(PhantomData S>); - impl sealed::Sealed for SetParent {} - impl State for SetParent { - type Parent = Set; - type Root = S::Root; + 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 Parent = S::Parent; type Root = Set; + type Parent = S::Parent; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `parent` field - pub struct parent(()); ///Marker type for the `root` field pub struct root(()); + ///Marker type for the `parent` field + pub struct parent(()); } } @@ -4341,8 +4341,8 @@ where impl<'a, S> ReplyRefBuilder<'a, S> where S: reply_ref_state::State, - S::Parent: reply_ref_state::IsSet, S::Root: reply_ref_state::IsSet, + S::Parent: 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 ff24181..60b7b3d 100644 --- a/crates/weaver-api/src/app_bsky/feed/generator.rs +++ b/crates/weaver-api/src/app_bsky/feed/generator.rs @@ -57,50 +57,50 @@ pub mod generator_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type DisplayName; type Did; + type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type DisplayName = Unset; type Did = Unset; + type DisplayName = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type CreatedAt = Set; - type DisplayName = S::DisplayName; - type Did = S::Did; - } - ///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 Did = S::Did; + type DisplayName = S::DisplayName; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type CreatedAt = S::CreatedAt; - type DisplayName = S::DisplayName; type Did = Set; + type DisplayName = S::DisplayName; + } + ///State transition - sets the `display_name` field to Set + pub struct SetDisplayName(PhantomData S>); + impl sealed::Sealed for SetDisplayName {} + impl State for SetDisplayName { + type CreatedAt = S::CreatedAt; + type Did = S::Did; + type DisplayName = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `display_name` field + pub struct display_name(()); } } @@ -318,8 +318,8 @@ impl<'a, S> GeneratorBuilder<'a, S> where S: generator_state::State, S::CreatedAt: generator_state::IsSet, - S::DisplayName: generator_state::IsSet, S::Did: generator_state::IsSet, + S::DisplayName: 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 eaa643f..19b72bf 100644 --- a/crates/weaver-api/src/app_bsky/feed/get_likes.rs +++ b/crates/weaver-api/src/app_bsky/feed/get_likes.rs @@ -33,51 +33,51 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Actor; type IndexedAt; + 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 Actor = Unset; type IndexedAt = 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 Actor = S::Actor; - type IndexedAt = S::IndexedAt; + type CreatedAt = Unset; } ///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; + type CreatedAt = S::CreatedAt; } ///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 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 Actor = S::Actor; + type IndexedAt = S::IndexedAt; + 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 `actor` field pub struct actor(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -170,9 +170,9 @@ where impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, - S::CreatedAt: like_state::IsSet, S::Actor: like_state::IsSet, S::IndexedAt: like_state::IsSet, + S::CreatedAt: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/like.rs b/crates/weaver-api/src/app_bsky/feed/like.rs index a326a4b..0f43928 100644 --- a/crates/weaver-api/src/app_bsky/feed/like.rs +++ b/crates/weaver-api/src/app_bsky/feed/like.rs @@ -36,37 +36,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -159,8 +159,8 @@ impl<'a, S: like_state::State> LikeBuilder<'a, S> { impl<'a, S> LikeBuilder<'a, S> where S: like_state::State, - S::Subject: like_state::IsSet, S::CreatedAt: like_state::IsSet, + S::Subject: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/post.rs b/crates/weaver-api/src/app_bsky/feed/post.rs index 1b535e7..d3e4426 100644 --- a/crates/weaver-api/src/app_bsky/feed/post.rs +++ b/crates/weaver-api/src/app_bsky/feed/post.rs @@ -37,51 +37,51 @@ pub mod entity_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Type; type Value; + type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Index = Unset; type Type = Unset; type Value = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Type = S::Type; - type Value = S::Value; + type Index = Unset; } ///State transition - sets the `type` field to Set pub struct SetType(PhantomData S>); impl sealed::Sealed for SetType {} impl State for SetType { - type Index = S::Index; type Type = Set; type Value = S::Value; + type Index = S::Index; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Index = S::Index; type Type = S::Type; type Value = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Type = S::Type; + type Value = S::Value; + type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `index` field - pub struct index(()); ///Marker type for the `type` field pub struct r#type(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> EntityBuilder<'a, S> where S: entity_state::State, - S::Index: entity_state::IsSet, S::Type: entity_state::IsSet, S::Value: entity_state::IsSet, + S::Index: entity_state::IsSet, { /// Build the final struct pub fn build(self) -> Entity<'a> { @@ -622,37 +622,37 @@ pub mod post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Text; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Text = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Text = S::Text; + type CreatedAt = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData S>); impl sealed::Sealed for SetText {} impl State for SetText { - type CreatedAt = S::CreatedAt; type Text = 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 Text = S::Text; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -869,8 +869,8 @@ where impl<'a, S> PostBuilder<'a, S> where S: post_state::State, - S::CreatedAt: post_state::IsSet, S::Text: post_state::IsSet, + S::CreatedAt: post_state::IsSet, { /// Build the final struct pub fn build(self) -> Post<'a> { @@ -1271,37 +1271,37 @@ pub mod text_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Start; type End; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Start = Unset; type End = Unset; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData S>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Start = Set; - type End = S::End; + 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 Start = S::Start; type End = Set; + type Start = S::Start; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `end` field pub struct end(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -1371,8 +1371,8 @@ where impl<'a, S> TextSliceBuilder<'a, S> where S: text_slice_state::State, - S::Start: text_slice_state::IsSet, S::End: text_slice_state::IsSet, + S::Start: text_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> TextSlice<'a> { diff --git a/crates/weaver-api/src/app_bsky/feed/threadgate.rs b/crates/weaver-api/src/app_bsky/feed/threadgate.rs index 2bdeef9..1282b43 100644 --- a/crates/weaver-api/src/app_bsky/feed/threadgate.rs +++ b/crates/weaver-api/src/app_bsky/feed/threadgate.rs @@ -463,37 +463,37 @@ pub mod threadgate_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; type CreatedAt; + type Post; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `post` field to Set - pub struct SetPost(PhantomData S>); - impl sealed::Sealed for SetPost {} - impl State for SetPost { - type Post = Set; - type CreatedAt = S::CreatedAt; + type Post = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Post = S::Post; type CreatedAt = Set; + type Post = S::Post; + } + ///State transition - sets the `post` field to Set + pub struct SetPost(PhantomData S>); + impl sealed::Sealed for SetPost {} + impl State for SetPost { + type CreatedAt = S::CreatedAt; + type Post = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `post` field - pub struct post(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `post` field + pub struct post(()); } } @@ -603,8 +603,8 @@ where impl<'a, S> ThreadgateBuilder<'a, S> where S: threadgate_state::State, - S::Post: threadgate_state::IsSet, S::CreatedAt: threadgate_state::IsSet, + S::Post: threadgate_state::IsSet, { /// Build the final struct pub fn build(self) -> Threadgate<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph.rs b/crates/weaver-api/src/app_bsky/graph.rs index 6d2133d..1ac10cd 100644 --- a/crates/weaver-api/src/app_bsky/graph.rs +++ b/crates/weaver-api/src/app_bsky/graph.rs @@ -1283,105 +1283,105 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Creator; - type Name; + type Uri; + type Cid; type Purpose; type IndexedAt; - type Cid; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Creator = Unset; - type Name = Unset; + type Uri = Unset; + type Cid = Unset; type Purpose = Unset; type IndexedAt = Unset; - type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Creator = S::Creator; - type Name = S::Name; - type Purpose = S::Purpose; - type IndexedAt = S::IndexedAt; - type Cid = S::Cid; + type Name = Unset; } ///State transition - sets the `creator` field to Set pub struct SetCreator(PhantomData S>); impl sealed::Sealed for SetCreator {} impl State for SetCreator { - type Uri = S::Uri; type Creator = Set; - type Name = S::Name; + type Uri = S::Uri; + type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; + type Name = S::Name; + } + ///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 Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + 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 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 Creator = S::Creator; - type Name = Set; + type Uri = S::Uri; + type Cid = Set; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; - type Cid = S::Cid; + type Name = S::Name; } ///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 Creator = S::Creator; - type Name = S::Name; + type Uri = S::Uri; + type Cid = S::Cid; type Purpose = Set; type IndexedAt = S::IndexedAt; - type Cid = S::Cid; + type Name = S::Name; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Uri = S::Uri; type Creator = S::Creator; - type Name = S::Name; + type Uri = S::Uri; + type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = Set; - type Cid = S::Cid; + type Name = S::Name; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = S::Uri; + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { type Creator = S::Creator; - type Name = S::Name; + type Uri = S::Uri; + type Cid = S::Cid; type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; - type Cid = Set; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `creator` field pub struct creator(()); - ///Marker type for the `name` field - pub struct name(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `purpose` field pub struct purpose(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -1661,12 +1661,12 @@ impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, - S::Uri: list_view_state::IsSet, S::Creator: list_view_state::IsSet, - S::Name: list_view_state::IsSet, + S::Uri: list_view_state::IsSet, + S::Cid: list_view_state::IsSet, S::Purpose: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, - S::Cid: list_view_state::IsSet, + S::Name: list_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListView<'a> { @@ -1841,67 +1841,67 @@ pub mod list_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; + type Uri; type Purpose; type Name; - 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 Purpose = Unset; type Name = 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 Purpose = S::Purpose; + type Name = S::Name; + } + ///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 Purpose = S::Purpose; + type Name = S::Name; } ///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 Uri = S::Uri; type Purpose = Set; type Name = S::Name; - type Uri = S::Uri; - type Cid = S::Cid; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type Purpose = S::Purpose; - type Name = Set; - type 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 Purpose = S::Purpose; - type Name = S::Name; - 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 Purpose = S::Purpose; - type Name = S::Name; type Uri = S::Uri; - type Cid = Set; + type Purpose = S::Purpose; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `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 `uri` field - pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); } } @@ -2118,10 +2118,10 @@ impl<'a, S: list_view_basic_state::State> ListViewBasicBuilder<'a, S> { impl<'a, S> ListViewBasicBuilder<'a, S> where S: list_view_basic_state::State, + S::Cid: list_view_basic_state::IsSet, + S::Uri: list_view_basic_state::IsSet, S::Purpose: list_view_basic_state::IsSet, S::Name: list_view_basic_state::IsSet, - S::Uri: list_view_basic_state::IsSet, - S::Cid: list_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ListViewBasic<'a> { @@ -2705,85 +2705,85 @@ pub mod starter_pack_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; type Cid; - type IndexedAt; - type Uri; type Record; + type Uri; + type Creator; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; type Cid = Unset; - type IndexedAt = Unset; - type Uri = Unset; type Record = 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 Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; - type Record = S::Record; + type Uri = Unset; + type Creator = 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 Creator = S::Creator; type Cid = Set; - type IndexedAt = S::IndexedAt; - type Uri = S::Uri; type Record = S::Record; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + type Uri = S::Uri; type Creator = S::Creator; + 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 Cid = S::Cid; - type IndexedAt = Set; + type Record = Set; type Uri = S::Uri; - type Record = S::Record; + type Creator = S::Creator; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Creator = S::Creator; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Uri = Set; type Record = S::Record; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { + type Uri = Set; type Creator = S::Creator; + 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 Record = S::Record; + type Uri = S::Uri; + type Creator = 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 Record = S::Record; type Uri = S::Uri; - type Record = Set; + type Creator = S::Creator; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `creator` field - pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `record` field pub struct record(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `creator` field + pub struct creator(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -3036,11 +3036,11 @@ where impl<'a, S> StarterPackViewBuilder<'a, S> where S: starter_pack_view_state::State, - S::Creator: starter_pack_view_state::IsSet, S::Cid: starter_pack_view_state::IsSet, - S::IndexedAt: starter_pack_view_state::IsSet, - S::Uri: starter_pack_view_state::IsSet, S::Record: starter_pack_view_state::IsSet, + S::Uri: starter_pack_view_state::IsSet, + S::Creator: starter_pack_view_state::IsSet, + S::IndexedAt: starter_pack_view_state::IsSet, { /// Build the final struct pub fn build(self) -> StarterPackView<'a> { @@ -3189,85 +3189,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 Record; - type Uri; type Cid; type IndexedAt; + type Uri; + type Record; + type Creator; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; - type Record = Unset; - type Uri = Unset; type Cid = Unset; type IndexedAt = Unset; + type Uri = Unset; + type Record = Unset; + type Creator = Unset; } - ///State transition - sets the `creator` field to Set - pub struct SetCreator(PhantomData S>); - impl sealed::Sealed for SetCreator {} - impl State for SetCreator { - type Creator = Set; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Record = S::Record; + 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 Cid = S::Cid; + type IndexedAt = Set; type Uri = S::Uri; + type Record = S::Record; + type Creator = S::Creator; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Uri = Set; + type Record = S::Record; + type Creator = S::Creator; } ///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 Record = 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 Uri = S::Uri; + type Record = Set; type Creator = S::Creator; - type Record = S::Record; - type Uri = Set; + } + ///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 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 Record = S::Record; 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 Creator = S::Creator; type Record = S::Record; - type Uri = S::Uri; - type Cid = S::Cid; - type IndexedAt = Set; + type Creator = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `creator` field - pub struct creator(()); - ///Marker type for the `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 `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `creator` field + pub struct creator(()); } } @@ -3478,11 +3478,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::Record: starter_pack_view_basic_state::IsSet, - S::Uri: starter_pack_view_basic_state::IsSet, S::Cid: starter_pack_view_basic_state::IsSet, S::IndexedAt: starter_pack_view_basic_state::IsSet, + S::Uri: starter_pack_view_basic_state::IsSet, + S::Record: starter_pack_view_basic_state::IsSet, + S::Creator: 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 f3cd782..81bf46a 100644 --- a/crates/weaver-api/src/app_bsky/graph/block.rs +++ b/crates/weaver-api/src/app_bsky/graph/block.rs @@ -34,37 +34,37 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type CreatedAt; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type CreatedAt = S::CreatedAt; + type Subject = Unset; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; type CreatedAt = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedAt = S::CreatedAt; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> BlockBuilder<'a, S> where S: block_state::State, - S::Subject: block_state::IsSet, S::CreatedAt: block_state::IsSet, + S::Subject: block_state::IsSet, { /// Build the final struct pub fn build(self) -> Block<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/list.rs b/crates/weaver-api/src/app_bsky/graph/list.rs index 1c7816d..f2ad183 100644 --- a/crates/weaver-api/src/app_bsky/graph/list.rs +++ b/crates/weaver-api/src/app_bsky/graph/list.rs @@ -51,51 +51,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type CreatedAt; type Name; type Purpose; - type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type CreatedAt = Unset; type Name = Unset; type Purpose = Unset; - type CreatedAt = Unset; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; + type Name = S::Name; + type Purpose = S::Purpose; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { + type CreatedAt = S::CreatedAt; type Name = Set; type Purpose = S::Purpose; - type CreatedAt = S::CreatedAt; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type Name = S::Name; - type Purpose = Set; type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { type Name = S::Name; - type Purpose = S::Purpose; - type CreatedAt = Set; + type Purpose = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `name` field pub struct name(()); ///Marker type for the `purpose` field pub struct purpose(()); - ///Marker type for the `created_at` field - pub struct created_at(()); } } @@ -268,9 +268,9 @@ where impl<'a, S> ListBuilder<'a, S> where S: list_state::State, + S::CreatedAt: list_state::IsSet, S::Name: list_state::IsSet, S::Purpose: list_state::IsSet, - S::CreatedAt: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/listblock.rs b/crates/weaver-api/src/app_bsky/graph/listblock.rs index 1faa447..84dfe12 100644 --- a/crates/weaver-api/src/app_bsky/graph/listblock.rs +++ b/crates/weaver-api/src/app_bsky/graph/listblock.rs @@ -34,37 +34,37 @@ pub mod listblock_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> ListblockBuilder<'a, S> where S: listblock_state::State, - S::CreatedAt: listblock_state::IsSet, S::Subject: listblock_state::IsSet, + S::CreatedAt: listblock_state::IsSet, { /// Build the final struct pub fn build(self) -> Listblock<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/listitem.rs b/crates/weaver-api/src/app_bsky/graph/listitem.rs index 861afa5..4deb4ad 100644 --- a/crates/weaver-api/src/app_bsky/graph/listitem.rs +++ b/crates/weaver-api/src/app_bsky/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 Subject; - type CreatedAt; type List; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Subject = Unset; - type CreatedAt = Unset; type List = 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 List = S::List; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type Subject = S::Subject; - type CreatedAt = Set; type List = S::List; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `list` field to Set pub struct SetList(PhantomData S>); impl sealed::Sealed for SetList {} impl State for SetList { type Subject = S::Subject; - type CreatedAt = S::CreatedAt; type List = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type List = S::List; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `subject` field pub struct subject(()); - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `list` field pub struct list(()); + ///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::Subject: listitem_state::IsSet, - S::CreatedAt: listitem_state::IsSet, S::List: 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/app_bsky/graph/starterpack.rs b/crates/weaver-api/src/app_bsky/graph/starterpack.rs index 04266cf..a2e45c9 100644 --- a/crates/weaver-api/src/app_bsky/graph/starterpack.rs +++ b/crates/weaver-api/src/app_bsky/graph/starterpack.rs @@ -367,50 +367,50 @@ pub mod starterpack_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type List; - type CreatedAt; type Name; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type List = Unset; - type CreatedAt = Unset; type Name = 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 Name = S::Name; - } - ///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 Name = S::Name; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type List = S::List; - type CreatedAt = S::CreatedAt; 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 List = S::List; + type Name = S::Name; + 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 `name` field pub struct name(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -564,8 +564,8 @@ impl<'a, S> StarterpackBuilder<'a, S> where S: starterpack_state::State, S::List: starterpack_state::IsSet, - S::CreatedAt: starterpack_state::IsSet, S::Name: starterpack_state::IsSet, + S::CreatedAt: starterpack_state::IsSet, { /// Build the final struct pub fn build(self) -> Starterpack<'a> { diff --git a/crates/weaver-api/src/app_bsky/graph/verification.rs b/crates/weaver-api/src/app_bsky/graph/verification.rs index e77972d..f010142 100644 --- a/crates/weaver-api/src/app_bsky/graph/verification.rs +++ b/crates/weaver-api/src/app_bsky/graph/verification.rs @@ -41,65 +41,65 @@ pub mod verification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; - type CreatedAt; type Handle; + type CreatedAt; + type Subject; type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; - type CreatedAt = Unset; type Handle = Unset; + type CreatedAt = Unset; + type Subject = Unset; type DisplayName = Unset; } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Handle = Set; type CreatedAt = S::CreatedAt; - type Handle = S::Handle; + type Subject = S::Subject; type DisplayName = S::DisplayName; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Subject = S::Subject; - type CreatedAt = Set; type Handle = S::Handle; + type CreatedAt = 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 Subject = S::Subject; + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Handle = S::Handle; type CreatedAt = S::CreatedAt; - type Handle = Set; + type Subject = Set; type DisplayName = S::DisplayName; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Subject = S::Subject; - type CreatedAt = S::CreatedAt; type Handle = S::Handle; + type CreatedAt = S::CreatedAt; + type Subject = S::Subject; type DisplayName = 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 `handle` field pub struct handle(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `display_name` field pub struct display_name(()); } @@ -214,9 +214,9 @@ where impl<'a, S> VerificationBuilder<'a, S> where S: verification_state::State, - S::Subject: verification_state::IsSet, - S::CreatedAt: verification_state::IsSet, S::Handle: verification_state::IsSet, + S::CreatedAt: verification_state::IsSet, + S::Subject: verification_state::IsSet, S::DisplayName: verification_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/app_bsky/labeler.rs b/crates/weaver-api/src/app_bsky/labeler.rs index 83459aa..00a493d 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 Cid; type IndexedAt; + type Cid; type Creator; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Cid = Unset; type IndexedAt = Unset; + type Cid = Unset; type Creator = Unset; + type Uri = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; + ///State transition - sets the `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 IndexedAt = S::IndexedAt; type Creator = S::Creator; + type Uri = S::Uri; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; - type Cid = Set; type IndexedAt = S::IndexedAt; + type Cid = Set; 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 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 Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Cid = S::Cid; type Creator = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Creator = S::Creator; + 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 `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 `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::Cid: labeler_view_state::IsSet, S::IndexedAt: labeler_view_state::IsSet, + S::Cid: labeler_view_state::IsSet, S::Creator: 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 Creator; + type Cid; type Policies; - type IndexedAt; type Uri; - type Cid; + type Creator; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; + type Cid = Unset; type Policies = Unset; - type IndexedAt = Unset; type Uri = Unset; - type Cid = Unset; + type Creator = 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; + ///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 Policies = S::Policies; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Cid = S::Cid; + type Creator = S::Creator; + type IndexedAt = S::IndexedAt; } ///State transition - sets the `policies` field to Set pub struct SetPolicies(PhantomData S>); impl sealed::Sealed for SetPolicies {} impl State for SetPolicies { - type Creator = S::Creator; + type Cid = S::Cid; type Policies = Set; - type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { type Creator = S::Creator; - type Policies = S::Policies; - type IndexedAt = 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 Creator = S::Creator; + type Cid = S::Cid; type Policies = S::Policies; - 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 Creator = S::Creator; + 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 Policies = S::Policies; + type Uri = S::Uri; + type Creator = 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 Policies = S::Policies; type Uri = S::Uri; - type Cid = Set; + type Creator = S::Creator; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `creator` field - pub struct creator(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `policies` field pub struct policies(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `creator` field + pub struct creator(()); + ///Marker type for the `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::Creator: labeler_view_detailed_state::IsSet, + S::Cid: labeler_view_detailed_state::IsSet, S::Policies: labeler_view_detailed_state::IsSet, - S::IndexedAt: labeler_view_detailed_state::IsSet, S::Uri: labeler_view_detailed_state::IsSet, - S::Cid: labeler_view_detailed_state::IsSet, + S::Creator: 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 8b4ac46..a61dd32 100644 --- a/crates/weaver-api/src/app_bsky/notification.rs +++ b/crates/weaver-api/src/app_bsky/notification.rs @@ -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> { @@ -866,51 +866,51 @@ pub mod filterable_preference_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Push; type List; type Include; + type Push; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Push = Unset; type List = Unset; type Include = Unset; - } - ///State transition - sets the `push` field to Set - pub struct SetPush(PhantomData S>); - impl sealed::Sealed for SetPush {} - impl State for SetPush { - type Push = Set; - type List = S::List; - type Include = S::Include; + 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 Push = S::Push; type List = Set; type Include = S::Include; + type Push = S::Push; } ///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 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 List = S::List; + 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 `list` field pub struct list(()); ///Marker type for the `include` field pub struct include(()); + ///Marker type for the `push` field + pub struct push(()); } } @@ -1003,9 +1003,9 @@ where impl<'a, S> FilterablePreferenceBuilder<'a, S> where S: filterable_preference_state::State, - S::Push: filterable_preference_state::IsSet, S::List: filterable_preference_state::IsSet, S::Include: filterable_preference_state::IsSet, + S::Push: filterable_preference_state::IsSet, { /// Build the final struct pub fn build(self) -> FilterablePreference<'a> { @@ -1360,301 +1360,301 @@ pub mod preferences_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Unverified; - type Mention; - type Follow; - type Repost; - type Verified; - type Reply; - type Chat; - type RepostViaRepost; - type SubscribedPost; type LikeViaRepost; type Quote; + type Verified; + type Chat; + type Reply; + type Repost; + type Follow; type Like; type StarterpackJoined; + type Unverified; + type Mention; + type RepostViaRepost; + type SubscribedPost; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Unverified = Unset; - type Mention = Unset; - type Follow = Unset; - type Repost = Unset; - type Verified = Unset; - type Reply = Unset; - type Chat = Unset; - type RepostViaRepost = Unset; - type SubscribedPost = Unset; type LikeViaRepost = Unset; type Quote = Unset; + type Verified = Unset; + type Chat = Unset; + type Reply = Unset; + type Repost = Unset; + type Follow = Unset; type Like = Unset; type StarterpackJoined = Unset; + type Unverified = Unset; + type Mention = Unset; + type RepostViaRepost = Unset; + type SubscribedPost = Unset; } - ///State transition - sets the `unverified` field to Set - pub struct SetUnverified(PhantomData S>); - impl sealed::Sealed for SetUnverified {} - impl State for SetUnverified { - type Unverified = Set; - type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; + ///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 Quote = S::Quote; type Verified = S::Verified; - type Reply = S::Reply; type Chat = S::Chat; - type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = S::SubscribedPost; - type LikeViaRepost = S::LikeViaRepost; - type Quote = S::Quote; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `mention` field to Set - pub struct SetMention(PhantomData S>); - impl sealed::Sealed for SetMention {} - impl State for SetMention { type Unverified = S::Unverified; - type Mention = Set; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; + type Mention = S::Mention; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Quote = Set; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `follow` field to Set - pub struct SetFollow(PhantomData S>); - impl sealed::Sealed for SetFollow {} - impl State for SetFollow { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = Set; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = Set; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `repost` field to Set - pub struct SetRepost(PhantomData S>); - impl sealed::Sealed for SetRepost {} - impl State for SetRepost { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = Set; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = Set; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `verified` field to Set - pub struct SetVerified(PhantomData S>); - impl sealed::Sealed for SetVerified {} - impl State for SetVerified { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = Set; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; - type LikeViaRepost = S::LikeViaRepost; - type Quote = S::Quote; - type Like = S::Like; - type StarterpackJoined = S::StarterpackJoined; } ///State transition - sets the `reply` field to Set pub struct SetReply(PhantomData S>); impl sealed::Sealed for SetReply {} impl State for SetReply { - type Unverified = S::Unverified; - type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; + type LikeViaRepost = S::LikeViaRepost; + type Quote = S::Quote; type Verified = S::Verified; - type Reply = Set; type Chat = S::Chat; + type Reply = Set; + type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; + type StarterpackJoined = S::StarterpackJoined; + type Unverified = S::Unverified; + type Mention = S::Mention; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = Set; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `chat` field to Set - pub struct SetChat(PhantomData S>); - impl sealed::Sealed for SetChat {} - impl State for SetChat { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = Set; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = Set; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///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 Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; - type RepostViaRepost = Set; + type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; - type Like = S::Like; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; + type Like = Set; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `subscribed_post` field to Set - pub struct SetSubscribedPost(PhantomData S>); - impl sealed::Sealed for SetSubscribedPost {} - impl State for SetSubscribedPost { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; - type SubscribedPost = Set; + type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; - type StarterpackJoined = S::StarterpackJoined; - } - ///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 StarterpackJoined = Set; type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; - type LikeViaRepost = Set; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `quote` field to Set - pub struct SetQuote(PhantomData S>); - impl sealed::Sealed for SetQuote {} - impl State for SetQuote { - type Unverified = S::Unverified; + type Unverified = Set; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = Set; + type Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `like` field to Set - pub struct SetLike(PhantomData S>); - impl sealed::Sealed for SetLike {} - impl State for SetLike { type Unverified = S::Unverified; - type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; + type Mention = Set; type RepostViaRepost = S::RepostViaRepost; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; - type Like = Set; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; + type Like = S::Like; type StarterpackJoined = S::StarterpackJoined; - } - ///State transition - sets the `starterpack_joined` field to Set - pub struct SetStarterpackJoined(PhantomData S>); - impl sealed::Sealed for SetStarterpackJoined {} - impl State for SetStarterpackJoined { type Unverified = S::Unverified; type Mention = S::Mention; - type Follow = S::Follow; - type Repost = S::Repost; - type Verified = S::Verified; - type Reply = S::Reply; - type Chat = S::Chat; - type RepostViaRepost = S::RepostViaRepost; + type RepostViaRepost = Set; type SubscribedPost = S::SubscribedPost; + } + ///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 Quote = S::Quote; + type Verified = S::Verified; + type Chat = S::Chat; + type Reply = S::Reply; + type Repost = S::Repost; + type Follow = S::Follow; type Like = S::Like; - type StarterpackJoined = Set; + type StarterpackJoined = S::StarterpackJoined; + type Unverified = S::Unverified; + type Mention = S::Mention; + type RepostViaRepost = S::RepostViaRepost; + type SubscribedPost = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `unverified` field - pub struct unverified(()); - ///Marker type for the `mention` field - pub struct mention(()); - ///Marker type for the `follow` field - pub struct follow(()); - ///Marker type for the `repost` field - pub struct repost(()); - ///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_via_repost` field - pub struct repost_via_repost(()); - ///Marker type for the `subscribed_post` field - pub struct subscribed_post(()); ///Marker type for the `like_via_repost` field pub struct like_via_repost(()); ///Marker type for the `quote` field pub struct quote(()); + ///Marker type for the `verified` field + pub struct verified(()); + ///Marker type for the `chat` field + pub struct chat(()); + ///Marker type for the `reply` field + pub struct reply(()); + ///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 `starterpack_joined` field pub struct starterpack_joined(()); + ///Marker type for the `unverified` field + pub struct unverified(()); + ///Marker type for the `mention` field + pub struct mention(()); + ///Marker type for the `repost_via_repost` field + pub struct repost_via_repost(()); + ///Marker type for the `subscribed_post` field + pub struct subscribed_post(()); } } @@ -1961,19 +1961,19 @@ where impl<'a, S> PreferencesBuilder<'a, S> where S: preferences_state::State, - S::Unverified: preferences_state::IsSet, - S::Mention: preferences_state::IsSet, - S::Follow: preferences_state::IsSet, - S::Repost: preferences_state::IsSet, - S::Verified: preferences_state::IsSet, - S::Reply: preferences_state::IsSet, - S::Chat: preferences_state::IsSet, - S::RepostViaRepost: preferences_state::IsSet, - S::SubscribedPost: preferences_state::IsSet, S::LikeViaRepost: preferences_state::IsSet, S::Quote: preferences_state::IsSet, + S::Verified: preferences_state::IsSet, + S::Chat: preferences_state::IsSet, + S::Reply: preferences_state::IsSet, + S::Repost: preferences_state::IsSet, + S::Follow: preferences_state::IsSet, S::Like: preferences_state::IsSet, S::StarterpackJoined: preferences_state::IsSet, + S::Unverified: preferences_state::IsSet, + S::Mention: preferences_state::IsSet, + S::RepostViaRepost: preferences_state::IsSet, + S::SubscribedPost: preferences_state::IsSet, { /// Build the final struct pub fn build(self) -> Preferences<'a> { @@ -2097,37 +2097,37 @@ pub mod subject_activity_subscription_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type ActivitySubscription; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Subject = Unset; type ActivitySubscription = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type ActivitySubscription = S::ActivitySubscription; + type Subject = Unset; } ///State transition - sets the `activity_subscription` field to Set pub struct SetActivitySubscription(PhantomData S>); impl sealed::Sealed for SetActivitySubscription {} impl State for SetActivitySubscription { - type Subject = S::Subject; type ActivitySubscription = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type ActivitySubscription = S::ActivitySubscription; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `activity_subscription` field pub struct activity_subscription(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -2214,8 +2214,8 @@ where impl<'a, S> SubjectActivitySubscriptionBuilder<'a, S> where S: subject_activity_subscription_state::State, - S::Subject: subject_activity_subscription_state::IsSet, S::ActivitySubscription: subject_activity_subscription_state::IsSet, + S::Subject: subject_activity_subscription_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectActivitySubscription<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/list_notifications.rs b/crates/weaver-api/src/app_bsky/notification/list_notifications.rs index f9f7e40..7e7f135 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 Author; - type Cid; + type IsRead; type Uri; type Reason; - type Record; - type IsRead; + type Cid; type IndexedAt; + type Author; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; - type Cid = Unset; + type IsRead = Unset; type Uri = Unset; type Reason = Unset; - type Record = Unset; - type IsRead = Unset; + type Cid = Unset; type IndexedAt = Unset; + type Author = Unset; + type Record = Unset; } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type Cid = S::Cid; + ///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 Uri = S::Uri; type Reason = S::Reason; - type Record = S::Record; - type IsRead = S::IsRead; + 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 Author = S::Author; - type Cid = Set; - type Uri = S::Uri; - type Reason = S::Reason; type Record = S::Record; - 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 Author = S::Author; - type Cid = S::Cid; + type IsRead = S::IsRead; type Uri = Set; type Reason = S::Reason; - type Record = S::Record; - type IsRead = S::IsRead; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Author = S::Author; + 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 Author = S::Author; - type Cid = S::Cid; + type IsRead = S::IsRead; type Uri = S::Uri; type Reason = Set; - type Record = S::Record; - type IsRead = S::IsRead; + 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 Author = S::Author; - 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 IsRead = S::IsRead; type Uri = S::Uri; type Reason = S::Reason; - type Record = Set; - type IsRead = S::IsRead; + type Cid = Set; 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 Author = S::Author; - type Cid = S::Cid; - type Uri = S::Uri; - type Reason = S::Reason; type Record = S::Record; - 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 Author = S::Author; + type IsRead = S::IsRead; + type Uri = S::Uri; + type Reason = S::Reason; type Cid = S::Cid; + type IndexedAt = Set; + type Author = S::Author; + 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 IsRead = S::IsRead; type Uri = S::Uri; type Reason = S::Reason; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Author = 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 IsRead = S::IsRead; - type IndexedAt = Set; + type Uri = S::Uri; + type Reason = S::Reason; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Author = S::Author; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `author` field - pub struct author(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `is_read` field + pub struct is_read(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `record` field - pub struct record(()); - ///Marker type for the `is_read` field - pub struct is_read(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `author` field + pub struct author(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -614,13 +614,13 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, - S::Author: notification_state::IsSet, - S::Cid: notification_state::IsSet, + S::IsRead: notification_state::IsSet, S::Uri: notification_state::IsSet, S::Reason: notification_state::IsSet, - S::Record: notification_state::IsSet, - S::IsRead: notification_state::IsSet, + S::Cid: notification_state::IsSet, S::IndexedAt: notification_state::IsSet, + S::Author: notification_state::IsSet, + S::Record: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { diff --git a/crates/weaver-api/src/app_bsky/notification/register_push.rs b/crates/weaver-api/src/app_bsky/notification/register_push.rs index b4dcbe7..f06862e 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 AppId; - type Token; - type ServiceDid; type Platform; + type ServiceDid; + type Token; + type AppId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AppId = Unset; - type Token = Unset; - type ServiceDid = Unset; type Platform = Unset; + type ServiceDid = Unset; + type Token = Unset; + type AppId = Unset; } - ///State transition - sets the `app_id` field to Set - pub struct SetAppId(PhantomData S>); - impl sealed::Sealed for SetAppId {} - impl State for SetAppId { - type AppId = Set; - type Token = S::Token; + ///State transition - sets the `platform` field to Set + pub struct SetPlatform(PhantomData S>); + impl sealed::Sealed for SetPlatform {} + impl State for SetPlatform { + type Platform = Set; type ServiceDid = S::ServiceDid; - 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 Token = S::Token; type AppId = S::AppId; - type Token = Set; - type ServiceDid = S::ServiceDid; - 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 AppId = S::AppId; - type Token = S::Token; - type ServiceDid = Set; type Platform = S::Platform; + type ServiceDid = Set; + type Token = S::Token; + type AppId = S::AppId; } - ///State transition - sets the `platform` field to Set - pub struct SetPlatform(PhantomData S>); - impl sealed::Sealed for SetPlatform {} - impl State for SetPlatform { + ///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 Token = S::Token; + } + ///State transition - sets the `app_id` field to Set + pub struct SetAppId(PhantomData S>); + impl sealed::Sealed for SetAppId {} + impl State for SetAppId { + type Platform = S::Platform; type ServiceDid = S::ServiceDid; - type Platform = Set; + type Token = S::Token; + type AppId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `app_id` field - pub struct app_id(()); - ///Marker type for the `token` field - pub struct token(()); - ///Marker type for the `service_did` field - pub struct service_did(()); ///Marker type for the `platform` field pub struct platform(()); + ///Marker type for the `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(()); } } @@ -227,10 +227,10 @@ where impl<'a, S> RegisterPushBuilder<'a, S> where S: register_push_state::State, - S::AppId: register_push_state::IsSet, - S::Token: register_push_state::IsSet, - S::ServiceDid: register_push_state::IsSet, S::Platform: register_push_state::IsSet, + S::ServiceDid: register_push_state::IsSet, + S::Token: register_push_state::IsSet, + S::AppId: 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 bb9af05..8e6846d 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 AppId; type Token; - type ServiceDid; + 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 AppId = Unset; type Token = Unset; - type ServiceDid = Unset; + type Platform = 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; + ///State transition - sets the `service_did` field to Set + pub struct SetServiceDid(PhantomData S>); + impl sealed::Sealed for SetServiceDid {} + impl State for SetServiceDid { + type ServiceDid = Set; type AppId = S::AppId; type Token = S::Token; - type ServiceDid = S::ServiceDid; + 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 AppId = Set; type Token = S::Token; - type ServiceDid = S::ServiceDid; + 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 AppId = S::AppId; type Token = Set; - type ServiceDid = S::ServiceDid; - } - ///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; + } + ///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 AppId = S::AppId; type Token = S::Token; - type ServiceDid = Set; + 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 `app_id` field pub struct app_id(()); ///Marker type for the `token` field pub struct token(()); - ///Marker type for the `service_did` field - pub struct service_did(()); + ///Marker type for the `platform` field + pub struct platform(()); } } @@ -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::AppId: unregister_push_state::IsSet, S::Token: unregister_push_state::IsSet, - S::ServiceDid: 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/unspecced.rs b/crates/weaver-api/src/app_bsky/unspecced.rs index 470b737..bf82ac5 100644 --- a/crates/weaver-api/src/app_bsky/unspecced.rs +++ b/crates/weaver-api/src/app_bsky/unspecced.rs @@ -81,49 +81,49 @@ pub mod age_assurance_event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Status; type CreatedAt; + type Status; type AttemptId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Status = Unset; type CreatedAt = Unset; + type Status = Unset; type AttemptId = Unset; } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Status = Set; - type CreatedAt = S::CreatedAt; - type AttemptId = S::AttemptId; - } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { - type Status = S::Status; type CreatedAt = Set; + type Status = S::Status; + type AttemptId = S::AttemptId; + } + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { + type CreatedAt = S::CreatedAt; + type Status = Set; type AttemptId = S::AttemptId; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { - type Status = S::Status; type CreatedAt = S::CreatedAt; + type Status = S::Status; type AttemptId = 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(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); } @@ -309,8 +309,8 @@ where impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, - S::Status: age_assurance_event_state::IsSet, S::CreatedAt: age_assurance_event_state::IsSet, + S::Status: age_assurance_event_state::IsSet, S::AttemptId: age_assurance_event_state::IsSet, { /// Build the final struct @@ -1942,10 +1942,10 @@ pub mod skeleton_trend_state { pub trait State: sealed::Sealed { type Link; type Dids; + type DisplayName; + type Topic; type PostCount; type StartedAt; - type Topic; - type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -1953,10 +1953,10 @@ pub mod skeleton_trend_state { impl State for Empty { type Link = Unset; type Dids = Unset; + type DisplayName = Unset; + type Topic = Unset; type PostCount = Unset; type StartedAt = Unset; - type Topic = Unset; - type DisplayName = Unset; } ///State transition - sets the `link` field to Set pub struct SetLink(PhantomData S>); @@ -1964,10 +1964,10 @@ pub mod skeleton_trend_state { impl State for SetLink { type Link = Set; type Dids = S::Dids; + type DisplayName = S::DisplayName; + type Topic = S::Topic; type PostCount = S::PostCount; type StartedAt = S::StartedAt; - type Topic = S::Topic; - type DisplayName = S::DisplayName; } ///State transition - sets the `dids` field to Set pub struct SetDids(PhantomData S>); @@ -1975,10 +1975,32 @@ pub mod skeleton_trend_state { impl State for SetDids { type Link = S::Link; type Dids = Set; + type DisplayName = S::DisplayName; + type Topic = S::Topic; type PostCount = S::PostCount; 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 Dids = S::Dids; + type DisplayName = Set; type Topic = S::Topic; + 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 Dids = S::Dids; type DisplayName = S::DisplayName; + type Topic = Set; + type PostCount = S::PostCount; + type StartedAt = S::StartedAt; } ///State transition - sets the `post_count` field to Set pub struct SetPostCount(PhantomData S>); @@ -1986,10 +2008,10 @@ pub mod skeleton_trend_state { impl State for SetPostCount { type Link = S::Link; type Dids = S::Dids; + type DisplayName = S::DisplayName; + type Topic = S::Topic; type PostCount = Set; type StartedAt = S::StartedAt; - type Topic = S::Topic; - type DisplayName = S::DisplayName; } ///State transition - sets the `started_at` field to Set pub struct SetStartedAt(PhantomData S>); @@ -1997,32 +2019,10 @@ pub mod skeleton_trend_state { impl State for SetStartedAt { type Link = S::Link; type Dids = S::Dids; - type PostCount = S::PostCount; - type StartedAt = Set; - type Topic = S::Topic; type DisplayName = S::DisplayName; - } - ///State transition - sets the `topic` field to Set - pub struct SetTopic(PhantomData S>); - impl sealed::Sealed for SetTopic {} - impl State for SetTopic { - type Link = S::Link; - type Dids = S::Dids; - type PostCount = S::PostCount; - type StartedAt = S::StartedAt; - type Topic = Set; - type DisplayName = S::DisplayName; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { - type Link = S::Link; - type Dids = S::Dids; - type PostCount = S::PostCount; - type StartedAt = S::StartedAt; type Topic = S::Topic; - type DisplayName = Set; + type PostCount = S::PostCount; + type StartedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -2031,14 +2031,14 @@ pub mod skeleton_trend_state { pub struct link(()); ///Marker type for the `dids` field pub struct dids(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `topic` field + pub struct topic(()); ///Marker type for the `post_count` field pub struct post_count(()); ///Marker type for the `started_at` field pub struct started_at(()); - ///Marker type for the `topic` field - pub struct topic(()); - ///Marker type for the `display_name` field - pub struct display_name(()); } } @@ -2224,10 +2224,10 @@ where S: skeleton_trend_state::State, S::Link: skeleton_trend_state::IsSet, S::Dids: skeleton_trend_state::IsSet, + S::DisplayName: skeleton_trend_state::IsSet, + S::Topic: skeleton_trend_state::IsSet, S::PostCount: skeleton_trend_state::IsSet, S::StartedAt: skeleton_trend_state::IsSet, - S::Topic: skeleton_trend_state::IsSet, - S::DisplayName: skeleton_trend_state::IsSet, { /// Build the final struct pub fn build(self) -> SkeletonTrend<'a> { @@ -2599,105 +2599,105 @@ pub mod thread_item_post_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Post; - type MoreReplies; type OpThread; - type MutedByViewer; + type Post; type MoreParents; type HiddenByThreadgate; + type MutedByViewer; + type MoreReplies; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Post = Unset; - type MoreReplies = Unset; type OpThread = Unset; - type MutedByViewer = Unset; + type Post = Unset; type MoreParents = Unset; type HiddenByThreadgate = 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 MoreReplies = S::MoreReplies; - type OpThread = S::OpThread; - type MutedByViewer = S::MutedByViewer; - type MoreParents = S::MoreParents; - type HiddenByThreadgate = S::HiddenByThreadgate; - } - ///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 MoreReplies = Set; - type OpThread = S::OpThread; - type MutedByViewer = S::MutedByViewer; - type MoreParents = S::MoreParents; - type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = Unset; + type MoreReplies = 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 MoreReplies = S::MoreReplies; type OpThread = Set; - type MutedByViewer = S::MutedByViewer; + type Post = S::Post; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; - } - ///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 MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; + } + ///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 MutedByViewer = Set; + type Post = Set; type MoreParents = S::MoreParents; type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = S::MutedByViewer; + type MoreReplies = S::MoreReplies; } ///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 MoreReplies = S::MoreReplies; type OpThread = S::OpThread; - type MutedByViewer = S::MutedByViewer; + type Post = S::Post; type MoreParents = Set; type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = S::MutedByViewer; + type MoreReplies = S::MoreReplies; } ///State transition - sets the `hidden_by_threadgate` field to Set pub struct SetHiddenByThreadgate(PhantomData S>); impl sealed::Sealed for SetHiddenByThreadgate {} impl State for SetHiddenByThreadgate { + type OpThread = S::OpThread; type Post = S::Post; + type MoreParents = S::MoreParents; + type HiddenByThreadgate = Set; + type MutedByViewer = S::MutedByViewer; type MoreReplies = S::MoreReplies; + } + ///State transition - sets the `muted_by_viewer` field to Set + pub struct SetMutedByViewer(PhantomData S>); + impl sealed::Sealed for SetMutedByViewer {} + impl State for SetMutedByViewer { type OpThread = S::OpThread; - type MutedByViewer = S::MutedByViewer; + type Post = S::Post; type MoreParents = S::MoreParents; - type HiddenByThreadgate = Set; + type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = Set; + type MoreReplies = S::MoreReplies; + } + ///State transition - sets the `more_replies` field to Set + pub struct SetMoreReplies(PhantomData S>); + impl sealed::Sealed for SetMoreReplies {} + impl State for SetMoreReplies { + type OpThread = S::OpThread; + type Post = S::Post; + type MoreParents = S::MoreParents; + type HiddenByThreadgate = S::HiddenByThreadgate; + type MutedByViewer = S::MutedByViewer; + type MoreReplies = 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 `more_replies` field - pub struct more_replies(()); ///Marker type for the `op_thread` field pub struct op_thread(()); - ///Marker type for the `muted_by_viewer` field - pub struct muted_by_viewer(()); + ///Marker type for the `post` field + pub struct post(()); ///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 `more_replies` field + pub struct more_replies(()); } } @@ -2850,12 +2850,12 @@ where impl<'a, S> ThreadItemPostBuilder<'a, S> where S: thread_item_post_state::State, - S::Post: thread_item_post_state::IsSet, - S::MoreReplies: thread_item_post_state::IsSet, S::OpThread: thread_item_post_state::IsSet, - S::MutedByViewer: thread_item_post_state::IsSet, + S::Post: 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::MoreReplies: thread_item_post_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItemPost<'a> { @@ -2946,105 +2946,105 @@ pub mod trend_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Topic; - type PostCount; + type DisplayName; type Actors; type Link; - type DisplayName; type StartedAt; + type Topic; + type PostCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Topic = Unset; - type PostCount = Unset; + type DisplayName = Unset; type Actors = Unset; type Link = Unset; - type DisplayName = Unset; type StartedAt = Unset; + type Topic = Unset; + type PostCount = Unset; } - ///State transition - sets the `topic` field to Set - pub struct SetTopic(PhantomData S>); - impl sealed::Sealed for SetTopic {} - impl State for SetTopic { - type Topic = Set; - type PostCount = S::PostCount; + ///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 Actors = S::Actors; type Link = S::Link; - type DisplayName = S::DisplayName; type StartedAt = S::StartedAt; - } - ///State transition - sets the `post_count` field to Set - pub struct SetPostCount(PhantomData S>); - impl sealed::Sealed for SetPostCount {} - impl State for SetPostCount { type Topic = S::Topic; - type PostCount = Set; - type Actors = S::Actors; - type Link = S::Link; - type DisplayName = S::DisplayName; - type StartedAt = S::StartedAt; + type PostCount = S::PostCount; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData S>); impl sealed::Sealed for SetActors {} impl State for SetActors { - type Topic = S::Topic; - type PostCount = S::PostCount; + type DisplayName = S::DisplayName; type Actors = Set; type Link = S::Link; - type DisplayName = S::DisplayName; type StartedAt = S::StartedAt; + type Topic = S::Topic; + type PostCount = S::PostCount; } ///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 PostCount = S::PostCount; + type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = Set; - type DisplayName = S::DisplayName; type StartedAt = S::StartedAt; - } - ///State transition - sets the `display_name` field to Set - pub struct SetDisplayName(PhantomData S>); - impl sealed::Sealed for SetDisplayName {} - impl State for SetDisplayName { type Topic = S::Topic; type PostCount = S::PostCount; - type Actors = S::Actors; - type Link = S::Link; - type DisplayName = 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 DisplayName = S::DisplayName; + type Actors = S::Actors; + type Link = S::Link; + type StartedAt = Set; type Topic = S::Topic; type PostCount = S::PostCount; + } + ///State transition - sets the `topic` field to Set + pub struct SetTopic(PhantomData S>); + impl sealed::Sealed for SetTopic {} + impl State for SetTopic { + type DisplayName = S::DisplayName; type Actors = S::Actors; type Link = S::Link; + type StartedAt = S::StartedAt; + type Topic = Set; + type PostCount = S::PostCount; + } + ///State transition - sets the `post_count` field to Set + pub struct SetPostCount(PhantomData S>); + impl sealed::Sealed for SetPostCount {} + impl State for SetPostCount { type DisplayName = S::DisplayName; - type StartedAt = Set; + type Actors = S::Actors; + type Link = S::Link; + type StartedAt = S::StartedAt; + type Topic = S::Topic; + type PostCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `topic` field - pub struct topic(()); - ///Marker type for the `post_count` field - pub struct post_count(()); + ///Marker type for the `display_name` field + pub struct display_name(()); ///Marker type for the `actors` field pub struct actors(()); ///Marker type for the `link` field pub struct link(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `started_at` field pub struct started_at(()); + ///Marker type for the `topic` field + pub struct topic(()); + ///Marker type for the `post_count` field + pub struct post_count(()); } } @@ -3228,12 +3228,12 @@ where impl<'a, S> TrendViewBuilder<'a, S> where S: trend_view_state::State, - S::Topic: trend_view_state::IsSet, - S::PostCount: trend_view_state::IsSet, + S::DisplayName: trend_view_state::IsSet, S::Actors: trend_view_state::IsSet, S::Link: trend_view_state::IsSet, - S::DisplayName: trend_view_state::IsSet, S::StartedAt: trend_view_state::IsSet, + S::Topic: trend_view_state::IsSet, + S::PostCount: trend_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TrendView<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_config.rs b/crates/weaver-api/src/app_bsky/unspecced/get_config.rs index 1cb09d3..d932f1b 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 95c8e55..23c1266 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_other_v2.rs @@ -189,51 +189,51 @@ pub mod thread_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Value; type Depth; + type Value; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Value = Unset; type Depth = Unset; + type Value = Unset; + type Uri = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; + ///State transition - sets the `depth` field to Set + pub struct SetDepth(PhantomData S>); + impl sealed::Sealed for SetDepth {} + impl State for SetDepth { + type Depth = Set; type Value = S::Value; - type Depth = S::Depth; + type Uri = S::Uri; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Uri = S::Uri; - type Value = Set; type Depth = S::Depth; - } - ///State transition - sets the `depth` field to Set - pub struct SetDepth(PhantomData S>); - impl sealed::Sealed for SetDepth {} - impl State for SetDepth { + type Value = Set; type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Depth = S::Depth; type Value = S::Value; - type Depth = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `depth` field pub struct depth(()); + ///Marker type for the `value` field + pub struct value(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -326,9 +326,9 @@ where impl<'a, S> ThreadItemBuilder<'a, S> where S: thread_item_state::State, - S::Uri: thread_item_state::IsSet, - S::Value: thread_item_state::IsSet, S::Depth: thread_item_state::IsSet, + S::Value: thread_item_state::IsSet, + S::Uri: thread_item_state::IsSet, { /// Build the final struct pub fn build(self) -> ThreadItem<'a> { diff --git a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs index 331d35d..254db21 100644 --- a/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs +++ b/crates/weaver-api/src/app_bsky/unspecced/get_post_thread_v2.rs @@ -265,51 +265,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 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; - } - ///State transition - sets the `depth` field to Set - pub struct SetDepth(PhantomData S>); - impl sealed::Sealed for SetDepth {} - impl State for SetDepth { - type Depth = Set; - type Value = S::Value; - type Uri = S::Uri; + type Depth = Unset; } ///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; + type Depth = S::Depth; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Depth = S::Depth; type Value = S::Value; type Uri = Set; + type Depth = S::Depth; + } + ///State transition - sets the `depth` field to Set + pub struct SetDepth(PhantomData S>); + impl sealed::Sealed for SetDepth {} + impl State for SetDepth { + type Value = S::Value; + type Uri = S::Uri; + 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 `depth` field + pub struct depth(()); } } @@ -402,9 +402,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::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 4f6a7f7..c0f4b06 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 Subject; type Tag; type SubjectType; - 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 Tag = Unset; type SubjectType = Unset; - type Subject = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type Tag = S::Tag; + type SubjectType = S::SubjectType; } ///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 Tag = Set; type SubjectType = S::SubjectType; - type Subject = S::Subject; } ///State transition - sets the `subject_type` field to Set pub struct SetSubjectType(PhantomData S>); impl sealed::Sealed for SetSubjectType {} impl State for SetSubjectType { - type Tag = S::Tag; - type SubjectType = Set; type Subject = S::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { type Tag = S::Tag; - type SubjectType = S::SubjectType; - type Subject = Set; + type SubjectType = 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 `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(()); } } @@ -227,9 +227,9 @@ where impl<'a, S> SuggestionBuilder<'a, S> where S: suggestion_state::State, + S::Subject: suggestion_state::IsSet, S::Tag: suggestion_state::IsSet, S::SubjectType: suggestion_state::IsSet, - S::Subject: suggestion_state::IsSet, { /// Build the final struct pub fn build(self) -> Suggestion<'a> { diff --git a/crates/weaver-api/src/app_bsky/video.rs b/crates/weaver-api/src/app_bsky/video.rs index 3df153f..2439949 100644 --- a/crates/weaver-api/src/app_bsky/video.rs +++ b/crates/weaver-api/src/app_bsky/video.rs @@ -52,51 +52,51 @@ pub mod job_status_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type State; type JobId; + 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 State = Unset; type JobId = 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 State = S::State; - type JobId = S::JobId; + type Did = Unset; } ///State transition - sets the `state` field to Set pub struct SetState(PhantomData S>); impl sealed::Sealed for SetState {} impl State for SetState { - type Did = S::Did; type State = Set; type JobId = S::JobId; + type Did = S::Did; } ///State transition - sets the `job_id` field to Set pub struct SetJobId(PhantomData S>); impl sealed::Sealed for SetJobId {} impl State for SetJobId { - type Did = S::Did; type State = S::State; type JobId = 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 State = S::State; + type JobId = S::JobId; + 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 `state` field pub struct state(()); ///Marker type for the `job_id` field pub struct job_id(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -257,9 +257,9 @@ where impl<'a, S> JobStatusBuilder<'a, S> where S: job_status_state::State, - S::Did: job_status_state::IsSet, S::State: job_status_state::IsSet, S::JobId: job_status_state::IsSet, + S::Did: job_status_state::IsSet, { /// Build the final struct pub fn build(self) -> JobStatus<'a> { diff --git a/crates/weaver-api/src/blog_pckt/block/mention.rs b/crates/weaver-api/src/blog_pckt/block/mention.rs index bb7c274..6b65622 100644 --- a/crates/weaver-api/src/blog_pckt/block/mention.rs +++ b/crates/weaver-api/src/blog_pckt/block/mention.rs @@ -35,37 +35,37 @@ pub mod mention_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Did; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Did = Unset; - } - ///State transition - sets the `handle` field to Set - pub struct SetHandle(PhantomData S>); - impl sealed::Sealed for SetHandle {} - impl State for SetHandle { - type Handle = Set; - type Did = S::Did; + type Handle = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Did = Set; + type Handle = S::Handle; + } + ///State transition - sets the `handle` field to Set + pub struct SetHandle(PhantomData S>); + impl sealed::Sealed for SetHandle {} + impl State for SetHandle { + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> MentionBuilder<'a, S> where S: mention_state::State, - S::Handle: mention_state::IsSet, S::Did: mention_state::IsSet, + S::Handle: mention_state::IsSet, { /// Build the final struct pub fn build(self) -> Mention<'a> { diff --git a/crates/weaver-api/src/blog_pckt/post.rs b/crates/weaver-api/src/blog_pckt/post.rs index a9b6989..8c6dae6 100644 --- a/crates/weaver-api/src/blog_pckt/post.rs +++ b/crates/weaver-api/src/blog_pckt/post.rs @@ -54,66 +54,66 @@ pub mod post_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Title; + type Blocks; type Blog; type Url; - type Blocks; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Title = Unset; + type Blocks = Unset; type Blog = Unset; type Url = Unset; - type Blocks = 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 Blocks = S::Blocks; + type Blog = S::Blog; + type Url = S::Url; + } + ///State transition - sets the `blocks` field to Set + pub struct SetBlocks(PhantomData S>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { + type Title = S::Title; + type Blocks = Set; type Blog = S::Blog; type Url = S::Url; - type Blocks = S::Blocks; } ///State transition - sets the `blog` field to Set pub struct SetBlog(PhantomData S>); impl sealed::Sealed for SetBlog {} impl State for SetBlog { type Title = S::Title; + type Blocks = S::Blocks; type Blog = Set; type Url = S::Url; - type Blocks = S::Blocks; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { type Title = S::Title; - type Blog = S::Blog; - type Url = Set; type Blocks = S::Blocks; - } - ///State transition - sets the `blocks` field to Set - pub struct SetBlocks(PhantomData S>); - impl sealed::Sealed for SetBlocks {} - impl State for SetBlocks { - type Title = S::Title; type Blog = S::Blog; - type Url = S::Url; - type Blocks = Set; + type Url = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `blocks` field + pub struct blocks(()); ///Marker type for the `blog` field pub struct blog(()); ///Marker type for the `url` field pub struct url(()); - ///Marker type for the `blocks` field - pub struct blocks(()); } } @@ -358,9 +358,9 @@ impl<'a, S> PostBuilder<'a, S> where S: post_state::State, S::Title: post_state::IsSet, + S::Blocks: post_state::IsSet, S::Blog: post_state::IsSet, S::Url: post_state::IsSet, - S::Blocks: post_state::IsSet, { /// Build the final struct pub fn build(self) -> Post<'a> { diff --git a/crates/weaver-api/src/blog_pckt/richtext/facet.rs b/crates/weaver-api/src/blog_pckt/richtext/facet.rs index 8e28b64..7beda8e 100644 --- a/crates/weaver-api/src/blog_pckt/richtext/facet.rs +++ b/crates/weaver-api/src/blog_pckt/richtext/facet.rs @@ -552,37 +552,37 @@ pub mod byte_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ByteStart; type ByteEnd; + type ByteStart; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ByteStart = Unset; type ByteEnd = Unset; - } - ///State transition - sets the `byte_start` field to Set - pub struct SetByteStart(PhantomData S>); - impl sealed::Sealed for SetByteStart {} - impl State for SetByteStart { - type ByteStart = Set; - type ByteEnd = S::ByteEnd; + type ByteStart = Unset; } ///State transition - sets the `byte_end` field to Set pub struct SetByteEnd(PhantomData S>); impl sealed::Sealed for SetByteEnd {} impl State for SetByteEnd { - type ByteStart = S::ByteStart; type ByteEnd = Set; + type ByteStart = S::ByteStart; + } + ///State transition - sets the `byte_start` field to Set + pub struct SetByteStart(PhantomData S>); + impl sealed::Sealed for SetByteStart {} + impl State for SetByteStart { + type ByteEnd = S::ByteEnd; + type ByteStart = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `byte_start` field - pub struct byte_start(()); ///Marker type for the `byte_end` field pub struct byte_end(()); + ///Marker type for the `byte_start` field + pub struct byte_start(()); } } @@ -652,8 +652,8 @@ where impl<'a, S> ByteSliceBuilder<'a, S> where S: byte_slice_state::State, - S::ByteStart: byte_slice_state::IsSet, S::ByteEnd: byte_slice_state::IsSet, + S::ByteStart: byte_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> ByteSlice<'a> { @@ -1051,37 +1051,37 @@ pub mod facet_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Index; type Features; + type Index; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Index = Unset; type Features = Unset; - } - ///State transition - sets the `index` field to Set - pub struct SetIndex(PhantomData S>); - impl sealed::Sealed for SetIndex {} - impl State for SetIndex { - type Index = Set; - type Features = S::Features; + type Index = Unset; } ///State transition - sets the `features` field to Set pub struct SetFeatures(PhantomData S>); impl sealed::Sealed for SetFeatures {} impl State for SetFeatures { - type Index = S::Index; type Features = Set; + type Index = S::Index; + } + ///State transition - sets the `index` field to Set + pub struct SetIndex(PhantomData S>); + impl sealed::Sealed for SetIndex {} + impl State for SetIndex { + type Features = S::Features; + type Index = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `index` field - pub struct index(()); ///Marker type for the `features` field pub struct features(()); + ///Marker type for the `index` field + pub struct index(()); } } @@ -1154,8 +1154,8 @@ where impl<'a, S> FacetBuilder<'a, S> where S: facet_state::State, - S::Index: facet_state::IsSet, S::Features: facet_state::IsSet, + S::Index: facet_state::IsSet, { /// Build the final struct pub fn build(self) -> Facet<'a> { diff --git a/crates/weaver-api/src/chat_bsky/actor.rs b/crates/weaver-api/src/chat_bsky/actor.rs index 2b55ebb..010aaa7 100644 --- a/crates/weaver-api/src/chat_bsky/actor.rs +++ b/crates/weaver-api/src/chat_bsky/actor.rs @@ -58,37 +58,37 @@ pub mod profile_view_basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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(()); } } @@ -305,8 +305,8 @@ impl<'a, S: profile_view_basic_state::State> ProfileViewBasicBuilder<'a, S> { impl<'a, S> ProfileViewBasicBuilder<'a, S> where S: profile_view_basic_state::State, - S::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> { diff --git a/crates/weaver-api/src/chat_bsky/convo.rs b/crates/weaver-api/src/chat_bsky/convo.rs index 483ecf6..ab30d60 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 Rev; + type Id; type Members; + type Rev; type Muted; type UnreadCount; - type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev = Unset; + type Id = Unset; type Members = Unset; + type Rev = Unset; type Muted = Unset; type UnreadCount = Unset; - type Id = 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; + ///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 Members = S::Members; + type Rev = S::Rev; type Muted = S::Muted; type UnreadCount = S::UnreadCount; - type Id = S::Id; } ///State transition - sets the `members` field to Set pub struct SetMembers(PhantomData S>); impl sealed::Sealed for SetMembers {} impl State for SetMembers { - type Rev = S::Rev; + type Id = S::Id; type Members = Set; + type Rev = S::Rev; type Muted = S::Muted; type UnreadCount = S::UnreadCount; + } + ///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 Members = S::Members; + type Rev = Set; + type Muted = S::Muted; + type UnreadCount = S::UnreadCount; } ///State transition - sets the `muted` field to Set pub struct SetMuted(PhantomData S>); impl sealed::Sealed for SetMuted {} impl State for SetMuted { - type Rev = S::Rev; + type Id = S::Id; type Members = S::Members; + type Rev = S::Rev; type Muted = Set; type UnreadCount = S::UnreadCount; - type Id = S::Id; } ///State transition - sets the `unread_count` field to Set pub struct SetUnreadCount(PhantomData S>); impl sealed::Sealed for SetUnreadCount {} impl State for SetUnreadCount { - type Rev = S::Rev; - type Members = S::Members; - type Muted = S::Muted; - type UnreadCount = 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 Rev = S::Rev; type Members = S::Members; + type Rev = S::Rev; type Muted = S::Muted; - type UnreadCount = S::UnreadCount; - type Id = Set; + type UnreadCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev` field - pub struct rev(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `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 `id` field - pub struct id(()); } } @@ -331,11 +331,11 @@ where impl<'a, S> ConvoViewBuilder<'a, S> where S: convo_view_state::State, - S::Rev: convo_view_state::IsSet, + S::Id: convo_view_state::IsSet, 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::Id: convo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ConvoView<'a> { @@ -1733,65 +1733,65 @@ pub mod deleted_message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type Id; type SentAt; - type Rev; type Sender; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; type Id = Unset; type SentAt = Unset; - type Rev = Unset; type Sender = 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 Id = S::Id; + type SentAt = S::SentAt; + 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 Rev = S::Rev; type Id = Set; type SentAt = S::SentAt; - type Rev = S::Rev; type Sender = S::Sender; } ///State transition - sets the `sent_at` field to Set pub struct SetSentAt(PhantomData S>); impl sealed::Sealed for SetSentAt {} impl State for SetSentAt { - type Id = S::Id; - type SentAt = Set; type Rev = S::Rev; - type Sender = S::Sender; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type Id = S::Id; - type SentAt = S::SentAt; - type Rev = Set; + type SentAt = 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 Rev = S::Rev; type Id = S::Id; type SentAt = S::SentAt; - type Rev = S::Rev; type Sender = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `id` field pub struct id(()); ///Marker type for the `sent_at` field pub struct sent_at(()); - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `sender` field pub struct sender(()); } @@ -1906,9 +1906,9 @@ where impl<'a, S> DeletedMessageViewBuilder<'a, S> where S: deleted_message_view_state::State, + S::Rev: deleted_message_view_state::IsSet, S::Id: deleted_message_view_state::IsSet, S::SentAt: deleted_message_view_state::IsSet, - S::Rev: deleted_message_view_state::IsSet, S::Sender: deleted_message_view_state::IsSet, { /// Build the final struct @@ -2025,66 +2025,66 @@ pub mod log_add_reaction_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Message; + type Reaction; 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 Message = Unset; + type Reaction = Unset; type Rev = Unset; type ConvoId = Unset; - type Reaction = Unset; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { type Message = Set; + type Reaction = S::Reaction; + type Rev = S::Rev; + type ConvoId = S::ConvoId; + } + ///State transition - sets the `reaction` field to Set + pub struct SetReaction(PhantomData S>); + impl sealed::Sealed for SetReaction {} + impl State for SetReaction { + type Message = S::Message; + type Reaction = Set; 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 Message = S::Message; + type Reaction = S::Reaction; 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 Message = S::Message; type Rev = S::Rev; - type ConvoId = S::ConvoId; - type Reaction = Set; + type ConvoId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `message` field pub struct message(()); + ///Marker type for the `reaction` field + pub struct reaction(()); ///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(()); } } @@ -2198,9 +2198,9 @@ impl<'a, S> LogAddReactionBuilder<'a, S> where S: log_add_reaction_state::State, S::Message: log_add_reaction_state::IsSet, + S::Reaction: 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 pub fn build(self) -> LogAddReaction<'a> { @@ -2333,50 +2333,50 @@ 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 Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Rev = Unset; - type Message = Unset; type ConvoId = Unset; + type Message = Unset; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { type Rev = Set; - type Message = S::Message; - type 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 Message = S::Message; } ///State transition - sets the `convo_id` field to Set pub struct SetConvoId(PhantomData S>); impl sealed::Sealed for SetConvoId {} impl State for SetConvoId { type Rev = S::Rev; - type Message = S::Message; type ConvoId = Set; + type Message = S::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData S>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type Rev = S::Rev; + type ConvoId = S::ConvoId; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `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 `message` field + pub struct message(()); } } @@ -2470,8 +2470,8 @@ 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::Message: log_create_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogCreateMessage<'a> { @@ -2565,51 +2565,51 @@ pub mod log_delete_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev; - type ConvoId; 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 ConvoId = 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; + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData S>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type Message = Set; type ConvoId = S::ConvoId; - type Message = S::Message; + 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 Rev = S::Rev; - type ConvoId = Set; type Message = S::Message; - } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData S>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { + type 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 Message = Set; + type Rev = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev` field - pub struct rev(()); - ///Marker type for the `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(()); + ///Marker type for the `rev` field + pub struct rev(()); } } @@ -2702,9 +2702,9 @@ where impl<'a, S> LogDeleteMessageBuilder<'a, S> where S: log_delete_message_state::State, - S::Rev: log_delete_message_state::IsSet, - S::ConvoId: log_delete_message_state::IsSet, S::Message: log_delete_message_state::IsSet, + S::ConvoId: log_delete_message_state::IsSet, + S::Rev: log_delete_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogDeleteMessage<'a> { @@ -2870,51 +2870,51 @@ pub mod log_read_message_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Message; - type Rev; type ConvoId; + type Rev; + type Message; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Message = Unset; - type Rev = Unset; type ConvoId = Unset; + type Rev = Unset; + type Message = Unset; } - ///State transition - sets the `message` field to Set - pub struct SetMessage(PhantomData S>); - impl sealed::Sealed for SetMessage {} - impl State for SetMessage { - type Message = Set; + ///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 ConvoId = S::ConvoId; + type Message = S::Message; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type 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 = Set; type Message = S::Message; + } + ///State transition - sets the `message` field to Set + pub struct SetMessage(PhantomData S>); + impl sealed::Sealed for SetMessage {} + impl State for SetMessage { + type ConvoId = S::ConvoId; type Rev = S::Rev; - type ConvoId = Set; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `message` field - pub struct message(()); - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `convo_id` field pub struct convo_id(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `message` field + pub struct message(()); } } @@ -3007,9 +3007,9 @@ where impl<'a, S> LogReadMessageBuilder<'a, S> where S: log_read_message_state::State, - S::Message: log_read_message_state::IsSet, - S::Rev: log_read_message_state::IsSet, S::ConvoId: log_read_message_state::IsSet, + S::Rev: log_read_message_state::IsSet, + S::Message: log_read_message_state::IsSet, { /// Build the final struct pub fn build(self) -> LogReadMessage<'a> { @@ -3105,67 +3105,67 @@ pub mod log_remove_reaction_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Rev; type Reaction; type ConvoId; type Message; - type Rev; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Rev = Unset; type Reaction = Unset; type ConvoId = Unset; type Message = Unset; - type Rev = Unset; + } + ///State transition - sets the `rev` field to Set + pub struct SetRev(PhantomData S>); + impl sealed::Sealed for SetRev {} + impl State for SetRev { + type Rev = Set; + type Reaction = S::Reaction; + type ConvoId = S::ConvoId; + type Message = S::Message; } ///State transition - sets the `reaction` field to Set pub struct SetReaction(PhantomData S>); impl sealed::Sealed for SetReaction {} impl State for SetReaction { + type Rev = S::Rev; type Reaction = Set; type ConvoId = S::ConvoId; type Message = S::Message; - 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 Rev = S::Rev; type Reaction = S::Reaction; type ConvoId = Set; type Message = S::Message; - type Rev = S::Rev; } ///State transition - sets the `message` field to Set pub struct SetMessage(PhantomData S>); impl sealed::Sealed for SetMessage {} impl State for SetMessage { - type Reaction = S::Reaction; - type ConvoId = S::ConvoId; - type Message = Set; type Rev = S::Rev; - } - ///State transition - sets the `rev` field to Set - pub struct SetRev(PhantomData S>); - impl sealed::Sealed for SetRev {} - impl State for SetRev { type Reaction = S::Reaction; type ConvoId = S::ConvoId; - type Message = S::Message; - type Rev = Set; + type Message = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `rev` field + pub struct rev(()); ///Marker type for the `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 `rev` field - pub struct rev(()); } } @@ -3278,10 +3278,10 @@ where impl<'a, S> LogRemoveReactionBuilder<'a, S> where S: log_remove_reaction_state::State, + 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::Rev: log_remove_reaction_state::IsSet, { /// Build the final struct pub fn build(self) -> LogRemoveReaction<'a> { @@ -3670,51 +3670,51 @@ pub mod message_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Did; type MessageId; type ConvoId; - 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 MessageId = Unset; type ConvoId = 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 MessageId = S::MessageId; + type ConvoId = S::ConvoId; } ///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 MessageId = Set; type ConvoId = S::ConvoId; - type Did = S::Did; } ///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 MessageId = S::MessageId; - type ConvoId = S::ConvoId; - type Did = Set; + type ConvoId = 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 `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(()); } } @@ -3807,9 +3807,9 @@ where impl<'a, S> MessageRefBuilder<'a, S> where S: message_ref_state::State, + S::Did: message_ref_state::IsSet, S::MessageId: message_ref_state::IsSet, S::ConvoId: message_ref_state::IsSet, - S::Did: message_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageRef<'a> { @@ -3898,85 +3898,85 @@ pub mod message_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Rev; type Id; + type Rev; + type Text; type Sender; type SentAt; - type Text; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rev = Unset; type Id = Unset; + type Rev = Unset; + type Text = Unset; type Sender = Unset; type SentAt = Unset; - type Text = 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 Rev = S::Rev; + type Text = S::Text; + 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 Rev = Set; type Id = S::Id; + type Rev = Set; + type Text = S::Text; type Sender = S::Sender; type SentAt = S::SentAt; - type Text = S::Text; } - ///State transition - sets the `id` field to Set - pub struct SetId(PhantomData S>); - impl sealed::Sealed for SetId {} - impl State for SetId { + ///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 Rev = S::Rev; - type Id = Set; + type Text = Set; type Sender = S::Sender; type SentAt = S::SentAt; - type Text = S::Text; } ///State transition - sets the `sender` field to Set pub struct SetSender(PhantomData S>); impl sealed::Sealed for SetSender {} impl State for SetSender { - type Rev = S::Rev; type Id = S::Id; + type Rev = S::Rev; + type Text = S::Text; type Sender = Set; type SentAt = S::SentAt; - type Text = S::Text; } ///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; - type Text = S::Text; - } - ///State transition - sets the `text` field to Set - pub struct SetText(PhantomData S>); - impl sealed::Sealed for SetText {} - impl State for SetText { type Rev = S::Rev; - type Id = S::Id; + type Text = S::Text; type Sender = S::Sender; - type SentAt = S::SentAt; - type Text = Set; + type SentAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `text` field + pub struct text(()); ///Marker type for the `sender` field pub struct sender(()); ///Marker type for the `sent_at` field pub struct sent_at(()); - ///Marker type for the `text` field - pub struct text(()); } } @@ -4169,11 +4169,11 @@ where impl<'a, S> MessageViewBuilder<'a, S> where S: message_view_state::State, - S::Rev: message_view_state::IsSet, S::Id: message_view_state::IsSet, + S::Rev: message_view_state::IsSet, + S::Text: message_view_state::IsSet, S::Sender: message_view_state::IsSet, S::SentAt: message_view_state::IsSet, - S::Text: message_view_state::IsSet, { /// Build the final struct pub fn build(self) -> MessageView<'a> { @@ -4427,51 +4427,51 @@ pub mod reaction_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Sender; type CreatedAt; type Value; - type Sender; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Sender = Unset; type CreatedAt = Unset; type Value = Unset; - type Sender = Unset; + } + ///State transition - sets the `sender` field to Set + pub struct SetSender(PhantomData S>); + impl sealed::Sealed for SetSender {} + impl State for SetSender { + type Sender = Set; + type CreatedAt = S::CreatedAt; + type Value = S::Value; } ///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 = S::Sender; type CreatedAt = Set; type Value = S::Value; - type Sender = S::Sender; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type CreatedAt = S::CreatedAt; - type Value = Set; type Sender = S::Sender; - } - ///State transition - sets the `sender` field to Set - pub struct SetSender(PhantomData S>); - impl sealed::Sealed for SetSender {} - impl State for SetSender { type CreatedAt = S::CreatedAt; - type Value = S::Value; - type Sender = Set; + type Value = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `sender` field + pub struct sender(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `sender` field - pub struct sender(()); } } @@ -4564,9 +4564,9 @@ where impl<'a, S> ReactionViewBuilder<'a, S> where S: reaction_view_state::State, + S::Sender: reaction_view_state::IsSet, S::CreatedAt: reaction_view_state::IsSet, S::Value: reaction_view_state::IsSet, - S::Sender: reaction_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ReactionView<'a> { diff --git a/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs b/crates/weaver-api/src/chat_bsky/convo/send_message_batch.rs index c4e6468..a875bcd 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 72eb8ac..384b9d7 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 MessagesReceived; + type Convos; type ConvosStarted; + type MessagesReceived; type MessagesSent; - type Convos; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type MessagesReceived = Unset; + type Convos = Unset; type ConvosStarted = Unset; + type MessagesReceived = Unset; type MessagesSent = Unset; - type Convos = Unset; } - ///State transition - sets the `messages_received` field to Set - pub struct SetMessagesReceived(PhantomData S>); - impl sealed::Sealed for SetMessagesReceived {} - impl State for SetMessagesReceived { - type MessagesReceived = Set; + ///State transition - sets the `convos` field to Set + pub struct SetConvos(PhantomData S>); + impl sealed::Sealed for SetConvos {} + impl State for SetConvos { + type Convos = Set; type ConvosStarted = S::ConvosStarted; + type MessagesReceived = S::MessagesReceived; type MessagesSent = S::MessagesSent; - 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 Convos = S::Convos; type ConvosStarted = Set; + type MessagesReceived = S::MessagesReceived; type MessagesSent = S::MessagesSent; + } + ///State transition - sets the `messages_received` field to Set + pub struct SetMessagesReceived(PhantomData S>); + impl sealed::Sealed for SetMessagesReceived {} + impl State for SetMessagesReceived { type Convos = S::Convos; + type ConvosStarted = S::ConvosStarted; + type MessagesReceived = Set; + type MessagesSent = S::MessagesSent; } ///State transition - sets the `messages_sent` field to Set pub struct SetMessagesSent(PhantomData S>); impl sealed::Sealed for SetMessagesSent {} impl State for SetMessagesSent { - type MessagesReceived = S::MessagesReceived; - type ConvosStarted = S::ConvosStarted; - type MessagesSent = Set; type Convos = S::Convos; - } - ///State transition - sets the `convos` field to Set - pub struct SetConvos(PhantomData S>); - impl sealed::Sealed for SetConvos {} - impl State for SetConvos { - type MessagesReceived = S::MessagesReceived; type ConvosStarted = S::ConvosStarted; - type MessagesSent = S::MessagesSent; - type Convos = Set; + type MessagesReceived = S::MessagesReceived; + type MessagesSent = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `messages_received` field - pub struct messages_received(()); + ///Marker type for the `convos` field + pub struct convos(()); ///Marker type for the `convos_started` field pub struct convos_started(()); + ///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(()); } } @@ -358,10 +358,10 @@ where impl<'a, S> MetadataBuilder<'a, S> where S: metadata_state::State, - S::MessagesReceived: metadata_state::IsSet, + S::Convos: metadata_state::IsSet, S::ConvosStarted: metadata_state::IsSet, + S::MessagesReceived: metadata_state::IsSet, S::MessagesSent: metadata_state::IsSet, - S::Convos: 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 1715a0d..be51833 100644 --- a/crates/weaver-api/src/com_atproto/admin.rs +++ b/crates/weaver-api/src/com_atproto/admin.rs @@ -81,50 +81,50 @@ pub mod account_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type IndexedAt; - 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 IndexedAt = Unset; - type Handle = Unset; type Did = Unset; + type Handle = Unset; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { type 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 IndexedAt = S::IndexedAt; - type Handle = Set; type Did = S::Did; + type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { type IndexedAt = S::IndexedAt; - type 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 IndexedAt = S::IndexedAt; + type Did = S::Did; + type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -402,8 +402,8 @@ impl<'a, S> AccountViewBuilder<'a, S> where S: account_view_state::State, S::IndexedAt: account_view_state::IsSet, - S::Handle: account_view_state::IsSet, S::Did: account_view_state::IsSet, + S::Handle: account_view_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountView<'a> { @@ -907,37 +907,37 @@ pub mod repo_blob_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Did; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Did = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Did = S::Did; + type Cid = Unset; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Cid = S::Cid; type Did = Set; + type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Did = S::Did; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -1030,8 +1030,8 @@ impl<'a, S: repo_blob_ref_state::State> RepoBlobRefBuilder<'a, S> { impl<'a, S> RepoBlobRefBuilder<'a, S> where S: repo_blob_ref_state::State, - S::Cid: repo_blob_ref_state::IsSet, S::Did: repo_blob_ref_state::IsSet, + S::Cid: repo_blob_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoBlobRef<'a> { diff --git a/crates/weaver-api/src/com_atproto/admin/update_account_password.rs b/crates/weaver-api/src/com_atproto/admin/update_account_password.rs index fdf105f..47c11d7 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 Did; 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; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Password = S::Password; + type 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 Did = S::Did; 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 Password = S::Password; + 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 `did` field + pub struct did(()); } } @@ -142,8 +142,8 @@ where impl<'a, S> UpdateAccountPasswordBuilder<'a, S> where S: update_account_password_state::State, - S::Did: update_account_password_state::IsSet, S::Password: update_account_password_state::IsSet, + S::Did: 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 062bb12..ad1d03c 100644 --- a/crates/weaver-api/src/com_atproto/identity.rs +++ b/crates/weaver-api/src/com_atproto/identity.rs @@ -47,51 +47,51 @@ pub mod identity_info_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Did; type DidDoc; + type Handle; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Did = Unset; type DidDoc = 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 DidDoc = S::DidDoc; + 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 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 Handle = S::Handle; type Did = S::Did; 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 `handle` field - pub struct handle(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `did_doc` field pub struct did_doc(()); + ///Marker type for the `handle` field + pub struct handle(()); } } @@ -184,9 +184,9 @@ where impl<'a, S> IdentityInfoBuilder<'a, S> where S: identity_info_state::State, - S::Handle: identity_info_state::IsSet, S::Did: 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 67acbce..e4c1415 100644 --- a/crates/weaver-api/src/com_atproto/label.rs +++ b/crates/weaver-api/src/com_atproto/label.rs @@ -63,65 +63,65 @@ pub mod label_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cts; type Src; + type Uri; type Val; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cts = Unset; type Src = Unset; + type Uri = Unset; type Val = Unset; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cts = S::Cts; - type Src = S::Src; - type Val = S::Val; - } ///State transition - sets the `cts` field to Set pub struct SetCts(PhantomData S>); impl sealed::Sealed for SetCts {} impl State for SetCts { - type Uri = S::Uri; type Cts = Set; type Src = S::Src; + type Uri = S::Uri; type Val = S::Val; } ///State transition - sets the `src` field to Set pub struct SetSrc(PhantomData S>); impl sealed::Sealed for SetSrc {} impl State for SetSrc { - type Uri = S::Uri; type Cts = S::Cts; type Src = Set; + type Uri = S::Uri; + type Val = S::Val; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cts = S::Cts; + type Src = S::Src; + type Uri = Set; type Val = S::Val; } ///State transition - sets the `val` field to Set pub struct SetVal(PhantomData S>); impl sealed::Sealed for SetVal {} impl State for SetVal { - type Uri = S::Uri; type Cts = S::Cts; type Src = S::Src; + type Uri = S::Uri; type Val = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cts` field pub struct cts(()); ///Marker type for the `src` field pub struct src(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `val` field pub struct val(()); } @@ -328,9 +328,9 @@ impl<'a, S: label_state::State> LabelBuilder<'a, S> { impl<'a, S> LabelBuilder<'a, S> where S: label_state::State, - S::Uri: label_state::IsSet, S::Cts: label_state::IsSet, S::Src: label_state::IsSet, + S::Uri: label_state::IsSet, S::Val: label_state::IsSet, { /// Build the final struct @@ -1060,66 +1060,66 @@ pub mod label_value_definition_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Severity; - type Blurs; - type Locales; type Identifier; + type Locales; + type Blurs; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Severity = Unset; - type Blurs = Unset; - type Locales = Unset; type Identifier = Unset; + type Locales = Unset; + type Blurs = Unset; } ///State transition - sets the `severity` field to Set pub struct SetSeverity(PhantomData S>); impl sealed::Sealed for SetSeverity {} impl State for SetSeverity { type Severity = Set; - type Blurs = S::Blurs; - type Locales = S::Locales; type Identifier = S::Identifier; + type Locales = S::Locales; + type Blurs = S::Blurs; } - ///State transition - sets the `blurs` field to Set - pub struct SetBlurs(PhantomData S>); - impl sealed::Sealed for SetBlurs {} - impl State for SetBlurs { + ///State transition - sets the `identifier` field to Set + pub struct SetIdentifier(PhantomData S>); + impl sealed::Sealed for SetIdentifier {} + impl State for SetIdentifier { type Severity = S::Severity; - type Blurs = Set; + type Identifier = 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 Blurs = S::Blurs; - type Locales = Set; type Identifier = S::Identifier; + type Locales = Set; + type Blurs = S::Blurs; } - ///State transition - sets the `identifier` field to Set - pub struct SetIdentifier(PhantomData S>); - impl sealed::Sealed for SetIdentifier {} - impl State for SetIdentifier { + ///State transition - sets the `blurs` field to Set + pub struct SetBlurs(PhantomData S>); + impl sealed::Sealed for SetBlurs {} + impl State for SetBlurs { type Severity = S::Severity; - type Blurs = S::Blurs; + type Identifier = S::Identifier; type Locales = S::Locales; - type Identifier = 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 `blurs` field - pub struct blurs(()); - ///Marker type for the `locales` field - pub struct locales(()); ///Marker type for the `identifier` field pub struct identifier(()); + ///Marker type for the `locales` field + pub struct locales(()); + ///Marker type for the `blurs` field + pub struct blurs(()); } } @@ -1275,9 +1275,9 @@ impl<'a, S> LabelValueDefinitionBuilder<'a, S> where S: label_value_definition_state::State, S::Severity: label_value_definition_state::IsSet, - S::Blurs: label_value_definition_state::IsSet, - S::Locales: label_value_definition_state::IsSet, S::Identifier: label_value_definition_state::IsSet, + S::Locales: label_value_definition_state::IsSet, + S::Blurs: label_value_definition_state::IsSet, { /// Build the final struct pub fn build(self) -> LabelValueDefinition<'a> { diff --git a/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs index 2e30cc0..13df8eb 100644 --- a/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs +++ b/crates/weaver-api/src/com_atproto/label/subscribe_labels.rs @@ -286,37 +286,37 @@ pub mod labels_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Seq; type Labels; + type Seq; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Seq = Unset; type Labels = Unset; - } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { - type Seq = Set; - type Labels = S::Labels; + type Seq = Unset; } ///State transition - sets the `labels` field to Set pub struct SetLabels(PhantomData S>); impl sealed::Sealed for SetLabels {} impl State for SetLabels { - type Seq = S::Seq; type Labels = Set; + type Seq = S::Seq; + } + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Labels = S::Labels; + type Seq = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `seq` field - pub struct seq(()); ///Marker type for the `labels` field pub struct labels(()); + ///Marker type for the `seq` field + pub struct seq(()); } } @@ -389,8 +389,8 @@ where impl<'a, S> LabelsBuilder<'a, S> where S: labels_state::State, - S::Seq: labels_state::IsSet, S::Labels: labels_state::IsSet, + S::Seq: labels_state::IsSet, { /// Build the final struct pub fn build(self) -> Labels<'a> { diff --git a/crates/weaver-api/src/com_atproto/moderation/create_report.rs b/crates/weaver-api/src/com_atproto/moderation/create_report.rs index 94bdf88..5768a05 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 7532881..0eafafb 100644 --- a/crates/weaver-api/src/com_atproto/repo/apply_writes.rs +++ b/crates/weaver-api/src/com_atproto/repo/apply_writes.rs @@ -728,37 +728,37 @@ pub mod create_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = S::Cid; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; type Cid = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -851,8 +851,8 @@ impl<'a, S: create_result_state::State> CreateResultBuilder<'a, S> { impl<'a, S> CreateResultBuilder<'a, S> where S: create_result_state::State, - S::Uri: create_result_state::IsSet, S::Cid: create_result_state::IsSet, + S::Uri: create_result_state::IsSet, { /// Build the final struct pub fn build(self) -> CreateResult<'a> { @@ -1020,37 +1020,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(()); } } @@ -1131,8 +1131,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> { @@ -1241,37 +1241,37 @@ pub mod apply_writes_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Writes; type Repo; + type Writes; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Writes = Unset; type Repo = Unset; - } - ///State transition - sets the `writes` field to Set - pub struct SetWrites(PhantomData S>); - impl sealed::Sealed for SetWrites {} - impl State for SetWrites { - type Writes = Set; - type Repo = S::Repo; + type Writes = Unset; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Writes = S::Writes; type Repo = Set; + type Writes = S::Writes; + } + ///State transition - sets the `writes` field to Set + pub struct SetWrites(PhantomData S>); + impl sealed::Sealed for SetWrites {} + impl State for SetWrites { + type Repo = S::Repo; + type Writes = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `writes` field - pub struct writes(()); ///Marker type for the `repo` field pub struct repo(()); + ///Marker type for the `writes` field + pub struct writes(()); } } @@ -1378,8 +1378,8 @@ where impl<'a, S> ApplyWritesBuilder<'a, S> where S: apply_writes_state::State, - S::Writes: apply_writes_state::IsSet, S::Repo: apply_writes_state::IsSet, + S::Writes: apply_writes_state::IsSet, { /// Build the final struct pub fn build(self) -> ApplyWrites<'a> { @@ -1569,50 +1569,50 @@ pub mod update_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Value; - type Rkey; type Collection; + type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Value = Unset; - type Rkey = Unset; type Collection = Unset; + type Rkey = Unset; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { type Value = Set; - type Rkey = S::Rkey; - type Collection = S::Collection; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData S>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Value = S::Value; - type Rkey = Set; type Collection = S::Collection; + type Rkey = S::Rkey; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { type Value = S::Value; - type Rkey = S::Rkey; type Collection = Set; + type Rkey = S::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Value = S::Value; + type Collection = S::Collection; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `rkey` field - pub struct rkey(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -1714,8 +1714,8 @@ impl<'a, S> UpdateBuilder<'a, S> where S: update_state::State, S::Value: update_state::IsSet, - S::Rkey: update_state::IsSet, S::Collection: update_state::IsSet, + S::Rkey: update_state::IsSet, { /// Build the final struct pub fn build(self) -> Update<'a> { @@ -1791,37 +1791,37 @@ pub mod update_result_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Cid = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Cid = S::Cid; + type Uri = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Uri = S::Uri; type Cid = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1914,8 +1914,8 @@ impl<'a, S: update_result_state::State> UpdateResultBuilder<'a, S> { impl<'a, S> UpdateResultBuilder<'a, S> where S: update_result_state::State, - S::Uri: update_result_state::IsSet, S::Cid: update_result_state::IsSet, + S::Uri: update_result_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateResult<'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 1e7e485..c38096b 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 Rkey; - type Repo; type Collection; + type Repo; + type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Rkey = Unset; - type Repo = Unset; type Collection = Unset; + type Repo = Unset; + type Rkey = 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; + ///State transition - sets the `collection` field to Set + pub struct SetCollection(PhantomData S>); + impl sealed::Sealed for SetCollection {} + impl State for SetCollection { + type Collection = Set; type Repo = S::Repo; - type Collection = S::Collection; + type Rkey = S::Rkey; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Rkey = S::Rkey; - type Repo = Set; type Collection = S::Collection; - } - ///State transition - sets the `collection` field to Set - pub struct SetCollection(PhantomData S>); - impl sealed::Sealed for SetCollection {} - impl State for SetCollection { + type Repo = Set; type Rkey = S::Rkey; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { + type Collection = S::Collection; type Repo = S::Repo; - type Collection = Set; + type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `rkey` field - pub struct rkey(()); - ///Marker type for the `repo` field - pub struct repo(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `repo` field + pub struct repo(()); + ///Marker type for the `rkey` field + pub struct rkey(()); } } @@ -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::Rkey: delete_record_state::IsSet, - S::Repo: delete_record_state::IsSet, S::Collection: delete_record_state::IsSet, + S::Repo: delete_record_state::IsSet, + S::Rkey: delete_record_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteRecord<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs b/crates/weaver-api/src/com_atproto/repo/list_missing_blobs.rs index 6a5fbc5..3bc064e 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 Cid; type RecordUri; + 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 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 Cid = Set; - type RecordUri = S::RecordUri; + 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 Cid = S::Cid; type RecordUri = 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 RecordUri = S::RecordUri; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `record_uri` field pub struct record_uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -289,8 +289,8 @@ where impl<'a, S> RecordBlobBuilder<'a, S> where S: record_blob_state::State, - S::Cid: record_blob_state::IsSet, S::RecordUri: record_blob_state::IsSet, + S::Cid: record_blob_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordBlob<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/list_records.rs b/crates/weaver-api/src/com_atproto/repo/list_records.rs index b683462..76cf774 100644 --- a/crates/weaver-api/src/com_atproto/repo/list_records.rs +++ b/crates/weaver-api/src/com_atproto/repo/list_records.rs @@ -278,51 +278,51 @@ pub mod record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; type Value; type Uri; - type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Cid = Unset; type Value = Unset; type Uri = Unset; - type Cid = Unset; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Cid = Set; + type Value = S::Value; + type Uri = S::Uri; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { + type Cid = S::Cid; type Value = 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 Uri = Set; type Cid = S::Cid; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { type Value = S::Value; - type Uri = S::Uri; - type Cid = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `value` field pub struct value(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); } } @@ -415,9 +415,9 @@ where impl<'a, S> RecordBuilder<'a, S> where S: record_state::State, + S::Cid: record_state::IsSet, S::Value: record_state::IsSet, S::Uri: record_state::IsSet, - S::Cid: record_state::IsSet, { /// Build the final struct pub fn build(self) -> Record<'a> { diff --git a/crates/weaver-api/src/com_atproto/repo/put_record.rs b/crates/weaver-api/src/com_atproto/repo/put_record.rs index a2a585e..32229f9 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 Record; type Collection; type Rkey; type Repo; - 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 Collection = Unset; type Rkey = Unset; type Repo = Unset; - type Record = Unset; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Record = Set; + type Collection = S::Collection; + type Rkey = S::Rkey; + type Repo = S::Repo; } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { + type Record = S::Record; type Collection = Set; type Rkey = S::Rkey; type Repo = S::Repo; - type Record = S::Record; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { + type Record = S::Record; type Collection = S::Collection; type Rkey = Set; type Repo = S::Repo; - type Record = S::Record; } ///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; 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 Collection = S::Collection; type Rkey = S::Rkey; - type Repo = S::Repo; - type Record = Set; + type Repo = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `collection` field pub struct collection(()); ///Marker type for the `rkey` field pub struct rkey(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `record` field - pub struct record(()); } } @@ -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::Record: put_record_state::IsSet, S::Collection: put_record_state::IsSet, S::Rkey: put_record_state::IsSet, S::Repo: put_record_state::IsSet, - S::Record: 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 7b96275..3fae74a 100644 --- a/crates/weaver-api/src/com_atproto/server.rs +++ b/crates/weaver-api/src/com_atproto/server.rs @@ -66,119 +66,113 @@ pub mod invite_code_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Disabled; - type Available; - type Uses; type Code; type ForAccount; type CreatedBy; type CreatedAt; + type Uses; + type Available; + type Disabled; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Disabled = Unset; - type Available = Unset; - type Uses = Unset; type Code = Unset; type ForAccount = Unset; type CreatedBy = Unset; type CreatedAt = 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; - type Available = S::Available; - type Uses = S::Uses; - type Code = S::Code; - type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `available` field to Set - pub struct SetAvailable(PhantomData S>); - impl sealed::Sealed for SetAvailable {} - impl State for SetAvailable { - type Disabled = S::Disabled; - type Available = Set; - type Uses = S::Uses; - type Code = S::Code; - type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `uses` field to Set - pub struct SetUses(PhantomData S>); - impl sealed::Sealed for SetUses {} - impl State for SetUses { - type Disabled = S::Disabled; - type Available = S::Available; - type Uses = Set; - type Code = S::Code; - type ForAccount = S::ForAccount; - type CreatedBy = S::CreatedBy; - type CreatedAt = S::CreatedAt; + type Uses = Unset; + type Available = Unset; + type Disabled = Unset; } ///State transition - sets the `code` field to Set pub struct SetCode(PhantomData S>); impl sealed::Sealed for SetCode {} impl State for SetCode { - type Disabled = S::Disabled; - type Available = S::Available; - type Uses = S::Uses; type Code = Set; type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; + type Available = S::Available; + type Disabled = S::Disabled; } ///State transition - sets the `for_account` field to Set pub struct SetForAccount(PhantomData S>); impl sealed::Sealed for SetForAccount {} impl State for SetForAccount { - type Disabled = S::Disabled; - type Available = S::Available; - type Uses = S::Uses; type Code = S::Code; type ForAccount = Set; type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; + type Available = S::Available; + type Disabled = S::Disabled; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Disabled = S::Disabled; - type Available = S::Available; - type Uses = S::Uses; type Code = S::Code; type ForAccount = S::ForAccount; type CreatedBy = Set; type CreatedAt = S::CreatedAt; + type Uses = S::Uses; + type Available = S::Available; + 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 Code = S::Code; + type ForAccount = S::ForAccount; + type CreatedBy = S::CreatedBy; + type CreatedAt = Set; + type Uses = S::Uses; + type Available = S::Available; type Disabled = S::Disabled; + } + ///State transition - sets the `uses` field to Set + pub struct SetUses(PhantomData S>); + impl sealed::Sealed for SetUses {} + impl State for SetUses { + type Code = S::Code; + type ForAccount = S::ForAccount; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Uses = Set; type Available = S::Available; + 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 Code = S::Code; + type ForAccount = S::ForAccount; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; type Uses = S::Uses; + type Available = 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 Code = S::Code; type ForAccount = S::ForAccount; type CreatedBy = S::CreatedBy; - type CreatedAt = Set; + type CreatedAt = S::CreatedAt; + type Uses = S::Uses; + type Available = S::Available; + type Disabled = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `disabled` field - pub struct disabled(()); - ///Marker type for the `available` field - pub struct available(()); - ///Marker type for the `uses` field - pub struct uses(()); ///Marker type for the `code` field pub struct code(()); ///Marker type for the `for_account` field @@ -187,6 +181,12 @@ pub mod invite_code_state { pub struct created_by(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `uses` field + pub struct uses(()); + ///Marker type for the `available` field + pub struct available(()); + ///Marker type for the `disabled` field + pub struct disabled(()); } } @@ -359,13 +359,13 @@ where impl<'a, S> InviteCodeBuilder<'a, S> where S: invite_code_state::State, - S::Disabled: invite_code_state::IsSet, - S::Available: invite_code_state::IsSet, - S::Uses: invite_code_state::IsSet, S::Code: invite_code_state::IsSet, S::ForAccount: invite_code_state::IsSet, S::CreatedBy: invite_code_state::IsSet, S::CreatedAt: invite_code_state::IsSet, + S::Uses: invite_code_state::IsSet, + S::Available: invite_code_state::IsSet, + S::Disabled: invite_code_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteCode<'a> { @@ -638,37 +638,37 @@ pub mod invite_code_use_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type UsedAt; type UsedBy; + type UsedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type UsedAt = Unset; type UsedBy = Unset; - } - ///State transition - sets the `used_at` field to Set - pub struct SetUsedAt(PhantomData S>); - impl sealed::Sealed for SetUsedAt {} - impl State for SetUsedAt { - type UsedAt = Set; - type UsedBy = S::UsedBy; + type UsedAt = Unset; } ///State transition - sets the `used_by` field to Set pub struct SetUsedBy(PhantomData S>); impl sealed::Sealed for SetUsedBy {} impl State for SetUsedBy { - type UsedAt = S::UsedAt; type UsedBy = Set; + type UsedAt = S::UsedAt; + } + ///State transition - sets the `used_at` field to Set + pub struct SetUsedAt(PhantomData S>); + impl sealed::Sealed for SetUsedAt {} + impl State for SetUsedAt { + type UsedBy = S::UsedBy; + type UsedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `used_at` field - pub struct used_at(()); ///Marker type for the `used_by` field pub struct used_by(()); + ///Marker type for the `used_at` field + pub struct used_at(()); } } @@ -741,8 +741,8 @@ where impl<'a, S> InviteCodeUseBuilder<'a, S> where S: invite_code_use_state::State, - S::UsedAt: invite_code_use_state::IsSet, S::UsedBy: invite_code_use_state::IsSet, + S::UsedAt: invite_code_use_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteCodeUse<'a> { diff --git a/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs b/crates/weaver-api/src/com_atproto/server/create_invite_codes.rs index d046e27..9488bca 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 Account; type Codes; + type Account; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Account = Unset; type Codes = Unset; - } - ///State transition - sets the `account` field to Set - pub struct SetAccount(PhantomData S>); - impl sealed::Sealed for SetAccount {} - impl State for SetAccount { - type Account = Set; - type Codes = S::Codes; + 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 Account = S::Account; type Codes = Set; + type Account = S::Account; + } + ///State transition - sets the `account` field to Set + pub struct SetAccount(PhantomData S>); + impl sealed::Sealed for SetAccount {} + impl State for SetAccount { + type Codes = S::Codes; + type Account = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `account` field - pub struct account(()); ///Marker type for the `codes` field pub struct codes(()); + ///Marker type for the `account` field + pub struct account(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> AccountCodesBuilder<'a, S> where S: account_codes_state::State, - S::Account: account_codes_state::IsSet, S::Codes: account_codes_state::IsSet, + S::Account: account_codes_state::IsSet, { /// Build the final struct pub fn build(self) -> AccountCodes<'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 ff3927b..35d5263 100644 --- a/crates/weaver-api/src/com_atproto/server/delete_account.rs +++ b/crates/weaver-api/src/com_atproto/server/delete_account.rs @@ -35,51 +35,51 @@ pub mod delete_account_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Token; type Did; type Password; - type Token; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Token = Unset; type Did = Unset; type Password = Unset; - type Token = Unset; + } + ///State transition - sets the `token` field to Set + pub struct SetToken(PhantomData S>); + impl sealed::Sealed for SetToken {} + impl State for SetToken { + type Token = Set; + type Did = S::Did; + type Password = S::Password; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { + type Token = S::Token; type Did = Set; type Password = S::Password; - type Token = S::Token; } ///State transition - sets the `password` field to Set pub struct SetPassword(PhantomData S>); impl sealed::Sealed for SetPassword {} impl State for SetPassword { - type Did = S::Did; - type Password = Set; type Token = S::Token; - } - ///State transition - sets the `token` field to Set - pub struct SetToken(PhantomData S>); - impl sealed::Sealed for SetToken {} - impl State for SetToken { type Did = S::Did; - type Password = S::Password; - type Token = Set; + type Password = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `token` field + pub struct token(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `password` field pub struct password(()); - ///Marker type for the `token` field - pub struct token(()); } } @@ -172,9 +172,9 @@ where impl<'a, S> DeleteAccountBuilder<'a, S> where S: delete_account_state::State, + S::Token: delete_account_state::IsSet, S::Did: delete_account_state::IsSet, S::Password: delete_account_state::IsSet, - S::Token: delete_account_state::IsSet, { /// Build the final struct pub fn build(self) -> DeleteAccount<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_blob.rs b/crates/weaver-api/src/com_atproto/sync/get_blob.rs index edc9741..19d72c4 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_blob.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_blob.rs @@ -32,37 +32,37 @@ pub mod get_blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Cid; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Cid = Unset; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type Did = Set; - type Cid = S::Cid; + type Did = Unset; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { - type Did = S::Did; type Cid = Set; + type Did = S::Did; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Cid = S::Cid; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetBlobBuilder<'a, S> where S: get_blob_state::State, - S::Did: get_blob_state::IsSet, S::Cid: get_blob_state::IsSet, + S::Did: get_blob_state::IsSet, { /// Build the final struct pub fn build(self) -> GetBlob<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/get_record.rs b/crates/weaver-api/src/com_atproto/sync/get_record.rs index 3bcb7e2..b72791f 100644 --- a/crates/weaver-api/src/com_atproto/sync/get_record.rs +++ b/crates/weaver-api/src/com_atproto/sync/get_record.rs @@ -36,49 +36,49 @@ pub mod get_record_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; type Collection; + type Did; type Rkey; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; type Collection = Unset; + type Did = Unset; type Rkey = 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 Collection = S::Collection; - type Rkey = S::Rkey; - } ///State transition - sets the `collection` field to Set pub struct SetCollection(PhantomData S>); impl sealed::Sealed for SetCollection {} impl State for SetCollection { - type Did = S::Did; type Collection = Set; + type Did = S::Did; + type Rkey = S::Rkey; + } + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Collection = S::Collection; + type Did = Set; type Rkey = S::Rkey; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Did = S::Did; type Collection = S::Collection; + type Did = S::Did; type Rkey = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); ///Marker type for the `collection` field pub struct collection(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `rkey` field pub struct rkey(()); } @@ -181,8 +181,8 @@ where impl<'a, S> GetRecordBuilder<'a, S> where S: get_record_state::State, - S::Did: get_record_state::IsSet, S::Collection: get_record_state::IsSet, + S::Did: get_record_state::IsSet, S::Rkey: get_record_state::IsSet, { /// Build the final struct 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 a525cf5..74421fb 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 Head; - type Rev; type Did; + type Rev; + type Head; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Head = Unset; - type Rev = Unset; type Did = Unset; + type Rev = Unset; + type Head = Unset; } - ///State transition - sets the `head` field to Set - pub struct SetHead(PhantomData S>); - impl sealed::Sealed for SetHead {} - impl State for SetHead { - type Head = 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 Rev = S::Rev; - type Did = S::Did; + type Head = S::Head; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type 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 Rev = Set; type Head = S::Head; + } + ///State transition - sets the `head` field to Set + pub struct SetHead(PhantomData S>); + impl sealed::Sealed for SetHead {} + impl State for SetHead { + type Did = S::Did; type Rev = S::Rev; - type Did = Set; + type Head = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `head` field - pub struct head(()); - ///Marker type for the `rev` field - pub struct rev(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `rev` field + pub struct rev(()); + ///Marker type for the `head` field + pub struct head(()); } } @@ -359,9 +359,9 @@ impl<'a, S: repo_state::State> RepoBuilder<'a, S> { impl<'a, S> RepoBuilder<'a, S> where S: repo_state::State, - S::Head: repo_state::IsSet, - S::Rev: repo_state::IsSet, S::Did: repo_state::IsSet, + S::Rev: repo_state::IsSet, + S::Head: repo_state::IsSet, { /// Build the final struct pub fn build(self) -> Repo<'a> { diff --git a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs index 7857ba1..0e331d5 100644 --- a/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs +++ b/crates/weaver-api/src/com_atproto/sync/subscribe_repos.rs @@ -41,8 +41,8 @@ pub mod account_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type Active; type Time; + type Active; type Seq; } /// Empty state - all required fields are unset @@ -50,8 +50,8 @@ pub mod account_state { impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type Active = Unset; type Time = Unset; + type Active = Unset; type Seq = Unset; } ///State transition - sets the `did` field to Set @@ -59,17 +59,8 @@ pub mod account_state { impl sealed::Sealed for SetDid {} impl State for SetDid { type Did = Set; - type Active = S::Active; - type Time = S::Time; - type Seq = S::Seq; - } - ///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 Active = Set; type Time = S::Time; + type Active = S::Active; type Seq = S::Seq; } ///State transition - sets the `time` field to Set @@ -77,8 +68,17 @@ pub mod account_state { impl sealed::Sealed for SetTime {} impl State for SetTime { type Did = S::Did; - type Active = S::Active; type Time = Set; + type Active = S::Active; + type Seq = S::Seq; + } + ///State transition - sets the `active` field to Set + pub struct SetActive(PhantomData S>); + impl sealed::Sealed for SetActive {} + impl State for SetActive { + type Did = S::Did; + type Time = S::Time; + type Active = Set; type Seq = S::Seq; } ///State transition - sets the `seq` field to Set @@ -86,8 +86,8 @@ pub mod account_state { impl sealed::Sealed for SetSeq {} impl State for SetSeq { type Did = S::Did; - type Active = S::Active; type Time = S::Time; + type Active = S::Active; type Seq = Set; } /// Marker types for field names @@ -95,10 +95,10 @@ pub mod account_state { pub mod members { ///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(()); + ///Marker type for the `active` field + pub struct active(()); ///Marker type for the `seq` field pub struct seq(()); } @@ -228,8 +228,8 @@ impl<'a, S> AccountBuilder<'a, S> where S: account_state::State, S::Did: account_state::IsSet, - S::Active: account_state::IsSet, S::Time: account_state::IsSet, + S::Active: account_state::IsSet, S::Seq: account_state::IsSet, { /// Build the final struct @@ -1073,203 +1073,203 @@ pub mod commit_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Ops; + type Commit; type Rev; - type Seq; + type Rebase; + type Ops; + type TooBig; type Time; - type Blocks; + type Seq; type Repo; - type Commit; - type TooBig; - type Rebase; + type Blocks; type Blobs; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Ops = Unset; + type Commit = Unset; type Rev = Unset; - type Seq = Unset; + type Rebase = Unset; + type Ops = Unset; + type TooBig = Unset; type Time = Unset; - type Blocks = Unset; + type Seq = Unset; type Repo = Unset; - type Commit = Unset; - type TooBig = Unset; - type Rebase = Unset; + type Blocks = Unset; type Blobs = Unset; } - ///State transition - sets the `ops` field to Set - pub struct SetOps(PhantomData S>); - impl sealed::Sealed for SetOps {} - impl State for SetOps { - type Ops = Set; + ///State transition - sets the `commit` field to Set + pub struct SetCommit(PhantomData S>); + impl sealed::Sealed for SetCommit {} + impl State for SetCommit { + type Commit = Set; type Rev = S::Rev; - type Seq = S::Seq; + type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; - type Commit = S::Commit; - type TooBig = S::TooBig; - type Rebase = S::Rebase; + type Blocks = S::Blocks; type Blobs = S::Blobs; } ///State transition - sets the `rev` field to Set pub struct SetRev(PhantomData S>); impl sealed::Sealed for SetRev {} impl State for SetRev { - type Ops = S::Ops; + type Commit = S::Commit; type Rev = Set; - type Seq = S::Seq; + type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; + type Blocks = S::Blocks; + type Blobs = S::Blobs; + } + ///State transition - sets the `rebase` field to Set + pub struct SetRebase(PhantomData S>); + impl sealed::Sealed for SetRebase {} + impl State for SetRebase { type Commit = S::Commit; + type Rev = S::Rev; + type Rebase = Set; + type Ops = S::Ops; type TooBig = S::TooBig; - type Rebase = S::Rebase; + type Time = S::Time; + type Seq = S::Seq; + type Repo = S::Repo; + type Blocks = S::Blocks; type Blobs = S::Blobs; } - ///State transition - sets the `seq` field to Set - pub struct SetSeq(PhantomData S>); - impl sealed::Sealed for SetSeq {} - impl State for SetSeq { - type Ops = S::Ops; + ///State transition - sets the `ops` field to Set + pub struct SetOps(PhantomData S>); + impl sealed::Sealed for SetOps {} + impl State for SetOps { + type Commit = S::Commit; type Rev = S::Rev; - type Seq = Set; + type Rebase = S::Rebase; + type Ops = Set; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; + type Blocks = S::Blocks; + type Blobs = S::Blobs; + } + ///State transition - sets the `too_big` field to Set + pub struct SetTooBig(PhantomData S>); + impl sealed::Sealed for SetTooBig {} + impl State for SetTooBig { type Commit = S::Commit; - type TooBig = S::TooBig; + type Rev = S::Rev; type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = Set; + type Time = S::Time; + type Seq = S::Seq; + type Repo = S::Repo; + type Blocks = S::Blocks; type Blobs = S::Blobs; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); impl sealed::Sealed for SetTime {} impl State for SetTime { - type Ops = S::Ops; + type Commit = S::Commit; type Rev = S::Rev; - type Seq = S::Seq; + type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = S::TooBig; type Time = Set; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; - type Commit = S::Commit; - type TooBig = S::TooBig; - type Rebase = S::Rebase; + type Blocks = S::Blocks; type Blobs = S::Blobs; } - ///State transition - sets the `blocks` field to Set - pub struct SetBlocks(PhantomData S>); - impl sealed::Sealed for SetBlocks {} - impl State for SetBlocks { - type Ops = S::Ops; + ///State transition - sets the `seq` field to Set + pub struct SetSeq(PhantomData S>); + impl sealed::Sealed for SetSeq {} + impl State for SetSeq { + type Commit = S::Commit; type Rev = S::Rev; - type Seq = S::Seq; + type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = Set; + type Seq = Set; type Repo = S::Repo; - type Commit = S::Commit; - type TooBig = S::TooBig; - type Rebase = S::Rebase; + type Blocks = S::Blocks; type Blobs = S::Blobs; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Ops = S::Ops; - type Rev = S::Rev; - type Seq = S::Seq; - type Time = S::Time; - type Blocks = S::Blocks; - type Repo = Set; type Commit = S::Commit; - type TooBig = S::TooBig; + type Rev = S::Rev; type Rebase = S::Rebase; - type Blobs = S::Blobs; - } - ///State transition - sets the `commit` field to Set - pub struct SetCommit(PhantomData S>); - impl sealed::Sealed for SetCommit {} - impl State for SetCommit { type Ops = S::Ops; - type Rev = S::Rev; - type Seq = S::Seq; + type TooBig = S::TooBig; type Time = S::Time; + type Seq = S::Seq; + type Repo = Set; type Blocks = S::Blocks; - type Repo = S::Repo; - type Commit = Set; - type TooBig = S::TooBig; - type Rebase = S::Rebase; type Blobs = S::Blobs; } - ///State transition - sets the `too_big` field to Set - pub struct SetTooBig(PhantomData S>); - impl sealed::Sealed for SetTooBig {} - impl State for SetTooBig { - type Ops = S::Ops; - type Rev = S::Rev; - type Seq = S::Seq; - type Time = S::Time; - type Blocks = S::Blocks; - 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 { type Commit = S::Commit; - type TooBig = Set; + type Rev = S::Rev; type Rebase = S::Rebase; - type Blobs = S::Blobs; - } - ///State transition - sets the `rebase` field to Set - pub struct SetRebase(PhantomData S>); - impl sealed::Sealed for SetRebase {} - impl State for SetRebase { type Ops = S::Ops; - type Rev = S::Rev; - type Seq = S::Seq; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; - type Commit = S::Commit; - type TooBig = S::TooBig; - type Rebase = Set; + type Blocks = Set; type Blobs = S::Blobs; } ///State transition - sets the `blobs` field to Set pub struct SetBlobs(PhantomData S>); impl sealed::Sealed for SetBlobs {} impl State for SetBlobs { - type Ops = S::Ops; + type Commit = S::Commit; type Rev = S::Rev; - type Seq = S::Seq; + type Rebase = S::Rebase; + type Ops = S::Ops; + type TooBig = S::TooBig; type Time = S::Time; - type Blocks = S::Blocks; + type Seq = S::Seq; type Repo = S::Repo; - type Commit = S::Commit; - type TooBig = S::TooBig; - type Rebase = S::Rebase; + type Blocks = S::Blocks; type Blobs = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `ops` field - pub struct ops(()); + ///Marker type for the `commit` field + pub struct commit(()); ///Marker type for the `rev` field pub struct rev(()); - ///Marker type for the `seq` field - pub struct seq(()); + ///Marker type for the `rebase` field + pub struct rebase(()); + ///Marker type for the `ops` field + pub struct ops(()); + ///Marker type for the `too_big` field + pub struct too_big(()); ///Marker type for the `time` field pub struct time(()); - ///Marker type for the `blocks` field - pub struct blocks(()); + ///Marker type for the `seq` field + pub struct seq(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `commit` field - pub struct commit(()); - ///Marker type for the `too_big` field - pub struct too_big(()); - ///Marker type for the `rebase` field - pub struct rebase(()); + ///Marker type for the `blocks` field + pub struct blocks(()); ///Marker type for the `blobs` field pub struct blobs(()); } @@ -1559,15 +1559,15 @@ where impl<'a, S> CommitBuilder<'a, S> where S: commit_state::State, - S::Ops: commit_state::IsSet, + S::Commit: commit_state::IsSet, S::Rev: commit_state::IsSet, - S::Seq: commit_state::IsSet, + S::Rebase: commit_state::IsSet, + S::Ops: commit_state::IsSet, + S::TooBig: commit_state::IsSet, S::Time: commit_state::IsSet, - S::Blocks: commit_state::IsSet, + S::Seq: commit_state::IsSet, S::Repo: commit_state::IsSet, - S::Commit: commit_state::IsSet, - S::TooBig: commit_state::IsSet, - S::Rebase: commit_state::IsSet, + S::Blocks: commit_state::IsSet, S::Blobs: commit_state::IsSet, { /// Build the final struct @@ -2257,37 +2257,37 @@ pub mod repo_op_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Action; type Path; + type Action; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Action = Unset; type Path = Unset; - } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Action = Set; - type Path = S::Path; + type Action = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Action = S::Action; type Path = Set; + type Action = S::Action; + } + ///State transition - sets the `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { + type Path = S::Path; + type Action = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `action` field - pub struct action(()); ///Marker type for the `path` field pub struct path(()); + ///Marker type for the `action` field + pub struct action(()); } } @@ -2400,8 +2400,8 @@ impl<'a, S: repo_op_state::State> RepoOpBuilder<'a, S> { impl<'a, S> RepoOpBuilder<'a, S> where S: repo_op_state::State, - S::Action: repo_op_state::IsSet, S::Path: repo_op_state::IsSet, + S::Action: repo_op_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoOp<'a> { @@ -2579,85 +2579,85 @@ pub mod sync_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Did; + type Blocks; type Rev; + type Did; type Time; type Seq; - type Blocks; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Did = Unset; + type Blocks = Unset; type Rev = Unset; + type Did = Unset; type Time = Unset; type Seq = Unset; - type Blocks = 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 `blocks` field to Set + pub struct SetBlocks(PhantomData S>); + impl sealed::Sealed for SetBlocks {} + impl State for SetBlocks { + type Blocks = Set; type Rev = S::Rev; + type Did = S::Did; type Time = S::Time; type Seq = S::Seq; - type Blocks = S::Blocks; } ///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 Blocks = S::Blocks; type Rev = Set; + type Did = S::Did; type Time = S::Time; 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 Blocks = S::Blocks; + type Rev = S::Rev; + type Did = Set; + type Time = S::Time; + type Seq = S::Seq; } ///State transition - sets the `time` field to Set pub struct SetTime(PhantomData S>); impl sealed::Sealed for SetTime {} impl State for SetTime { - type Did = S::Did; + type Blocks = S::Blocks; type Rev = S::Rev; + type Did = S::Did; type Time = Set; type Seq = S::Seq; - type Blocks = S::Blocks; } ///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 Rev = S::Rev; - type Time = S::Time; - type Seq = Set; type Blocks = S::Blocks; - } - ///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 Rev = S::Rev; + type Did = S::Did; type Time = S::Time; - type Seq = S::Seq; - type Blocks = Set; + type Seq = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `did` field - pub struct did(()); + ///Marker type for the `blocks` field + pub struct blocks(()); ///Marker type for the `rev` field pub struct rev(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `time` field pub struct time(()); ///Marker type for the `seq` field pub struct seq(()); - ///Marker type for the `blocks` field - pub struct blocks(()); } } @@ -2790,11 +2790,11 @@ where impl<'a, S> SyncBuilder<'a, S> where S: sync_state::State, - S::Did: sync_state::IsSet, + S::Blocks: sync_state::IsSet, S::Rev: sync_state::IsSet, + S::Did: sync_state::IsSet, S::Time: sync_state::IsSet, S::Seq: sync_state::IsSet, - S::Blocks: sync_state::IsSet, { /// Build the final struct pub fn build(self) -> Sync<'a> { diff --git a/crates/weaver-api/src/com_deckbelcher/deck/list.rs b/crates/weaver-api/src/com_deckbelcher/deck/list.rs index 5dfbcb8..fe61b1a 100644 --- a/crates/weaver-api/src/com_deckbelcher/deck/list.rs +++ b/crates/weaver-api/src/com_deckbelcher/deck/list.rs @@ -42,51 +42,51 @@ pub mod card_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Quantity; type ScryfallId; type Section; - type Quantity; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Quantity = Unset; type ScryfallId = Unset; type Section = Unset; - type Quantity = Unset; + } + ///State transition - sets the `quantity` field to Set + pub struct SetQuantity(PhantomData S>); + impl sealed::Sealed for SetQuantity {} + impl State for SetQuantity { + type Quantity = Set; + type ScryfallId = S::ScryfallId; + type Section = S::Section; } ///State transition - sets the `scryfall_id` field to Set pub struct SetScryfallId(PhantomData S>); impl sealed::Sealed for SetScryfallId {} impl State for SetScryfallId { + type Quantity = S::Quantity; type ScryfallId = Set; type Section = S::Section; - type Quantity = S::Quantity; } ///State transition - sets the `section` field to Set pub struct SetSection(PhantomData S>); impl sealed::Sealed for SetSection {} impl State for SetSection { - type ScryfallId = S::ScryfallId; - type Section = Set; type Quantity = S::Quantity; - } - ///State transition - sets the `quantity` field to Set - pub struct SetQuantity(PhantomData S>); - impl sealed::Sealed for SetQuantity {} - impl State for SetQuantity { type ScryfallId = S::ScryfallId; - type Section = S::Section; - type Quantity = Set; + type Section = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `quantity` field + pub struct quantity(()); ///Marker type for the `scryfall_id` field pub struct scryfall_id(()); ///Marker type for the `section` field pub struct section(()); - ///Marker type for the `quantity` field - pub struct quantity(()); } } @@ -199,9 +199,9 @@ impl<'a, S: card_state::State> CardBuilder<'a, S> { impl<'a, S> CardBuilder<'a, S> where S: card_state::State, + S::Quantity: card_state::IsSet, S::ScryfallId: card_state::IsSet, S::Section: card_state::IsSet, - S::Quantity: card_state::IsSet, { /// Build the final struct pub fn build(self) -> Card<'a> { @@ -705,50 +705,50 @@ pub mod list_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Cards; type Name; + type Cards; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Cards = Unset; type Name = Unset; + type Cards = 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 Cards = S::Cards; - type Name = S::Name; - } - ///State transition - sets the `cards` field to Set - pub struct SetCards(PhantomData S>); - impl sealed::Sealed for SetCards {} - impl State for SetCards { - type CreatedAt = S::CreatedAt; - type Cards = Set; type Name = S::Name; + type Cards = S::Cards; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { type CreatedAt = S::CreatedAt; - type Cards = S::Cards; type Name = Set; + type Cards = S::Cards; + } + ///State transition - sets the `cards` field to Set + pub struct SetCards(PhantomData S>); + impl sealed::Sealed for SetCards {} + impl State for SetCards { + type CreatedAt = S::CreatedAt; + type Name = S::Name; + type Cards = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `cards` field - pub struct cards(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `cards` field + pub struct cards(()); } } @@ -916,8 +916,8 @@ impl<'a, S> ListBuilder<'a, S> where S: list_state::State, S::CreatedAt: list_state::IsSet, - S::Cards: list_state::IsSet, S::Name: list_state::IsSet, + S::Cards: list_state::IsSet, { /// Build the final struct pub fn build(self) -> List<'a> { diff --git a/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs b/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs index 47b1717..6690150 100644 --- a/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs +++ b/crates/weaver-api/src/com_deckbelcher/richtext/facet.rs @@ -34,37 +34,37 @@ pub mod byte_slice_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type ByteEnd; type ByteStart; + type ByteEnd; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type ByteEnd = Unset; type ByteStart = Unset; - } - ///State transition - sets the `byte_end` field to Set - pub struct SetByteEnd(PhantomData S>); - impl sealed::Sealed for SetByteEnd {} - impl State for SetByteEnd { - type ByteEnd = Set; - type ByteStart = S::ByteStart; + type ByteEnd = Unset; } ///State transition - sets the `byte_start` field to Set pub struct SetByteStart(PhantomData S>); impl sealed::Sealed for SetByteStart {} impl State for SetByteStart { - type ByteEnd = S::ByteEnd; type ByteStart = Set; + type ByteEnd = S::ByteEnd; + } + ///State transition - sets the `byte_end` field to Set + pub struct SetByteEnd(PhantomData S>); + impl sealed::Sealed for SetByteEnd {} + impl State for SetByteEnd { + type ByteStart = S::ByteStart; + type ByteEnd = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `byte_end` field - pub struct byte_end(()); ///Marker type for the `byte_start` field pub struct byte_start(()); + ///Marker type for the `byte_end` field + pub struct byte_end(()); } } @@ -134,8 +134,8 @@ where impl<'a, S> ByteSliceBuilder<'a, S> where S: byte_slice_state::State, - S::ByteEnd: byte_slice_state::IsSet, S::ByteStart: byte_slice_state::IsSet, + S::ByteEnd: byte_slice_state::IsSet, { /// Build the final struct pub fn build(self) -> ByteSlice<'a> { diff --git a/crates/weaver-api/src/com_whtwnd/blog.rs b/crates/weaver-api/src/com_whtwnd/blog.rs index 722c65a..48f3179 100644 --- a/crates/weaver-api/src/com_whtwnd/blog.rs +++ b/crates/weaver-api/src/com_whtwnd/blog.rs @@ -454,37 +454,37 @@ pub mod comment_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EntryUri; type Content; + type EntryUri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type EntryUri = Unset; type Content = Unset; - } - ///State transition - sets the `entry_uri` field to Set - pub struct SetEntryUri(PhantomData S>); - impl sealed::Sealed for SetEntryUri {} - impl State for SetEntryUri { - type EntryUri = Set; - type Content = S::Content; + type EntryUri = Unset; } ///State transition - sets the `content` field to Set pub struct SetContent(PhantomData S>); impl sealed::Sealed for SetContent {} impl State for SetContent { - type EntryUri = S::EntryUri; type Content = Set; + type EntryUri = S::EntryUri; + } + ///State transition - sets the `entry_uri` field to Set + pub struct SetEntryUri(PhantomData S>); + impl sealed::Sealed for SetEntryUri {} + impl State for SetEntryUri { + type Content = S::Content; + type EntryUri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `entry_uri` field - pub struct entry_uri(()); ///Marker type for the `content` field pub struct content(()); + ///Marker type for the `entry_uri` field + pub struct entry_uri(()); } } @@ -557,8 +557,8 @@ where impl<'a, S> CommentBuilder<'a, S> where S: comment_state::State, - S::EntryUri: comment_state::IsSet, S::Content: comment_state::IsSet, + S::EntryUri: comment_state::IsSet, { /// Build the final struct pub fn build(self) -> Comment<'a> { diff --git a/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs b/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs index c6dc8df..7c49ac1 100644 --- a/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs +++ b/crates/weaver-api/src/com_whtwnd/blog/get_entry_metadata_by_name.rs @@ -32,37 +32,37 @@ pub mod get_entry_metadata_by_name_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Author; type EntryTitle; + type Author; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Author = Unset; type EntryTitle = Unset; - } - ///State transition - sets the `author` field to Set - pub struct SetAuthor(PhantomData S>); - impl sealed::Sealed for SetAuthor {} - impl State for SetAuthor { - type Author = Set; - type EntryTitle = S::EntryTitle; + type Author = Unset; } ///State transition - sets the `entry_title` field to Set pub struct SetEntryTitle(PhantomData S>); impl sealed::Sealed for SetEntryTitle {} impl State for SetEntryTitle { - type Author = S::Author; type EntryTitle = Set; + type Author = S::Author; + } + ///State transition - sets the `author` field to Set + pub struct SetAuthor(PhantomData S>); + impl sealed::Sealed for SetAuthor {} + impl State for SetAuthor { + type EntryTitle = S::EntryTitle; + type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `author` field - pub struct author(()); ///Marker type for the `entry_title` field pub struct entry_title(()); + ///Marker type for the `author` field + pub struct author(()); } } @@ -147,8 +147,8 @@ where impl<'a, S> GetEntryMetadataByNameBuilder<'a, S> where S: get_entry_metadata_by_name_state::State, - S::Author: get_entry_metadata_by_name_state::IsSet, S::EntryTitle: get_entry_metadata_by_name_state::IsSet, + S::Author: get_entry_metadata_by_name_state::IsSet, { /// Build the final struct pub fn build(self) -> GetEntryMetadataByName<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/blocks/button.rs b/crates/weaver-api/src/pub_leaflet/blocks/button.rs index b8513dd..6305544 100644 --- a/crates/weaver-api/src/pub_leaflet/blocks/button.rs +++ b/crates/weaver-api/src/pub_leaflet/blocks/button.rs @@ -33,37 +33,37 @@ pub mod button_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Url; type Text; + type Url; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Url = Unset; type Text = Unset; - } - ///State transition - sets the `url` field to Set - pub struct SetUrl(PhantomData S>); - impl sealed::Sealed for SetUrl {} - impl State for SetUrl { - type Url = Set; - type Text = S::Text; + type Url = Unset; } ///State transition - sets the `text` field to Set pub struct SetText(PhantomData S>); impl sealed::Sealed for SetText {} impl State for SetText { - type Url = S::Url; type Text = Set; + type Url = S::Url; + } + ///State transition - sets the `url` field to Set + pub struct SetUrl(PhantomData S>); + impl sealed::Sealed for SetUrl {} + impl State for SetUrl { + type Text = S::Text; + type Url = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `url` field - pub struct url(()); ///Marker type for the `text` field pub struct text(()); + ///Marker type for the `url` field + pub struct url(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> ButtonBuilder<'a, S> where S: button_state::State, - S::Url: button_state::IsSet, S::Text: button_state::IsSet, + S::Url: button_state::IsSet, { /// Build the final struct pub fn build(self) -> Button<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/blocks/image.rs b/crates/weaver-api/src/pub_leaflet/blocks/image.rs index f79efc1..d128ca5 100644 --- a/crates/weaver-api/src/pub_leaflet/blocks/image.rs +++ b/crates/weaver-api/src/pub_leaflet/blocks/image.rs @@ -31,37 +31,37 @@ pub mod aspect_ratio_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Height; type Width; + type Height; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Height = Unset; type Width = Unset; - } - ///State transition - sets the `height` field to Set - pub struct SetHeight(PhantomData S>); - impl sealed::Sealed for SetHeight {} - impl State for SetHeight { - type Height = Set; - type Width = S::Width; + type Height = Unset; } ///State transition - sets the `width` field to Set pub struct SetWidth(PhantomData S>); impl sealed::Sealed for SetWidth {} impl State for SetWidth { - type Height = S::Height; type Width = Set; + type Height = S::Height; + } + ///State transition - sets the `height` field to Set + pub struct SetHeight(PhantomData S>); + impl sealed::Sealed for SetHeight {} + impl State for SetHeight { + type Width = S::Width; + type Height = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `height` field - pub struct height(()); ///Marker type for the `width` field pub struct width(()); + ///Marker type for the `height` field + pub struct height(()); } } @@ -131,8 +131,8 @@ where impl<'a, S> AspectRatioBuilder<'a, S> where S: aspect_ratio_state::State, - S::Height: aspect_ratio_state::IsSet, S::Width: aspect_ratio_state::IsSet, + S::Height: aspect_ratio_state::IsSet, { /// Build the final struct pub fn build(self) -> AspectRatio<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/comment.rs b/crates/weaver-api/src/pub_leaflet/comment.rs index 58c8fe9..2489477 100644 --- a/crates/weaver-api/src/pub_leaflet/comment.rs +++ b/crates/weaver-api/src/pub_leaflet/comment.rs @@ -33,37 +33,37 @@ pub mod linear_document_quote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Document; type Quote; + type Document; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Document = Unset; type Quote = Unset; - } - ///State transition - sets the `document` field to Set - pub struct SetDocument(PhantomData S>); - impl sealed::Sealed for SetDocument {} - impl State for SetDocument { - type Document = Set; - type Quote = S::Quote; + type Document = Unset; } ///State transition - sets the `quote` field to Set pub struct SetQuote(PhantomData S>); impl sealed::Sealed for SetQuote {} impl State for SetQuote { - type Document = S::Document; type Quote = Set; + type Document = S::Document; + } + ///State transition - sets the `document` field to Set + pub struct SetDocument(PhantomData S>); + impl sealed::Sealed for SetDocument {} + impl State for SetDocument { + type Quote = S::Quote; + type Document = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `document` field - pub struct document(()); ///Marker type for the `quote` field pub struct quote(()); + ///Marker type for the `document` field + pub struct document(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> LinearDocumentQuoteBuilder<'a, S> where S: linear_document_quote_state::State, - S::Document: linear_document_quote_state::IsSet, S::Quote: linear_document_quote_state::IsSet, + S::Document: linear_document_quote_state::IsSet, { /// Build the final struct pub fn build(self) -> LinearDocumentQuote<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/document.rs b/crates/weaver-api/src/pub_leaflet/document.rs index 9a3eb94..cf77d80 100644 --- a/crates/weaver-api/src/pub_leaflet/document.rs +++ b/crates/weaver-api/src/pub_leaflet/document.rs @@ -55,51 +55,51 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Title; type Pages; type Author; - type Title; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Title = Unset; type Pages = Unset; type Author = Unset; - type Title = Unset; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { + type Title = Set; + type Pages = S::Pages; + type Author = S::Author; } ///State transition - sets the `pages` field to Set pub struct SetPages(PhantomData S>); impl sealed::Sealed for SetPages {} impl State for SetPages { + type Title = S::Title; type Pages = Set; type Author = S::Author; - type Title = S::Title; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Pages = S::Pages; - type Author = Set; type Title = S::Title; - } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { type Pages = S::Pages; - type Author = S::Author; - type Title = Set; + type Author = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `title` field + pub struct title(()); ///Marker type for the `pages` field pub struct pages(()); ///Marker type for the `author` field pub struct author(()); - ///Marker type for the `title` field - pub struct title(()); } } @@ -322,9 +322,9 @@ where impl<'a, S> DocumentBuilder<'a, S> where S: document_state::State, + S::Title: document_state::IsSet, S::Pages: document_state::IsSet, S::Author: document_state::IsSet, - S::Title: document_state::IsSet, { /// Build the final struct pub fn build(self) -> Document<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/pages/canvas.rs b/crates/weaver-api/src/pub_leaflet/pages/canvas.rs index a4995a1..1985d23 100644 --- a/crates/weaver-api/src/pub_leaflet/pages/canvas.rs +++ b/crates/weaver-api/src/pub_leaflet/pages/canvas.rs @@ -39,67 +39,67 @@ pub mod block_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Y; - type Block; type X; + type Block; type Width; + type Y; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Y = Unset; - type Block = Unset; type X = Unset; + type Block = Unset; type Width = Unset; + type Y = Unset; } - ///State transition - sets the `y` field to Set - pub struct SetY(PhantomData S>); - impl sealed::Sealed for SetY {} - impl State for SetY { - type Y = Set; + ///State transition - sets the `x` field to Set + pub struct SetX(PhantomData S>); + impl sealed::Sealed for SetX {} + impl State for SetX { + type X = Set; type Block = S::Block; - type X = S::X; type Width = S::Width; + type Y = S::Y; } ///State transition - sets the `block` field to Set pub struct SetBlock(PhantomData S>); impl sealed::Sealed for SetBlock {} impl State for SetBlock { - type Y = S::Y; - type Block = Set; type X = S::X; + type Block = Set; type Width = S::Width; - } - ///State transition - sets the `x` field to Set - pub struct SetX(PhantomData S>); - impl sealed::Sealed for SetX {} - impl State for SetX { type Y = S::Y; - type Block = S::Block; - type X = 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 Y = S::Y; - type Block = S::Block; type X = S::X; + type Block = S::Block; type Width = Set; + type Y = S::Y; + } + ///State transition - sets the `y` field to Set + pub struct SetY(PhantomData S>); + impl sealed::Sealed for SetY {} + impl State for SetY { + type X = S::X; + type Block = S::Block; + type Width = S::Width; + type Y = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `y` field - pub struct y(()); - ///Marker type for the `block` field - pub struct block(()); ///Marker type for the `x` field pub struct x(()); + ///Marker type for the `block` field + pub struct block(()); ///Marker type for the `width` field pub struct width(()); + ///Marker type for the `y` field + pub struct y(()); } } @@ -234,10 +234,10 @@ where impl<'a, S> BlockBuilder<'a, S> where S: block_state::State, - S::Y: block_state::IsSet, - S::Block: block_state::IsSet, S::X: block_state::IsSet, + S::Block: block_state::IsSet, S::Width: block_state::IsSet, + S::Y: block_state::IsSet, { /// Build the final struct pub fn build(self) -> Block<'a> { @@ -764,37 +764,37 @@ pub mod position_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Offset; type Block; + type Offset; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Offset = Unset; type Block = Unset; - } - ///State transition - sets the `offset` field to Set - pub struct SetOffset(PhantomData S>); - impl sealed::Sealed for SetOffset {} - impl State for SetOffset { - type Offset = Set; - type Block = S::Block; + type Offset = Unset; } ///State transition - sets the `block` field to Set pub struct SetBlock(PhantomData S>); impl sealed::Sealed for SetBlock {} impl State for SetBlock { - type Offset = S::Offset; type Block = Set; + type Offset = S::Offset; + } + ///State transition - sets the `offset` field to Set + pub struct SetOffset(PhantomData S>); + impl sealed::Sealed for SetOffset {} + impl State for SetOffset { + type Block = S::Block; + type Offset = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `offset` field - pub struct offset(()); ///Marker type for the `block` field pub struct block(()); + ///Marker type for the `offset` field + pub struct offset(()); } } @@ -867,8 +867,8 @@ where impl<'a, S> PositionBuilder<'a, S> where S: position_state::State, - S::Offset: position_state::IsSet, S::Block: position_state::IsSet, + S::Offset: position_state::IsSet, { /// Build the final struct pub fn build(self) -> Position<'a> { @@ -939,37 +939,37 @@ pub mod quote_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Start; type End; + type Start; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Start = Unset; type End = Unset; - } - ///State transition - sets the `start` field to Set - pub struct SetStart(PhantomData S>); - impl sealed::Sealed for SetStart {} - impl State for SetStart { - type Start = Set; - type End = S::End; + 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 Start = S::Start; type End = Set; + type Start = S::Start; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `start` field - pub struct start(()); ///Marker type for the `end` field pub struct end(()); + ///Marker type for the `start` field + pub struct start(()); } } @@ -1042,8 +1042,8 @@ where impl<'a, S> QuoteBuilder<'a, S> where S: quote_state::State, - S::Start: quote_state::IsSet, S::End: quote_state::IsSet, + S::Start: quote_state::IsSet, { /// Build the final struct pub fn build(self) -> Quote<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/pages/linear_document.rs b/crates/weaver-api/src/pub_leaflet/pages/linear_document.rs index 4389434..82cc3f8 100644 --- a/crates/weaver-api/src/pub_leaflet/pages/linear_document.rs +++ b/crates/weaver-api/src/pub_leaflet/pages/linear_document.rs @@ -701,37 +701,37 @@ pub mod position_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Block; type Offset; + type Block; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Block = Unset; type Offset = Unset; - } - ///State transition - sets the `block` field to Set - pub struct SetBlock(PhantomData S>); - impl sealed::Sealed for SetBlock {} - impl State for SetBlock { - type Block = Set; - type Offset = S::Offset; + type Block = Unset; } ///State transition - sets the `offset` field to Set pub struct SetOffset(PhantomData S>); impl sealed::Sealed for SetOffset {} impl State for SetOffset { - type Block = S::Block; type Offset = Set; + type Block = S::Block; + } + ///State transition - sets the `block` field to Set + pub struct SetBlock(PhantomData S>); + impl sealed::Sealed for SetBlock {} + impl State for SetBlock { + type Offset = S::Offset; + type Block = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `block` field - pub struct block(()); ///Marker type for the `offset` field pub struct offset(()); + ///Marker type for the `block` field + pub struct block(()); } } @@ -804,8 +804,8 @@ where impl<'a, S> PositionBuilder<'a, S> where S: position_state::State, - S::Block: position_state::IsSet, S::Offset: position_state::IsSet, + S::Block: position_state::IsSet, { /// Build the final struct pub fn build(self) -> Position<'a> { @@ -876,37 +876,37 @@ pub mod quote_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(()); } } @@ -979,8 +979,8 @@ where impl<'a, S> QuoteBuilder<'a, S> where S: quote_state::State, - S::End: quote_state::IsSet, S::Start: quote_state::IsSet, + S::End: quote_state::IsSet, { /// Build the final struct pub fn build(self) -> Quote<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/poll/definition.rs b/crates/weaver-api/src/pub_leaflet/poll/definition.rs index 8d54caf..0b0e13c 100644 --- a/crates/weaver-api/src/pub_leaflet/poll/definition.rs +++ b/crates/weaver-api/src/pub_leaflet/poll/definition.rs @@ -36,37 +36,37 @@ pub mod definition_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Options; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Options = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Options = S::Options; + type Name = Unset; } ///State transition - sets the `options` field to Set pub struct SetOptions(PhantomData S>); impl sealed::Sealed for SetOptions {} impl State for SetOptions { - type Name = S::Name; type Options = 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 Options = S::Options; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `options` field pub struct options(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -161,8 +161,8 @@ where impl<'a, S> DefinitionBuilder<'a, S> where S: definition_state::State, - S::Name: definition_state::IsSet, S::Options: definition_state::IsSet, + S::Name: definition_state::IsSet, { /// Build the final struct pub fn build(self) -> Definition<'a> { diff --git a/crates/weaver-api/src/pub_leaflet/theme/color.rs b/crates/weaver-api/src/pub_leaflet/theme/color.rs index 9200fe0..1f72128 100644 --- a/crates/weaver-api/src/pub_leaflet/theme/color.rs +++ b/crates/weaver-api/src/pub_leaflet/theme/color.rs @@ -438,67 +438,67 @@ pub mod rgba_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type G; type A; - type R; type B; + type R; + type G; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type G = Unset; type A = Unset; - type R = Unset; type B = Unset; - } - ///State transition - sets the `g` field to Set - pub struct SetG(PhantomData S>); - impl sealed::Sealed for SetG {} - impl State for SetG { - type G = Set; - type A = S::A; - type R = S::R; - type B = S::B; + type R = Unset; + type G = Unset; } ///State transition - sets the `a` field to Set pub struct SetA(PhantomData S>); impl sealed::Sealed for SetA {} impl State for SetA { - type G = S::G; type A = Set; - type R = S::R; type B = S::B; + type R = S::R; + type G = S::G; + } + ///State transition - sets the `b` field to Set + pub struct SetB(PhantomData S>); + impl sealed::Sealed for SetB {} + impl State for SetB { + type A = S::A; + type B = Set; + type R = S::R; + type G = S::G; } ///State transition - sets the `r` field to Set pub struct SetR(PhantomData S>); impl sealed::Sealed for SetR {} impl State for SetR { - type G = S::G; type A = S::A; - type R = Set; type B = S::B; - } - ///State transition - sets the `b` field to Set - pub struct SetB(PhantomData S>); - impl sealed::Sealed for SetB {} - impl State for SetB { + type R = Set; type G = S::G; + } + ///State transition - sets the `g` field to Set + pub struct SetG(PhantomData S>); + impl sealed::Sealed for SetG {} + impl State for SetG { type A = S::A; + type B = S::B; type R = S::R; - type B = Set; + type G = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `g` field - pub struct g(()); ///Marker type for the `a` field pub struct a(()); - ///Marker type for the `r` field - pub struct r(()); ///Marker type for the `b` field pub struct b(()); + ///Marker type for the `r` field + pub struct r(()); + ///Marker type for the `g` field + pub struct g(()); } } @@ -599,10 +599,10 @@ where impl<'a, S> RgbaBuilder<'a, S> where S: rgba_state::State, - S::G: rgba_state::IsSet, S::A: rgba_state::IsSet, - S::R: rgba_state::IsSet, S::B: rgba_state::IsSet, + S::R: rgba_state::IsSet, + S::G: rgba_state::IsSet, { /// Build the final struct pub fn build(self) -> Rgba<'a> { diff --git a/crates/weaver-api/src/sh_weaver/actor.rs b/crates/weaver-api/src/sh_weaver/actor.rs index 7b6d8b7..9baa386 100644 --- a/crates/weaver-api/src/sh_weaver/actor.rs +++ b/crates/weaver-api/src/sh_weaver/actor.rs @@ -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 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(()); } } @@ -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::Handle: profile_view_basic_state::IsSet, S::Did: profile_view_basic_state::IsSet, + S::Handle: profile_view_basic_state::IsSet, { /// Build the final struct pub fn build(self) -> ProfileViewBasic<'a> { @@ -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 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; - } - ///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 Bluesky = S::Bluesky; - type Did = S::Did; + type Handle = Unset; } ///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; + type Handle = S::Handle; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Handle = S::Handle; type Bluesky = S::Bluesky; 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 Bluesky = S::Bluesky; + 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 `bluesky` field pub struct bluesky(()); ///Marker type for the `did` field pub struct did(()); + ///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::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 8bf43b9..c1ba77c 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 Resource; - type Status; type Participants; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Resource = Unset; - type Status = Unset; type Participants = Unset; + type Status = 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 Status = S::Status; - type Participants = S::Participants; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Resource = S::Resource; - type Status = Set; type Participants = S::Participants; + type Status = S::Status; } ///State transition - sets the `participants` field to Set pub struct SetParticipants(PhantomData S>); impl sealed::Sealed for SetParticipants {} impl State for SetParticipants { type Resource = S::Resource; - type Status = S::Status; type Participants = 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 Resource = S::Resource; + type Participants = S::Participants; + type Status = 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 `status` field - pub struct status(()); ///Marker type for the `participants` field pub struct participants(()); + ///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::Resource: collaboration_state_view_state::IsSet, - S::Status: collaboration_state_view_state::IsSet, S::Participants: collaboration_state_view_state::IsSet, + S::Status: collaboration_state_view_state::IsSet, { /// Build the final struct pub fn build(self) -> CollaborationStateView<'a> { @@ -1610,67 +1610,67 @@ pub mod former_collaborator_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type User; + type EndReason; type WasActiveUntil; + type User; type WasActiveFrom; - type EndReason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type User = Unset; + type EndReason = Unset; type WasActiveUntil = Unset; + type User = 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; + ///State transition - sets the `end_reason` field to Set + pub struct SetEndReason(PhantomData S>); + impl sealed::Sealed for SetEndReason {} + impl State for SetEndReason { + type EndReason = Set; type WasActiveUntil = S::WasActiveUntil; + type User = S::User; type WasActiveFrom = S::WasActiveFrom; - type EndReason = S::EndReason; } ///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 EndReason = S::EndReason; type WasActiveUntil = Set; + type User = S::User; type WasActiveFrom = S::WasActiveFrom; + } + ///State transition - sets the `user` field to Set + pub struct SetUser(PhantomData S>); + impl sealed::Sealed for SetUser {} + impl State for SetUser { type EndReason = S::EndReason; + type WasActiveUntil = S::WasActiveUntil; + type User = Set; + type WasActiveFrom = S::WasActiveFrom; } ///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 User = S::User; type WasActiveUntil = S::WasActiveUntil; - type WasActiveFrom = S::WasActiveFrom; - type EndReason = Set; + type User = S::User; + type WasActiveFrom = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `user` field - pub struct user(()); + ///Marker type for the `end_reason` field + pub struct end_reason(()); ///Marker type for the `was_active_until` field pub struct was_active_until(()); + ///Marker type for the `user` field + pub struct user(()); ///Marker type for the `was_active_from` field pub struct was_active_from(()); - ///Marker type for the `end_reason` field - pub struct end_reason(()); } } @@ -1843,10 +1843,10 @@ where impl<'a, S> FormerCollaboratorViewBuilder<'a, S> where S: former_collaborator_view_state::State, - S::User: former_collaborator_view_state::IsSet, + S::EndReason: former_collaborator_view_state::IsSet, S::WasActiveUntil: former_collaborator_view_state::IsSet, + S::User: former_collaborator_view_state::IsSet, S::WasActiveFrom: former_collaborator_view_state::IsSet, - S::EndReason: former_collaborator_view_state::IsSet, { /// Build the final struct pub fn build(self) -> FormerCollaboratorView<'a> { @@ -2061,127 +2061,127 @@ pub mod invite_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Resource; type CreatedAt; type Status; - type Cid; - type Uri; type Invitee; + type Uri; + type Cid; type Inviter; - type Resource; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Resource = Unset; type CreatedAt = Unset; type Status = Unset; - type Cid = Unset; - type Uri = Unset; type Invitee = Unset; + type Uri = Unset; + type Cid = Unset; type Inviter = Unset; - type Resource = 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 CreatedAt = S::CreatedAt; + type Status = S::Status; + type Invitee = S::Invitee; + type Uri = S::Uri; + type Cid = S::Cid; + type Inviter = S::Inviter; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Resource = S::Resource; type CreatedAt = Set; type Status = S::Status; - type Cid = S::Cid; - type Uri = S::Uri; type Invitee = S::Invitee; + type Uri = S::Uri; + type Cid = S::Cid; type Inviter = S::Inviter; - 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 Resource = S::Resource; type CreatedAt = S::CreatedAt; type Status = Set; - type Cid = S::Cid; - type Uri = S::Uri; type Invitee = S::Invitee; + type Uri = S::Uri; + type Cid = S::Cid; type Inviter = S::Inviter; - type Resource = S::Resource; } - ///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 `invitee` field to Set + pub struct SetInvitee(PhantomData S>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Resource = S::Resource; type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = Set; + type Invitee = Set; type Uri = S::Uri; - type Invitee = S::Invitee; + type Cid = S::Cid; type Inviter = S::Inviter; - type Resource = S::Resource; } ///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 CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; - type Uri = Set; type Invitee = S::Invitee; + type Uri = Set; + type Cid = S::Cid; type Inviter = S::Inviter; - type Resource = S::Resource; } - ///State transition - sets the `invitee` field to Set - pub struct SetInvitee(PhantomData S>); - impl sealed::Sealed for SetInvitee {} - impl State for SetInvitee { + ///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; - type Cid = S::Cid; + type Invitee = S::Invitee; type Uri = S::Uri; - type Invitee = Set; + type Cid = Set; type Inviter = S::Inviter; - type Resource = S::Resource; } ///State transition - sets the `inviter` field to Set pub struct SetInviter(PhantomData S>); impl sealed::Sealed for SetInviter {} impl State for SetInviter { - type CreatedAt = S::CreatedAt; - type Status = S::Status; - type Cid = S::Cid; - type Uri = S::Uri; - type Invitee = S::Invitee; - type Inviter = Set; type Resource = S::Resource; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData S>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { type CreatedAt = S::CreatedAt; type Status = S::Status; - type Cid = S::Cid; - type Uri = S::Uri; type Invitee = S::Invitee; - type Inviter = S::Inviter; - type Resource = Set; + type Uri = S::Uri; + type Cid = S::Cid; + type Inviter = 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 `created_at` field pub struct created_at(()); ///Marker type for the `status` field pub struct status(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `invitee` field pub struct invitee(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `inviter` field pub struct inviter(()); - ///Marker type for the `resource` field - pub struct resource(()); } } @@ -2479,13 +2479,13 @@ where impl<'a, S> InviteViewBuilder<'a, S> where S: invite_view_state::State, + S::Resource: invite_view_state::IsSet, S::CreatedAt: invite_view_state::IsSet, S::Status: invite_view_state::IsSet, - S::Cid: invite_view_state::IsSet, - S::Uri: invite_view_state::IsSet, S::Invitee: invite_view_state::IsSet, + S::Uri: invite_view_state::IsSet, + S::Cid: invite_view_state::IsSet, S::Inviter: invite_view_state::IsSet, - S::Resource: invite_view_state::IsSet, { /// Build the final struct pub fn build(self) -> InviteView<'a> { @@ -2822,50 +2822,50 @@ pub mod participant_state_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Status; - type User; type Role; + type User; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Status = Unset; - type User = Unset; type Role = Unset; + type User = 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 User = S::User; - type Role = S::Role; - } - ///State transition - sets the `user` field to Set - pub struct SetUser(PhantomData S>); - impl sealed::Sealed for SetUser {} - impl State for SetUser { - type Status = S::Status; - type User = Set; type Role = S::Role; + type User = S::User; } ///State transition - sets the `role` field to Set pub struct SetRole(PhantomData S>); impl sealed::Sealed for SetRole {} impl State for SetRole { type Status = S::Status; - type User = S::User; type Role = 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 Status = S::Status; + type Role = S::Role; + type User = 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 `user` field - pub struct user(()); ///Marker type for the `role` field pub struct role(()); + ///Marker type for the `user` field + pub struct user(()); } } @@ -3128,8 +3128,8 @@ impl<'a, S> ParticipantStateViewBuilder<'a, S> where S: participant_state_view_state::State, S::Status: participant_state_view_state::IsSet, - S::User: participant_state_view_state::IsSet, S::Role: participant_state_view_state::IsSet, + S::User: participant_state_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ParticipantStateView<'a> { @@ -3543,85 +3543,85 @@ pub mod session_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type User; type Resource; - type NodeId; - type Uri; type CreatedAt; + type NodeId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type User = Unset; type Resource = Unset; - type NodeId = Unset; - type Uri = Unset; type CreatedAt = Unset; + type NodeId = 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 User = S::User; + type Resource = S::Resource; + 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 Uri = S::Uri; type User = Set; type Resource = S::Resource; - type NodeId = S::NodeId; - type Uri = S::Uri; type CreatedAt = S::CreatedAt; + type NodeId = S::NodeId; } ///State transition - sets the `resource` field to Set pub struct SetResource(PhantomData S>); impl sealed::Sealed for SetResource {} impl State for SetResource { - type User = S::User; - type Resource = Set; - type NodeId = S::NodeId; type Uri = S::Uri; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `node_id` field to Set - pub struct SetNodeId(PhantomData S>); - impl sealed::Sealed for SetNodeId {} - impl State for SetNodeId { type User = S::User; - type Resource = S::Resource; - type NodeId = Set; - type Uri = S::Uri; + type Resource = Set; 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 User = S::User; - type Resource = S::Resource; type NodeId = S::NodeId; - 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 Uri = S::Uri; type User = S::User; type Resource = S::Resource; + 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 Uri = S::Uri; - type CreatedAt = Set; + type User = S::User; + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; + type NodeId = 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 `user` field pub struct user(()); ///Marker type for the `resource` field pub struct resource(()); - ///Marker type for the `node_id` field - pub struct node_id(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `node_id` field + pub struct node_id(()); } } @@ -3794,11 +3794,11 @@ where impl<'a, S> SessionViewBuilder<'a, S> where S: session_view_state::State, + S::Uri: session_view_state::IsSet, S::User: session_view_state::IsSet, S::Resource: session_view_state::IsSet, - S::NodeId: session_view_state::IsSet, - S::Uri: 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 b7e6103..34260eb 100644 --- a/crates/weaver-api/src/sh_weaver/collab/accept.rs +++ b/crates/weaver-api/src/sh_weaver/collab/accept.rs @@ -37,51 +37,51 @@ pub mod accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Resource; type CreatedAt; type Invite; - type Resource; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Resource = Unset; type CreatedAt = Unset; type Invite = Unset; - type Resource = 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 CreatedAt = S::CreatedAt; + type Invite = S::Invite; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Resource = S::Resource; type CreatedAt = Set; type Invite = S::Invite; - type Resource = S::Resource; } ///State transition - sets the `invite` field to Set pub struct SetInvite(PhantomData S>); impl sealed::Sealed for SetInvite {} impl State for SetInvite { - type CreatedAt = S::CreatedAt; - type Invite = Set; type Resource = S::Resource; - } - ///State transition - sets the `resource` field to Set - pub struct SetResource(PhantomData S>); - impl sealed::Sealed for SetResource {} - impl State for SetResource { type CreatedAt = S::CreatedAt; - type Invite = S::Invite; - type Resource = Set; + 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 `created_at` field pub struct created_at(()); ///Marker type for the `invite` field pub struct invite(()); - ///Marker type for the `resource` field - pub struct resource(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> AcceptBuilder<'a, S> where S: accept_state::State, + S::Resource: accept_state::IsSet, S::CreatedAt: accept_state::IsSet, S::Invite: accept_state::IsSet, - S::Resource: 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 65e381e..26802df 100644 --- a/crates/weaver-api/src/sh_weaver/collab/invite.rs +++ b/crates/weaver-api/src/sh_weaver/collab/invite.rs @@ -141,50 +141,50 @@ pub mod invite_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Resource; - type Invitee; type CreatedAt; + type Invitee; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Resource = Unset; - type Invitee = Unset; type CreatedAt = Unset; + type Invitee = 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 Invitee = S::Invitee; - type CreatedAt = S::CreatedAt; - } - ///State transition - sets the `invitee` field to Set - pub struct SetInvitee(PhantomData S>); - impl sealed::Sealed for SetInvitee {} - impl State for SetInvitee { - type Resource = S::Resource; - type Invitee = Set; type CreatedAt = S::CreatedAt; + type Invitee = S::Invitee; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { type Resource = S::Resource; - type Invitee = S::Invitee; type CreatedAt = Set; + type Invitee = S::Invitee; + } + ///State transition - sets the `invitee` field to Set + pub struct SetInvitee(PhantomData S>); + impl sealed::Sealed for SetInvitee {} + impl State for SetInvitee { + type Resource = S::Resource; + type CreatedAt = S::CreatedAt; + type Invitee = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `resource` field pub struct resource(()); - ///Marker type for the `invitee` field - pub struct invitee(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `invitee` field + pub struct invitee(()); } } @@ -335,8 +335,8 @@ impl<'a, S> InviteBuilder<'a, S> where S: invite_state::State, S::Resource: invite_state::IsSet, - S::Invitee: invite_state::IsSet, S::CreatedAt: invite_state::IsSet, + S::Invitee: invite_state::IsSet, { /// Build the final struct pub fn build(self) -> Invite<'a> { diff --git a/crates/weaver-api/src/sh_weaver/collab/session.rs b/crates/weaver-api/src/sh_weaver/collab/session.rs index f144b74..85912a8 100644 --- a/crates/weaver-api/src/sh_weaver/collab/session.rs +++ b/crates/weaver-api/src/sh_weaver/collab/session.rs @@ -44,49 +44,49 @@ pub mod session_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Resource; type CreatedAt; + type Resource; type NodeId; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Resource = Unset; type CreatedAt = Unset; + type Resource = 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 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 CreatedAt = Set; + type Resource = S::Resource; + type NodeId = S::NodeId; + } + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData S>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type CreatedAt = S::CreatedAt; + type Resource = Set; type NodeId = S::NodeId; } ///State transition - sets the `node_id` field to Set pub struct SetNodeId(PhantomData S>); impl sealed::Sealed for SetNodeId {} impl State for SetNodeId { - type Resource = S::Resource; type CreatedAt = S::CreatedAt; + type Resource = S::Resource; type NodeId = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `resource` field - pub struct resource(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `resource` field + pub struct resource(()); ///Marker type for the `node_id` field pub struct node_id(()); } @@ -221,8 +221,8 @@ where impl<'a, S> SessionBuilder<'a, S> where S: session_state::State, - S::Resource: session_state::IsSet, S::CreatedAt: session_state::IsSet, + S::Resource: session_state::IsSet, S::NodeId: session_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/domain.rs b/crates/weaver-api/src/sh_weaver/domain.rs index df89c0f..eee98b7 100644 --- a/crates/weaver-api/src/sh_weaver/domain.rs +++ b/crates/weaver-api/src/sh_weaver/domain.rs @@ -54,151 +54,151 @@ pub mod document_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; + type Cid; type Uri; type Rkey; - type Cid; type IndexedAt; - type Did; - type Path; + type Record; type Title; + type Path; + type Did; } /// 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 Rkey = Unset; - type Cid = Unset; type IndexedAt = Unset; - type Did = Unset; - type Path = Unset; + type Record = Unset; type Title = Unset; + type Path = Unset; + type Did = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; + ///State transition - sets the `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 Rkey = S::Rkey; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Path = S::Path; + type Record = S::Record; type Title = S::Title; + type Path = S::Path; + type Did = S::Did; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = S::Record; + type Cid = S::Cid; type Uri = Set; type Rkey = S::Rkey; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Path = S::Path; + type Record = S::Record; type Title = S::Title; + type Path = S::Path; + type Did = S::Did; } ///State transition - sets the `rkey` field to Set pub struct SetRkey(PhantomData S>); impl sealed::Sealed for SetRkey {} impl State for SetRkey { - type Record = S::Record; + type Cid = S::Cid; type Uri = S::Uri; type Rkey = Set; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Path = S::Path; - type Title = S::Title; - } - ///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 Rkey = S::Rkey; - type Cid = Set; - type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Path = S::Path; type Title = S::Title; + type Path = S::Path; + type Did = S::Did; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Record = S::Record; + type Cid = S::Cid; type Uri = S::Uri; type Rkey = S::Rkey; - type Cid = S::Cid; type IndexedAt = Set; - type Did = S::Did; - type Path = S::Path; + type Record = S::Record; type Title = S::Title; + type Path = S::Path; + 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 Record = S::Record; + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Cid = S::Cid; type Uri = S::Uri; type Rkey = S::Rkey; + type IndexedAt = S::IndexedAt; + type Record = Set; + type Title = S::Title; + type Path = S::Path; + type Did = S::Did; + } + ///State transition - sets the `title` field to Set + pub struct SetTitle(PhantomData S>); + impl sealed::Sealed for SetTitle {} + impl State for SetTitle { type Cid = S::Cid; + type Uri = S::Uri; + type Rkey = S::Rkey; type IndexedAt = S::IndexedAt; - type Did = Set; + type Record = S::Record; + type Title = Set; type Path = S::Path; - type Title = S::Title; + type Did = S::Did; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Record = S::Record; + type Cid = S::Cid; type Uri = S::Uri; type Rkey = S::Rkey; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Path = Set; + type Record = S::Record; type Title = S::Title; + type Path = Set; + type Did = S::Did; } - ///State transition - sets the `title` field to Set - pub struct SetTitle(PhantomData S>); - impl sealed::Sealed for SetTitle {} - impl State for SetTitle { - type Record = S::Record; + ///State transition - sets the `did` field to Set + pub struct SetDid(PhantomData S>); + impl sealed::Sealed for SetDid {} + impl State for SetDid { + type Cid = S::Cid; type Uri = S::Uri; type Rkey = S::Rkey; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; - type Did = S::Did; + type Record = S::Record; + type Title = S::Title; type Path = S::Path; - type Title = Set; + type Did = 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 `rkey` field pub struct rkey(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `did` field - pub struct did(()); - ///Marker type for the `path` field - pub struct path(()); + ///Marker type for the `record` field + pub struct record(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `path` field + pub struct path(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -436,14 +436,14 @@ where impl<'a, S> DocumentViewBuilder<'a, S> where S: document_view_state::State, - S::Record: document_view_state::IsSet, + S::Cid: document_view_state::IsSet, S::Uri: document_view_state::IsSet, S::Rkey: document_view_state::IsSet, - S::Cid: document_view_state::IsSet, S::IndexedAt: document_view_state::IsSet, - S::Did: document_view_state::IsSet, - S::Path: document_view_state::IsSet, + S::Record: document_view_state::IsSet, S::Title: document_view_state::IsSet, + S::Path: document_view_state::IsSet, + S::Did: document_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DocumentView<'a> { @@ -907,151 +907,151 @@ pub mod publication_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Domain; - type Rkey; type IndexedAt; + type Uri; type Name; - type Record; - type Cid; type Did; + type Cid; + type Rkey; + type Record; + type Domain; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Domain = Unset; - type Rkey = Unset; type IndexedAt = Unset; + type Uri = Unset; type Name = Unset; - type Record = Unset; - type Cid = Unset; type Did = Unset; + type Cid = Unset; + type Rkey = Unset; + type Record = Unset; + type Domain = 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 Domain = S::Domain; - type Rkey = S::Rkey; - 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 IndexedAt = Set; + type Uri = S::Uri; type Name = S::Name; - type Record = S::Record; - type Cid = S::Cid; type Did = S::Did; - } - ///State transition - sets the `domain` field to Set - pub struct SetDomain(PhantomData S>); - impl sealed::Sealed for SetDomain {} - impl State for SetDomain { - type Uri = S::Uri; - type Domain = Set; + type Cid = S::Cid; type Rkey = S::Rkey; - type IndexedAt = S::IndexedAt; - type Name = S::Name; type Record = S::Record; - type Cid = S::Cid; - type Did = S::Did; - } - ///State transition - sets the `rkey` field to Set - pub struct SetRkey(PhantomData S>); - impl sealed::Sealed for SetRkey {} - impl State for SetRkey { - type Uri = S::Uri; type Domain = S::Domain; - type Rkey = Set; + } + ///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 Name = S::Name; - type Record = S::Record; - type Cid = S::Cid; type Did = S::Did; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Uri = S::Uri; - type Domain = S::Domain; + type Cid = S::Cid; type Rkey = S::Rkey; - type IndexedAt = Set; - type Name = S::Name; type Record = S::Record; - type Cid = S::Cid; - type Did = S::Did; + type Domain = S::Domain; } ///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 Domain = S::Domain; - type Rkey = S::Rkey; type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Name = Set; - type Record = S::Record; - type Cid = S::Cid; type Did = S::Did; - } - ///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 Domain = S::Domain; + type Cid = S::Cid; type Rkey = S::Rkey; + type Record = S::Record; + type Domain = S::Domain; + } + ///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 Uri = S::Uri; type Name = S::Name; - type Record = Set; + type Did = Set; type Cid = S::Cid; - type Did = S::Did; + type Rkey = S::Rkey; + type Record = S::Record; + type Domain = S::Domain; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Domain = S::Domain; + type Name = S::Name; + type Did = S::Did; + type Cid = Set; type Rkey = S::Rkey; + type Record = S::Record; + type Domain = S::Domain; + } + ///State transition - sets the `rkey` field to Set + pub struct SetRkey(PhantomData S>); + impl sealed::Sealed for SetRkey {} + impl State for SetRkey { type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Name = S::Name; - type Record = S::Record; - type Cid = Set; type Did = S::Did; + type Cid = S::Cid; + type Rkey = Set; + type Record = S::Record; + type Domain = S::Domain; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type IndexedAt = S::IndexedAt; type Uri = S::Uri; - type Domain = S::Domain; + type Name = S::Name; + type Did = S::Did; + type Cid = S::Cid; type Rkey = S::Rkey; + type Record = Set; + type Domain = S::Domain; + } + ///State transition - sets the `domain` field to Set + pub struct SetDomain(PhantomData S>); + impl sealed::Sealed for SetDomain {} + impl State for SetDomain { type IndexedAt = S::IndexedAt; + type Uri = S::Uri; type Name = S::Name; - type Record = S::Record; + type Did = S::Did; type Cid = S::Cid; - type Did = Set; + type Rkey = S::Rkey; + type Record = S::Record; + type Domain = 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 `domain` field - pub struct domain(()); - ///Marker type for the `rkey` field - pub struct rkey(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `name` field pub struct name(()); - ///Marker type for the `record` field - pub struct record(()); - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `rkey` field + pub struct rkey(()); + ///Marker type for the `record` field + pub struct record(()); + ///Marker type for the `domain` field + pub struct domain(()); } } @@ -1274,14 +1274,14 @@ where impl<'a, S> PublicationViewBuilder<'a, S> where S: publication_view_state::State, - S::Uri: publication_view_state::IsSet, - S::Domain: publication_view_state::IsSet, - S::Rkey: publication_view_state::IsSet, S::IndexedAt: publication_view_state::IsSet, + S::Uri: publication_view_state::IsSet, S::Name: publication_view_state::IsSet, - S::Record: publication_view_state::IsSet, - S::Cid: publication_view_state::IsSet, S::Did: publication_view_state::IsSet, + S::Cid: publication_view_state::IsSet, + S::Rkey: publication_view_state::IsSet, + S::Record: publication_view_state::IsSet, + S::Domain: publication_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PublicationView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/domain/generate_document.rs b/crates/weaver-api/src/sh_weaver/domain/generate_document.rs index 3e088c2..d3f2bdf 100644 --- a/crates/weaver-api/src/sh_weaver/domain/generate_document.rs +++ b/crates/weaver-api/src/sh_weaver/domain/generate_document.rs @@ -21,8 +21,9 @@ pub struct GenerateDocument<'a> { #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] pub entry_record: std::option::Option>, + #[serde(skip_serializing_if = "std::option::Option::is_none")] #[serde(borrow)] - pub path: jacquard_common::CowStr<'a>, + pub path: std::option::Option>, #[serde(borrow)] pub publication: jacquard_common::types::string::AtUri<'a>, } @@ -37,51 +38,37 @@ pub mod generate_document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Path; - type Publication; type Entry; + type Publication; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Path = Unset; - type Publication = Unset; type Entry = Unset; + type Publication = Unset; } - ///State transition - sets the `path` field to Set - pub struct SetPath(PhantomData S>); - impl sealed::Sealed for SetPath {} - impl State for SetPath { - type Path = Set; + ///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 Publication = S::Publication; - type Entry = S::Entry; } ///State transition - sets the `publication` field to Set pub struct SetPublication(PhantomData S>); impl sealed::Sealed for SetPublication {} impl State for SetPublication { - type Path = S::Path; - type Publication = 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 Path = S::Path; - type Publication = S::Publication; - type Entry = Set; + type Publication = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `path` field - pub struct path(()); - ///Marker type for the `publication` field - pub struct publication(()); ///Marker type for the `entry` field pub struct entry(()); + ///Marker type for the `publication` field + pub struct publication(()); } } @@ -153,22 +140,19 @@ impl<'a, S: generate_document_state::State> GenerateDocumentBuilder<'a, S> { } } -impl<'a, S> GenerateDocumentBuilder<'a, S> -where - S: generate_document_state::State, - S::Path: generate_document_state::IsUnset, -{ - /// Set the `path` field (required) +impl<'a, S: generate_document_state::State> GenerateDocumentBuilder<'a, S> { + /// Set the `path` field (optional) pub fn path( mut self, - value: impl Into>, - ) -> GenerateDocumentBuilder<'a, generate_document_state::SetPath> { - self.__unsafe_private_named.2 = ::core::option::Option::Some(value.into()); - GenerateDocumentBuilder { - _phantom_state: ::core::marker::PhantomData, - __unsafe_private_named: self.__unsafe_private_named, - _phantom: ::core::marker::PhantomData, - } + value: impl Into>>, + ) -> Self { + self.__unsafe_private_named.2 = value.into(); + self + } + /// Set the `path` field to an Option value (optional) + pub fn maybe_path(mut self, value: Option>) -> Self { + self.__unsafe_private_named.2 = value; + self } } @@ -194,16 +178,15 @@ where impl<'a, S> GenerateDocumentBuilder<'a, S> where S: generate_document_state::State, - S::Path: generate_document_state::IsSet, - S::Publication: generate_document_state::IsSet, S::Entry: generate_document_state::IsSet, + S::Publication: generate_document_state::IsSet, { /// Build the final struct pub fn build(self) -> GenerateDocument<'a> { GenerateDocument { entry: self.__unsafe_private_named.0.unwrap(), entry_record: self.__unsafe_private_named.1, - path: self.__unsafe_private_named.2.unwrap(), + path: self.__unsafe_private_named.2, publication: self.__unsafe_private_named.3.unwrap(), } } diff --git a/crates/weaver-api/src/sh_weaver/domain/resolve_document.rs b/crates/weaver-api/src/sh_weaver/domain/resolve_document.rs index d251604..69299cf 100644 --- a/crates/weaver-api/src/sh_weaver/domain/resolve_document.rs +++ b/crates/weaver-api/src/sh_weaver/domain/resolve_document.rs @@ -32,37 +32,37 @@ pub mod resolve_document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Path; type Publication; + type Path; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Path = Unset; type Publication = Unset; - } - ///State transition - sets the `path` field to Set - pub struct SetPath(PhantomData S>); - impl sealed::Sealed for SetPath {} - impl State for SetPath { - type Path = Set; - type Publication = S::Publication; + type Path = Unset; } ///State transition - sets the `publication` field to Set pub struct SetPublication(PhantomData S>); impl sealed::Sealed for SetPublication {} impl State for SetPublication { - type Path = S::Path; type Publication = Set; + type Path = S::Path; + } + ///State transition - sets the `path` field to Set + pub struct SetPath(PhantomData S>); + impl sealed::Sealed for SetPath {} + impl State for SetPath { + type Publication = S::Publication; + type Path = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `path` field - pub struct path(()); ///Marker type for the `publication` field pub struct publication(()); + ///Marker type for the `path` field + pub struct path(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> ResolveDocumentBuilder<'a, S> where S: resolve_document_state::State, - S::Path: resolve_document_state::IsSet, S::Publication: resolve_document_state::IsSet, + S::Path: resolve_document_state::IsSet, { /// Build the final struct pub fn build(self) -> ResolveDocument<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit.rs b/crates/weaver-api/src/sh_weaver/edit.rs index 8a1bb69..7b5660d 100644 --- a/crates/weaver-api/src/sh_weaver/edit.rs +++ b/crates/weaver-api/src/sh_weaver/edit.rs @@ -721,65 +721,65 @@ 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 LastUpdated; - type Head; type Length; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Head = Unset; type Author = Unset; type LastUpdated = Unset; - type Head = Unset; type Length = Unset; } + ///State transition - sets the `head` field to Set + pub struct SetHead(PhantomData S>); + impl sealed::Sealed for SetHead {} + impl State for SetHead { + type Head = Set; + type Author = S::Author; + type LastUpdated = S::LastUpdated; + type Length = S::Length; + } ///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 LastUpdated = S::LastUpdated; - type Head = S::Head; type Length = S::Length; } ///State transition - sets the `last_updated` field to Set pub struct SetLastUpdated(PhantomData S>); impl sealed::Sealed for SetLastUpdated {} impl State for SetLastUpdated { - type Author = S::Author; - type LastUpdated = Set; type Head = S::Head; - type Length = S::Length; - } - ///State transition - sets the `head` field to Set - pub struct SetHead(PhantomData S>); - impl sealed::Sealed for SetHead {} - impl State for SetHead { type Author = S::Author; - type LastUpdated = S::LastUpdated; - type Head = Set; + type LastUpdated = Set; type Length = S::Length; } ///State transition - sets the `length` field to Set pub struct SetLength(PhantomData S>); impl sealed::Sealed for SetLength {} impl State for SetLength { + type Head = S::Head; type Author = S::Author; type LastUpdated = S::LastUpdated; - type Head = S::Head; type Length = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `head` field + pub struct head(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `last_updated` field pub struct last_updated(()); - ///Marker type for the `head` field - pub struct head(()); ///Marker type for the `length` field pub struct length(()); } @@ -948,9 +948,9 @@ impl<'a, S: edit_branch_view_state::State> EditBranchViewBuilder<'a, S> { 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::LastUpdated: edit_branch_view_state::IsSet, - S::Head: edit_branch_view_state::IsSet, S::Length: edit_branch_view_state::IsSet, { /// Build the final struct @@ -1053,85 +1053,85 @@ pub mod edit_history_entry_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Type; type Cid; - type Uri; + type CreatedAt; type Author; + type Uri; + type Type; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type Type = Unset; type Cid = Unset; - type Uri = Unset; + type CreatedAt = Unset; type Author = Unset; + type Uri = Unset; + type Type = 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 Author = S::Author; + type Uri = S::Uri; + 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 CreatedAt = Set; - type Type = S::Type; type Cid = S::Cid; - type Uri = S::Uri; + type CreatedAt = Set; type Author = S::Author; - } - ///State transition - sets the `type` field to Set - pub struct SetType(PhantomData S>); - impl sealed::Sealed for SetType {} - impl State for SetType { - type CreatedAt = S::CreatedAt; - type Type = Set; - type Cid = S::Cid; type Uri = S::Uri; - type Author = S::Author; + type Type = S::Type; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { + ///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 CreatedAt = S::CreatedAt; - type Type = S::Type; - type Cid = Set; + type Author = Set; type Uri = S::Uri; - type Author = S::Author; + type Type = S::Type; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type CreatedAt = S::CreatedAt; - type Type = S::Type; type Cid = S::Cid; - 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 CreatedAt = S::CreatedAt; + type Author = S::Author; + type Uri = 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 CreatedAt = S::CreatedAt; + type Author = S::Author; type Uri = S::Uri; - type Author = Set; + type Type = 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 `type` field - pub struct r#type(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); + ///Marker type for the `created_at` field + pub struct created_at(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `type` field + pub struct r#type(()); } } @@ -1348,11 +1348,11 @@ where impl<'a, S> EditHistoryEntryBuilder<'a, S> where S: edit_history_entry_state::State, - S::CreatedAt: edit_history_entry_state::IsSet, - S::Type: edit_history_entry_state::IsSet, S::Cid: edit_history_entry_state::IsSet, - S::Uri: edit_history_entry_state::IsSet, + S::CreatedAt: edit_history_entry_state::IsSet, S::Author: edit_history_entry_state::IsSet, + S::Uri: edit_history_entry_state::IsSet, + S::Type: edit_history_entry_state::IsSet, { /// Build the final struct pub fn build(self) -> EditHistoryEntry<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/cursor.rs b/crates/weaver-api/src/sh_weaver/edit/cursor.rs index b73f662..e85cb91 100644 --- a/crates/weaver-api/src/sh_weaver/edit/cursor.rs +++ b/crates/weaver-api/src/sh_weaver/edit/cursor.rs @@ -586,37 +586,37 @@ pub mod id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Counter; type Peer; + type Counter; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Counter = Unset; type Peer = Unset; - } - ///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 Counter = Unset; } ///State transition - sets the `peer` field to Set pub struct SetPeer(PhantomData S>); impl sealed::Sealed for SetPeer {} impl State for SetPeer { - type Counter = S::Counter; type Peer = Set; + type Counter = S::Counter; + } + ///State transition - sets the `counter` field to Set + pub struct SetCounter(PhantomData S>); + impl sealed::Sealed for SetCounter {} + impl State for SetCounter { + type Peer = S::Peer; + type Counter = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `counter` field - pub struct counter(()); ///Marker type for the `peer` field pub struct peer(()); + ///Marker type for the `counter` field + pub struct counter(()); } } @@ -683,8 +683,8 @@ where impl<'a, S> IdBuilder<'a, S> where S: id_state::State, - S::Counter: id_state::IsSet, S::Peer: id_state::IsSet, + S::Counter: id_state::IsSet, { /// Build the final struct pub fn build(self) -> Id<'a> { @@ -759,37 +759,37 @@ pub mod cursor_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Container; type Id; + type Container; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Container = Unset; 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 Container = Set; - type Id = S::Id; + 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 Container = S::Container; type Id = Set; + type Container = S::Container; + } + ///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; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `container` field - pub struct container(()); ///Marker type for the `id` field pub struct id(()); + ///Marker type for the `container` field + pub struct container(()); } } @@ -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::Container: cursor_state::IsSet, S::Id: cursor_state::IsSet, + S::Container: cursor_state::IsSet, { /// Build the final struct pub fn build(self) -> Cursor<'a> { @@ -1017,51 +1017,51 @@ pub mod normal_container_id_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Peer; type Counter; type ContainerType; - type Peer; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Peer = Unset; type Counter = Unset; type ContainerType = Unset; - type Peer = Unset; + } + ///State transition - sets the `peer` field to Set + pub struct SetPeer(PhantomData S>); + impl sealed::Sealed for SetPeer {} + impl State for SetPeer { + type Peer = Set; + type Counter = S::Counter; + type ContainerType = S::ContainerType; } ///State transition - sets the `counter` field to Set pub struct SetCounter(PhantomData S>); impl sealed::Sealed for SetCounter {} impl State for SetCounter { + type Peer = S::Peer; type Counter = Set; type 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 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; + type ContainerType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `peer` field + pub struct peer(()); ///Marker type for the `counter` field pub struct counter(()); ///Marker type for the `container_type` field pub struct container_type(()); - ///Marker type for the `peer` field - pub struct peer(()); } } @@ -1154,9 +1154,9 @@ where impl<'a, S> NormalContainerIdBuilder<'a, S> where S: normal_container_id_state::State, + S::Peer: normal_container_id_state::IsSet, S::Counter: normal_container_id_state::IsSet, S::ContainerType: normal_container_id_state::IsSet, - S::Peer: normal_container_id_state::IsSet, { /// Build the final struct pub fn build(self) -> NormalContainerId<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/diff.rs b/crates/weaver-api/src/sh_weaver/edit/diff.rs index 062858f..149c305 100644 --- a/crates/weaver-api/src/sh_weaver/edit/diff.rs +++ b/crates/weaver-api/src/sh_weaver/edit/diff.rs @@ -47,37 +47,37 @@ pub mod diff_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Root; type Doc; + type Root; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Root = Unset; type Doc = Unset; - } - ///State transition - sets the `root` field to Set - pub struct SetRoot(PhantomData S>); - impl sealed::Sealed for SetRoot {} - impl State for SetRoot { - type Root = Set; - type Doc = S::Doc; + type Root = Unset; } ///State transition - sets the `doc` field to Set pub struct SetDoc(PhantomData S>); impl sealed::Sealed for SetDoc {} impl State for SetDoc { - type Root = S::Root; type Doc = Set; + type Root = S::Root; + } + ///State transition - sets the `root` field to Set + pub struct SetRoot(PhantomData S>); + impl sealed::Sealed for SetRoot {} + impl State for SetRoot { + type Doc = S::Doc; + type Root = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `root` field - pub struct root(()); ///Marker type for the `doc` field pub struct doc(()); + ///Marker type for the `root` field + pub struct root(()); } } @@ -224,8 +224,8 @@ impl<'a, S: diff_state::State> DiffBuilder<'a, S> { impl<'a, S> DiffBuilder<'a, S> where S: diff_state::State, - S::Root: diff_state::IsSet, S::Doc: diff_state::IsSet, + S::Root: diff_state::IsSet, { /// Build the final struct pub fn build(self) -> Diff<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/list_drafts.rs b/crates/weaver-api/src/sh_weaver/edit/list_drafts.rs index d679e1a..986bcb4 100644 --- a/crates/weaver-api/src/sh_weaver/edit/list_drafts.rs +++ b/crates/weaver-api/src/sh_weaver/edit/list_drafts.rs @@ -47,51 +47,51 @@ pub mod draft_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Cid; type CreatedAt; 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 CreatedAt = 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 CreatedAt = S::CreatedAt; + type Uri = S::Uri; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Cid = S::Cid; type CreatedAt = 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 CreatedAt = S::CreatedAt; - 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 CreatedAt = S::CreatedAt; - type Uri = S::Uri; - type Cid = Set; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); } } @@ -241,9 +241,9 @@ where impl<'a, S> DraftViewBuilder<'a, S> where S: draft_view_state::State, + S::Cid: draft_view_state::IsSet, S::CreatedAt: draft_view_state::IsSet, S::Uri: draft_view_state::IsSet, - S::Cid: draft_view_state::IsSet, { /// Build the final struct pub fn build(self) -> DraftView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/edit/root.rs b/crates/weaver-api/src/sh_weaver/edit/root.rs index b764a51..563af17 100644 --- a/crates/weaver-api/src/sh_weaver/edit/root.rs +++ b/crates/weaver-api/src/sh_weaver/edit/root.rs @@ -34,37 +34,37 @@ pub mod root_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Snapshot; type Doc; + type Snapshot; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Snapshot = Unset; type Doc = Unset; - } - ///State transition - sets the `snapshot` field to Set - pub struct SetSnapshot(PhantomData S>); - impl sealed::Sealed for SetSnapshot {} - impl State for SetSnapshot { - type Snapshot = Set; - type Doc = S::Doc; + type Snapshot = Unset; } ///State transition - sets the `doc` field to Set pub struct SetDoc(PhantomData S>); impl sealed::Sealed for SetDoc {} impl State for SetDoc { - type Snapshot = S::Snapshot; type Doc = Set; + type Snapshot = S::Snapshot; + } + ///State transition - sets the `snapshot` field to Set + pub struct SetSnapshot(PhantomData S>); + impl sealed::Sealed for SetSnapshot {} + impl State for SetSnapshot { + type Doc = S::Doc; + type Snapshot = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `snapshot` field - pub struct snapshot(()); ///Marker type for the `doc` field pub struct doc(()); + ///Marker type for the `snapshot` field + pub struct snapshot(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> RootBuilder<'a, S> where S: root_state::State, - S::Snapshot: root_state::IsSet, S::Doc: root_state::IsSet, + S::Snapshot: root_state::IsSet, { /// Build the final struct pub fn build(self) -> Root<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed.rs b/crates/weaver-api/src/sh_weaver/embed.rs index ac21341..7c9dccc 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> { diff --git a/crates/weaver-api/src/sh_weaver/embed/external.rs b/crates/weaver-api/src/sh_weaver/embed/external.rs index 6c4cbf2..7522112 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 Uri; type Description; type Title; - 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 Description = Unset; type Title = 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 Description = S::Description; + type Title = S::Title; } ///State transition - sets the `description` field to Set pub struct SetDescription(PhantomData S>); impl sealed::Sealed for SetDescription {} impl State for SetDescription { + type Uri = S::Uri; type Description = Set; type Title = S::Title; - type Uri = S::Uri; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Description = S::Description; - type Title = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Description = S::Description; - type Title = S::Title; - type Uri = Set; + type Title = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `description` field pub struct description(()); ///Marker type for the `title` field pub struct title(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -195,9 +195,9 @@ where impl<'a, S> ExternalEmbedBuilder<'a, S> where S: external_embed_state::State, + S::Uri: external_embed_state::IsSet, S::Description: external_embed_state::IsSet, S::Title: external_embed_state::IsSet, - S::Uri: external_embed_state::IsSet, { /// Build the final struct pub fn build(self) -> ExternalEmbed<'a> { @@ -818,50 +818,50 @@ pub mod view_external_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Uri; - type Description; type Title; + 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 Description = 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 Description = S::Description; - type Title = S::Title; - } - ///State transition - sets the `description` field to Set - pub struct SetDescription(PhantomData S>); - impl sealed::Sealed for SetDescription {} - impl State for SetDescription { - type Uri = S::Uri; - type Description = Set; type Title = S::Title; + 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 Description = S::Description; 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 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 `description` field - pub struct description(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `description` field + pub struct description(()); } } @@ -975,8 +975,8 @@ impl<'a, S> ViewExternalBuilder<'a, S> where S: view_external_state::State, S::Uri: view_external_state::IsSet, - S::Description: view_external_state::IsSet, S::Title: view_external_state::IsSet, + S::Description: view_external_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewExternal<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/images.rs b/crates/weaver-api/src/sh_weaver/embed/images.rs index f1d6b32..7385ccb 100644 --- a/crates/weaver-api/src/sh_weaver/embed/images.rs +++ b/crates/weaver-api/src/sh_weaver/embed/images.rs @@ -44,37 +44,37 @@ pub mod image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Image; type Alt; + type Image; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Image = Unset; type Alt = Unset; - } - ///State transition - sets the `image` field to Set - pub struct SetImage(PhantomData S>); - impl sealed::Sealed for SetImage {} - impl State for SetImage { - type Image = Set; - type Alt = S::Alt; + type Image = Unset; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Image = S::Image; type Alt = Set; + type Image = S::Image; + } + ///State transition - sets the `image` field to Set + pub struct SetImage(PhantomData S>); + impl sealed::Sealed for SetImage {} + impl State for SetImage { + type Alt = S::Alt; + type Image = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `image` field - pub struct image(()); ///Marker type for the `alt` field pub struct alt(()); + ///Marker type for the `image` field + pub struct image(()); } } @@ -195,8 +195,8 @@ impl<'a, S: image_state::State> ImageBuilder<'a, S> { impl<'a, S> ImageBuilder<'a, S> where S: image_state::State, - S::Image: image_state::IsSet, S::Alt: image_state::IsSet, + S::Image: image_state::IsSet, { /// Build the final struct pub fn build(self) -> Image<'a> { @@ -902,51 +902,51 @@ pub mod view_image_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Fullsize; type Thumb; type Alt; - type Fullsize; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Fullsize = Unset; type Thumb = Unset; type Alt = Unset; - type Fullsize = Unset; + } + ///State transition - sets the `fullsize` field to Set + pub struct SetFullsize(PhantomData S>); + impl sealed::Sealed for SetFullsize {} + impl State for SetFullsize { + type Fullsize = Set; + type Thumb = S::Thumb; + type Alt = S::Alt; } ///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 Thumb = Set; type Alt = S::Alt; - type Fullsize = S::Fullsize; } ///State transition - sets the `alt` field to Set pub struct SetAlt(PhantomData S>); impl sealed::Sealed for SetAlt {} impl State for SetAlt { - type Thumb = S::Thumb; - type Alt = Set; type Fullsize = S::Fullsize; - } - ///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 Alt = S::Alt; - type Fullsize = Set; + type Alt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `fullsize` field + pub struct fullsize(()); ///Marker type for the `thumb` field pub struct thumb(()); ///Marker type for the `alt` field pub struct alt(()); - ///Marker type for the `fullsize` field - pub struct fullsize(()); } } @@ -1073,9 +1073,9 @@ where impl<'a, S> ViewImageBuilder<'a, S> where S: view_image_state::State, + S::Fullsize: view_image_state::IsSet, S::Thumb: view_image_state::IsSet, S::Alt: view_image_state::IsSet, - S::Fullsize: view_image_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewImage<'a> { diff --git a/crates/weaver-api/src/sh_weaver/embed/records.rs b/crates/weaver-api/src/sh_weaver/embed/records.rs index a4406aa..3eda2cf 100644 --- a/crates/weaver-api/src/sh_weaver/embed/records.rs +++ b/crates/weaver-api/src/sh_weaver/embed/records.rs @@ -1187,51 +1187,51 @@ pub mod view_blocked_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Uri; type Author; type Blocked; - type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Uri = Unset; type Author = Unset; type Blocked = 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 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; - type Uri = S::Uri; } ///State transition - sets the `blocked` field to Set pub struct SetBlocked(PhantomData S>); impl sealed::Sealed for SetBlocked {} impl State for SetBlocked { - type Author = S::Author; - type Blocked = Set; type Uri = S::Uri; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { type Author = S::Author; - type Blocked = S::Blocked; - type Uri = Set; + type Blocked = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `author` field pub struct author(()); ///Marker type for the `blocked` field pub struct blocked(()); - ///Marker type for the `uri` field - pub struct uri(()); } } @@ -1324,9 +1324,9 @@ where impl<'a, S> ViewBlockedBuilder<'a, S> where S: view_blocked_state::State, + S::Uri: view_blocked_state::IsSet, S::Author: view_blocked_state::IsSet, S::Blocked: view_blocked_state::IsSet, - S::Uri: view_blocked_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewBlocked<'a> { @@ -1398,37 +1398,37 @@ pub mod view_detached_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Detached; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type Detached = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type Detached = S::Detached; + type Uri = Unset; } ///State transition - sets the `detached` field to Set pub struct SetDetached(PhantomData S>); impl sealed::Sealed for SetDetached {} impl State for SetDetached { - type Uri = S::Uri; type Detached = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Detached = S::Detached; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `detached` field pub struct detached(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1501,8 +1501,8 @@ where impl<'a, S> ViewDetachedBuilder<'a, S> where S: view_detached_state::State, - S::Uri: view_detached_state::IsSet, S::Detached: view_detached_state::IsSet, + S::Uri: view_detached_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewDetached<'a> { @@ -1572,37 +1572,37 @@ pub mod view_not_found_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type NotFound; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type NotFound = Unset; - } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { - type Uri = Set; - type NotFound = S::NotFound; + type Uri = Unset; } ///State transition - sets the `not_found` field to Set pub struct SetNotFound(PhantomData S>); impl sealed::Sealed for SetNotFound {} impl State for SetNotFound { - type Uri = S::Uri; type NotFound = Set; + type Uri = S::Uri; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type NotFound = S::NotFound; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `not_found` field pub struct not_found(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -1675,8 +1675,8 @@ where impl<'a, S> ViewNotFoundBuilder<'a, S> where S: view_not_found_state::State, - S::Uri: view_not_found_state::IsSet, S::NotFound: view_not_found_state::IsSet, + S::Uri: view_not_found_state::IsSet, { /// Build the final struct pub fn build(self) -> ViewNotFound<'a> { @@ -1771,8 +1771,8 @@ pub mod view_record_state { pub trait State: sealed::Sealed { type Uri; type Cid; - type Value; type Author; + type Value; type IndexedAt; } /// Empty state - all required fields are unset @@ -1781,8 +1781,8 @@ pub mod view_record_state { impl State for Empty { type Uri = Unset; type Cid = Unset; - type Value = Unset; type Author = Unset; + type Value = Unset; type IndexedAt = Unset; } ///State transition - sets the `uri` field to Set @@ -1791,8 +1791,8 @@ pub mod view_record_state { impl State for SetUri { type Uri = Set; type Cid = S::Cid; - type Value = S::Value; type Author = S::Author; + type Value = S::Value; type IndexedAt = S::IndexedAt; } ///State transition - sets the `cid` field to Set @@ -1801,18 +1801,8 @@ pub mod view_record_state { impl State for SetCid { type Uri = S::Uri; type Cid = Set; - type Value = S::Value; - type Author = S::Author; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `value` field to Set - pub struct SetValue(PhantomData S>); - impl sealed::Sealed for SetValue {} - impl State for SetValue { - type Uri = S::Uri; - type Cid = S::Cid; - type Value = Set; type Author = S::Author; + type Value = S::Value; type IndexedAt = S::IndexedAt; } ///State transition - sets the `author` field to Set @@ -1821,8 +1811,18 @@ pub mod view_record_state { impl State for SetAuthor { type Uri = S::Uri; type Cid = S::Cid; - type Value = S::Value; type Author = Set; + type Value = S::Value; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `value` field to Set + pub struct SetValue(PhantomData S>); + impl sealed::Sealed for SetValue {} + impl State for SetValue { + type Uri = S::Uri; + type Cid = S::Cid; + type Author = S::Author; + type Value = Set; type IndexedAt = S::IndexedAt; } ///State transition - sets the `indexed_at` field to Set @@ -1831,8 +1831,8 @@ pub mod view_record_state { impl State for SetIndexedAt { type Uri = S::Uri; type Cid = S::Cid; - type Value = S::Value; type Author = S::Author; + type Value = S::Value; type IndexedAt = Set; } /// Marker types for field names @@ -1842,10 +1842,10 @@ pub mod view_record_state { pub struct uri(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `value` field - pub struct value(()); ///Marker type for the `author` field pub struct author(()); + ///Marker type for the `value` field + pub struct value(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } @@ -2094,8 +2094,8 @@ where S: view_record_state::State, S::Uri: view_record_state::IsSet, S::Cid: view_record_state::IsSet, - S::Value: view_record_state::IsSet, S::Author: view_record_state::IsSet, + S::Value: view_record_state::IsSet, S::IndexedAt: view_record_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-api/src/sh_weaver/embed/video.rs b/crates/weaver-api/src/sh_weaver/embed/video.rs index ca20c77..db37a2d 100644 --- a/crates/weaver-api/src/sh_weaver/embed/video.rs +++ b/crates/weaver-api/src/sh_weaver/embed/video.rs @@ -32,37 +32,37 @@ pub mod caption_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Lang; type File; + type Lang; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Lang = Unset; type File = Unset; - } - ///State transition - sets the `lang` field to Set - pub struct SetLang(PhantomData S>); - impl sealed::Sealed for SetLang {} - impl State for SetLang { - type Lang = Set; - type File = S::File; + type Lang = Unset; } ///State transition - sets the `file` field to Set pub struct SetFile(PhantomData S>); impl sealed::Sealed for SetFile {} impl State for SetFile { - type Lang = S::Lang; type File = 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 File = S::File; + type Lang = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `lang` field - pub struct lang(()); ///Marker type for the `file` field pub struct file(()); + ///Marker type for the `lang` field + pub struct lang(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> CaptionBuilder<'a, S> where S: caption_state::State, - S::Lang: caption_state::IsSet, S::File: caption_state::IsSet, + S::Lang: caption_state::IsSet, { /// Build the final struct pub fn build(self) -> Caption<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph.rs b/crates/weaver-api/src/sh_weaver/graph.rs index 45a55da..ffdf8ec 100644 --- a/crates/weaver-api/src/sh_weaver/graph.rs +++ b/crates/weaver-api/src/sh_weaver/graph.rs @@ -59,37 +59,37 @@ pub mod community_tag_count_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Tag; type Count; + 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 Count = Unset; - } - ///State transition - sets the `tag` field to Set - pub struct SetTag(PhantomData S>); - impl sealed::Sealed for SetTag {} - impl State for SetTag { - type Tag = Set; - type Count = S::Count; + type Tag = Unset; } ///State transition - sets the `count` field to Set pub struct SetCount(PhantomData S>); impl sealed::Sealed for SetCount {} impl State for SetCount { - type Tag = S::Tag; type Count = 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 Count = S::Count; + 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 `count` field pub struct count(()); + ///Marker type for the `tag` field + pub struct tag(()); } } @@ -162,8 +162,8 @@ where impl<'a, S> CommunityTagCountBuilder<'a, S> where S: community_tag_count_state::State, - S::Tag: community_tag_count_state::IsSet, S::Count: community_tag_count_state::IsSet, + S::Tag: community_tag_count_state::IsSet, { /// Build the final struct pub fn build(self) -> CommunityTagCount<'a> { @@ -883,37 +883,37 @@ pub mod list_item_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Uri; + 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 Uri = Unset; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Subject = Set; - type Uri = S::Uri; + type Subject = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Subject = S::Subject; type Uri = 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 Uri = S::Uri; + 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 `uri` field pub struct uri(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -1006,8 +1006,8 @@ where impl<'a, S> ListItemViewBuilder<'a, S> where S: list_item_view_state::State, - S::Subject: list_item_view_state::IsSet, S::Uri: list_item_view_state::IsSet, + S::Subject: list_item_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ListItemView<'a> { @@ -1212,125 +1212,125 @@ pub mod list_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Creator; - type Purpose; type Uri; type ItemCount; - type Name; + type Creator; type Cid; + type Name; + type Purpose; type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Creator = Unset; - type Purpose = Unset; type Uri = Unset; type ItemCount = Unset; - type Name = Unset; + type Creator = Unset; type Cid = Unset; + type Name = Unset; + type Purpose = 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 Purpose = S::Purpose; - type Uri = S::Uri; - type ItemCount = S::ItemCount; - type Name = S::Name; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `purpose` field to Set - pub struct SetPurpose(PhantomData S>); - impl sealed::Sealed for SetPurpose {} - impl State for SetPurpose { - type Creator = S::Creator; - type Purpose = Set; - type Uri = S::Uri; - type ItemCount = S::ItemCount; - type Name = S::Name; - 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 Creator = S::Creator; - type Purpose = S::Purpose; type Uri = Set; type ItemCount = S::ItemCount; - type Name = S::Name; + type Creator = S::Creator; type Cid = S::Cid; + type Name = S::Name; + type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; } ///State transition - sets the `item_count` field to Set pub struct SetItemCount(PhantomData S>); impl sealed::Sealed for SetItemCount {} impl State for SetItemCount { - type Creator = S::Creator; - type Purpose = S::Purpose; type Uri = S::Uri; type ItemCount = Set; - type Name = S::Name; + type Creator = S::Creator; type Cid = S::Cid; + type Name = S::Name; + type Purpose = S::Purpose; type IndexedAt = S::IndexedAt; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Creator = S::Creator; - type Purpose = S::Purpose; + ///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 ItemCount = S::ItemCount; - type Name = Set; + type Creator = Set; type Cid = S::Cid; + type Name = S::Name; + type Purpose = S::Purpose; 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 ItemCount = S::ItemCount; + type Creator = S::Creator; + type Cid = Set; + type Name = S::Name; + type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + } + ///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 ItemCount = S::ItemCount; type Creator = S::Creator; + type Cid = S::Cid; + type Name = Set; type Purpose = S::Purpose; + type IndexedAt = S::IndexedAt; + } + ///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 ItemCount = S::ItemCount; + type Creator = S::Creator; + type Cid = S::Cid; type Name = S::Name; - type Cid = Set; + type Purpose = 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 Creator = S::Creator; - type Purpose = S::Purpose; type Uri = S::Uri; type ItemCount = S::ItemCount; - type Name = S::Name; + type Creator = S::Creator; type Cid = S::Cid; + type Name = S::Name; + type Purpose = S::Purpose; type IndexedAt = 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 `purpose` field - pub struct purpose(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `item_count` field pub struct item_count(()); - ///Marker type for the `name` field - pub struct name(()); + ///Marker type for the `creator` field + pub struct creator(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `name` field + pub struct name(()); + ///Marker type for the `purpose` field + pub struct purpose(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); } @@ -1576,12 +1576,12 @@ impl<'a, S: list_view_state::State> ListViewBuilder<'a, S> { impl<'a, S> ListViewBuilder<'a, S> where S: list_view_state::State, - S::Creator: list_view_state::IsSet, - S::Purpose: list_view_state::IsSet, S::Uri: list_view_state::IsSet, S::ItemCount: list_view_state::IsSet, - S::Name: list_view_state::IsSet, + S::Creator: list_view_state::IsSet, S::Cid: list_view_state::IsSet, + S::Name: list_view_state::IsSet, + S::Purpose: list_view_state::IsSet, S::IndexedAt: list_view_state::IsSet, { /// Build the final struct @@ -1696,49 +1696,49 @@ pub mod resource_tags_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Resource; type CommunityTags; + type Resource; type AuthorTags; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Resource = Unset; type CommunityTags = Unset; + type Resource = Unset; type AuthorTags = 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 CommunityTags = S::CommunityTags; - type AuthorTags = S::AuthorTags; - } ///State transition - sets the `community_tags` field to Set pub struct SetCommunityTags(PhantomData S>); impl sealed::Sealed for SetCommunityTags {} impl State for SetCommunityTags { - type Resource = S::Resource; type CommunityTags = Set; + type Resource = S::Resource; + type AuthorTags = S::AuthorTags; + } + ///State transition - sets the `resource` field to Set + pub struct SetResource(PhantomData S>); + impl sealed::Sealed for SetResource {} + impl State for SetResource { + type CommunityTags = S::CommunityTags; + type Resource = Set; type AuthorTags = S::AuthorTags; } ///State transition - sets the `author_tags` field to Set pub struct SetAuthorTags(PhantomData S>); impl sealed::Sealed for SetAuthorTags {} impl State for SetAuthorTags { - type Resource = S::Resource; type CommunityTags = S::CommunityTags; + type Resource = S::Resource; type AuthorTags = 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 `community_tags` field pub struct community_tags(()); + ///Marker type for the `resource` field + pub struct resource(()); ///Marker type for the `author_tags` field pub struct author_tags(()); } @@ -1853,8 +1853,8 @@ impl<'a, S: resource_tags_view_state::State> ResourceTagsViewBuilder<'a, S> { impl<'a, S> ResourceTagsViewBuilder<'a, S> where S: resource_tags_view_state::State, - S::Resource: resource_tags_view_state::IsSet, S::CommunityTags: resource_tags_view_state::IsSet, + S::Resource: resource_tags_view_state::IsSet, S::AuthorTags: resource_tags_view_state::IsSet, { /// Build the final struct @@ -1952,67 +1952,67 @@ pub mod tag_application_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type AppliedBy; - type CreatedAt; + type Uri; type Tag; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; type AppliedBy = Unset; - type CreatedAt = Unset; + type Uri = Unset; type Tag = 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 AppliedBy = S::AppliedBy; - type CreatedAt = S::CreatedAt; - type Tag = S::Tag; + type CreatedAt = Unset; } ///State transition - sets the `applied_by` field to Set pub struct SetAppliedBy(PhantomData S>); impl sealed::Sealed for SetAppliedBy {} impl State for SetAppliedBy { - type Uri = S::Uri; type AppliedBy = Set; - type CreatedAt = S::CreatedAt; + type Uri = S::Uri; type Tag = S::Tag; + 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 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 AppliedBy = S::AppliedBy; - type CreatedAt = Set; + type Uri = Set; type Tag = S::Tag; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData S>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type Uri = S::Uri; type AppliedBy = S::AppliedBy; - type CreatedAt = S::CreatedAt; + type Uri = S::Uri; type Tag = 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 AppliedBy = S::AppliedBy; + type Uri = S::Uri; + type Tag = S::Tag; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `applied_by` field pub struct applied_by(()); - ///Marker type for the `created_at` field - pub struct created_at(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `tag` field pub struct tag(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -2125,10 +2125,10 @@ where impl<'a, S> TagApplicationViewBuilder<'a, S> where S: tag_application_view_state::State, - S::Uri: tag_application_view_state::IsSet, S::AppliedBy: tag_application_view_state::IsSet, - S::CreatedAt: tag_application_view_state::IsSet, + S::Uri: tag_application_view_state::IsSet, S::Tag: tag_application_view_state::IsSet, + S::CreatedAt: tag_application_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TagApplicationView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs index 3df9e50..e4116a5 100644 --- a/crates/weaver-api/src/sh_weaver/graph/bookmark.rs +++ b/crates/weaver-api/src/sh_weaver/graph/bookmark.rs @@ -38,37 +38,37 @@ pub mod bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subject = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subject = S::Subject; + type CreatedAt = Unset; } ///State transition - sets the `subject` field to Set pub struct SetSubject(PhantomData S>); impl sealed::Sealed for SetSubject {} impl State for SetSubject { - type CreatedAt = S::CreatedAt; type Subject = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subject = S::Subject; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subject` field pub struct subject(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -158,8 +158,8 @@ where impl<'a, S> BookmarkBuilder<'a, S> where S: bookmark_state::State, - S::CreatedAt: bookmark_state::IsSet, S::Subject: bookmark_state::IsSet, + S::CreatedAt: bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> Bookmark<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/like.rs b/crates/weaver-api/src/sh_weaver/graph/like.rs index 2732a88..e26326d 100644 --- a/crates/weaver-api/src/sh_weaver/graph/like.rs +++ b/crates/weaver-api/src/sh_weaver/graph/like.rs @@ -34,37 +34,37 @@ pub mod like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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> LikeBuilder<'a, S> where S: like_state::State, - S::CreatedAt: like_state::IsSet, S::Subject: like_state::IsSet, + S::CreatedAt: like_state::IsSet, { /// Build the final struct pub fn build(self) -> Like<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/list.rs b/crates/weaver-api/src/sh_weaver/graph/list.rs index 63aa51d..fcfb0a4 100644 --- a/crates/weaver-api/src/sh_weaver/graph/list.rs +++ b/crates/weaver-api/src/sh_weaver/graph/list.rs @@ -129,51 +129,51 @@ pub mod list_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; 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 Purpose = Unset; 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 CreatedAt = Set; - type Purpose = S::Purpose; - type Name = S::Name; + type CreatedAt = Unset; } ///State transition - sets the `purpose` field to Set pub struct SetPurpose(PhantomData S>); impl sealed::Sealed for SetPurpose {} impl State for SetPurpose { - type CreatedAt = S::CreatedAt; type Purpose = Set; type Name = S::Name; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type CreatedAt = S::CreatedAt; type Purpose = S::Purpose; 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 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 `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(()); } } @@ -306,9 +306,9 @@ where impl<'a, S> ListBuilder<'a, S> where S: list_state::State, - S::CreatedAt: 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/sh_weaver/graph/listitem.rs b/crates/weaver-api/src/sh_weaver/graph/listitem.rs index c07e200..0c4f228 100644 --- a/crates/weaver-api/src/sh_weaver/graph/listitem.rs +++ b/crates/weaver-api/src/sh_weaver/graph/listitem.rs @@ -37,51 +37,51 @@ pub mod listitem_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type List; - type Subject; type CreatedAt; + type 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 Subject = 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; + ///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 = S::CreatedAt; + 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 List = S::List; - 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 = 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 CreatedAt = Set; + 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 `subject` field - pub struct subject(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `subject` field + pub struct subject(()); + ///Marker type for the `list` field + pub struct list(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> ListitemBuilder<'a, S> where S: listitem_state::State, - S::List: listitem_state::IsSet, - S::Subject: listitem_state::IsSet, S::CreatedAt: listitem_state::IsSet, + S::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/sh_weaver/graph/subscribe_accept.rs b/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs index a85ffea..9037691 100644 --- a/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs +++ b/crates/weaver-api/src/sh_weaver/graph/subscribe_accept.rs @@ -34,37 +34,37 @@ pub mod subscribe_accept_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subscribe; + type CreatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; type Subscribe = Unset; - } - ///State transition - sets the `created_at` field to Set - pub struct SetCreatedAt(PhantomData S>); - impl sealed::Sealed for SetCreatedAt {} - impl State for SetCreatedAt { - type CreatedAt = Set; - type Subscribe = S::Subscribe; + type CreatedAt = Unset; } ///State transition - sets the `subscribe` field to Set pub struct SetSubscribe(PhantomData S>); impl sealed::Sealed for SetSubscribe {} impl State for SetSubscribe { - type CreatedAt = S::CreatedAt; type Subscribe = Set; + type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Subscribe = S::Subscribe; + type CreatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); ///Marker type for the `subscribe` field pub struct subscribe(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -137,8 +137,8 @@ where impl<'a, S> SubscribeAcceptBuilder<'a, S> where S: subscribe_accept_state::State, - S::CreatedAt: subscribe_accept_state::IsSet, S::Subscribe: subscribe_accept_state::IsSet, + S::CreatedAt: subscribe_accept_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscribeAccept<'a> { diff --git a/crates/weaver-api/src/sh_weaver/graph/tag.rs b/crates/weaver-api/src/sh_weaver/graph/tag.rs index ce8b34e..1fb1c04 100644 --- a/crates/weaver-api/src/sh_weaver/graph/tag.rs +++ b/crates/weaver-api/src/sh_weaver/graph/tag.rs @@ -37,51 +37,51 @@ pub mod tag_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; type Subject; type Tag; + 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 Tag = 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 Tag = S::Tag; + 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 Tag = S::Tag; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `tag` field to Set pub struct SetTag(PhantomData S>); impl sealed::Sealed for SetTag {} impl State for SetTag { - type CreatedAt = S::CreatedAt; type Subject = S::Subject; type Tag = 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 Tag = S::Tag; + 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 `tag` field pub struct tag(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -174,9 +174,9 @@ where impl<'a, S> TagBuilder<'a, S> where S: tag_state::State, - S::CreatedAt: tag_state::IsSet, S::Subject: tag_state::IsSet, S::Tag: tag_state::IsSet, + S::CreatedAt: tag_state::IsSet, { /// Build the final struct pub fn build(self) -> Tag<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook.rs b/crates/weaver-api/src/sh_weaver/notebook.rs index b046a13..0d63733 100644 --- a/crates/weaver-api/src/sh_weaver/notebook.rs +++ b/crates/weaver-api/src/sh_weaver/notebook.rs @@ -2174,37 +2174,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(()); } } @@ -2317,8 +2317,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> { @@ -2399,37 +2399,37 @@ pub mod chapter_entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Entry; type Index; + type Entry; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Entry = Unset; type Index = Unset; - } - ///State transition - sets the `entry` field to Set - pub struct SetEntry(PhantomData S>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Entry = Set; - type Index = S::Index; + type Entry = Unset; } ///State transition - sets the `index` field to Set pub struct SetIndex(PhantomData S>); impl sealed::Sealed for SetIndex {} impl State for SetIndex { - type Entry = S::Entry; type Index = Set; + type Entry = S::Entry; + } + ///State transition - sets the `entry` field to Set + pub struct SetEntry(PhantomData S>); + impl sealed::Sealed for SetEntry {} + impl State for SetEntry { + type Index = S::Index; + type Entry = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `entry` field - pub struct entry(()); ///Marker type for the `index` field pub struct index(()); + ///Marker type for the `entry` field + pub struct entry(()); } } @@ -2542,8 +2542,8 @@ impl<'a, S: chapter_entry_view_state::State> ChapterEntryViewBuilder<'a, S> { impl<'a, S> ChapterEntryViewBuilder<'a, S> where S: chapter_entry_view_state::State, - S::Entry: chapter_entry_view_state::IsSet, S::Index: chapter_entry_view_state::IsSet, + S::Entry: chapter_entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterEntryView<'a> { @@ -2634,105 +2634,105 @@ pub mod chapter_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type Cid; - type Notebook; - type Authors; type Record; type IndexedAt; + type Authors; + type Notebook; + type Cid; + type Uri; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type Cid = Unset; - type Notebook = Unset; - type Authors = Unset; type Record = Unset; type IndexedAt = Unset; + type Authors = Unset; + type Notebook = Unset; + type Cid = 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 Cid = S::Cid; - type Notebook = S::Notebook; - type Authors = S::Authors; - 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 Record = Set; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Uri = S::Uri; - type Cid = Set; + type Authors = S::Authors; type Notebook = S::Notebook; + type Cid = S::Cid; + 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 IndexedAt = Set; type Authors = S::Authors; + type Notebook = S::Notebook; + type Cid = S::Cid; + type Uri = S::Uri; + } + ///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 IndexedAt = S::IndexedAt; + type Authors = Set; + type Notebook = S::Notebook; + type Cid = S::Cid; + 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 Uri = S::Uri; - type Cid = S::Cid; - type Notebook = 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 Uri = S::Uri; + type Authors = S::Authors; + type Notebook = Set; type Cid = S::Cid; - type Notebook = S::Notebook; - type Authors = Set; + type Uri = S::Uri; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { type Record = S::Record; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Uri = S::Uri; - type Cid = S::Cid; - type Notebook = S::Notebook; type Authors = S::Authors; - type Record = Set; - type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Uri = S::Uri; - type Cid = S::Cid; type Notebook = S::Notebook; - type Authors = S::Authors; + 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 Record = S::Record; - type IndexedAt = Set; + type IndexedAt = S::IndexedAt; + type Authors = S::Authors; + type Notebook = S::Notebook; + type Cid = S::Cid; + type Uri = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `uri` field - pub struct uri(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `notebook` field - pub struct notebook(()); - ///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(()); + ///Marker type for the `authors` field + pub struct authors(()); + ///Marker type for the `notebook` field + pub struct notebook(()); + ///Marker type for the `cid` field + pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); } } @@ -2949,12 +2949,12 @@ where impl<'a, S> ChapterViewBuilder<'a, S> where S: chapter_view_state::State, - S::Uri: chapter_view_state::IsSet, - S::Cid: chapter_view_state::IsSet, - S::Notebook: chapter_view_state::IsSet, - S::Authors: chapter_view_state::IsSet, S::Record: chapter_view_state::IsSet, S::IndexedAt: chapter_view_state::IsSet, + S::Authors: chapter_view_state::IsSet, + S::Notebook: chapter_view_state::IsSet, + S::Cid: chapter_view_state::IsSet, + S::Uri: chapter_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ChapterView<'a> { @@ -3338,85 +3338,85 @@ pub mod entry_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Record; - type Cid; - type Uri; type Authors; + type Uri; + type Cid; type IndexedAt; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Record = Unset; - type Cid = Unset; - type Uri = Unset; type Authors = Unset; + type Uri = Unset; + type Cid = Unset; type IndexedAt = Unset; + type Record = Unset; } - ///State transition - sets the `record` field to Set - pub struct SetRecord(PhantomData S>); - impl sealed::Sealed for SetRecord {} - impl State for SetRecord { - type Record = Set; - 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 Authors = Set; type Uri = S::Uri; - type Authors = S::Authors; + 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 Record = S::Record; - type Cid = Set; - type Uri = S::Uri; - type Authors = S::Authors; - type IndexedAt = S::IndexedAt; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Record = S::Record; - type Cid = S::Cid; - type Uri = Set; type Authors = S::Authors; + type Uri = Set; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { type Record = S::Record; - type 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 Authors = S::Authors; type Uri = S::Uri; - type Authors = Set; + type Cid = Set; type IndexedAt = S::IndexedAt; + type Record = S::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { - type Record = S::Record; - type Cid = S::Cid; - type Uri = S::Uri; type Authors = S::Authors; + type Uri = S::Uri; + type Cid = S::Cid; type IndexedAt = Set; + type Record = S::Record; + } + ///State transition - sets the `record` field to Set + pub struct SetRecord(PhantomData S>); + impl sealed::Sealed for SetRecord {} + impl State for SetRecord { + type Authors = S::Authors; + type Uri = S::Uri; + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `record` field - pub struct record(()); - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `uri` field - pub struct uri(()); ///Marker type for the `authors` field pub struct authors(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -3753,11 +3753,11 @@ impl<'a, S: entry_view_state::State> EntryViewBuilder<'a, S> { impl<'a, S> EntryViewBuilder<'a, S> where S: entry_view_state::State, - S::Record: entry_view_state::IsSet, - S::Cid: entry_view_state::IsSet, - S::Uri: entry_view_state::IsSet, S::Authors: entry_view_state::IsSet, + S::Uri: entry_view_state::IsSet, + S::Cid: entry_view_state::IsSet, S::IndexedAt: entry_view_state::IsSet, + S::Record: entry_view_state::IsSet, { /// Build the final struct pub fn build(self) -> EntryView<'a> { @@ -4049,37 +4049,37 @@ pub mod feed_notebook_context_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Title; + 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; - } - ///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 = 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 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 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 `uri` field + pub struct uri(()); } } @@ -4169,8 +4169,8 @@ where impl<'a, S> FeedNotebookContextBuilder<'a, S> where S: feed_notebook_context_state::State, - S::Uri: feed_notebook_context_state::IsSet, S::Title: feed_notebook_context_state::IsSet, + S::Uri: feed_notebook_context_state::IsSet, { /// Build the final struct pub fn build(self) -> FeedNotebookContext<'a> { @@ -4308,85 +4308,85 @@ pub mod notebook_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type IndexedAt; type Record; - type Uri; type Authors; + 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 Cid = Unset; - type IndexedAt = Unset; type Record = Unset; - type Uri = Unset; type Authors = 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 IndexedAt = S::IndexedAt; - type Record = S::Record; - type Uri = S::Uri; - type Authors = S::Authors; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type Cid = S::Cid; - type IndexedAt = Set; - type Record = S::Record; - type Uri = S::Uri; - type Authors = S::Authors; + 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 Authors = S::Authors; type Cid = S::Cid; + type Uri = S::Uri; type IndexedAt = S::IndexedAt; - type Record = Set; + } + ///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 Authors = 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 Authors = S::Authors; + 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 Cid = S::Cid; - type IndexedAt = S::IndexedAt; type Record = S::Record; - type Uri = Set; type Authors = S::Authors; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { type Cid = S::Cid; + type Uri = 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 Authors = S::Authors; + type Cid = S::Cid; type Uri = S::Uri; - type Authors = Set; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); - ///Marker type for the `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 `authors` field pub struct authors(()); + ///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(()); } } @@ -4753,11 +4753,11 @@ impl<'a, S: notebook_view_state::State> NotebookViewBuilder<'a, S> { impl<'a, S> NotebookViewBuilder<'a, S> where S: notebook_view_state::State, - S::Cid: notebook_view_state::IsSet, - S::IndexedAt: notebook_view_state::IsSet, S::Record: notebook_view_state::IsSet, - S::Uri: notebook_view_state::IsSet, S::Authors: notebook_view_state::IsSet, + S::Cid: notebook_view_state::IsSet, + S::Uri: notebook_view_state::IsSet, + S::IndexedAt: notebook_view_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookView<'a> { @@ -4872,85 +4872,85 @@ pub mod page_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Notebook; type Uri; - type Record; type IndexedAt; - type Notebook; type Cid; + type Record; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Notebook = Unset; type Uri = Unset; - type Record = Unset; type IndexedAt = Unset; - type Notebook = Unset; type Cid = Unset; + type Record = 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 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 Uri = Set; - type Record = S::Record; - type IndexedAt = S::IndexedAt; type Notebook = S::Notebook; - 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 Uri = Set; type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; type Cid = S::Cid; + type Record = S::Record; } ///State transition - sets the `indexed_at` field to Set pub struct SetIndexedAt(PhantomData S>); impl sealed::Sealed for SetIndexedAt {} impl State for SetIndexedAt { + type Notebook = S::Notebook; type Uri = S::Uri; - type Record = S::Record; type IndexedAt = Set; - type Notebook = S::Notebook; type Cid = S::Cid; - } - ///State transition - sets the `notebook` field to Set - pub struct SetNotebook(PhantomData S>); - impl sealed::Sealed for SetNotebook {} - impl State for SetNotebook { - type Uri = S::Uri; type Record = S::Record; - type IndexedAt = S::IndexedAt; - type Notebook = 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 Notebook = S::Notebook; type Uri = S::Uri; - type Record = S::Record; type IndexedAt = S::IndexedAt; - type Notebook = S::Notebook; 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 Notebook = S::Notebook; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; + type Cid = S::Cid; + type Record = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `notebook` field + pub struct notebook(()); ///Marker type for the `uri` field pub struct uri(()); - ///Marker type for the `record` field - pub struct record(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `cid` field pub struct cid(()); + ///Marker type for the `record` field + pub struct record(()); } } @@ -5137,11 +5137,11 @@ where impl<'a, S> PageViewBuilder<'a, S> where S: page_view_state::State, + S::Notebook: page_view_state::IsSet, S::Uri: page_view_state::IsSet, - S::Record: page_view_state::IsSet, S::IndexedAt: page_view_state::IsSet, - S::Notebook: page_view_state::IsSet, S::Cid: page_view_state::IsSet, + S::Record: page_view_state::IsSet, { /// Build the final struct pub fn build(self) -> PageView<'a> { @@ -5233,67 +5233,67 @@ pub mod permission_grant_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Scope; type Did; - type GrantedAt; type Source; - type Scope; + type GrantedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Scope = Unset; type Did = Unset; - type GrantedAt = Unset; type Source = Unset; - type Scope = Unset; + type GrantedAt = Unset; + } + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData S>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type Scope = Set; + type Did = S::Did; + type Source = S::Source; + type GrantedAt = S::GrantedAt; } ///State transition - sets the `did` field to Set pub struct SetDid(PhantomData S>); impl sealed::Sealed for SetDid {} impl State for SetDid { - type Did = Set; - type GrantedAt = S::GrantedAt; - type Source = S::Source; type Scope = S::Scope; - } - ///State transition - sets the `granted_at` field to Set - pub struct SetGrantedAt(PhantomData S>); - impl sealed::Sealed for SetGrantedAt {} - impl State for SetGrantedAt { - type Did = S::Did; - type GrantedAt = Set; + type Did = Set; type Source = S::Source; - type Scope = S::Scope; + type GrantedAt = S::GrantedAt; } ///State transition - sets the `source` field to Set pub struct SetSource(PhantomData S>); impl sealed::Sealed for SetSource {} impl State for SetSource { + type Scope = S::Scope; type Did = S::Did; - type GrantedAt = S::GrantedAt; type Source = Set; - type Scope = S::Scope; + type GrantedAt = S::GrantedAt; } - ///State transition - sets the `scope` field to Set - pub struct SetScope(PhantomData S>); - impl sealed::Sealed for SetScope {} - impl State for SetScope { + ///State transition - sets the `granted_at` field to Set + pub struct SetGrantedAt(PhantomData S>); + impl sealed::Sealed for SetGrantedAt {} + impl State for SetGrantedAt { + type Scope = S::Scope; type Did = S::Did; - type GrantedAt = S::GrantedAt; type Source = S::Source; - type Scope = Set; + type GrantedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `scope` field + pub struct scope(()); ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `granted_at` field - pub struct granted_at(()); ///Marker type for the `source` field pub struct source(()); - ///Marker type for the `scope` field - pub struct scope(()); + ///Marker type for the `granted_at` field + pub struct granted_at(()); } } @@ -5406,10 +5406,10 @@ where impl<'a, S> PermissionGrantBuilder<'a, S> where S: permission_grant_state::State, + S::Scope: permission_grant_state::IsSet, S::Did: permission_grant_state::IsSet, - S::GrantedAt: permission_grant_state::IsSet, S::Source: permission_grant_state::IsSet, - S::Scope: permission_grant_state::IsSet, + S::GrantedAt: permission_grant_state::IsSet, { /// Build the final struct pub fn build(self) -> PermissionGrant<'a> { @@ -5758,65 +5758,65 @@ pub mod published_version_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; type Cid; type Publisher; + type Uri; type PublishedAt; } /// 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 Publisher = Unset; + type Uri = Unset; type PublishedAt = 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 Publisher = S::Publisher; - type PublishedAt = S::PublishedAt; - } ///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 Publisher = S::Publisher; + type Uri = S::Uri; 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 Uri = S::Uri; type Cid = S::Cid; type Publisher = Set; + type Uri = S::Uri; + 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 Publisher = S::Publisher; + type Uri = Set; type PublishedAt = S::PublishedAt; } ///State transition - sets the `published_at` field to Set pub struct SetPublishedAt(PhantomData S>); impl sealed::Sealed for SetPublishedAt {} impl State for SetPublishedAt { - type Uri = S::Uri; type Cid = S::Cid; type Publisher = S::Publisher; + type Uri = S::Uri; type PublishedAt = 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 `publisher` field pub struct publisher(()); + ///Marker type for the `uri` field + pub struct uri(()); ///Marker type for the `published_at` field pub struct published_at(()); } @@ -5991,9 +5991,9 @@ where impl<'a, S> PublishedVersionViewBuilder<'a, S> where S: published_version_view_state::State, - S::Uri: published_version_view_state::IsSet, S::Cid: published_version_view_state::IsSet, S::Publisher: published_version_view_state::IsSet, + S::Uri: published_version_view_state::IsSet, S::PublishedAt: published_version_view_state::IsSet, { /// Build the final struct @@ -6244,37 +6244,37 @@ pub mod reason_bookmark_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; type By = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type By = S::By; + type IndexedAt = Unset; } ///State transition - sets the `by` field to Set pub struct SetBy(PhantomData S>); impl sealed::Sealed for SetBy {} impl State for SetBy { - type IndexedAt = S::IndexedAt; type By = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type By = S::By; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6347,8 +6347,8 @@ where impl<'a, S> ReasonBookmarkBuilder<'a, S> where S: reason_bookmark_state::State, - S::IndexedAt: reason_bookmark_state::IsSet, S::By: reason_bookmark_state::IsSet, + S::IndexedAt: reason_bookmark_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonBookmark<'a> { @@ -6418,37 +6418,37 @@ pub mod reason_like_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type IndexedAt; type By; + type IndexedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type IndexedAt = Unset; type By = Unset; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { - type IndexedAt = Set; - type By = S::By; + type IndexedAt = Unset; } ///State transition - sets the `by` field to Set pub struct SetBy(PhantomData S>); impl sealed::Sealed for SetBy {} impl State for SetBy { - type IndexedAt = S::IndexedAt; type By = Set; + type IndexedAt = S::IndexedAt; + } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type By = S::By; + type IndexedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `by` field pub struct by(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); } } @@ -6521,8 +6521,8 @@ where impl<'a, S> ReasonLikeBuilder<'a, S> where S: reason_like_state::State, - S::IndexedAt: reason_like_state::IsSet, S::By: reason_like_state::IsSet, + S::IndexedAt: reason_like_state::IsSet, { /// Build the final struct pub fn build(self) -> ReasonLike<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/book.rs b/crates/weaver-api/src/sh_weaver/notebook/book.rs index b574d36..be1ee33 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/book.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/book.rs @@ -63,37 +63,37 @@ pub mod book_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Authors; type EntryList; + type Authors; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Authors = Unset; type EntryList = Unset; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { - type Authors = Set; - type EntryList = S::EntryList; + type Authors = Unset; } ///State transition - sets the `entry_list` field to Set pub struct SetEntryList(PhantomData S>); impl sealed::Sealed for SetEntryList {} impl State for SetEntryList { - type Authors = S::Authors; type EntryList = Set; + type Authors = S::Authors; + } + ///State transition - sets the `authors` field to Set + pub struct SetAuthors(PhantomData S>); + impl sealed::Sealed for SetAuthors {} + impl State for SetAuthors { + type EntryList = S::EntryList; + type Authors = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `authors` field - pub struct authors(()); ///Marker type for the `entry_list` field pub struct entry_list(()); + ///Marker type for the `authors` field + pub struct authors(()); } } @@ -352,8 +352,8 @@ impl<'a, S: book_state::State> BookBuilder<'a, S> { impl<'a, S> BookBuilder<'a, S> where S: book_state::State, - S::Authors: book_state::IsSet, S::EntryList: book_state::IsSet, + S::Authors: book_state::IsSet, { /// Build the final struct pub fn build(self) -> Book<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs index a54908b..53a70bd 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/chapter.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/chapter.rs @@ -54,51 +54,51 @@ pub mod chapter_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EntryList; 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 EntryList = Unset; type Notebook = Unset; type Authors = Unset; - } - ///State transition - sets the `entry_list` field to Set - pub struct SetEntryList(PhantomData S>); - impl sealed::Sealed for SetEntryList {} - impl State for SetEntryList { - type EntryList = Set; - type Notebook = S::Notebook; - type Authors = S::Authors; + type EntryList = Unset; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { - type EntryList = S::EntryList; type Notebook = Set; type 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 EntryList = S::EntryList; 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 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 `entry_list` field - pub struct entry_list(()); ///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,9 +291,9 @@ impl<'a, S: chapter_state::State> ChapterBuilder<'a, S> { impl<'a, S> ChapterBuilder<'a, S> where S: chapter_state::State, - S::EntryList: chapter_state::IsSet, S::Notebook: chapter_state::IsSet, S::Authors: chapter_state::IsSet, + S::EntryList: chapter_state::IsSet, { /// Build the final struct pub fn build(self) -> Chapter<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/entry.rs b/crates/weaver-api/src/sh_weaver/notebook/entry.rs index 4228660..c08f979 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 Path; type Content; - type Title; type CreatedAt; + type Title; + type Path; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Path = Unset; type Content = Unset; - type Title = Unset; type CreatedAt = Unset; - } - ///State transition - sets the `path` field to Set - pub struct SetPath(PhantomData S>); - impl sealed::Sealed for SetPath {} - impl State for SetPath { - type Path = Set; - type Content = S::Content; - type Title = S::Title; - type CreatedAt = S::CreatedAt; + type Title = Unset; + type Path = Unset; } ///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 Content = Set; - type Title = S::Title; type CreatedAt = S::CreatedAt; + type Title = S::Title; + type Path = S::Path; + } + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type Content = S::Content; + type CreatedAt = Set; + type Title = S::Title; + type Path = S::Path; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Path = S::Path; type Content = S::Content; - type Title = 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 Title = Set; type Path = S::Path; + } + ///State transition - sets the `path` field to Set + pub struct SetPath(PhantomData S>); + impl sealed::Sealed for SetPath {} + impl State for SetPath { type Content = S::Content; + type CreatedAt = S::CreatedAt; type Title = S::Title; - type CreatedAt = Set; + type Path = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `path` field - pub struct path(()); ///Marker type for the `content` field pub struct content(()); - ///Marker type for the `title` field - pub struct title(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `title` field + pub struct title(()); + ///Marker type for the `path` field + pub struct path(()); } } @@ -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::Path: entry_state::IsSet, S::Content: entry_state::IsSet, - S::Title: entry_state::IsSet, S::CreatedAt: entry_state::IsSet, + S::Title: entry_state::IsSet, + S::Path: entry_state::IsSet, { /// Build the final struct pub fn build(self) -> Entry<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs b/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs index c44c50b..10e5538 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_entry_notebooks.rs @@ -188,37 +188,37 @@ pub mod notebook_ref_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; type Uri; + type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; type Uri = Unset; - } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; - type Uri = S::Uri; + type Cid = Unset; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { - type Cid = S::Cid; type Uri = Set; + type Cid = S::Cid; + } + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type Uri = S::Uri; + type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `cid` field - pub struct cid(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `cid` field + pub struct cid(()); } } @@ -328,8 +328,8 @@ where impl<'a, S> NotebookRefBuilder<'a, S> where S: notebook_ref_state::State, - S::Cid: notebook_ref_state::IsSet, S::Uri: notebook_ref_state::IsSet, + S::Cid: notebook_ref_state::IsSet, { /// Build the final struct pub fn build(self) -> NotebookRef<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs b/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs index 94d2695..bc519e4 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/get_notebook_by_title.rs @@ -32,37 +32,37 @@ pub mod get_notebook_by_title_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Actor; type Title; + type Actor; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Actor = Unset; type Title = Unset; - } - ///State transition - sets the `actor` field to Set - pub struct SetActor(PhantomData S>); - impl sealed::Sealed for SetActor {} - impl State for SetActor { - type Actor = Set; - type Title = S::Title; + type Actor = Unset; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type Actor = S::Actor; type Title = Set; + type Actor = S::Actor; + } + ///State transition - sets the `actor` field to Set + pub struct SetActor(PhantomData S>); + impl sealed::Sealed for SetActor {} + impl State for SetActor { + type Title = S::Title; + type Actor = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `actor` field - pub struct actor(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `actor` field + pub struct actor(()); } } @@ -135,8 +135,8 @@ where impl<'a, S> GetNotebookByTitleBuilder<'a, S> where S: get_notebook_by_title_state::State, - S::Actor: get_notebook_by_title_state::IsSet, S::Title: get_notebook_by_title_state::IsSet, + S::Actor: get_notebook_by_title_state::IsSet, { /// Build the final struct pub fn build(self) -> GetNotebookByTitle<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/page.rs b/crates/weaver-api/src/sh_weaver/notebook/page.rs index b0ba27a..e042779 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/page.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/page.rs @@ -44,51 +44,51 @@ pub mod page_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type EntryList; - type Notebook; type Authors; + type Notebook; + type EntryList; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type EntryList = Unset; - type Notebook = Unset; type Authors = Unset; + type Notebook = Unset; + type EntryList = Unset; } - ///State transition - sets the `entry_list` field to Set - pub struct SetEntryList(PhantomData S>); - impl sealed::Sealed for SetEntryList {} - impl State for SetEntryList { - type EntryList = Set; + ///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 Authors = S::Authors; + 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 EntryList = S::EntryList; - type Notebook = Set; type Authors = S::Authors; - } - ///State transition - sets the `authors` field to Set - pub struct SetAuthors(PhantomData S>); - impl sealed::Sealed for SetAuthors {} - impl State for SetAuthors { + type Notebook = Set; type EntryList = S::EntryList; + } + ///State transition - sets the `entry_list` field to Set + pub struct SetEntryList(PhantomData S>); + impl sealed::Sealed for SetEntryList {} + impl State for SetEntryList { + type Authors = S::Authors; type Notebook = S::Notebook; - type Authors = Set; + type EntryList = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `entry_list` field - pub struct entry_list(()); - ///Marker type for the `notebook` field - pub struct notebook(()); ///Marker type for the `authors` field pub struct authors(()); + ///Marker type for the `notebook` field + pub struct notebook(()); + ///Marker type for the `entry_list` field + pub struct entry_list(()); } } @@ -221,9 +221,9 @@ impl<'a, S: page_state::State> PageBuilder<'a, S> { impl<'a, S> PageBuilder<'a, S> where S: page_state::State, - S::EntryList: page_state::IsSet, - S::Notebook: page_state::IsSet, S::Authors: page_state::IsSet, + S::Notebook: page_state::IsSet, + S::EntryList: page_state::IsSet, { /// Build the final struct pub fn build(self) -> Page<'a> { diff --git a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs index afce772..9275137 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/resolve_entry.rs @@ -35,50 +35,50 @@ pub mod resolve_entry_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Actor; - type Entry; type Notebook; + type Entry; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Actor = Unset; - type Entry = Unset; type Notebook = Unset; + type Entry = Unset; } ///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 Entry = S::Entry; - type Notebook = S::Notebook; - } - ///State transition - sets the `entry` field to Set - pub struct SetEntry(PhantomData S>); - impl sealed::Sealed for SetEntry {} - impl State for SetEntry { - type Actor = S::Actor; - type Entry = Set; type Notebook = S::Notebook; + type Entry = S::Entry; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { type Actor = S::Actor; - type Entry = S::Entry; type Notebook = 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 Actor = S::Actor; + type Notebook = S::Notebook; + type Entry = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `actor` field pub struct actor(()); - ///Marker type for the `entry` field - pub struct entry(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `entry` field + pub struct entry(()); } } @@ -172,8 +172,8 @@ impl<'a, S> ResolveEntryBuilder<'a, S> where S: resolve_entry_state::State, S::Actor: resolve_entry_state::IsSet, - S::Entry: resolve_entry_state::IsSet, S::Notebook: resolve_entry_state::IsSet, + S::Entry: resolve_entry_state::IsSet, { /// Build the final struct pub fn build(self) -> ResolveEntry<'a> { 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 d0d9b2f..baed045 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 d2109f1..de103d4 100644 --- a/crates/weaver-api/src/sh_weaver/notebook/theme.rs +++ b/crates/weaver-api/src/sh_weaver/notebook/theme.rs @@ -36,49 +36,49 @@ pub mod code_theme_file_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Did; + type Name; type Content; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Did = Unset; + type Name = Unset; type Content = Unset; } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type 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 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; } ///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 Name = S::Name; type Content = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `did` field pub struct did(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `content` field pub struct content(()); } @@ -173,8 +173,8 @@ where impl<'a, S> CodeThemeFileBuilder<'a, S> where S: code_theme_file_state::State, - S::Name: code_theme_file_state::IsSet, S::Did: code_theme_file_state::IsSet, + S::Name: code_theme_file_state::IsSet, S::Content: code_theme_file_state::IsSet, { /// Build the final struct @@ -1067,95 +1067,93 @@ pub mod theme_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type LightCodeTheme; type DarkCodeTheme; type Fonts; type DarkScheme; type Spacing; + type LightCodeTheme; type LightScheme; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type LightCodeTheme = Unset; type DarkCodeTheme = Unset; type Fonts = Unset; type DarkScheme = Unset; type Spacing = Unset; + type LightCodeTheme = Unset; type LightScheme = Unset; } - ///State transition - sets the `light_code_theme` field to Set - pub struct SetLightCodeTheme(PhantomData S>); - impl sealed::Sealed for SetLightCodeTheme {} - impl State for SetLightCodeTheme { - type LightCodeTheme = Set; - type DarkCodeTheme = S::DarkCodeTheme; - type Fonts = S::Fonts; - type DarkScheme = S::DarkScheme; - type Spacing = S::Spacing; - type LightScheme = S::LightScheme; - } ///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 LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = Set; type Fonts = S::Fonts; type DarkScheme = S::DarkScheme; type Spacing = S::Spacing; + type LightCodeTheme = S::LightCodeTheme; type LightScheme = S::LightScheme; } ///State transition - sets the `fonts` field to Set pub struct SetFonts(PhantomData S>); impl sealed::Sealed for SetFonts {} impl State for SetFonts { - type LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = S::DarkCodeTheme; type Fonts = Set; type DarkScheme = S::DarkScheme; type Spacing = S::Spacing; + type LightCodeTheme = S::LightCodeTheme; type LightScheme = S::LightScheme; } ///State transition - sets the `dark_scheme` field to Set pub struct SetDarkScheme(PhantomData S>); impl sealed::Sealed for SetDarkScheme {} impl State for SetDarkScheme { - type LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = S::DarkCodeTheme; type Fonts = S::Fonts; type DarkScheme = Set; type Spacing = S::Spacing; + type LightCodeTheme = S::LightCodeTheme; type LightScheme = S::LightScheme; } ///State transition - sets the `spacing` field to Set pub struct SetSpacing(PhantomData S>); impl sealed::Sealed for SetSpacing {} impl State for SetSpacing { - type LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = S::DarkCodeTheme; type Fonts = S::Fonts; type DarkScheme = S::DarkScheme; type Spacing = Set; + type LightCodeTheme = S::LightCodeTheme; + type LightScheme = S::LightScheme; + } + ///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 DarkCodeTheme = S::DarkCodeTheme; + type Fonts = S::Fonts; + type DarkScheme = S::DarkScheme; + type Spacing = S::Spacing; + type LightCodeTheme = Set; type LightScheme = S::LightScheme; } ///State transition - sets the `light_scheme` field to Set pub struct SetLightScheme(PhantomData S>); impl sealed::Sealed for SetLightScheme {} impl State for SetLightScheme { - type LightCodeTheme = S::LightCodeTheme; type DarkCodeTheme = S::DarkCodeTheme; type Fonts = S::Fonts; type DarkScheme = S::DarkScheme; type Spacing = S::Spacing; + type LightCodeTheme = S::LightCodeTheme; type LightScheme = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `light_code_theme` field - pub struct light_code_theme(()); ///Marker type for the `dark_code_theme` field pub struct dark_code_theme(()); ///Marker type for the `fonts` field @@ -1164,6 +1162,8 @@ pub mod theme_state { pub struct dark_scheme(()); ///Marker type for the `spacing` field pub struct spacing(()); + ///Marker type for the `light_code_theme` field + pub struct light_code_theme(()); ///Marker type for the `light_scheme` field pub struct light_scheme(()); } @@ -1338,11 +1338,11 @@ where impl<'a, S> ThemeBuilder<'a, S> where S: theme_state::State, - S::LightCodeTheme: theme_state::IsSet, S::DarkCodeTheme: theme_state::IsSet, S::Fonts: theme_state::IsSet, S::DarkScheme: theme_state::IsSet, S::Spacing: theme_state::IsSet, + S::LightCodeTheme: theme_state::IsSet, S::LightScheme: theme_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 f0b6298..e6220f2 100644 --- a/crates/weaver-api/src/sh_weaver/notification.rs +++ b/crates/weaver-api/src/sh_weaver/notification.rs @@ -52,105 +52,105 @@ pub mod notification_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Uri; - type IsRead; - type Reason; + type Cid; type IndexedAt; + type IsRead; type Author; - type Cid; + type Uri; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Uri = Unset; - type IsRead = Unset; - type Reason = Unset; + type Cid = Unset; type IndexedAt = Unset; + type IsRead = Unset; type Author = Unset; - type Cid = Unset; + type Uri = Unset; + type Reason = 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 IsRead = S::IsRead; - type Reason = S::Reason; + ///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 IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; type Author = S::Author; + type Uri = S::Uri; + type Reason = S::Reason; + } + ///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 = Set; + type IsRead = S::IsRead; + type Author = S::Author; + type Uri = S::Uri; + type Reason = S::Reason; } ///State transition - sets the `is_read` field to Set pub struct SetIsRead(PhantomData S>); impl sealed::Sealed for SetIsRead {} impl State for SetIsRead { - type Uri = S::Uri; - type IsRead = Set; - type Reason = S::Reason; - type IndexedAt = S::IndexedAt; - type Author = S::Author; type Cid = S::Cid; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Uri = S::Uri; - type IsRead = S::IsRead; - type Reason = Set; type IndexedAt = S::IndexedAt; + type IsRead = Set; type Author = S::Author; - type Cid = S::Cid; - } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { type Uri = S::Uri; - type IsRead = S::IsRead; type Reason = S::Reason; - type IndexedAt = Set; - type Author = S::Author; - type Cid = S::Cid; } ///State transition - sets the `author` field to Set pub struct SetAuthor(PhantomData S>); impl sealed::Sealed for SetAuthor {} impl State for SetAuthor { - type Uri = S::Uri; - type IsRead = S::IsRead; - type Reason = S::Reason; + type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; type Author = 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 Reason = S::Reason; + } + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { + type Cid = S::Cid; + type IndexedAt = S::IndexedAt; type IsRead = S::IsRead; + type Author = S::Author; + type Uri = 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 Cid = S::Cid; type IndexedAt = S::IndexedAt; + type IsRead = S::IsRead; type Author = S::Author; - type Cid = Set; + type Uri = S::Uri; + type Reason = 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 `is_read` field - pub struct is_read(()); - ///Marker type for the `reason` field - pub struct reason(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); + ///Marker type for the `is_read` field + pub struct is_read(()); ///Marker type for the `author` field pub struct author(()); - ///Marker type for the `cid` field - pub struct cid(()); + ///Marker type for the `uri` field + pub struct uri(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -343,12 +343,12 @@ where impl<'a, S> NotificationBuilder<'a, S> where S: notification_state::State, - S::Uri: notification_state::IsSet, - S::IsRead: notification_state::IsSet, - S::Reason: notification_state::IsSet, + S::Cid: notification_state::IsSet, S::IndexedAt: notification_state::IsSet, + S::IsRead: notification_state::IsSet, S::Author: notification_state::IsSet, - S::Cid: notification_state::IsSet, + S::Uri: notification_state::IsSet, + S::Reason: notification_state::IsSet, { /// Build the final struct pub fn build(self) -> Notification<'a> { @@ -801,83 +801,83 @@ pub mod notification_group_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Count; type Reason; - type Subject; type Actors; - type Count; + type Subject; type MostRecentAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Count = Unset; type Reason = Unset; - type Subject = Unset; type Actors = Unset; - type Count = Unset; + type Subject = Unset; type MostRecentAt = Unset; } + ///State transition - sets the `count` field to Set + pub struct SetCount(PhantomData S>); + impl sealed::Sealed for SetCount {} + impl State for SetCount { + type Count = Set; + type Reason = S::Reason; + type Actors = S::Actors; + type Subject = S::Subject; + type MostRecentAt = S::MostRecentAt; + } ///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 Subject = S::Subject; - type Actors = S::Actors; type Count = S::Count; - type MostRecentAt = S::MostRecentAt; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Reason = S::Reason; - type Subject = Set; + type Reason = Set; type Actors = S::Actors; - type Count = S::Count; + type Subject = S::Subject; type MostRecentAt = S::MostRecentAt; } ///State transition - sets the `actors` field to Set pub struct SetActors(PhantomData S>); impl sealed::Sealed for SetActors {} impl State for SetActors { + type Count = S::Count; type Reason = S::Reason; - type Subject = S::Subject; type Actors = Set; - type Count = S::Count; + type Subject = S::Subject; type MostRecentAt = S::MostRecentAt; } - ///State transition - sets the `count` field to Set - pub struct SetCount(PhantomData S>); - impl sealed::Sealed for SetCount {} - impl State for SetCount { + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Count = S::Count; type Reason = S::Reason; - type Subject = S::Subject; type Actors = S::Actors; - type Count = Set; + type Subject = Set; type MostRecentAt = S::MostRecentAt; } ///State transition - sets the `most_recent_at` field to Set pub struct SetMostRecentAt(PhantomData S>); impl sealed::Sealed for SetMostRecentAt {} impl State for SetMostRecentAt { + type Count = S::Count; type Reason = S::Reason; - type Subject = S::Subject; type Actors = S::Actors; - type Count = S::Count; + type Subject = S::Subject; type MostRecentAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `count` field + pub struct count(()); ///Marker type for the `reason` field pub struct reason(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `actors` field pub struct actors(()); - ///Marker type for the `count` field - pub struct count(()); + ///Marker type for the `subject` field + pub struct subject(()); ///Marker type for the `most_recent_at` field pub struct most_recent_at(()); } @@ -1026,10 +1026,10 @@ where impl<'a, S> NotificationGroupBuilder<'a, S> where S: notification_group_state::State, + S::Count: notification_group_state::IsSet, S::Reason: notification_group_state::IsSet, - S::Subject: notification_group_state::IsSet, S::Actors: notification_group_state::IsSet, - S::Count: notification_group_state::IsSet, + S::Subject: notification_group_state::IsSet, S::MostRecentAt: notification_group_state::IsSet, { /// Build the final struct @@ -1293,50 +1293,50 @@ pub mod subscription_update_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type NewEntries; - type UpdatedAt; type Notebook; + type UpdatedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type NewEntries = Unset; - type UpdatedAt = Unset; type Notebook = Unset; + type UpdatedAt = 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; - } - ///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 UpdatedAt = S::UpdatedAt; } ///State transition - sets the `notebook` field to Set pub struct SetNotebook(PhantomData S>); impl sealed::Sealed for SetNotebook {} impl State for SetNotebook { type NewEntries = S::NewEntries; - type UpdatedAt = S::UpdatedAt; type Notebook = Set; + type UpdatedAt = S::UpdatedAt; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type NewEntries = S::NewEntries; + type Notebook = S::Notebook; + type UpdatedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `new_entries` field pub struct new_entries(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); ///Marker type for the `notebook` field pub struct notebook(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); } } @@ -1462,8 +1462,8 @@ impl<'a, S> SubscriptionUpdateViewBuilder<'a, S> where S: subscription_update_view_state::State, S::NewEntries: subscription_update_view_state::IsSet, - S::UpdatedAt: subscription_update_view_state::IsSet, S::Notebook: subscription_update_view_state::IsSet, + S::UpdatedAt: subscription_update_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubscriptionUpdateView<'a> { diff --git a/crates/weaver-api/src/sh_weaver/publish/blob.rs b/crates/weaver-api/src/sh_weaver/publish/blob.rs index 51c6b5e..b122ec2 100644 --- a/crates/weaver-api/src/sh_weaver/publish/blob.rs +++ b/crates/weaver-api/src/sh_weaver/publish/blob.rs @@ -36,37 +36,37 @@ pub mod blob_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Upload; type Path; + type Upload; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Upload = Unset; type Path = Unset; - } - ///State transition - sets the `upload` field to Set - pub struct SetUpload(PhantomData S>); - impl sealed::Sealed for SetUpload {} - impl State for SetUpload { - type Upload = Set; - type Path = S::Path; + type Upload = Unset; } ///State transition - sets the `path` field to Set pub struct SetPath(PhantomData S>); impl sealed::Sealed for SetPath {} impl State for SetPath { - type Upload = S::Upload; type Path = Set; + type Upload = S::Upload; + } + ///State transition - sets the `upload` field to Set + pub struct SetUpload(PhantomData S>); + impl sealed::Sealed for SetUpload {} + impl State for SetUpload { + type Path = S::Path; + type Upload = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `upload` field - pub struct upload(()); ///Marker type for the `path` field pub struct path(()); + ///Marker type for the `upload` field + pub struct upload(()); } } @@ -139,8 +139,8 @@ where impl<'a, S> BlobBuilder<'a, S> where S: blob_state::State, - S::Upload: blob_state::IsSet, S::Path: blob_state::IsSet, + S::Upload: blob_state::IsSet, { /// Build the final struct pub fn build(self) -> Blob<'a> { diff --git a/crates/weaver-api/src/site_standard/document.rs b/crates/weaver-api/src/site_standard/document.rs index ff9cb19..14c62fa 100644 --- a/crates/weaver-api/src/site_standard/document.rs +++ b/crates/weaver-api/src/site_standard/document.rs @@ -71,51 +71,51 @@ pub mod document_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type PublishedAt; type Site; type Title; + type PublishedAt; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type PublishedAt = Unset; type Site = Unset; type Title = Unset; - } - ///State transition - sets the `published_at` field to Set - pub struct SetPublishedAt(PhantomData S>); - impl sealed::Sealed for SetPublishedAt {} - impl State for SetPublishedAt { - type PublishedAt = Set; - type Site = S::Site; - type Title = S::Title; + type PublishedAt = Unset; } ///State transition - sets the `site` field to Set pub struct SetSite(PhantomData S>); impl sealed::Sealed for SetSite {} impl State for SetSite { - type PublishedAt = S::PublishedAt; type Site = Set; type Title = S::Title; + type PublishedAt = S::PublishedAt; } ///State transition - sets the `title` field to Set pub struct SetTitle(PhantomData S>); impl sealed::Sealed for SetTitle {} impl State for SetTitle { - type PublishedAt = S::PublishedAt; type Site = S::Site; type Title = Set; + type PublishedAt = S::PublishedAt; + } + ///State transition - sets the `published_at` field to Set + pub struct SetPublishedAt(PhantomData S>); + impl sealed::Sealed for SetPublishedAt {} + impl State for SetPublishedAt { + type Site = S::Site; + type Title = S::Title; + type PublishedAt = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `published_at` field - pub struct published_at(()); ///Marker type for the `site` field pub struct site(()); ///Marker type for the `title` field pub struct title(()); + ///Marker type for the `published_at` field + pub struct published_at(()); } } @@ -377,9 +377,9 @@ impl<'a, S: document_state::State> DocumentBuilder<'a, S> { impl<'a, S> DocumentBuilder<'a, S> where S: document_state::State, - S::PublishedAt: document_state::IsSet, S::Site: document_state::IsSet, S::Title: document_state::IsSet, + S::PublishedAt: document_state::IsSet, { /// Build the final struct pub fn build(self) -> Document<'a> { diff --git a/crates/weaver-api/src/site_standard/theme/basic.rs b/crates/weaver-api/src/site_standard/theme/basic.rs index 7be6a83..c057fc2 100644 --- a/crates/weaver-api/src/site_standard/theme/basic.rs +++ b/crates/weaver-api/src/site_standard/theme/basic.rs @@ -42,67 +42,67 @@ pub mod basic_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type AccentForeground; type Accent; - type Foreground; type Background; + type Foreground; + type AccentForeground; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type AccentForeground = Unset; type Accent = Unset; - type Foreground = Unset; type Background = Unset; - } - ///State transition - sets the `accent_foreground` field to Set - pub struct SetAccentForeground(PhantomData S>); - impl sealed::Sealed for SetAccentForeground {} - impl State for SetAccentForeground { - type AccentForeground = Set; - type Accent = S::Accent; - type Foreground = S::Foreground; - type Background = S::Background; + type Foreground = Unset; + type AccentForeground = Unset; } ///State transition - sets the `accent` field to Set pub struct SetAccent(PhantomData S>); impl sealed::Sealed for SetAccent {} impl State for SetAccent { - type AccentForeground = S::AccentForeground; type Accent = Set; - type Foreground = S::Foreground; type Background = S::Background; + type Foreground = S::Foreground; + type AccentForeground = S::AccentForeground; + } + ///State transition - sets the `background` field to Set + pub struct SetBackground(PhantomData S>); + impl sealed::Sealed for SetBackground {} + impl State for SetBackground { + type Accent = S::Accent; + type Background = Set; + type Foreground = S::Foreground; + type AccentForeground = S::AccentForeground; } ///State transition - sets the `foreground` field to Set pub struct SetForeground(PhantomData S>); impl sealed::Sealed for SetForeground {} impl State for SetForeground { - type AccentForeground = S::AccentForeground; type Accent = S::Accent; - type Foreground = Set; type Background = S::Background; - } - ///State transition - sets the `background` field to Set - pub struct SetBackground(PhantomData S>); - impl sealed::Sealed for SetBackground {} - impl State for SetBackground { + type Foreground = Set; type AccentForeground = S::AccentForeground; + } + ///State transition - sets the `accent_foreground` field to Set + pub struct SetAccentForeground(PhantomData S>); + impl sealed::Sealed for SetAccentForeground {} + impl State for SetAccentForeground { type Accent = S::Accent; + type Background = S::Background; type Foreground = S::Foreground; - type Background = Set; + type AccentForeground = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `accent_foreground` field - pub struct accent_foreground(()); ///Marker type for the `accent` field pub struct accent(()); - ///Marker type for the `foreground` field - pub struct foreground(()); ///Marker type for the `background` field pub struct background(()); + ///Marker type for the `foreground` field + pub struct foreground(()); + ///Marker type for the `accent_foreground` field + pub struct accent_foreground(()); } } @@ -215,10 +215,10 @@ where impl<'a, S> BasicBuilder<'a, S> where S: basic_state::State, - S::AccentForeground: basic_state::IsSet, S::Accent: basic_state::IsSet, - S::Foreground: basic_state::IsSet, S::Background: basic_state::IsSet, + S::Foreground: basic_state::IsSet, + S::AccentForeground: basic_state::IsSet, { /// Build the final struct pub fn build(self) -> Basic<'a> { diff --git a/crates/weaver-api/src/site_standard/theme/color.rs b/crates/weaver-api/src/site_standard/theme/color.rs index c5512ee..599f396 100644 --- a/crates/weaver-api/src/site_standard/theme/color.rs +++ b/crates/weaver-api/src/site_standard/theme/color.rs @@ -32,51 +32,51 @@ pub mod rgb_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type G; type B; type R; - type G; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type G = Unset; type B = Unset; type R = Unset; - type G = Unset; + } + ///State transition - sets the `g` field to Set + pub struct SetG(PhantomData S>); + impl sealed::Sealed for SetG {} + impl State for SetG { + type G = Set; + type B = S::B; + type R = S::R; } ///State transition - sets the `b` field to Set pub struct SetB(PhantomData S>); impl sealed::Sealed for SetB {} impl State for SetB { + type G = S::G; type B = Set; type R = S::R; - type G = S::G; } ///State transition - sets the `r` field to Set pub struct SetR(PhantomData S>); impl sealed::Sealed for SetR {} impl State for SetR { - type B = S::B; - type R = Set; type G = S::G; - } - ///State transition - sets the `g` field to Set - pub struct SetG(PhantomData S>); - impl sealed::Sealed for SetG {} - impl State for SetG { type B = S::B; - type R = S::R; - type G = Set; + type R = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `g` field + pub struct g(()); ///Marker type for the `b` field pub struct b(()); ///Marker type for the `r` field pub struct r(()); - ///Marker type for the `g` field - pub struct g(()); } } @@ -160,9 +160,9 @@ where impl<'a, S> RgbBuilder<'a, S> where S: rgb_state::State, + S::G: rgb_state::IsSet, S::B: rgb_state::IsSet, S::R: rgb_state::IsSet, - S::G: rgb_state::IsSet, { /// Build the final struct pub fn build(self) -> Rgb<'a> { @@ -440,8 +440,8 @@ pub mod rgba_state { pub trait State: sealed::Sealed { type G; type A; - type B; type R; + type B; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -449,8 +449,8 @@ pub mod rgba_state { impl State for Empty { type G = Unset; type A = Unset; - type B = Unset; type R = Unset; + type B = Unset; } ///State transition - sets the `g` field to Set pub struct SetG(PhantomData S>); @@ -458,8 +458,8 @@ pub mod rgba_state { impl State for SetG { type G = Set; type A = S::A; - type B = S::B; type R = S::R; + type B = S::B; } ///State transition - sets the `a` field to Set pub struct SetA(PhantomData S>); @@ -467,17 +467,8 @@ pub mod rgba_state { impl State for SetA { type G = S::G; type A = Set; - type B = S::B; - type R = S::R; - } - ///State transition - sets the `b` field to Set - pub struct SetB(PhantomData S>); - impl sealed::Sealed for SetB {} - impl State for SetB { - type G = S::G; - type A = S::A; - type B = Set; type R = S::R; + type B = S::B; } ///State transition - sets the `r` field to Set pub struct SetR(PhantomData S>); @@ -485,8 +476,17 @@ pub mod rgba_state { impl State for SetR { type G = S::G; type A = S::A; - type B = S::B; type R = Set; + type B = S::B; + } + ///State transition - sets the `b` field to Set + pub struct SetB(PhantomData S>); + impl sealed::Sealed for SetB {} + impl State for SetB { + type G = S::G; + type A = S::A; + type R = S::R; + type B = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -495,10 +495,10 @@ pub mod rgba_state { pub struct g(()); ///Marker type for the `a` field pub struct a(()); - ///Marker type for the `b` field - pub struct b(()); ///Marker type for the `r` field pub struct r(()); + ///Marker type for the `b` field + pub struct b(()); } } @@ -601,8 +601,8 @@ where S: rgba_state::State, S::G: rgba_state::IsSet, S::A: rgba_state::IsSet, - S::B: rgba_state::IsSet, S::R: rgba_state::IsSet, + S::B: rgba_state::IsSet, { /// Build the final struct pub fn build(self) -> Rgba<'a> { diff --git a/crates/weaver-api/src/tools_ozone/communication.rs b/crates/weaver-api/src/tools_ozone/communication.rs index 27b3a7b..ead0476 100644 --- a/crates/weaver-api/src/tools_ozone/communication.rs +++ b/crates/weaver-api/src/tools_ozone/communication.rs @@ -55,127 +55,127 @@ pub mod template_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type Id; type UpdatedAt; - type Name; + type Id; type LastUpdatedBy; + type Name; type ContentMarkdown; type Disabled; + 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 Id = Unset; type UpdatedAt = Unset; - type Name = Unset; + type Id = Unset; type LastUpdatedBy = Unset; + type Name = Unset; type ContentMarkdown = Unset; type Disabled = 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 `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type UpdatedAt = Set; type Id = S::Id; - type UpdatedAt = S::UpdatedAt; - type Name = S::Name; type LastUpdatedBy = S::LastUpdatedBy; + type Name = S::Name; type ContentMarkdown = S::ContentMarkdown; type Disabled = S::Disabled; + 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 CreatedAt = S::CreatedAt; - type Id = Set; type UpdatedAt = S::UpdatedAt; - type Name = S::Name; + type Id = Set; type LastUpdatedBy = S::LastUpdatedBy; + type Name = S::Name; type ContentMarkdown = S::ContentMarkdown; type Disabled = S::Disabled; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { type CreatedAt = S::CreatedAt; + } + ///State transition - sets the `last_updated_by` field to Set + pub struct SetLastUpdatedBy(PhantomData S>); + impl sealed::Sealed for SetLastUpdatedBy {} + impl State for SetLastUpdatedBy { + type UpdatedAt = S::UpdatedAt; type Id = S::Id; - type UpdatedAt = Set; + type LastUpdatedBy = Set; type Name = S::Name; - type LastUpdatedBy = S::LastUpdatedBy; type ContentMarkdown = S::ContentMarkdown; type Disabled = S::Disabled; + 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 Id = S::Id; type UpdatedAt = S::UpdatedAt; - type Name = Set; + type Id = S::Id; type LastUpdatedBy = S::LastUpdatedBy; + type Name = Set; type ContentMarkdown = S::ContentMarkdown; type Disabled = S::Disabled; - } - ///State transition - sets the `last_updated_by` field to Set - pub struct SetLastUpdatedBy(PhantomData S>); - impl sealed::Sealed for SetLastUpdatedBy {} - impl State for SetLastUpdatedBy { type CreatedAt = S::CreatedAt; - type Id = S::Id; - type UpdatedAt = S::UpdatedAt; - type Name = S::Name; - type LastUpdatedBy = Set; - type ContentMarkdown = S::ContentMarkdown; - type Disabled = S::Disabled; } ///State transition - sets the `content_markdown` field to Set pub struct SetContentMarkdown(PhantomData S>); impl sealed::Sealed for SetContentMarkdown {} impl State for SetContentMarkdown { - type CreatedAt = S::CreatedAt; - type Id = S::Id; type UpdatedAt = S::UpdatedAt; - type Name = S::Name; + type Id = S::Id; type LastUpdatedBy = S::LastUpdatedBy; + type Name = S::Name; type ContentMarkdown = Set; type Disabled = S::Disabled; + type CreatedAt = S::CreatedAt; } ///State transition - sets the `disabled` field to Set pub struct SetDisabled(PhantomData S>); impl sealed::Sealed for SetDisabled {} impl State for SetDisabled { - type CreatedAt = S::CreatedAt; - type Id = S::Id; type UpdatedAt = S::UpdatedAt; - type Name = S::Name; + type Id = S::Id; type LastUpdatedBy = S::LastUpdatedBy; + type Name = S::Name; type ContentMarkdown = S::ContentMarkdown; type Disabled = 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 UpdatedAt = S::UpdatedAt; + type Id = S::Id; + type LastUpdatedBy = S::LastUpdatedBy; + type Name = S::Name; + type ContentMarkdown = S::ContentMarkdown; + type Disabled = S::Disabled; + 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 `id` field - pub struct id(()); ///Marker type for the `updated_at` field pub struct updated_at(()); - ///Marker type for the `name` field - pub struct name(()); + ///Marker type for the `id` field + pub struct id(()); ///Marker type for the `last_updated_by` field pub struct last_updated_by(()); + ///Marker type for the `name` field + pub struct name(()); ///Marker type for the `content_markdown` field pub struct content_markdown(()); ///Marker type for the `disabled` field pub struct disabled(()); + ///Marker type for the `created_at` field + pub struct created_at(()); } } @@ -395,13 +395,13 @@ where impl<'a, S> TemplateViewBuilder<'a, S> where S: template_view_state::State, - S::CreatedAt: template_view_state::IsSet, - S::Id: template_view_state::IsSet, S::UpdatedAt: template_view_state::IsSet, - S::Name: template_view_state::IsSet, + S::Id: template_view_state::IsSet, S::LastUpdatedBy: template_view_state::IsSet, + S::Name: template_view_state::IsSet, S::ContentMarkdown: template_view_state::IsSet, S::Disabled: template_view_state::IsSet, + S::CreatedAt: template_view_state::IsSet, { /// Build the final struct pub fn build(self) -> TemplateView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation.rs b/crates/weaver-api/src/tools_ozone/moderation.rs index 7997e0f..aa2804e 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(()); } } @@ -189,8 +189,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> { @@ -5308,50 +5308,50 @@ pub mod age_assurance_event_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedAt; - type Status; type AttemptId; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedAt = Unset; - type Status = Unset; type AttemptId = Unset; + type 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 Status = S::Status; - type AttemptId = S::AttemptId; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type CreatedAt = S::CreatedAt; - type Status = Set; type AttemptId = S::AttemptId; + type Status = S::Status; } ///State transition - sets the `attempt_id` field to Set pub struct SetAttemptId(PhantomData S>); impl sealed::Sealed for SetAttemptId {} impl State for SetAttemptId { type CreatedAt = S::CreatedAt; - type Status = S::Status; type AttemptId = 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 AttemptId = S::AttemptId; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `status` field - pub struct status(()); ///Marker type for the `attempt_id` field pub struct attempt_id(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -5590,8 +5590,8 @@ impl<'a, S> AgeAssuranceEventBuilder<'a, S> where S: age_assurance_event_state::State, S::CreatedAt: age_assurance_event_state::IsSet, - S::Status: age_assurance_event_state::IsSet, S::AttemptId: age_assurance_event_state::IsSet, + S::Status: age_assurance_event_state::IsSet, { /// Build the final struct pub fn build(self) -> AgeAssuranceEvent<'a> { @@ -5926,65 +5926,65 @@ pub mod blob_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Cid; - type Size; type CreatedAt; + type Size; + type Cid; type MimeType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Cid = Unset; - type Size = Unset; type CreatedAt = Unset; + type Size = Unset; + type Cid = Unset; type MimeType = Unset; } - ///State transition - sets the `cid` field to Set - pub struct SetCid(PhantomData S>); - impl sealed::Sealed for SetCid {} - impl State for SetCid { - type Cid = Set; + ///State transition - sets the `created_at` field to Set + pub struct SetCreatedAt(PhantomData S>); + impl sealed::Sealed for SetCreatedAt {} + impl State for SetCreatedAt { + type CreatedAt = Set; type Size = S::Size; - type CreatedAt = S::CreatedAt; + type Cid = S::Cid; type MimeType = S::MimeType; } ///State transition - sets the `size` field to Set pub struct SetSize(PhantomData S>); impl sealed::Sealed for SetSize {} impl State for SetSize { - type Cid = S::Cid; - type Size = Set; type CreatedAt = S::CreatedAt; + type Size = Set; + type Cid = S::Cid; type MimeType = S::MimeType; } - ///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; + ///State transition - sets the `cid` field to Set + pub struct SetCid(PhantomData S>); + impl sealed::Sealed for SetCid {} + impl State for SetCid { + type CreatedAt = S::CreatedAt; type Size = S::Size; - type CreatedAt = Set; + type Cid = Set; type MimeType = S::MimeType; } ///State transition - sets the `mime_type` field to Set pub struct SetMimeType(PhantomData S>); impl sealed::Sealed for SetMimeType {} impl State for SetMimeType { - type Cid = S::Cid; - type Size = S::Size; type CreatedAt = S::CreatedAt; + type Size = S::Size; + type Cid = S::Cid; type MimeType = 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 `size` field - pub struct size(()); ///Marker type for the `created_at` field pub struct created_at(()); + ///Marker type for the `size` field + pub struct size(()); + ///Marker type for the `cid` field + pub struct cid(()); ///Marker type for the `mime_type` field pub struct mime_type(()); } @@ -6133,9 +6133,9 @@ where impl<'a, S> BlobViewBuilder<'a, S> where S: blob_view_state::State, - S::Cid: blob_view_state::IsSet, - S::Size: blob_view_state::IsSet, S::CreatedAt: blob_view_state::IsSet, + S::Size: blob_view_state::IsSet, + S::Cid: blob_view_state::IsSet, S::MimeType: blob_view_state::IsSet, { /// Build the final struct @@ -8132,93 +8132,97 @@ pub mod mod_event_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Subject; + type Event; type CreatedBy; type SubjectBlobCids; type CreatedAt; type Id; - type Event; - type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Subject = Unset; + type Event = Unset; type CreatedBy = Unset; type SubjectBlobCids = Unset; type CreatedAt = Unset; type Id = Unset; - type Event = Unset; - type Subject = Unset; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Subject = Set; + type Event = S::Event; + type CreatedBy = S::CreatedBy; + type SubjectBlobCids = S::SubjectBlobCids; + type CreatedAt = S::CreatedAt; + type Id = S::Id; + } + ///State transition - sets the `event` field to Set + pub struct SetEvent(PhantomData S>); + impl sealed::Sealed for SetEvent {} + impl State for SetEvent { + type Subject = S::Subject; + type Event = Set; + type CreatedBy = S::CreatedBy; + type SubjectBlobCids = S::SubjectBlobCids; + type CreatedAt = S::CreatedAt; + type Id = S::Id; } ///State transition - sets the `created_by` field to Set pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { + type Subject = S::Subject; + type Event = S::Event; type CreatedBy = Set; type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; type Id = S::Id; - type Event = S::Event; - type Subject = S::Subject; } ///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 Subject = S::Subject; + type Event = S::Event; type CreatedBy = S::CreatedBy; type SubjectBlobCids = Set; type CreatedAt = S::CreatedAt; type Id = S::Id; - type Event = S::Event; - type Subject = S::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Subject = S::Subject; + type Event = S::Event; type CreatedBy = S::CreatedBy; type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = Set; type Id = S::Id; - type Event = S::Event; - type Subject = S::Subject; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { - type CreatedBy = S::CreatedBy; - type SubjectBlobCids = S::SubjectBlobCids; - type CreatedAt = S::CreatedAt; - type Id = Set; - type Event = S::Event; - type Subject = S::Subject; - } - ///State transition - sets the `event` field to Set - pub struct SetEvent(PhantomData S>); - impl sealed::Sealed for SetEvent {} - impl State for SetEvent { - type CreatedBy = S::CreatedBy; - type SubjectBlobCids = S::SubjectBlobCids; - type CreatedAt = S::CreatedAt; - type Id = S::Id; - type Event = Set; type Subject = S::Subject; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { + type Event = S::Event; type CreatedBy = S::CreatedBy; type SubjectBlobCids = S::SubjectBlobCids; type CreatedAt = S::CreatedAt; - type Id = S::Id; - type Event = S::Event; - type Subject = Set; + type Id = 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 `event` field + pub struct event(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `subject_blob_cids` field @@ -8227,10 +8231,6 @@ pub mod mod_event_view_state { pub struct created_at(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `event` field - pub struct event(()); - ///Marker type for the `subject` field - pub struct subject(()); } } @@ -8453,12 +8453,12 @@ impl<'a, S: mod_event_view_state::State> ModEventViewBuilder<'a, S> { impl<'a, S> ModEventViewBuilder<'a, S> where S: mod_event_view_state::State, + S::Subject: mod_event_view_state::IsSet, + S::Event: mod_event_view_state::IsSet, S::CreatedBy: mod_event_view_state::IsSet, S::SubjectBlobCids: mod_event_view_state::IsSet, S::CreatedAt: mod_event_view_state::IsSet, S::Id: mod_event_view_state::IsSet, - S::Event: mod_event_view_state::IsSet, - S::Subject: mod_event_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventView<'a> { @@ -8652,105 +8652,105 @@ pub mod mod_event_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type SubjectBlobs; type Event; - type Subject; + type CreatedBy; type CreatedAt; type Id; - type CreatedBy; - type SubjectBlobs; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type SubjectBlobs = Unset; type Event = Unset; - type Subject = Unset; + type CreatedBy = Unset; type CreatedAt = Unset; type Id = Unset; - type CreatedBy = Unset; - type SubjectBlobs = Unset; + type Subject = Unset; + } + ///State transition - sets the `subject_blobs` field to Set + pub struct SetSubjectBlobs(PhantomData S>); + impl sealed::Sealed for SetSubjectBlobs {} + impl State for SetSubjectBlobs { + type SubjectBlobs = Set; + type Event = S::Event; + type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Id = S::Id; + type Subject = S::Subject; } ///State transition - sets the `event` field to Set pub struct SetEvent(PhantomData S>); impl sealed::Sealed for SetEvent {} impl State for SetEvent { + type SubjectBlobs = S::SubjectBlobs; type Event = Set; - type Subject = S::Subject; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Id = S::Id; - type CreatedBy = S::CreatedBy; - type SubjectBlobs = S::SubjectBlobs; + 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 { + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type SubjectBlobs = S::SubjectBlobs; type Event = S::Event; - type Subject = Set; + type CreatedBy = Set; type CreatedAt = S::CreatedAt; type Id = S::Id; - type CreatedBy = S::CreatedBy; - type SubjectBlobs = S::SubjectBlobs; + 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 SubjectBlobs = S::SubjectBlobs; type Event = S::Event; - type Subject = S::Subject; + type CreatedBy = S::CreatedBy; type CreatedAt = Set; type Id = S::Id; - type CreatedBy = S::CreatedBy; - type SubjectBlobs = S::SubjectBlobs; + type Subject = S::Subject; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { + type SubjectBlobs = S::SubjectBlobs; type Event = S::Event; - type Subject = S::Subject; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Id = Set; - type CreatedBy = S::CreatedBy; - type SubjectBlobs = S::SubjectBlobs; + type Subject = S::Subject; } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type SubjectBlobs = S::SubjectBlobs; type Event = S::Event; - type Subject = S::Subject; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; type Id = S::Id; - type CreatedBy = Set; - type SubjectBlobs = S::SubjectBlobs; - } - ///State transition - sets the `subject_blobs` field to Set - pub struct SetSubjectBlobs(PhantomData S>); - impl sealed::Sealed for SetSubjectBlobs {} - impl State for SetSubjectBlobs { - type Event = S::Event; - type Subject = S::Subject; - type CreatedAt = S::CreatedAt; - type Id = S::Id; - type CreatedBy = S::CreatedBy; - type SubjectBlobs = Set; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `subject_blobs` field + pub struct subject_blobs(()); ///Marker type for the `event` field pub struct event(()); - ///Marker type for the `subject` field - pub struct subject(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `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 `subject_blobs` field - pub struct subject_blobs(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -8923,12 +8923,12 @@ where impl<'a, S> ModEventViewDetailBuilder<'a, S> where S: mod_event_view_detail_state::State, + S::SubjectBlobs: mod_event_view_detail_state::IsSet, S::Event: mod_event_view_detail_state::IsSet, - S::Subject: mod_event_view_detail_state::IsSet, + S::CreatedBy: mod_event_view_detail_state::IsSet, S::CreatedAt: mod_event_view_detail_state::IsSet, S::Id: mod_event_view_detail_state::IsSet, - S::CreatedBy: mod_event_view_detail_state::IsSet, - S::SubjectBlobs: mod_event_view_detail_state::IsSet, + S::Subject: mod_event_view_detail_state::IsSet, { /// Build the final struct pub fn build(self) -> ModEventViewDetail<'a> { @@ -9231,37 +9231,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(()); } } @@ -9371,8 +9371,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> { @@ -9677,127 +9677,127 @@ pub mod record_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Repo; type Uri; + type IndexedAt; type Value; - type BlobCids; type Cid; - type IndexedAt; + type BlobCids; type Moderation; - 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 Uri = Unset; + type IndexedAt = Unset; type Value = Unset; - type BlobCids = Unset; type Cid = Unset; - type IndexedAt = Unset; + type BlobCids = Unset; type Moderation = Unset; - type Repo = Unset; + } + ///State transition - sets the `repo` field to Set + pub struct SetRepo(PhantomData S>); + impl sealed::Sealed for SetRepo {} + impl State for SetRepo { + type Repo = Set; + type Uri = S::Uri; + type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Cid = S::Cid; + type BlobCids = S::BlobCids; + type Moderation = S::Moderation; } ///State transition - sets the `uri` field to Set pub struct SetUri(PhantomData S>); impl sealed::Sealed for SetUri {} impl State for SetUri { + type Repo = S::Repo; type Uri = Set; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type BlobCids = S::BlobCids; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; + type BlobCids = S::BlobCids; 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 = S::Uri; + type IndexedAt = Set; + type Value = S::Value; + type Cid = S::Cid; + type BlobCids = S::BlobCids; + type Moderation = S::Moderation; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Uri = S::Uri; - type Value = Set; - type BlobCids = S::BlobCids; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; type Repo = S::Repo; - } - ///State transition - sets the `blob_cids` field to Set - pub struct SetBlobCids(PhantomData S>); - impl sealed::Sealed for SetBlobCids {} - impl State for SetBlobCids { type Uri = S::Uri; - type Value = S::Value; - type BlobCids = Set; - type Cid = S::Cid; type IndexedAt = S::IndexedAt; + type Value = Set; + type Cid = S::Cid; + type BlobCids = S::BlobCids; type Moderation = S::Moderation; - type Repo = S::Repo; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type Repo = S::Repo; type Uri = S::Uri; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type BlobCids = S::BlobCids; type Cid = Set; - type IndexedAt = S::IndexedAt; + type BlobCids = S::BlobCids; type Moderation = S::Moderation; - type Repo = S::Repo; } - ///State transition - sets the `indexed_at` field to Set - pub struct SetIndexedAt(PhantomData S>); - impl sealed::Sealed for SetIndexedAt {} - impl State for SetIndexedAt { + ///State transition - sets the `blob_cids` field to Set + pub struct SetBlobCids(PhantomData S>); + impl sealed::Sealed for SetBlobCids {} + impl State for SetBlobCids { + type Repo = S::Repo; type Uri = S::Uri; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type BlobCids = S::BlobCids; type Cid = S::Cid; - type IndexedAt = Set; + type BlobCids = Set; type Moderation = S::Moderation; - type Repo = S::Repo; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { - type Uri = S::Uri; - type Value = S::Value; - type BlobCids = S::BlobCids; - type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Moderation = 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 Uri = S::Uri; + type IndexedAt = S::IndexedAt; type Value = S::Value; - type BlobCids = S::BlobCids; type Cid = S::Cid; - type IndexedAt = S::IndexedAt; - type Moderation = S::Moderation; - type Repo = Set; + type BlobCids = S::BlobCids; + type Moderation = 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 `uri` field pub struct uri(()); + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `blob_cids` field - pub struct blob_cids(()); ///Marker type for the `cid` field pub struct cid(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); + ///Marker type for the `blob_cids` field + pub struct blob_cids(()); ///Marker type for the `moderation` field pub struct moderation(()); - ///Marker type for the `repo` field - pub struct repo(()); } } @@ -9970,13 +9970,13 @@ where impl<'a, S> RecordViewBuilder<'a, S> where S: record_view_state::State, + S::Repo: record_view_state::IsSet, S::Uri: record_view_state::IsSet, + S::IndexedAt: record_view_state::IsSet, S::Value: record_view_state::IsSet, - S::BlobCids: record_view_state::IsSet, S::Cid: record_view_state::IsSet, - S::IndexedAt: record_view_state::IsSet, + S::BlobCids: record_view_state::IsSet, S::Moderation: record_view_state::IsSet, - S::Repo: record_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RecordView<'a> { @@ -10069,125 +10069,125 @@ pub mod record_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type IndexedAt; type Value; + type Blobs; type Uri; type Moderation; - type Blobs; type Repo; - type IndexedAt; type Cid; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type IndexedAt = Unset; type Value = Unset; + type Blobs = Unset; type Uri = Unset; type Moderation = Unset; - type Blobs = Unset; type Repo = Unset; - type IndexedAt = Unset; type Cid = Unset; } + ///State transition - sets the `indexed_at` field to Set + pub struct SetIndexedAt(PhantomData S>); + impl sealed::Sealed for SetIndexedAt {} + impl State for SetIndexedAt { + type IndexedAt = Set; + type Value = S::Value; + type Blobs = S::Blobs; + type Uri = S::Uri; + type Moderation = S::Moderation; + type Repo = S::Repo; + 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; type Value = Set; + type Blobs = S::Blobs; type Uri = S::Uri; type Moderation = S::Moderation; - type Blobs = S::Blobs; type Repo = S::Repo; + type Cid = S::Cid; + } + ///State transition - sets the `blobs` field to Set + pub struct SetBlobs(PhantomData S>); + impl sealed::Sealed for SetBlobs {} + impl State for SetBlobs { type IndexedAt = S::IndexedAt; + type Value = S::Value; + type Blobs = Set; + type Uri = S::Uri; + type Moderation = S::Moderation; + type Repo = S::Repo; 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 Value = S::Value; + type Blobs = S::Blobs; type Uri = Set; type Moderation = S::Moderation; - type Blobs = S::Blobs; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; type Cid = S::Cid; } ///State transition - sets the `moderation` field to Set pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { - type Value = S::Value; - type Uri = S::Uri; - type Moderation = Set; - type Blobs = S::Blobs; - type Repo = S::Repo; type IndexedAt = S::IndexedAt; - type Cid = S::Cid; - } - ///State transition - sets the `blobs` field to Set - pub struct SetBlobs(PhantomData S>); - impl sealed::Sealed for SetBlobs {} - impl State for SetBlobs { type Value = S::Value; + type Blobs = S::Blobs; type Uri = S::Uri; - type Moderation = S::Moderation; - type Blobs = Set; + type Moderation = Set; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; type Cid = S::Cid; } ///State transition - sets the `repo` field to Set pub struct SetRepo(PhantomData S>); impl sealed::Sealed for SetRepo {} impl State for SetRepo { - type Value = S::Value; - type Uri = S::Uri; - type Moderation = S::Moderation; - type Blobs = S::Blobs; - type Repo = 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 Value = S::Value; + type Blobs = S::Blobs; type Uri = S::Uri; type Moderation = S::Moderation; - type Blobs = S::Blobs; - type Repo = S::Repo; - type IndexedAt = Set; + type Repo = Set; type Cid = S::Cid; } ///State transition - sets the `cid` field to Set pub struct SetCid(PhantomData S>); impl sealed::Sealed for SetCid {} impl State for SetCid { + type IndexedAt = S::IndexedAt; type Value = S::Value; + type Blobs = S::Blobs; type Uri = S::Uri; type Moderation = S::Moderation; - type Blobs = S::Blobs; type Repo = S::Repo; - type IndexedAt = S::IndexedAt; type Cid = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `indexed_at` field + pub struct indexed_at(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `blobs` field + pub struct blobs(()); ///Marker type for the `uri` field pub struct uri(()); ///Marker type for the `moderation` field pub struct moderation(()); - ///Marker type for the `blobs` field - pub struct blobs(()); ///Marker type for the `repo` field pub struct repo(()); - ///Marker type for the `indexed_at` field - pub struct indexed_at(()); ///Marker type for the `cid` field pub struct cid(()); } @@ -10382,12 +10382,12 @@ where impl<'a, S> RecordViewDetailBuilder<'a, S> where S: record_view_detail_state::State, + S::IndexedAt: record_view_detail_state::IsSet, S::Value: record_view_detail_state::IsSet, + S::Blobs: record_view_detail_state::IsSet, S::Uri: record_view_detail_state::IsSet, S::Moderation: record_view_detail_state::IsSet, - S::Blobs: record_view_detail_state::IsSet, S::Repo: record_view_detail_state::IsSet, - S::IndexedAt: record_view_detail_state::IsSet, S::Cid: record_view_detail_state::IsSet, { /// Build the final struct @@ -10690,84 +10690,84 @@ pub mod repo_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type IndexedAt; - type Did; - type Moderation; type Handle; type RelatedRecords; + type Moderation; + type Did; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type IndexedAt = Unset; - type Did = Unset; - type Moderation = Unset; type Handle = Unset; type RelatedRecords = Unset; + type Moderation = Unset; + 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 IndexedAt = Set; - type Did = S::Did; - type Moderation = S::Moderation; type Handle = S::Handle; type RelatedRecords = S::RelatedRecords; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { - type IndexedAt = S::IndexedAt; - type Did = Set; type Moderation = S::Moderation; - type Handle = S::Handle; - type RelatedRecords = S::RelatedRecords; - } - ///State transition - sets the `moderation` field to Set - pub struct SetModeration(PhantomData S>); - impl sealed::Sealed for SetModeration {} - impl State for SetModeration { - type IndexedAt = S::IndexedAt; type Did = S::Did; - type Moderation = Set; - type Handle = S::Handle; - type RelatedRecords = S::RelatedRecords; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Moderation = S::Moderation; type Handle = Set; type RelatedRecords = S::RelatedRecords; + type Moderation = S::Moderation; + type Did = S::Did; } ///State transition - sets the `related_records` field to Set pub struct SetRelatedRecords(PhantomData S>); impl sealed::Sealed for SetRelatedRecords {} impl State for SetRelatedRecords { type IndexedAt = S::IndexedAt; - type Did = S::Did; - type Moderation = S::Moderation; type Handle = S::Handle; type RelatedRecords = Set; + type Moderation = S::Moderation; + type Did = S::Did; + } + ///State transition - sets the `moderation` field to Set + pub struct SetModeration(PhantomData S>); + impl sealed::Sealed for SetModeration {} + impl State for SetModeration { + type IndexedAt = S::IndexedAt; + type Handle = S::Handle; + type RelatedRecords = S::RelatedRecords; + type Moderation = 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 RelatedRecords = S::RelatedRecords; + type Moderation = S::Moderation; + type Did = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `indexed_at` field pub struct indexed_at(()); - ///Marker type for the `did` field - pub struct did(()); - ///Marker type for the `moderation` field - pub struct moderation(()); ///Marker type for the `handle` field pub struct handle(()); ///Marker type for the `related_records` field pub struct related_records(()); + ///Marker type for the `moderation` field + pub struct moderation(()); + ///Marker type for the `did` field + pub struct did(()); } } @@ -11024,10 +11024,10 @@ impl<'a, S> RepoViewBuilder<'a, S> where S: repo_view_state::State, S::IndexedAt: repo_view_state::IsSet, - S::Did: repo_view_state::IsSet, - S::Moderation: repo_view_state::IsSet, S::Handle: repo_view_state::IsSet, S::RelatedRecords: repo_view_state::IsSet, + S::Moderation: repo_view_state::IsSet, + S::Did: repo_view_state::IsSet, { /// Build the final struct pub fn build(self) -> RepoView<'a> { @@ -11149,9 +11149,9 @@ pub mod repo_view_detail_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type RelatedRecords; type IndexedAt; type Moderation; + type RelatedRecords; type Did; type Handle; } @@ -11159,29 +11159,19 @@ pub mod repo_view_detail_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type RelatedRecords = Unset; type IndexedAt = Unset; type Moderation = Unset; + type RelatedRecords = Unset; type Did = Unset; type Handle = Unset; } - ///State transition - sets the `related_records` field to Set - pub struct SetRelatedRecords(PhantomData S>); - impl sealed::Sealed for SetRelatedRecords {} - impl State for SetRelatedRecords { - type RelatedRecords = Set; - type IndexedAt = S::IndexedAt; - type 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 RelatedRecords = S::RelatedRecords; type Did = S::Did; type Handle = S::Handle; } @@ -11189,9 +11179,19 @@ pub mod repo_view_detail_state { pub struct SetModeration(PhantomData S>); impl sealed::Sealed for SetModeration {} impl State for SetModeration { - type RelatedRecords = S::RelatedRecords; type IndexedAt = S::IndexedAt; type Moderation = Set; + type RelatedRecords = S::RelatedRecords; + type Did = S::Did; + type Handle = S::Handle; + } + ///State transition - sets the `related_records` field to Set + pub struct SetRelatedRecords(PhantomData S>); + impl sealed::Sealed for SetRelatedRecords {} + impl State for SetRelatedRecords { + type IndexedAt = S::IndexedAt; + type Moderation = S::Moderation; + type RelatedRecords = Set; type Did = S::Did; type Handle = S::Handle; } @@ -11199,9 +11199,9 @@ pub mod repo_view_detail_state { 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 RelatedRecords = S::RelatedRecords; type Did = Set; type Handle = S::Handle; } @@ -11209,21 +11209,21 @@ pub mod repo_view_detail_state { pub struct SetHandle(PhantomData S>); impl sealed::Sealed for SetHandle {} impl State for SetHandle { - type RelatedRecords = S::RelatedRecords; type IndexedAt = S::IndexedAt; type Moderation = S::Moderation; + type RelatedRecords = S::RelatedRecords; type Did = S::Did; type Handle = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `related_records` field - pub struct related_records(()); ///Marker type for the `indexed_at` field pub struct indexed_at(()); ///Marker type for the `moderation` field pub struct moderation(()); + ///Marker type for the `related_records` field + pub struct related_records(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `handle` field @@ -11546,9 +11546,9 @@ impl<'a, S: repo_view_detail_state::State> RepoViewDetailBuilder<'a, S> { impl<'a, S> RepoViewDetailBuilder<'a, S> where S: repo_view_detail_state::State, - S::RelatedRecords: repo_view_detail_state::IsSet, S::IndexedAt: repo_view_detail_state::IsSet, S::Moderation: repo_view_detail_state::IsSet, + S::RelatedRecords: repo_view_detail_state::IsSet, S::Did: repo_view_detail_state::IsSet, S::Handle: repo_view_detail_state::IsSet, { @@ -11797,177 +11797,177 @@ pub mod reporter_stats_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type TakendownRecordCount; + type ReportedAccountCount; type LabeledAccountCount; + type LabeledRecordCount; + type RecordReportCount; + type TakendownAccountCount; type Did; type AccountReportCount; type ReportedRecordCount; - type RecordReportCount; - type LabeledRecordCount; - type TakendownAccountCount; - type TakendownRecordCount; - type ReportedAccountCount; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type TakendownRecordCount = Unset; + type ReportedAccountCount = Unset; type LabeledAccountCount = Unset; + type LabeledRecordCount = Unset; + type RecordReportCount = Unset; + type TakendownAccountCount = Unset; type Did = Unset; type AccountReportCount = Unset; type ReportedRecordCount = Unset; - type RecordReportCount = Unset; - type LabeledRecordCount = Unset; - type TakendownAccountCount = Unset; - type TakendownRecordCount = Unset; - type ReportedAccountCount = Unset; } - ///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 LabeledAccountCount = Set; + ///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 TakendownRecordCount = Set; + type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; + type TakendownAccountCount = S::TakendownAccountCount; type Did = S::Did; type AccountReportCount = S::AccountReportCount; type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type LabeledRecordCount = S::LabeledRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedAccountCount = S::ReportedAccountCount; } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { + ///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 TakendownRecordCount = S::TakendownRecordCount; + type ReportedAccountCount = Set; type LabeledAccountCount = S::LabeledAccountCount; - type Did = Set; - type AccountReportCount = S::AccountReportCount; - type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedAccountCount = S::ReportedAccountCount; - } - ///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 LabeledAccountCount = S::LabeledAccountCount; type Did = S::Did; - type AccountReportCount = Set; + type AccountReportCount = S::AccountReportCount; type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type LabeledRecordCount = S::LabeledRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; + } + ///State transition - sets the `labeled_account_count` field to Set + pub struct SetLabeledAccountCount(PhantomData S>); + impl sealed::Sealed for SetLabeledAccountCount {} + impl State for SetLabeledAccountCount { type TakendownRecordCount = S::TakendownRecordCount; type ReportedAccountCount = S::ReportedAccountCount; - } - ///State transition - sets the `reported_record_count` field to Set - pub struct SetReportedRecordCount(PhantomData S>); - impl sealed::Sealed for SetReportedRecordCount {} - impl State for SetReportedRecordCount { - type LabeledAccountCount = S::LabeledAccountCount; - type Did = S::Did; - type AccountReportCount = S::AccountReportCount; - type ReportedRecordCount = Set; - type RecordReportCount = S::RecordReportCount; + type LabeledAccountCount = Set; type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedAccountCount = S::ReportedAccountCount; - } - ///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 LabeledAccountCount = S::LabeledAccountCount; type Did = S::Did; type AccountReportCount = S::AccountReportCount; type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = Set; - type LabeledRecordCount = S::LabeledRecordCount; - type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedAccountCount = S::ReportedAccountCount; } ///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 TakendownRecordCount = S::TakendownRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type LabeledRecordCount = Set; + type RecordReportCount = S::RecordReportCount; + type TakendownAccountCount = S::TakendownAccountCount; type Did = S::Did; type AccountReportCount = S::AccountReportCount; type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; - type LabeledRecordCount = Set; - type TakendownAccountCount = S::TakendownAccountCount; + } + ///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 TakendownRecordCount = S::TakendownRecordCount; type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; + type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = Set; + type TakendownAccountCount = S::TakendownAccountCount; + type Did = S::Did; + type AccountReportCount = S::AccountReportCount; + type ReportedRecordCount = S::ReportedRecordCount; } ///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 TakendownRecordCount = S::TakendownRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; type LabeledAccountCount = S::LabeledAccountCount; + type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; + type TakendownAccountCount = Set; type Did = S::Did; type AccountReportCount = S::AccountReportCount; type ReportedRecordCount = S::ReportedRecordCount; - 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 TakendownRecordCount = S::TakendownRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; type LabeledRecordCount = S::LabeledRecordCount; - type TakendownAccountCount = Set; + type RecordReportCount = S::RecordReportCount; + type TakendownAccountCount = S::TakendownAccountCount; + type Did = Set; + type AccountReportCount = S::AccountReportCount; + type ReportedRecordCount = S::ReportedRecordCount; + } + ///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 TakendownRecordCount = S::TakendownRecordCount; type ReportedAccountCount = S::ReportedAccountCount; - } - ///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 LabeledAccountCount = S::LabeledAccountCount; - type Did = S::Did; - type AccountReportCount = S::AccountReportCount; - type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = Set; - type ReportedAccountCount = S::ReportedAccountCount; - } - ///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 LabeledAccountCount = S::LabeledAccountCount; type Did = S::Did; - type AccountReportCount = S::AccountReportCount; + type AccountReportCount = Set; type ReportedRecordCount = S::ReportedRecordCount; - type RecordReportCount = S::RecordReportCount; + } + ///State transition - sets the `reported_record_count` field to Set + pub struct SetReportedRecordCount(PhantomData S>); + impl sealed::Sealed for SetReportedRecordCount {} + impl State for SetReportedRecordCount { + type TakendownRecordCount = S::TakendownRecordCount; + type ReportedAccountCount = S::ReportedAccountCount; + type LabeledAccountCount = S::LabeledAccountCount; type LabeledRecordCount = S::LabeledRecordCount; + type RecordReportCount = S::RecordReportCount; type TakendownAccountCount = S::TakendownAccountCount; - type TakendownRecordCount = S::TakendownRecordCount; - type ReportedAccountCount = Set; + type Did = S::Did; + type AccountReportCount = S::AccountReportCount; + type ReportedRecordCount = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `takendown_record_count` field + pub struct takendown_record_count(()); + ///Marker type for the `reported_account_count` field + pub struct reported_account_count(()); ///Marker type for the `labeled_account_count` field pub struct labeled_account_count(()); + ///Marker type for the `labeled_record_count` field + pub struct labeled_record_count(()); + ///Marker type for the `record_report_count` field + pub struct record_report_count(()); + ///Marker type for the `takendown_account_count` field + pub struct takendown_account_count(()); ///Marker type for the `did` field pub struct did(()); ///Marker type for the `account_report_count` field pub struct account_report_count(()); ///Marker type for the `reported_record_count` field pub struct reported_record_count(()); - ///Marker type for the `record_report_count` field - pub struct record_report_count(()); - ///Marker type for the `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 `takendown_record_count` field - pub struct takendown_record_count(()); - ///Marker type for the `reported_account_count` field - pub struct reported_account_count(()); } } @@ -12190,15 +12190,15 @@ where impl<'a, S> ReporterStatsBuilder<'a, S> where S: reporter_stats_state::State, + S::TakendownRecordCount: reporter_stats_state::IsSet, + S::ReportedAccountCount: reporter_stats_state::IsSet, S::LabeledAccountCount: reporter_stats_state::IsSet, + S::LabeledRecordCount: reporter_stats_state::IsSet, + S::RecordReportCount: reporter_stats_state::IsSet, + S::TakendownAccountCount: reporter_stats_state::IsSet, S::Did: reporter_stats_state::IsSet, S::AccountReportCount: reporter_stats_state::IsSet, S::ReportedRecordCount: reporter_stats_state::IsSet, - S::RecordReportCount: reporter_stats_state::IsSet, - S::LabeledRecordCount: reporter_stats_state::IsSet, - S::TakendownAccountCount: reporter_stats_state::IsSet, - S::TakendownRecordCount: reporter_stats_state::IsSet, - S::ReportedAccountCount: reporter_stats_state::IsSet, { /// Build the final struct pub fn build(self) -> ReporterStats<'a> { @@ -12477,104 +12477,104 @@ pub mod scheduled_action_view_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type Did; - type CreatedAt; - type Status; type CreatedBy; - type Id; + type CreatedAt; type Action; + type Id; + type Status; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type Did = Unset; - type CreatedAt = Unset; - type Status = Unset; type CreatedBy = Unset; - type Id = Unset; + type CreatedAt = Unset; type Action = Unset; + type Id = Unset; + type Status = 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 CreatedAt = S::CreatedAt; - type Status = S::Status; type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Action = S::Action; type Id = S::Id; + type Status = S::Status; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Did = S::Did; + type CreatedBy = Set; + type CreatedAt = S::CreatedAt; type Action = S::Action; + type Id = S::Id; + 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 Did = S::Did; - type CreatedAt = Set; - type Status = S::Status; type CreatedBy = S::CreatedBy; - type Id = S::Id; + type CreatedAt = Set; type Action = S::Action; - } - ///State transition - sets the `status` field to Set - pub struct SetStatus(PhantomData S>); - impl sealed::Sealed for SetStatus {} - impl State for SetStatus { - type Did = S::Did; - type CreatedAt = S::CreatedAt; - type Status = Set; - type CreatedBy = S::CreatedBy; type Id = S::Id; - type Action = S::Action; + type Status = S::Status; } - ///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 `action` field to Set + pub struct SetAction(PhantomData S>); + impl sealed::Sealed for SetAction {} + impl State for SetAction { type Did = S::Did; + type CreatedBy = S::CreatedBy; type CreatedAt = S::CreatedAt; - type Status = S::Status; - type CreatedBy = Set; + type Action = Set; type Id = S::Id; - type Action = S::Action; + type Status = S::Status; } ///State transition - sets the `id` field to Set pub struct SetId(PhantomData S>); impl sealed::Sealed for SetId {} impl State for SetId { type Did = S::Did; - type CreatedAt = S::CreatedAt; - type Status = S::Status; type CreatedBy = S::CreatedBy; - type Id = Set; + type CreatedAt = S::CreatedAt; type Action = S::Action; + type Id = Set; + type Status = S::Status; } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { + ///State transition - sets the `status` field to Set + pub struct SetStatus(PhantomData S>); + impl sealed::Sealed for SetStatus {} + impl State for SetStatus { type Did = S::Did; - type CreatedAt = S::CreatedAt; - type Status = S::Status; type CreatedBy = S::CreatedBy; + type CreatedAt = S::CreatedAt; + type Action = S::Action; type Id = S::Id; - type Action = Set; + type Status = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `did` field pub struct did(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `status` field - pub struct status(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///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 `id` field + pub struct id(()); + ///Marker type for the `status` field + pub struct status(()); } } @@ -12912,11 +12912,11 @@ impl<'a, S> ScheduledActionViewBuilder<'a, S> where S: scheduled_action_view_state::State, S::Did: scheduled_action_view_state::IsSet, - S::CreatedAt: scheduled_action_view_state::IsSet, - S::Status: scheduled_action_view_state::IsSet, S::CreatedBy: scheduled_action_view_state::IsSet, - S::Id: scheduled_action_view_state::IsSet, + S::CreatedAt: scheduled_action_view_state::IsSet, S::Action: scheduled_action_view_state::IsSet, + S::Id: scheduled_action_view_state::IsSet, + S::Status: scheduled_action_view_state::IsSet, { /// Build the final struct pub fn build(self) -> ScheduledActionView<'a> { @@ -13401,85 +13401,85 @@ pub mod subject_status_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type Id; + type CreatedAt; + type UpdatedAt; type Subject; type ReviewState; - type UpdatedAt; - type CreatedAt; - type Id; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type Id = Unset; + type CreatedAt = Unset; + type UpdatedAt = Unset; type Subject = Unset; type ReviewState = Unset; - type UpdatedAt = Unset; - type CreatedAt = Unset; - type Id = 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 ReviewState = S::ReviewState; - type UpdatedAt = S::UpdatedAt; + ///State transition - sets the `id` field to Set + pub struct SetId(PhantomData S>); + impl sealed::Sealed for SetId {} + impl State for SetId { + type Id = Set; type CreatedAt = S::CreatedAt; - type Id = S::Id; - } - ///State transition - sets the `review_state` field to Set - pub struct SetReviewState(PhantomData S>); - impl sealed::Sealed for SetReviewState {} - impl State for SetReviewState { - type Subject = S::Subject; - type ReviewState = Set; type UpdatedAt = S::UpdatedAt; - 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 Subject = S::Subject; type ReviewState = S::ReviewState; - type UpdatedAt = Set; - type CreatedAt = S::CreatedAt; - type Id = S::Id; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); impl sealed::Sealed for SetCreatedAt {} impl State for SetCreatedAt { + type Id = S::Id; + type CreatedAt = Set; + type UpdatedAt = S::UpdatedAt; type Subject = S::Subject; type ReviewState = S::ReviewState; - type UpdatedAt = S::UpdatedAt; - 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 { + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type Id = S::Id; + type CreatedAt = S::CreatedAt; + type UpdatedAt = Set; type Subject = S::Subject; type ReviewState = S::ReviewState; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Id = S::Id; + type CreatedAt = S::CreatedAt; type UpdatedAt = S::UpdatedAt; + type Subject = Set; + type ReviewState = S::ReviewState; + } + ///State transition - sets the `review_state` field to Set + pub struct SetReviewState(PhantomData S>); + impl sealed::Sealed for SetReviewState {} + impl State for SetReviewState { + type Id = S::Id; type CreatedAt = S::CreatedAt; - type Id = Set; + type UpdatedAt = S::UpdatedAt; + type Subject = S::Subject; + type ReviewState = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///Marker type for the `id` field + pub struct id(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); ///Marker type for the `subject` field pub struct subject(()); ///Marker type for the `review_state` field pub struct review_state(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `id` field - pub struct id(()); } } @@ -14014,11 +14014,11 @@ where impl<'a, S> SubjectStatusViewBuilder<'a, S> where S: subject_status_view_state::State, + S::Id: 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, S::ReviewState: subject_status_view_state::IsSet, - S::UpdatedAt: subject_status_view_state::IsSet, - S::CreatedAt: subject_status_view_state::IsSet, - S::Id: subject_status_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SubjectStatusView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs b/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs index 88bc151..fc589c0 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/cancel_scheduled_actions.rs @@ -37,37 +37,37 @@ pub mod cancellation_results_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Failed; type Succeeded; + type Failed; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Failed = Unset; type Succeeded = Unset; - } - ///State transition - sets the `failed` field to Set - pub struct SetFailed(PhantomData S>); - impl sealed::Sealed for SetFailed {} - impl State for SetFailed { - type Failed = Set; - type Succeeded = S::Succeeded; + type Failed = Unset; } ///State transition - sets the `succeeded` field to Set pub struct SetSucceeded(PhantomData S>); impl sealed::Sealed for SetSucceeded {} impl State for SetSucceeded { - type Failed = S::Failed; type Succeeded = Set; + type Failed = S::Failed; + } + ///State transition - sets the `failed` field to Set + pub struct SetFailed(PhantomData S>); + impl sealed::Sealed for SetFailed {} + impl State for SetFailed { + type Succeeded = S::Succeeded; + type Failed = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `failed` field - pub struct failed(()); ///Marker type for the `succeeded` field pub struct succeeded(()); + ///Marker type for the `failed` field + pub struct failed(()); } } @@ -152,8 +152,8 @@ where impl<'a, S> CancellationResultsBuilder<'a, S> where S: cancellation_results_state::State, - S::Failed: cancellation_results_state::IsSet, S::Succeeded: cancellation_results_state::IsSet, + S::Failed: cancellation_results_state::IsSet, { /// Build the final struct pub fn build(self) -> CancellationResults<'a> { diff --git a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs index 6c7c037..dca8830 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/emit_event.rs @@ -48,50 +48,50 @@ pub mod emit_event_state { /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { type CreatedBy; - type Subject; type Event; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { type CreatedBy = Unset; - type Subject = Unset; type Event = Unset; + type Subject = Unset; } ///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 Subject = S::Subject; - type Event = S::Event; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type CreatedBy = S::CreatedBy; - type Subject = Set; type Event = S::Event; + type Subject = S::Subject; } ///State transition - sets the `event` field to Set pub struct SetEvent(PhantomData S>); impl sealed::Sealed for SetEvent {} impl State for SetEvent { type CreatedBy = S::CreatedBy; - type Subject = S::Subject; type Event = Set; + type Subject = S::Subject; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type CreatedBy = S::CreatedBy; + type Event = S::Event; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `subject` field - pub struct subject(()); ///Marker type for the `event` field pub struct event(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -245,8 +245,8 @@ impl<'a, S> EmitEventBuilder<'a, S> where S: emit_event_state::State, S::CreatedBy: emit_event_state::IsSet, - S::Subject: emit_event_state::IsSet, S::Event: emit_event_state::IsSet, + S::Subject: emit_event_state::IsSet, { /// 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 d8b726b..77b14fc 100644 --- a/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs +++ b/crates/weaver-api/src/tools_ozone/moderation/get_account_timeline.rs @@ -219,37 +219,37 @@ pub mod timeline_item_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Day; type Summary; + type Day; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Day = Unset; type Summary = Unset; - } - ///State transition - sets the `day` field to Set - pub struct SetDay(PhantomData S>); - impl sealed::Sealed for SetDay {} - impl State for SetDay { - type Day = Set; - type Summary = S::Summary; + type Day = Unset; } ///State transition - sets the `summary` field to Set pub struct SetSummary(PhantomData S>); impl sealed::Sealed for SetSummary {} impl State for SetSummary { - type Day = S::Day; type Summary = Set; + type Day = S::Day; + } + ///State transition - sets the `day` field to Set + pub struct SetDay(PhantomData S>); + impl sealed::Sealed for SetDay {} + impl State for SetDay { + type Summary = S::Summary; + type Day = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `day` field - pub struct day(()); ///Marker type for the `summary` field pub struct summary(()); + ///Marker type for the `day` field + pub struct day(()); } } @@ -334,8 +334,8 @@ where impl<'a, S> TimelineItemBuilder<'a, S> where S: timeline_item_state::State, - S::Day: timeline_item_state::IsSet, S::Summary: timeline_item_state::IsSet, + S::Day: timeline_item_state::IsSet, { /// Build the final struct pub fn build(self) -> TimelineItem<'a> { @@ -575,51 +575,51 @@ pub mod timeline_item_summary_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { + type EventType; type Count; type EventSubjectType; - type EventType; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { + type EventType = Unset; type Count = Unset; type EventSubjectType = Unset; - type EventType = 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 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 EventType = S::EventType; type Count = Set; type EventSubjectType = S::EventSubjectType; - type EventType = S::EventType; } ///State transition - sets the `event_subject_type` field to Set pub struct SetEventSubjectType(PhantomData S>); impl sealed::Sealed for SetEventSubjectType {} impl State for SetEventSubjectType { - type Count = S::Count; - type EventSubjectType = Set; type EventType = S::EventType; - } - ///State transition - sets the `event_type` field to Set - pub struct SetEventType(PhantomData S>); - impl sealed::Sealed for SetEventType {} - impl State for SetEventType { type Count = S::Count; - type EventSubjectType = S::EventSubjectType; - type EventType = Set; + type EventSubjectType = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { + ///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(()); - ///Marker type for the `event_type` field - pub struct event_type(()); } } @@ -715,9 +715,9 @@ where impl<'a, S> TimelineItemSummaryBuilder<'a, S> where S: timeline_item_summary_state::State, + S::EventType: timeline_item_summary_state::IsSet, S::Count: timeline_item_summary_state::IsSet, S::EventSubjectType: timeline_item_summary_state::IsSet, - S::EventType: 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 a3a7bdd..a11c456 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,8 +761,8 @@ pub mod schedule_action_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Action; type Subjects; + type Action; type CreatedBy; type Scheduling; } @@ -770,26 +770,26 @@ pub mod schedule_action_state { pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Action = Unset; type Subjects = Unset; + type Action = Unset; type CreatedBy = Unset; type Scheduling = Unset; } - ///State transition - sets the `action` field to Set - pub struct SetAction(PhantomData S>); - impl sealed::Sealed for SetAction {} - impl State for SetAction { - type Action = Set; - type Subjects = S::Subjects; - type CreatedBy = S::CreatedBy; - type Scheduling = S::Scheduling; - } ///State transition - sets the `subjects` field to Set pub struct SetSubjects(PhantomData S>); impl sealed::Sealed for SetSubjects {} impl State for SetSubjects { - type Action = S::Action; type Subjects = Set; + type Action = S::Action; + type CreatedBy = S::CreatedBy; + 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 Subjects = S::Subjects; + type Action = Set; type CreatedBy = S::CreatedBy; type Scheduling = S::Scheduling; } @@ -797,8 +797,8 @@ pub mod schedule_action_state { pub struct SetCreatedBy(PhantomData S>); impl sealed::Sealed for SetCreatedBy {} impl State for SetCreatedBy { - type Action = S::Action; type Subjects = S::Subjects; + type Action = S::Action; type CreatedBy = Set; type Scheduling = S::Scheduling; } @@ -806,18 +806,18 @@ pub mod schedule_action_state { pub struct SetScheduling(PhantomData S>); impl sealed::Sealed for SetScheduling {} impl State for SetScheduling { - type Action = S::Action; type Subjects = S::Subjects; + type Action = S::Action; type CreatedBy = S::CreatedBy; type Scheduling = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `action` field - pub struct action(()); ///Marker type for the `subjects` field pub struct subjects(()); + ///Marker type for the `action` field + pub struct action(()); ///Marker type for the `created_by` field pub struct created_by(()); ///Marker type for the `scheduling` field @@ -960,8 +960,8 @@ where impl<'a, S> ScheduleActionBuilder<'a, S> where S: schedule_action_state::State, - S::Action: schedule_action_state::IsSet, S::Subjects: schedule_action_state::IsSet, + S::Action: schedule_action_state::IsSet, S::CreatedBy: schedule_action_state::IsSet, S::Scheduling: schedule_action_state::IsSet, { diff --git a/crates/weaver-api/src/tools_ozone/safelink.rs b/crates/weaver-api/src/tools_ozone/safelink.rs index 0e65a28..7ed2543 100644 --- a/crates/weaver-api/src/tools_ozone/safelink.rs +++ b/crates/weaver-api/src/tools_ozone/safelink.rs @@ -144,151 +144,151 @@ pub mod event_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type CreatedAt; - type CreatedBy; - type EventType; type Action; type Id; - type Reason; type Url; + type Reason; type Pattern; + type CreatedAt; + type EventType; + type CreatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type CreatedAt = Unset; - type CreatedBy = Unset; - type EventType = Unset; type Action = Unset; type Id = Unset; - type Reason = Unset; type Url = Unset; + type Reason = Unset; type Pattern = 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 CreatedBy = S::CreatedBy; - type EventType = S::EventType; - type Action = S::Action; - type Id = S::Id; - type Reason = S::Reason; - type Url = S::Url; - type Pattern = S::Pattern; - } - ///State transition - sets the `created_by` field to Set - pub struct SetCreatedBy(PhantomData S>); - impl sealed::Sealed for SetCreatedBy {} - impl State for SetCreatedBy { - type CreatedAt = S::CreatedAt; - type CreatedBy = Set; - type EventType = S::EventType; - type Action = S::Action; - type Id = S::Id; - type Reason = S::Reason; - type Url = S::Url; - type Pattern = S::Pattern; - } - ///State transition - sets the `event_type` field to Set - pub struct SetEventType(PhantomData S>); - impl sealed::Sealed for SetEventType {} - impl State for SetEventType { - type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; - type EventType = Set; - type Action = S::Action; - type Id = S::Id; - type Reason = S::Reason; - type Url = S::Url; - type Pattern = S::Pattern; + type CreatedAt = Unset; + type EventType = Unset; + type CreatedBy = Unset; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); impl sealed::Sealed for SetAction {} impl State for SetAction { - type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; - type EventType = S::EventType; type Action = Set; type Id = S::Id; - type Reason = S::Reason; type Url = S::Url; + type Reason = S::Reason; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + type EventType = S::EventType; + 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 CreatedBy = S::CreatedBy; - type EventType = S::EventType; type Action = S::Action; type Id = Set; - type Reason = S::Reason; type Url = S::Url; + type Reason = S::Reason; type Pattern = S::Pattern; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; type EventType = S::EventType; - type Action = S::Action; - type Id = S::Id; - type Reason = Set; - type Url = S::Url; - type Pattern = S::Pattern; + 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 Action = S::Action; + type Id = S::Id; + type Url = Set; + type Reason = S::Reason; + type Pattern = S::Pattern; type CreatedAt = S::CreatedAt; - type CreatedBy = S::CreatedBy; type EventType = S::EventType; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { type Action = S::Action; type Id = S::Id; - type Reason = S::Reason; - type Url = Set; + type Url = S::Url; + type Reason = Set; type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + type EventType = S::EventType; + type CreatedBy = S::CreatedBy; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); impl sealed::Sealed for SetPattern {} impl State for SetPattern { + type Action = S::Action; + type Id = S::Id; + type Url = S::Url; + type Reason = S::Reason; + type Pattern = Set; type CreatedAt = S::CreatedAt; + type EventType = S::EventType; 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 Action = S::Action; + type Id = S::Id; + type Url = S::Url; + type Reason = S::Reason; + type Pattern = S::Pattern; + type CreatedAt = Set; type EventType = S::EventType; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `event_type` field to Set + pub struct SetEventType(PhantomData S>); + impl sealed::Sealed for SetEventType {} + impl State for SetEventType { type Action = S::Action; type Id = S::Id; + type Url = S::Url; type Reason = S::Reason; + type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + type EventType = Set; + type CreatedBy = S::CreatedBy; + } + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type Action = S::Action; + type Id = S::Id; type Url = S::Url; - type Pattern = Set; + type Reason = S::Reason; + type Pattern = S::Pattern; + type CreatedAt = S::CreatedAt; + type EventType = S::EventType; + type CreatedBy = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `created_at` field - pub struct created_at(()); - ///Marker type for the `created_by` field - pub struct created_by(()); - ///Marker type for the `event_type` field - pub struct event_type(()); ///Marker type for the `action` field pub struct action(()); ///Marker type for the `id` field pub struct id(()); - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `reason` field + pub struct reason(()); ///Marker type for the `pattern` field pub struct pattern(()); + ///Marker type for the `created_at` field + pub struct created_at(()); + ///Marker type for the `event_type` field + pub struct event_type(()); + ///Marker type for the `created_by` field + pub struct created_by(()); } } @@ -508,14 +508,14 @@ where impl<'a, S> EventBuilder<'a, S> where S: event_state::State, - S::CreatedAt: event_state::IsSet, - S::CreatedBy: event_state::IsSet, - S::EventType: event_state::IsSet, S::Action: event_state::IsSet, S::Id: event_state::IsSet, - S::Reason: event_state::IsSet, S::Url: event_state::IsSet, + S::Reason: event_state::IsSet, S::Pattern: event_state::IsSet, + S::CreatedAt: event_state::IsSet, + S::EventType: event_state::IsSet, + S::CreatedBy: event_state::IsSet, { /// Build the final struct pub fn build(self) -> Event<'a> { @@ -1259,10 +1259,10 @@ pub mod url_rule_state { pub trait State: sealed::Sealed { type CreatedAt; type Action; + type Pattern; + type Url; type Reason; type CreatedBy; - type Url; - type Pattern; type UpdatedAt; } /// Empty state - all required fields are unset @@ -1271,10 +1271,10 @@ pub mod url_rule_state { impl State for Empty { type CreatedAt = Unset; type Action = Unset; + type Pattern = Unset; + type Url = Unset; type Reason = Unset; type CreatedBy = Unset; - type Url = Unset; - type Pattern = Unset; type UpdatedAt = Unset; } ///State transition - sets the `created_at` field to Set @@ -1283,10 +1283,10 @@ pub mod url_rule_state { impl State for SetCreatedAt { type CreatedAt = Set; type Action = S::Action; + type Pattern = S::Pattern; + type Url = S::Url; type Reason = S::Reason; type CreatedBy = S::CreatedBy; - type Url = S::Url; - type Pattern = S::Pattern; type UpdatedAt = S::UpdatedAt; } ///State transition - sets the `action` field to Set @@ -1295,34 +1295,22 @@ pub mod url_rule_state { impl State for SetAction { type CreatedAt = S::CreatedAt; type Action = Set; + type Pattern = S::Pattern; + type Url = S::Url; type Reason = S::Reason; type CreatedBy = S::CreatedBy; - type Url = S::Url; - type Pattern = S::Pattern; type UpdatedAt = S::UpdatedAt; } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { + ///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 Action = S::Action; - type Reason = Set; - type CreatedBy = S::CreatedBy; + type Pattern = Set; type Url = S::Url; - type Pattern = S::Pattern; - type UpdatedAt = S::UpdatedAt; - } - ///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 Action = S::Action; type Reason = S::Reason; - type CreatedBy = Set; - type Url = S::Url; - type Pattern = S::Pattern; + type CreatedBy = S::CreatedBy; type UpdatedAt = S::UpdatedAt; } ///State transition - sets the `url` field to Set @@ -1331,22 +1319,34 @@ pub mod url_rule_state { impl State for SetUrl { type CreatedAt = S::CreatedAt; type Action = S::Action; + type Pattern = S::Pattern; + type Url = Set; type Reason = S::Reason; type CreatedBy = S::CreatedBy; - type Url = Set; - type Pattern = S::Pattern; type UpdatedAt = S::UpdatedAt; } - ///State transition - sets the `pattern` field to Set - pub struct SetPattern(PhantomData S>); - impl sealed::Sealed for SetPattern {} - impl State for SetPattern { + ///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 Action = S::Action; - type Reason = S::Reason; + type Pattern = S::Pattern; + type Url = S::Url; + type Reason = Set; type CreatedBy = S::CreatedBy; + type UpdatedAt = S::UpdatedAt; + } + ///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 Action = S::Action; + type Pattern = S::Pattern; type Url = S::Url; - type Pattern = Set; + type Reason = S::Reason; + type CreatedBy = Set; type UpdatedAt = S::UpdatedAt; } ///State transition - sets the `updated_at` field to Set @@ -1355,10 +1355,10 @@ pub mod url_rule_state { impl State for SetUpdatedAt { type CreatedAt = S::CreatedAt; type Action = S::Action; + type Pattern = S::Pattern; + type Url = S::Url; type Reason = S::Reason; type CreatedBy = S::CreatedBy; - type Url = S::Url; - type Pattern = S::Pattern; type UpdatedAt = Set; } /// Marker types for field names @@ -1368,14 +1368,14 @@ pub mod url_rule_state { pub struct created_at(()); ///Marker type for the `action` field pub struct action(()); + ///Marker type for the `pattern` field + pub struct pattern(()); + ///Marker type for the `url` field + pub struct url(()); ///Marker type for the `reason` field pub struct reason(()); ///Marker type for the `created_by` field pub struct created_by(()); - ///Marker type for the `url` field - pub struct url(()); - ///Marker type for the `pattern` field - pub struct pattern(()); ///Marker type for the `updated_at` field pub struct updated_at(()); } @@ -1569,10 +1569,10 @@ where S: url_rule_state::State, S::CreatedAt: url_rule_state::IsSet, S::Action: url_rule_state::IsSet, + S::Pattern: url_rule_state::IsSet, + S::Url: url_rule_state::IsSet, S::Reason: url_rule_state::IsSet, S::CreatedBy: url_rule_state::IsSet, - S::Url: url_rule_state::IsSet, - S::Pattern: url_rule_state::IsSet, S::UpdatedAt: url_rule_state::IsSet, { /// Build the final struct 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 94aa424..945ae73 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/add_rule.rs @@ -46,67 +46,67 @@ pub mod add_rule_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type 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; + ///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 Url = S::Url; type Pattern = S::Pattern; - type Action = S::Action; + type Reason = S::Reason; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); impl sealed::Sealed for SetUrl {} impl State for SetUrl { - type 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 Reason = S::Reason; + type Action = S::Action; type Url = S::Url; type Pattern = 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 Reason = S::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Action = S::Action; type Url = S::Url; type Pattern = S::Pattern; - type Action = Set; + type Reason = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `reason` field - pub struct reason(()); + ///Marker type for the `action` field + pub struct action(()); ///Marker type for the `url` field pub struct url(()); ///Marker type for the `pattern` field pub struct pattern(()); - ///Marker type for the `action` field - pub struct action(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -256,10 +256,10 @@ where impl<'a, S> AddRuleBuilder<'a, S> where S: add_rule_state::State, - S::Reason: add_rule_state::IsSet, + S::Action: add_rule_state::IsSet, S::Url: add_rule_state::IsSet, S::Pattern: add_rule_state::IsSet, - S::Action: add_rule_state::IsSet, + S::Reason: add_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> AddRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs index d530c29..6aa1195 100644 --- a/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs +++ b/crates/weaver-api/src/tools_ozone/safelink/update_rule.rs @@ -48,8 +48,8 @@ pub mod update_rule_state { pub trait State: sealed::Sealed { type Pattern; type Action; - type Reason; type Url; + type Reason; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -57,8 +57,8 @@ pub mod update_rule_state { impl State for Empty { type Pattern = Unset; type Action = Unset; - type Reason = Unset; type Url = Unset; + type Reason = Unset; } ///State transition - sets the `pattern` field to Set pub struct SetPattern(PhantomData S>); @@ -66,8 +66,8 @@ pub mod update_rule_state { impl State for SetPattern { type Pattern = Set; type Action = S::Action; - type Reason = S::Reason; type Url = S::Url; + type Reason = S::Reason; } ///State transition - sets the `action` field to Set pub struct SetAction(PhantomData S>); @@ -75,17 +75,8 @@ pub mod update_rule_state { impl State for SetAction { type Pattern = S::Pattern; type Action = Set; - type Reason = S::Reason; - type Url = S::Url; - } - ///State transition - sets the `reason` field to Set - pub struct SetReason(PhantomData S>); - impl sealed::Sealed for SetReason {} - impl State for SetReason { - type Pattern = S::Pattern; - type Action = S::Action; - type Reason = Set; type Url = S::Url; + type Reason = S::Reason; } ///State transition - sets the `url` field to Set pub struct SetUrl(PhantomData S>); @@ -93,8 +84,17 @@ pub mod update_rule_state { impl State for SetUrl { type Pattern = S::Pattern; type Action = S::Action; - type Reason = S::Reason; type Url = Set; + type Reason = S::Reason; + } + ///State transition - sets the `reason` field to Set + pub struct SetReason(PhantomData S>); + impl sealed::Sealed for SetReason {} + impl State for SetReason { + type Pattern = S::Pattern; + type Action = S::Action; + type Url = S::Url; + type Reason = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -103,10 +103,10 @@ pub mod update_rule_state { pub struct pattern(()); ///Marker type for the `action` field pub struct action(()); - ///Marker type for the `reason` field - pub struct reason(()); ///Marker type for the `url` field pub struct url(()); + ///Marker type for the `reason` field + pub struct reason(()); } } @@ -258,8 +258,8 @@ where S: update_rule_state::State, S::Pattern: update_rule_state::IsSet, S::Action: update_rule_state::IsSet, - S::Reason: update_rule_state::IsSet, S::Url: update_rule_state::IsSet, + S::Reason: update_rule_state::IsSet, { /// Build the final struct pub fn build(self) -> UpdateRule<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set.rs b/crates/weaver-api/src/tools_ozone/set.rs index c14ded1..cd53925 100644 --- a/crates/weaver-api/src/tools_ozone/set.rs +++ b/crates/weaver-api/src/tools_ozone/set.rs @@ -300,67 +300,67 @@ pub mod set_view_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type SetSize; - type UpdatedAt; type CreatedAt; type Name; + type UpdatedAt; + type SetSize; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type SetSize = Unset; - type UpdatedAt = Unset; type CreatedAt = Unset; type Name = 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 UpdatedAt = S::UpdatedAt; - type CreatedAt = S::CreatedAt; - type Name = S::Name; - } - ///State transition - sets the `updated_at` field to Set - pub struct SetUpdatedAt(PhantomData S>); - impl sealed::Sealed for SetUpdatedAt {} - impl State for SetUpdatedAt { - type SetSize = S::SetSize; - type UpdatedAt = Set; - type CreatedAt = S::CreatedAt; - type Name = S::Name; + type UpdatedAt = Unset; + type SetSize = 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 SetSize = S::SetSize; - type UpdatedAt = S::UpdatedAt; type CreatedAt = Set; type Name = S::Name; + type UpdatedAt = S::UpdatedAt; + type SetSize = S::SetSize; } ///State transition - sets the `name` field to Set pub struct SetName(PhantomData S>); impl sealed::Sealed for SetName {} impl State for SetName { - type SetSize = S::SetSize; - type UpdatedAt = S::UpdatedAt; type CreatedAt = S::CreatedAt; type Name = Set; + type UpdatedAt = S::UpdatedAt; + type SetSize = S::SetSize; + } + ///State transition - sets the `updated_at` field to Set + pub struct SetUpdatedAt(PhantomData S>); + impl sealed::Sealed for SetUpdatedAt {} + impl State for SetUpdatedAt { + type CreatedAt = S::CreatedAt; + type Name = S::Name; + type UpdatedAt = Set; + type SetSize = S::SetSize; + } + ///State transition - sets the `set_size` field to Set + pub struct SetSetSize(PhantomData S>); + impl sealed::Sealed for SetSetSize {} + impl State for SetSetSize { + type CreatedAt = S::CreatedAt; + type Name = S::Name; + type UpdatedAt = S::UpdatedAt; + type SetSize = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `set_size` field - pub struct set_size(()); - ///Marker type for the `updated_at` field - pub struct updated_at(()); ///Marker type for the `created_at` field pub struct created_at(()); ///Marker type for the `name` field pub struct name(()); + ///Marker type for the `updated_at` field + pub struct updated_at(()); + ///Marker type for the `set_size` field + pub struct set_size(()); } } @@ -493,10 +493,10 @@ where impl<'a, S> SetViewBuilder<'a, S> where S: set_view_state::State, - S::SetSize: set_view_state::IsSet, - S::UpdatedAt: set_view_state::IsSet, S::CreatedAt: set_view_state::IsSet, S::Name: set_view_state::IsSet, + S::UpdatedAt: set_view_state::IsSet, + S::SetSize: set_view_state::IsSet, { /// Build the final struct pub fn build(self) -> SetView<'a> { diff --git a/crates/weaver-api/src/tools_ozone/set/add_values.rs b/crates/weaver-api/src/tools_ozone/set/add_values.rs index 06c548b..426fd0d 100644 --- a/crates/weaver-api/src/tools_ozone/set/add_values.rs +++ b/crates/weaver-api/src/tools_ozone/set/add_values.rs @@ -35,37 +35,37 @@ pub mod add_values_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Name; type Values; + type Name; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Name = Unset; type Values = Unset; - } - ///State transition - sets the `name` field to Set - pub struct SetName(PhantomData S>); - impl sealed::Sealed for SetName {} - impl State for SetName { - type Name = Set; - type Values = S::Values; + type Name = Unset; } ///State transition - sets the `values` field to Set pub struct SetValues(PhantomData S>); impl sealed::Sealed for SetValues {} impl State for SetValues { - type Name = S::Name; type Values = Set; + type Name = S::Name; + } + ///State transition - sets the `name` field to Set + pub struct SetName(PhantomData S>); + impl sealed::Sealed for SetName {} + impl State for SetName { + type Values = S::Values; + type Name = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `name` field - pub struct name(()); ///Marker type for the `values` field pub struct values(()); + ///Marker type for the `name` field + pub struct name(()); } } @@ -138,8 +138,8 @@ where impl<'a, S> AddValuesBuilder<'a, S> where S: add_values_state::State, - S::Name: add_values_state::IsSet, S::Values: add_values_state::IsSet, + S::Name: add_values_state::IsSet, { /// Build the final struct pub fn build(self) -> AddValues<'a> { diff --git a/crates/weaver-api/src/tools_ozone/setting.rs b/crates/weaver-api/src/tools_ozone/setting.rs index 9573c82..55892fd 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 Did; + type CreatedBy; type Scope; + type Key; type Value; - type CreatedBy; + type Did; type LastUpdatedBy; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Key = Unset; - type Did = Unset; + type CreatedBy = Unset; type Scope = Unset; + type Key = Unset; type Value = Unset; - type CreatedBy = Unset; + type Did = Unset; type LastUpdatedBy = 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 Did = S::Did; + ///State transition - sets the `created_by` field to Set + pub struct SetCreatedBy(PhantomData S>); + impl sealed::Sealed for SetCreatedBy {} + impl State for SetCreatedBy { + type CreatedBy = Set; type Scope = S::Scope; - type Value = S::Value; - type CreatedBy = S::CreatedBy; - type LastUpdatedBy = S::LastUpdatedBy; - } - ///State transition - sets the `did` field to Set - pub struct SetDid(PhantomData S>); - impl sealed::Sealed for SetDid {} - impl State for SetDid { type Key = S::Key; - type Did = Set; - type Scope = S::Scope; type Value = S::Value; - type CreatedBy = S::CreatedBy; + type Did = S::Did; type LastUpdatedBy = S::LastUpdatedBy; } ///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 Did = S::Did; + type CreatedBy = S::CreatedBy; type Scope = Set; + type Key = S::Key; type Value = S::Value; + type Did = S::Did; + type LastUpdatedBy = S::LastUpdatedBy; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData S>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { type CreatedBy = S::CreatedBy; + type Scope = S::Scope; + type Key = Set; + type Value = S::Value; + type Did = S::Did; type LastUpdatedBy = S::LastUpdatedBy; } ///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 Did = S::Did; + type CreatedBy = S::CreatedBy; type Scope = S::Scope; + type Key = S::Key; type Value = Set; - type CreatedBy = S::CreatedBy; + type Did = S::Did; type LastUpdatedBy = S::LastUpdatedBy; } - ///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 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 CreatedBy = S::CreatedBy; type Scope = S::Scope; + type Key = S::Key; type Value = S::Value; - type CreatedBy = Set; + type Did = Set; type LastUpdatedBy = S::LastUpdatedBy; } ///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 Did = S::Did; + type CreatedBy = S::CreatedBy; type Scope = S::Scope; + type Key = S::Key; type Value = S::Value; - type CreatedBy = S::CreatedBy; + type Did = S::Did; type LastUpdatedBy = 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 `did` field - pub struct did(()); + ///Marker type for the `created_by` field + pub struct created_by(()); ///Marker type for the `scope` field pub struct scope(()); + ///Marker type for the `key` field + pub struct key(()); ///Marker type for the `value` field pub struct value(()); - ///Marker type for the `created_by` field - pub struct created_by(()); + ///Marker type for the `did` field + pub struct did(()); ///Marker type for the `last_updated_by` field pub struct last_updated_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::Did: defs_option_state::IsSet, + S::CreatedBy: defs_option_state::IsSet, S::Scope: defs_option_state::IsSet, + S::Key: defs_option_state::IsSet, S::Value: defs_option_state::IsSet, - S::CreatedBy: defs_option_state::IsSet, + S::Did: defs_option_state::IsSet, S::LastUpdatedBy: 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 b1234e5..131981e 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 Scope; type Keys; + type Scope; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Scope = Unset; 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 Scope = Set; - type Keys = S::Keys; + 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 Scope = S::Scope; type Keys = Set; + type Scope = S::Scope; + } + ///State transition - sets the `scope` field to Set + pub struct SetScope(PhantomData S>); + impl sealed::Sealed for SetScope {} + impl State for SetScope { + type Keys = S::Keys; + type Scope = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `scope` field - pub struct scope(()); ///Marker type for the `keys` field pub struct keys(()); + ///Marker type for the `scope` field + pub struct scope(()); } } @@ -136,8 +136,8 @@ where impl<'a, S> RemoveOptionsBuilder<'a, S> where S: remove_options_state::State, - S::Scope: remove_options_state::IsSet, S::Keys: remove_options_state::IsSet, + S::Scope: remove_options_state::IsSet, { /// Build the final struct pub fn build(self) -> RemoveOptions<'a> { diff --git a/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs b/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs index 4da22d4..3b6e480 100644 --- a/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs +++ b/crates/weaver-api/src/tools_ozone/setting/upsert_option.rs @@ -41,51 +41,51 @@ pub mod upsert_option_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Key; type Scope; type Value; + type Key; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Key = Unset; type Scope = Unset; type Value = Unset; - } - ///State transition - sets the `key` field to Set - pub struct SetKey(PhantomData S>); - impl sealed::Sealed for SetKey {} - impl State for SetKey { - type Key = Set; - type Scope = S::Scope; - type Value = S::Value; + type Key = Unset; } ///State transition - sets the `scope` field to Set pub struct SetScope(PhantomData S>); impl sealed::Sealed for SetScope {} impl State for SetScope { - type Key = S::Key; type Scope = Set; type Value = S::Value; + type Key = S::Key; } ///State transition - sets the `value` field to Set pub struct SetValue(PhantomData S>); impl sealed::Sealed for SetValue {} impl State for SetValue { - type Key = S::Key; type Scope = S::Scope; type Value = Set; + type Key = S::Key; + } + ///State transition - sets the `key` field to Set + pub struct SetKey(PhantomData S>); + impl sealed::Sealed for SetKey {} + impl State for SetKey { + type Scope = S::Scope; + type Value = S::Value; + type Key = Set; } /// Marker types for field names #[allow(non_camel_case_types)] pub mod members { - ///Marker type for the `key` field - pub struct key(()); ///Marker type for the `scope` field pub struct scope(()); ///Marker type for the `value` field pub struct value(()); + ///Marker type for the `key` field + pub struct key(()); } } @@ -218,9 +218,9 @@ where impl<'a, S> UpsertOptionBuilder<'a, S> where S: upsert_option_state::State, - S::Key: upsert_option_state::IsSet, S::Scope: upsert_option_state::IsSet, S::Value: upsert_option_state::IsSet, + S::Key: upsert_option_state::IsSet, { /// Build the final struct pub fn build(self) -> UpsertOption<'a> { diff --git a/crates/weaver-api/src/tools_ozone/team.rs b/crates/weaver-api/src/tools_ozone/team.rs index 3f3adbd..291edf5 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 94b3e75..e2de037 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 4be50b3..7808bb5 100644 --- a/crates/weaver-api/src/tools_ozone/verification.rs +++ b/crates/weaver-api/src/tools_ozone/verification.rs @@ -76,10 +76,10 @@ pub mod verification_view_state { pub trait State: sealed::Sealed { type Handle; type CreatedAt; - type Subject; - type Issuer; - type DisplayName; type Uri; + type DisplayName; + type Issuer; + type Subject; } /// Empty state - all required fields are unset pub struct Empty(()); @@ -87,10 +87,10 @@ pub mod verification_view_state { impl State for Empty { type Handle = Unset; type CreatedAt = Unset; - type Subject = Unset; - type Issuer = Unset; - type DisplayName = Unset; type Uri = Unset; + type DisplayName = Unset; + type Issuer = Unset; + type Subject = Unset; } ///State transition - sets the `handle` field to Set pub struct SetHandle(PhantomData S>); @@ -98,10 +98,10 @@ pub mod verification_view_state { impl State for SetHandle { type Handle = Set; type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type Issuer = S::Issuer; - type DisplayName = S::DisplayName; type Uri = S::Uri; + type DisplayName = S::DisplayName; + type Issuer = S::Issuer; + type Subject = S::Subject; } ///State transition - sets the `created_at` field to Set pub struct SetCreatedAt(PhantomData S>); @@ -109,32 +109,21 @@ pub mod verification_view_state { impl State for SetCreatedAt { type Handle = S::Handle; type CreatedAt = Set; - type Subject = S::Subject; - type Issuer = S::Issuer; - type DisplayName = S::DisplayName; type Uri = S::Uri; - } - ///State transition - sets the `subject` field to Set - pub struct SetSubject(PhantomData S>); - impl sealed::Sealed for SetSubject {} - impl State for SetSubject { - type Handle = S::Handle; - type CreatedAt = S::CreatedAt; - type Subject = Set; - type Issuer = S::Issuer; type DisplayName = S::DisplayName; - type Uri = S::Uri; + type Issuer = S::Issuer; + type Subject = S::Subject; } - ///State transition - sets the `issuer` field to Set - pub struct SetIssuer(PhantomData S>); - impl sealed::Sealed for SetIssuer {} - impl State for SetIssuer { + ///State transition - sets the `uri` field to Set + pub struct SetUri(PhantomData S>); + impl sealed::Sealed for SetUri {} + impl State for SetUri { type Handle = S::Handle; type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type Issuer = Set; + type Uri = Set; type DisplayName = S::DisplayName; - type Uri = S::Uri; + type Issuer = S::Issuer; + type Subject = S::Subject; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); @@ -142,21 +131,32 @@ pub mod verification_view_state { impl State for SetDisplayName { type Handle = S::Handle; type CreatedAt = S::CreatedAt; - type Subject = S::Subject; - type Issuer = S::Issuer; - type DisplayName = Set; type Uri = S::Uri; + type DisplayName = Set; + type Issuer = S::Issuer; + type Subject = S::Subject; } - ///State transition - sets the `uri` field to Set - pub struct SetUri(PhantomData S>); - impl sealed::Sealed for SetUri {} - impl State for SetUri { + ///State transition - sets the `issuer` field to Set + pub struct SetIssuer(PhantomData S>); + impl sealed::Sealed for SetIssuer {} + impl State for SetIssuer { type Handle = S::Handle; type CreatedAt = S::CreatedAt; + type Uri = S::Uri; + type DisplayName = S::DisplayName; + type Issuer = Set; type Subject = S::Subject; - type Issuer = S::Issuer; + } + ///State transition - sets the `subject` field to Set + pub struct SetSubject(PhantomData S>); + impl sealed::Sealed for SetSubject {} + impl State for SetSubject { + type Handle = S::Handle; + type CreatedAt = S::CreatedAt; + type Uri = S::Uri; type DisplayName = S::DisplayName; - type Uri = Set; + type Issuer = S::Issuer; + type Subject = Set; } /// Marker types for field names #[allow(non_camel_case_types)] @@ -165,14 +165,14 @@ pub mod verification_view_state { pub struct handle(()); ///Marker type for the `created_at` field pub struct created_at(()); - ///Marker type for the `subject` field - pub struct subject(()); - ///Marker type for the `issuer` field - pub struct issuer(()); - ///Marker type for the `display_name` field - pub struct display_name(()); ///Marker type for the `uri` field pub struct uri(()); + ///Marker type for the `display_name` field + pub struct display_name(()); + ///Marker type for the `issuer` field + pub struct issuer(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -481,10 +481,10 @@ where S: verification_view_state::State, S::Handle: verification_view_state::IsSet, S::CreatedAt: verification_view_state::IsSet, - S::Subject: verification_view_state::IsSet, - S::Issuer: verification_view_state::IsSet, - S::DisplayName: verification_view_state::IsSet, S::Uri: verification_view_state::IsSet, + S::DisplayName: verification_view_state::IsSet, + S::Issuer: verification_view_state::IsSet, + S::Subject: 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 49eb8d3..4da206d 100644 --- a/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs +++ b/crates/weaver-api/src/tools_ozone/verification/grant_verifications.rs @@ -36,37 +36,37 @@ pub mod grant_error_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Subject; type Error; + 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 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 Subject = Set; - type Error = S::Error; + 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 Subject = S::Subject; type Error = 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 Error = S::Error; + 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 `error` field pub struct error(()); + ///Marker type for the `subject` field + pub struct subject(()); } } @@ -139,8 +139,8 @@ where impl<'a, S> GrantErrorBuilder<'a, S> where S: grant_error_state::State, - S::Subject: grant_error_state::IsSet, S::Error: grant_error_state::IsSet, + S::Subject: grant_error_state::IsSet, { /// Build the final struct pub fn build(self) -> GrantError<'a> { @@ -640,49 +640,49 @@ pub mod verification_input_state { } /// State trait tracking which required fields have been set pub trait State: sealed::Sealed { - type Handle; type Subject; + type Handle; type DisplayName; } /// Empty state - all required fields are unset pub struct Empty(()); impl sealed::Sealed for Empty {} impl State for Empty { - type Handle = Unset; type Subject = Unset; + type Handle = Unset; type DisplayName = 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 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 Handle = S::Handle; type Subject = Set; + type Handle = S::Handle; + 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 Subject = S::Subject; + type Handle = Set; type DisplayName = S::DisplayName; } ///State transition - sets the `display_name` field to Set pub struct SetDisplayName(PhantomData S>); impl sealed::Sealed for SetDisplayName {} impl State for SetDisplayName { - type Handle = S::Handle; type Subject = S::Subject; + type Handle = S::Handle; type DisplayName = 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 `subject` field pub struct subject(()); + ///Marker type for the `handle` field + pub struct handle(()); ///Marker type for the `display_name` field pub struct display_name(()); } @@ -797,8 +797,8 @@ where impl<'a, S> VerificationInputBuilder<'a, S> where S: verification_input_state::State, - S::Handle: verification_input_state::IsSet, S::Subject: verification_input_state::IsSet, + S::Handle: verification_input_state::IsSet, S::DisplayName: verification_input_state::IsSet, { /// Build the final struct diff --git a/crates/weaver-app/assets/styling/hex-colour-input.css b/crates/weaver-app/assets/styling/hex-colour-input.css index c50ce63..6b75362 100644 --- a/crates/weaver-app/assets/styling/hex-colour-input.css +++ b/crates/weaver-app/assets/styling/hex-colour-input.css @@ -20,13 +20,13 @@ padding: 0.25rem 0.5rem; background-color: var(--color-surface); border: 1px solid var(--color-border); - border-radius: 4px; + border-radius: 0; } .hex-colour-input-swatch { width: 1.5rem; height: 1.5rem; - border-radius: 4px; + border-radius: 0; border: 1px solid var(--color-border); flex-shrink: 0; } @@ -57,5 +57,4 @@ .hex-colour-input-field:focus-within { border-color: var(--color-primary); - box-shadow: 0 0 0 1px var(--color-primary); } diff --git a/crates/weaver-app/assets/styling/inline-theme-editor.css b/crates/weaver-app/assets/styling/inline-theme-editor.css index 9aa5c01..ad8a145 100644 --- a/crates/weaver-app/assets/styling/inline-theme-editor.css +++ b/crates/weaver-app/assets/styling/inline-theme-editor.css @@ -7,6 +7,7 @@ padding: 1rem; background: var(--color-surface); border: 1px solid var(--color-border); + border-radius: 0; } .inline-theme-editor-heading { @@ -30,6 +31,7 @@ .inline-theme-editor-presets select { padding: 0.5rem; border: 1px solid var(--color-border); + border-radius: 0; background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); @@ -43,7 +45,7 @@ .inline-theme-editor-colours { display: grid; - grid-template-columns: repeat(2, 1fr); + grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.75rem; } @@ -63,6 +65,7 @@ .inline-theme-editor-code-theme select { padding: 0.5rem; border: 1px solid var(--color-border); + border-radius: 0; background: var(--color-base); color: var(--color-text); font-family: var(--font-ui); @@ -78,6 +81,29 @@ gap: 0.5rem; } +.inline-theme-editor-advanced-content { + display: flex; + flex-direction: column; + gap: 1rem; + padding: 0.75rem; + background: var(--color-base); + border: 1px solid var(--color-border); + border-radius: 0; +} + +.inline-theme-editor-variant { + display: flex; + flex-direction: column; + gap: 0.5rem; +} + +.inline-theme-editor-variant h5 { + margin: 0; + font-size: 0.875rem; + font-weight: 600; + color: var(--color-muted); +} + .inline-theme-editor-full-link { font-size: 0.875rem; color: var(--color-link); diff --git a/crates/weaver-app/assets/styling/layouts.css b/crates/weaver-app/assets/styling/layouts.css index 845fd27..f095710 100644 --- a/crates/weaver-app/assets/styling/layouts.css +++ b/crates/weaver-app/assets/styling/layouts.css @@ -11,11 +11,11 @@ .sidebar-layout { display: grid; grid-template-columns: - minmax(var(--layout-gutter, 240px), 1fr) + minmax(var(--layout-gutter, 300px), 1fr) minmax(0, var(--layout-content, 95ch)) - minmax(var(--layout-gutter, 240px), 1fr); + minmax(var(--layout-gutter, 300px), 1fr); gap: var(--layout-gap, 1.5rem); - max-width: calc(var(--layout-content, 95ch) + var(--layout-gutter, 240px) * 2 + 4rem); + max-width: calc(var(--layout-content, 95ch) + var(--layout-gutter, 300px) * 2 + 4rem); margin: 0 auto; padding: var(--layout-padding, 2rem 1.25rem 2rem 0); } @@ -71,8 +71,8 @@ /* Variant: notebook layout (wider gutters and content) */ .sidebar-layout-notebook { - --layout-gutter: 280px; - --layout-content: 90rem; + --layout-gutter: 320px; + --layout-content: 95ch; --layout-gap: 2rem; --layout-padding: 2.5rem 1.25rem 2.5rem 0; } @@ -94,7 +94,7 @@ .notebook-layout { display: grid; grid-template-columns: - minmax(240px, 1fr) + minmax(330px, 1fr) minmax(0, 95ch) minmax(240px, 1fr); gap: 1rem; diff --git a/crates/weaver-app/assets/styling/notebook-cover.css b/crates/weaver-app/assets/styling/notebook-cover.css index 2debdd3..6153ff7 100644 --- a/crates/weaver-app/assets/styling/notebook-cover.css +++ b/crates/weaver-app/assets/styling/notebook-cover.css @@ -7,9 +7,6 @@ /* Desktop: sidebar gets top and right borders */ @media (min-width: 1400px) { .notebook-cover { - border-top: 1px solid var(--color-border); - border-inline-end: 1px solid var(--color-border); - border-bottom: 1px solid var(--color-border); padding: 1.25rem; } } @@ -92,15 +89,16 @@ /* Owner actions */ .notebook-cover-actions { + display: flex; + flex-direction: column; + gap: 0.5rem; margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid var(--color-border); - border-radius: 0; } .notebook-cover-action-link { text-decoration: none; - border-radius: 0; } .notebook-cover-actions .button { @@ -108,3 +106,17 @@ text-align: start; border-radius: 0; } + +/* Settings panel shown inline below actions */ +.notebook-cover-settings { + margin-top: 1rem; + padding-top: 1rem; +} + +.notebook-cover-settings .notebook-editor { + padding: 0; +} + +.notebook-cover-settings .notebook-editor-title { + display: none; +} diff --git a/crates/weaver-app/assets/styling/notebook-editor.css b/crates/weaver-app/assets/styling/notebook-editor.css index e2258c5..6dc4018 100644 --- a/crates/weaver-app/assets/styling/notebook-editor.css +++ b/crates/weaver-app/assets/styling/notebook-editor.css @@ -32,6 +32,7 @@ .notebook-editor-field input[type="text"] { padding: 0.5rem; border: 1px solid var(--color-border); + border-radius: 0; background: var(--color-base); color: var(--color-text); font-size: 0.875rem; @@ -60,12 +61,42 @@ cursor: pointer; } +.notebook-editor-toggle input[type="checkbox"] { + appearance: none; + width: 1rem; + height: 1rem; + border: 1px solid var(--color-border); + border-radius: 0; + background: var(--color-base); + cursor: pointer; + flex-shrink: 0; +} + +.notebook-editor-toggle input[type="checkbox"]:checked { + background: var(--color-primary); + border-color: var(--color-primary); +} + +.notebook-editor-toggle input[type="checkbox"]:checked::after { + content: "✓"; + display: block; + color: var(--color-base); + font-size: 0.75rem; + text-align: center; + line-height: 1rem; +} + +.notebook-editor-toggle input[type="checkbox"]:focus { + border-color: var(--color-primary); +} + .notebook-editor-tags { display: flex; flex-wrap: wrap; gap: 0.5rem; padding: 0.5rem; border: 1px solid var(--color-border); + border-radius: 0; background: var(--color-base); } @@ -118,5 +149,4 @@ gap: 0.5rem; justify-content: flex-end; padding-top: 0.5rem; - border-top: 1px solid var(--color-border); } diff --git a/crates/weaver-app/src/components/collapsible/component.rs b/crates/weaver-app/src/components/collapsible/component.rs new file mode 100644 index 0000000..6718337 --- /dev/null +++ b/crates/weaver-app/src/components/collapsible/component.rs @@ -0,0 +1,85 @@ +use dioxus::prelude::*; +use dioxus_primitives::collapsible::{ + self, CollapsibleContentProps, CollapsibleProps, CollapsibleTriggerProps, +}; + +#[component] +pub fn Collapsible(props: CollapsibleProps) -> Element { + rsx! { + document::Link { rel: "stylesheet", href: asset!("./style.css") } + collapsible::Collapsible { + keep_mounted: props.keep_mounted, + default_open: props.default_open, + disabled: props.disabled, + open: props.open, + on_open_change: props.on_open_change, + attributes: props.attributes, + class: "collapsible", + {props.children} + } + } +} + +#[component] +pub fn CollapsibleTrigger(props: CollapsibleTriggerProps) -> Element { + rsx! { + collapsible::CollapsibleTrigger { class: "collapsible-trigger", attributes: props.attributes, + {props.children} + svg { + class: "collapsible-expand-icon", + view_box: "0 0 24 24", + xmlns: "http://www.w3.org/2000/svg", + // shifted up by 6 polyline { points: "6 9 12 15 18 9" } + polyline { points: "6 15 12 21 18 15" } + // shifted down by 6 polyline { points: "6 15 12 9 18 15" } + polyline { points: "6 9 12 3 18 9" } + } + } + } +} + +#[component] +pub fn CollapsibleContent(props: CollapsibleContentProps) -> Element { + rsx! { + collapsible::CollapsibleContent { + class: "collapsible-content", + id: props.id, + attributes: props.attributes, + {props.children} + } + } +} + +#[component] +pub fn CollapsibleItem( + #[props(extends = GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + border: "1px solid var(--color-primary", + border_radius: "0.5rem", + padding: "1rem", + ..attributes, + {children} + } + } +} + +#[component] +pub fn CollapsibleList( + #[props(extends = GlobalAttributes)] attributes: Vec, + children: Element, +) -> Element { + rsx! { + div { + display: "flex", + flex_direction: "column", + gap: "0.5rem", + max_width: "20rem", + color: "var(--color-secondary)", + ..attributes, + {children} + } + } +} diff --git a/crates/weaver-app/src/components/collapsible/mod.rs b/crates/weaver-app/src/components/collapsible/mod.rs new file mode 100644 index 0000000..9a8ae55 --- /dev/null +++ b/crates/weaver-app/src/components/collapsible/mod.rs @@ -0,0 +1,2 @@ +mod component; +pub use component::*; \ No newline at end of file diff --git a/crates/weaver-app/src/components/collapsible/style.css b/crates/weaver-app/src/components/collapsible/style.css new file mode 100644 index 0000000..10fcf22 --- /dev/null +++ b/crates/weaver-app/src/components/collapsible/style.css @@ -0,0 +1,41 @@ +.collapsible-trigger { + display: flex; + overflow: hidden; + width: 100%; + box-sizing: border-box; + flex-direction: row; + align-items: center; + justify-content: space-between; + padding: 0.5rem; + border: 1px solid var(--color-border); + border-radius: 0; + background-color: transparent; + color: var(--color-text); + font-family: var(--font-ui); + font-size: 0.875rem; + outline: none; + text-align: left; + cursor: pointer; +} + +.collapsible-trigger:focus-visible { + border-color: var(--color-primary); +} + +.collapsible-trigger:hover { + background: var(--color-surface); +} + +.collapsible-content { + display: contents; +} + +.collapsible-expand-icon { + width: 1rem; + height: 1rem; + fill: none; + stroke: var(--color-muted); + stroke-linecap: round; + stroke-linejoin: round; + stroke-width: 2; +} diff --git a/crates/weaver-app/src/components/editor/publish.rs b/crates/weaver-app/src/components/editor/publish.rs index 5763376..c8e96ee 100644 --- a/crates/weaver-app/src/components/editor/publish.rs +++ b/crates/weaver-app/src/components/editor/publish.rs @@ -19,8 +19,11 @@ use weaver_api::com_atproto::repo::strong_ref::StrongRef; use weaver_api::com_atproto::repo::{create_record::CreateRecord, put_record::PutRecord}; use weaver_api::sh_weaver::embed::images::Images; use weaver_api::sh_weaver::embed::records::{RecordEmbed, Records}; +use weaver_api::sh_weaver::notebook::book::Book; use weaver_api::sh_weaver::notebook::entry::{Entry, EntryEmbeds}; -use weaver_common::{WeaverError, WeaverExt}; +use weaver_common::{slugify, WeaverError, WeaverExt}; + +use crate::components::notebook::{create_document_for_entry, publication_uri_for_notebook}; const ENTRY_NSID: &str = "sh.weaver.notebook.entry"; @@ -287,6 +290,9 @@ pub async fn publish_entry( let doc_entry_ref = doc.entry_ref(); let existing_rkey = doc_entry_ref.as_ref().and_then(|r| r.uri.rkey()); + // Clone entry for document creation (entry is consumed by upsert). + let entry_for_doc = entry.clone(); + // Use upsert_entry_with_notebook since we already have notebook data let (entry_ref, notebook_uri_final, was_created) = client .upsert_entry_with_notebook( @@ -300,11 +306,19 @@ pub async fn publish_entry( let uri = entry_ref.uri.clone(); // Set entry_ref so subsequent publishes update this record - doc.set_entry_ref(Some(entry_ref)); + doc.set_entry_ref(Some(entry_ref.clone())); // Store the notebook URI for future re-publishing doc.set_notebook_uri(Some(notebook_uri_final.to_smolstr())); + // Check if notebook has publishGlobal and create site.standard.document if so. + if let Err(e) = + maybe_create_document(fetcher, ¬ebook_uri_final, &entry_ref.uri, &entry_for_doc) + .await + { + tracing::warn!("Failed to create site.standard.document: {}", e); + } + if was_created { PublishResult::Created(uri) } else { @@ -456,28 +470,76 @@ pub async fn publish_entry( Ok(result) } -/// Simple slug generation from title. -fn slugify(title: &str) -> String { - title - .to_lowercase() - .chars() - .map(|c| { - if c.is_ascii_alphanumeric() { - c - } else if c.is_whitespace() || c == '-' || c == '_' { - '-' - } else { - // Skip other characters - '\0' - } - }) - .filter(|&c| c != '\0') - .collect::() - // Collapse multiple dashes - .split('-') - .filter(|s| !s.is_empty()) - .collect::>() - .join("-") +/// Check if notebook has publishGlobal enabled and create site.standard.document if so. +async fn maybe_create_document( + fetcher: &Fetcher, + notebook_uri: &AtUri<'_>, + entry_uri: &AtUri<'_>, + entry: &Entry<'_>, +) -> Result<(), WeaverError> { + // Fetch the notebook book record to check publishGlobal. + let book = fetch_book_record(fetcher, notebook_uri).await?; + + // Only create document if publishGlobal is enabled. + if !book.publish_global.unwrap_or(false) { + tracing::debug!("Notebook does not have publishGlobal enabled, skipping document creation"); + return Ok(()); + } + + // Get the publication URI for this notebook. + let publication_uri = publication_uri_for_notebook(notebook_uri) + .ok_or_else(|| WeaverError::InvalidNotebook("Could not build publication URI".into()))?; + + // Create the document. + match create_document_for_entry(fetcher, entry_uri, entry, &publication_uri).await { + Ok(Some(doc_uri)) => { + tracing::info!("Created site.standard.document: {}", doc_uri); + } + Ok(None) => { + tracing::debug!("Document creation not needed"); + } + Err(e) => { + tracing::warn!("Failed to create document: {}", e); + } + } + + Ok(()) +} + +/// Fetch the Book record for a notebook URI. +async fn fetch_book_record(fetcher: &Fetcher, notebook_uri: &AtUri<'_>) -> Result, WeaverError> { + let rkey = notebook_uri + .rkey() + .ok_or_else(|| WeaverError::InvalidNotebook("Notebook URI missing rkey".into()))?; + + let collection = Nsid::new(::NSID) + .map_err(WeaverError::AtprotoString)?; + + let did = match notebook_uri.authority() { + AtIdentifier::Did(d) => d.clone(), + AtIdentifier::Handle(h) => fetcher.client.resolve_handle(h).await.map_err(|e| { + WeaverError::InvalidNotebook(format!("Failed to resolve handle: {}", e)) + })?, + }; + + let request = GetRecord::new() + .repo(AtIdentifier::Did(did)) + .collection(collection) + .rkey(RecordKey::any(rkey.as_ref()).map_err(|e| WeaverError::InvalidNotebook(e.to_string()))?) + .build(); + + let response = fetcher.send(request).await.map_err(|e| { + WeaverError::InvalidNotebook(format!("Failed to fetch notebook: {}", e)) + })?; + + let output = response + .into_output() + .map_err(|e| WeaverError::InvalidNotebook(format!("Failed to parse notebook: {}", e)))?; + + let book: Book = jacquard::from_data(&output.value) + .map_err(|e| WeaverError::InvalidNotebook(format!("Failed to deserialize book: {}", e)))?; + + Ok(book.into_static()) } /// Props for the publish button component. diff --git a/crates/weaver-app/src/components/inline_theme_editor.rs b/crates/weaver-app/src/components/inline_theme_editor.rs index 80e0e69..ff7255c 100644 --- a/crates/weaver-app/src/components/inline_theme_editor.rs +++ b/crates/weaver-app/src/components/inline_theme_editor.rs @@ -5,6 +5,7 @@ use dioxus::prelude::*; use weaver_renderer::themes::{BUILTIN_CODE_THEMES, BUILTIN_COLOUR_SCHEMES}; +use crate::components::collapsible::{Collapsible, CollapsibleContent, CollapsibleTrigger}; use crate::components::HexColourInput; use crate::components::toggle_group::{ToggleGroup, ToggleItem}; @@ -112,7 +113,6 @@ pub struct InlineThemeEditorProps { #[component] pub fn InlineThemeEditor(props: InlineThemeEditorProps) -> Element { let values = props.values.clone(); - let mut advanced_expanded = use_signal(|| false); rsx! { document::Stylesheet { href: INLINE_THEME_EDITOR_CSS } @@ -278,15 +278,9 @@ pub fn InlineThemeEditor(props: InlineThemeEditorProps) -> Element { } // Advanced section for per-variant colour customization. - div { class: "inline-theme-editor-advanced", - button { - class: "inline-theme-editor-advanced-toggle", - onclick: move |_| advanced_expanded.toggle(), - if advanced_expanded() { "▼ " } else { "▶ " } - "Advanced colour options" - } - - if advanced_expanded() { + Collapsible { + CollapsibleTrigger { "Advanced colour options" } + CollapsibleContent { div { class: "inline-theme-editor-advanced-content", // Light variant colours. div { class: "inline-theme-editor-variant", diff --git a/crates/weaver-app/src/components/mod.rs b/crates/weaver-app/src/components/mod.rs index d56e8a1..a13fc29 100644 --- a/crates/weaver-app/src/components/mod.rs +++ b/crates/weaver-app/src/components/mod.rs @@ -371,3 +371,4 @@ pub use notebook_editor::{NotebookEditor, NotebookEditorMode, NotebookFormState} pub mod notebook; pub use notebook::{delete_publication, sync_publication}; +pub mod collapsible; diff --git a/crates/weaver-app/src/components/notebook/document_sync.rs b/crates/weaver-app/src/components/notebook/document_sync.rs new file mode 100644 index 0000000..4695a7a --- /dev/null +++ b/crates/weaver-app/src/components/notebook/document_sync.rs @@ -0,0 +1,132 @@ +//! Document sync helpers for site.standard.document records. +//! +//! Creates/updates site.standard.document records for notebook entries +//! when the notebook has publishGlobal enabled. + +use jacquard::IntoStatic; +use jacquard::cowstr::ToCowStr; +use jacquard::prelude::*; +use jacquard::to_data; +use jacquard::types::ident::AtIdentifier; +use jacquard::types::recordkey::RecordKey; +use jacquard::types::string::{AtUri, Nsid}; +use weaver_api::com_atproto::repo::create_record::CreateRecord; +use weaver_api::com_atproto::repo::get_record::GetRecord; +use weaver_api::sh_weaver::domain::generate_document::GenerateDocument; +use weaver_api::sh_weaver::notebook::entry::Entry; +use weaver_common::{WeaverError, slugify}; + +use crate::fetch::Fetcher; + +const DOCUMENT_NSID: &str = "site.standard.document"; + +/// Create a site.standard.document for an entry if the notebook has publishGlobal. +/// +/// Returns Ok(Some(document_uri)) if created, Ok(None) if not needed, Err on failure. +pub async fn create_document_for_entry( + fetcher: &Fetcher, + entry_uri: &AtUri<'_>, + entry_record: &Entry<'_>, + publication_uri: &AtUri<'_>, +) -> Result>, WeaverError> { + // Build the document path from entry path (or fallback to slugified title). + let path = if !entry_record.path.is_empty() { + entry_record.path.to_cowstr() + } else if !entry_record.title.is_empty() { + slugify(entry_record.title.as_ref()) + .to_cowstr() + .into_static() + } else { + "untitled".to_cowstr() + }; + + // Serialize entry record for the generateDocument call. + let entry_data = to_data(entry_record) + .map_err(|e| WeaverError::InvalidNotebook(format!("Failed to serialize entry: {}", e)))?; + + // Call generateDocument endpoint (proxied through PDS with auth). + let request = GenerateDocument::new() + .entry(entry_uri.clone()) + .entry_record(entry_data) + .publication(publication_uri.clone()) + .path(path) + .build(); + + let response = fetcher + .send(request) + .await + .map_err(|e| WeaverError::InvalidNotebook(format!("Failed to generate document: {}", e)))?; + + let output = response + .into_output() + .map_err(|e| WeaverError::InvalidNotebook(format!("generateDocument failed: {}", e)))?; + + // Write the document to the PDS. + let did = fetcher + .current_did() + .await + .ok_or_else(|| WeaverError::InvalidNotebook("Not authenticated".into()))?; + + // Use entry rkey for 1:1 mapping. + let entry_rkey = entry_uri + .rkey() + .ok_or_else(|| WeaverError::InvalidNotebook("Entry URI missing rkey".into()))?; + + let collection = Nsid::new(DOCUMENT_NSID).map_err(WeaverError::AtprotoString)?; + let document_data = to_data(&output.record).map_err(|e| { + WeaverError::InvalidNotebook(format!("Failed to serialize document: {}", e)) + })?; + + let rkey = RecordKey::any(entry_rkey.as_ref()) + .map_err(|e| WeaverError::InvalidNotebook(e.to_string()))?; + + let request = CreateRecord::new() + .repo(AtIdentifier::Did(did)) + .collection(collection) + .rkey(rkey) + .record(document_data) + .build(); + + let response = fetcher + .send(request) + .await + .map_err(jacquard::client::AgentError::from)?; + + let create_output = response + .into_output() + .map_err(|e| WeaverError::InvalidNotebook(format!("Failed to create document: {}", e)))?; + + Ok(Some(create_output.uri.into_static())) +} + +/// Check if a site.standard.document exists for an entry. +pub async fn document_exists(fetcher: &Fetcher, entry_rkey: &str) -> Result { + let did = fetcher + .current_did() + .await + .ok_or_else(|| WeaverError::InvalidNotebook("Not authenticated".into()))?; + + let collection = Nsid::new(DOCUMENT_NSID).map_err(WeaverError::AtprotoString)?; + let rkey = + RecordKey::any(entry_rkey).map_err(|e| WeaverError::InvalidNotebook(e.to_string()))?; + + let request = GetRecord::new() + .repo(AtIdentifier::Did(did)) + .collection(collection) + .rkey(rkey) + .build(); + + match fetcher.send(request).await { + Ok(response) => Ok(response.into_output().is_ok()), + Err(_) => Ok(false), + } +} + +/// Get the publication URI for a notebook (same rkey). +pub fn publication_uri_for_notebook(notebook_uri: &AtUri<'_>) -> Option> { + let did = notebook_uri.authority(); + let rkey = notebook_uri.rkey()?; + + let uri_str = format!("at://{}/site.standard.publication/{}", did, rkey.as_ref()); + AtUri::new(&uri_str).ok().map(|u| u.into_static()) +} diff --git a/crates/weaver-app/src/components/notebook/mod.rs b/crates/weaver-app/src/components/notebook/mod.rs index bebb92e..4387cc5 100644 --- a/crates/weaver-app/src/components/notebook/mod.rs +++ b/crates/weaver-app/src/components/notebook/mod.rs @@ -1,7 +1,11 @@ //! Notebook-related components and helpers. +pub mod document_sync; pub mod publication_sync; +pub mod settings_panel; pub mod theme_sync; +pub use document_sync::{create_document_for_entry, document_exists, publication_uri_for_notebook}; pub use publication_sync::{delete_publication, sync_publication}; +pub use settings_panel::NotebookSettingsPanel; pub use theme_sync::{has_theme_customizations, load_theme_values, sync_theme, ThemeSyncResult}; diff --git a/crates/weaver-app/src/components/notebook/settings_panel.rs b/crates/weaver-app/src/components/notebook/settings_panel.rs new file mode 100644 index 0000000..25b42bf --- /dev/null +++ b/crates/weaver-app/src/components/notebook/settings_panel.rs @@ -0,0 +1,307 @@ +//! Notebook settings panel - reusable editor with save/cancel logic. + +use crate::components::notebook::{ + create_document_for_entry, delete_publication, document_exists, has_theme_customizations, + load_theme_values, publication_uri_for_notebook, sync_publication, sync_theme, +}; +use crate::components::notebook_editor::{NotebookEditor, NotebookEditorMode, NotebookFormState}; +use crate::fetch::Fetcher; +use dioxus::prelude::*; +use jacquard::types::aturi::AtUri; +use jacquard::types::string::Datetime; +use weaver_api::com_atproto::repo::strong_ref::StrongRef; +use weaver_api::sh_weaver::notebook::book::Book; + +/// Notebook settings panel with state management and save logic. +/// +/// Renders the NotebookEditor form and handles save/cancel. +/// Can be rendered inline or wrapped in a dialog by parent. +#[component] +pub fn NotebookSettingsPanel( + notebook_uri: AtUri<'static>, + book: Book<'static>, + #[props(default)] on_saved: Option>, + #[props(default)] on_cancel: Option>, +) -> Element { + let fetcher = use_context::(); + + let mut saving = use_signal(|| false); + let mut error = use_signal(|| None::); + + // Form state - initialized from book, theme loaded async. + let mut form_state = use_signal(|| NotebookFormState::from_book(&book)); + let mut theme_loaded = use_signal(|| false); + + // Load theme values on mount. + let book_for_theme = book.clone(); + let theme_fetcher = fetcher.clone(); + use_effect(move || { + if !theme_loaded() { + let fetcher = theme_fetcher.clone(); + let book = book_for_theme.clone(); + + spawn(async move { + if let Some(theme_ref) = &book.theme { + match load_theme_values(&fetcher, theme_ref).await { + Ok(theme_values) => { + form_state.write().theme = theme_values; + } + Err(e) => { + tracing::warn!("Failed to load theme: {:?}", e); + } + } + } + theme_loaded.set(true); + }); + } + }); + + // Save handler. + let notebook_uri_for_save = notebook_uri.clone(); + let book_for_save = book.clone(); + let save_fetcher = fetcher.clone(); + let on_saved_handler = on_saved.clone(); + let handle_save = move |new_state: NotebookFormState| { + let fetcher = save_fetcher.clone(); + let notebook_uri = notebook_uri_for_save.clone(); + let existing_book = book_for_save.clone(); + let on_saved = on_saved_handler.clone(); + + spawn(async move { + use jacquard::CowStr; + use jacquard::client::AgentSessionExt; + + saving.set(true); + error.set(None); + + let now = Datetime::now(); + + let tags: Option>> = if new_state.tags.is_empty() { + None + } else { + Some( + new_state + .tags + .iter() + .map(|s| CowStr::from(s.clone())) + .collect(), + ) + }; + + let path: CowStr<'static> = new_state.path.clone().into(); + let title: CowStr<'static> = new_state.title.clone().into(); + let publish_global = new_state.publish_global; + + // Sync theme if there are customizations. + let theme_ref: Option> = + if has_theme_customizations(&new_state.theme) { + match sync_theme(&fetcher, existing_book.theme.as_ref(), &new_state.theme).await + { + Ok(result) => Some( + StrongRef::new() + .uri(result.theme_uri) + .cid(result.theme_cid) + .build(), + ), + Err(e) => { + error.set(Some(format!("Failed to sync theme: {:?}", e))); + saving.set(false); + return; + } + } + } else { + existing_book.theme.clone() + }; + + let client = fetcher.get_client(); + match client + .update_record::(¬ebook_uri, |book| { + book.title = Some(title.clone()); + if !path.is_empty() { + book.path = Some(path.clone()); + } + book.publish_global = Some(publish_global); + book.tags = tags.clone(); + book.updated_at = Some(now.clone()); + book.theme = theme_ref.clone(); + }) + .await + { + Ok(_output) => { + // Sync or delete publication based on publish_global. + if publish_global { + if let Err(e) = sync_publication( + &fetcher, + ¬ebook_uri, + &title, + &path, + &new_state.theme, + ) + .await + { + tracing::warn!("Failed to sync publication: {:?}", e); + } + + // Backfill documents if publishGlobal was just enabled. + let was_global = existing_book.publish_global.unwrap_or(false); + if !was_global { + if let Err(e) = backfill_documents( + &fetcher, + ¬ebook_uri, + &existing_book.entry_list, + ) + .await + { + tracing::warn!("Failed to backfill documents: {:?}", e); + } + } + } else if let Err(e) = delete_publication(&fetcher, ¬ebook_uri).await { + tracing::warn!("Failed to delete publication: {:?}", e); + } + + saving.set(false); + if let Some(handler) = &on_saved { + handler.call(()); + } + } + Err(e) => { + error.set(Some(format!("Failed to save settings: {:?}", e))); + saving.set(false); + } + } + }); + }; + + let on_cancel_handler = on_cancel.clone(); + let handle_cancel = move |_| { + error.set(None); + if let Some(handler) = &on_cancel_handler { + handler.call(()); + } + }; + + rsx! { + NotebookEditor { + mode: NotebookEditorMode::Edit, + initial_state: Some(form_state()), + on_save: handle_save, + on_cancel: handle_cancel, + saving: saving(), + error: error(), + } + } +} + +/// Backfill site.standard.document records for all entries in a notebook. +/// +/// Called when publishGlobal is toggled on for an existing notebook. +/// Uses the book's entry_list and constellation backlinks to determine if backfill is needed. +/// Entries are already indexed, so we just pass URIs to generateDocument (no inline records). +async fn backfill_documents( + fetcher: &Fetcher, + notebook_uri: &AtUri<'_>, + entry_list: &[weaver_api::com_atproto::repo::strong_ref::StrongRef<'_>], +) -> Result<(), weaver_common::WeaverError> { + use jacquard::prelude::*; + use jacquard::types::uri::Uri; + use weaver_api::sh_weaver::domain::generate_document::GenerateDocument; + use weaver_common::constellation::GetBacklinksQuery; + + const CONSTELLATION_URL: &str = "https://constellation.microcosm.blue"; + + if entry_list.is_empty() { + tracing::info!("No entries to backfill"); + return Ok(()); + } + + let publication_uri = publication_uri_for_notebook(notebook_uri).ok_or_else(|| { + weaver_common::WeaverError::InvalidNotebook("Could not build publication URI".into()) + })?; + + // Query constellation for existing documents that link to this publication. + let subject = Uri::new(publication_uri.as_str()) + .map_err(|e| weaver_common::WeaverError::InvalidNotebook(e.to_string()))?; + + let query = GetBacklinksQuery { + subject, + source: "site.standard.document:site".into(), + cursor: None, + did: vec![], + limit: 1000, + }; + + let constellation_url = jacquard::url::Url::parse(CONSTELLATION_URL) + .map_err(|e| weaver_common::WeaverError::InvalidNotebook(e.to_string()))?; + + let existing_doc_count = match fetcher.client.xrpc(constellation_url).send(&query).await { + Ok(response) => match response.into_output() { + Ok(output) => output.total, + Err(_) => 0, + }, + Err(_) => 0, + }; + + // If counts match, no backfill needed. + if existing_doc_count as usize == entry_list.len() { + tracing::info!( + "Document count ({}) matches entry count ({}), skipping backfill", + existing_doc_count, + entry_list.len() + ); + return Ok(()); + } + + tracing::info!( + "Document count ({}) differs from entry count ({}), backfilling all entries", + existing_doc_count, + entry_list.len() + ); + + let mut created = 0; + let mut failed = 0; + + // Upsert document for every entry in the entry_list (entries are indexed, no inline record needed). + for entry_ref in entry_list { + let entry_uri = &entry_ref.uri; + + // Call generateDocument without inline record (will fetch from index). + let request = GenerateDocument::new() + .entry(entry_uri.clone()) + .publication(publication_uri.clone()) + .build(); + + let document = match fetcher.send(request).await { + Ok(response) => match response.into_output() { + Ok(output) => output.record, + Err(e) => { + tracing::warn!("generateDocument failed for {}: {}", entry_uri, e); + failed += 1; + continue; + } + }, + Err(e) => { + tracing::warn!("Failed to call generateDocument for {}: {}", entry_uri, e); + failed += 1; + continue; + } + }; + + match fetcher.create_record(document, None).await { + Ok(_) => { + created += 1; + } + Err(e) => { + tracing::warn!("Failed to create document for {}: {}", entry_uri, e); + failed += 1; + } + } + } + + tracing::info!( + "Backfill complete: {} documents created, {} failed", + created, + failed + ); + + Ok(()) +} diff --git a/crates/weaver-app/src/components/notebook_actions.rs b/crates/weaver-app/src/components/notebook_actions.rs index f373205..31d2393 100644 --- a/crates/weaver-app/src/components/notebook_actions.rs +++ b/crates/weaver-app/src/components/notebook_actions.rs @@ -3,15 +3,12 @@ use crate::auth::AuthState; use crate::components::button::{Button, ButtonVariant}; use crate::components::dialog::{DialogContent, DialogDescription, DialogRoot, DialogTitle}; -use crate::components::notebook::{ - delete_publication, has_theme_customizations, load_theme_values, sync_publication, sync_theme, -}; -use crate::components::notebook_editor::{NotebookEditor, NotebookEditorMode, NotebookFormState}; +use crate::components::notebook::NotebookSettingsPanel; use crate::fetch::Fetcher; use dioxus::prelude::*; use jacquard::types::aturi::AtUri; use jacquard::types::ident::AtIdentifier; -use jacquard::types::string::{Cid, Datetime}; +use jacquard::types::string::Cid; use jacquard::IntoStatic; use weaver_api::com_atproto::repo::put_record::PutRecord; use weaver_api::com_atproto::repo::strong_ref::StrongRef; @@ -39,9 +36,7 @@ pub fn NotebookActions( let mut show_dropdown = use_signal(|| false); let mut deleting = use_signal(|| false); let mut pinning = use_signal(|| false); - let mut saving_settings = use_signal(|| false); let mut error = use_signal(|| None::); - let mut settings_error = use_signal(|| None::); // Check ownership - compare auth DID with notebook's authority let current_did = auth_state.read().did.clone(); @@ -241,146 +236,21 @@ pub fn NotebookActions( }); }; - // Handler for saving settings. - let notebook_uri_for_settings = notebook_uri.clone(); - let notebook_for_settings = notebook.clone(); + // Settings handlers. let on_settings_saved_handler = on_settings_saved.clone(); - let settings_fetcher = fetcher.clone(); - let handle_settings_save = move |form_state: NotebookFormState| { - let fetcher = settings_fetcher.clone(); - let notebook_uri = notebook_uri_for_settings.clone(); - let existing_book = notebook_for_settings.clone(); - let on_settings_saved = on_settings_saved_handler.clone(); - - spawn(async move { - use jacquard::client::AgentSessionExt; - use jacquard::CowStr; - - saving_settings.set(true); - settings_error.set(None); - - let now = Datetime::now(); - - let tags: Option>> = if form_state.tags.is_empty() { - None - } else { - Some(form_state.tags.iter().map(|s| CowStr::from(s.clone())).collect()) - }; - - let path: CowStr<'static> = form_state.path.clone().into(); - let title: CowStr<'static> = form_state.title.clone().into(); - let publish_global = form_state.publish_global; - - // Sync theme if there are customizations. - let theme_ref: Option> = - if has_theme_customizations(&form_state.theme) { - match sync_theme( - &fetcher, - existing_book.theme.as_ref(), - &form_state.theme, - ) - .await - { - Ok(result) => Some( - StrongRef::new() - .uri(result.theme_uri) - .cid(result.theme_cid) - .build(), - ), - Err(e) => { - settings_error - .set(Some(format!("Failed to sync theme: {:?}", e))); - saving_settings.set(false); - return; - } - } - } else { - existing_book.theme.clone() - }; - - let client = fetcher.get_client(); - match client - .update_record::(¬ebook_uri, |book| { - book.title = Some(title.clone()); - if !path.is_empty() { - book.path = Some(path.clone()); - } - book.publish_global = Some(publish_global); - book.tags = tags.clone(); - book.updated_at = Some(now.clone()); - book.theme = theme_ref.clone(); - }) - .await - { - Ok(_output) => { - // Sync or delete publication based on publish_global. - if publish_global { - if let Err(e) = sync_publication( - &fetcher, - ¬ebook_uri, - &title, - &path, - &form_state.theme, - ) - .await - { - tracing::warn!("Failed to sync publication: {:?}", e); - } - } else { - if let Err(e) = delete_publication(&fetcher, ¬ebook_uri).await { - tracing::warn!("Failed to delete publication: {:?}", e); - } - } - - show_settings.set(false); - saving_settings.set(false); - if let Some(handler) = &on_settings_saved { - handler.call(()); - } - } - Err(e) => { - settings_error.set(Some(format!("Failed to save settings: {:?}", e))); - saving_settings.set(false); - } - } - }); + let handle_settings_saved = move |_| { + show_settings.set(false); + if let Some(handler) = &on_settings_saved_handler { + handler.call(()); + } }; let handle_settings_cancel = move |_| { show_settings.set(false); - settings_error.set(None); }; - // Form state signal - initialized without theme, updated async when settings opens. - let mut form_state = use_signal(|| NotebookFormState::from_book(¬ebook)); - let mut theme_loaded = use_signal(|| false); - - // Handler for opening settings - loads theme async. - let notebook_for_theme = notebook.clone(); - let theme_fetcher = fetcher.clone(); let handle_open_settings = move |_| { show_dropdown.set(false); - - if !theme_loaded() { - // Load theme values asynchronously. - let fetcher = theme_fetcher.clone(); - let book = notebook_for_theme.clone(); - - spawn(async move { - if let Some(theme_ref) = &book.theme { - match load_theme_values(&fetcher, theme_ref).await { - Ok(theme_values) => { - form_state.write().theme = theme_values; - } - Err(e) => { - tracing::warn!("Failed to load theme: {:?}", e); - } - } - } - theme_loaded.set(true); - }); - } - show_settings.set(true); }; @@ -456,16 +326,17 @@ pub fn NotebookActions( } } - // Settings panel - if show_settings() { - div { class: "notebook-settings-panel", - NotebookEditor { - mode: NotebookEditorMode::Edit, - initial_state: Some(form_state()), - on_save: handle_settings_save, + // Settings dialog + DialogRoot { + open: show_settings(), + on_open_change: move |open: bool| show_settings.set(open), + DialogContent { + DialogTitle { "Notebook Settings" } + NotebookSettingsPanel { + notebook_uri: notebook_uri.clone(), + book: notebook.clone(), + on_saved: handle_settings_saved, on_cancel: handle_settings_cancel, - saving: saving_settings(), - error: settings_error(), } } } diff --git a/crates/weaver-app/src/components/notebook_cover.rs b/crates/weaver-app/src/components/notebook_cover.rs index 1a0bec4..70aa880 100644 --- a/crates/weaver-app/src/components/notebook_cover.rs +++ b/crates/weaver-app/src/components/notebook_cover.rs @@ -1,5 +1,6 @@ #![allow(non_snake_case)] +use crate::components::notebook::NotebookSettingsPanel; use crate::components::{AppLink, AppLinkTarget}; use crate::components::AuthorList; use crate::components::button::{Button, ButtonVariant}; @@ -7,6 +8,7 @@ use dioxus::prelude::*; use jacquard::IntoStatic; use jacquard::smol_str::SmolStr; use jacquard::types::ident::AtIdentifier; +use weaver_api::sh_weaver::notebook::book::Book; use weaver_api::sh_weaver::notebook::NotebookView; const NOTEBOOK_COVER_CSS: Asset = asset!("/assets/styling/notebook-cover.css"); @@ -19,11 +21,12 @@ pub fn NotebookCover( #[props(default)] ident: Option>, ) -> Element { use jacquard::from_data; - use weaver_api::sh_weaver::notebook::book::Book; - // Deserialize the book record from the view - let book = match from_data::(¬ebook.record) { - Ok(book) => book, + let mut show_settings = use_signal(|| false); + + // Deserialize the book record from the view. + let book: Book<'static> = match from_data::(¬ebook.record) { + Ok(book) => book.into_static(), Err(_) => { return rsx! { document::Stylesheet { href: NOTEBOOK_COVER_CSS } @@ -35,6 +38,18 @@ pub fn NotebookCover( } }; + let entry_count = book.entry_list.len(); + let created_at = book.created_at.clone(); + let notebook_uri = notebook.uri.clone().into_static(); + + let handle_settings_saved = move |_| { + show_settings.set(false); + }; + + let handle_settings_cancel = move |_| { + show_settings.set(false); + }; + rsx! { document::Stylesheet { href: NOTEBOOK_COVER_CSS } @@ -61,14 +76,14 @@ pub fn NotebookCover( div { class: "notebook-cover-meta", // Entry count span { class: "notebook-cover-stat", - "{book.entry_list.len()} " - if book.entry_list.len() == 1 { "entry" } else { "entries" } + "{entry_count} " + if entry_count == 1 { "entry" } else { "entries" } } // Created date - if let Some(ref created_at) = book.created_at { + if let Some(ref ca) = created_at { { - let formatted_date = created_at.as_ref().format("%B %d, %Y").to_string(); + let formatted_date = ca.as_ref().format("%B %d, %Y").to_string(); rsx! { span { class: "notebook-cover-date", "Created {formatted_date}" @@ -104,6 +119,23 @@ pub fn NotebookCover( "+ Add Entry" } } + Button { + variant: ButtonVariant::Ghost, + onclick: move |_| show_settings.toggle(), + if show_settings() { "Close Settings" } else { "Settings" } + } + } + } + } + + // Settings panel (inline below actions) + if show_settings() { + div { class: "notebook-cover-settings", + NotebookSettingsPanel { + notebook_uri: notebook_uri.clone(), + book: book.clone(), + on_saved: handle_settings_saved, + on_cancel: handle_settings_cancel, } } } diff --git a/crates/weaver-app/src/components/notebook_editor.rs b/crates/weaver-app/src/components/notebook_editor.rs index 997633e..425766d 100644 --- a/crates/weaver-app/src/components/notebook_editor.rs +++ b/crates/weaver-app/src/components/notebook_editor.rs @@ -2,6 +2,7 @@ use dioxus::prelude::*; use weaver_api::sh_weaver::notebook::book::Book; +use weaver_common::slugify; use crate::components::button::{Button, ButtonVariant}; use crate::components::inline_theme_editor::{InlineThemeEditor, InlineThemeValues}; @@ -82,11 +83,6 @@ pub struct NotebookEditorProps { pub fn NotebookEditor(props: NotebookEditorProps) -> Element { let mut state = use_signal(|| props.initial_state.clone().unwrap_or_default()); - let title = match props.mode { - NotebookEditorMode::Create => "Create Notebook", - NotebookEditorMode::Edit => "Notebook Settings", - }; - let save_label = match props.mode { NotebookEditorMode::Create => "Create", NotebookEditorMode::Edit => "Save", @@ -111,8 +107,6 @@ pub fn NotebookEditor(props: NotebookEditorProps) -> Element { document::Stylesheet { href: NOTEBOOK_EDITOR_CSS } div { class: "notebook-editor", - h3 { class: "notebook-editor-title", "{title}" } - div { class: "notebook-editor-form", // Title field. div { class: "notebook-editor-field", @@ -240,24 +234,3 @@ pub fn NotebookEditor(props: NotebookEditorProps) -> Element { } } -/// Simple slug generation from title. -fn slugify(title: &str) -> String { - title - .to_lowercase() - .chars() - .map(|c| { - if c.is_ascii_alphanumeric() { - c - } else if c.is_whitespace() || c == '-' || c == '_' { - '-' - } else { - '\0' - } - }) - .filter(|&c| c != '\0') - .collect::() - .split('-') - .filter(|s| !s.is_empty()) - .collect::>() - .join("-") -} diff --git a/crates/weaver-app/src/components/profile_actions.rs b/crates/weaver-app/src/components/profile_actions.rs index 50a034e..35bab98 100644 --- a/crates/weaver-app/src/components/profile_actions.rs +++ b/crates/weaver-app/src/components/profile_actions.rs @@ -14,6 +14,7 @@ use jacquard::types::ident::AtIdentifier; use jacquard::types::string::Datetime; use weaver_api::sh_weaver::actor::Author; use weaver_api::sh_weaver::notebook::book::Book; +use weaver_common::slugify; const PROFILE_ACTIONS_CSS: Asset = asset!("/assets/styling/profile-actions.css"); @@ -184,27 +185,6 @@ pub fn ProfileActions(ident: ReadSignal>) -> Element { } } -/// Simple slug generation from title. -fn slugify(title: &str) -> String { - title - .to_lowercase() - .chars() - .map(|c| { - if c.is_ascii_alphanumeric() { - c - } else if c.is_whitespace() || c == '-' || c == '_' { - '-' - } else { - '\0' - } - }) - .filter(|&c| c != '\0') - .collect::() - .split('-') - .filter(|s| !s.is_empty()) - .collect::>() - .join("-") -} /// Mobile-friendly menubar version of profile actions. #[component] diff --git a/crates/weaver-app/src/components/toggle_group/style.css b/crates/weaver-app/src/components/toggle_group/style.css index e9e2405..6b0b26f 100644 --- a/crates/weaver-app/src/components/toggle_group/style.css +++ b/crates/weaver-app/src/components/toggle_group/style.css @@ -1,59 +1,48 @@ .toggle-group { - width: fit-content; + width: fit-content; } .toggle-item { - min-width: 35px; - padding: 10px; - border: none; - border-radius: 0; - background-color: transparent; - color: var(--secondary-color-4); - font-size: 14px; - outline: none; - transition: background-color 200ms ease, border 200ms ease; + min-width: 35px; + padding: 10px; + border-radius: 0; + border: 1px solid var(--color-border); + background-color: transparent; + color: var(--color-subtle); + font-size: 14px; + outline: none; + transition: + background-color 200ms ease, + border 200ms ease; } -.toggle-group[data-allow-multiple-pressed="true"] - .toggle-item { - border-top: 1px solid var(--primary-color-6); - border-right: 1px solid var(--primary-color-6); - border-bottom: 1px solid var(--primary-color-6); +.toggle-group[data-allow-multiple-pressed="true"] .toggle-item { + border-top: 1px solid var(--color-border); + border-right: 1px solid var(--color-border); + border-bottom: 1px solid var(--color-border); } .toggle-item:hover, .toggle-item:focus-visible { - background-color: var(--primary-color-4); - cursor: pointer; + background-color: var(--color-surface); + cursor: pointer; } .toggle-item[data-state="on"] { - background-color: var(--primary-color-7); - color: var(--secondary-color-1); + background-color: var(--color-primary); + color: var(--color-base); } -.toggle-group[data-allow-multiple-pressed="true"] - .toggle-item[data-state="on"] { - border-top: 1px solid var(--secondary-color-6); - border-right: 1px solid var(--secondary-color-6); - border-bottom: 1px solid var(--secondary-color-6); +.toggle-group[data-allow-multiple-pressed="true"] .toggle-item[data-state="on"] { + border-top: 1px solid var(--color-border); + border-right: 1px solid var(--color-border); + border-bottom: 1px solid var(--color-border); } -.toggle-group[data-allow-multiple-pressed="true"] - .toggle-item:first-child[data-state="on"] { - border: 1px solid var(--secondary-color-6); -} - -.toggle-item:first-child { - border-bottom-left-radius: 0.5rem; - border-top-left-radius: 0.5rem; +.toggle-group[data-allow-multiple-pressed="true"] .toggle-item:first-child[data-state="on"] { + border: 1px solid var(--color-border); } .toggle-group[data-allow-multiple-pressed="true"] .toggle-item:first-child { - border: 1px solid var(--primary-color-6); -} - -.toggle-item:last-child { - border-bottom-right-radius: 0.5rem; - border-top-right-radius: 0.5rem; + border: 1px solid var(--color-border); } diff --git a/crates/weaver-common/src/lib.rs b/crates/weaver-common/src/lib.rs index 20ae16e..4d8a2c0 100644 --- a/crates/weaver-common/src/lib.rs +++ b/crates/weaver-common/src/lib.rs @@ -210,3 +210,28 @@ impl<'a> LinkUri<'a> { pub fn normalize_title_path(title: &str) -> String { title.replace(' ', "_").to_lowercase() } + +/// Convert a title to a URL-friendly slug. +/// +/// Lowercases, replaces whitespace/dashes/underscores with dashes, +/// removes other non-alphanumeric characters, and collapses multiple dashes. +pub fn slugify(title: &str) -> String { + title + .to_lowercase() + .chars() + .map(|c| { + if c.is_ascii_alphanumeric() { + c + } else if c.is_whitespace() || c == '-' || c == '_' { + '-' + } else { + '\0' + } + }) + .filter(|&c| c != '\0') + .collect::() + .split('-') + .filter(|s| !s.is_empty()) + .collect::>() + .join("-") +} diff --git a/crates/weaver-index/src/endpoints/domain.rs b/crates/weaver-index/src/endpoints/domain.rs index 5484281..88c2f9c 100644 --- a/crates/weaver-index/src/endpoints/domain.rs +++ b/crates/weaver-index/src/endpoints/domain.rs @@ -20,7 +20,9 @@ use weaver_api::site_standard::document::Document; use crate::clickhouse::{DocumentRow, ProfileRow, PublicationRow}; use crate::endpoints::actor::resolve_actor; -use crate::endpoints::notebook::{build_entry_view, hydrate_authors, parse_record_json}; +use crate::endpoints::notebook::{ + build_entry_view_with_authors, hydrate_authors, parse_record_json, +}; use crate::endpoints::repo::XrpcErrorResponse; use crate::server::AppState; @@ -258,11 +260,27 @@ pub async fn generate_document( )); } + // Get evidence-based contributors for this entry (same as all other entry endpoints). + let entry_contributors = state + .clickhouse + .get_entry_contributors(entry_did_str, entry_rkey_str) + .await + .map_err(|e| { + tracing::error!("Failed to get entry contributors: {}", e); + XrpcErrorResponse::internal_error("Database query failed") + })?; + // Get entry - either from inline record or from index let (entry_view, entry_record) = if let Some(ref inline_record) = args.entry_record { // Use inline record directly - build an EntryView from the Data - build_entry_view_from_data(&entry_did, entry_rkey_str, inline_record.clone(), &state) - .await? + build_entry_view_from_data( + &entry_did, + entry_rkey_str, + inline_record.clone(), + &entry_contributors, + &state, + ) + .await? } else { // Fetch entry from index let entry_row = state @@ -275,12 +293,15 @@ pub async fn generate_document( })? .ok_or_else(|| entry_not_found("Entry not found"))?; - // Hydrate authors for the entry - let mut author_dids: HashSet<&str> = HashSet::new(); + // Merge evidence-based contributors with record's authorDids + let mut all_author_dids: HashSet = + entry_contributors.iter().cloned().collect(); for did in &entry_row.author_dids { - author_dids.insert(did.as_str()); + all_author_dids.insert(did.clone()); } - let author_dids_vec: Vec<&str> = author_dids.into_iter().collect(); + let merged_authors: Vec = all_author_dids.into_iter().collect(); + let author_dids_vec: Vec<&str> = merged_authors.iter().map(|s| s.as_str()).collect(); + let profiles = state .clickhouse .get_profiles_batch(&author_dids_vec) @@ -292,18 +313,22 @@ pub async fn generate_document( let profile_map: HashMap<&str, &ProfileRow> = profiles.iter().map(|p| (p.did.as_str(), p)).collect(); - let entry_view = build_entry_view(&entry_row, &profile_map)?; + // Use merged authors (contributors + explicit) + let entry_view = + build_entry_view_with_authors(&entry_row, &merged_authors, &profile_map)?; let entry_record = parse_record_json(&entry_row.record)?; (entry_view, entry_record) }; - // Extract title from entry + // Extract title and path from entry (before entry_view is consumed). let title = entry_view .title .as_ref() .map(|t| t.as_ref().to_string()) .unwrap_or_else(|| "Untitled".to_string()); + let entry_path = entry_view.path.as_ref().map(|p| p.to_string()); + // Try to extract description from the entry record (extract content summary) let description = extract_description_from_entry(&entry_record); @@ -338,6 +363,13 @@ pub async fn generate_document( })?; let content_data = content_data.into_static(); + // Use provided path, or fall back to entry's path. + let path = args + .path + .clone() + .or_else(|| entry_path.map(|p| p.into())) + .unwrap_or_else(|| "untitled".into()); + // Build the site.standard.document record let document = Document::new() .site(Uri::new(args.publication.as_str()).map_err(|e| { @@ -346,7 +378,7 @@ pub async fn generate_document( })?) .title(title) .published_at(chrono::Utc::now().fixed_offset()) - .path(Some(args.path.clone())) + .path(Some(path)) .content(content_data) .maybe_description(description.map(|d| d.into())) .build(); @@ -365,14 +397,25 @@ async fn build_entry_view_from_data( entry_did: &Did<'_>, entry_rkey: &str, entry_record: Data<'_>, + entry_contributors: &[smol_str::SmolStr], state: &AppState, ) -> Result<(EntryView<'static>, Data<'static>), XrpcErrorResponse> { - // Extract authorDids from record, fallback to entry owner. - let author_dids = extract_author_dids(&entry_record) - .unwrap_or_else(|| vec![entry_did.as_str().to_string()]); + // Merge evidence-based contributors with record's authorDids (dedupe). + let mut all_author_dids: HashSet = entry_contributors + .iter() + .map(|s| s.to_string()) + .collect(); + // Add authorDids from record if present, otherwise add entry owner. + if let Some(record_authors) = extract_author_dids(&entry_record) { + for did in record_authors { + all_author_dids.insert(did); + } + } + // Always include entry owner as fallback. + all_author_dids.insert(entry_did.as_str().to_string()); - // Fetch profiles for authors - let author_dids_ref: Vec<&str> = author_dids.iter().map(|s| s.as_str()).collect(); + // Fetch profiles for all authors. + let author_dids_ref: Vec<&str> = all_author_dids.iter().map(|s| s.as_str()).collect(); let profiles = state .clickhouse .get_profiles_batch(&author_dids_ref) @@ -385,12 +428,12 @@ async fn build_entry_view_from_data( let profile_map: HashMap<&str, &ProfileRow> = profiles.iter().map(|p| (p.did.as_str(), p)).collect(); - // Hydrate authors - let author_smolstrs: Vec = author_dids + // Use merged set: evidence-based contributors + explicit authors from record. + let merged_authors: Vec = all_author_dids .iter() .map(|s| smol_str::SmolStr::new(s)) .collect(); - let authors = hydrate_authors(&author_smolstrs, &profile_map)?; + let authors = hydrate_authors(&merged_authors, &profile_map)?; // Extract title and path from record using pattern matching on Data let (title, path) = extract_title_and_path(&entry_record); @@ -471,11 +514,7 @@ fn extract_author_dids(entry_record: &Data<'_>) -> Option> { } }) .collect(); - if dids.is_empty() { - None - } else { - Some(dids) - } + if dids.is_empty() { None } else { Some(dids) } } else { None } diff --git a/lexicons/domain/generateDocument.json b/lexicons/domain/generateDocument.json index 2e1ed72..d06c4a8 100644 --- a/lexicons/domain/generateDocument.json +++ b/lexicons/domain/generateDocument.json @@ -9,8 +9,7 @@ "type": "params", "required": [ "entry", - "publication", - "path" + "publication" ], "properties": { "entry": { @@ -24,7 +23,7 @@ }, "path": { "type": "string", - "description": "URL path for the document." + "description": "URL path for the document. Defaults to entry's path if not provided." }, "publication": { "type": "string",