···1616serde_ipld_dagcbor = { version = "0.6", optional = true }
1717thiserror.workspace = true
1818unicode-segmentation = "1.12"
1919-1919+serde_bytes = "0.11"
20202121[lints.rust]
2222# just so that my rust-analyzer shuts up about the module name for 2048.blue's namespace
···30373037 }
30383038 /// State trait tracking which required fields have been set
30393039 pub trait State: sealed::Sealed {
30403040- type Count;
30413040 type Followers;
30413041+ type Count;
30423042 }
30433043 /// Empty state - all required fields are unset
30443044 pub struct Empty(());
30453045 impl sealed::Sealed for Empty {}
30463046 impl State for Empty {
30473047- type Count = Unset;
30483047 type Followers = Unset;
30493049- }
30503050- ///State transition - sets the `count` field to Set
30513051- pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
30523052- impl<S: State> sealed::Sealed for SetCount<S> {}
30533053- impl<S: State> State for SetCount<S> {
30543054- type Count = Set<members::count>;
30553055- type Followers = S::Followers;
30483048+ type Count = Unset;
30563049 }
30573050 ///State transition - sets the `followers` field to Set
30583051 pub struct SetFollowers<S: State = Empty>(PhantomData<fn() -> S>);
30593052 impl<S: State> sealed::Sealed for SetFollowers<S> {}
30603053 impl<S: State> State for SetFollowers<S> {
30613061- type Count = S::Count;
30623054 type Followers = Set<members::followers>;
30553055+ type Count = S::Count;
30563056+ }
30573057+ ///State transition - sets the `count` field to Set
30583058+ pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
30593059+ impl<S: State> sealed::Sealed for SetCount<S> {}
30603060+ impl<S: State> State for SetCount<S> {
30613061+ type Followers = S::Followers;
30623062+ type Count = Set<members::count>;
30633063 }
30643064 /// Marker types for field names
30653065 #[allow(non_camel_case_types)]
30663066 pub mod members {
30673067- ///Marker type for the `count` field
30683068- pub struct count(());
30693067 ///Marker type for the `followers` field
30703068 pub struct followers(());
30693069+ ///Marker type for the `count` field
30703070+ pub struct count(());
30713071 }
30723072}
30733073···31403140impl<'a, S> KnownFollowersBuilder<'a, S>
31413141where
31423142 S: known_followers_state::State,
31433143- S::Count: known_followers_state::IsSet,
31443143 S::Followers: known_followers_state::IsSet,
31443144+ S::Count: known_followers_state::IsSet,
31453145{
31463146 /// Build the final struct
31473147 pub fn build(self) -> KnownFollowers<'a> {
···46004600 }
46014601 /// State trait tracking which required fields have been set
46024602 pub trait State: sealed::Sealed {
46034603- type Did;
46044603 type Handle;
46044604+ type Did;
46054605 }
46064606 /// Empty state - all required fields are unset
46074607 pub struct Empty(());
46084608 impl sealed::Sealed for Empty {}
46094609 impl State for Empty {
46104610- type Did = Unset;
46114610 type Handle = Unset;
46114611+ type Did = Unset;
46124612+ }
46134613+ ///State transition - sets the `handle` field to Set
46144614+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
46154615+ impl<S: State> sealed::Sealed for SetHandle<S> {}
46164616+ impl<S: State> State for SetHandle<S> {
46174617+ type Handle = Set<members::handle>;
46184618+ type Did = S::Did;
46124619 }
46134620 ///State transition - sets the `did` field to Set
46144621 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
46154622 impl<S: State> sealed::Sealed for SetDid<S> {}
46164623 impl<S: State> State for SetDid<S> {
46244624+ type Handle = S::Handle;
46174625 type Did = Set<members::did>;
46184618- type Handle = S::Handle;
46194619- }
46204620- ///State transition - sets the `handle` field to Set
46214621- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
46224622- impl<S: State> sealed::Sealed for SetHandle<S> {}
46234623- impl<S: State> State for SetHandle<S> {
46244624- type Did = S::Did;
46254625- type Handle = Set<members::handle>;
46264626 }
46274627 /// Marker types for field names
46284628 #[allow(non_camel_case_types)]
46294629 pub mod members {
46304630+ ///Marker type for the `handle` field
46314631+ pub struct handle(());
46304632 ///Marker type for the `did` field
46314633 pub struct did(());
46324632- ///Marker type for the `handle` field
46334633- pub struct handle(());
46344634 }
46354635}
46364636···49554955impl<'a, S> ProfileViewBuilder<'a, S>
49564956where
49574957 S: profile_view_state::State,
49584958- S::Did: profile_view_state::IsSet,
49594958 S::Handle: profile_view_state::IsSet,
49594959+ S::Did: profile_view_state::IsSet,
49604960{
49614961 /// Build the final struct
49624962 pub fn build(self) -> ProfileView<'a> {
···62906290 }
62916291 /// State trait tracking which required fields have been set
62926292 pub trait State: sealed::Sealed {
62936293+ type Value;
62936294 type Id;
62946294- type Type;
62956295- type Value;
62966295 type Pinned;
62966296+ type Type;
62976297 }
62986298 /// Empty state - all required fields are unset
62996299 pub struct Empty(());
63006300 impl sealed::Sealed for Empty {}
63016301 impl State for Empty {
63026302+ type Value = Unset;
63026303 type Id = Unset;
63046304+ type Pinned = Unset;
63036305 type Type = Unset;
63046304- type Value = Unset;
63056305- type Pinned = Unset;
63066306+ }
63076307+ ///State transition - sets the `value` field to Set
63086308+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
63096309+ impl<S: State> sealed::Sealed for SetValue<S> {}
63106310+ impl<S: State> State for SetValue<S> {
63116311+ type Value = Set<members::value>;
63126312+ type Id = S::Id;
63136313+ type Pinned = S::Pinned;
63146314+ type Type = S::Type;
63066315 }
63076316 ///State transition - sets the `id` field to Set
63086317 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
63096318 impl<S: State> sealed::Sealed for SetId<S> {}
63106319 impl<S: State> State for SetId<S> {
63206320+ type Value = S::Value;
63116321 type Id = Set<members::id>;
63126312- type Type = S::Type;
63136313- type Value = S::Value;
63146322 type Pinned = S::Pinned;
63156315- }
63166316- ///State transition - sets the `type` field to Set
63176317- pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
63186318- impl<S: State> sealed::Sealed for SetType<S> {}
63196319- impl<S: State> State for SetType<S> {
63206320- type Id = S::Id;
63216321- type Type = Set<members::r#type>;
63226322- type Value = S::Value;
63236323- type Pinned = S::Pinned;
63246324- }
63256325- ///State transition - sets the `value` field to Set
63266326- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
63276327- impl<S: State> sealed::Sealed for SetValue<S> {}
63286328- impl<S: State> State for SetValue<S> {
63296329- type Id = S::Id;
63306323 type Type = S::Type;
63316331- type Value = Set<members::value>;
63326332- type Pinned = S::Pinned;
63336324 }
63346325 ///State transition - sets the `pinned` field to Set
63356326 pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>);
63366327 impl<S: State> sealed::Sealed for SetPinned<S> {}
63376328 impl<S: State> State for SetPinned<S> {
63296329+ type Value = S::Value;
63386330 type Id = S::Id;
63316331+ type Pinned = Set<members::pinned>;
63396332 type Type = S::Type;
63336333+ }
63346334+ ///State transition - sets the `type` field to Set
63356335+ pub struct SetType<S: State = Empty>(PhantomData<fn() -> S>);
63366336+ impl<S: State> sealed::Sealed for SetType<S> {}
63376337+ impl<S: State> State for SetType<S> {
63406338 type Value = S::Value;
63416341- type Pinned = Set<members::pinned>;
63396339+ type Id = S::Id;
63406340+ type Pinned = S::Pinned;
63416341+ type Type = Set<members::r#type>;
63426342 }
63436343 /// Marker types for field names
63446344 #[allow(non_camel_case_types)]
63456345 pub mod members {
63466346+ ///Marker type for the `value` field
63476347+ pub struct value(());
63466348 ///Marker type for the `id` field
63476349 pub struct id(());
63506350+ ///Marker type for the `pinned` field
63516351+ pub struct pinned(());
63486352 ///Marker type for the `type` field
63496353 pub struct r#type(());
63506350- ///Marker type for the `value` field
63516351- pub struct value(());
63526352- ///Marker type for the `pinned` field
63536353- pub struct pinned(());
63546354 }
63556355}
63566356···64636463impl<'a, S> SavedFeedBuilder<'a, S>
64646464where
64656465 S: saved_feed_state::State,
64666466- S::Id: saved_feed_state::IsSet,
64676467- S::Type: saved_feed_state::IsSet,
64686466 S::Value: saved_feed_state::IsSet,
64676467+ S::Id: saved_feed_state::IsSet,
64696468 S::Pinned: saved_feed_state::IsSet,
64696469+ S::Type: saved_feed_state::IsSet,
64706470{
64716471 /// Build the final struct
64726472 pub fn build(self) -> SavedFeed<'a> {
···65436543 }
65446544 /// State trait tracking which required fields have been set
65456545 pub trait State: sealed::Sealed {
65466546- type Pinned;
65476546 type Saved;
65476547+ type Pinned;
65486548 }
65496549 /// Empty state - all required fields are unset
65506550 pub struct Empty(());
65516551 impl sealed::Sealed for Empty {}
65526552 impl State for Empty {
65536553+ type Saved = Unset;
65536554 type Pinned = Unset;
65546554- type Saved = Unset;
65556555+ }
65566556+ ///State transition - sets the `saved` field to Set
65576557+ pub struct SetSaved<S: State = Empty>(PhantomData<fn() -> S>);
65586558+ impl<S: State> sealed::Sealed for SetSaved<S> {}
65596559+ impl<S: State> State for SetSaved<S> {
65606560+ type Saved = Set<members::saved>;
65616561+ type Pinned = S::Pinned;
65556562 }
65566563 ///State transition - sets the `pinned` field to Set
65576564 pub struct SetPinned<S: State = Empty>(PhantomData<fn() -> S>);
65586565 impl<S: State> sealed::Sealed for SetPinned<S> {}
65596566 impl<S: State> State for SetPinned<S> {
65606560- type Pinned = Set<members::pinned>;
65616567 type Saved = S::Saved;
65626562- }
65636563- ///State transition - sets the `saved` field to Set
65646564- pub struct SetSaved<S: State = Empty>(PhantomData<fn() -> S>);
65656565- impl<S: State> sealed::Sealed for SetSaved<S> {}
65666566- impl<S: State> State for SetSaved<S> {
65676567- type Pinned = S::Pinned;
65686568- type Saved = Set<members::saved>;
65686568+ type Pinned = Set<members::pinned>;
65696569 }
65706570 /// Marker types for field names
65716571 #[allow(non_camel_case_types)]
65726572 pub mod members {
65736573+ ///Marker type for the `saved` field
65746574+ pub struct saved(());
65736575 ///Marker type for the `pinned` field
65746576 pub struct pinned(());
65756575- ///Marker type for the `saved` field
65766576- pub struct saved(());
65776577 }
65786578}
65796579···66606660impl<'a, S> SavedFeedsPrefBuilder<'a, S>
66616661where
66626662 S: saved_feeds_pref_state::State,
66636663- S::Pinned: saved_feeds_pref_state::IsSet,
66646663 S::Saved: saved_feeds_pref_state::IsSet,
66646664+ S::Pinned: saved_feeds_pref_state::IsSet,
66656665{
66666666 /// Build the final struct
66676667 pub fn build(self) -> SavedFeedsPref<'a> {
···68836883 }
68846884 /// State trait tracking which required fields have been set
68856885 pub trait State: sealed::Sealed {
68866886- type Status;
68876886 type Record;
68876887+ type Status;
68886888 }
68896889 /// Empty state - all required fields are unset
68906890 pub struct Empty(());
68916891 impl sealed::Sealed for Empty {}
68926892 impl State for Empty {
68936893+ type Record = Unset;
68936894 type Status = Unset;
68946894- type Record = Unset;
68956895+ }
68966896+ ///State transition - sets the `record` field to Set
68976897+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
68986898+ impl<S: State> sealed::Sealed for SetRecord<S> {}
68996899+ impl<S: State> State for SetRecord<S> {
69006900+ type Record = Set<members::record>;
69016901+ type Status = S::Status;
68956902 }
68966903 ///State transition - sets the `status` field to Set
68976904 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
68986905 impl<S: State> sealed::Sealed for SetStatus<S> {}
68996906 impl<S: State> State for SetStatus<S> {
69006900- type Status = Set<members::status>;
69016907 type Record = S::Record;
69026902- }
69036903- ///State transition - sets the `record` field to Set
69046904- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
69056905- impl<S: State> sealed::Sealed for SetRecord<S> {}
69066906- impl<S: State> State for SetRecord<S> {
69076907- type Status = S::Status;
69086908- type Record = Set<members::record>;
69086908+ type Status = Set<members::status>;
69096909 }
69106910 /// Marker types for field names
69116911 #[allow(non_camel_case_types)]
69126912 pub mod members {
69136913+ ///Marker type for the `record` field
69146914+ pub struct record(());
69136915 ///Marker type for the `status` field
69146916 pub struct status(());
69156915- ///Marker type for the `record` field
69166916- pub struct record(());
69176917 }
69186918}
69196919···70407040impl<'a, S> StatusViewBuilder<'a, S>
70417041where
70427042 S: status_view_state::State,
70437043- S::Status: status_view_state::IsSet,
70447043 S::Record: status_view_state::IsSet,
70447044+ S::Status: status_view_state::IsSet,
70457045{
70467046 /// Build the final struct
70477047 pub fn build(self) -> StatusView<'a> {
···71967196 }
71977197 /// State trait tracking which required fields have been set
71987198 pub trait State: sealed::Sealed {
71997199- type Verifications;
72007199 type VerifiedStatus;
72007200+ type Verifications;
72017201 type TrustedVerifierStatus;
72027202 }
72037203 /// Empty state - all required fields are unset
72047204 pub struct Empty(());
72057205 impl sealed::Sealed for Empty {}
72067206 impl State for Empty {
72077207- type Verifications = Unset;
72087207 type VerifiedStatus = Unset;
72087208+ type Verifications = Unset;
72097209 type TrustedVerifierStatus = Unset;
72107210 }
72117211- ///State transition - sets the `verifications` field to Set
72127212- pub struct SetVerifications<S: State = Empty>(PhantomData<fn() -> S>);
72137213- impl<S: State> sealed::Sealed for SetVerifications<S> {}
72147214- impl<S: State> State for SetVerifications<S> {
72157215- type Verifications = Set<members::verifications>;
72167216- type VerifiedStatus = S::VerifiedStatus;
72177217- type TrustedVerifierStatus = S::TrustedVerifierStatus;
72187218- }
72197211 ///State transition - sets the `verified_status` field to Set
72207212 pub struct SetVerifiedStatus<S: State = Empty>(PhantomData<fn() -> S>);
72217213 impl<S: State> sealed::Sealed for SetVerifiedStatus<S> {}
72227214 impl<S: State> State for SetVerifiedStatus<S> {
72237223- type Verifications = S::Verifications;
72247215 type VerifiedStatus = Set<members::verified_status>;
72167216+ type Verifications = S::Verifications;
72177217+ type TrustedVerifierStatus = S::TrustedVerifierStatus;
72187218+ }
72197219+ ///State transition - sets the `verifications` field to Set
72207220+ pub struct SetVerifications<S: State = Empty>(PhantomData<fn() -> S>);
72217221+ impl<S: State> sealed::Sealed for SetVerifications<S> {}
72227222+ impl<S: State> State for SetVerifications<S> {
72237223+ type VerifiedStatus = S::VerifiedStatus;
72247224+ type Verifications = Set<members::verifications>;
72257225 type TrustedVerifierStatus = S::TrustedVerifierStatus;
72267226 }
72277227 ///State transition - sets the `trusted_verifier_status` field to Set
72287228 pub struct SetTrustedVerifierStatus<S: State = Empty>(PhantomData<fn() -> S>);
72297229 impl<S: State> sealed::Sealed for SetTrustedVerifierStatus<S> {}
72307230 impl<S: State> State for SetTrustedVerifierStatus<S> {
72317231+ type VerifiedStatus = S::VerifiedStatus;
72317232 type Verifications = S::Verifications;
72327232- type VerifiedStatus = S::VerifiedStatus;
72337233 type TrustedVerifierStatus = Set<members::trusted_verifier_status>;
72347234 }
72357235 /// Marker types for field names
72367236 #[allow(non_camel_case_types)]
72377237 pub mod members {
72387238+ ///Marker type for the `verified_status` field
72397239+ pub struct verified_status(());
72387240 ///Marker type for the `verifications` field
72397241 pub struct verifications(());
72407240- ///Marker type for the `verified_status` field
72417241- pub struct verified_status(());
72427242 ///Marker type for the `trusted_verifier_status` field
72437243 pub struct trusted_verifier_status(());
72447244 }
···73367336impl<'a, S> VerificationStateBuilder<'a, S>
73377337where
73387338 S: verification_state_state::State,
73397339- S::Verifications: verification_state_state::IsSet,
73407339 S::VerifiedStatus: verification_state_state::IsSet,
73407340+ S::Verifications: verification_state_state::IsSet,
73417341 S::TrustedVerifierStatus: verification_state_state::IsSet,
73427342{
73437343 /// Build the final struct
+13-13
crates/weaver-api/src/app_bsky/actor/status.rs
···5959 }
6060 /// State trait tracking which required fields have been set
6161 pub trait State: sealed::Sealed {
6262- type Status;
6362 type CreatedAt;
6363+ type Status;
6464 }
6565 /// Empty state - all required fields are unset
6666 pub struct Empty(());
6767 impl sealed::Sealed for Empty {}
6868 impl State for Empty {
6969- type Status = Unset;
7069 type CreatedAt = Unset;
7171- }
7272- ///State transition - sets the `status` field to Set
7373- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
7474- impl<S: State> sealed::Sealed for SetStatus<S> {}
7575- impl<S: State> State for SetStatus<S> {
7676- type Status = Set<members::status>;
7777- type CreatedAt = S::CreatedAt;
7070+ type Status = Unset;
7871 }
7972 ///State transition - sets the `created_at` field to Set
8073 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
8174 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
8275 impl<S: State> State for SetCreatedAt<S> {
8383- type Status = S::Status;
8476 type CreatedAt = Set<members::created_at>;
7777+ type Status = S::Status;
7878+ }
7979+ ///State transition - sets the `status` field to Set
8080+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
8181+ impl<S: State> sealed::Sealed for SetStatus<S> {}
8282+ impl<S: State> State for SetStatus<S> {
8383+ type CreatedAt = S::CreatedAt;
8484+ type Status = Set<members::status>;
8585 }
8686 /// Marker types for field names
8787 #[allow(non_camel_case_types)]
8888 pub mod members {
8989- ///Marker type for the `status` field
9090- pub struct status(());
9189 ///Marker type for the `created_at` field
9290 pub struct created_at(());
9191+ ///Marker type for the `status` field
9292+ pub struct status(());
9393 }
9494}
9595···196196impl<'a, S> StatusBuilder<'a, S>
197197where
198198 S: status_state::State,
199199- S::Status: status_state::IsSet,
200199 S::CreatedAt: status_state::IsSet,
200200+ S::Status: status_state::IsSet,
201201{
202202 /// Build the final struct
203203 pub fn build(self) -> Status<'a> {
+113-113
crates/weaver-api/src/app_bsky/ageassurance.rs
···11111111 }
11121112 /// State trait tracking which required fields have been set
11131113 pub trait State: sealed::Sealed {
11141114- type CountryCode;
11151114 type Rules;
11151115+ type CountryCode;
11161116 }
11171117 /// Empty state - all required fields are unset
11181118 pub struct Empty(());
11191119 impl sealed::Sealed for Empty {}
11201120 impl State for Empty {
11211121- type CountryCode = Unset;
11221121 type Rules = Unset;
11231123- }
11241124- ///State transition - sets the `country_code` field to Set
11251125- pub struct SetCountryCode<S: State = Empty>(PhantomData<fn() -> S>);
11261126- impl<S: State> sealed::Sealed for SetCountryCode<S> {}
11271127- impl<S: State> State for SetCountryCode<S> {
11281128- type CountryCode = Set<members::country_code>;
11291129- type Rules = S::Rules;
11221122+ type CountryCode = Unset;
11301123 }
11311124 ///State transition - sets the `rules` field to Set
11321125 pub struct SetRules<S: State = Empty>(PhantomData<fn() -> S>);
11331126 impl<S: State> sealed::Sealed for SetRules<S> {}
11341127 impl<S: State> State for SetRules<S> {
11351135- type CountryCode = S::CountryCode;
11361128 type Rules = Set<members::rules>;
11291129+ type CountryCode = S::CountryCode;
11301130+ }
11311131+ ///State transition - sets the `country_code` field to Set
11321132+ pub struct SetCountryCode<S: State = Empty>(PhantomData<fn() -> S>);
11331133+ impl<S: State> sealed::Sealed for SetCountryCode<S> {}
11341134+ impl<S: State> State for SetCountryCode<S> {
11351135+ type Rules = S::Rules;
11361136+ type CountryCode = Set<members::country_code>;
11371137 }
11381138 /// Marker types for field names
11391139 #[allow(non_camel_case_types)]
11401140 pub mod members {
11411141- ///Marker type for the `country_code` field
11421142- pub struct country_code(());
11431141 ///Marker type for the `rules` field
11441142 pub struct rules(());
11431143+ ///Marker type for the `country_code` field
11441144+ pub struct country_code(());
11451145 }
11461146}
11471147···12341234impl<'a, S> ConfigRegionBuilder<'a, S>
12351235where
12361236 S: config_region_state::State,
12371237- S::CountryCode: config_region_state::IsSet,
12381237 S::Rules: config_region_state::IsSet,
12381238+ S::CountryCode: config_region_state::IsSet,
12391239{
12401240 /// Build the final struct
12411241 pub fn build(self) -> ConfigRegion<'a> {
···18881888 }
18891889 /// State trait tracking which required fields have been set
18901890 pub trait State: sealed::Sealed {
18911891- type Age;
18921891 type Access;
18921892+ type Age;
18931893 }
18941894 /// Empty state - all required fields are unset
18951895 pub struct Empty(());
18961896 impl sealed::Sealed for Empty {}
18971897 impl State for Empty {
18981898- type Age = Unset;
18991898 type Access = Unset;
18991899+ type Age = Unset;
19001900+ }
19011901+ ///State transition - sets the `access` field to Set
19021902+ pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
19031903+ impl<S: State> sealed::Sealed for SetAccess<S> {}
19041904+ impl<S: State> State for SetAccess<S> {
19051905+ type Access = Set<members::access>;
19061906+ type Age = S::Age;
19001907 }
19011908 ///State transition - sets the `age` field to Set
19021909 pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
19031910 impl<S: State> sealed::Sealed for SetAge<S> {}
19041911 impl<S: State> State for SetAge<S> {
19051905- type Age = Set<members::age>;
19061912 type Access = S::Access;
19071907- }
19081908- ///State transition - sets the `access` field to Set
19091909- pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
19101910- impl<S: State> sealed::Sealed for SetAccess<S> {}
19111911- impl<S: State> State for SetAccess<S> {
19121912- type Age = S::Age;
19131913- type Access = Set<members::access>;
19131913+ type Age = Set<members::age>;
19141914 }
19151915 /// Marker types for field names
19161916 #[allow(non_camel_case_types)]
19171917 pub mod members {
19181918+ ///Marker type for the `access` field
19191919+ pub struct access(());
19181920 ///Marker type for the `age` field
19191921 pub struct age(());
19201920- ///Marker type for the `access` field
19211921- pub struct access(());
19221922 }
19231923}
19241924···20082008impl<'a, S> ConfigRegionRuleIfAssuredOverAgeBuilder<'a, S>
20092009where
20102010 S: config_region_rule_if_assured_over_age_state::State,
20112011- S::Age: config_region_rule_if_assured_over_age_state::IsSet,
20122011 S::Access: config_region_rule_if_assured_over_age_state::IsSet,
20122012+ S::Age: config_region_rule_if_assured_over_age_state::IsSet,
20132013{
20142014 /// Build the final struct
20152015 pub fn build(self) -> ConfigRegionRuleIfAssuredOverAge<'a> {
···20822082 }
20832083 /// State trait tracking which required fields have been set
20842084 pub trait State: sealed::Sealed {
20852085- type Age;
20862085 type Access;
20862086+ type Age;
20872087 }
20882088 /// Empty state - all required fields are unset
20892089 pub struct Empty(());
20902090 impl sealed::Sealed for Empty {}
20912091 impl State for Empty {
20922092+ type Access = Unset;
20922093 type Age = Unset;
20932093- type Access = Unset;
20942094+ }
20952095+ ///State transition - sets the `access` field to Set
20962096+ pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
20972097+ impl<S: State> sealed::Sealed for SetAccess<S> {}
20982098+ impl<S: State> State for SetAccess<S> {
20992099+ type Access = Set<members::access>;
21002100+ type Age = S::Age;
20942101 }
20952102 ///State transition - sets the `age` field to Set
20962103 pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
20972104 impl<S: State> sealed::Sealed for SetAge<S> {}
20982105 impl<S: State> State for SetAge<S> {
20992099- type Age = Set<members::age>;
21002106 type Access = S::Access;
21012101- }
21022102- ///State transition - sets the `access` field to Set
21032103- pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
21042104- impl<S: State> sealed::Sealed for SetAccess<S> {}
21052105- impl<S: State> State for SetAccess<S> {
21062106- type Age = S::Age;
21072107- type Access = Set<members::access>;
21072107+ type Age = Set<members::age>;
21082108 }
21092109 /// Marker types for field names
21102110 #[allow(non_camel_case_types)]
21112111 pub mod members {
21122112+ ///Marker type for the `access` field
21132113+ pub struct access(());
21122114 ///Marker type for the `age` field
21132115 pub struct age(());
21142114- ///Marker type for the `access` field
21152115- pub struct access(());
21162116 }
21172117}
21182118···22022202impl<'a, S> ConfigRegionRuleIfAssuredUnderAgeBuilder<'a, S>
22032203where
22042204 S: config_region_rule_if_assured_under_age_state::State,
22052205- S::Age: config_region_rule_if_assured_under_age_state::IsSet,
22062205 S::Access: config_region_rule_if_assured_under_age_state::IsSet,
22062206+ S::Age: config_region_rule_if_assured_under_age_state::IsSet,
22072207{
22082208 /// Build the final struct
22092209 pub fn build(self) -> ConfigRegionRuleIfAssuredUnderAge<'a> {
···22762276 }
22772277 /// State trait tracking which required fields have been set
22782278 pub trait State: sealed::Sealed {
22792279- type Age;
22802279 type Access;
22802280+ type Age;
22812281 }
22822282 /// Empty state - all required fields are unset
22832283 pub struct Empty(());
22842284 impl sealed::Sealed for Empty {}
22852285 impl State for Empty {
22862286- type Age = Unset;
22872286 type Access = Unset;
22882288- }
22892289- ///State transition - sets the `age` field to Set
22902290- pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
22912291- impl<S: State> sealed::Sealed for SetAge<S> {}
22922292- impl<S: State> State for SetAge<S> {
22932293- type Age = Set<members::age>;
22942294- type Access = S::Access;
22872287+ type Age = Unset;
22952288 }
22962289 ///State transition - sets the `access` field to Set
22972290 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
22982291 impl<S: State> sealed::Sealed for SetAccess<S> {}
22992292 impl<S: State> State for SetAccess<S> {
23002300- type Age = S::Age;
23012293 type Access = Set<members::access>;
22942294+ type Age = S::Age;
22952295+ }
22962296+ ///State transition - sets the `age` field to Set
22972297+ pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
22982298+ impl<S: State> sealed::Sealed for SetAge<S> {}
22992299+ impl<S: State> State for SetAge<S> {
23002300+ type Access = S::Access;
23012301+ type Age = Set<members::age>;
23022302 }
23032303 /// Marker types for field names
23042304 #[allow(non_camel_case_types)]
23052305 pub mod members {
23062306- ///Marker type for the `age` field
23072307- pub struct age(());
23082306 ///Marker type for the `access` field
23092307 pub struct access(());
23082308+ ///Marker type for the `age` field
23092309+ pub struct age(());
23102310 }
23112311}
23122312···23962396impl<'a, S> ConfigRegionRuleIfDeclaredOverAgeBuilder<'a, S>
23972397where
23982398 S: config_region_rule_if_declared_over_age_state::State,
23992399- S::Age: config_region_rule_if_declared_over_age_state::IsSet,
24002399 S::Access: config_region_rule_if_declared_over_age_state::IsSet,
24002400+ S::Age: config_region_rule_if_declared_over_age_state::IsSet,
24012401{
24022402 /// Build the final struct
24032403 pub fn build(self) -> ConfigRegionRuleIfDeclaredOverAge<'a> {
···24702470 }
24712471 /// State trait tracking which required fields have been set
24722472 pub trait State: sealed::Sealed {
24732473- type Age;
24742473 type Access;
24742474+ type Age;
24752475 }
24762476 /// Empty state - all required fields are unset
24772477 pub struct Empty(());
24782478 impl sealed::Sealed for Empty {}
24792479 impl State for Empty {
24802480- type Age = Unset;
24812480 type Access = Unset;
24822482- }
24832483- ///State transition - sets the `age` field to Set
24842484- pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
24852485- impl<S: State> sealed::Sealed for SetAge<S> {}
24862486- impl<S: State> State for SetAge<S> {
24872487- type Age = Set<members::age>;
24882488- type Access = S::Access;
24812481+ type Age = Unset;
24892482 }
24902483 ///State transition - sets the `access` field to Set
24912484 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
24922485 impl<S: State> sealed::Sealed for SetAccess<S> {}
24932486 impl<S: State> State for SetAccess<S> {
24872487+ type Access = Set<members::access>;
24942488 type Age = S::Age;
24952495- type Access = Set<members::access>;
24892489+ }
24902490+ ///State transition - sets the `age` field to Set
24912491+ pub struct SetAge<S: State = Empty>(PhantomData<fn() -> S>);
24922492+ impl<S: State> sealed::Sealed for SetAge<S> {}
24932493+ impl<S: State> State for SetAge<S> {
24942494+ type Access = S::Access;
24952495+ type Age = Set<members::age>;
24962496 }
24972497 /// Marker types for field names
24982498 #[allow(non_camel_case_types)]
24992499 pub mod members {
25002500+ ///Marker type for the `access` field
25012501+ pub struct access(());
25002502 ///Marker type for the `age` field
25012503 pub struct age(());
25022502- ///Marker type for the `access` field
25032503- pub struct access(());
25042504 }
25052505}
25062506···25902590impl<'a, S> ConfigRegionRuleIfDeclaredUnderAgeBuilder<'a, S>
25912591where
25922592 S: config_region_rule_if_declared_under_age_state::State,
25932593- S::Age: config_region_rule_if_declared_under_age_state::IsSet,
25942593 S::Access: config_region_rule_if_declared_under_age_state::IsSet,
25942594+ S::Age: config_region_rule_if_declared_under_age_state::IsSet,
25952595{
25962596 /// Build the final struct
25972597 pub fn build(self) -> ConfigRegionRuleIfDeclaredUnderAge<'a> {
···26982698 }
26992699 /// State trait tracking which required fields have been set
27002700 pub trait State: sealed::Sealed {
27012701- type CreatedAt;
27022701 type Status;
27022702+ type AttemptId;
27032703 type Access;
27042704- type AttemptId;
27052704 type CountryCode;
27052705+ type CreatedAt;
27062706 }
27072707 /// Empty state - all required fields are unset
27082708 pub struct Empty(());
27092709 impl sealed::Sealed for Empty {}
27102710 impl State for Empty {
27112711- type CreatedAt = Unset;
27122711 type Status = Unset;
27132713- type Access = Unset;
27142712 type AttemptId = Unset;
27132713+ type Access = Unset;
27152714 type CountryCode = Unset;
27162716- }
27172717- ///State transition - sets the `created_at` field to Set
27182718- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
27192719- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
27202720- impl<S: State> State for SetCreatedAt<S> {
27212721- type CreatedAt = Set<members::created_at>;
27222722- type Status = S::Status;
27232723- type Access = S::Access;
27242724- type AttemptId = S::AttemptId;
27252725- type CountryCode = S::CountryCode;
27152715+ type CreatedAt = Unset;
27262716 }
27272717 ///State transition - sets the `status` field to Set
27282718 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
27292719 impl<S: State> sealed::Sealed for SetStatus<S> {}
27302720 impl<S: State> State for SetStatus<S> {
27312731- type CreatedAt = S::CreatedAt;
27322721 type Status = Set<members::status>;
27332733- type Access = S::Access;
27342722 type AttemptId = S::AttemptId;
27232723+ type Access = S::Access;
27352724 type CountryCode = S::CountryCode;
27252725+ type CreatedAt = S::CreatedAt;
27262726+ }
27272727+ ///State transition - sets the `attempt_id` field to Set
27282728+ pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
27292729+ impl<S: State> sealed::Sealed for SetAttemptId<S> {}
27302730+ impl<S: State> State for SetAttemptId<S> {
27312731+ type Status = S::Status;
27322732+ type AttemptId = Set<members::attempt_id>;
27332733+ type Access = S::Access;
27342734+ type CountryCode = S::CountryCode;
27352735+ type CreatedAt = S::CreatedAt;
27362736 }
27372737 ///State transition - sets the `access` field to Set
27382738 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
27392739 impl<S: State> sealed::Sealed for SetAccess<S> {}
27402740 impl<S: State> State for SetAccess<S> {
27412741- type CreatedAt = S::CreatedAt;
27422741 type Status = S::Status;
27432743- type Access = Set<members::access>;
27442742 type AttemptId = S::AttemptId;
27432743+ type Access = Set<members::access>;
27452744 type CountryCode = S::CountryCode;
27462746- }
27472747- ///State transition - sets the `attempt_id` field to Set
27482748- pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
27492749- impl<S: State> sealed::Sealed for SetAttemptId<S> {}
27502750- impl<S: State> State for SetAttemptId<S> {
27512745 type CreatedAt = S::CreatedAt;
27522752- type Status = S::Status;
27532753- type Access = S::Access;
27542754- type AttemptId = Set<members::attempt_id>;
27552755- type CountryCode = S::CountryCode;
27562746 }
27572747 ///State transition - sets the `country_code` field to Set
27582748 pub struct SetCountryCode<S: State = Empty>(PhantomData<fn() -> S>);
27592749 impl<S: State> sealed::Sealed for SetCountryCode<S> {}
27602750 impl<S: State> State for SetCountryCode<S> {
27612761- type CreatedAt = S::CreatedAt;
27622751 type Status = S::Status;
27522752+ type AttemptId = S::AttemptId;
27632753 type Access = S::Access;
27642764- type AttemptId = S::AttemptId;
27652754 type CountryCode = Set<members::country_code>;
27552755+ type CreatedAt = S::CreatedAt;
27562756+ }
27572757+ ///State transition - sets the `created_at` field to Set
27582758+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
27592759+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
27602760+ impl<S: State> State for SetCreatedAt<S> {
27612761+ type Status = S::Status;
27622762+ type AttemptId = S::AttemptId;
27632763+ type Access = S::Access;
27642764+ type CountryCode = S::CountryCode;
27652765+ type CreatedAt = Set<members::created_at>;
27662766 }
27672767 /// Marker types for field names
27682768 #[allow(non_camel_case_types)]
27692769 pub mod members {
27702770- ///Marker type for the `created_at` field
27712771- pub struct created_at(());
27722770 ///Marker type for the `status` field
27732771 pub struct status(());
27742774- ///Marker type for the `access` field
27752775- pub struct access(());
27762772 ///Marker type for the `attempt_id` field
27772773 pub struct attempt_id(());
27742774+ ///Marker type for the `access` field
27752775+ pub struct access(());
27782776 ///Marker type for the `country_code` field
27792777 pub struct country_code(());
27782778+ ///Marker type for the `created_at` field
27792779+ pub struct created_at(());
27802780 }
27812781}
27822782···30323032impl<'a, S> EventBuilder<'a, S>
30333033where
30343034 S: event_state::State,
30353035- S::CreatedAt: event_state::IsSet,
30363035 S::Status: event_state::IsSet,
30373037- S::Access: event_state::IsSet,
30383036 S::AttemptId: event_state::IsSet,
30373037+ S::Access: event_state::IsSet,
30393038 S::CountryCode: event_state::IsSet,
30393039+ S::CreatedAt: event_state::IsSet,
30403040{
30413041 /// Build the final struct
30423042 pub fn build(self) -> Event<'a> {
···31293129 }
31303130 /// State trait tracking which required fields have been set
31313131 pub trait State: sealed::Sealed {
31323132- type Status;
31333132 type Access;
31333133+ type Status;
31343134 }
31353135 /// Empty state - all required fields are unset
31363136 pub struct Empty(());
31373137 impl sealed::Sealed for Empty {}
31383138 impl State for Empty {
31393139- type Status = Unset;
31403139 type Access = Unset;
31413141- }
31423142- ///State transition - sets the `status` field to Set
31433143- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
31443144- impl<S: State> sealed::Sealed for SetStatus<S> {}
31453145- impl<S: State> State for SetStatus<S> {
31463146- type Status = Set<members::status>;
31473147- type Access = S::Access;
31403140+ type Status = Unset;
31483141 }
31493142 ///State transition - sets the `access` field to Set
31503143 pub struct SetAccess<S: State = Empty>(PhantomData<fn() -> S>);
31513144 impl<S: State> sealed::Sealed for SetAccess<S> {}
31523145 impl<S: State> State for SetAccess<S> {
31533153- type Status = S::Status;
31543146 type Access = Set<members::access>;
31473147+ type Status = S::Status;
31483148+ }
31493149+ ///State transition - sets the `status` field to Set
31503150+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
31513151+ impl<S: State> sealed::Sealed for SetStatus<S> {}
31523152+ impl<S: State> State for SetStatus<S> {
31533153+ type Access = S::Access;
31543154+ type Status = Set<members::status>;
31553155 }
31563156 /// Marker types for field names
31573157 #[allow(non_camel_case_types)]
31583158 pub mod members {
31593159- ///Marker type for the `status` field
31603160- pub struct status(());
31613159 ///Marker type for the `access` field
31623160 pub struct access(());
31613161+ ///Marker type for the `status` field
31623162+ pub struct status(());
31633163 }
31643164}
31653165···32523252impl<'a, S> StateBuilder<'a, S>
32533253where
32543254 S: state_state::State,
32553255- S::Status: state_state::IsSet,
32563255 S::Access: state_state::IsSet,
32563256+ S::Status: state_state::IsSet,
32573257{
32583258 /// Build the final struct
32593259 pub fn build(self) -> State<'a> {
+30-30
crates/weaver-api/src/app_bsky/embed/external.rs
···3838 }
3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141- type Uri;
4241 type Title;
4342 type Description;
4343+ type Uri;
4444 }
4545 /// Empty state - all required fields are unset
4646 pub struct Empty(());
4747 impl sealed::Sealed for Empty {}
4848 impl State for Empty {
4949- type Uri = Unset;
5049 type Title = Unset;
5150 type Description = Unset;
5252- }
5353- ///State transition - sets the `uri` field to Set
5454- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
5555- impl<S: State> sealed::Sealed for SetUri<S> {}
5656- impl<S: State> State for SetUri<S> {
5757- type Uri = Set<members::uri>;
5858- type Title = S::Title;
5959- type Description = S::Description;
5151+ type Uri = Unset;
6052 }
6153 ///State transition - sets the `title` field to Set
6254 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
6355 impl<S: State> sealed::Sealed for SetTitle<S> {}
6456 impl<S: State> State for SetTitle<S> {
6565- type Uri = S::Uri;
6657 type Title = Set<members::title>;
6758 type Description = S::Description;
5959+ type Uri = S::Uri;
6860 }
6961 ///State transition - sets the `description` field to Set
7062 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
7163 impl<S: State> sealed::Sealed for SetDescription<S> {}
7264 impl<S: State> State for SetDescription<S> {
7373- type Uri = S::Uri;
7465 type Title = S::Title;
7566 type Description = Set<members::description>;
6767+ type Uri = S::Uri;
6868+ }
6969+ ///State transition - sets the `uri` field to Set
7070+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
7171+ impl<S: State> sealed::Sealed for SetUri<S> {}
7272+ impl<S: State> State for SetUri<S> {
7373+ type Title = S::Title;
7474+ type Description = S::Description;
7575+ type Uri = Set<members::uri>;
7676 }
7777 /// Marker types for field names
7878 #[allow(non_camel_case_types)]
7979 pub mod members {
8080- ///Marker type for the `uri` field
8181- pub struct uri(());
8280 ///Marker type for the `title` field
8381 pub struct title(());
8482 ///Marker type for the `description` field
8583 pub struct description(());
8484+ ///Marker type for the `uri` field
8585+ pub struct uri(());
8686 }
8787}
8888···195195impl<'a, S> ExternalBuilder<'a, S>
196196where
197197 S: external_state::State,
198198- S::Uri: external_state::IsSet,
199198 S::Title: external_state::IsSet,
200199 S::Description: external_state::IsSet,
200200+ S::Uri: external_state::IsSet,
201201{
202202 /// Build the final struct
203203 pub fn build(self) -> External<'a> {
···785785 /// State trait tracking which required fields have been set
786786 pub trait State: sealed::Sealed {
787787 type Uri;
788788- type Title;
789788 type Description;
789789+ type Title;
790790 }
791791 /// Empty state - all required fields are unset
792792 pub struct Empty(());
793793 impl sealed::Sealed for Empty {}
794794 impl State for Empty {
795795 type Uri = Unset;
796796- type Title = Unset;
797796 type Description = Unset;
797797+ type Title = Unset;
798798 }
799799 ///State transition - sets the `uri` field to Set
800800 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
801801 impl<S: State> sealed::Sealed for SetUri<S> {}
802802 impl<S: State> State for SetUri<S> {
803803 type Uri = Set<members::uri>;
804804- type Title = S::Title;
805804 type Description = S::Description;
806806- }
807807- ///State transition - sets the `title` field to Set
808808- pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
809809- impl<S: State> sealed::Sealed for SetTitle<S> {}
810810- impl<S: State> State for SetTitle<S> {
811811- type Uri = S::Uri;
812812- type Title = Set<members::title>;
813813- type Description = S::Description;
805805+ type Title = S::Title;
814806 }
815807 ///State transition - sets the `description` field to Set
816808 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
817809 impl<S: State> sealed::Sealed for SetDescription<S> {}
818810 impl<S: State> State for SetDescription<S> {
819811 type Uri = S::Uri;
820820- type Title = S::Title;
821812 type Description = Set<members::description>;
813813+ type Title = S::Title;
814814+ }
815815+ ///State transition - sets the `title` field to Set
816816+ pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
817817+ impl<S: State> sealed::Sealed for SetTitle<S> {}
818818+ impl<S: State> State for SetTitle<S> {
819819+ type Uri = S::Uri;
820820+ type Description = S::Description;
821821+ type Title = Set<members::title>;
822822 }
823823 /// Marker types for field names
824824 #[allow(non_camel_case_types)]
825825 pub mod members {
826826 ///Marker type for the `uri` field
827827 pub struct uri(());
828828+ ///Marker type for the `description` field
829829+ pub struct description(());
828830 ///Marker type for the `title` field
829831 pub struct title(());
830830- ///Marker type for the `description` field
831831- pub struct description(());
832832 }
833833}
834834···942942where
943943 S: view_external_state::State,
944944 S::Uri: view_external_state::IsSet,
945945- S::Title: view_external_state::IsSet,
946945 S::Description: view_external_state::IsSet,
946946+ S::Title: view_external_state::IsSet,
947947{
948948 /// Build the final struct
949949 pub fn build(self) -> ViewExternal<'a> {
+15-15
crates/weaver-api/src/app_bsky/embed/images.rs
···760760 }
761761 /// State trait tracking which required fields have been set
762762 pub trait State: sealed::Sealed {
763763+ type Alt;
763764 type Thumb;
764765 type Fullsize;
765765- type Alt;
766766 }
767767 /// Empty state - all required fields are unset
768768 pub struct Empty(());
769769 impl sealed::Sealed for Empty {}
770770 impl State for Empty {
771771+ type Alt = Unset;
771772 type Thumb = Unset;
772773 type Fullsize = Unset;
773773- type Alt = Unset;
774774+ }
775775+ ///State transition - sets the `alt` field to Set
776776+ pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
777777+ impl<S: State> sealed::Sealed for SetAlt<S> {}
778778+ impl<S: State> State for SetAlt<S> {
779779+ type Alt = Set<members::alt>;
780780+ type Thumb = S::Thumb;
781781+ type Fullsize = S::Fullsize;
774782 }
775783 ///State transition - sets the `thumb` field to Set
776784 pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
777785 impl<S: State> sealed::Sealed for SetThumb<S> {}
778786 impl<S: State> State for SetThumb<S> {
787787+ type Alt = S::Alt;
779788 type Thumb = Set<members::thumb>;
780789 type Fullsize = S::Fullsize;
781781- type Alt = S::Alt;
782790 }
783791 ///State transition - sets the `fullsize` field to Set
784792 pub struct SetFullsize<S: State = Empty>(PhantomData<fn() -> S>);
785793 impl<S: State> sealed::Sealed for SetFullsize<S> {}
786794 impl<S: State> State for SetFullsize<S> {
787787- type Thumb = S::Thumb;
788788- type Fullsize = Set<members::fullsize>;
789795 type Alt = S::Alt;
790790- }
791791- ///State transition - sets the `alt` field to Set
792792- pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
793793- impl<S: State> sealed::Sealed for SetAlt<S> {}
794794- impl<S: State> State for SetAlt<S> {
795796 type Thumb = S::Thumb;
796796- type Fullsize = S::Fullsize;
797797- type Alt = Set<members::alt>;
797797+ type Fullsize = Set<members::fullsize>;
798798 }
799799 /// Marker types for field names
800800 #[allow(non_camel_case_types)]
801801 pub mod members {
802802+ ///Marker type for the `alt` field
803803+ pub struct alt(());
802804 ///Marker type for the `thumb` field
803805 pub struct thumb(());
804806 ///Marker type for the `fullsize` field
805807 pub struct fullsize(());
806806- ///Marker type for the `alt` field
807807- pub struct alt(());
808808 }
809809}
810810···917917impl<'a, S> ViewImageBuilder<'a, S>
918918where
919919 S: view_image_state::State,
920920+ S::Alt: view_image_state::IsSet,
920921 S::Thumb: view_image_state::IsSet,
921922 S::Fullsize: view_image_state::IsSet,
922922- S::Alt: view_image_state::IsSet,
923923{
924924 /// Build the final struct
925925 pub fn build(self) -> ViewImage<'a> {
+34-34
crates/weaver-api/src/app_bsky/embed/record.rs
···724724 /// State trait tracking which required fields have been set
725725 pub trait State: sealed::Sealed {
726726 type Uri;
727727- type Blocked;
728727 type Author;
728728+ type Blocked;
729729 }
730730 /// Empty state - all required fields are unset
731731 pub struct Empty(());
732732 impl sealed::Sealed for Empty {}
733733 impl State for Empty {
734734 type Uri = Unset;
735735- type Blocked = Unset;
736735 type Author = Unset;
736736+ type Blocked = Unset;
737737 }
738738 ///State transition - sets the `uri` field to Set
739739 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
740740 impl<S: State> sealed::Sealed for SetUri<S> {}
741741 impl<S: State> State for SetUri<S> {
742742 type Uri = Set<members::uri>;
743743- type Blocked = S::Blocked;
744743 type Author = S::Author;
745745- }
746746- ///State transition - sets the `blocked` field to Set
747747- pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
748748- impl<S: State> sealed::Sealed for SetBlocked<S> {}
749749- impl<S: State> State for SetBlocked<S> {
750750- type Uri = S::Uri;
751751- type Blocked = Set<members::blocked>;
752752- type Author = S::Author;
744744+ type Blocked = S::Blocked;
753745 }
754746 ///State transition - sets the `author` field to Set
755747 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
756748 impl<S: State> sealed::Sealed for SetAuthor<S> {}
757749 impl<S: State> State for SetAuthor<S> {
758750 type Uri = S::Uri;
759759- type Blocked = S::Blocked;
760751 type Author = Set<members::author>;
752752+ type Blocked = S::Blocked;
753753+ }
754754+ ///State transition - sets the `blocked` field to Set
755755+ pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
756756+ impl<S: State> sealed::Sealed for SetBlocked<S> {}
757757+ impl<S: State> State for SetBlocked<S> {
758758+ type Uri = S::Uri;
759759+ type Author = S::Author;
760760+ type Blocked = Set<members::blocked>;
761761 }
762762 /// Marker types for field names
763763 #[allow(non_camel_case_types)]
764764 pub mod members {
765765 ///Marker type for the `uri` field
766766 pub struct uri(());
767767+ ///Marker type for the `author` field
768768+ pub struct author(());
767769 ///Marker type for the `blocked` field
768770 pub struct blocked(());
769769- ///Marker type for the `author` field
770770- pub struct author(());
771771 }
772772}
773773···861861where
862862 S: view_blocked_state::State,
863863 S::Uri: view_blocked_state::IsSet,
864864- S::Blocked: view_blocked_state::IsSet,
865864 S::Author: view_blocked_state::IsSet,
865865+ S::Blocked: view_blocked_state::IsSet,
866866{
867867 /// Build the final struct
868868 pub fn build(self) -> ViewBlocked<'a> {
···13051305 pub trait State: sealed::Sealed {
13061306 type Uri;
13071307 type Cid;
13081308- type Author;
13091308 type Value;
13091309+ type Author;
13101310 type IndexedAt;
13111311 }
13121312 /// Empty state - all required fields are unset
···13151315 impl State for Empty {
13161316 type Uri = Unset;
13171317 type Cid = Unset;
13181318- type Author = Unset;
13191318 type Value = Unset;
13191319+ type Author = Unset;
13201320 type IndexedAt = Unset;
13211321 }
13221322 ///State transition - sets the `uri` field to Set
···13251325 impl<S: State> State for SetUri<S> {
13261326 type Uri = Set<members::uri>;
13271327 type Cid = S::Cid;
13281328- type Author = S::Author;
13291328 type Value = S::Value;
13291329+ type Author = S::Author;
13301330 type IndexedAt = S::IndexedAt;
13311331 }
13321332 ///State transition - sets the `cid` field to Set
···13351335 impl<S: State> State for SetCid<S> {
13361336 type Uri = S::Uri;
13371337 type Cid = Set<members::cid>;
13381338- type Author = S::Author;
13391338 type Value = S::Value;
13401340- type IndexedAt = S::IndexedAt;
13411341- }
13421342- ///State transition - sets the `author` field to Set
13431343- pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
13441344- impl<S: State> sealed::Sealed for SetAuthor<S> {}
13451345- impl<S: State> State for SetAuthor<S> {
13461346- type Uri = S::Uri;
13471347- type Cid = S::Cid;
13481348- type Author = Set<members::author>;
13491349- type Value = S::Value;
13391339+ type Author = S::Author;
13501340 type IndexedAt = S::IndexedAt;
13511341 }
13521342 ///State transition - sets the `value` field to Set
···13551345 impl<S: State> State for SetValue<S> {
13561346 type Uri = S::Uri;
13571347 type Cid = S::Cid;
13581358- type Author = S::Author;
13591348 type Value = Set<members::value>;
13491349+ type Author = S::Author;
13501350+ type IndexedAt = S::IndexedAt;
13511351+ }
13521352+ ///State transition - sets the `author` field to Set
13531353+ pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
13541354+ impl<S: State> sealed::Sealed for SetAuthor<S> {}
13551355+ impl<S: State> State for SetAuthor<S> {
13561356+ type Uri = S::Uri;
13571357+ type Cid = S::Cid;
13581358+ type Value = S::Value;
13591359+ type Author = Set<members::author>;
13601360 type IndexedAt = S::IndexedAt;
13611361 }
13621362 ///State transition - sets the `indexed_at` field to Set
···13651365 impl<S: State> State for SetIndexedAt<S> {
13661366 type Uri = S::Uri;
13671367 type Cid = S::Cid;
13681368- type Author = S::Author;
13691368 type Value = S::Value;
13691369+ type Author = S::Author;
13701370 type IndexedAt = Set<members::indexed_at>;
13711371 }
13721372 /// Marker types for field names
···13761376 pub struct uri(());
13771377 ///Marker type for the `cid` field
13781378 pub struct cid(());
13791379+ ///Marker type for the `value` field
13801380+ pub struct value(());
13791381 ///Marker type for the `author` field
13801382 pub struct author(());
13811381- ///Marker type for the `value` field
13821382- pub struct value(());
13831383 ///Marker type for the `indexed_at` field
13841384 pub struct indexed_at(());
13851385 }
···16211621 S: view_record_state::State,
16221622 S::Uri: view_record_state::IsSet,
16231623 S::Cid: view_record_state::IsSet,
16241624- S::Author: view_record_state::IsSet,
16251624 S::Value: view_record_state::IsSet,
16251625+ S::Author: view_record_state::IsSet,
16261626 S::IndexedAt: view_record_state::IsSet,
16271627{
16281628 /// Build the final struct
+13-13
crates/weaver-api/src/app_bsky/embed/video.rs
···3232 }
3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535- type Lang;
3635 type File;
3636+ type Lang;
3737 }
3838 /// Empty state - all required fields are unset
3939 pub struct Empty(());
4040 impl sealed::Sealed for Empty {}
4141 impl State for Empty {
4242- type Lang = Unset;
4342 type File = Unset;
4444- }
4545- ///State transition - sets the `lang` field to Set
4646- pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetLang<S> {}
4848- impl<S: State> State for SetLang<S> {
4949- type Lang = Set<members::lang>;
5050- type File = S::File;
4343+ type Lang = Unset;
5144 }
5245 ///State transition - sets the `file` field to Set
5346 pub struct SetFile<S: State = Empty>(PhantomData<fn() -> S>);
5447 impl<S: State> sealed::Sealed for SetFile<S> {}
5548 impl<S: State> State for SetFile<S> {
5656- type Lang = S::Lang;
5749 type File = Set<members::file>;
5050+ type Lang = S::Lang;
5151+ }
5252+ ///State transition - sets the `lang` field to Set
5353+ pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetLang<S> {}
5555+ impl<S: State> State for SetLang<S> {
5656+ type File = S::File;
5757+ type Lang = Set<members::lang>;
5858 }
5959 /// Marker types for field names
6060 #[allow(non_camel_case_types)]
6161 pub mod members {
6262- ///Marker type for the `lang` field
6363- pub struct lang(());
6462 ///Marker type for the `file` field
6563 pub struct file(());
6464+ ///Marker type for the `lang` field
6565+ pub struct lang(());
6666 }
6767}
6868···135135impl<'a, S> CaptionBuilder<'a, S>
136136where
137137 S: caption_state::State,
138138- S::Lang: caption_state::IsSet,
139138 S::File: caption_state::IsSet,
139139+ S::Lang: caption_state::IsSet,
140140{
141141 /// Build the final struct
142142 pub fn build(self) -> Caption<'a> {
+97-97
crates/weaver-api/src/app_bsky/feed.rs
···16091609 }
16101610 /// State trait tracking which required fields have been set
16111611 pub trait State: sealed::Sealed {
16121612+ type Author;
16121613 type Uri;
16131614 type Blocked;
16141614- type Author;
16151615 }
16161616 /// Empty state - all required fields are unset
16171617 pub struct Empty(());
16181618 impl sealed::Sealed for Empty {}
16191619 impl State for Empty {
16201620+ type Author = Unset;
16201621 type Uri = Unset;
16211622 type Blocked = Unset;
16221622- type Author = Unset;
16231623+ }
16241624+ ///State transition - sets the `author` field to Set
16251625+ pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
16261626+ impl<S: State> sealed::Sealed for SetAuthor<S> {}
16271627+ impl<S: State> State for SetAuthor<S> {
16281628+ type Author = Set<members::author>;
16291629+ type Uri = S::Uri;
16301630+ type Blocked = S::Blocked;
16231631 }
16241632 ///State transition - sets the `uri` field to Set
16251633 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
16261634 impl<S: State> sealed::Sealed for SetUri<S> {}
16271635 impl<S: State> State for SetUri<S> {
16361636+ type Author = S::Author;
16281637 type Uri = Set<members::uri>;
16291638 type Blocked = S::Blocked;
16301630- type Author = S::Author;
16311639 }
16321640 ///State transition - sets the `blocked` field to Set
16331641 pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
16341642 impl<S: State> sealed::Sealed for SetBlocked<S> {}
16351643 impl<S: State> State for SetBlocked<S> {
16361636- type Uri = S::Uri;
16371637- type Blocked = Set<members::blocked>;
16381644 type Author = S::Author;
16391639- }
16401640- ///State transition - sets the `author` field to Set
16411641- pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
16421642- impl<S: State> sealed::Sealed for SetAuthor<S> {}
16431643- impl<S: State> State for SetAuthor<S> {
16441645 type Uri = S::Uri;
16451645- type Blocked = S::Blocked;
16461646- type Author = Set<members::author>;
16461646+ type Blocked = Set<members::blocked>;
16471647 }
16481648 /// Marker types for field names
16491649 #[allow(non_camel_case_types)]
16501650 pub mod members {
16511651+ ///Marker type for the `author` field
16521652+ pub struct author(());
16511653 ///Marker type for the `uri` field
16521654 pub struct uri(());
16531655 ///Marker type for the `blocked` field
16541656 pub struct blocked(());
16551655- ///Marker type for the `author` field
16561656- pub struct author(());
16571657 }
16581658}
16591659···17461746impl<'a, S> BlockedPostBuilder<'a, S>
17471747where
17481748 S: blocked_post_state::State,
17491749+ S::Author: blocked_post_state::IsSet,
17491750 S::Uri: blocked_post_state::IsSet,
17501751 S::Blocked: blocked_post_state::IsSet,
17511751- S::Author: blocked_post_state::IsSet,
17521752{
17531753 /// Build the final struct
17541754 pub fn build(self) -> BlockedPost<'a> {
···22352235 /// State trait tracking which required fields have been set
22362236 pub trait State: sealed::Sealed {
22372237 type Uri;
22382238+ type IndexedAt;
22392239+ type Creator;
22382240 type Cid;
22412241+ type DisplayName;
22392242 type Did;
22402240- type Creator;
22412241- type DisplayName;
22422242- type IndexedAt;
22432243 }
22442244 /// Empty state - all required fields are unset
22452245 pub struct Empty(());
22462246 impl sealed::Sealed for Empty {}
22472247 impl State for Empty {
22482248 type Uri = Unset;
22492249+ type IndexedAt = Unset;
22502250+ type Creator = Unset;
22492251 type Cid = Unset;
22522252+ type DisplayName = Unset;
22502253 type Did = Unset;
22512251- type Creator = Unset;
22522252- type DisplayName = Unset;
22532253- type IndexedAt = Unset;
22542254 }
22552255 ///State transition - sets the `uri` field to Set
22562256 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
22572257 impl<S: State> sealed::Sealed for SetUri<S> {}
22582258 impl<S: State> State for SetUri<S> {
22592259 type Uri = Set<members::uri>;
22602260- type Cid = S::Cid;
22612261- type Did = S::Did;
22602260+ type IndexedAt = S::IndexedAt;
22622261 type Creator = S::Creator;
22622262+ type Cid = S::Cid;
22632263 type DisplayName = S::DisplayName;
22642264- type IndexedAt = S::IndexedAt;
22642264+ type Did = S::Did;
22652265 }
22662266- ///State transition - sets the `cid` field to Set
22672267- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
22682268- impl<S: State> sealed::Sealed for SetCid<S> {}
22692269- impl<S: State> State for SetCid<S> {
22662266+ ///State transition - sets the `indexed_at` field to Set
22672267+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
22682268+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
22692269+ impl<S: State> State for SetIndexedAt<S> {
22702270 type Uri = S::Uri;
22712271- type Cid = Set<members::cid>;
22722272- type Did = S::Did;
22712271+ type IndexedAt = Set<members::indexed_at>;
22732272 type Creator = S::Creator;
22742274- type DisplayName = S::DisplayName;
22752275- type IndexedAt = S::IndexedAt;
22762276- }
22772277- ///State transition - sets the `did` field to Set
22782278- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
22792279- impl<S: State> sealed::Sealed for SetDid<S> {}
22802280- impl<S: State> State for SetDid<S> {
22812281- type Uri = S::Uri;
22822273 type Cid = S::Cid;
22832283- type Did = Set<members::did>;
22842284- type Creator = S::Creator;
22852274 type DisplayName = S::DisplayName;
22862286- type IndexedAt = S::IndexedAt;
22752275+ type Did = S::Did;
22872276 }
22882277 ///State transition - sets the `creator` field to Set
22892278 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
22902279 impl<S: State> sealed::Sealed for SetCreator<S> {}
22912280 impl<S: State> State for SetCreator<S> {
22922281 type Uri = S::Uri;
22822282+ type IndexedAt = S::IndexedAt;
22832283+ type Creator = Set<members::creator>;
22932284 type Cid = S::Cid;
22852285+ type DisplayName = S::DisplayName;
22942286 type Did = S::Did;
22952295- type Creator = Set<members::creator>;
22872287+ }
22882288+ ///State transition - sets the `cid` field to Set
22892289+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
22902290+ impl<S: State> sealed::Sealed for SetCid<S> {}
22912291+ impl<S: State> State for SetCid<S> {
22922292+ type Uri = S::Uri;
22932293+ type IndexedAt = S::IndexedAt;
22942294+ type Creator = S::Creator;
22952295+ type Cid = Set<members::cid>;
22962296 type DisplayName = S::DisplayName;
22972297- type IndexedAt = S::IndexedAt;
22972297+ type Did = S::Did;
22982298 }
22992299 ///State transition - sets the `display_name` field to Set
23002300 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
23012301 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
23022302 impl<S: State> State for SetDisplayName<S> {
23032303 type Uri = S::Uri;
23042304- type Cid = S::Cid;
23052305- type Did = S::Did;
23042304+ type IndexedAt = S::IndexedAt;
23062305 type Creator = S::Creator;
23062306+ type Cid = S::Cid;
23072307 type DisplayName = Set<members::display_name>;
23082308- type IndexedAt = S::IndexedAt;
23082308+ type Did = S::Did;
23092309 }
23102310- ///State transition - sets the `indexed_at` field to Set
23112311- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
23122312- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
23132313- impl<S: State> State for SetIndexedAt<S> {
23102310+ ///State transition - sets the `did` field to Set
23112311+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
23122312+ impl<S: State> sealed::Sealed for SetDid<S> {}
23132313+ impl<S: State> State for SetDid<S> {
23142314 type Uri = S::Uri;
23152315+ type IndexedAt = S::IndexedAt;
23162316+ type Creator = S::Creator;
23152317 type Cid = S::Cid;
23162316- type Did = S::Did;
23172317- type Creator = S::Creator;
23182318 type DisplayName = S::DisplayName;
23192319- type IndexedAt = Set<members::indexed_at>;
23192319+ type Did = Set<members::did>;
23202320 }
23212321 /// Marker types for field names
23222322 #[allow(non_camel_case_types)]
23232323 pub mod members {
23242324 ///Marker type for the `uri` field
23252325 pub struct uri(());
23262326- ///Marker type for the `cid` field
23272327- pub struct cid(());
23282328- ///Marker type for the `did` field
23292329- pub struct did(());
23262326+ ///Marker type for the `indexed_at` field
23272327+ pub struct indexed_at(());
23302328 ///Marker type for the `creator` field
23312329 pub struct creator(());
23302330+ ///Marker type for the `cid` field
23312331+ pub struct cid(());
23322332 ///Marker type for the `display_name` field
23332333 pub struct display_name(());
23342334- ///Marker type for the `indexed_at` field
23352335- pub struct indexed_at(());
23342334+ ///Marker type for the `did` field
23352335+ pub struct did(());
23362336 }
23372337}
23382338···26492649where
26502650 S: generator_view_state::State,
26512651 S::Uri: generator_view_state::IsSet,
26522652- S::Cid: generator_view_state::IsSet,
26532653- S::Did: generator_view_state::IsSet,
26522652+ S::IndexedAt: generator_view_state::IsSet,
26542653 S::Creator: generator_view_state::IsSet,
26542654+ S::Cid: generator_view_state::IsSet,
26552655 S::DisplayName: generator_view_state::IsSet,
26562656- S::IndexedAt: generator_view_state::IsSet,
26562656+ S::Did: generator_view_state::IsSet,
26572657{
26582658 /// Build the final struct
26592659 pub fn build(self) -> GeneratorView<'a> {
···32073207 }
32083208 /// State trait tracking which required fields have been set
32093209 pub trait State: sealed::Sealed {
32103210+ type IndexedAt;
32103211 type Uri;
32123212+ type Author;
32113213 type Cid;
32123212- type Author;
32133214 type Record;
32143214- type IndexedAt;
32153215 }
32163216 /// Empty state - all required fields are unset
32173217 pub struct Empty(());
32183218 impl sealed::Sealed for Empty {}
32193219 impl State for Empty {
32203220+ type IndexedAt = Unset;
32203221 type Uri = Unset;
32223222+ type Author = Unset;
32213223 type Cid = Unset;
32223222- type Author = Unset;
32233224 type Record = Unset;
32243224- type IndexedAt = Unset;
32253225+ }
32263226+ ///State transition - sets the `indexed_at` field to Set
32273227+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
32283228+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
32293229+ impl<S: State> State for SetIndexedAt<S> {
32303230+ type IndexedAt = Set<members::indexed_at>;
32313231+ type Uri = S::Uri;
32323232+ type Author = S::Author;
32333233+ type Cid = S::Cid;
32343234+ type Record = S::Record;
32253235 }
32263236 ///State transition - sets the `uri` field to Set
32273237 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
32283238 impl<S: State> sealed::Sealed for SetUri<S> {}
32293239 impl<S: State> State for SetUri<S> {
32403240+ type IndexedAt = S::IndexedAt;
32303241 type Uri = Set<members::uri>;
32423242+ type Author = S::Author;
32313243 type Cid = S::Cid;
32323232- type Author = S::Author;
32333244 type Record = S::Record;
32453245+ }
32463246+ ///State transition - sets the `author` field to Set
32473247+ pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
32483248+ impl<S: State> sealed::Sealed for SetAuthor<S> {}
32493249+ impl<S: State> State for SetAuthor<S> {
32343250 type IndexedAt = S::IndexedAt;
32513251+ type Uri = S::Uri;
32523252+ type Author = Set<members::author>;
32533253+ type Cid = S::Cid;
32543254+ type Record = S::Record;
32353255 }
32363256 ///State transition - sets the `cid` field to Set
32373257 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
32383258 impl<S: State> sealed::Sealed for SetCid<S> {}
32393259 impl<S: State> State for SetCid<S> {
32403240- type Uri = S::Uri;
32413241- type Cid = Set<members::cid>;
32423242- type Author = S::Author;
32433243- type Record = S::Record;
32443260 type IndexedAt = S::IndexedAt;
32453245- }
32463246- ///State transition - sets the `author` field to Set
32473247- pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
32483248- impl<S: State> sealed::Sealed for SetAuthor<S> {}
32493249- impl<S: State> State for SetAuthor<S> {
32503261 type Uri = S::Uri;
32513251- type Cid = S::Cid;
32523252- type Author = Set<members::author>;
32623262+ type Author = S::Author;
32633263+ type Cid = Set<members::cid>;
32533264 type Record = S::Record;
32543254- type IndexedAt = S::IndexedAt;
32553265 }
32563266 ///State transition - sets the `record` field to Set
32573267 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
32583268 impl<S: State> sealed::Sealed for SetRecord<S> {}
32593269 impl<S: State> State for SetRecord<S> {
32603260- type Uri = S::Uri;
32613261- type Cid = S::Cid;
32623262- type Author = S::Author;
32633263- type Record = Set<members::record>;
32643270 type IndexedAt = S::IndexedAt;
32653265- }
32663266- ///State transition - sets the `indexed_at` field to Set
32673267- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
32683268- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
32693269- impl<S: State> State for SetIndexedAt<S> {
32703271 type Uri = S::Uri;
32713271- type Cid = S::Cid;
32723272 type Author = S::Author;
32733273- type Record = S::Record;
32743274- type IndexedAt = Set<members::indexed_at>;
32733273+ type Cid = S::Cid;
32743274+ type Record = Set<members::record>;
32753275 }
32763276 /// Marker types for field names
32773277 #[allow(non_camel_case_types)]
32783278 pub mod members {
32793279+ ///Marker type for the `indexed_at` field
32803280+ pub struct indexed_at(());
32793281 ///Marker type for the `uri` field
32803282 pub struct uri(());
32833283+ ///Marker type for the `author` field
32843284+ pub struct author(());
32813285 ///Marker type for the `cid` field
32823286 pub struct cid(());
32833283- ///Marker type for the `author` field
32843284- pub struct author(());
32853287 ///Marker type for the `record` field
32863288 pub struct record(());
32873287- ///Marker type for the `indexed_at` field
32883288- pub struct indexed_at(());
32893289 }
32903290}
32913291···35983598impl<'a, S> PostViewBuilder<'a, S>
35993599where
36003600 S: post_view_state::State,
36013601+ S::IndexedAt: post_view_state::IsSet,
36013602 S::Uri: post_view_state::IsSet,
36023602- S::Cid: post_view_state::IsSet,
36033603 S::Author: post_view_state::IsSet,
36043604+ S::Cid: post_view_state::IsSet,
36043605 S::Record: post_view_state::IsSet,
36053605- S::IndexedAt: post_view_state::IsSet,
36063606{
36073607 /// Build the final struct
36083608 pub fn build(self) -> PostView<'a> {
+15-15
crates/weaver-api/src/app_bsky/feed/generator.rs
···5656 }
5757 /// State trait tracking which required fields have been set
5858 pub trait State: sealed::Sealed {
5959- type Did;
6059 type DisplayName;
6060+ type Did;
6161 type CreatedAt;
6262 }
6363 /// Empty state - all required fields are unset
6464 pub struct Empty(());
6565 impl sealed::Sealed for Empty {}
6666 impl State for Empty {
6767- type Did = Unset;
6867 type DisplayName = Unset;
6868+ type Did = Unset;
6969 type CreatedAt = Unset;
7070 }
7171- ///State transition - sets the `did` field to Set
7272- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
7373- impl<S: State> sealed::Sealed for SetDid<S> {}
7474- impl<S: State> State for SetDid<S> {
7575- type Did = Set<members::did>;
7676- type DisplayName = S::DisplayName;
7777- type CreatedAt = S::CreatedAt;
7878- }
7971 ///State transition - sets the `display_name` field to Set
8072 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
8173 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
8274 impl<S: State> State for SetDisplayName<S> {
8383- type Did = S::Did;
8475 type DisplayName = Set<members::display_name>;
7676+ type Did = S::Did;
7777+ type CreatedAt = S::CreatedAt;
7878+ }
7979+ ///State transition - sets the `did` field to Set
8080+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
8181+ impl<S: State> sealed::Sealed for SetDid<S> {}
8282+ impl<S: State> State for SetDid<S> {
8383+ type DisplayName = S::DisplayName;
8484+ type Did = Set<members::did>;
8585 type CreatedAt = S::CreatedAt;
8686 }
8787 ///State transition - sets the `created_at` field to Set
8888 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
8989 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
9090 impl<S: State> State for SetCreatedAt<S> {
9191- type Did = S::Did;
9291 type DisplayName = S::DisplayName;
9292+ type Did = S::Did;
9393 type CreatedAt = Set<members::created_at>;
9494 }
9595 /// Marker types for field names
9696 #[allow(non_camel_case_types)]
9797 pub mod members {
9898+ ///Marker type for the `display_name` field
9999+ pub struct display_name(());
98100 ///Marker type for the `did` field
99101 pub struct did(());
100100- ///Marker type for the `display_name` field
101101- pub struct display_name(());
102102 ///Marker type for the `created_at` field
103103 pub struct created_at(());
104104 }
···317317impl<'a, S> GeneratorBuilder<'a, S>
318318where
319319 S: generator_state::State,
320320- S::Did: generator_state::IsSet,
321320 S::DisplayName: generator_state::IsSet,
321321+ S::Did: generator_state::IsSet,
322322 S::CreatedAt: generator_state::IsSet,
323323{
324324 /// Build the final struct
+15-15
crates/weaver-api/src/app_bsky/feed/get_likes.rs
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type IndexedAt;
3736 type CreatedAt;
3737+ type IndexedAt;
3838 type Actor;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type IndexedAt = Unset;
4544 type CreatedAt = Unset;
4545+ type IndexedAt = Unset;
4646 type Actor = Unset;
4747 }
4848- ///State transition - sets the `indexed_at` field to Set
4949- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
5050- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
5151- impl<S: State> State for SetIndexedAt<S> {
5252- type IndexedAt = Set<members::indexed_at>;
5353- type CreatedAt = S::CreatedAt;
5454- type Actor = S::Actor;
5555- }
5648 ///State transition - sets the `created_at` field to Set
5749 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5850 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5951 impl<S: State> State for SetCreatedAt<S> {
6060- type IndexedAt = S::IndexedAt;
6152 type CreatedAt = Set<members::created_at>;
5353+ type IndexedAt = S::IndexedAt;
5454+ type Actor = S::Actor;
5555+ }
5656+ ///State transition - sets the `indexed_at` field to Set
5757+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
5858+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
5959+ impl<S: State> State for SetIndexedAt<S> {
6060+ type CreatedAt = S::CreatedAt;
6161+ type IndexedAt = Set<members::indexed_at>;
6262 type Actor = S::Actor;
6363 }
6464 ///State transition - sets the `actor` field to Set
6565 pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
6666 impl<S: State> sealed::Sealed for SetActor<S> {}
6767 impl<S: State> State for SetActor<S> {
6868- type IndexedAt = S::IndexedAt;
6968 type CreatedAt = S::CreatedAt;
6969+ type IndexedAt = S::IndexedAt;
7070 type Actor = Set<members::actor>;
7171 }
7272 /// Marker types for field names
7373 #[allow(non_camel_case_types)]
7474 pub mod members {
7575+ ///Marker type for the `created_at` field
7676+ pub struct created_at(());
7577 ///Marker type for the `indexed_at` field
7678 pub struct indexed_at(());
7777- ///Marker type for the `created_at` field
7878- pub struct created_at(());
7979 ///Marker type for the `actor` field
8080 pub struct actor(());
8181 }
···170170impl<'a, S> LikeBuilder<'a, S>
171171where
172172 S: like_state::State,
173173- S::IndexedAt: like_state::IsSet,
174173 S::CreatedAt: like_state::IsSet,
174174+ S::IndexedAt: like_state::IsSet,
175175 S::Actor: like_state::IsSet,
176176{
177177 /// Build the final struct
+13-13
crates/weaver-api/src/app_bsky/feed/like.rs
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Subject;
4039 type CreatedAt;
4040+ type Subject;
4141 }
4242 /// Empty state - all required fields are unset
4343 pub struct Empty(());
4444 impl sealed::Sealed for Empty {}
4545 impl State for Empty {
4646- type Subject = Unset;
4746 type CreatedAt = Unset;
4848- }
4949- ///State transition - sets the `subject` field to Set
5050- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5151- impl<S: State> sealed::Sealed for SetSubject<S> {}
5252- impl<S: State> State for SetSubject<S> {
5353- type Subject = Set<members::subject>;
5454- type CreatedAt = S::CreatedAt;
4747+ type Subject = Unset;
5548 }
5649 ///State transition - sets the `created_at` field to Set
5750 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5851 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5952 impl<S: State> State for SetCreatedAt<S> {
6060- type Subject = S::Subject;
6153 type CreatedAt = Set<members::created_at>;
5454+ type Subject = S::Subject;
5555+ }
5656+ ///State transition - sets the `subject` field to Set
5757+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5858+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5959+ impl<S: State> State for SetSubject<S> {
6060+ type CreatedAt = S::CreatedAt;
6161+ type Subject = Set<members::subject>;
6262 }
6363 /// Marker types for field names
6464 #[allow(non_camel_case_types)]
6565 pub mod members {
6666- ///Marker type for the `subject` field
6767- pub struct subject(());
6866 ///Marker type for the `created_at` field
6967 pub struct created_at(());
6868+ ///Marker type for the `subject` field
6969+ pub struct subject(());
7070 }
7171}
7272···159159impl<'a, S> LikeBuilder<'a, S>
160160where
161161 S: like_state::State,
162162- S::Subject: like_state::IsSet,
163162 S::CreatedAt: like_state::IsSet,
163163+ S::Subject: like_state::IsSet,
164164{
165165 /// Build the final struct
166166 pub fn build(self) -> Like<'a> {
+13-13
crates/weaver-api/src/app_bsky/feed/repost.rs
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Subject;
4039 type CreatedAt;
4040+ type Subject;
4141 }
4242 /// Empty state - all required fields are unset
4343 pub struct Empty(());
4444 impl sealed::Sealed for Empty {}
4545 impl State for Empty {
4646- type Subject = Unset;
4746 type CreatedAt = Unset;
4848- }
4949- ///State transition - sets the `subject` field to Set
5050- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5151- impl<S: State> sealed::Sealed for SetSubject<S> {}
5252- impl<S: State> State for SetSubject<S> {
5353- type Subject = Set<members::subject>;
5454- type CreatedAt = S::CreatedAt;
4747+ type Subject = Unset;
5548 }
5649 ///State transition - sets the `created_at` field to Set
5750 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5851 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5952 impl<S: State> State for SetCreatedAt<S> {
6060- type Subject = S::Subject;
6153 type CreatedAt = Set<members::created_at>;
5454+ type Subject = S::Subject;
5555+ }
5656+ ///State transition - sets the `subject` field to Set
5757+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5858+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5959+ impl<S: State> State for SetSubject<S> {
6060+ type CreatedAt = S::CreatedAt;
6161+ type Subject = Set<members::subject>;
6262 }
6363 /// Marker types for field names
6464 #[allow(non_camel_case_types)]
6565 pub mod members {
6666- ///Marker type for the `subject` field
6767- pub struct subject(());
6866 ///Marker type for the `created_at` field
6967 pub struct created_at(());
6868+ ///Marker type for the `subject` field
6969+ pub struct subject(());
7070 }
7171}
7272···159159impl<'a, S> RepostBuilder<'a, S>
160160where
161161 S: repost_state::State,
162162- S::Subject: repost_state::IsSet,
163162 S::CreatedAt: repost_state::IsSet,
163163+ S::Subject: repost_state::IsSet,
164164{
165165 /// Build the final struct
166166 pub fn build(self) -> Repost<'a> {
+13-13
crates/weaver-api/src/app_bsky/feed/threadgate.rs
···463463 }
464464 /// State trait tracking which required fields have been set
465465 pub trait State: sealed::Sealed {
466466- type Post;
467466 type CreatedAt;
467467+ type Post;
468468 }
469469 /// Empty state - all required fields are unset
470470 pub struct Empty(());
471471 impl sealed::Sealed for Empty {}
472472 impl State for Empty {
473473- type Post = Unset;
474473 type CreatedAt = Unset;
475475- }
476476- ///State transition - sets the `post` field to Set
477477- pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
478478- impl<S: State> sealed::Sealed for SetPost<S> {}
479479- impl<S: State> State for SetPost<S> {
480480- type Post = Set<members::post>;
481481- type CreatedAt = S::CreatedAt;
474474+ type Post = Unset;
482475 }
483476 ///State transition - sets the `created_at` field to Set
484477 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
485478 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
486479 impl<S: State> State for SetCreatedAt<S> {
487487- type Post = S::Post;
488480 type CreatedAt = Set<members::created_at>;
481481+ type Post = S::Post;
482482+ }
483483+ ///State transition - sets the `post` field to Set
484484+ pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
485485+ impl<S: State> sealed::Sealed for SetPost<S> {}
486486+ impl<S: State> State for SetPost<S> {
487487+ type CreatedAt = S::CreatedAt;
488488+ type Post = Set<members::post>;
489489 }
490490 /// Marker types for field names
491491 #[allow(non_camel_case_types)]
492492 pub mod members {
493493- ///Marker type for the `post` field
494494- pub struct post(());
495493 ///Marker type for the `created_at` field
496494 pub struct created_at(());
495495+ ///Marker type for the `post` field
496496+ pub struct post(());
497497 }
498498}
499499···603603impl<'a, S> ThreadgateBuilder<'a, S>
604604where
605605 S: threadgate_state::State,
606606- S::Post: threadgate_state::IsSet,
607606 S::CreatedAt: threadgate_state::IsSet,
607607+ S::Post: threadgate_state::IsSet,
608608{
609609 /// Build the final struct
610610 pub fn build(self) -> Threadgate<'a> {
+149-149
crates/weaver-api/src/app_bsky/graph.rs
···12771277 }
12781278 /// State trait tracking which required fields have been set
12791279 pub trait State: sealed::Sealed {
12801280- type Uri;
12811281- type Cid;
12821282- type Creator;
12831283- type Name;
12841280 type Purpose;
12851281 type IndexedAt;
12821282+ type Name;
12831283+ type Cid;
12841284+ type Creator;
12851285+ type Uri;
12861286 }
12871287 /// Empty state - all required fields are unset
12881288 pub struct Empty(());
12891289 impl sealed::Sealed for Empty {}
12901290 impl State for Empty {
12911291- type Uri = Unset;
12911291+ type Purpose = Unset;
12921292+ type IndexedAt = Unset;
12931293+ type Name = Unset;
12921294 type Cid = Unset;
12931295 type Creator = Unset;
12941294- type Name = Unset;
12951295- type Purpose = Unset;
12961296- type IndexedAt = Unset;
12961296+ type Uri = Unset;
12971297 }
12981298- ///State transition - sets the `uri` field to Set
12991299- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13001300- impl<S: State> sealed::Sealed for SetUri<S> {}
13011301- impl<S: State> State for SetUri<S> {
13021302- type Uri = Set<members::uri>;
12981298+ ///State transition - sets the `purpose` field to Set
12991299+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
13001300+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
13011301+ impl<S: State> State for SetPurpose<S> {
13021302+ type Purpose = Set<members::purpose>;
13031303+ type IndexedAt = S::IndexedAt;
13041304+ type Name = S::Name;
13031305 type Cid = S::Cid;
13041306 type Creator = S::Creator;
13071307+ type Uri = S::Uri;
13081308+ }
13091309+ ///State transition - sets the `indexed_at` field to Set
13101310+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
13111311+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
13121312+ impl<S: State> State for SetIndexedAt<S> {
13131313+ type Purpose = S::Purpose;
13141314+ type IndexedAt = Set<members::indexed_at>;
13051315 type Name = S::Name;
13161316+ type Cid = S::Cid;
13171317+ type Creator = S::Creator;
13181318+ type Uri = S::Uri;
13191319+ }
13201320+ ///State transition - sets the `name` field to Set
13211321+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
13221322+ impl<S: State> sealed::Sealed for SetName<S> {}
13231323+ impl<S: State> State for SetName<S> {
13061324 type Purpose = S::Purpose;
13071325 type IndexedAt = S::IndexedAt;
13261326+ type Name = Set<members::name>;
13271327+ type Cid = S::Cid;
13281328+ type Creator = S::Creator;
13291329+ type Uri = S::Uri;
13081330 }
13091331 ///State transition - sets the `cid` field to Set
13101332 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13111333 impl<S: State> sealed::Sealed for SetCid<S> {}
13121334 impl<S: State> State for SetCid<S> {
13131313- type Uri = S::Uri;
13351335+ type Purpose = S::Purpose;
13361336+ type IndexedAt = S::IndexedAt;
13371337+ type Name = S::Name;
13141338 type Cid = Set<members::cid>;
13151339 type Creator = S::Creator;
13161316- type Name = S::Name;
13171317- type Purpose = S::Purpose;
13181318- type IndexedAt = S::IndexedAt;
13401340+ type Uri = S::Uri;
13191341 }
13201342 ///State transition - sets the `creator` field to Set
13211343 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
13221344 impl<S: State> sealed::Sealed for SetCreator<S> {}
13231345 impl<S: State> State for SetCreator<S> {
13241324- type Uri = S::Uri;
13461346+ type Purpose = S::Purpose;
13471347+ type IndexedAt = S::IndexedAt;
13481348+ type Name = S::Name;
13251349 type Cid = S::Cid;
13261350 type Creator = Set<members::creator>;
13271327- type Name = S::Name;
13281328- type Purpose = S::Purpose;
13291329- type IndexedAt = S::IndexedAt;
13301330- }
13311331- ///State transition - sets the `name` field to Set
13321332- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
13331333- impl<S: State> sealed::Sealed for SetName<S> {}
13341334- impl<S: State> State for SetName<S> {
13351351 type Uri = S::Uri;
13361336- type Cid = S::Cid;
13371337- type Creator = S::Creator;
13381338- type Name = Set<members::name>;
13521352+ }
13531353+ ///State transition - sets the `uri` field to Set
13541354+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13551355+ impl<S: State> sealed::Sealed for SetUri<S> {}
13561356+ impl<S: State> State for SetUri<S> {
13391357 type Purpose = S::Purpose;
13401358 type IndexedAt = S::IndexedAt;
13411341- }
13421342- ///State transition - sets the `purpose` field to Set
13431343- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
13441344- impl<S: State> sealed::Sealed for SetPurpose<S> {}
13451345- impl<S: State> State for SetPurpose<S> {
13461346- type Uri = S::Uri;
13471347- type Cid = S::Cid;
13481348- type Creator = S::Creator;
13491359 type Name = S::Name;
13501350- type Purpose = Set<members::purpose>;
13511351- type IndexedAt = S::IndexedAt;
13521352- }
13531353- ///State transition - sets the `indexed_at` field to Set
13541354- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
13551355- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
13561356- impl<S: State> State for SetIndexedAt<S> {
13571357- type Uri = S::Uri;
13581360 type Cid = S::Cid;
13591361 type Creator = S::Creator;
13601360- type Name = S::Name;
13611361- type Purpose = S::Purpose;
13621362- type IndexedAt = Set<members::indexed_at>;
13621362+ type Uri = Set<members::uri>;
13631363 }
13641364 /// Marker types for field names
13651365 #[allow(non_camel_case_types)]
13661366 pub mod members {
13671367- ///Marker type for the `uri` field
13681368- pub struct uri(());
13691369- ///Marker type for the `cid` field
13701370- pub struct cid(());
13711371- ///Marker type for the `creator` field
13721372- pub struct creator(());
13731373- ///Marker type for the `name` field
13741374- pub struct name(());
13751367 ///Marker type for the `purpose` field
13761368 pub struct purpose(());
13771369 ///Marker type for the `indexed_at` field
13781370 pub struct indexed_at(());
13711371+ ///Marker type for the `name` field
13721372+ pub struct name(());
13731373+ ///Marker type for the `cid` field
13741374+ pub struct cid(());
13751375+ ///Marker type for the `creator` field
13761376+ pub struct creator(());
13771377+ ///Marker type for the `uri` field
13781378+ pub struct uri(());
13791379 }
13801380}
13811381···16551655impl<'a, S> ListViewBuilder<'a, S>
16561656where
16571657 S: list_view_state::State,
16581658- S::Uri: list_view_state::IsSet,
16591659- S::Cid: list_view_state::IsSet,
16601660- S::Creator: list_view_state::IsSet,
16611661- S::Name: list_view_state::IsSet,
16621658 S::Purpose: list_view_state::IsSet,
16631659 S::IndexedAt: list_view_state::IsSet,
16601660+ S::Name: list_view_state::IsSet,
16611661+ S::Cid: list_view_state::IsSet,
16621662+ S::Creator: list_view_state::IsSet,
16631663+ S::Uri: list_view_state::IsSet,
16641664{
16651665 /// Build the final struct
16661666 pub fn build(self) -> ListView<'a> {
···18371837 pub trait State: sealed::Sealed {
18381838 type Uri;
18391839 type Cid;
18401840- type Name;
18411840 type Purpose;
18411841+ type Name;
18421842 }
18431843 /// Empty state - all required fields are unset
18441844 pub struct Empty(());
···18461846 impl State for Empty {
18471847 type Uri = Unset;
18481848 type Cid = Unset;
18491849- type Name = Unset;
18501849 type Purpose = Unset;
18501850+ type Name = Unset;
18511851 }
18521852 ///State transition - sets the `uri` field to Set
18531853 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
···18551855 impl<S: State> State for SetUri<S> {
18561856 type Uri = Set<members::uri>;
18571857 type Cid = S::Cid;
18581858- type Name = S::Name;
18591858 type Purpose = S::Purpose;
18591859+ type Name = S::Name;
18601860 }
18611861 ///State transition - sets the `cid` field to Set
18621862 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
···18641864 impl<S: State> State for SetCid<S> {
18651865 type Uri = S::Uri;
18661866 type Cid = Set<members::cid>;
18671867+ type Purpose = S::Purpose;
18671868 type Name = S::Name;
18681868- type Purpose = S::Purpose;
18691869+ }
18701870+ ///State transition - sets the `purpose` field to Set
18711871+ pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
18721872+ impl<S: State> sealed::Sealed for SetPurpose<S> {}
18731873+ impl<S: State> State for SetPurpose<S> {
18741874+ type Uri = S::Uri;
18751875+ type Cid = S::Cid;
18761876+ type Purpose = Set<members::purpose>;
18771877+ type Name = S::Name;
18691878 }
18701879 ///State transition - sets the `name` field to Set
18711880 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
···18731882 impl<S: State> State for SetName<S> {
18741883 type Uri = S::Uri;
18751884 type Cid = S::Cid;
18761876- type Name = Set<members::name>;
18771885 type Purpose = S::Purpose;
18781878- }
18791879- ///State transition - sets the `purpose` field to Set
18801880- pub struct SetPurpose<S: State = Empty>(PhantomData<fn() -> S>);
18811881- impl<S: State> sealed::Sealed for SetPurpose<S> {}
18821882- impl<S: State> State for SetPurpose<S> {
18831883- type Uri = S::Uri;
18841884- type Cid = S::Cid;
18851885- type Name = S::Name;
18861886- type Purpose = Set<members::purpose>;
18861886+ type Name = Set<members::name>;
18871887 }
18881888 /// Marker types for field names
18891889 #[allow(non_camel_case_types)]
···18921892 pub struct uri(());
18931893 ///Marker type for the `cid` field
18941894 pub struct cid(());
18951895- ///Marker type for the `name` field
18961896- pub struct name(());
18971895 ///Marker type for the `purpose` field
18981896 pub struct purpose(());
18971897+ ///Marker type for the `name` field
18981898+ pub struct name(());
18991899 }
19001900}
19011901···21142114 S: list_view_basic_state::State,
21152115 S::Uri: list_view_basic_state::IsSet,
21162116 S::Cid: list_view_basic_state::IsSet,
21172117- S::Name: list_view_basic_state::IsSet,
21182117 S::Purpose: list_view_basic_state::IsSet,
21182118+ S::Name: list_view_basic_state::IsSet,
21192119{
21202120 /// Build the final struct
21212121 pub fn build(self) -> ListViewBasic<'a> {
···22922292 }
22932293 /// State trait tracking which required fields have been set
22942294 pub trait State: sealed::Sealed {
22952295- type Actor;
22962295 type NotFound;
22962296+ type Actor;
22972297 }
22982298 /// Empty state - all required fields are unset
22992299 pub struct Empty(());
23002300 impl sealed::Sealed for Empty {}
23012301 impl State for Empty {
23022302- type Actor = Unset;
23032302 type NotFound = Unset;
23042304- }
23052305- ///State transition - sets the `actor` field to Set
23062306- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
23072307- impl<S: State> sealed::Sealed for SetActor<S> {}
23082308- impl<S: State> State for SetActor<S> {
23092309- type Actor = Set<members::actor>;
23102310- type NotFound = S::NotFound;
23032303+ type Actor = Unset;
23112304 }
23122305 ///State transition - sets the `not_found` field to Set
23132306 pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
23142307 impl<S: State> sealed::Sealed for SetNotFound<S> {}
23152308 impl<S: State> State for SetNotFound<S> {
23162316- type Actor = S::Actor;
23172309 type NotFound = Set<members::not_found>;
23102310+ type Actor = S::Actor;
23112311+ }
23122312+ ///State transition - sets the `actor` field to Set
23132313+ pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
23142314+ impl<S: State> sealed::Sealed for SetActor<S> {}
23152315+ impl<S: State> State for SetActor<S> {
23162316+ type NotFound = S::NotFound;
23172317+ type Actor = Set<members::actor>;
23182318 }
23192319 /// Marker types for field names
23202320 #[allow(non_camel_case_types)]
23212321 pub mod members {
23222322+ ///Marker type for the `not_found` field
23232323+ pub struct not_found(());
23222324 ///Marker type for the `actor` field
23232325 pub struct actor(());
23242324- ///Marker type for the `not_found` field
23252325- pub struct not_found(());
23262326 }
23272327}
23282328···23952395impl<'a, S> NotFoundActorBuilder<'a, S>
23962396where
23972397 S: not_found_actor_state::State,
23982398- S::Actor: not_found_actor_state::IsSet,
23992398 S::NotFound: not_found_actor_state::IsSet,
23992399+ S::Actor: not_found_actor_state::IsSet,
24002400{
24012401 /// Build the final struct
24022402 pub fn build(self) -> NotFoundActor<'a> {
···26992699 }
27002700 /// State trait tracking which required fields have been set
27012701 pub trait State: sealed::Sealed {
27022702- type Uri;
27032703- type Cid;
27042702 type Record;
27032703+ type Cid;
27052704 type Creator;
27062705 type IndexedAt;
27062706+ type Uri;
27072707 }
27082708 /// Empty state - all required fields are unset
27092709 pub struct Empty(());
27102710 impl sealed::Sealed for Empty {}
27112711 impl State for Empty {
27122712- type Uri = Unset;
27122712+ type Record = Unset;
27132713 type Cid = Unset;
27142714- type Record = Unset;
27152714 type Creator = Unset;
27162715 type IndexedAt = Unset;
27162716+ type Uri = Unset;
27172717 }
27182718- ///State transition - sets the `uri` field to Set
27192719- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
27202720- impl<S: State> sealed::Sealed for SetUri<S> {}
27212721- impl<S: State> State for SetUri<S> {
27222722- type Uri = Set<members::uri>;
27182718+ ///State transition - sets the `record` field to Set
27192719+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
27202720+ impl<S: State> sealed::Sealed for SetRecord<S> {}
27212721+ impl<S: State> State for SetRecord<S> {
27222722+ type Record = Set<members::record>;
27232723 type Cid = S::Cid;
27242724- type Record = S::Record;
27252724 type Creator = S::Creator;
27262725 type IndexedAt = S::IndexedAt;
27262726+ type Uri = S::Uri;
27272727 }
27282728 ///State transition - sets the `cid` field to Set
27292729 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
27302730 impl<S: State> sealed::Sealed for SetCid<S> {}
27312731 impl<S: State> State for SetCid<S> {
27322732- type Uri = S::Uri;
27322732+ type Record = S::Record;
27332733 type Cid = Set<members::cid>;
27342734- type Record = S::Record;
27352734 type Creator = S::Creator;
27362735 type IndexedAt = S::IndexedAt;
27372737- }
27382738- ///State transition - sets the `record` field to Set
27392739- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
27402740- impl<S: State> sealed::Sealed for SetRecord<S> {}
27412741- impl<S: State> State for SetRecord<S> {
27422736 type Uri = S::Uri;
27432743- type Cid = S::Cid;
27442744- type Record = Set<members::record>;
27452745- type Creator = S::Creator;
27462746- type IndexedAt = S::IndexedAt;
27472737 }
27482738 ///State transition - sets the `creator` field to Set
27492739 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
27502740 impl<S: State> sealed::Sealed for SetCreator<S> {}
27512741 impl<S: State> State for SetCreator<S> {
27522752- type Uri = S::Uri;
27422742+ type Record = S::Record;
27532743 type Cid = S::Cid;
27542754- type Record = S::Record;
27552744 type Creator = Set<members::creator>;
27562745 type IndexedAt = S::IndexedAt;
27462746+ type Uri = S::Uri;
27572747 }
27582748 ///State transition - sets the `indexed_at` field to Set
27592749 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
27602750 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
27612751 impl<S: State> State for SetIndexedAt<S> {
27522752+ type Record = S::Record;
27532753+ type Cid = S::Cid;
27542754+ type Creator = S::Creator;
27552755+ type IndexedAt = Set<members::indexed_at>;
27622756 type Uri = S::Uri;
27632763- type Cid = S::Cid;
27572757+ }
27582758+ ///State transition - sets the `uri` field to Set
27592759+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
27602760+ impl<S: State> sealed::Sealed for SetUri<S> {}
27612761+ impl<S: State> State for SetUri<S> {
27642762 type Record = S::Record;
27632763+ type Cid = S::Cid;
27652764 type Creator = S::Creator;
27662766- type IndexedAt = Set<members::indexed_at>;
27652765+ type IndexedAt = S::IndexedAt;
27662766+ type Uri = Set<members::uri>;
27672767 }
27682768 /// Marker types for field names
27692769 #[allow(non_camel_case_types)]
27702770 pub mod members {
27712771- ///Marker type for the `uri` field
27722772- pub struct uri(());
27712771+ ///Marker type for the `record` field
27722772+ pub struct record(());
27732773 ///Marker type for the `cid` field
27742774 pub struct cid(());
27752775- ///Marker type for the `record` field
27762776- pub struct record(());
27772775 ///Marker type for the `creator` field
27782776 pub struct creator(());
27792777 ///Marker type for the `indexed_at` field
27802778 pub struct indexed_at(());
27792779+ ///Marker type for the `uri` field
27802780+ pub struct uri(());
27812781 }
27822782}
27832783···30303030impl<'a, S> StarterPackViewBuilder<'a, S>
30313031where
30323032 S: starter_pack_view_state::State,
30333033- S::Uri: starter_pack_view_state::IsSet,
30343034- S::Cid: starter_pack_view_state::IsSet,
30353033 S::Record: starter_pack_view_state::IsSet,
30343034+ S::Cid: starter_pack_view_state::IsSet,
30363035 S::Creator: starter_pack_view_state::IsSet,
30373036 S::IndexedAt: starter_pack_view_state::IsSet,
30373037+ S::Uri: starter_pack_view_state::IsSet,
30383038{
30393039 /// Build the final struct
30403040 pub fn build(self) -> StarterPackView<'a> {
···31833183 }
31843184 /// State trait tracking which required fields have been set
31853185 pub trait State: sealed::Sealed {
31863186- type Uri;
31863186+ type IndexedAt;
31873187 type Cid;
31883188 type Record;
31893189 type Creator;
31903190- type IndexedAt;
31903190+ type Uri;
31913191 }
31923192 /// Empty state - all required fields are unset
31933193 pub struct Empty(());
31943194 impl sealed::Sealed for Empty {}
31953195 impl State for Empty {
31963196- type Uri = Unset;
31963196+ type IndexedAt = Unset;
31973197 type Cid = Unset;
31983198 type Record = Unset;
31993199 type Creator = Unset;
32003200- type IndexedAt = Unset;
32003200+ type Uri = Unset;
32013201 }
32023202- ///State transition - sets the `uri` field to Set
32033203- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
32043204- impl<S: State> sealed::Sealed for SetUri<S> {}
32053205- impl<S: State> State for SetUri<S> {
32063206- type Uri = Set<members::uri>;
32023202+ ///State transition - sets the `indexed_at` field to Set
32033203+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
32043204+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
32053205+ impl<S: State> State for SetIndexedAt<S> {
32063206+ type IndexedAt = Set<members::indexed_at>;
32073207 type Cid = S::Cid;
32083208 type Record = S::Record;
32093209 type Creator = S::Creator;
32103210- type IndexedAt = S::IndexedAt;
32103210+ type Uri = S::Uri;
32113211 }
32123212 ///State transition - sets the `cid` field to Set
32133213 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
32143214 impl<S: State> sealed::Sealed for SetCid<S> {}
32153215 impl<S: State> State for SetCid<S> {
32163216- type Uri = S::Uri;
32163216+ type IndexedAt = S::IndexedAt;
32173217 type Cid = Set<members::cid>;
32183218 type Record = S::Record;
32193219 type Creator = S::Creator;
32203220- type IndexedAt = S::IndexedAt;
32203220+ type Uri = S::Uri;
32213221 }
32223222 ///State transition - sets the `record` field to Set
32233223 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
32243224 impl<S: State> sealed::Sealed for SetRecord<S> {}
32253225 impl<S: State> State for SetRecord<S> {
32263226- type Uri = S::Uri;
32263226+ type IndexedAt = S::IndexedAt;
32273227 type Cid = S::Cid;
32283228 type Record = Set<members::record>;
32293229 type Creator = S::Creator;
32303230- type IndexedAt = S::IndexedAt;
32303230+ type Uri = S::Uri;
32313231 }
32323232 ///State transition - sets the `creator` field to Set
32333233 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
32343234 impl<S: State> sealed::Sealed for SetCreator<S> {}
32353235 impl<S: State> State for SetCreator<S> {
32363236- type Uri = S::Uri;
32363236+ type IndexedAt = S::IndexedAt;
32373237 type Cid = S::Cid;
32383238 type Record = S::Record;
32393239 type Creator = Set<members::creator>;
32403240+ type Uri = S::Uri;
32413241+ }
32423242+ ///State transition - sets the `uri` field to Set
32433243+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
32443244+ impl<S: State> sealed::Sealed for SetUri<S> {}
32453245+ impl<S: State> State for SetUri<S> {
32403246 type IndexedAt = S::IndexedAt;
32413241- }
32423242- ///State transition - sets the `indexed_at` field to Set
32433243- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
32443244- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
32453245- impl<S: State> State for SetIndexedAt<S> {
32463246- type Uri = S::Uri;
32473247 type Cid = S::Cid;
32483248 type Record = S::Record;
32493249 type Creator = S::Creator;
32503250- type IndexedAt = Set<members::indexed_at>;
32503250+ type Uri = Set<members::uri>;
32513251 }
32523252 /// Marker types for field names
32533253 #[allow(non_camel_case_types)]
32543254 pub mod members {
32553255- ///Marker type for the `uri` field
32563256- pub struct uri(());
32553255+ ///Marker type for the `indexed_at` field
32563256+ pub struct indexed_at(());
32573257 ///Marker type for the `cid` field
32583258 pub struct cid(());
32593259 ///Marker type for the `record` field
32603260 pub struct record(());
32613261 ///Marker type for the `creator` field
32623262 pub struct creator(());
32633263- ///Marker type for the `indexed_at` field
32643264- pub struct indexed_at(());
32633263+ ///Marker type for the `uri` field
32643264+ pub struct uri(());
32653265 }
32663266}
32673267···34723472impl<'a, S> StarterPackViewBasicBuilder<'a, S>
34733473where
34743474 S: starter_pack_view_basic_state::State,
34753475- S::Uri: starter_pack_view_basic_state::IsSet,
34753475+ S::IndexedAt: starter_pack_view_basic_state::IsSet,
34763476 S::Cid: starter_pack_view_basic_state::IsSet,
34773477 S::Record: starter_pack_view_basic_state::IsSet,
34783478 S::Creator: starter_pack_view_basic_state::IsSet,
34793479- S::IndexedAt: starter_pack_view_basic_state::IsSet,
34793479+ S::Uri: starter_pack_view_basic_state::IsSet,
34803480{
34813481 /// Build the final struct
34823482 pub fn build(self) -> StarterPackViewBasic<'a> {
+13-13
crates/weaver-api/src/app_bsky/graph/listblock.rs
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Subject;
3837 type CreatedAt;
3838+ type Subject;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type Subject = Unset;
4544 type CreatedAt = Unset;
4646- }
4747- ///State transition - sets the `subject` field to Set
4848- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetSubject<S> {}
5050- impl<S: State> State for SetSubject<S> {
5151- type Subject = Set<members::subject>;
5252- type CreatedAt = S::CreatedAt;
4545+ type Subject = Unset;
5346 }
5447 ///State transition - sets the `created_at` field to Set
5548 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5750 impl<S: State> State for SetCreatedAt<S> {
5858- type Subject = S::Subject;
5951 type CreatedAt = Set<members::created_at>;
5252+ type Subject = S::Subject;
5353+ }
5454+ ///State transition - sets the `subject` field to Set
5555+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5757+ impl<S: State> State for SetSubject<S> {
5858+ type CreatedAt = S::CreatedAt;
5959+ type Subject = Set<members::subject>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `subject` field
6565- pub struct subject(());
6664 ///Marker type for the `created_at` field
6765 pub struct created_at(());
6666+ ///Marker type for the `subject` field
6767+ pub struct subject(());
6868 }
6969}
7070···137137impl<'a, S> ListblockBuilder<'a, S>
138138where
139139 S: listblock_state::State,
140140- S::Subject: listblock_state::IsSet,
141140 S::CreatedAt: listblock_state::IsSet,
141141+ S::Subject: listblock_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> Listblock<'a> {
+15-15
crates/weaver-api/src/app_bsky/graph/listitem.rs
···3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040 type Subject;
4141- type List;
4241 type CreatedAt;
4242+ type List;
4343 }
4444 /// Empty state - all required fields are unset
4545 pub struct Empty(());
4646 impl sealed::Sealed for Empty {}
4747 impl State for Empty {
4848 type Subject = Unset;
4949- type List = Unset;
5049 type CreatedAt = Unset;
5050+ type List = Unset;
5151 }
5252 ///State transition - sets the `subject` field to Set
5353 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5454 impl<S: State> sealed::Sealed for SetSubject<S> {}
5555 impl<S: State> State for SetSubject<S> {
5656 type Subject = Set<members::subject>;
5757- type List = S::List;
5857 type CreatedAt = S::CreatedAt;
5959- }
6060- ///State transition - sets the `list` field to Set
6161- pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
6262- impl<S: State> sealed::Sealed for SetList<S> {}
6363- impl<S: State> State for SetList<S> {
6464- type Subject = S::Subject;
6565- type List = Set<members::list>;
6666- type CreatedAt = S::CreatedAt;
5858+ type List = S::List;
6759 }
6860 ///State transition - sets the `created_at` field to Set
6961 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7062 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7163 impl<S: State> State for SetCreatedAt<S> {
7264 type Subject = S::Subject;
7373- type List = S::List;
7465 type CreatedAt = Set<members::created_at>;
6666+ type List = S::List;
6767+ }
6868+ ///State transition - sets the `list` field to Set
6969+ pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
7070+ impl<S: State> sealed::Sealed for SetList<S> {}
7171+ impl<S: State> State for SetList<S> {
7272+ type Subject = S::Subject;
7373+ type CreatedAt = S::CreatedAt;
7474+ type List = Set<members::list>;
7575 }
7676 /// Marker types for field names
7777 #[allow(non_camel_case_types)]
7878 pub mod members {
7979 ///Marker type for the `subject` field
8080 pub struct subject(());
8181+ ///Marker type for the `created_at` field
8282+ pub struct created_at(());
8183 ///Marker type for the `list` field
8284 pub struct list(());
8383- ///Marker type for the `created_at` field
8484- pub struct created_at(());
8585 }
8686}
8787···175175where
176176 S: listitem_state::State,
177177 S::Subject: listitem_state::IsSet,
178178- S::List: listitem_state::IsSet,
179178 S::CreatedAt: listitem_state::IsSet,
179179+ S::List: listitem_state::IsSet,
180180{
181181 /// Build the final struct
182182 pub fn build(self) -> Listitem<'a> {
···366366 }
367367 /// State trait tracking which required fields have been set
368368 pub trait State: sealed::Sealed {
369369- type Name;
370369 type List;
371370 type CreatedAt;
371371+ type Name;
372372 }
373373 /// Empty state - all required fields are unset
374374 pub struct Empty(());
375375 impl sealed::Sealed for Empty {}
376376 impl State for Empty {
377377- type Name = Unset;
378377 type List = Unset;
379378 type CreatedAt = Unset;
380380- }
381381- ///State transition - sets the `name` field to Set
382382- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
383383- impl<S: State> sealed::Sealed for SetName<S> {}
384384- impl<S: State> State for SetName<S> {
385385- type Name = Set<members::name>;
386386- type List = S::List;
387387- type CreatedAt = S::CreatedAt;
379379+ type Name = Unset;
388380 }
389381 ///State transition - sets the `list` field to Set
390382 pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
391383 impl<S: State> sealed::Sealed for SetList<S> {}
392384 impl<S: State> State for SetList<S> {
393393- type Name = S::Name;
394385 type List = Set<members::list>;
395386 type CreatedAt = S::CreatedAt;
387387+ type Name = S::Name;
396388 }
397389 ///State transition - sets the `created_at` field to Set
398390 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
399391 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
400392 impl<S: State> State for SetCreatedAt<S> {
401401- type Name = S::Name;
402393 type List = S::List;
403394 type CreatedAt = Set<members::created_at>;
395395+ type Name = S::Name;
396396+ }
397397+ ///State transition - sets the `name` field to Set
398398+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
399399+ impl<S: State> sealed::Sealed for SetName<S> {}
400400+ impl<S: State> State for SetName<S> {
401401+ type List = S::List;
402402+ type CreatedAt = S::CreatedAt;
403403+ type Name = Set<members::name>;
404404 }
405405 /// Marker types for field names
406406 #[allow(non_camel_case_types)]
407407 pub mod members {
408408- ///Marker type for the `name` field
409409- pub struct name(());
410408 ///Marker type for the `list` field
411409 pub struct list(());
412410 ///Marker type for the `created_at` field
413411 pub struct created_at(());
412412+ ///Marker type for the `name` field
413413+ pub struct name(());
414414 }
415415}
416416···563563impl<'a, S> StarterpackBuilder<'a, S>
564564where
565565 S: starterpack_state::State,
566566- S::Name: starterpack_state::IsSet,
567566 S::List: starterpack_state::IsSet,
568567 S::CreatedAt: starterpack_state::IsSet,
568568+ S::Name: starterpack_state::IsSet,
569569{
570570 /// Build the final struct
571571 pub fn build(self) -> Starterpack<'a> {
···4141 }
4242 /// State trait tracking which required fields have been set
4343 pub trait State: sealed::Sealed {
4444- type Subject;
4545- type Handle;
4644 type DisplayName;
4745 type CreatedAt;
4646+ type Handle;
4747+ type Subject;
4848 }
4949 /// Empty state - all required fields are unset
5050 pub struct Empty(());
5151 impl sealed::Sealed for Empty {}
5252 impl State for Empty {
5353- type Subject = Unset;
5454- type Handle = Unset;
5553 type DisplayName = Unset;
5654 type CreatedAt = Unset;
5757- }
5858- ///State transition - sets the `subject` field to Set
5959- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
6060- impl<S: State> sealed::Sealed for SetSubject<S> {}
6161- impl<S: State> State for SetSubject<S> {
6262- type Subject = Set<members::subject>;
6363- type Handle = S::Handle;
6464- type DisplayName = S::DisplayName;
6565- type CreatedAt = S::CreatedAt;
6666- }
6767- ///State transition - sets the `handle` field to Set
6868- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetHandle<S> {}
7070- impl<S: State> State for SetHandle<S> {
7171- type Subject = S::Subject;
7272- type Handle = Set<members::handle>;
7373- type DisplayName = S::DisplayName;
7474- type CreatedAt = S::CreatedAt;
5555+ type Handle = Unset;
5656+ type Subject = Unset;
7557 }
7658 ///State transition - sets the `display_name` field to Set
7759 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
7860 impl<S: State> sealed::Sealed for SetDisplayName<S> {}
7961 impl<S: State> State for SetDisplayName<S> {
8080- type Subject = S::Subject;
8181- type Handle = S::Handle;
8262 type DisplayName = Set<members::display_name>;
8363 type CreatedAt = S::CreatedAt;
6464+ type Handle = S::Handle;
6565+ type Subject = S::Subject;
8466 }
8567 ///State transition - sets the `created_at` field to Set
8668 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
8769 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
8870 impl<S: State> State for SetCreatedAt<S> {
7171+ type DisplayName = S::DisplayName;
7272+ type CreatedAt = Set<members::created_at>;
7373+ type Handle = S::Handle;
8974 type Subject = S::Subject;
9090- type Handle = S::Handle;
7575+ }
7676+ ///State transition - sets the `handle` field to Set
7777+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
7878+ impl<S: State> sealed::Sealed for SetHandle<S> {}
7979+ impl<S: State> State for SetHandle<S> {
9180 type DisplayName = S::DisplayName;
9292- type CreatedAt = Set<members::created_at>;
8181+ type CreatedAt = S::CreatedAt;
8282+ type Handle = Set<members::handle>;
8383+ type Subject = S::Subject;
8484+ }
8585+ ///State transition - sets the `subject` field to Set
8686+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
8787+ impl<S: State> sealed::Sealed for SetSubject<S> {}
8888+ impl<S: State> State for SetSubject<S> {
8989+ type DisplayName = S::DisplayName;
9090+ type CreatedAt = S::CreatedAt;
9191+ type Handle = S::Handle;
9292+ type Subject = Set<members::subject>;
9393 }
9494 /// Marker types for field names
9595 #[allow(non_camel_case_types)]
9696 pub mod members {
9797- ///Marker type for the `subject` field
9898- pub struct subject(());
9999- ///Marker type for the `handle` field
100100- pub struct handle(());
10197 ///Marker type for the `display_name` field
10298 pub struct display_name(());
10399 ///Marker type for the `created_at` field
104100 pub struct created_at(());
101101+ ///Marker type for the `handle` field
102102+ pub struct handle(());
103103+ ///Marker type for the `subject` field
104104+ pub struct subject(());
105105 }
106106}
107107···214214impl<'a, S> VerificationBuilder<'a, S>
215215where
216216 S: verification_state::State,
217217- S::Subject: verification_state::IsSet,
218218- S::Handle: verification_state::IsSet,
219217 S::DisplayName: verification_state::IsSet,
220218 S::CreatedAt: verification_state::IsSet,
219219+ S::Handle: verification_state::IsSet,
220220+ S::Subject: verification_state::IsSet,
221221{
222222 /// Build the final struct
223223 pub fn build(self) -> Verification<'a> {
+48-48
crates/weaver-api/src/app_bsky/labeler.rs
···632632 }
633633 /// State trait tracking which required fields have been set
634634 pub trait State: sealed::Sealed {
635635+ type IndexedAt;
635636 type Uri;
636637 type Cid;
637638 type Creator;
638638- type IndexedAt;
639639 }
640640 /// Empty state - all required fields are unset
641641 pub struct Empty(());
642642 impl sealed::Sealed for Empty {}
643643 impl State for Empty {
644644+ type IndexedAt = Unset;
644645 type Uri = Unset;
645646 type Cid = Unset;
646647 type Creator = Unset;
647647- type IndexedAt = Unset;
648648+ }
649649+ ///State transition - sets the `indexed_at` field to Set
650650+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
651651+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
652652+ impl<S: State> State for SetIndexedAt<S> {
653653+ type IndexedAt = Set<members::indexed_at>;
654654+ type Uri = S::Uri;
655655+ type Cid = S::Cid;
656656+ type Creator = S::Creator;
648657 }
649658 ///State transition - sets the `uri` field to Set
650659 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
651660 impl<S: State> sealed::Sealed for SetUri<S> {}
652661 impl<S: State> State for SetUri<S> {
662662+ type IndexedAt = S::IndexedAt;
653663 type Uri = Set<members::uri>;
654664 type Cid = S::Cid;
655665 type Creator = S::Creator;
656656- type IndexedAt = S::IndexedAt;
657666 }
658667 ///State transition - sets the `cid` field to Set
659668 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
660669 impl<S: State> sealed::Sealed for SetCid<S> {}
661670 impl<S: State> State for SetCid<S> {
671671+ type IndexedAt = S::IndexedAt;
662672 type Uri = S::Uri;
663673 type Cid = Set<members::cid>;
664674 type Creator = S::Creator;
665665- type IndexedAt = S::IndexedAt;
666675 }
667676 ///State transition - sets the `creator` field to Set
668677 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
669678 impl<S: State> sealed::Sealed for SetCreator<S> {}
670679 impl<S: State> State for SetCreator<S> {
671671- type Uri = S::Uri;
672672- type Cid = S::Cid;
673673- type Creator = Set<members::creator>;
674680 type IndexedAt = S::IndexedAt;
675675- }
676676- ///State transition - sets the `indexed_at` field to Set
677677- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
678678- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
679679- impl<S: State> State for SetIndexedAt<S> {
680681 type Uri = S::Uri;
681682 type Cid = S::Cid;
682682- type Creator = S::Creator;
683683- type IndexedAt = Set<members::indexed_at>;
683683+ type Creator = Set<members::creator>;
684684 }
685685 /// Marker types for field names
686686 #[allow(non_camel_case_types)]
687687 pub mod members {
688688+ ///Marker type for the `indexed_at` field
689689+ pub struct indexed_at(());
688690 ///Marker type for the `uri` field
689691 pub struct uri(());
690692 ///Marker type for the `cid` field
691693 pub struct cid(());
692694 ///Marker type for the `creator` field
693695 pub struct creator(());
694694- ///Marker type for the `indexed_at` field
695695- pub struct indexed_at(());
696696 }
697697}
698698···859859impl<'a, S> LabelerViewBuilder<'a, S>
860860where
861861 S: labeler_view_state::State,
862862+ S::IndexedAt: labeler_view_state::IsSet,
862863 S::Uri: labeler_view_state::IsSet,
863864 S::Cid: labeler_view_state::IsSet,
864865 S::Creator: labeler_view_state::IsSet,
865865- S::IndexedAt: labeler_view_state::IsSet,
866866{
867867 /// Build the final struct
868868 pub fn build(self) -> LabelerView<'a> {
···986986 /// State trait tracking which required fields have been set
987987 pub trait State: sealed::Sealed {
988988 type Uri;
989989- type Cid;
990989 type Creator;
991991- type Policies;
992990 type IndexedAt;
991991+ type Policies;
992992+ type Cid;
993993 }
994994 /// Empty state - all required fields are unset
995995 pub struct Empty(());
996996 impl sealed::Sealed for Empty {}
997997 impl State for Empty {
998998 type Uri = Unset;
999999- type Cid = Unset;
1000999 type Creator = Unset;
10011001- type Policies = Unset;
10021000 type IndexedAt = Unset;
10011001+ type Policies = Unset;
10021002+ type Cid = Unset;
10031003 }
10041004 ///State transition - sets the `uri` field to Set
10051005 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
10061006 impl<S: State> sealed::Sealed for SetUri<S> {}
10071007 impl<S: State> State for SetUri<S> {
10081008 type Uri = Set<members::uri>;
10091009- type Cid = S::Cid;
10101009 type Creator = S::Creator;
10111011- type Policies = S::Policies;
10121010 type IndexedAt = S::IndexedAt;
10131013- }
10141014- ///State transition - sets the `cid` field to Set
10151015- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
10161016- impl<S: State> sealed::Sealed for SetCid<S> {}
10171017- impl<S: State> State for SetCid<S> {
10181018- type Uri = S::Uri;
10191019- type Cid = Set<members::cid>;
10201020- type Creator = S::Creator;
10211011 type Policies = S::Policies;
10221022- type IndexedAt = S::IndexedAt;
10121012+ type Cid = S::Cid;
10231013 }
10241014 ///State transition - sets the `creator` field to Set
10251015 pub struct SetCreator<S: State = Empty>(PhantomData<fn() -> S>);
10261016 impl<S: State> sealed::Sealed for SetCreator<S> {}
10271017 impl<S: State> State for SetCreator<S> {
10281018 type Uri = S::Uri;
10291029- type Cid = S::Cid;
10301019 type Creator = Set<members::creator>;
10201020+ type IndexedAt = S::IndexedAt;
10311021 type Policies = S::Policies;
10321032- type IndexedAt = S::IndexedAt;
10221022+ type Cid = S::Cid;
10231023+ }
10241024+ ///State transition - sets the `indexed_at` field to Set
10251025+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
10261026+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
10271027+ impl<S: State> State for SetIndexedAt<S> {
10281028+ type Uri = S::Uri;
10291029+ type Creator = S::Creator;
10301030+ type IndexedAt = Set<members::indexed_at>;
10311031+ type Policies = S::Policies;
10321032+ type Cid = S::Cid;
10331033 }
10341034 ///State transition - sets the `policies` field to Set
10351035 pub struct SetPolicies<S: State = Empty>(PhantomData<fn() -> S>);
10361036 impl<S: State> sealed::Sealed for SetPolicies<S> {}
10371037 impl<S: State> State for SetPolicies<S> {
10381038 type Uri = S::Uri;
10391039- type Cid = S::Cid;
10401039 type Creator = S::Creator;
10411041- type Policies = Set<members::policies>;
10421040 type IndexedAt = S::IndexedAt;
10411041+ type Policies = Set<members::policies>;
10421042+ type Cid = S::Cid;
10431043 }
10441044- ///State transition - sets the `indexed_at` field to Set
10451045- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
10461046- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
10471047- impl<S: State> State for SetIndexedAt<S> {
10441044+ ///State transition - sets the `cid` field to Set
10451045+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
10461046+ impl<S: State> sealed::Sealed for SetCid<S> {}
10471047+ impl<S: State> State for SetCid<S> {
10481048 type Uri = S::Uri;
10491049- type Cid = S::Cid;
10501049 type Creator = S::Creator;
10501050+ type IndexedAt = S::IndexedAt;
10511051 type Policies = S::Policies;
10521052- type IndexedAt = Set<members::indexed_at>;
10521052+ type Cid = Set<members::cid>;
10531053 }
10541054 /// Marker types for field names
10551055 #[allow(non_camel_case_types)]
10561056 pub mod members {
10571057 ///Marker type for the `uri` field
10581058 pub struct uri(());
10591059- ///Marker type for the `cid` field
10601060- pub struct cid(());
10611059 ///Marker type for the `creator` field
10621060 pub struct creator(());
10611061+ ///Marker type for the `indexed_at` field
10621062+ pub struct indexed_at(());
10631063 ///Marker type for the `policies` field
10641064 pub struct policies(());
10651065- ///Marker type for the `indexed_at` field
10661066- pub struct indexed_at(());
10651065+ ///Marker type for the `cid` field
10661066+ pub struct cid(());
10671067 }
10681068}
10691069···13231323where
13241324 S: labeler_view_detailed_state::State,
13251325 S::Uri: labeler_view_detailed_state::IsSet,
13261326- S::Cid: labeler_view_detailed_state::IsSet,
13271326 S::Creator: labeler_view_detailed_state::IsSet,
13281328- S::Policies: labeler_view_detailed_state::IsSet,
13291327 S::IndexedAt: labeler_view_detailed_state::IsSet,
13281328+ S::Policies: labeler_view_detailed_state::IsSet,
13291329+ S::Cid: labeler_view_detailed_state::IsSet,
13301330{
13311331 /// Build the final struct
13321332 pub fn build(self) -> LabelerViewDetailed<'a> {
+13-13
crates/weaver-api/src/app_bsky/labeler/service.rs
···5454 }
5555 /// State trait tracking which required fields have been set
5656 pub trait State: sealed::Sealed {
5757- type Policies;
5857 type CreatedAt;
5858+ type Policies;
5959 }
6060 /// Empty state - all required fields are unset
6161 pub struct Empty(());
6262 impl sealed::Sealed for Empty {}
6363 impl State for Empty {
6464- type Policies = Unset;
6564 type CreatedAt = Unset;
6666- }
6767- ///State transition - sets the `policies` field to Set
6868- pub struct SetPolicies<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetPolicies<S> {}
7070- impl<S: State> State for SetPolicies<S> {
7171- type Policies = Set<members::policies>;
7272- type CreatedAt = S::CreatedAt;
6565+ type Policies = Unset;
7366 }
7467 ///State transition - sets the `created_at` field to Set
7568 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7669 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7770 impl<S: State> State for SetCreatedAt<S> {
7878- type Policies = S::Policies;
7971 type CreatedAt = Set<members::created_at>;
7272+ type Policies = S::Policies;
7373+ }
7474+ ///State transition - sets the `policies` field to Set
7575+ pub struct SetPolicies<S: State = Empty>(PhantomData<fn() -> S>);
7676+ impl<S: State> sealed::Sealed for SetPolicies<S> {}
7777+ impl<S: State> State for SetPolicies<S> {
7878+ type CreatedAt = S::CreatedAt;
7979+ type Policies = Set<members::policies>;
8080 }
8181 /// Marker types for field names
8282 #[allow(non_camel_case_types)]
8383 pub mod members {
8484- ///Marker type for the `policies` field
8585- pub struct policies(());
8684 ///Marker type for the `created_at` field
8785 pub struct created_at(());
8686+ ///Marker type for the `policies` field
8787+ pub struct policies(());
8888 }
8989}
9090···237237impl<'a, S> ServiceBuilder<'a, S>
238238where
239239 S: service_state::State,
240240- S::Policies: service_state::IsSet,
241240 S::CreatedAt: service_state::IsSet,
241241+ S::Policies: service_state::IsSet,
242242{
243243 /// Build the final struct
244244 pub fn build(self) -> Service<'a> {
+213-213
crates/weaver-api/src/app_bsky/notification.rs
···601601 }
602602 /// State trait tracking which required fields have been set
603603 pub trait State: sealed::Sealed {
604604- type Include;
605604 type Push;
605605+ type Include;
606606 }
607607 /// Empty state - all required fields are unset
608608 pub struct Empty(());
609609 impl sealed::Sealed for Empty {}
610610 impl State for Empty {
611611- type Include = Unset;
612611 type Push = Unset;
612612+ type Include = Unset;
613613+ }
614614+ ///State transition - sets the `push` field to Set
615615+ pub struct SetPush<S: State = Empty>(PhantomData<fn() -> S>);
616616+ impl<S: State> sealed::Sealed for SetPush<S> {}
617617+ impl<S: State> State for SetPush<S> {
618618+ type Push = Set<members::push>;
619619+ type Include = S::Include;
613620 }
614621 ///State transition - sets the `include` field to Set
615622 pub struct SetInclude<S: State = Empty>(PhantomData<fn() -> S>);
616623 impl<S: State> sealed::Sealed for SetInclude<S> {}
617624 impl<S: State> State for SetInclude<S> {
618618- type Include = Set<members::include>;
619625 type Push = S::Push;
620620- }
621621- ///State transition - sets the `push` field to Set
622622- pub struct SetPush<S: State = Empty>(PhantomData<fn() -> S>);
623623- impl<S: State> sealed::Sealed for SetPush<S> {}
624624- impl<S: State> State for SetPush<S> {
625625- type Include = S::Include;
626626- type Push = Set<members::push>;
626626+ type Include = Set<members::include>;
627627 }
628628 /// Marker types for field names
629629 #[allow(non_camel_case_types)]
630630 pub mod members {
631631+ ///Marker type for the `push` field
632632+ pub struct push(());
631633 ///Marker type for the `include` field
632634 pub struct include(());
633633- ///Marker type for the `push` field
634634- pub struct push(());
635635 }
636636}
637637···704704impl<'a, S> ChatPreferenceBuilder<'a, S>
705705where
706706 S: chat_preference_state::State,
707707- S::Include: chat_preference_state::IsSet,
708707 S::Push: chat_preference_state::IsSet,
708708+ S::Include: chat_preference_state::IsSet,
709709{
710710 /// Build the final struct
711711 pub fn build(self) -> ChatPreference<'a> {
···776776 }
777777 /// State trait tracking which required fields have been set
778778 pub trait State: sealed::Sealed {
779779- type Include;
780779 type List;
781780 type Push;
781781+ type Include;
782782 }
783783 /// Empty state - all required fields are unset
784784 pub struct Empty(());
785785 impl sealed::Sealed for Empty {}
786786 impl State for Empty {
787787- type Include = Unset;
788787 type List = Unset;
789788 type Push = Unset;
790790- }
791791- ///State transition - sets the `include` field to Set
792792- pub struct SetInclude<S: State = Empty>(PhantomData<fn() -> S>);
793793- impl<S: State> sealed::Sealed for SetInclude<S> {}
794794- impl<S: State> State for SetInclude<S> {
795795- type Include = Set<members::include>;
796796- type List = S::List;
797797- type Push = S::Push;
789789+ type Include = Unset;
798790 }
799791 ///State transition - sets the `list` field to Set
800792 pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
801793 impl<S: State> sealed::Sealed for SetList<S> {}
802794 impl<S: State> State for SetList<S> {
803803- type Include = S::Include;
804795 type List = Set<members::list>;
805796 type Push = S::Push;
797797+ type Include = S::Include;
806798 }
807799 ///State transition - sets the `push` field to Set
808800 pub struct SetPush<S: State = Empty>(PhantomData<fn() -> S>);
809801 impl<S: State> sealed::Sealed for SetPush<S> {}
810802 impl<S: State> State for SetPush<S> {
803803+ type List = S::List;
804804+ type Push = Set<members::push>;
811805 type Include = S::Include;
806806+ }
807807+ ///State transition - sets the `include` field to Set
808808+ pub struct SetInclude<S: State = Empty>(PhantomData<fn() -> S>);
809809+ impl<S: State> sealed::Sealed for SetInclude<S> {}
810810+ impl<S: State> State for SetInclude<S> {
812811 type List = S::List;
813813- type Push = Set<members::push>;
812812+ type Push = S::Push;
813813+ type Include = Set<members::include>;
814814 }
815815 /// Marker types for field names
816816 #[allow(non_camel_case_types)]
817817 pub mod members {
818818- ///Marker type for the `include` field
819819- pub struct include(());
820818 ///Marker type for the `list` field
821819 pub struct list(());
822820 ///Marker type for the `push` field
823821 pub struct push(());
822822+ ///Marker type for the `include` field
823823+ pub struct include(());
824824 }
825825}
826826···913913impl<'a, S> FilterablePreferenceBuilder<'a, S>
914914where
915915 S: filterable_preference_state::State,
916916- S::Include: filterable_preference_state::IsSet,
917916 S::List: filterable_preference_state::IsSet,
918917 S::Push: filterable_preference_state::IsSet,
918918+ S::Include: filterable_preference_state::IsSet,
919919{
920920 /// Build the final struct
921921 pub fn build(self) -> FilterablePreference<'a> {
···11811181 /// State trait tracking which required fields have been set
11821182 pub trait State: sealed::Sealed {
11831183 type Chat;
11841184+ type Verified;
11851185+ type StarterpackJoined;
11841186 type Follow;
11851185- type Like;
11861186- type LikeViaRepost;
11871187- type Mention;
11871187+ type Reply;
11881188 type Quote;
11891189- type Reply;
11901190- type Repost;
11911191- type RepostViaRepost;
11921192- type StarterpackJoined;
11931189 type SubscribedPost;
11901190+ type Mention;
11941191 type Unverified;
11951195- type Verified;
11921192+ type LikeViaRepost;
11931193+ type Repost;
11941194+ type Like;
11951195+ type RepostViaRepost;
11961196 }
11971197 /// Empty state - all required fields are unset
11981198 pub struct Empty(());
11991199 impl sealed::Sealed for Empty {}
12001200 impl State for Empty {
12011201 type Chat = Unset;
12021202+ type Verified = Unset;
12031203+ type StarterpackJoined = Unset;
12021204 type Follow = Unset;
12031203- type Like = Unset;
12041204- type LikeViaRepost = Unset;
12051205+ type Reply = Unset;
12061206+ type Quote = Unset;
12071207+ type SubscribedPost = Unset;
12051208 type Mention = Unset;
12061206- type Quote = Unset;
12071207- type Reply = Unset;
12091209+ type Unverified = Unset;
12101210+ type LikeViaRepost = Unset;
12081211 type Repost = Unset;
12121212+ type Like = Unset;
12091213 type RepostViaRepost = Unset;
12101210- type StarterpackJoined = Unset;
12111211- type SubscribedPost = Unset;
12121212- type Unverified = Unset;
12131213- type Verified = Unset;
12141214 }
12151215 ///State transition - sets the `chat` field to Set
12161216 pub struct SetChat<S: State = Empty>(PhantomData<fn() -> S>);
12171217 impl<S: State> sealed::Sealed for SetChat<S> {}
12181218 impl<S: State> State for SetChat<S> {
12191219 type Chat = Set<members::chat>;
12201220+ type Verified = S::Verified;
12211221+ type StarterpackJoined = S::StarterpackJoined;
12201222 type Follow = S::Follow;
12211221- type Like = S::Like;
12221222- type LikeViaRepost = S::LikeViaRepost;
12231223- type Mention = S::Mention;
12231223+ type Reply = S::Reply;
12241224 type Quote = S::Quote;
12251225- type Reply = S::Reply;
12261226- type Repost = S::Repost;
12271227- type RepostViaRepost = S::RepostViaRepost;
12281228- type StarterpackJoined = S::StarterpackJoined;
12291225 type SubscribedPost = S::SubscribedPost;
12261226+ type Mention = S::Mention;
12301227 type Unverified = S::Unverified;
12311231- type Verified = S::Verified;
12321232- }
12331233- ///State transition - sets the `follow` field to Set
12341234- pub struct SetFollow<S: State = Empty>(PhantomData<fn() -> S>);
12351235- impl<S: State> sealed::Sealed for SetFollow<S> {}
12361236- impl<S: State> State for SetFollow<S> {
12371237- type Chat = S::Chat;
12381238- type Follow = Set<members::follow>;
12391239- type Like = S::Like;
12401228 type LikeViaRepost = S::LikeViaRepost;
12411241- type Mention = S::Mention;
12421242- type Quote = S::Quote;
12431243- type Reply = S::Reply;
12441229 type Repost = S::Repost;
12301230+ type Like = S::Like;
12451231 type RepostViaRepost = S::RepostViaRepost;
12321232+ }
12331233+ ///State transition - sets the `verified` field to Set
12341234+ pub struct SetVerified<S: State = Empty>(PhantomData<fn() -> S>);
12351235+ impl<S: State> sealed::Sealed for SetVerified<S> {}
12361236+ impl<S: State> State for SetVerified<S> {
12371237+ type Chat = S::Chat;
12381238+ type Verified = Set<members::verified>;
12461239 type StarterpackJoined = S::StarterpackJoined;
12401240+ type Follow = S::Follow;
12411241+ type Reply = S::Reply;
12421242+ type Quote = S::Quote;
12471243 type SubscribedPost = S::SubscribedPost;
12441244+ type Mention = S::Mention;
12481245 type Unverified = S::Unverified;
12491249- type Verified = S::Verified;
12501250- }
12511251- ///State transition - sets the `like` field to Set
12521252- pub struct SetLike<S: State = Empty>(PhantomData<fn() -> S>);
12531253- impl<S: State> sealed::Sealed for SetLike<S> {}
12541254- impl<S: State> State for SetLike<S> {
12551255- type Chat = S::Chat;
12561256- type Follow = S::Follow;
12571257- type Like = Set<members::like>;
12581246 type LikeViaRepost = S::LikeViaRepost;
12591259- type Mention = S::Mention;
12601260- type Quote = S::Quote;
12611261- type Reply = S::Reply;
12621247 type Repost = S::Repost;
12481248+ type Like = S::Like;
12631249 type RepostViaRepost = S::RepostViaRepost;
12641264- type StarterpackJoined = S::StarterpackJoined;
12651265- type SubscribedPost = S::SubscribedPost;
12661266- type Unverified = S::Unverified;
12671267- type Verified = S::Verified;
12681250 }
12691269- ///State transition - sets the `like_via_repost` field to Set
12701270- pub struct SetLikeViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
12711271- impl<S: State> sealed::Sealed for SetLikeViaRepost<S> {}
12721272- impl<S: State> State for SetLikeViaRepost<S> {
12511251+ ///State transition - sets the `starterpack_joined` field to Set
12521252+ pub struct SetStarterpackJoined<S: State = Empty>(PhantomData<fn() -> S>);
12531253+ impl<S: State> sealed::Sealed for SetStarterpackJoined<S> {}
12541254+ impl<S: State> State for SetStarterpackJoined<S> {
12731255 type Chat = S::Chat;
12561256+ type Verified = S::Verified;
12571257+ type StarterpackJoined = Set<members::starterpack_joined>;
12741258 type Follow = S::Follow;
12751275- type Like = S::Like;
12761276- type LikeViaRepost = Set<members::like_via_repost>;
12771277- type Mention = S::Mention;
12591259+ type Reply = S::Reply;
12781260 type Quote = S::Quote;
12791279- type Reply = S::Reply;
12801280- type Repost = S::Repost;
12811281- type RepostViaRepost = S::RepostViaRepost;
12821282- type StarterpackJoined = S::StarterpackJoined;
12831261 type SubscribedPost = S::SubscribedPost;
12621262+ type Mention = S::Mention;
12841263 type Unverified = S::Unverified;
12851285- type Verified = S::Verified;
12861286- }
12871287- ///State transition - sets the `mention` field to Set
12881288- pub struct SetMention<S: State = Empty>(PhantomData<fn() -> S>);
12891289- impl<S: State> sealed::Sealed for SetMention<S> {}
12901290- impl<S: State> State for SetMention<S> {
12911291- type Chat = S::Chat;
12921292- type Follow = S::Follow;
12931293- type Like = S::Like;
12941264 type LikeViaRepost = S::LikeViaRepost;
12951295- type Mention = Set<members::mention>;
12961296- type Quote = S::Quote;
12971297- type Reply = S::Reply;
12981265 type Repost = S::Repost;
12661266+ type Like = S::Like;
12991267 type RepostViaRepost = S::RepostViaRepost;
12681268+ }
12691269+ ///State transition - sets the `follow` field to Set
12701270+ pub struct SetFollow<S: State = Empty>(PhantomData<fn() -> S>);
12711271+ impl<S: State> sealed::Sealed for SetFollow<S> {}
12721272+ impl<S: State> State for SetFollow<S> {
12731273+ type Chat = S::Chat;
12741274+ type Verified = S::Verified;
13001275 type StarterpackJoined = S::StarterpackJoined;
12761276+ type Follow = Set<members::follow>;
12771277+ type Reply = S::Reply;
12781278+ type Quote = S::Quote;
13011279 type SubscribedPost = S::SubscribedPost;
12801280+ type Mention = S::Mention;
13021281 type Unverified = S::Unverified;
13031303- type Verified = S::Verified;
13041304- }
13051305- ///State transition - sets the `quote` field to Set
13061306- pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
13071307- impl<S: State> sealed::Sealed for SetQuote<S> {}
13081308- impl<S: State> State for SetQuote<S> {
13091309- type Chat = S::Chat;
13101310- type Follow = S::Follow;
13111311- type Like = S::Like;
13121282 type LikeViaRepost = S::LikeViaRepost;
13131313- type Mention = S::Mention;
13141314- type Quote = Set<members::quote>;
13151315- type Reply = S::Reply;
13161283 type Repost = S::Repost;
12841284+ type Like = S::Like;
13171285 type RepostViaRepost = S::RepostViaRepost;
13181318- type StarterpackJoined = S::StarterpackJoined;
13191319- type SubscribedPost = S::SubscribedPost;
13201320- type Unverified = S::Unverified;
13211321- type Verified = S::Verified;
13221286 }
13231287 ///State transition - sets the `reply` field to Set
13241288 pub struct SetReply<S: State = Empty>(PhantomData<fn() -> S>);
13251289 impl<S: State> sealed::Sealed for SetReply<S> {}
13261290 impl<S: State> State for SetReply<S> {
13271291 type Chat = S::Chat;
12921292+ type Verified = S::Verified;
12931293+ type StarterpackJoined = S::StarterpackJoined;
13281294 type Follow = S::Follow;
13291329- type Like = S::Like;
13301330- type LikeViaRepost = S::LikeViaRepost;
13311331- type Mention = S::Mention;
12951295+ type Reply = Set<members::reply>;
13321296 type Quote = S::Quote;
13331333- type Reply = Set<members::reply>;
13341334- type Repost = S::Repost;
13351335- type RepostViaRepost = S::RepostViaRepost;
13361336- type StarterpackJoined = S::StarterpackJoined;
13371297 type SubscribedPost = S::SubscribedPost;
12981298+ type Mention = S::Mention;
13381299 type Unverified = S::Unverified;
13391339- type Verified = S::Verified;
13401340- }
13411341- ///State transition - sets the `repost` field to Set
13421342- pub struct SetRepost<S: State = Empty>(PhantomData<fn() -> S>);
13431343- impl<S: State> sealed::Sealed for SetRepost<S> {}
13441344- impl<S: State> State for SetRepost<S> {
13451345- type Chat = S::Chat;
13461346- type Follow = S::Follow;
13001300+ type LikeViaRepost = S::LikeViaRepost;
13011301+ type Repost = S::Repost;
13471302 type Like = S::Like;
13481348- type LikeViaRepost = S::LikeViaRepost;
13491349- type Mention = S::Mention;
13501350- type Quote = S::Quote;
13511351- type Reply = S::Reply;
13521352- type Repost = Set<members::repost>;
13531303 type RepostViaRepost = S::RepostViaRepost;
13541354- type StarterpackJoined = S::StarterpackJoined;
13551355- type SubscribedPost = S::SubscribedPost;
13561356- type Unverified = S::Unverified;
13571357- type Verified = S::Verified;
13581304 }
13591359- ///State transition - sets the `repost_via_repost` field to Set
13601360- pub struct SetRepostViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
13611361- impl<S: State> sealed::Sealed for SetRepostViaRepost<S> {}
13621362- impl<S: State> State for SetRepostViaRepost<S> {
13051305+ ///State transition - sets the `quote` field to Set
13061306+ pub struct SetQuote<S: State = Empty>(PhantomData<fn() -> S>);
13071307+ impl<S: State> sealed::Sealed for SetQuote<S> {}
13081308+ impl<S: State> State for SetQuote<S> {
13631309 type Chat = S::Chat;
13101310+ type Verified = S::Verified;
13111311+ type StarterpackJoined = S::StarterpackJoined;
13641312 type Follow = S::Follow;
13651365- type Like = S::Like;
13661366- type LikeViaRepost = S::LikeViaRepost;
13671367- type Mention = S::Mention;
13681368- type Quote = S::Quote;
13691313 type Reply = S::Reply;
13701370- type Repost = S::Repost;
13711371- type RepostViaRepost = Set<members::repost_via_repost>;
13721372- type StarterpackJoined = S::StarterpackJoined;
13141314+ type Quote = Set<members::quote>;
13731315 type SubscribedPost = S::SubscribedPost;
13161316+ type Mention = S::Mention;
13741317 type Unverified = S::Unverified;
13751375- type Verified = S::Verified;
13761376- }
13771377- ///State transition - sets the `starterpack_joined` field to Set
13781378- pub struct SetStarterpackJoined<S: State = Empty>(PhantomData<fn() -> S>);
13791379- impl<S: State> sealed::Sealed for SetStarterpackJoined<S> {}
13801380- impl<S: State> State for SetStarterpackJoined<S> {
13811381- type Chat = S::Chat;
13821382- type Follow = S::Follow;
13831383- type Like = S::Like;
13841318 type LikeViaRepost = S::LikeViaRepost;
13851385- type Mention = S::Mention;
13861386- type Quote = S::Quote;
13871387- type Reply = S::Reply;
13881319 type Repost = S::Repost;
13201320+ type Like = S::Like;
13891321 type RepostViaRepost = S::RepostViaRepost;
13901390- type StarterpackJoined = Set<members::starterpack_joined>;
13911391- type SubscribedPost = S::SubscribedPost;
13921392- type Unverified = S::Unverified;
13931393- type Verified = S::Verified;
13941322 }
13951323 ///State transition - sets the `subscribed_post` field to Set
13961324 pub struct SetSubscribedPost<S: State = Empty>(PhantomData<fn() -> S>);
13971325 impl<S: State> sealed::Sealed for SetSubscribedPost<S> {}
13981326 impl<S: State> State for SetSubscribedPost<S> {
13991327 type Chat = S::Chat;
13281328+ type Verified = S::Verified;
13291329+ type StarterpackJoined = S::StarterpackJoined;
14001330 type Follow = S::Follow;
14011401- type Like = S::Like;
14021402- type LikeViaRepost = S::LikeViaRepost;
13311331+ type Reply = S::Reply;
13321332+ type Quote = S::Quote;
13331333+ type SubscribedPost = Set<members::subscribed_post>;
14031334 type Mention = S::Mention;
14041404- type Quote = S::Quote;
14051405- type Reply = S::Reply;
13351335+ type Unverified = S::Unverified;
13361336+ type LikeViaRepost = S::LikeViaRepost;
14061337 type Repost = S::Repost;
13381338+ type Like = S::Like;
14071339 type RepostViaRepost = S::RepostViaRepost;
13401340+ }
13411341+ ///State transition - sets the `mention` field to Set
13421342+ pub struct SetMention<S: State = Empty>(PhantomData<fn() -> S>);
13431343+ impl<S: State> sealed::Sealed for SetMention<S> {}
13441344+ impl<S: State> State for SetMention<S> {
13451345+ type Chat = S::Chat;
13461346+ type Verified = S::Verified;
14081347 type StarterpackJoined = S::StarterpackJoined;
14091409- type SubscribedPost = Set<members::subscribed_post>;
13481348+ type Follow = S::Follow;
13491349+ type Reply = S::Reply;
13501350+ type Quote = S::Quote;
13511351+ type SubscribedPost = S::SubscribedPost;
13521352+ type Mention = Set<members::mention>;
14101353 type Unverified = S::Unverified;
14111411- type Verified = S::Verified;
13541354+ type LikeViaRepost = S::LikeViaRepost;
13551355+ type Repost = S::Repost;
13561356+ type Like = S::Like;
13571357+ type RepostViaRepost = S::RepostViaRepost;
14121358 }
14131359 ///State transition - sets the `unverified` field to Set
14141360 pub struct SetUnverified<S: State = Empty>(PhantomData<fn() -> S>);
14151361 impl<S: State> sealed::Sealed for SetUnverified<S> {}
14161362 impl<S: State> State for SetUnverified<S> {
14171363 type Chat = S::Chat;
13641364+ type Verified = S::Verified;
13651365+ type StarterpackJoined = S::StarterpackJoined;
14181366 type Follow = S::Follow;
13671367+ type Reply = S::Reply;
13681368+ type Quote = S::Quote;
13691369+ type SubscribedPost = S::SubscribedPost;
13701370+ type Mention = S::Mention;
13711371+ type Unverified = Set<members::unverified>;
13721372+ type LikeViaRepost = S::LikeViaRepost;
13731373+ type Repost = S::Repost;
14191374 type Like = S::Like;
14201420- type LikeViaRepost = S::LikeViaRepost;
13751375+ type RepostViaRepost = S::RepostViaRepost;
13761376+ }
13771377+ ///State transition - sets the `like_via_repost` field to Set
13781378+ pub struct SetLikeViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
13791379+ impl<S: State> sealed::Sealed for SetLikeViaRepost<S> {}
13801380+ impl<S: State> State for SetLikeViaRepost<S> {
13811381+ type Chat = S::Chat;
13821382+ type Verified = S::Verified;
13831383+ type StarterpackJoined = S::StarterpackJoined;
13841384+ type Follow = S::Follow;
13851385+ type Reply = S::Reply;
13861386+ type Quote = S::Quote;
13871387+ type SubscribedPost = S::SubscribedPost;
14211388 type Mention = S::Mention;
14221422- type Quote = S::Quote;
14231423- type Reply = S::Reply;
13891389+ type Unverified = S::Unverified;
13901390+ type LikeViaRepost = Set<members::like_via_repost>;
14241391 type Repost = S::Repost;
13921392+ type Like = S::Like;
14251393 type RepostViaRepost = S::RepostViaRepost;
13941394+ }
13951395+ ///State transition - sets the `repost` field to Set
13961396+ pub struct SetRepost<S: State = Empty>(PhantomData<fn() -> S>);
13971397+ impl<S: State> sealed::Sealed for SetRepost<S> {}
13981398+ impl<S: State> State for SetRepost<S> {
13991399+ type Chat = S::Chat;
14001400+ type Verified = S::Verified;
14261401 type StarterpackJoined = S::StarterpackJoined;
14021402+ type Follow = S::Follow;
14031403+ type Reply = S::Reply;
14041404+ type Quote = S::Quote;
14271405 type SubscribedPost = S::SubscribedPost;
14281428- type Unverified = Set<members::unverified>;
14291429- type Verified = S::Verified;
14061406+ type Mention = S::Mention;
14071407+ type Unverified = S::Unverified;
14081408+ type LikeViaRepost = S::LikeViaRepost;
14091409+ type Repost = Set<members::repost>;
14101410+ type Like = S::Like;
14111411+ type RepostViaRepost = S::RepostViaRepost;
14301412 }
14311431- ///State transition - sets the `verified` field to Set
14321432- pub struct SetVerified<S: State = Empty>(PhantomData<fn() -> S>);
14331433- impl<S: State> sealed::Sealed for SetVerified<S> {}
14341434- impl<S: State> State for SetVerified<S> {
14131413+ ///State transition - sets the `like` field to Set
14141414+ pub struct SetLike<S: State = Empty>(PhantomData<fn() -> S>);
14151415+ impl<S: State> sealed::Sealed for SetLike<S> {}
14161416+ impl<S: State> State for SetLike<S> {
14351417 type Chat = S::Chat;
14181418+ type Verified = S::Verified;
14191419+ type StarterpackJoined = S::StarterpackJoined;
14361420 type Follow = S::Follow;
14371437- type Like = S::Like;
14381438- type LikeViaRepost = S::LikeViaRepost;
14391439- type Mention = S::Mention;
14211421+ type Reply = S::Reply;
14401422 type Quote = S::Quote;
14411441- type Reply = S::Reply;
14231423+ type SubscribedPost = S::SubscribedPost;
14241424+ type Mention = S::Mention;
14251425+ type Unverified = S::Unverified;
14261426+ type LikeViaRepost = S::LikeViaRepost;
14421427 type Repost = S::Repost;
14281428+ type Like = Set<members::like>;
14431429 type RepostViaRepost = S::RepostViaRepost;
14301430+ }
14311431+ ///State transition - sets the `repost_via_repost` field to Set
14321432+ pub struct SetRepostViaRepost<S: State = Empty>(PhantomData<fn() -> S>);
14331433+ impl<S: State> sealed::Sealed for SetRepostViaRepost<S> {}
14341434+ impl<S: State> State for SetRepostViaRepost<S> {
14351435+ type Chat = S::Chat;
14361436+ type Verified = S::Verified;
14441437 type StarterpackJoined = S::StarterpackJoined;
14381438+ type Follow = S::Follow;
14391439+ type Reply = S::Reply;
14401440+ type Quote = S::Quote;
14451441 type SubscribedPost = S::SubscribedPost;
14421442+ type Mention = S::Mention;
14461443 type Unverified = S::Unverified;
14471447- type Verified = Set<members::verified>;
14441444+ type LikeViaRepost = S::LikeViaRepost;
14451445+ type Repost = S::Repost;
14461446+ type Like = S::Like;
14471447+ type RepostViaRepost = Set<members::repost_via_repost>;
14481448 }
14491449 /// Marker types for field names
14501450 #[allow(non_camel_case_types)]
14511451 pub mod members {
14521452 ///Marker type for the `chat` field
14531453 pub struct chat(());
14541454+ ///Marker type for the `verified` field
14551455+ pub struct verified(());
14561456+ ///Marker type for the `starterpack_joined` field
14571457+ pub struct starterpack_joined(());
14541458 ///Marker type for the `follow` field
14551459 pub struct follow(());
14561456- ///Marker type for the `like` field
14571457- pub struct like(());
14581458- ///Marker type for the `like_via_repost` field
14591459- pub struct like_via_repost(());
14601460+ ///Marker type for the `reply` field
14611461+ pub struct reply(());
14621462+ ///Marker type for the `quote` field
14631463+ pub struct quote(());
14641464+ ///Marker type for the `subscribed_post` field
14651465+ pub struct subscribed_post(());
14601466 ///Marker type for the `mention` field
14611467 pub struct mention(());
14621462- ///Marker type for the `quote` field
14631463- pub struct quote(());
14641464- ///Marker type for the `reply` field
14651465- pub struct reply(());
14681468+ ///Marker type for the `unverified` field
14691469+ pub struct unverified(());
14701470+ ///Marker type for the `like_via_repost` field
14711471+ pub struct like_via_repost(());
14661472 ///Marker type for the `repost` field
14671473 pub struct repost(());
14741474+ ///Marker type for the `like` field
14751475+ pub struct like(());
14681476 ///Marker type for the `repost_via_repost` field
14691477 pub struct repost_via_repost(());
14701470- ///Marker type for the `starterpack_joined` field
14711471- pub struct starterpack_joined(());
14721472- ///Marker type for the `subscribed_post` field
14731473- pub struct subscribed_post(());
14741474- ///Marker type for the `unverified` field
14751475- pub struct unverified(());
14761476- ///Marker type for the `verified` field
14771477- pub struct verified(());
14781478 }
14791479}
14801480···17821782where
17831783 S: preferences_state::State,
17841784 S::Chat: preferences_state::IsSet,
17851785+ S::Verified: preferences_state::IsSet,
17861786+ S::StarterpackJoined: preferences_state::IsSet,
17851787 S::Follow: preferences_state::IsSet,
17861786- S::Like: preferences_state::IsSet,
17871787- S::LikeViaRepost: preferences_state::IsSet,
17881788- S::Mention: preferences_state::IsSet,
17891789- S::Quote: preferences_state::IsSet,
17901788 S::Reply: preferences_state::IsSet,
17911791- S::Repost: preferences_state::IsSet,
17921792- S::RepostViaRepost: preferences_state::IsSet,
17931793- S::StarterpackJoined: preferences_state::IsSet,
17891789+ S::Quote: preferences_state::IsSet,
17941790 S::SubscribedPost: preferences_state::IsSet,
17911791+ S::Mention: preferences_state::IsSet,
17951792 S::Unverified: preferences_state::IsSet,
17961796- S::Verified: preferences_state::IsSet,
17931793+ S::LikeViaRepost: preferences_state::IsSet,
17941794+ S::Repost: preferences_state::IsSet,
17951795+ S::Like: preferences_state::IsSet,
17961796+ S::RepostViaRepost: preferences_state::IsSet,
17971797{
17981798 /// Build the final struct
17991799 pub fn build(self) -> Preferences<'a> {
···271271 }
272272 /// State trait tracking which required fields have been set
273273 pub trait State: sealed::Sealed {
274274- type Uri;
275274 type Cid;
276275 type Author;
277277- type Reason;
278276 type Record;
279277 type IsRead;
280278 type IndexedAt;
279279+ type Reason;
280280+ type Uri;
281281 }
282282 /// Empty state - all required fields are unset
283283 pub struct Empty(());
284284 impl sealed::Sealed for Empty {}
285285 impl State for Empty {
286286- type Uri = Unset;
287286 type Cid = Unset;
288287 type Author = Unset;
289289- type Reason = Unset;
290288 type Record = Unset;
291289 type IsRead = Unset;
292290 type IndexedAt = Unset;
293293- }
294294- ///State transition - sets the `uri` field to Set
295295- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
296296- impl<S: State> sealed::Sealed for SetUri<S> {}
297297- impl<S: State> State for SetUri<S> {
298298- type Uri = Set<members::uri>;
299299- type Cid = S::Cid;
300300- type Author = S::Author;
301301- type Reason = S::Reason;
302302- type Record = S::Record;
303303- type IsRead = S::IsRead;
304304- type IndexedAt = S::IndexedAt;
291291+ type Reason = Unset;
292292+ type Uri = Unset;
305293 }
306294 ///State transition - sets the `cid` field to Set
307295 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
308296 impl<S: State> sealed::Sealed for SetCid<S> {}
309297 impl<S: State> State for SetCid<S> {
310310- type Uri = S::Uri;
311298 type Cid = Set<members::cid>;
312299 type Author = S::Author;
313313- type Reason = S::Reason;
314300 type Record = S::Record;
315301 type IsRead = S::IsRead;
316302 type IndexedAt = S::IndexedAt;
303303+ type Reason = S::Reason;
304304+ type Uri = S::Uri;
317305 }
318306 ///State transition - sets the `author` field to Set
319307 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
320308 impl<S: State> sealed::Sealed for SetAuthor<S> {}
321309 impl<S: State> State for SetAuthor<S> {
322322- type Uri = S::Uri;
323310 type Cid = S::Cid;
324311 type Author = Set<members::author>;
325325- type Reason = S::Reason;
326312 type Record = S::Record;
327313 type IsRead = S::IsRead;
328314 type IndexedAt = S::IndexedAt;
329329- }
330330- ///State transition - sets the `reason` field to Set
331331- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
332332- impl<S: State> sealed::Sealed for SetReason<S> {}
333333- impl<S: State> State for SetReason<S> {
315315+ type Reason = S::Reason;
334316 type Uri = S::Uri;
335335- type Cid = S::Cid;
336336- type Author = S::Author;
337337- type Reason = Set<members::reason>;
338338- type Record = S::Record;
339339- type IsRead = S::IsRead;
340340- type IndexedAt = S::IndexedAt;
341317 }
342318 ///State transition - sets the `record` field to Set
343319 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
344320 impl<S: State> sealed::Sealed for SetRecord<S> {}
345321 impl<S: State> State for SetRecord<S> {
346346- type Uri = S::Uri;
347322 type Cid = S::Cid;
348323 type Author = S::Author;
349349- type Reason = S::Reason;
350324 type Record = Set<members::record>;
351325 type IsRead = S::IsRead;
352326 type IndexedAt = S::IndexedAt;
327327+ type Reason = S::Reason;
328328+ type Uri = S::Uri;
353329 }
354330 ///State transition - sets the `is_read` field to Set
355331 pub struct SetIsRead<S: State = Empty>(PhantomData<fn() -> S>);
356332 impl<S: State> sealed::Sealed for SetIsRead<S> {}
357333 impl<S: State> State for SetIsRead<S> {
358358- type Uri = S::Uri;
359334 type Cid = S::Cid;
360335 type Author = S::Author;
361361- type Reason = S::Reason;
362336 type Record = S::Record;
363337 type IsRead = Set<members::is_read>;
364338 type IndexedAt = S::IndexedAt;
339339+ type Reason = S::Reason;
340340+ type Uri = S::Uri;
365341 }
366342 ///State transition - sets the `indexed_at` field to Set
367343 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
368344 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
369345 impl<S: State> State for SetIndexedAt<S> {
346346+ type Cid = S::Cid;
347347+ type Author = S::Author;
348348+ type Record = S::Record;
349349+ type IsRead = S::IsRead;
350350+ type IndexedAt = Set<members::indexed_at>;
351351+ type Reason = S::Reason;
370352 type Uri = S::Uri;
353353+ }
354354+ ///State transition - sets the `reason` field to Set
355355+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
356356+ impl<S: State> sealed::Sealed for SetReason<S> {}
357357+ impl<S: State> State for SetReason<S> {
371358 type Cid = S::Cid;
372359 type Author = S::Author;
373373- type Reason = S::Reason;
360360+ type Record = S::Record;
361361+ type IsRead = S::IsRead;
362362+ type IndexedAt = S::IndexedAt;
363363+ type Reason = Set<members::reason>;
364364+ type Uri = S::Uri;
365365+ }
366366+ ///State transition - sets the `uri` field to Set
367367+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
368368+ impl<S: State> sealed::Sealed for SetUri<S> {}
369369+ impl<S: State> State for SetUri<S> {
370370+ type Cid = S::Cid;
371371+ type Author = S::Author;
374372 type Record = S::Record;
375373 type IsRead = S::IsRead;
376376- type IndexedAt = Set<members::indexed_at>;
374374+ type IndexedAt = S::IndexedAt;
375375+ type Reason = S::Reason;
376376+ type Uri = Set<members::uri>;
377377 }
378378 /// Marker types for field names
379379 #[allow(non_camel_case_types)]
380380 pub mod members {
381381- ///Marker type for the `uri` field
382382- pub struct uri(());
383381 ///Marker type for the `cid` field
384382 pub struct cid(());
385383 ///Marker type for the `author` field
386384 pub struct author(());
387387- ///Marker type for the `reason` field
388388- pub struct reason(());
389385 ///Marker type for the `record` field
390386 pub struct record(());
391387 ///Marker type for the `is_read` field
392388 pub struct is_read(());
393389 ///Marker type for the `indexed_at` field
394390 pub struct indexed_at(());
391391+ ///Marker type for the `reason` field
392392+ pub struct reason(());
393393+ ///Marker type for the `uri` field
394394+ pub struct uri(());
395395 }
396396}
397397···614614impl<'a, S> NotificationBuilder<'a, S>
615615where
616616 S: notification_state::State,
617617- S::Uri: notification_state::IsSet,
618617 S::Cid: notification_state::IsSet,
619618 S::Author: notification_state::IsSet,
620620- S::Reason: notification_state::IsSet,
621619 S::Record: notification_state::IsSet,
622620 S::IsRead: notification_state::IsSet,
623621 S::IndexedAt: notification_state::IsSet,
622622+ S::Reason: notification_state::IsSet,
623623+ S::Uri: notification_state::IsSet,
624624{
625625 /// Build the final struct
626626 pub fn build(self) -> Notification<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Subject;
3736 type ActivitySubscription;
3737+ type Subject;
3838 }
3939 /// Empty state - all required fields are unset
4040 pub struct Empty(());
4141 impl sealed::Sealed for Empty {}
4242 impl State for Empty {
4343- type Subject = Unset;
4443 type ActivitySubscription = Unset;
4545- }
4646- ///State transition - sets the `subject` field to Set
4747- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetSubject<S> {}
4949- impl<S: State> State for SetSubject<S> {
5050- type Subject = Set<members::subject>;
5151- type ActivitySubscription = S::ActivitySubscription;
4444+ type Subject = Unset;
5245 }
5346 ///State transition - sets the `activity_subscription` field to Set
5447 pub struct SetActivitySubscription<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetActivitySubscription<S> {}
5649 impl<S: State> State for SetActivitySubscription<S> {
5757- type Subject = S::Subject;
5850 type ActivitySubscription = Set<members::activity_subscription>;
5151+ type Subject = S::Subject;
5252+ }
5353+ ///State transition - sets the `subject` field to Set
5454+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5656+ impl<S: State> State for SetSubject<S> {
5757+ type ActivitySubscription = S::ActivitySubscription;
5858+ type Subject = Set<members::subject>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `subject` field
6464- pub struct subject(());
6563 ///Marker type for the `activity_subscription` field
6664 pub struct activity_subscription(());
6565+ ///Marker type for the `subject` field
6666+ pub struct subject(());
6767 }
6868}
6969···148148impl<'a, S> PutActivitySubscriptionBuilder<'a, S>
149149where
150150 S: put_activity_subscription_state::State,
151151- S::Subject: put_activity_subscription_state::IsSet,
152151 S::ActivitySubscription: put_activity_subscription_state::IsSet,
152152+ S::Subject: put_activity_subscription_state::IsSet,
153153{
154154 /// Build the final struct
155155 pub fn build(self) -> PutActivitySubscription<'a> {
···4141 /// State trait tracking which required fields have been set
4242 pub trait State: sealed::Sealed {
4343 type ServiceDid;
4444- type Token;
4544 type Platform;
4545+ type Token;
4646 type AppId;
4747 }
4848 /// Empty state - all required fields are unset
···5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252 type ServiceDid = Unset;
5353- type Token = Unset;
5453 type Platform = Unset;
5454+ type Token = Unset;
5555 type AppId = Unset;
5656 }
5757 ///State transition - sets the `service_did` field to Set
···5959 impl<S: State> sealed::Sealed for SetServiceDid<S> {}
6060 impl<S: State> State for SetServiceDid<S> {
6161 type ServiceDid = Set<members::service_did>;
6262- type Token = S::Token;
6362 type Platform = S::Platform;
6464- type AppId = S::AppId;
6565- }
6666- ///State transition - sets the `token` field to Set
6767- pub struct SetToken<S: State = Empty>(PhantomData<fn() -> S>);
6868- impl<S: State> sealed::Sealed for SetToken<S> {}
6969- impl<S: State> State for SetToken<S> {
7070- type ServiceDid = S::ServiceDid;
7171- type Token = Set<members::token>;
7272- type Platform = S::Platform;
6363+ type Token = S::Token;
7364 type AppId = S::AppId;
7465 }
7566 ///State transition - sets the `platform` field to Set
···7768 impl<S: State> sealed::Sealed for SetPlatform<S> {}
7869 impl<S: State> State for SetPlatform<S> {
7970 type ServiceDid = S::ServiceDid;
8080- type Token = S::Token;
8171 type Platform = Set<members::platform>;
7272+ type Token = S::Token;
7373+ type AppId = S::AppId;
7474+ }
7575+ ///State transition - sets the `token` field to Set
7676+ pub struct SetToken<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetToken<S> {}
7878+ impl<S: State> State for SetToken<S> {
7979+ type ServiceDid = S::ServiceDid;
8080+ type Platform = S::Platform;
8181+ type Token = Set<members::token>;
8282 type AppId = S::AppId;
8383 }
8484 ///State transition - sets the `app_id` field to Set
···8686 impl<S: State> sealed::Sealed for SetAppId<S> {}
8787 impl<S: State> State for SetAppId<S> {
8888 type ServiceDid = S::ServiceDid;
8989- type Token = S::Token;
9089 type Platform = S::Platform;
9090+ type Token = S::Token;
9191 type AppId = Set<members::app_id>;
9292 }
9393 /// Marker types for field names
···9595 pub mod members {
9696 ///Marker type for the `service_did` field
9797 pub struct service_did(());
9898+ ///Marker type for the `platform` field
9999+ pub struct platform(());
98100 ///Marker type for the `token` field
99101 pub struct token(());
100100- ///Marker type for the `platform` field
101101- pub struct platform(());
102102 ///Marker type for the `app_id` field
103103 pub struct app_id(());
104104 }
···228228where
229229 S: register_push_state::State,
230230 S::ServiceDid: register_push_state::IsSet,
231231- S::Token: register_push_state::IsSet,
232231 S::Platform: register_push_state::IsSet,
232232+ S::Token: register_push_state::IsSet,
233233 S::AppId: register_push_state::IsSet,
234234{
235235 /// Build the final struct
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040+ type AppId;
4141+ type Platform;
4242+ type Token;
4043 type ServiceDid;
4141- type Token;
4242- type Platform;
4343- type AppId;
4444 }
4545 /// Empty state - all required fields are unset
4646 pub struct Empty(());
4747 impl sealed::Sealed for Empty {}
4848 impl State for Empty {
4949- type ServiceDid = Unset;
5050- type Token = Unset;
5151- type Platform = Unset;
5249 type AppId = Unset;
5050+ type Platform = Unset;
5151+ type Token = Unset;
5252+ type ServiceDid = Unset;
5353 }
5454- ///State transition - sets the `service_did` field to Set
5555- pub struct SetServiceDid<S: State = Empty>(PhantomData<fn() -> S>);
5656- impl<S: State> sealed::Sealed for SetServiceDid<S> {}
5757- impl<S: State> State for SetServiceDid<S> {
5858- type ServiceDid = Set<members::service_did>;
5959- type Token = S::Token;
5454+ ///State transition - sets the `app_id` field to Set
5555+ pub struct SetAppId<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetAppId<S> {}
5757+ impl<S: State> State for SetAppId<S> {
5858+ type AppId = Set<members::app_id>;
6059 type Platform = S::Platform;
6161- type AppId = S::AppId;
6262- }
6363- ///State transition - sets the `token` field to Set
6464- pub struct SetToken<S: State = Empty>(PhantomData<fn() -> S>);
6565- impl<S: State> sealed::Sealed for SetToken<S> {}
6666- impl<S: State> State for SetToken<S> {
6060+ type Token = S::Token;
6761 type ServiceDid = S::ServiceDid;
6868- type Token = Set<members::token>;
6969- type Platform = S::Platform;
7070- type AppId = S::AppId;
7162 }
7263 ///State transition - sets the `platform` field to Set
7364 pub struct SetPlatform<S: State = Empty>(PhantomData<fn() -> S>);
7465 impl<S: State> sealed::Sealed for SetPlatform<S> {}
7566 impl<S: State> State for SetPlatform<S> {
7676- type ServiceDid = S::ServiceDid;
7777- type Token = S::Token;
7878- type Platform = Set<members::platform>;
7967 type AppId = S::AppId;
6868+ type Platform = Set<members::platform>;
6969+ type Token = S::Token;
7070+ type ServiceDid = S::ServiceDid;
8071 }
8181- ///State transition - sets the `app_id` field to Set
8282- pub struct SetAppId<S: State = Empty>(PhantomData<fn() -> S>);
8383- impl<S: State> sealed::Sealed for SetAppId<S> {}
8484- impl<S: State> State for SetAppId<S> {
7272+ ///State transition - sets the `token` field to Set
7373+ pub struct SetToken<S: State = Empty>(PhantomData<fn() -> S>);
7474+ impl<S: State> sealed::Sealed for SetToken<S> {}
7575+ impl<S: State> State for SetToken<S> {
7676+ type AppId = S::AppId;
7777+ type Platform = S::Platform;
7878+ type Token = Set<members::token>;
8579 type ServiceDid = S::ServiceDid;
8686- type Token = S::Token;
8080+ }
8181+ ///State transition - sets the `service_did` field to Set
8282+ pub struct SetServiceDid<S: State = Empty>(PhantomData<fn() -> S>);
8383+ impl<S: State> sealed::Sealed for SetServiceDid<S> {}
8484+ impl<S: State> State for SetServiceDid<S> {
8585+ type AppId = S::AppId;
8786 type Platform = S::Platform;
8888- type AppId = Set<members::app_id>;
8787+ type Token = S::Token;
8888+ type ServiceDid = Set<members::service_did>;
8989 }
9090 /// Marker types for field names
9191 #[allow(non_camel_case_types)]
9292 pub mod members {
9393- ///Marker type for the `service_did` field
9494- pub struct service_did(());
9595- ///Marker type for the `token` field
9696- pub struct token(());
9393+ ///Marker type for the `app_id` field
9494+ pub struct app_id(());
9795 ///Marker type for the `platform` field
9896 pub struct platform(());
9999- ///Marker type for the `app_id` field
100100- pub struct app_id(());
9797+ ///Marker type for the `token` field
9898+ pub struct token(());
9999+ ///Marker type for the `service_did` field
100100+ pub struct service_did(());
101101 }
102102}
103103···210210impl<'a, S> UnregisterPushBuilder<'a, S>
211211where
212212 S: unregister_push_state::State,
213213- S::ServiceDid: unregister_push_state::IsSet,
214214- S::Token: unregister_push_state::IsSet,
215215- S::Platform: unregister_push_state::IsSet,
216213 S::AppId: unregister_push_state::IsSet,
214214+ S::Platform: unregister_push_state::IsSet,
215215+ S::Token: unregister_push_state::IsSet,
216216+ S::ServiceDid: unregister_push_state::IsSet,
217217{
218218 /// Build the final struct
219219 pub fn build(self) -> UnregisterPush<'a> {
+13-13
crates/weaver-api/src/app_bsky/richtext/facet.rs
···3232 }
3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535- type ByteStart;
3635 type ByteEnd;
3636+ type ByteStart;
3737 }
3838 /// Empty state - all required fields are unset
3939 pub struct Empty(());
4040 impl sealed::Sealed for Empty {}
4141 impl State for Empty {
4242- type ByteStart = Unset;
4342 type ByteEnd = Unset;
4444- }
4545- ///State transition - sets the `byte_start` field to Set
4646- pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetByteStart<S> {}
4848- impl<S: State> State for SetByteStart<S> {
4949- type ByteStart = Set<members::byte_start>;
5050- type ByteEnd = S::ByteEnd;
4343+ type ByteStart = Unset;
5144 }
5245 ///State transition - sets the `byte_end` field to Set
5346 pub struct SetByteEnd<S: State = Empty>(PhantomData<fn() -> S>);
5447 impl<S: State> sealed::Sealed for SetByteEnd<S> {}
5548 impl<S: State> State for SetByteEnd<S> {
5656- type ByteStart = S::ByteStart;
5749 type ByteEnd = Set<members::byte_end>;
5050+ type ByteStart = S::ByteStart;
5151+ }
5252+ ///State transition - sets the `byte_start` field to Set
5353+ pub struct SetByteStart<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetByteStart<S> {}
5555+ impl<S: State> State for SetByteStart<S> {
5656+ type ByteEnd = S::ByteEnd;
5757+ type ByteStart = Set<members::byte_start>;
5858 }
5959 /// Marker types for field names
6060 #[allow(non_camel_case_types)]
6161 pub mod members {
6262- ///Marker type for the `byte_start` field
6363- pub struct byte_start(());
6462 ///Marker type for the `byte_end` field
6563 pub struct byte_end(());
6464+ ///Marker type for the `byte_start` field
6565+ pub struct byte_start(());
6666 }
6767}
6868···132132impl<'a, S> ByteSliceBuilder<'a, S>
133133where
134134 S: byte_slice_state::State,
135135- S::ByteStart: byte_slice_state::IsSet,
136135 S::ByteEnd: byte_slice_state::IsSet,
136136+ S::ByteStart: byte_slice_state::IsSet,
137137{
138138 /// Build the final struct
139139 pub fn build(self) -> ByteSlice<'a> {
+114-114
crates/weaver-api/src/app_bsky/unspecced.rs
···8181 }
8282 /// State trait tracking which required fields have been set
8383 pub trait State: sealed::Sealed {
8484- type CreatedAt;
8585- type Status;
8684 type AttemptId;
8585+ type Status;
8686+ type CreatedAt;
8787 }
8888 /// Empty state - all required fields are unset
8989 pub struct Empty(());
9090 impl sealed::Sealed for Empty {}
9191 impl State for Empty {
9292+ type AttemptId = Unset;
9393+ type Status = Unset;
9294 type CreatedAt = Unset;
9393- type Status = Unset;
9494- type AttemptId = Unset;
9595 }
9696- ///State transition - sets the `created_at` field to Set
9797- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
9898- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
9999- impl<S: State> State for SetCreatedAt<S> {
100100- type CreatedAt = Set<members::created_at>;
9696+ ///State transition - sets the `attempt_id` field to Set
9797+ pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
9898+ impl<S: State> sealed::Sealed for SetAttemptId<S> {}
9999+ impl<S: State> State for SetAttemptId<S> {
100100+ type AttemptId = Set<members::attempt_id>;
101101 type Status = S::Status;
102102- type AttemptId = S::AttemptId;
102102+ type CreatedAt = S::CreatedAt;
103103 }
104104 ///State transition - sets the `status` field to Set
105105 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
106106 impl<S: State> sealed::Sealed for SetStatus<S> {}
107107 impl<S: State> State for SetStatus<S> {
108108- type CreatedAt = S::CreatedAt;
109109- type Status = Set<members::status>;
110108 type AttemptId = S::AttemptId;
109109+ type Status = Set<members::status>;
110110+ type CreatedAt = S::CreatedAt;
111111 }
112112- ///State transition - sets the `attempt_id` field to Set
113113- pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
114114- impl<S: State> sealed::Sealed for SetAttemptId<S> {}
115115- impl<S: State> State for SetAttemptId<S> {
116116- type CreatedAt = S::CreatedAt;
112112+ ///State transition - sets the `created_at` field to Set
113113+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
114114+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
115115+ impl<S: State> State for SetCreatedAt<S> {
116116+ type AttemptId = S::AttemptId;
117117 type Status = S::Status;
118118- type AttemptId = Set<members::attempt_id>;
118118+ type CreatedAt = Set<members::created_at>;
119119 }
120120 /// Marker types for field names
121121 #[allow(non_camel_case_types)]
122122 pub mod members {
123123+ ///Marker type for the `attempt_id` field
124124+ pub struct attempt_id(());
125125+ ///Marker type for the `status` field
126126+ pub struct status(());
123127 ///Marker type for the `created_at` field
124128 pub struct created_at(());
125125- ///Marker type for the `status` field
126126- pub struct status(());
127127- ///Marker type for the `attempt_id` field
128128- pub struct attempt_id(());
129129 }
130130}
131131···309309impl<'a, S> AgeAssuranceEventBuilder<'a, S>
310310where
311311 S: age_assurance_event_state::State,
312312- S::CreatedAt: age_assurance_event_state::IsSet,
313313- S::Status: age_assurance_event_state::IsSet,
314312 S::AttemptId: age_assurance_event_state::IsSet,
313313+ S::Status: age_assurance_event_state::IsSet,
314314+ S::CreatedAt: age_assurance_event_state::IsSet,
315315{
316316 /// Build the final struct
317317 pub fn build(self) -> AgeAssuranceEvent<'a> {
···17451745 pub trait State: sealed::Sealed {
17461746 type Topic;
17471747 type DisplayName;
17481748- type Link;
17491748 type StartedAt;
17501749 type PostCount;
17511750 type Dids;
17511751+ type Link;
17521752 }
17531753 /// Empty state - all required fields are unset
17541754 pub struct Empty(());
···17561756 impl State for Empty {
17571757 type Topic = Unset;
17581758 type DisplayName = Unset;
17591759- type Link = Unset;
17601759 type StartedAt = Unset;
17611760 type PostCount = Unset;
17621761 type Dids = Unset;
17621762+ type Link = Unset;
17631763 }
17641764 ///State transition - sets the `topic` field to Set
17651765 pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
···17671767 impl<S: State> State for SetTopic<S> {
17681768 type Topic = Set<members::topic>;
17691769 type DisplayName = S::DisplayName;
17701770- type Link = S::Link;
17711770 type StartedAt = S::StartedAt;
17721771 type PostCount = S::PostCount;
17731772 type Dids = S::Dids;
17731773+ type Link = S::Link;
17741774 }
17751775 ///State transition - sets the `display_name` field to Set
17761776 pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
···17781778 impl<S: State> State for SetDisplayName<S> {
17791779 type Topic = S::Topic;
17801780 type DisplayName = Set<members::display_name>;
17811781- type Link = S::Link;
17821781 type StartedAt = S::StartedAt;
17831782 type PostCount = S::PostCount;
17841783 type Dids = S::Dids;
17851785- }
17861786- ///State transition - sets the `link` field to Set
17871787- pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
17881788- impl<S: State> sealed::Sealed for SetLink<S> {}
17891789- impl<S: State> State for SetLink<S> {
17901790- type Topic = S::Topic;
17911791- type DisplayName = S::DisplayName;
17921792- type Link = Set<members::link>;
17931793- type StartedAt = S::StartedAt;
17941794- type PostCount = S::PostCount;
17951795- type Dids = S::Dids;
17841784+ type Link = S::Link;
17961785 }
17971786 ///State transition - sets the `started_at` field to Set
17981787 pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
···18001789 impl<S: State> State for SetStartedAt<S> {
18011790 type Topic = S::Topic;
18021791 type DisplayName = S::DisplayName;
18031803- type Link = S::Link;
18041792 type StartedAt = Set<members::started_at>;
18051793 type PostCount = S::PostCount;
18061794 type Dids = S::Dids;
17951795+ type Link = S::Link;
18071796 }
18081797 ///State transition - sets the `post_count` field to Set
18091798 pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
···18111800 impl<S: State> State for SetPostCount<S> {
18121801 type Topic = S::Topic;
18131802 type DisplayName = S::DisplayName;
18141814- type Link = S::Link;
18151803 type StartedAt = S::StartedAt;
18161804 type PostCount = Set<members::post_count>;
18171805 type Dids = S::Dids;
18061806+ type Link = S::Link;
18181807 }
18191808 ///State transition - sets the `dids` field to Set
18201809 pub struct SetDids<S: State = Empty>(PhantomData<fn() -> S>);
···18221811 impl<S: State> State for SetDids<S> {
18231812 type Topic = S::Topic;
18241813 type DisplayName = S::DisplayName;
18251825- type Link = S::Link;
18261814 type StartedAt = S::StartedAt;
18271815 type PostCount = S::PostCount;
18281816 type Dids = Set<members::dids>;
18171817+ type Link = S::Link;
18181818+ }
18191819+ ///State transition - sets the `link` field to Set
18201820+ pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
18211821+ impl<S: State> sealed::Sealed for SetLink<S> {}
18221822+ impl<S: State> State for SetLink<S> {
18231823+ type Topic = S::Topic;
18241824+ type DisplayName = S::DisplayName;
18251825+ type StartedAt = S::StartedAt;
18261826+ type PostCount = S::PostCount;
18271827+ type Dids = S::Dids;
18281828+ type Link = Set<members::link>;
18291829 }
18301830 /// Marker types for field names
18311831 #[allow(non_camel_case_types)]
···18341834 pub struct topic(());
18351835 ///Marker type for the `display_name` field
18361836 pub struct display_name(());
18371837- ///Marker type for the `link` field
18381838- pub struct link(());
18391837 ///Marker type for the `started_at` field
18401838 pub struct started_at(());
18411839 ///Marker type for the `post_count` field
18421840 pub struct post_count(());
18431841 ///Marker type for the `dids` field
18441842 pub struct dids(());
18431843+ ///Marker type for the `link` field
18441844+ pub struct link(());
18451845 }
18461846}
18471847···20302030 S: skeleton_trend_state::State,
20312031 S::Topic: skeleton_trend_state::IsSet,
20322032 S::DisplayName: skeleton_trend_state::IsSet,
20332033- S::Link: skeleton_trend_state::IsSet,
20342033 S::StartedAt: skeleton_trend_state::IsSet,
20352034 S::PostCount: skeleton_trend_state::IsSet,
20362035 S::Dids: skeleton_trend_state::IsSet,
20362036+ S::Link: skeleton_trend_state::IsSet,
20372037{
20382038 /// Build the final struct
20392039 pub fn build(self) -> SkeletonTrend<'a> {
···23222322 }
23232323 /// State trait tracking which required fields have been set
23242324 pub trait State: sealed::Sealed {
23252325+ type OpThread;
23252326 type Post;
23262327 type MoreParents;
23272328 type MoreReplies;
23282328- type OpThread;
23292329 type HiddenByThreadgate;
23302330 type MutedByViewer;
23312331 }
···23332333 pub struct Empty(());
23342334 impl sealed::Sealed for Empty {}
23352335 impl State for Empty {
23362336+ type OpThread = Unset;
23362337 type Post = Unset;
23372338 type MoreParents = Unset;
23382339 type MoreReplies = Unset;
23392339- type OpThread = Unset;
23402340 type HiddenByThreadgate = Unset;
23412341 type MutedByViewer = Unset;
23422342 }
23432343+ ///State transition - sets the `op_thread` field to Set
23442344+ pub struct SetOpThread<S: State = Empty>(PhantomData<fn() -> S>);
23452345+ impl<S: State> sealed::Sealed for SetOpThread<S> {}
23462346+ impl<S: State> State for SetOpThread<S> {
23472347+ type OpThread = Set<members::op_thread>;
23482348+ type Post = S::Post;
23492349+ type MoreParents = S::MoreParents;
23502350+ type MoreReplies = S::MoreReplies;
23512351+ type HiddenByThreadgate = S::HiddenByThreadgate;
23522352+ type MutedByViewer = S::MutedByViewer;
23532353+ }
23432354 ///State transition - sets the `post` field to Set
23442355 pub struct SetPost<S: State = Empty>(PhantomData<fn() -> S>);
23452356 impl<S: State> sealed::Sealed for SetPost<S> {}
23462357 impl<S: State> State for SetPost<S> {
23582358+ type OpThread = S::OpThread;
23472359 type Post = Set<members::post>;
23482360 type MoreParents = S::MoreParents;
23492361 type MoreReplies = S::MoreReplies;
23502350- type OpThread = S::OpThread;
23512362 type HiddenByThreadgate = S::HiddenByThreadgate;
23522363 type MutedByViewer = S::MutedByViewer;
23532364 }
···23552366 pub struct SetMoreParents<S: State = Empty>(PhantomData<fn() -> S>);
23562367 impl<S: State> sealed::Sealed for SetMoreParents<S> {}
23572368 impl<S: State> State for SetMoreParents<S> {
23692369+ type OpThread = S::OpThread;
23582370 type Post = S::Post;
23592371 type MoreParents = Set<members::more_parents>;
23602372 type MoreReplies = S::MoreReplies;
23612361- type OpThread = S::OpThread;
23622373 type HiddenByThreadgate = S::HiddenByThreadgate;
23632374 type MutedByViewer = S::MutedByViewer;
23642375 }
···23662377 pub struct SetMoreReplies<S: State = Empty>(PhantomData<fn() -> S>);
23672378 impl<S: State> sealed::Sealed for SetMoreReplies<S> {}
23682379 impl<S: State> State for SetMoreReplies<S> {
23692369- type Post = S::Post;
23702370- type MoreParents = S::MoreParents;
23712371- type MoreReplies = Set<members::more_replies>;
23722380 type OpThread = S::OpThread;
23732373- type HiddenByThreadgate = S::HiddenByThreadgate;
23742374- type MutedByViewer = S::MutedByViewer;
23752375- }
23762376- ///State transition - sets the `op_thread` field to Set
23772377- pub struct SetOpThread<S: State = Empty>(PhantomData<fn() -> S>);
23782378- impl<S: State> sealed::Sealed for SetOpThread<S> {}
23792379- impl<S: State> State for SetOpThread<S> {
23802381 type Post = S::Post;
23812382 type MoreParents = S::MoreParents;
23822382- type MoreReplies = S::MoreReplies;
23832383- type OpThread = Set<members::op_thread>;
23832383+ type MoreReplies = Set<members::more_replies>;
23842384 type HiddenByThreadgate = S::HiddenByThreadgate;
23852385 type MutedByViewer = S::MutedByViewer;
23862386 }
···23882388 pub struct SetHiddenByThreadgate<S: State = Empty>(PhantomData<fn() -> S>);
23892389 impl<S: State> sealed::Sealed for SetHiddenByThreadgate<S> {}
23902390 impl<S: State> State for SetHiddenByThreadgate<S> {
23912391+ type OpThread = S::OpThread;
23912392 type Post = S::Post;
23922393 type MoreParents = S::MoreParents;
23932394 type MoreReplies = S::MoreReplies;
23942394- type OpThread = S::OpThread;
23952395 type HiddenByThreadgate = Set<members::hidden_by_threadgate>;
23962396 type MutedByViewer = S::MutedByViewer;
23972397 }
···23992399 pub struct SetMutedByViewer<S: State = Empty>(PhantomData<fn() -> S>);
24002400 impl<S: State> sealed::Sealed for SetMutedByViewer<S> {}
24012401 impl<S: State> State for SetMutedByViewer<S> {
24022402+ type OpThread = S::OpThread;
24022403 type Post = S::Post;
24032404 type MoreParents = S::MoreParents;
24042405 type MoreReplies = S::MoreReplies;
24052405- type OpThread = S::OpThread;
24062406 type HiddenByThreadgate = S::HiddenByThreadgate;
24072407 type MutedByViewer = Set<members::muted_by_viewer>;
24082408 }
24092409 /// Marker types for field names
24102410 #[allow(non_camel_case_types)]
24112411 pub mod members {
24122412+ ///Marker type for the `op_thread` field
24132413+ pub struct op_thread(());
24122414 ///Marker type for the `post` field
24132415 pub struct post(());
24142416 ///Marker type for the `more_parents` field
24152417 pub struct more_parents(());
24162418 ///Marker type for the `more_replies` field
24172419 pub struct more_replies(());
24182418- ///Marker type for the `op_thread` field
24192419- pub struct op_thread(());
24202420 ///Marker type for the `hidden_by_threadgate` field
24212421 pub struct hidden_by_threadgate(());
24222422 ///Marker type for the `muted_by_viewer` field
···25732573impl<'a, S> ThreadItemPostBuilder<'a, S>
25742574where
25752575 S: thread_item_post_state::State,
25762576+ S::OpThread: thread_item_post_state::IsSet,
25762577 S::Post: thread_item_post_state::IsSet,
25772578 S::MoreParents: thread_item_post_state::IsSet,
25782579 S::MoreReplies: thread_item_post_state::IsSet,
25792579- S::OpThread: thread_item_post_state::IsSet,
25802580 S::HiddenByThreadgate: thread_item_post_state::IsSet,
25812581 S::MutedByViewer: thread_item_post_state::IsSet,
25822582{
···26692669 }
26702670 /// State trait tracking which required fields have been set
26712671 pub trait State: sealed::Sealed {
26722672- type Topic;
26732673- type DisplayName;
26742674- type Link;
26752672 type StartedAt;
26732673+ type Link;
26762674 type PostCount;
26772675 type Actors;
26762676+ type Topic;
26772677+ type DisplayName;
26782678 }
26792679 /// Empty state - all required fields are unset
26802680 pub struct Empty(());
26812681 impl sealed::Sealed for Empty {}
26822682 impl State for Empty {
26832683- type Topic = Unset;
26842684- type DisplayName = Unset;
26832683+ type StartedAt = Unset;
26852684 type Link = Unset;
26862686- type StartedAt = Unset;
26872685 type PostCount = Unset;
26882686 type Actors = Unset;
26872687+ type Topic = Unset;
26882688+ type DisplayName = Unset;
26892689 }
26902690- ///State transition - sets the `topic` field to Set
26912691- pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
26922692- impl<S: State> sealed::Sealed for SetTopic<S> {}
26932693- impl<S: State> State for SetTopic<S> {
26942694- type Topic = Set<members::topic>;
26952695- type DisplayName = S::DisplayName;
26902690+ ///State transition - sets the `started_at` field to Set
26912691+ pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
26922692+ impl<S: State> sealed::Sealed for SetStartedAt<S> {}
26932693+ impl<S: State> State for SetStartedAt<S> {
26942694+ type StartedAt = Set<members::started_at>;
26962695 type Link = S::Link;
26972697- type StartedAt = S::StartedAt;
26982696 type PostCount = S::PostCount;
26992697 type Actors = S::Actors;
27002700- }
27012701- ///State transition - sets the `display_name` field to Set
27022702- pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
27032703- impl<S: State> sealed::Sealed for SetDisplayName<S> {}
27042704- impl<S: State> State for SetDisplayName<S> {
27052698 type Topic = S::Topic;
27062706- type DisplayName = Set<members::display_name>;
27072707- type Link = S::Link;
27082708- type StartedAt = S::StartedAt;
27092709- type PostCount = S::PostCount;
27102710- type Actors = S::Actors;
26992699+ type DisplayName = S::DisplayName;
27112700 }
27122701 ///State transition - sets the `link` field to Set
27132702 pub struct SetLink<S: State = Empty>(PhantomData<fn() -> S>);
27142703 impl<S: State> sealed::Sealed for SetLink<S> {}
27152704 impl<S: State> State for SetLink<S> {
27162716- type Topic = S::Topic;
27172717- type DisplayName = S::DisplayName;
27052705+ type StartedAt = S::StartedAt;
27182706 type Link = Set<members::link>;
27192719- type StartedAt = S::StartedAt;
27202707 type PostCount = S::PostCount;
27212708 type Actors = S::Actors;
27222722- }
27232723- ///State transition - sets the `started_at` field to Set
27242724- pub struct SetStartedAt<S: State = Empty>(PhantomData<fn() -> S>);
27252725- impl<S: State> sealed::Sealed for SetStartedAt<S> {}
27262726- impl<S: State> State for SetStartedAt<S> {
27272709 type Topic = S::Topic;
27282710 type DisplayName = S::DisplayName;
27292729- type Link = S::Link;
27302730- type StartedAt = Set<members::started_at>;
27312731- type PostCount = S::PostCount;
27322732- type Actors = S::Actors;
27332711 }
27342712 ///State transition - sets the `post_count` field to Set
27352713 pub struct SetPostCount<S: State = Empty>(PhantomData<fn() -> S>);
27362714 impl<S: State> sealed::Sealed for SetPostCount<S> {}
27372715 impl<S: State> State for SetPostCount<S> {
27382738- type Topic = S::Topic;
27392739- type DisplayName = S::DisplayName;
27162716+ type StartedAt = S::StartedAt;
27402717 type Link = S::Link;
27412741- type StartedAt = S::StartedAt;
27422718 type PostCount = Set<members::post_count>;
27432719 type Actors = S::Actors;
27202720+ type Topic = S::Topic;
27212721+ type DisplayName = S::DisplayName;
27442722 }
27452723 ///State transition - sets the `actors` field to Set
27462724 pub struct SetActors<S: State = Empty>(PhantomData<fn() -> S>);
27472725 impl<S: State> sealed::Sealed for SetActors<S> {}
27482726 impl<S: State> State for SetActors<S> {
27272727+ type StartedAt = S::StartedAt;
27282728+ type Link = S::Link;
27292729+ type PostCount = S::PostCount;
27302730+ type Actors = Set<members::actors>;
27492731 type Topic = S::Topic;
27502732 type DisplayName = S::DisplayName;
27332733+ }
27342734+ ///State transition - sets the `topic` field to Set
27352735+ pub struct SetTopic<S: State = Empty>(PhantomData<fn() -> S>);
27362736+ impl<S: State> sealed::Sealed for SetTopic<S> {}
27372737+ impl<S: State> State for SetTopic<S> {
27382738+ type StartedAt = S::StartedAt;
27512739 type Link = S::Link;
27402740+ type PostCount = S::PostCount;
27412741+ type Actors = S::Actors;
27422742+ type Topic = Set<members::topic>;
27432743+ type DisplayName = S::DisplayName;
27442744+ }
27452745+ ///State transition - sets the `display_name` field to Set
27462746+ pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
27472747+ impl<S: State> sealed::Sealed for SetDisplayName<S> {}
27482748+ impl<S: State> State for SetDisplayName<S> {
27522749 type StartedAt = S::StartedAt;
27502750+ type Link = S::Link;
27532751 type PostCount = S::PostCount;
27542754- type Actors = Set<members::actors>;
27522752+ type Actors = S::Actors;
27532753+ type Topic = S::Topic;
27542754+ type DisplayName = Set<members::display_name>;
27552755 }
27562756 /// Marker types for field names
27572757 #[allow(non_camel_case_types)]
27582758 pub mod members {
27592759- ///Marker type for the `topic` field
27602760- pub struct topic(());
27612761- ///Marker type for the `display_name` field
27622762- pub struct display_name(());
27632763- ///Marker type for the `link` field
27642764- pub struct link(());
27652759 ///Marker type for the `started_at` field
27662760 pub struct started_at(());
27612761+ ///Marker type for the `link` field
27622762+ pub struct link(());
27672763 ///Marker type for the `post_count` field
27682764 pub struct post_count(());
27692765 ///Marker type for the `actors` field
27702766 pub struct actors(());
27672767+ ///Marker type for the `topic` field
27682768+ pub struct topic(());
27692769+ ///Marker type for the `display_name` field
27702770+ pub struct display_name(());
27712771 }
27722772}
27732773···29542954impl<'a, S> TrendViewBuilder<'a, S>
29552955where
29562956 S: trend_view_state::State,
29572957- S::Topic: trend_view_state::IsSet,
29582958- S::DisplayName: trend_view_state::IsSet,
29592959- S::Link: trend_view_state::IsSet,
29602957 S::StartedAt: trend_view_state::IsSet,
29582958+ S::Link: trend_view_state::IsSet,
29612959 S::PostCount: trend_view_state::IsSet,
29622960 S::Actors: trend_view_state::IsSet,
29612961+ S::Topic: trend_view_state::IsSet,
29622962+ S::DisplayName: trend_view_state::IsSet,
29632963{
29642964 /// Build the final struct
29652965 pub fn build(self) -> TrendView<'a> {
···189189 }
190190 /// State trait tracking which required fields have been set
191191 pub trait State: sealed::Sealed {
192192- type Uri;
193193- type Depth;
194192 type Value;
193193+ type Depth;
194194+ type Uri;
195195 }
196196 /// Empty state - all required fields are unset
197197 pub struct Empty(());
198198 impl sealed::Sealed for Empty {}
199199 impl State for Empty {
200200+ type Value = Unset;
201201+ type Depth = Unset;
200202 type Uri = Unset;
201201- type Depth = Unset;
202202- type Value = Unset;
203203 }
204204- ///State transition - sets the `uri` field to Set
205205- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
206206- impl<S: State> sealed::Sealed for SetUri<S> {}
207207- impl<S: State> State for SetUri<S> {
208208- type Uri = Set<members::uri>;
204204+ ///State transition - sets the `value` field to Set
205205+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
206206+ impl<S: State> sealed::Sealed for SetValue<S> {}
207207+ impl<S: State> State for SetValue<S> {
208208+ type Value = Set<members::value>;
209209 type Depth = S::Depth;
210210- type Value = S::Value;
210210+ type Uri = S::Uri;
211211 }
212212 ///State transition - sets the `depth` field to Set
213213 pub struct SetDepth<S: State = Empty>(PhantomData<fn() -> S>);
214214 impl<S: State> sealed::Sealed for SetDepth<S> {}
215215 impl<S: State> State for SetDepth<S> {
216216- type Uri = S::Uri;
217217- type Depth = Set<members::depth>;
218216 type Value = S::Value;
217217+ type Depth = Set<members::depth>;
218218+ type Uri = S::Uri;
219219 }
220220- ///State transition - sets the `value` field to Set
221221- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
222222- impl<S: State> sealed::Sealed for SetValue<S> {}
223223- impl<S: State> State for SetValue<S> {
224224- type Uri = S::Uri;
220220+ ///State transition - sets the `uri` field to Set
221221+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
222222+ impl<S: State> sealed::Sealed for SetUri<S> {}
223223+ impl<S: State> State for SetUri<S> {
224224+ type Value = S::Value;
225225 type Depth = S::Depth;
226226- type Value = Set<members::value>;
226226+ type Uri = Set<members::uri>;
227227 }
228228 /// Marker types for field names
229229 #[allow(non_camel_case_types)]
230230 pub mod members {
231231+ ///Marker type for the `value` field
232232+ pub struct value(());
233233+ ///Marker type for the `depth` field
234234+ pub struct depth(());
231235 ///Marker type for the `uri` field
232236 pub struct uri(());
233233- ///Marker type for the `depth` field
234234- pub struct depth(());
235235- ///Marker type for the `value` field
236236- pub struct value(());
237237 }
238238}
239239···326326impl<'a, S> ThreadItemBuilder<'a, S>
327327where
328328 S: thread_item_state::State,
329329- S::Uri: thread_item_state::IsSet,
330330- S::Depth: thread_item_state::IsSet,
331329 S::Value: thread_item_state::IsSet,
330330+ S::Depth: thread_item_state::IsSet,
331331+ S::Uri: thread_item_state::IsSet,
332332{
333333 /// Build the final struct
334334 pub fn build(self) -> ThreadItem<'a> {
···9191 /// State trait tracking which required fields have been set
9292 pub trait State: sealed::Sealed {
9393 type Tag;
9494- type SubjectType;
9594 type Subject;
9595+ type SubjectType;
9696 }
9797 /// Empty state - all required fields are unset
9898 pub struct Empty(());
9999 impl sealed::Sealed for Empty {}
100100 impl State for Empty {
101101 type Tag = Unset;
102102- type SubjectType = Unset;
103102 type Subject = Unset;
103103+ type SubjectType = Unset;
104104 }
105105 ///State transition - sets the `tag` field to Set
106106 pub struct SetTag<S: State = Empty>(PhantomData<fn() -> S>);
107107 impl<S: State> sealed::Sealed for SetTag<S> {}
108108 impl<S: State> State for SetTag<S> {
109109 type Tag = Set<members::tag>;
110110- type SubjectType = S::SubjectType;
111110 type Subject = S::Subject;
112112- }
113113- ///State transition - sets the `subject_type` field to Set
114114- pub struct SetSubjectType<S: State = Empty>(PhantomData<fn() -> S>);
115115- impl<S: State> sealed::Sealed for SetSubjectType<S> {}
116116- impl<S: State> State for SetSubjectType<S> {
117117- type Tag = S::Tag;
118118- type SubjectType = Set<members::subject_type>;
119119- type Subject = S::Subject;
111111+ type SubjectType = S::SubjectType;
120112 }
121113 ///State transition - sets the `subject` field to Set
122114 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
123115 impl<S: State> sealed::Sealed for SetSubject<S> {}
124116 impl<S: State> State for SetSubject<S> {
125117 type Tag = S::Tag;
126126- type SubjectType = S::SubjectType;
127118 type Subject = Set<members::subject>;
119119+ type SubjectType = S::SubjectType;
120120+ }
121121+ ///State transition - sets the `subject_type` field to Set
122122+ pub struct SetSubjectType<S: State = Empty>(PhantomData<fn() -> S>);
123123+ impl<S: State> sealed::Sealed for SetSubjectType<S> {}
124124+ impl<S: State> State for SetSubjectType<S> {
125125+ type Tag = S::Tag;
126126+ type Subject = S::Subject;
127127+ type SubjectType = Set<members::subject_type>;
128128 }
129129 /// Marker types for field names
130130 #[allow(non_camel_case_types)]
131131 pub mod members {
132132 ///Marker type for the `tag` field
133133 pub struct tag(());
134134+ ///Marker type for the `subject` field
135135+ pub struct subject(());
134136 ///Marker type for the `subject_type` field
135137 pub struct subject_type(());
136136- ///Marker type for the `subject` field
137137- pub struct subject(());
138138 }
139139}
140140···228228where
229229 S: suggestion_state::State,
230230 S::Tag: suggestion_state::IsSet,
231231- S::SubjectType: suggestion_state::IsSet,
232231 S::Subject: suggestion_state::IsSet,
232232+ S::SubjectType: suggestion_state::IsSet,
233233{
234234 /// Build the final struct
235235 pub fn build(self) -> Suggestion<'a> {
+15-15
crates/weaver-api/src/app_bsky/video.rs
···5252 }
5353 /// State trait tracking which required fields have been set
5454 pub trait State: sealed::Sealed {
5555- type JobId;
5655 type Did;
5656+ type JobId;
5757 type State;
5858 }
5959 /// Empty state - all required fields are unset
6060 pub struct Empty(());
6161 impl sealed::Sealed for Empty {}
6262 impl State for Empty {
6363- type JobId = Unset;
6463 type Did = Unset;
6464+ type JobId = Unset;
6565 type State = Unset;
6666 }
6767- ///State transition - sets the `job_id` field to Set
6868- pub struct SetJobId<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetJobId<S> {}
7070- impl<S: State> State for SetJobId<S> {
7171- type JobId = Set<members::job_id>;
7272- type Did = S::Did;
7373- type State = S::State;
7474- }
7567 ///State transition - sets the `did` field to Set
7668 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
7769 impl<S: State> sealed::Sealed for SetDid<S> {}
7870 impl<S: State> State for SetDid<S> {
7979- type JobId = S::JobId;
8071 type Did = Set<members::did>;
7272+ type JobId = S::JobId;
7373+ type State = S::State;
7474+ }
7575+ ///State transition - sets the `job_id` field to Set
7676+ pub struct SetJobId<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetJobId<S> {}
7878+ impl<S: State> State for SetJobId<S> {
7979+ type Did = S::Did;
8080+ type JobId = Set<members::job_id>;
8181 type State = S::State;
8282 }
8383 ///State transition - sets the `state` field to Set
8484 pub struct SetState<S: State = Empty>(PhantomData<fn() -> S>);
8585 impl<S: State> sealed::Sealed for SetState<S> {}
8686 impl<S: State> State for SetState<S> {
8787- type JobId = S::JobId;
8887 type Did = S::Did;
8888+ type JobId = S::JobId;
8989 type State = Set<members::state>;
9090 }
9191 /// Marker types for field names
9292 #[allow(non_camel_case_types)]
9393 pub mod members {
9494+ ///Marker type for the `did` field
9595+ pub struct did(());
9496 ///Marker type for the `job_id` field
9597 pub struct job_id(());
9696- ///Marker type for the `did` field
9797- pub struct did(());
9898 ///Marker type for the `state` field
9999 pub struct state(());
100100 }
···257257impl<'a, S> JobStatusBuilder<'a, S>
258258where
259259 S: job_status_state::State,
260260- S::JobId: job_status_state::IsSet,
261260 S::Did: job_status_state::IsSet,
261261+ S::JobId: job_status_state::IsSet,
262262 S::State: job_status_state::IsSet,
263263{
264264 /// Build the final struct
+13-13
crates/weaver-api/src/chat_bsky/actor.rs
···5858 }
5959 /// State trait tracking which required fields have been set
6060 pub trait State: sealed::Sealed {
6161- type Did;
6261 type Handle;
6262+ type Did;
6363 }
6464 /// Empty state - all required fields are unset
6565 pub struct Empty(());
6666 impl sealed::Sealed for Empty {}
6767 impl State for Empty {
6868- type Did = Unset;
6968 type Handle = Unset;
7070- }
7171- ///State transition - sets the `did` field to Set
7272- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
7373- impl<S: State> sealed::Sealed for SetDid<S> {}
7474- impl<S: State> State for SetDid<S> {
7575- type Did = Set<members::did>;
7676- type Handle = S::Handle;
6969+ type Did = Unset;
7770 }
7871 ///State transition - sets the `handle` field to Set
7972 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
8073 impl<S: State> sealed::Sealed for SetHandle<S> {}
8174 impl<S: State> State for SetHandle<S> {
8282- type Did = S::Did;
8375 type Handle = Set<members::handle>;
7676+ type Did = S::Did;
7777+ }
7878+ ///State transition - sets the `did` field to Set
7979+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
8080+ impl<S: State> sealed::Sealed for SetDid<S> {}
8181+ impl<S: State> State for SetDid<S> {
8282+ type Handle = S::Handle;
8383+ type Did = Set<members::did>;
8484 }
8585 /// Marker types for field names
8686 #[allow(non_camel_case_types)]
8787 pub mod members {
8888- ///Marker type for the `did` field
8989- pub struct did(());
9088 ///Marker type for the `handle` field
9189 pub struct handle(());
9090+ ///Marker type for the `did` field
9191+ pub struct did(());
9292 }
9393}
9494···305305impl<'a, S> ProfileViewBasicBuilder<'a, S>
306306where
307307 S: profile_view_basic_state::State,
308308- S::Did: profile_view_basic_state::IsSet,
309308 S::Handle: profile_view_basic_state::IsSet,
309309+ S::Did: profile_view_basic_state::IsSet,
310310{
311311 /// Build the final struct
312312 pub fn build(self) -> ProfileViewBasic<'a> {
+206-206
crates/weaver-api/src/chat_bsky/convo.rs
···6666 }
6767 /// State trait tracking which required fields have been set
6868 pub trait State: sealed::Sealed {
6969- type Id;
7069 type Rev;
7070+ type Id;
7171 type Members;
7272+ type UnreadCount;
7273 type Muted;
7373- type UnreadCount;
7474 }
7575 /// Empty state - all required fields are unset
7676 pub struct Empty(());
7777 impl sealed::Sealed for Empty {}
7878 impl State for Empty {
7979+ type Rev = Unset;
7980 type Id = Unset;
8080- type Rev = Unset;
8181 type Members = Unset;
8282+ type UnreadCount = Unset;
8283 type Muted = Unset;
8383- type UnreadCount = Unset;
8484+ }
8585+ ///State transition - sets the `rev` field to Set
8686+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
8787+ impl<S: State> sealed::Sealed for SetRev<S> {}
8888+ impl<S: State> State for SetRev<S> {
8989+ type Rev = Set<members::rev>;
9090+ type Id = S::Id;
9191+ type Members = S::Members;
9292+ type UnreadCount = S::UnreadCount;
9393+ type Muted = S::Muted;
8494 }
8595 ///State transition - sets the `id` field to Set
8696 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
8797 impl<S: State> sealed::Sealed for SetId<S> {}
8898 impl<S: State> State for SetId<S> {
8989- type Id = Set<members::id>;
9099 type Rev = S::Rev;
100100+ type Id = Set<members::id>;
91101 type Members = S::Members;
9292- type Muted = S::Muted;
93102 type UnreadCount = S::UnreadCount;
9494- }
9595- ///State transition - sets the `rev` field to Set
9696- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
9797- impl<S: State> sealed::Sealed for SetRev<S> {}
9898- impl<S: State> State for SetRev<S> {
9999- type Id = S::Id;
100100- type Rev = Set<members::rev>;
101101- type Members = S::Members;
102103 type Muted = S::Muted;
103103- type UnreadCount = S::UnreadCount;
104104 }
105105 ///State transition - sets the `members` field to Set
106106 pub struct SetMembers<S: State = Empty>(PhantomData<fn() -> S>);
107107 impl<S: State> sealed::Sealed for SetMembers<S> {}
108108 impl<S: State> State for SetMembers<S> {
109109- type Id = S::Id;
110109 type Rev = S::Rev;
111111- type Members = Set<members::members>;
112112- type Muted = S::Muted;
113113- type UnreadCount = S::UnreadCount;
114114- }
115115- ///State transition - sets the `muted` field to Set
116116- pub struct SetMuted<S: State = Empty>(PhantomData<fn() -> S>);
117117- impl<S: State> sealed::Sealed for SetMuted<S> {}
118118- impl<S: State> State for SetMuted<S> {
119110 type Id = S::Id;
120120- type Rev = S::Rev;
121121- type Members = S::Members;
122122- type Muted = Set<members::muted>;
111111+ type Members = Set<members::members>;
123112 type UnreadCount = S::UnreadCount;
113113+ type Muted = S::Muted;
124114 }
125115 ///State transition - sets the `unread_count` field to Set
126116 pub struct SetUnreadCount<S: State = Empty>(PhantomData<fn() -> S>);
127117 impl<S: State> sealed::Sealed for SetUnreadCount<S> {}
128118 impl<S: State> State for SetUnreadCount<S> {
119119+ type Rev = S::Rev;
129120 type Id = S::Id;
121121+ type Members = S::Members;
122122+ type UnreadCount = Set<members::unread_count>;
123123+ type Muted = S::Muted;
124124+ }
125125+ ///State transition - sets the `muted` field to Set
126126+ pub struct SetMuted<S: State = Empty>(PhantomData<fn() -> S>);
127127+ impl<S: State> sealed::Sealed for SetMuted<S> {}
128128+ impl<S: State> State for SetMuted<S> {
130129 type Rev = S::Rev;
130130+ type Id = S::Id;
131131 type Members = S::Members;
132132- type Muted = S::Muted;
133133- type UnreadCount = Set<members::unread_count>;
132132+ type UnreadCount = S::UnreadCount;
133133+ type Muted = Set<members::muted>;
134134 }
135135 /// Marker types for field names
136136 #[allow(non_camel_case_types)]
137137 pub mod members {
138138+ ///Marker type for the `rev` field
139139+ pub struct rev(());
138140 ///Marker type for the `id` field
139141 pub struct id(());
140140- ///Marker type for the `rev` field
141141- pub struct rev(());
142142 ///Marker type for the `members` field
143143 pub struct members(());
144144+ ///Marker type for the `unread_count` field
145145+ pub struct unread_count(());
144146 ///Marker type for the `muted` field
145147 pub struct muted(());
146146- ///Marker type for the `unread_count` field
147147- pub struct unread_count(());
148148 }
149149}
150150···334334impl<'a, S> ConvoViewBuilder<'a, S>
335335where
336336 S: convo_view_state::State,
337337- S::Id: convo_view_state::IsSet,
338337 S::Rev: convo_view_state::IsSet,
338338+ S::Id: convo_view_state::IsSet,
339339 S::Members: convo_view_state::IsSet,
340340- S::Muted: convo_view_state::IsSet,
341340 S::UnreadCount: convo_view_state::IsSet,
341341+ S::Muted: convo_view_state::IsSet,
342342{
343343 /// Build the final struct
344344 pub fn build(self) -> ConvoView<'a> {
···16491649 /// State trait tracking which required fields have been set
16501650 pub trait State: sealed::Sealed {
16511651 type Id;
16521652- type Rev;
16531652 type Sender;
16541653 type SentAt;
16541654+ type Rev;
16551655 }
16561656 /// Empty state - all required fields are unset
16571657 pub struct Empty(());
16581658 impl sealed::Sealed for Empty {}
16591659 impl State for Empty {
16601660 type Id = Unset;
16611661- type Rev = Unset;
16621661 type Sender = Unset;
16631662 type SentAt = Unset;
16631663+ type Rev = Unset;
16641664 }
16651665 ///State transition - sets the `id` field to Set
16661666 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
16671667 impl<S: State> sealed::Sealed for SetId<S> {}
16681668 impl<S: State> State for SetId<S> {
16691669 type Id = Set<members::id>;
16701670- type Rev = S::Rev;
16711670 type Sender = S::Sender;
16721671 type SentAt = S::SentAt;
16731673- }
16741674- ///State transition - sets the `rev` field to Set
16751675- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
16761676- impl<S: State> sealed::Sealed for SetRev<S> {}
16771677- impl<S: State> State for SetRev<S> {
16781678- type Id = S::Id;
16791679- type Rev = Set<members::rev>;
16801680- type Sender = S::Sender;
16811681- type SentAt = S::SentAt;
16721672+ type Rev = S::Rev;
16821673 }
16831674 ///State transition - sets the `sender` field to Set
16841675 pub struct SetSender<S: State = Empty>(PhantomData<fn() -> S>);
16851676 impl<S: State> sealed::Sealed for SetSender<S> {}
16861677 impl<S: State> State for SetSender<S> {
16871678 type Id = S::Id;
16881688- type Rev = S::Rev;
16891679 type Sender = Set<members::sender>;
16901680 type SentAt = S::SentAt;
16811681+ type Rev = S::Rev;
16911682 }
16921683 ///State transition - sets the `sent_at` field to Set
16931684 pub struct SetSentAt<S: State = Empty>(PhantomData<fn() -> S>);
16941685 impl<S: State> sealed::Sealed for SetSentAt<S> {}
16951686 impl<S: State> State for SetSentAt<S> {
16961687 type Id = S::Id;
16971697- type Rev = S::Rev;
16981688 type Sender = S::Sender;
16991689 type SentAt = Set<members::sent_at>;
16901690+ type Rev = S::Rev;
16911691+ }
16921692+ ///State transition - sets the `rev` field to Set
16931693+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
16941694+ impl<S: State> sealed::Sealed for SetRev<S> {}
16951695+ impl<S: State> State for SetRev<S> {
16961696+ type Id = S::Id;
16971697+ type Sender = S::Sender;
16981698+ type SentAt = S::SentAt;
16991699+ type Rev = Set<members::rev>;
17001700 }
17011701 /// Marker types for field names
17021702 #[allow(non_camel_case_types)]
17031703 pub mod members {
17041704 ///Marker type for the `id` field
17051705 pub struct id(());
17061706- ///Marker type for the `rev` field
17071707- pub struct rev(());
17081706 ///Marker type for the `sender` field
17091707 pub struct sender(());
17101708 ///Marker type for the `sent_at` field
17111709 pub struct sent_at(());
17101710+ ///Marker type for the `rev` field
17111711+ pub struct rev(());
17121712 }
17131713}
17141714···18221822where
18231823 S: deleted_message_view_state::State,
18241824 S::Id: deleted_message_view_state::IsSet,
18251825- S::Rev: deleted_message_view_state::IsSet,
18261825 S::Sender: deleted_message_view_state::IsSet,
18271826 S::SentAt: deleted_message_view_state::IsSet,
18271827+ S::Rev: deleted_message_view_state::IsSet,
18281828{
18291829 /// Build the final struct
18301830 pub fn build(self) -> DeletedMessageView<'a> {
···19391939 }
19401940 /// State trait tracking which required fields have been set
19411941 pub trait State: sealed::Sealed {
19421942- type Rev;
19431943- type ConvoId;
19441942 type Message;
19431943+ type Rev;
19451944 type Reaction;
19451945+ type ConvoId;
19461946 }
19471947 /// Empty state - all required fields are unset
19481948 pub struct Empty(());
19491949 impl sealed::Sealed for Empty {}
19501950 impl State for Empty {
19511951+ type Message = Unset;
19511952 type Rev = Unset;
19521952- type ConvoId = Unset;
19531953- type Message = Unset;
19541953 type Reaction = Unset;
19551955- }
19561956- ///State transition - sets the `rev` field to Set
19571957- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
19581958- impl<S: State> sealed::Sealed for SetRev<S> {}
19591959- impl<S: State> State for SetRev<S> {
19601960- type Rev = Set<members::rev>;
19611961- type ConvoId = S::ConvoId;
19621962- type Message = S::Message;
19631963- type Reaction = S::Reaction;
19641964- }
19651965- ///State transition - sets the `convo_id` field to Set
19661966- pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
19671967- impl<S: State> sealed::Sealed for SetConvoId<S> {}
19681968- impl<S: State> State for SetConvoId<S> {
19691969- type Rev = S::Rev;
19701970- type ConvoId = Set<members::convo_id>;
19711971- type Message = S::Message;
19721972- type Reaction = S::Reaction;
19541954+ type ConvoId = Unset;
19731955 }
19741956 ///State transition - sets the `message` field to Set
19751957 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
19761958 impl<S: State> sealed::Sealed for SetMessage<S> {}
19771959 impl<S: State> State for SetMessage<S> {
19601960+ type Message = Set<members::message>;
19781961 type Rev = S::Rev;
19621962+ type Reaction = S::Reaction;
19791963 type ConvoId = S::ConvoId;
19801980- type Message = Set<members::message>;
19641964+ }
19651965+ ///State transition - sets the `rev` field to Set
19661966+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
19671967+ impl<S: State> sealed::Sealed for SetRev<S> {}
19681968+ impl<S: State> State for SetRev<S> {
19691969+ type Message = S::Message;
19701970+ type Rev = Set<members::rev>;
19811971 type Reaction = S::Reaction;
19721972+ type ConvoId = S::ConvoId;
19821973 }
19831974 ///State transition - sets the `reaction` field to Set
19841975 pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
19851976 impl<S: State> sealed::Sealed for SetReaction<S> {}
19861977 impl<S: State> State for SetReaction<S> {
19781978+ type Message = S::Message;
19871979 type Rev = S::Rev;
19801980+ type Reaction = Set<members::reaction>;
19881981 type ConvoId = S::ConvoId;
19821982+ }
19831983+ ///State transition - sets the `convo_id` field to Set
19841984+ pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
19851985+ impl<S: State> sealed::Sealed for SetConvoId<S> {}
19861986+ impl<S: State> State for SetConvoId<S> {
19891987 type Message = S::Message;
19901990- type Reaction = Set<members::reaction>;
19881988+ type Rev = S::Rev;
19891989+ type Reaction = S::Reaction;
19901990+ type ConvoId = Set<members::convo_id>;
19911991 }
19921992 /// Marker types for field names
19931993 #[allow(non_camel_case_types)]
19941994 pub mod members {
19951995- ///Marker type for the `rev` field
19961996- pub struct rev(());
19971997- ///Marker type for the `convo_id` field
19981998- pub struct convo_id(());
19991995 ///Marker type for the `message` field
20001996 pub struct message(());
19971997+ ///Marker type for the `rev` field
19981998+ pub struct rev(());
20011999 ///Marker type for the `reaction` field
20022000 pub struct reaction(());
20012001+ ///Marker type for the `convo_id` field
20022002+ pub struct convo_id(());
20032003 }
20042004}
20052005···21122112impl<'a, S> LogAddReactionBuilder<'a, S>
21132113where
21142114 S: log_add_reaction_state::State,
21152115- S::Rev: log_add_reaction_state::IsSet,
21162116- S::ConvoId: log_add_reaction_state::IsSet,
21172115 S::Message: log_add_reaction_state::IsSet,
21162116+ S::Rev: log_add_reaction_state::IsSet,
21182117 S::Reaction: log_add_reaction_state::IsSet,
21182118+ S::ConvoId: log_add_reaction_state::IsSet,
21192119{
21202120 /// Build the final struct
21212121 pub fn build(self) -> LogAddReaction<'a> {
···22472247 }
22482248 /// State trait tracking which required fields have been set
22492249 pub trait State: sealed::Sealed {
22502250+ type Message;
22502251 type Rev;
22512252 type ConvoId;
22522252- type Message;
22532253 }
22542254 /// Empty state - all required fields are unset
22552255 pub struct Empty(());
22562256 impl sealed::Sealed for Empty {}
22572257 impl State for Empty {
22582258+ type Message = Unset;
22582259 type Rev = Unset;
22592260 type ConvoId = Unset;
22602260- type Message = Unset;
22612261+ }
22622262+ ///State transition - sets the `message` field to Set
22632263+ pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
22642264+ impl<S: State> sealed::Sealed for SetMessage<S> {}
22652265+ impl<S: State> State for SetMessage<S> {
22662266+ type Message = Set<members::message>;
22672267+ type Rev = S::Rev;
22682268+ type ConvoId = S::ConvoId;
22612269 }
22622270 ///State transition - sets the `rev` field to Set
22632271 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
22642272 impl<S: State> sealed::Sealed for SetRev<S> {}
22652273 impl<S: State> State for SetRev<S> {
22742274+ type Message = S::Message;
22662275 type Rev = Set<members::rev>;
22672276 type ConvoId = S::ConvoId;
22682268- type Message = S::Message;
22692277 }
22702278 ///State transition - sets the `convo_id` field to Set
22712279 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
22722280 impl<S: State> sealed::Sealed for SetConvoId<S> {}
22732281 impl<S: State> State for SetConvoId<S> {
22822282+ type Message = S::Message;
22742283 type Rev = S::Rev;
22752284 type ConvoId = Set<members::convo_id>;
22762276- type Message = S::Message;
22772277- }
22782278- ///State transition - sets the `message` field to Set
22792279- pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
22802280- impl<S: State> sealed::Sealed for SetMessage<S> {}
22812281- impl<S: State> State for SetMessage<S> {
22822282- type Rev = S::Rev;
22832283- type ConvoId = S::ConvoId;
22842284- type Message = Set<members::message>;
22852285 }
22862286 /// Marker types for field names
22872287 #[allow(non_camel_case_types)]
22882288 pub mod members {
22892289+ ///Marker type for the `message` field
22902290+ pub struct message(());
22892291 ///Marker type for the `rev` field
22902292 pub struct rev(());
22912293 ///Marker type for the `convo_id` field
22922294 pub struct convo_id(());
22932293- ///Marker type for the `message` field
22942294- pub struct message(());
22952295 }
22962296}
22972297···23842384impl<'a, S> LogCreateMessageBuilder<'a, S>
23852385where
23862386 S: log_create_message_state::State,
23872387+ S::Message: log_create_message_state::IsSet,
23872388 S::Rev: log_create_message_state::IsSet,
23882389 S::ConvoId: log_create_message_state::IsSet,
23892389- S::Message: log_create_message_state::IsSet,
23902390{
23912391 /// Build the final struct
23922392 pub fn build(self) -> LogCreateMessage<'a> {
···24802480 }
24812481 /// State trait tracking which required fields have been set
24822482 pub trait State: sealed::Sealed {
24832483- type Rev;
24842483 type ConvoId;
24852484 type Message;
24852485+ type Rev;
24862486 }
24872487 /// Empty state - all required fields are unset
24882488 pub struct Empty(());
24892489 impl sealed::Sealed for Empty {}
24902490 impl State for Empty {
24912491- type Rev = Unset;
24922491 type ConvoId = Unset;
24932492 type Message = Unset;
24942494- }
24952495- ///State transition - sets the `rev` field to Set
24962496- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
24972497- impl<S: State> sealed::Sealed for SetRev<S> {}
24982498- impl<S: State> State for SetRev<S> {
24992499- type Rev = Set<members::rev>;
25002500- type ConvoId = S::ConvoId;
25012501- type Message = S::Message;
24932493+ type Rev = Unset;
25022494 }
25032495 ///State transition - sets the `convo_id` field to Set
25042496 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
25052497 impl<S: State> sealed::Sealed for SetConvoId<S> {}
25062498 impl<S: State> State for SetConvoId<S> {
25072507- type Rev = S::Rev;
25082499 type ConvoId = Set<members::convo_id>;
25092500 type Message = S::Message;
25012501+ type Rev = S::Rev;
25102502 }
25112503 ///State transition - sets the `message` field to Set
25122504 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
25132505 impl<S: State> sealed::Sealed for SetMessage<S> {}
25142506 impl<S: State> State for SetMessage<S> {
25152515- type Rev = S::Rev;
25162507 type ConvoId = S::ConvoId;
25172508 type Message = Set<members::message>;
25092509+ type Rev = S::Rev;
25102510+ }
25112511+ ///State transition - sets the `rev` field to Set
25122512+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
25132513+ impl<S: State> sealed::Sealed for SetRev<S> {}
25142514+ impl<S: State> State for SetRev<S> {
25152515+ type ConvoId = S::ConvoId;
25162516+ type Message = S::Message;
25172517+ type Rev = Set<members::rev>;
25182518 }
25192519 /// Marker types for field names
25202520 #[allow(non_camel_case_types)]
25212521 pub mod members {
25222522- ///Marker type for the `rev` field
25232523- pub struct rev(());
25242522 ///Marker type for the `convo_id` field
25252523 pub struct convo_id(());
25262524 ///Marker type for the `message` field
25272525 pub struct message(());
25262526+ ///Marker type for the `rev` field
25272527+ pub struct rev(());
25282528 }
25292529}
25302530···26172617impl<'a, S> LogDeleteMessageBuilder<'a, S>
26182618where
26192619 S: log_delete_message_state::State,
26202620- S::Rev: log_delete_message_state::IsSet,
26212620 S::ConvoId: log_delete_message_state::IsSet,
26222621 S::Message: log_delete_message_state::IsSet,
26222622+ S::Rev: log_delete_message_state::IsSet,
26232623{
26242624 /// Build the final struct
26252625 pub fn build(self) -> LogDeleteMessage<'a> {
···27852785 }
27862786 /// State trait tracking which required fields have been set
27872787 pub trait State: sealed::Sealed {
27882788+ type Message;
27882789 type Rev;
27892790 type ConvoId;
27902790- type Message;
27912791 }
27922792 /// Empty state - all required fields are unset
27932793 pub struct Empty(());
27942794 impl sealed::Sealed for Empty {}
27952795 impl State for Empty {
27962796+ type Message = Unset;
27962797 type Rev = Unset;
27972798 type ConvoId = Unset;
27982798- type Message = Unset;
27992799+ }
28002800+ ///State transition - sets the `message` field to Set
28012801+ pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
28022802+ impl<S: State> sealed::Sealed for SetMessage<S> {}
28032803+ impl<S: State> State for SetMessage<S> {
28042804+ type Message = Set<members::message>;
28052805+ type Rev = S::Rev;
28062806+ type ConvoId = S::ConvoId;
27992807 }
28002808 ///State transition - sets the `rev` field to Set
28012809 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
28022810 impl<S: State> sealed::Sealed for SetRev<S> {}
28032811 impl<S: State> State for SetRev<S> {
28122812+ type Message = S::Message;
28042813 type Rev = Set<members::rev>;
28052814 type ConvoId = S::ConvoId;
28062806- type Message = S::Message;
28072815 }
28082816 ///State transition - sets the `convo_id` field to Set
28092817 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
28102818 impl<S: State> sealed::Sealed for SetConvoId<S> {}
28112819 impl<S: State> State for SetConvoId<S> {
28122812- type Rev = S::Rev;
28132813- type ConvoId = Set<members::convo_id>;
28142820 type Message = S::Message;
28152815- }
28162816- ///State transition - sets the `message` field to Set
28172817- pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
28182818- impl<S: State> sealed::Sealed for SetMessage<S> {}
28192819- impl<S: State> State for SetMessage<S> {
28202821 type Rev = S::Rev;
28212821- type ConvoId = S::ConvoId;
28222822- type Message = Set<members::message>;
28222822+ type ConvoId = Set<members::convo_id>;
28232823 }
28242824 /// Marker types for field names
28252825 #[allow(non_camel_case_types)]
28262826 pub mod members {
28272827+ ///Marker type for the `message` field
28282828+ pub struct message(());
28272829 ///Marker type for the `rev` field
28282830 pub struct rev(());
28292831 ///Marker type for the `convo_id` field
28302832 pub struct convo_id(());
28312831- ///Marker type for the `message` field
28322832- pub struct message(());
28332833 }
28342834}
28352835···29222922impl<'a, S> LogReadMessageBuilder<'a, S>
29232923where
29242924 S: log_read_message_state::State,
29252925+ S::Message: log_read_message_state::IsSet,
29252926 S::Rev: log_read_message_state::IsSet,
29262927 S::ConvoId: log_read_message_state::IsSet,
29272927- S::Message: log_read_message_state::IsSet,
29282928{
29292929 /// Build the final struct
29302930 pub fn build(self) -> LogReadMessage<'a> {
···30203020 }
30213021 /// State trait tracking which required fields have been set
30223022 pub trait State: sealed::Sealed {
30233023- type Rev;
30243023 type ConvoId;
30253024 type Message;
30263025 type Reaction;
30263026+ type Rev;
30273027 }
30283028 /// Empty state - all required fields are unset
30293029 pub struct Empty(());
30303030 impl sealed::Sealed for Empty {}
30313031 impl State for Empty {
30323032- type Rev = Unset;
30333032 type ConvoId = Unset;
30343033 type Message = Unset;
30353034 type Reaction = Unset;
30363036- }
30373037- ///State transition - sets the `rev` field to Set
30383038- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
30393039- impl<S: State> sealed::Sealed for SetRev<S> {}
30403040- impl<S: State> State for SetRev<S> {
30413041- type Rev = Set<members::rev>;
30423042- type ConvoId = S::ConvoId;
30433043- type Message = S::Message;
30443044- type Reaction = S::Reaction;
30353035+ type Rev = Unset;
30453036 }
30463037 ///State transition - sets the `convo_id` field to Set
30473038 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
30483039 impl<S: State> sealed::Sealed for SetConvoId<S> {}
30493040 impl<S: State> State for SetConvoId<S> {
30503050- type Rev = S::Rev;
30513041 type ConvoId = Set<members::convo_id>;
30523042 type Message = S::Message;
30533043 type Reaction = S::Reaction;
30443044+ type Rev = S::Rev;
30543045 }
30553046 ///State transition - sets the `message` field to Set
30563047 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
30573048 impl<S: State> sealed::Sealed for SetMessage<S> {}
30583049 impl<S: State> State for SetMessage<S> {
30593059- type Rev = S::Rev;
30603050 type ConvoId = S::ConvoId;
30613051 type Message = Set<members::message>;
30623052 type Reaction = S::Reaction;
30533053+ type Rev = S::Rev;
30633054 }
30643055 ///State transition - sets the `reaction` field to Set
30653056 pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
30663057 impl<S: State> sealed::Sealed for SetReaction<S> {}
30673058 impl<S: State> State for SetReaction<S> {
30593059+ type ConvoId = S::ConvoId;
30603060+ type Message = S::Message;
30613061+ type Reaction = Set<members::reaction>;
30683062 type Rev = S::Rev;
30633063+ }
30643064+ ///State transition - sets the `rev` field to Set
30653065+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
30663066+ impl<S: State> sealed::Sealed for SetRev<S> {}
30673067+ impl<S: State> State for SetRev<S> {
30693068 type ConvoId = S::ConvoId;
30703069 type Message = S::Message;
30713071- type Reaction = Set<members::reaction>;
30703070+ type Reaction = S::Reaction;
30713071+ type Rev = Set<members::rev>;
30723072 }
30733073 /// Marker types for field names
30743074 #[allow(non_camel_case_types)]
30753075 pub mod members {
30763076- ///Marker type for the `rev` field
30773077- pub struct rev(());
30783076 ///Marker type for the `convo_id` field
30793077 pub struct convo_id(());
30803078 ///Marker type for the `message` field
30813079 pub struct message(());
30823080 ///Marker type for the `reaction` field
30833081 pub struct reaction(());
30823082+ ///Marker type for the `rev` field
30833083+ pub struct rev(());
30843084 }
30853085}
30863086···31933193impl<'a, S> LogRemoveReactionBuilder<'a, S>
31943194where
31953195 S: log_remove_reaction_state::State,
31963196- S::Rev: log_remove_reaction_state::IsSet,
31973196 S::ConvoId: log_remove_reaction_state::IsSet,
31983197 S::Message: log_remove_reaction_state::IsSet,
31993198 S::Reaction: log_remove_reaction_state::IsSet,
31993199+ S::Rev: log_remove_reaction_state::IsSet,
32003200{
32013201 /// Build the final struct
32023202 pub fn build(self) -> LogRemoveReaction<'a> {
···33263326 }
33273327 /// State trait tracking which required fields have been set
33283328 pub trait State: sealed::Sealed {
33293329- type Message;
33303329 type Reaction;
33303330+ type Message;
33313331 }
33323332 /// Empty state - all required fields are unset
33333333 pub struct Empty(());
33343334 impl sealed::Sealed for Empty {}
33353335 impl State for Empty {
33363336+ type Reaction = Unset;
33363337 type Message = Unset;
33373337- type Reaction = Unset;
33383338+ }
33393339+ ///State transition - sets the `reaction` field to Set
33403340+ pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
33413341+ impl<S: State> sealed::Sealed for SetReaction<S> {}
33423342+ impl<S: State> State for SetReaction<S> {
33433343+ type Reaction = Set<members::reaction>;
33443344+ type Message = S::Message;
33383345 }
33393346 ///State transition - sets the `message` field to Set
33403347 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
33413348 impl<S: State> sealed::Sealed for SetMessage<S> {}
33423349 impl<S: State> State for SetMessage<S> {
33433343- type Message = Set<members::message>;
33443350 type Reaction = S::Reaction;
33453345- }
33463346- ///State transition - sets the `reaction` field to Set
33473347- pub struct SetReaction<S: State = Empty>(PhantomData<fn() -> S>);
33483348- impl<S: State> sealed::Sealed for SetReaction<S> {}
33493349- impl<S: State> State for SetReaction<S> {
33503350- type Message = S::Message;
33513351- type Reaction = Set<members::reaction>;
33513351+ type Message = Set<members::message>;
33523352 }
33533353 /// Marker types for field names
33543354 #[allow(non_camel_case_types)]
33553355 pub mod members {
33563356- ///Marker type for the `message` field
33573357- pub struct message(());
33583356 ///Marker type for the `reaction` field
33593357 pub struct reaction(());
33583358+ ///Marker type for the `message` field
33593359+ pub struct message(());
33603360 }
33613361}
33623362···34383438impl<'a, S> MessageAndReactionViewBuilder<'a, S>
34393439where
34403440 S: message_and_reaction_view_state::State,
34413441- S::Message: message_and_reaction_view_state::IsSet,
34423441 S::Reaction: message_and_reaction_view_state::IsSet,
34423442+ S::Message: message_and_reaction_view_state::IsSet,
34433443{
34443444 /// Build the final struct
34453445 pub fn build(self) -> MessageAndReactionView<'a> {
···35853585 }
35863586 /// State trait tracking which required fields have been set
35873587 pub trait State: sealed::Sealed {
35883588- type Did;
35893588 type MessageId;
35893589+ type Did;
35903590 type ConvoId;
35913591 }
35923592 /// Empty state - all required fields are unset
35933593 pub struct Empty(());
35943594 impl sealed::Sealed for Empty {}
35953595 impl State for Empty {
35963596- type Did = Unset;
35973596 type MessageId = Unset;
35973597+ type Did = Unset;
35983598 type ConvoId = Unset;
35993599 }
36003600- ///State transition - sets the `did` field to Set
36013601- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
36023602- impl<S: State> sealed::Sealed for SetDid<S> {}
36033603- impl<S: State> State for SetDid<S> {
36043604- type Did = Set<members::did>;
36053605- type MessageId = S::MessageId;
36063606- type ConvoId = S::ConvoId;
36073607- }
36083600 ///State transition - sets the `message_id` field to Set
36093601 pub struct SetMessageId<S: State = Empty>(PhantomData<fn() -> S>);
36103602 impl<S: State> sealed::Sealed for SetMessageId<S> {}
36113603 impl<S: State> State for SetMessageId<S> {
36123612- type Did = S::Did;
36133604 type MessageId = Set<members::message_id>;
36053605+ type Did = S::Did;
36063606+ type ConvoId = S::ConvoId;
36073607+ }
36083608+ ///State transition - sets the `did` field to Set
36093609+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
36103610+ impl<S: State> sealed::Sealed for SetDid<S> {}
36113611+ impl<S: State> State for SetDid<S> {
36123612+ type MessageId = S::MessageId;
36133613+ type Did = Set<members::did>;
36143614 type ConvoId = S::ConvoId;
36153615 }
36163616 ///State transition - sets the `convo_id` field to Set
36173617 pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
36183618 impl<S: State> sealed::Sealed for SetConvoId<S> {}
36193619 impl<S: State> State for SetConvoId<S> {
36203620- type Did = S::Did;
36213620 type MessageId = S::MessageId;
36213621+ type Did = S::Did;
36223622 type ConvoId = Set<members::convo_id>;
36233623 }
36243624 /// Marker types for field names
36253625 #[allow(non_camel_case_types)]
36263626 pub mod members {
36273627+ ///Marker type for the `message_id` field
36283628+ pub struct message_id(());
36273629 ///Marker type for the `did` field
36283630 pub struct did(());
36293629- ///Marker type for the `message_id` field
36303630- pub struct message_id(());
36313631 ///Marker type for the `convo_id` field
36323632 pub struct convo_id(());
36333633 }
···37223722impl<'a, S> MessageRefBuilder<'a, S>
37233723where
37243724 S: message_ref_state::State,
37253725- S::Did: message_ref_state::IsSet,
37263725 S::MessageId: message_ref_state::IsSet,
37263726+ S::Did: message_ref_state::IsSet,
37273727 S::ConvoId: message_ref_state::IsSet,
37283728{
37293729 /// Build the final struct
···38133813 }
38143814 /// State trait tracking which required fields have been set
38153815 pub trait State: sealed::Sealed {
38163816- type Id;
38173816 type Rev;
38183817 type Text;
38193818 type Sender;
38193819+ type Id;
38203820 type SentAt;
38213821 }
38223822 /// Empty state - all required fields are unset
38233823 pub struct Empty(());
38243824 impl sealed::Sealed for Empty {}
38253825 impl State for Empty {
38263826- type Id = Unset;
38273826 type Rev = Unset;
38283827 type Text = Unset;
38293828 type Sender = Unset;
38293829+ type Id = Unset;
38303830 type SentAt = Unset;
38313831 }
38323832- ///State transition - sets the `id` field to Set
38333833- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
38343834- impl<S: State> sealed::Sealed for SetId<S> {}
38353835- impl<S: State> State for SetId<S> {
38363836- type Id = Set<members::id>;
38373837- type Rev = S::Rev;
38383838- type Text = S::Text;
38393839- type Sender = S::Sender;
38403840- type SentAt = S::SentAt;
38413841- }
38423832 ///State transition - sets the `rev` field to Set
38433833 pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
38443834 impl<S: State> sealed::Sealed for SetRev<S> {}
38453835 impl<S: State> State for SetRev<S> {
38463846- type Id = S::Id;
38473836 type Rev = Set<members::rev>;
38483837 type Text = S::Text;
38493838 type Sender = S::Sender;
38393839+ type Id = S::Id;
38503840 type SentAt = S::SentAt;
38513841 }
38523842 ///State transition - sets the `text` field to Set
38533843 pub struct SetText<S: State = Empty>(PhantomData<fn() -> S>);
38543844 impl<S: State> sealed::Sealed for SetText<S> {}
38553845 impl<S: State> State for SetText<S> {
38563856- type Id = S::Id;
38573846 type Rev = S::Rev;
38583847 type Text = Set<members::text>;
38593848 type Sender = S::Sender;
38493849+ type Id = S::Id;
38603850 type SentAt = S::SentAt;
38613851 }
38623852 ///State transition - sets the `sender` field to Set
38633853 pub struct SetSender<S: State = Empty>(PhantomData<fn() -> S>);
38643854 impl<S: State> sealed::Sealed for SetSender<S> {}
38653855 impl<S: State> State for SetSender<S> {
38563856+ type Rev = S::Rev;
38573857+ type Text = S::Text;
38583858+ type Sender = Set<members::sender>;
38663859 type Id = S::Id;
38603860+ type SentAt = S::SentAt;
38613861+ }
38623862+ ///State transition - sets the `id` field to Set
38633863+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
38643864+ impl<S: State> sealed::Sealed for SetId<S> {}
38653865+ impl<S: State> State for SetId<S> {
38673866 type Rev = S::Rev;
38683867 type Text = S::Text;
38693869- type Sender = Set<members::sender>;
38683868+ type Sender = S::Sender;
38693869+ type Id = Set<members::id>;
38703870 type SentAt = S::SentAt;
38713871 }
38723872 ///State transition - sets the `sent_at` field to Set
38733873 pub struct SetSentAt<S: State = Empty>(PhantomData<fn() -> S>);
38743874 impl<S: State> sealed::Sealed for SetSentAt<S> {}
38753875 impl<S: State> State for SetSentAt<S> {
38763876- type Id = S::Id;
38773876 type Rev = S::Rev;
38783877 type Text = S::Text;
38793878 type Sender = S::Sender;
38793879+ type Id = S::Id;
38803880 type SentAt = Set<members::sent_at>;
38813881 }
38823882 /// Marker types for field names
38833883 #[allow(non_camel_case_types)]
38843884 pub mod members {
38853885- ///Marker type for the `id` field
38863886- pub struct id(());
38873885 ///Marker type for the `rev` field
38883886 pub struct rev(());
38893887 ///Marker type for the `text` field
38903888 pub struct text(());
38913889 ///Marker type for the `sender` field
38923890 pub struct sender(());
38913891+ ///Marker type for the `id` field
38923892+ pub struct id(());
38933893 ///Marker type for the `sent_at` field
38943894 pub struct sent_at(());
38953895 }
···40844084impl<'a, S> MessageViewBuilder<'a, S>
40854085where
40864086 S: message_view_state::State,
40874087- S::Id: message_view_state::IsSet,
40884087 S::Rev: message_view_state::IsSet,
40894088 S::Text: message_view_state::IsSet,
40904089 S::Sender: message_view_state::IsSet,
40904090+ S::Id: message_view_state::IsSet,
40914091 S::SentAt: message_view_state::IsSet,
40924092{
40934093 /// Build the final struct
···43424342 }
43434343 /// State trait tracking which required fields have been set
43444344 pub trait State: sealed::Sealed {
43454345+ type CreatedAt;
43454346 type Value;
43464347 type Sender;
43474347- type CreatedAt;
43484348 }
43494349 /// Empty state - all required fields are unset
43504350 pub struct Empty(());
43514351 impl sealed::Sealed for Empty {}
43524352 impl State for Empty {
43534353+ type CreatedAt = Unset;
43534354 type Value = Unset;
43544355 type Sender = Unset;
43554355- type CreatedAt = Unset;
43564356+ }
43574357+ ///State transition - sets the `created_at` field to Set
43584358+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
43594359+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
43604360+ impl<S: State> State for SetCreatedAt<S> {
43614361+ type CreatedAt = Set<members::created_at>;
43624362+ type Value = S::Value;
43634363+ type Sender = S::Sender;
43564364 }
43574365 ///State transition - sets the `value` field to Set
43584366 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
43594367 impl<S: State> sealed::Sealed for SetValue<S> {}
43604368 impl<S: State> State for SetValue<S> {
43694369+ type CreatedAt = S::CreatedAt;
43614370 type Value = Set<members::value>;
43624371 type Sender = S::Sender;
43634363- type CreatedAt = S::CreatedAt;
43644372 }
43654373 ///State transition - sets the `sender` field to Set
43664374 pub struct SetSender<S: State = Empty>(PhantomData<fn() -> S>);
43674375 impl<S: State> sealed::Sealed for SetSender<S> {}
43684376 impl<S: State> State for SetSender<S> {
43774377+ type CreatedAt = S::CreatedAt;
43694378 type Value = S::Value;
43704379 type Sender = Set<members::sender>;
43714371- type CreatedAt = S::CreatedAt;
43724372- }
43734373- ///State transition - sets the `created_at` field to Set
43744374- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
43754375- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
43764376- impl<S: State> State for SetCreatedAt<S> {
43774377- type Value = S::Value;
43784378- type Sender = S::Sender;
43794379- type CreatedAt = Set<members::created_at>;
43804380 }
43814381 /// Marker types for field names
43824382 #[allow(non_camel_case_types)]
43834383 pub mod members {
43844384+ ///Marker type for the `created_at` field
43854385+ pub struct created_at(());
43844386 ///Marker type for the `value` field
43854387 pub struct value(());
43864388 ///Marker type for the `sender` field
43874389 pub struct sender(());
43884388- ///Marker type for the `created_at` field
43894389- pub struct created_at(());
43904390 }
43914391}
43924392···44794479impl<'a, S> ReactionViewBuilder<'a, S>
44804480where
44814481 S: reaction_view_state::State,
44824482+ S::CreatedAt: reaction_view_state::IsSet,
44824483 S::Value: reaction_view_state::IsSet,
44834484 S::Sender: reaction_view_state::IsSet,
44844484- S::CreatedAt: reaction_view_state::IsSet,
44854485{
44864486 /// Build the final struct
44874487 pub fn build(self) -> ReactionView<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type ConvoId;
3736 type Message;
3737+ type ConvoId;
3838 }
3939 /// Empty state - all required fields are unset
4040 pub struct Empty(());
4141 impl sealed::Sealed for Empty {}
4242 impl State for Empty {
4343- type ConvoId = Unset;
4443 type Message = Unset;
4545- }
4646- ///State transition - sets the `convo_id` field to Set
4747- pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetConvoId<S> {}
4949- impl<S: State> State for SetConvoId<S> {
5050- type ConvoId = Set<members::convo_id>;
5151- type Message = S::Message;
4444+ type ConvoId = Unset;
5245 }
5346 ///State transition - sets the `message` field to Set
5447 pub struct SetMessage<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetMessage<S> {}
5649 impl<S: State> State for SetMessage<S> {
5757- type ConvoId = S::ConvoId;
5850 type Message = Set<members::message>;
5151+ type ConvoId = S::ConvoId;
5252+ }
5353+ ///State transition - sets the `convo_id` field to Set
5454+ pub struct SetConvoId<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetConvoId<S> {}
5656+ impl<S: State> State for SetConvoId<S> {
5757+ type Message = S::Message;
5858+ type ConvoId = Set<members::convo_id>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `convo_id` field
6464- pub struct convo_id(());
6563 ///Marker type for the `message` field
6664 pub struct message(());
6565+ ///Marker type for the `convo_id` field
6666+ pub struct convo_id(());
6767 }
6868}
6969···136136impl<'a, S> SendMessageBuilder<'a, S>
137137where
138138 S: send_message_state::State,
139139- S::ConvoId: send_message_state::IsSet,
140139 S::Message: send_message_state::IsSet,
140140+ S::ConvoId: send_message_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> SendMessage<'a> {
···185185 }
186186 /// State trait tracking which required fields have been set
187187 pub trait State: sealed::Sealed {
188188- type MessagesSent;
189189- type MessagesReceived;
190188 type Convos;
189189+ type MessagesReceived;
190190+ type MessagesSent;
191191 type ConvosStarted;
192192 }
193193 /// Empty state - all required fields are unset
194194 pub struct Empty(());
195195 impl sealed::Sealed for Empty {}
196196 impl State for Empty {
197197- type MessagesSent = Unset;
198198- type MessagesReceived = Unset;
199197 type Convos = Unset;
198198+ type MessagesReceived = Unset;
199199+ type MessagesSent = Unset;
200200 type ConvosStarted = Unset;
201201 }
202202- ///State transition - sets the `messages_sent` field to Set
203203- pub struct SetMessagesSent<S: State = Empty>(PhantomData<fn() -> S>);
204204- impl<S: State> sealed::Sealed for SetMessagesSent<S> {}
205205- impl<S: State> State for SetMessagesSent<S> {
206206- type MessagesSent = Set<members::messages_sent>;
202202+ ///State transition - sets the `convos` field to Set
203203+ pub struct SetConvos<S: State = Empty>(PhantomData<fn() -> S>);
204204+ impl<S: State> sealed::Sealed for SetConvos<S> {}
205205+ impl<S: State> State for SetConvos<S> {
206206+ type Convos = Set<members::convos>;
207207 type MessagesReceived = S::MessagesReceived;
208208- type Convos = S::Convos;
208208+ type MessagesSent = S::MessagesSent;
209209 type ConvosStarted = S::ConvosStarted;
210210 }
211211 ///State transition - sets the `messages_received` field to Set
212212 pub struct SetMessagesReceived<S: State = Empty>(PhantomData<fn() -> S>);
213213 impl<S: State> sealed::Sealed for SetMessagesReceived<S> {}
214214 impl<S: State> State for SetMessagesReceived<S> {
215215- type MessagesSent = S::MessagesSent;
216216- type MessagesReceived = Set<members::messages_received>;
217215 type Convos = S::Convos;
216216+ type MessagesReceived = Set<members::messages_received>;
217217+ type MessagesSent = S::MessagesSent;
218218 type ConvosStarted = S::ConvosStarted;
219219 }
220220- ///State transition - sets the `convos` field to Set
221221- pub struct SetConvos<S: State = Empty>(PhantomData<fn() -> S>);
222222- impl<S: State> sealed::Sealed for SetConvos<S> {}
223223- impl<S: State> State for SetConvos<S> {
224224- type MessagesSent = S::MessagesSent;
220220+ ///State transition - sets the `messages_sent` field to Set
221221+ pub struct SetMessagesSent<S: State = Empty>(PhantomData<fn() -> S>);
222222+ impl<S: State> sealed::Sealed for SetMessagesSent<S> {}
223223+ impl<S: State> State for SetMessagesSent<S> {
224224+ type Convos = S::Convos;
225225 type MessagesReceived = S::MessagesReceived;
226226- type Convos = Set<members::convos>;
226226+ type MessagesSent = Set<members::messages_sent>;
227227 type ConvosStarted = S::ConvosStarted;
228228 }
229229 ///State transition - sets the `convos_started` field to Set
230230 pub struct SetConvosStarted<S: State = Empty>(PhantomData<fn() -> S>);
231231 impl<S: State> sealed::Sealed for SetConvosStarted<S> {}
232232 impl<S: State> State for SetConvosStarted<S> {
233233- type MessagesSent = S::MessagesSent;
234234- type MessagesReceived = S::MessagesReceived;
235233 type Convos = S::Convos;
234234+ type MessagesReceived = S::MessagesReceived;
235235+ type MessagesSent = S::MessagesSent;
236236 type ConvosStarted = Set<members::convos_started>;
237237 }
238238 /// Marker types for field names
239239 #[allow(non_camel_case_types)]
240240 pub mod members {
241241- ///Marker type for the `messages_sent` field
242242- pub struct messages_sent(());
243243- ///Marker type for the `messages_received` field
244244- pub struct messages_received(());
245241 ///Marker type for the `convos` field
246242 pub struct convos(());
243243+ ///Marker type for the `messages_received` field
244244+ pub struct messages_received(());
245245+ ///Marker type for the `messages_sent` field
246246+ pub struct messages_sent(());
247247 ///Marker type for the `convos_started` field
248248 pub struct convos_started(());
249249 }
···358358impl<'a, S> MetadataBuilder<'a, S>
359359where
360360 S: metadata_state::State,
361361- S::MessagesSent: metadata_state::IsSet,
362362- S::MessagesReceived: metadata_state::IsSet,
363361 S::Convos: metadata_state::IsSet,
362362+ S::MessagesReceived: metadata_state::IsSet,
363363+ S::MessagesSent: metadata_state::IsSet,
364364 S::ConvosStarted: metadata_state::IsSet,
365365{
366366 /// Build the final struct
+28-28
crates/weaver-api/src/com_atproto/admin.rs
···8080 }
8181 /// State trait tracking which required fields have been set
8282 pub trait State: sealed::Sealed {
8383+ type IndexedAt;
8384 type Did;
8485 type Handle;
8585- type IndexedAt;
8686 }
8787 /// Empty state - all required fields are unset
8888 pub struct Empty(());
8989 impl sealed::Sealed for Empty {}
9090 impl State for Empty {
9191+ type IndexedAt = Unset;
9192 type Did = Unset;
9293 type Handle = Unset;
9393- type IndexedAt = Unset;
9494+ }
9595+ ///State transition - sets the `indexed_at` field to Set
9696+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
9797+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
9898+ impl<S: State> State for SetIndexedAt<S> {
9999+ type IndexedAt = Set<members::indexed_at>;
100100+ type Did = S::Did;
101101+ type Handle = S::Handle;
94102 }
95103 ///State transition - sets the `did` field to Set
96104 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
97105 impl<S: State> sealed::Sealed for SetDid<S> {}
98106 impl<S: State> State for SetDid<S> {
107107+ type IndexedAt = S::IndexedAt;
99108 type Did = Set<members::did>;
100109 type Handle = S::Handle;
101101- type IndexedAt = S::IndexedAt;
102110 }
103111 ///State transition - sets the `handle` field to Set
104112 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
105113 impl<S: State> sealed::Sealed for SetHandle<S> {}
106114 impl<S: State> State for SetHandle<S> {
107107- type Did = S::Did;
108108- type Handle = Set<members::handle>;
109115 type IndexedAt = S::IndexedAt;
110110- }
111111- ///State transition - sets the `indexed_at` field to Set
112112- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
113113- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
114114- impl<S: State> State for SetIndexedAt<S> {
115116 type Did = S::Did;
116116- type Handle = S::Handle;
117117- type IndexedAt = Set<members::indexed_at>;
117117+ type Handle = Set<members::handle>;
118118 }
119119 /// Marker types for field names
120120 #[allow(non_camel_case_types)]
121121 pub mod members {
122122+ ///Marker type for the `indexed_at` field
123123+ pub struct indexed_at(());
122124 ///Marker type for the `did` field
123125 pub struct did(());
124126 ///Marker type for the `handle` field
125127 pub struct handle(());
126126- ///Marker type for the `indexed_at` field
127127- pub struct indexed_at(());
128128 }
129129}
130130···401401impl<'a, S> AccountViewBuilder<'a, S>
402402where
403403 S: account_view_state::State,
404404+ S::IndexedAt: account_view_state::IsSet,
404405 S::Did: account_view_state::IsSet,
405406 S::Handle: account_view_state::IsSet,
406406- S::IndexedAt: account_view_state::IsSet,
407407{
408408 /// Build the final struct
409409 pub fn build(self) -> AccountView<'a> {
···907907 }
908908 /// State trait tracking which required fields have been set
909909 pub trait State: sealed::Sealed {
910910- type Did;
911910 type Cid;
911911+ type Did;
912912 }
913913 /// Empty state - all required fields are unset
914914 pub struct Empty(());
915915 impl sealed::Sealed for Empty {}
916916 impl State for Empty {
917917- type Did = Unset;
918917 type Cid = Unset;
919919- }
920920- ///State transition - sets the `did` field to Set
921921- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
922922- impl<S: State> sealed::Sealed for SetDid<S> {}
923923- impl<S: State> State for SetDid<S> {
924924- type Did = Set<members::did>;
925925- type Cid = S::Cid;
918918+ type Did = Unset;
926919 }
927920 ///State transition - sets the `cid` field to Set
928921 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
929922 impl<S: State> sealed::Sealed for SetCid<S> {}
930923 impl<S: State> State for SetCid<S> {
931931- type Did = S::Did;
932924 type Cid = Set<members::cid>;
925925+ type Did = S::Did;
926926+ }
927927+ ///State transition - sets the `did` field to Set
928928+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
929929+ impl<S: State> sealed::Sealed for SetDid<S> {}
930930+ impl<S: State> State for SetDid<S> {
931931+ type Cid = S::Cid;
932932+ type Did = Set<members::did>;
933933 }
934934 /// Marker types for field names
935935 #[allow(non_camel_case_types)]
936936 pub mod members {
937937- ///Marker type for the `did` field
938938- pub struct did(());
939937 ///Marker type for the `cid` field
940938 pub struct cid(());
939939+ ///Marker type for the `did` field
940940+ pub struct did(());
941941 }
942942}
943943···10301030impl<'a, S> RepoBlobRefBuilder<'a, S>
10311031where
10321032 S: repo_blob_ref_state::State,
10331033- S::Did: repo_blob_ref_state::IsSet,
10341033 S::Cid: repo_blob_ref_state::IsSet,
10341034+ S::Did: repo_blob_ref_state::IsSet,
10351035{
10361036 /// Build the final struct
10371037 pub fn build(self) -> RepoBlobRef<'a> {
···4242 }
4343 /// State trait tracking which required fields have been set
4444 pub trait State: sealed::Sealed {
4545+ type SenderDid;
4546 type RecipientDid;
4647 type Content;
4747- type SenderDid;
4848 }
4949 /// Empty state - all required fields are unset
5050 pub struct Empty(());
5151 impl sealed::Sealed for Empty {}
5252 impl State for Empty {
5353+ type SenderDid = Unset;
5354 type RecipientDid = Unset;
5455 type Content = Unset;
5555- type SenderDid = Unset;
5656+ }
5757+ ///State transition - sets the `sender_did` field to Set
5858+ pub struct SetSenderDid<S: State = Empty>(PhantomData<fn() -> S>);
5959+ impl<S: State> sealed::Sealed for SetSenderDid<S> {}
6060+ impl<S: State> State for SetSenderDid<S> {
6161+ type SenderDid = Set<members::sender_did>;
6262+ type RecipientDid = S::RecipientDid;
6363+ type Content = S::Content;
5664 }
5765 ///State transition - sets the `recipient_did` field to Set
5866 pub struct SetRecipientDid<S: State = Empty>(PhantomData<fn() -> S>);
5967 impl<S: State> sealed::Sealed for SetRecipientDid<S> {}
6068 impl<S: State> State for SetRecipientDid<S> {
6969+ type SenderDid = S::SenderDid;
6170 type RecipientDid = Set<members::recipient_did>;
6271 type Content = S::Content;
6363- type SenderDid = S::SenderDid;
6472 }
6573 ///State transition - sets the `content` field to Set
6674 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
6775 impl<S: State> sealed::Sealed for SetContent<S> {}
6876 impl<S: State> State for SetContent<S> {
6969- type RecipientDid = S::RecipientDid;
7070- type Content = Set<members::content>;
7177 type SenderDid = S::SenderDid;
7272- }
7373- ///State transition - sets the `sender_did` field to Set
7474- pub struct SetSenderDid<S: State = Empty>(PhantomData<fn() -> S>);
7575- impl<S: State> sealed::Sealed for SetSenderDid<S> {}
7676- impl<S: State> State for SetSenderDid<S> {
7778 type RecipientDid = S::RecipientDid;
7878- type Content = S::Content;
7979- type SenderDid = Set<members::sender_did>;
7979+ type Content = Set<members::content>;
8080 }
8181 /// Marker types for field names
8282 #[allow(non_camel_case_types)]
8383 pub mod members {
8484+ ///Marker type for the `sender_did` field
8585+ pub struct sender_did(());
8486 ///Marker type for the `recipient_did` field
8587 pub struct recipient_did(());
8688 ///Marker type for the `content` field
8789 pub struct content(());
8888- ///Marker type for the `sender_did` field
8989- pub struct sender_did(());
9090 }
9191}
9292···213213impl<'a, S> SendEmailBuilder<'a, S>
214214where
215215 S: send_email_state::State,
216216+ S::SenderDid: send_email_state::IsSet,
216217 S::RecipientDid: send_email_state::IsSet,
217218 S::Content: send_email_state::IsSet,
218218- S::SenderDid: send_email_state::IsSet,
219219{
220220 /// Build the final struct
221221 pub fn build(self) -> SendEmail<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Did;
3736 type Password;
3737+ type Did;
3838 }
3939 /// Empty state - all required fields are unset
4040 pub struct Empty(());
4141 impl sealed::Sealed for Empty {}
4242 impl State for Empty {
4343- type Did = Unset;
4443 type Password = Unset;
4545- }
4646- ///State transition - sets the `did` field to Set
4747- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetDid<S> {}
4949- impl<S: State> State for SetDid<S> {
5050- type Did = Set<members::did>;
5151- type Password = S::Password;
4444+ type Did = Unset;
5245 }
5346 ///State transition - sets the `password` field to Set
5447 pub struct SetPassword<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetPassword<S> {}
5649 impl<S: State> State for SetPassword<S> {
5757- type Did = S::Did;
5850 type Password = Set<members::password>;
5151+ type Did = S::Did;
5252+ }
5353+ ///State transition - sets the `did` field to Set
5454+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetDid<S> {}
5656+ impl<S: State> State for SetDid<S> {
5757+ type Password = S::Password;
5858+ type Did = Set<members::did>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `did` field
6464- pub struct did(());
6563 ///Marker type for the `password` field
6664 pub struct password(());
6565+ ///Marker type for the `did` field
6666+ pub struct did(());
6767 }
6868}
6969···142142impl<'a, S> UpdateAccountPasswordBuilder<'a, S>
143143where
144144 S: update_account_password_state::State,
145145- S::Did: update_account_password_state::IsSet,
146145 S::Password: update_account_password_state::IsSet,
146146+ S::Did: update_account_password_state::IsSet,
147147{
148148 /// Build the final struct
149149 pub fn build(self) -> UpdateAccountPassword<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Did;
3837 type SigningKey;
3838+ type Did;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type Did = Unset;
4544 type SigningKey = Unset;
4646- }
4747- ///State transition - sets the `did` field to Set
4848- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetDid<S> {}
5050- impl<S: State> State for SetDid<S> {
5151- type Did = Set<members::did>;
5252- type SigningKey = S::SigningKey;
4545+ type Did = Unset;
5346 }
5447 ///State transition - sets the `signing_key` field to Set
5548 pub struct SetSigningKey<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetSigningKey<S> {}
5750 impl<S: State> State for SetSigningKey<S> {
5858- type Did = S::Did;
5951 type SigningKey = Set<members::signing_key>;
5252+ type Did = S::Did;
5353+ }
5454+ ///State transition - sets the `did` field to Set
5555+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetDid<S> {}
5757+ impl<S: State> State for SetDid<S> {
5858+ type SigningKey = S::SigningKey;
5959+ type Did = Set<members::did>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `did` field
6565- pub struct did(());
6664 ///Marker type for the `signing_key` field
6765 pub struct signing_key(());
6666+ ///Marker type for the `did` field
6767+ pub struct did(());
6868 }
6969}
7070···149149impl<'a, S> UpdateAccountSigningKeyBuilder<'a, S>
150150where
151151 S: update_account_signing_key_state::State,
152152- S::Did: update_account_signing_key_state::IsSet,
153152 S::SigningKey: update_account_signing_key_state::IsSet,
153153+ S::Did: update_account_signing_key_state::IsSet,
154154{
155155 /// Build the final struct
156156 pub fn build(self) -> UpdateAccountSigningKey<'a> {
+61-60
crates/weaver-api/src/com_atproto/label.rs
···3737 pub neg: std::option::Option<bool>,
3838 /// Signature of dag-cbor encoded label.
3939 #[serde(skip_serializing_if = "std::option::Option::is_none")]
4040+ #[serde(default, with = "jacquard_common::opt_serde_bytes_helper")]
4041 pub sig: std::option::Option<bytes::Bytes>,
4142 /// DID of the actor who created this label.
4243 #[serde(borrow)]
···6263 }
6364 /// State trait tracking which required fields have been set
6465 pub trait State: sealed::Sealed {
6565- type Src;
6666- type Uri;
6766 type Val;
6767+ type Uri;
6868 type Cts;
6969+ type Src;
6970 }
7071 /// Empty state - all required fields are unset
7172 pub struct Empty(());
7273 impl sealed::Sealed for Empty {}
7374 impl State for Empty {
7474- type Src = Unset;
7575+ type Val = Unset;
7576 type Uri = Unset;
7676- type Val = Unset;
7777 type Cts = Unset;
7878+ type Src = Unset;
7879 }
7979- ///State transition - sets the `src` field to Set
8080- pub struct SetSrc<S: State = Empty>(PhantomData<fn() -> S>);
8181- impl<S: State> sealed::Sealed for SetSrc<S> {}
8282- impl<S: State> State for SetSrc<S> {
8383- type Src = Set<members::src>;
8080+ ///State transition - sets the `val` field to Set
8181+ pub struct SetVal<S: State = Empty>(PhantomData<fn() -> S>);
8282+ impl<S: State> sealed::Sealed for SetVal<S> {}
8383+ impl<S: State> State for SetVal<S> {
8484+ type Val = Set<members::val>;
8485 type Uri = S::Uri;
8585- type Val = S::Val;
8686 type Cts = S::Cts;
8787+ type Src = S::Src;
8788 }
8889 ///State transition - sets the `uri` field to Set
8990 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
9091 impl<S: State> sealed::Sealed for SetUri<S> {}
9192 impl<S: State> State for SetUri<S> {
9292- type Src = S::Src;
9393+ type Val = S::Val;
9394 type Uri = Set<members::uri>;
9494- type Val = S::Val;
9595 type Cts = S::Cts;
9696- }
9797- ///State transition - sets the `val` field to Set
9898- pub struct SetVal<S: State = Empty>(PhantomData<fn() -> S>);
9999- impl<S: State> sealed::Sealed for SetVal<S> {}
100100- impl<S: State> State for SetVal<S> {
10196 type Src = S::Src;
102102- type Uri = S::Uri;
103103- type Val = Set<members::val>;
104104- type Cts = S::Cts;
10597 }
10698 ///State transition - sets the `cts` field to Set
10799 pub struct SetCts<S: State = Empty>(PhantomData<fn() -> S>);
108100 impl<S: State> sealed::Sealed for SetCts<S> {}
109101 impl<S: State> State for SetCts<S> {
110110- type Src = S::Src;
102102+ type Val = S::Val;
111103 type Uri = S::Uri;
112112- type Val = S::Val;
113104 type Cts = Set<members::cts>;
105105+ type Src = S::Src;
106106+ }
107107+ ///State transition - sets the `src` field to Set
108108+ pub struct SetSrc<S: State = Empty>(PhantomData<fn() -> S>);
109109+ impl<S: State> sealed::Sealed for SetSrc<S> {}
110110+ impl<S: State> State for SetSrc<S> {
111111+ type Val = S::Val;
112112+ type Uri = S::Uri;
113113+ type Cts = S::Cts;
114114+ type Src = Set<members::src>;
114115 }
115116 /// Marker types for field names
116117 #[allow(non_camel_case_types)]
117118 pub mod members {
118118- ///Marker type for the `src` field
119119- pub struct src(());
119119+ ///Marker type for the `val` field
120120+ pub struct val(());
120121 ///Marker type for the `uri` field
121122 pub struct uri(());
122122- ///Marker type for the `val` field
123123- pub struct val(());
124123 ///Marker type for the `cts` field
125124 pub struct cts(());
125125+ ///Marker type for the `src` field
126126+ pub struct src(());
126127 }
127128}
128129···327328impl<'a, S> LabelBuilder<'a, S>
328329where
329330 S: label_state::State,
330330- S::Src: label_state::IsSet,
331331- S::Uri: label_state::IsSet,
332331 S::Val: label_state::IsSet,
332332+ S::Uri: label_state::IsSet,
333333 S::Cts: label_state::IsSet,
334334+ S::Src: label_state::IsSet,
334335{
335336 /// Build the final struct
336337 pub fn build(self) -> Label<'a> {
···10521053 }
10531054 /// State trait tracking which required fields have been set
10541055 pub trait State: sealed::Sealed {
10551055- type Identifier;
10561056 type Severity;
10571057 type Blurs;
10581058+ type Identifier;
10581059 type Locales;
10591060 }
10601061 /// Empty state - all required fields are unset
10611062 pub struct Empty(());
10621063 impl sealed::Sealed for Empty {}
10631064 impl State for Empty {
10641064- type Identifier = Unset;
10651065 type Severity = Unset;
10661066 type Blurs = Unset;
10671067+ type Identifier = Unset;
10671068 type Locales = Unset;
10681069 }
10691069- ///State transition - sets the `identifier` field to Set
10701070- pub struct SetIdentifier<S: State = Empty>(PhantomData<fn() -> S>);
10711071- impl<S: State> sealed::Sealed for SetIdentifier<S> {}
10721072- impl<S: State> State for SetIdentifier<S> {
10731073- type Identifier = Set<members::identifier>;
10741074- type Severity = S::Severity;
10751075- type Blurs = S::Blurs;
10761076- type Locales = S::Locales;
10771077- }
10781070 ///State transition - sets the `severity` field to Set
10791071 pub struct SetSeverity<S: State = Empty>(PhantomData<fn() -> S>);
10801072 impl<S: State> sealed::Sealed for SetSeverity<S> {}
10811073 impl<S: State> State for SetSeverity<S> {
10821082- type Identifier = S::Identifier;
10831074 type Severity = Set<members::severity>;
10841075 type Blurs = S::Blurs;
10761076+ type Identifier = S::Identifier;
10851077 type Locales = S::Locales;
10861078 }
10871079 ///State transition - sets the `blurs` field to Set
10881080 pub struct SetBlurs<S: State = Empty>(PhantomData<fn() -> S>);
10891081 impl<S: State> sealed::Sealed for SetBlurs<S> {}
10901082 impl<S: State> State for SetBlurs<S> {
10911091- type Identifier = S::Identifier;
10921083 type Severity = S::Severity;
10931084 type Blurs = Set<members::blurs>;
10851085+ type Identifier = S::Identifier;
10861086+ type Locales = S::Locales;
10871087+ }
10881088+ ///State transition - sets the `identifier` field to Set
10891089+ pub struct SetIdentifier<S: State = Empty>(PhantomData<fn() -> S>);
10901090+ impl<S: State> sealed::Sealed for SetIdentifier<S> {}
10911091+ impl<S: State> State for SetIdentifier<S> {
10921092+ type Severity = S::Severity;
10931093+ type Blurs = S::Blurs;
10941094+ type Identifier = Set<members::identifier>;
10941095 type Locales = S::Locales;
10951096 }
10961097 ///State transition - sets the `locales` field to Set
10971098 pub struct SetLocales<S: State = Empty>(PhantomData<fn() -> S>);
10981099 impl<S: State> sealed::Sealed for SetLocales<S> {}
10991100 impl<S: State> State for SetLocales<S> {
11001100- type Identifier = S::Identifier;
11011101 type Severity = S::Severity;
11021102 type Blurs = S::Blurs;
11031103+ type Identifier = S::Identifier;
11031104 type Locales = Set<members::locales>;
11041105 }
11051106 /// Marker types for field names
11061107 #[allow(non_camel_case_types)]
11071108 pub mod members {
11081108- ///Marker type for the `identifier` field
11091109- pub struct identifier(());
11101109 ///Marker type for the `severity` field
11111110 pub struct severity(());
11121111 ///Marker type for the `blurs` field
11131112 pub struct blurs(());
11131113+ ///Marker type for the `identifier` field
11141114+ pub struct identifier(());
11141115 ///Marker type for the `locales` field
11151116 pub struct locales(());
11161117 }
···12671268impl<'a, S> LabelValueDefinitionBuilder<'a, S>
12681269where
12691270 S: label_value_definition_state::State,
12701270- S::Identifier: label_value_definition_state::IsSet,
12711271 S::Severity: label_value_definition_state::IsSet,
12721272 S::Blurs: label_value_definition_state::IsSet,
12731273+ S::Identifier: label_value_definition_state::IsSet,
12731274 S::Locales: label_value_definition_state::IsSet,
12741275{
12751276 /// Build the final struct
···13871388 /// State trait tracking which required fields have been set
13881389 pub trait State: sealed::Sealed {
13891390 type Lang;
13901390- type Name;
13911391 type Description;
13921392+ type Name;
13921393 }
13931394 /// Empty state - all required fields are unset
13941395 pub struct Empty(());
13951396 impl sealed::Sealed for Empty {}
13961397 impl State for Empty {
13971398 type Lang = Unset;
13981398- type Name = Unset;
13991399 type Description = Unset;
14001400+ type Name = Unset;
14001401 }
14011402 ///State transition - sets the `lang` field to Set
14021403 pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
14031404 impl<S: State> sealed::Sealed for SetLang<S> {}
14041405 impl<S: State> State for SetLang<S> {
14051406 type Lang = Set<members::lang>;
14061406- type Name = S::Name;
14071407 type Description = S::Description;
14081408- }
14091409- ///State transition - sets the `name` field to Set
14101410- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
14111411- impl<S: State> sealed::Sealed for SetName<S> {}
14121412- impl<S: State> State for SetName<S> {
14131413- type Lang = S::Lang;
14141414- type Name = Set<members::name>;
14151415- type Description = S::Description;
14081408+ type Name = S::Name;
14161409 }
14171410 ///State transition - sets the `description` field to Set
14181411 pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
14191412 impl<S: State> sealed::Sealed for SetDescription<S> {}
14201413 impl<S: State> State for SetDescription<S> {
14211414 type Lang = S::Lang;
14221422- type Name = S::Name;
14231415 type Description = Set<members::description>;
14161416+ type Name = S::Name;
14171417+ }
14181418+ ///State transition - sets the `name` field to Set
14191419+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
14201420+ impl<S: State> sealed::Sealed for SetName<S> {}
14211421+ impl<S: State> State for SetName<S> {
14221422+ type Lang = S::Lang;
14231423+ type Description = S::Description;
14241424+ type Name = Set<members::name>;
14241425 }
14251426 /// Marker types for field names
14261427 #[allow(non_camel_case_types)]
14271428 pub mod members {
14281429 ///Marker type for the `lang` field
14291430 pub struct lang(());
14311431+ ///Marker type for the `description` field
14321432+ pub struct description(());
14301433 ///Marker type for the `name` field
14311434 pub struct name(());
14321432- ///Marker type for the `description` field
14331433- pub struct description(());
14341435 }
14351436}
14361437···15411542where
15421543 S: label_value_definition_strings_state::State,
15431544 S::Lang: label_value_definition_strings_state::IsSet,
15441544- S::Name: label_value_definition_strings_state::IsSet,
15451545 S::Description: label_value_definition_strings_state::IsSet,
15461546+ S::Name: label_value_definition_strings_state::IsSet,
15461547{
15471548 /// Build the final struct
15481549 pub fn build(self) -> LabelValueDefinitionStrings<'a> {
···203203 }
204204 /// State trait tracking which required fields have been set
205205 pub trait State: sealed::Sealed {
206206- type Seq;
207206 type Labels;
207207+ type Seq;
208208 }
209209 /// Empty state - all required fields are unset
210210 pub struct Empty(());
211211 impl sealed::Sealed for Empty {}
212212 impl State for Empty {
213213- type Seq = Unset;
214213 type Labels = Unset;
215215- }
216216- ///State transition - sets the `seq` field to Set
217217- pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
218218- impl<S: State> sealed::Sealed for SetSeq<S> {}
219219- impl<S: State> State for SetSeq<S> {
220220- type Seq = Set<members::seq>;
221221- type Labels = S::Labels;
214214+ type Seq = Unset;
222215 }
223216 ///State transition - sets the `labels` field to Set
224217 pub struct SetLabels<S: State = Empty>(PhantomData<fn() -> S>);
225218 impl<S: State> sealed::Sealed for SetLabels<S> {}
226219 impl<S: State> State for SetLabels<S> {
227227- type Seq = S::Seq;
228220 type Labels = Set<members::labels>;
221221+ type Seq = S::Seq;
222222+ }
223223+ ///State transition - sets the `seq` field to Set
224224+ pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
225225+ impl<S: State> sealed::Sealed for SetSeq<S> {}
226226+ impl<S: State> State for SetSeq<S> {
227227+ type Labels = S::Labels;
228228+ type Seq = Set<members::seq>;
229229 }
230230 /// Marker types for field names
231231 #[allow(non_camel_case_types)]
232232 pub mod members {
233233- ///Marker type for the `seq` field
234234- pub struct seq(());
235233 ///Marker type for the `labels` field
236234 pub struct labels(());
235235+ ///Marker type for the `seq` field
236236+ pub struct seq(());
237237 }
238238}
239239···306306impl<'a, S> LabelsBuilder<'a, S>
307307where
308308 S: labels_state::State,
309309- S::Seq: labels_state::IsSet,
310309 S::Labels: labels_state::IsSet,
310310+ S::Seq: labels_state::IsSet,
311311{
312312 /// Build the final struct
313313 pub fn build(self) -> Labels<'a> {
···4343 }
4444 /// State trait tracking which required fields have been set
4545 pub trait State: sealed::Sealed {
4646- type ReasonType;
4746 type Subject;
4747+ type ReasonType;
4848 }
4949 /// Empty state - all required fields are unset
5050 pub struct Empty(());
5151 impl sealed::Sealed for Empty {}
5252 impl State for Empty {
5353- type ReasonType = Unset;
5453 type Subject = Unset;
5555- }
5656- ///State transition - sets the `reason_type` field to Set
5757- pub struct SetReasonType<S: State = Empty>(PhantomData<fn() -> S>);
5858- impl<S: State> sealed::Sealed for SetReasonType<S> {}
5959- impl<S: State> State for SetReasonType<S> {
6060- type ReasonType = Set<members::reason_type>;
6161- type Subject = S::Subject;
5454+ type ReasonType = Unset;
6255 }
6356 ///State transition - sets the `subject` field to Set
6457 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
6558 impl<S: State> sealed::Sealed for SetSubject<S> {}
6659 impl<S: State> State for SetSubject<S> {
6767- type ReasonType = S::ReasonType;
6860 type Subject = Set<members::subject>;
6161+ type ReasonType = S::ReasonType;
6262+ }
6363+ ///State transition - sets the `reason_type` field to Set
6464+ pub struct SetReasonType<S: State = Empty>(PhantomData<fn() -> S>);
6565+ impl<S: State> sealed::Sealed for SetReasonType<S> {}
6666+ impl<S: State> State for SetReasonType<S> {
6767+ type Subject = S::Subject;
6868+ type ReasonType = Set<members::reason_type>;
6969 }
7070 /// Marker types for field names
7171 #[allow(non_camel_case_types)]
7272 pub mod members {
7373- ///Marker type for the `reason_type` field
7474- pub struct reason_type(());
7573 ///Marker type for the `subject` field
7674 pub struct subject(());
7575+ ///Marker type for the `reason_type` field
7676+ pub struct reason_type(());
7777 }
7878}
7979···187187impl<'a, S> CreateReportBuilder<'a, S>
188188where
189189 S: create_report_state::State,
190190- S::ReasonType: create_report_state::IsSet,
191190 S::Subject: create_report_state::IsSet,
191191+ S::ReasonType: create_report_state::IsSet,
192192{
193193 /// Build the final struct
194194 pub fn build(self) -> CreateReport<'a> {
···4242 }
4343 /// State trait tracking which required fields have been set
4444 pub trait State: sealed::Sealed {
4545- type Collection;
4645 type Value;
4646+ type Collection;
4747 }
4848 /// Empty state - all required fields are unset
4949 pub struct Empty(());
5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252- type Collection = Unset;
5352 type Value = Unset;
5454- }
5555- ///State transition - sets the `collection` field to Set
5656- pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
5757- impl<S: State> sealed::Sealed for SetCollection<S> {}
5858- impl<S: State> State for SetCollection<S> {
5959- type Collection = Set<members::collection>;
6060- type Value = S::Value;
5353+ type Collection = Unset;
6154 }
6255 ///State transition - sets the `value` field to Set
6356 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
6457 impl<S: State> sealed::Sealed for SetValue<S> {}
6558 impl<S: State> State for SetValue<S> {
6666- type Collection = S::Collection;
6759 type Value = Set<members::value>;
6060+ type Collection = S::Collection;
6161+ }
6262+ ///State transition - sets the `collection` field to Set
6363+ pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetCollection<S> {}
6565+ impl<S: State> State for SetCollection<S> {
6666+ type Value = S::Value;
6767+ type Collection = Set<members::collection>;
6868 }
6969 /// Marker types for field names
7070 #[allow(non_camel_case_types)]
7171 pub mod members {
7272- ///Marker type for the `collection` field
7373- pub struct collection(());
7472 ///Marker type for the `value` field
7573 pub struct value(());
7474+ ///Marker type for the `collection` field
7575+ pub struct collection(());
7676 }
7777}
7878···179179impl<'a, S> CreateBuilder<'a, S>
180180where
181181 S: create_state::State,
182182- S::Collection: create_state::IsSet,
183182 S::Value: create_state::IsSet,
183183+ S::Collection: create_state::IsSet,
184184{
185185 /// Build the final struct
186186 pub fn build(self) -> Create<'a> {
···728728 }
729729 /// State trait tracking which required fields have been set
730730 pub trait State: sealed::Sealed {
731731- type Uri;
732731 type Cid;
732732+ type Uri;
733733 }
734734 /// Empty state - all required fields are unset
735735 pub struct Empty(());
736736 impl sealed::Sealed for Empty {}
737737 impl State for Empty {
738738+ type Cid = Unset;
738739 type Uri = Unset;
739739- type Cid = Unset;
740740+ }
741741+ ///State transition - sets the `cid` field to Set
742742+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
743743+ impl<S: State> sealed::Sealed for SetCid<S> {}
744744+ impl<S: State> State for SetCid<S> {
745745+ type Cid = Set<members::cid>;
746746+ type Uri = S::Uri;
740747 }
741748 ///State transition - sets the `uri` field to Set
742749 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
743750 impl<S: State> sealed::Sealed for SetUri<S> {}
744751 impl<S: State> State for SetUri<S> {
745745- type Uri = Set<members::uri>;
746752 type Cid = S::Cid;
747747- }
748748- ///State transition - sets the `cid` field to Set
749749- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
750750- impl<S: State> sealed::Sealed for SetCid<S> {}
751751- impl<S: State> State for SetCid<S> {
752752- type Uri = S::Uri;
753753- type Cid = Set<members::cid>;
753753+ type Uri = Set<members::uri>;
754754 }
755755 /// Marker types for field names
756756 #[allow(non_camel_case_types)]
757757 pub mod members {
758758+ ///Marker type for the `cid` field
759759+ pub struct cid(());
758760 ///Marker type for the `uri` field
759761 pub struct uri(());
760760- ///Marker type for the `cid` field
761761- pub struct cid(());
762762 }
763763}
764764···851851impl<'a, S> CreateResultBuilder<'a, S>
852852where
853853 S: create_result_state::State,
854854- S::Uri: create_result_state::IsSet,
855854 S::Cid: create_result_state::IsSet,
855855+ S::Uri: create_result_state::IsSet,
856856{
857857 /// Build the final struct
858858 pub fn build(self) -> CreateResult<'a> {
···11491149 }
11501150 /// State trait tracking which required fields have been set
11511151 pub trait State: sealed::Sealed {
11521152- type Repo;
11531152 type Writes;
11531153+ type Repo;
11541154 }
11551155 /// Empty state - all required fields are unset
11561156 pub struct Empty(());
11571157 impl sealed::Sealed for Empty {}
11581158 impl State for Empty {
11591159- type Repo = Unset;
11601159 type Writes = Unset;
11611161- }
11621162- ///State transition - sets the `repo` field to Set
11631163- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
11641164- impl<S: State> sealed::Sealed for SetRepo<S> {}
11651165- impl<S: State> State for SetRepo<S> {
11661166- type Repo = Set<members::repo>;
11671167- type Writes = S::Writes;
11601160+ type Repo = Unset;
11681161 }
11691162 ///State transition - sets the `writes` field to Set
11701163 pub struct SetWrites<S: State = Empty>(PhantomData<fn() -> S>);
11711164 impl<S: State> sealed::Sealed for SetWrites<S> {}
11721165 impl<S: State> State for SetWrites<S> {
11661166+ type Writes = Set<members::writes>;
11731167 type Repo = S::Repo;
11741174- type Writes = Set<members::writes>;
11681168+ }
11691169+ ///State transition - sets the `repo` field to Set
11701170+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
11711171+ impl<S: State> sealed::Sealed for SetRepo<S> {}
11721172+ impl<S: State> State for SetRepo<S> {
11731173+ type Writes = S::Writes;
11741174+ type Repo = Set<members::repo>;
11751175 }
11761176 /// Marker types for field names
11771177 #[allow(non_camel_case_types)]
11781178 pub mod members {
11791179- ///Marker type for the `repo` field
11801180- pub struct repo(());
11811179 ///Marker type for the `writes` field
11821180 pub struct writes(());
11811181+ ///Marker type for the `repo` field
11821182+ pub struct repo(());
11831183 }
11841184}
11851185···12861286impl<'a, S> ApplyWritesBuilder<'a, S>
12871287where
12881288 S: apply_writes_state::State,
12891289- S::Repo: apply_writes_state::IsSet,
12901289 S::Writes: apply_writes_state::IsSet,
12901290+ S::Repo: apply_writes_state::IsSet,
12911291{
12921292 /// Build the final struct
12931293 pub fn build(self) -> ApplyWrites<'a> {
···14761476 }
14771477 /// State trait tracking which required fields have been set
14781478 pub trait State: sealed::Sealed {
14791479- type Collection;
14801480- type Rkey;
14811479 type Value;
14801480+ type Rkey;
14811481+ type Collection;
14821482 }
14831483 /// Empty state - all required fields are unset
14841484 pub struct Empty(());
14851485 impl sealed::Sealed for Empty {}
14861486 impl State for Empty {
14871487- type Collection = Unset;
14871487+ type Value = Unset;
14881488 type Rkey = Unset;
14891489- type Value = Unset;
14891489+ type Collection = Unset;
14901490 }
14911491- ///State transition - sets the `collection` field to Set
14921492- pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
14931493- impl<S: State> sealed::Sealed for SetCollection<S> {}
14941494- impl<S: State> State for SetCollection<S> {
14951495- type Collection = Set<members::collection>;
14911491+ ///State transition - sets the `value` field to Set
14921492+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
14931493+ impl<S: State> sealed::Sealed for SetValue<S> {}
14941494+ impl<S: State> State for SetValue<S> {
14951495+ type Value = Set<members::value>;
14961496 type Rkey = S::Rkey;
14971497- type Value = S::Value;
14971497+ type Collection = S::Collection;
14981498 }
14991499 ///State transition - sets the `rkey` field to Set
15001500 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
15011501 impl<S: State> sealed::Sealed for SetRkey<S> {}
15021502 impl<S: State> State for SetRkey<S> {
15031503- type Collection = S::Collection;
15031503+ type Value = S::Value;
15041504 type Rkey = Set<members::rkey>;
15051505- type Value = S::Value;
15051505+ type Collection = S::Collection;
15061506 }
15071507- ///State transition - sets the `value` field to Set
15081508- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
15091509- impl<S: State> sealed::Sealed for SetValue<S> {}
15101510- impl<S: State> State for SetValue<S> {
15111511- type Collection = S::Collection;
15071507+ ///State transition - sets the `collection` field to Set
15081508+ pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
15091509+ impl<S: State> sealed::Sealed for SetCollection<S> {}
15101510+ impl<S: State> State for SetCollection<S> {
15111511+ type Value = S::Value;
15121512 type Rkey = S::Rkey;
15131513- type Value = Set<members::value>;
15131513+ type Collection = Set<members::collection>;
15141514 }
15151515 /// Marker types for field names
15161516 #[allow(non_camel_case_types)]
15171517 pub mod members {
15181518- ///Marker type for the `collection` field
15191519- pub struct collection(());
15181518+ ///Marker type for the `value` field
15191519+ pub struct value(());
15201520 ///Marker type for the `rkey` field
15211521 pub struct rkey(());
15221522- ///Marker type for the `value` field
15231523- pub struct value(());
15221522+ ///Marker type for the `collection` field
15231523+ pub struct collection(());
15241524 }
15251525}
15261526···16211621impl<'a, S> UpdateBuilder<'a, S>
16221622where
16231623 S: update_state::State,
16241624- S::Collection: update_state::IsSet,
16251625- S::Rkey: update_state::IsSet,
16261624 S::Value: update_state::IsSet,
16251625+ S::Rkey: update_state::IsSet,
16261626+ S::Collection: update_state::IsSet,
16271627{
16281628 /// Build the final struct
16291629 pub fn build(self) -> Update<'a> {
···5454 /// State trait tracking which required fields have been set
5555 pub trait State: sealed::Sealed {
5656 type Repo;
5757- type Collection;
5857 type Record;
5858+ type Collection;
5959 }
6060 /// Empty state - all required fields are unset
6161 pub struct Empty(());
6262 impl sealed::Sealed for Empty {}
6363 impl State for Empty {
6464 type Repo = Unset;
6565- type Collection = Unset;
6665 type Record = Unset;
6666+ type Collection = Unset;
6767 }
6868 ///State transition - sets the `repo` field to Set
6969 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
7070 impl<S: State> sealed::Sealed for SetRepo<S> {}
7171 impl<S: State> State for SetRepo<S> {
7272 type Repo = Set<members::repo>;
7373- type Collection = S::Collection;
7473 type Record = S::Record;
7575- }
7676- ///State transition - sets the `collection` field to Set
7777- pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
7878- impl<S: State> sealed::Sealed for SetCollection<S> {}
7979- impl<S: State> State for SetCollection<S> {
8080- type Repo = S::Repo;
8181- type Collection = Set<members::collection>;
8282- type Record = S::Record;
7474+ type Collection = S::Collection;
8375 }
8476 ///State transition - sets the `record` field to Set
8577 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
8678 impl<S: State> sealed::Sealed for SetRecord<S> {}
8779 impl<S: State> State for SetRecord<S> {
8880 type Repo = S::Repo;
8989- type Collection = S::Collection;
9081 type Record = Set<members::record>;
8282+ type Collection = S::Collection;
8383+ }
8484+ ///State transition - sets the `collection` field to Set
8585+ pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
8686+ impl<S: State> sealed::Sealed for SetCollection<S> {}
8787+ impl<S: State> State for SetCollection<S> {
8888+ type Repo = S::Repo;
8989+ type Record = S::Record;
9090+ type Collection = Set<members::collection>;
9191 }
9292 /// Marker types for field names
9393 #[allow(non_camel_case_types)]
9494 pub mod members {
9595 ///Marker type for the `repo` field
9696 pub struct repo(());
9797+ ///Marker type for the `record` field
9898+ pub struct record(());
9799 ///Marker type for the `collection` field
98100 pub struct collection(());
9999- ///Marker type for the `record` field
100100- pub struct record(());
101101 }
102102}
103103···259259where
260260 S: create_record_state::State,
261261 S::Repo: create_record_state::IsSet,
262262- S::Collection: create_record_state::IsSet,
263262 S::Record: create_record_state::IsSet,
263263+ S::Collection: create_record_state::IsSet,
264264{
265265 /// Build the final struct
266266 pub fn build(self) -> CreateRecord<'a> {
···4848 }
4949 /// State trait tracking which required fields have been set
5050 pub trait State: sealed::Sealed {
5151- type Repo;
5251 type Collection;
5252+ type Repo;
5353 type Rkey;
5454 }
5555 /// Empty state - all required fields are unset
5656 pub struct Empty(());
5757 impl sealed::Sealed for Empty {}
5858 impl State for Empty {
5959- type Repo = Unset;
6059 type Collection = Unset;
6060+ type Repo = Unset;
6161 type Rkey = Unset;
6262 }
6363- ///State transition - sets the `repo` field to Set
6464- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
6565- impl<S: State> sealed::Sealed for SetRepo<S> {}
6666- impl<S: State> State for SetRepo<S> {
6767- type Repo = Set<members::repo>;
6868- type Collection = S::Collection;
6969- type Rkey = S::Rkey;
7070- }
7163 ///State transition - sets the `collection` field to Set
7264 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
7365 impl<S: State> sealed::Sealed for SetCollection<S> {}
7466 impl<S: State> State for SetCollection<S> {
7575- type Repo = S::Repo;
7667 type Collection = Set<members::collection>;
6868+ type Repo = S::Repo;
6969+ type Rkey = S::Rkey;
7070+ }
7171+ ///State transition - sets the `repo` field to Set
7272+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
7373+ impl<S: State> sealed::Sealed for SetRepo<S> {}
7474+ impl<S: State> State for SetRepo<S> {
7575+ type Collection = S::Collection;
7676+ type Repo = Set<members::repo>;
7777 type Rkey = S::Rkey;
7878 }
7979 ///State transition - sets the `rkey` field to Set
8080 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
8181 impl<S: State> sealed::Sealed for SetRkey<S> {}
8282 impl<S: State> State for SetRkey<S> {
8383- type Repo = S::Repo;
8483 type Collection = S::Collection;
8484+ type Repo = S::Repo;
8585 type Rkey = Set<members::rkey>;
8686 }
8787 /// Marker types for field names
8888 #[allow(non_camel_case_types)]
8989 pub mod members {
9090+ ///Marker type for the `collection` field
9191+ pub struct collection(());
9092 ///Marker type for the `repo` field
9193 pub struct repo(());
9292- ///Marker type for the `collection` field
9393- pub struct collection(());
9494 ///Marker type for the `rkey` field
9595 pub struct rkey(());
9696 }
···233233impl<'a, S> DeleteRecordBuilder<'a, S>
234234where
235235 S: delete_record_state::State,
236236- S::Repo: delete_record_state::IsSet,
237236 S::Collection: delete_record_state::IsSet,
237237+ S::Repo: delete_record_state::IsSet,
238238 S::Rkey: delete_record_state::IsSet,
239239{
240240 /// Build the final struct
···3939 }
4040 /// State trait tracking which required fields have been set
4141 pub trait State: sealed::Sealed {
4242- type Repo;
4342 type Collection;
4343+ type Repo;
4444 type Rkey;
4545 }
4646 /// Empty state - all required fields are unset
4747 pub struct Empty(());
4848 impl sealed::Sealed for Empty {}
4949 impl State for Empty {
5050- type Repo = Unset;
5150 type Collection = Unset;
5151+ type Repo = Unset;
5252 type Rkey = Unset;
5353 }
5454- ///State transition - sets the `repo` field to Set
5555- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
5656- impl<S: State> sealed::Sealed for SetRepo<S> {}
5757- impl<S: State> State for SetRepo<S> {
5858- type Repo = Set<members::repo>;
5959- type Collection = S::Collection;
6060- type Rkey = S::Rkey;
6161- }
6254 ///State transition - sets the `collection` field to Set
6355 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
6456 impl<S: State> sealed::Sealed for SetCollection<S> {}
6557 impl<S: State> State for SetCollection<S> {
6666- type Repo = S::Repo;
6758 type Collection = Set<members::collection>;
5959+ type Repo = S::Repo;
6060+ type Rkey = S::Rkey;
6161+ }
6262+ ///State transition - sets the `repo` field to Set
6363+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetRepo<S> {}
6565+ impl<S: State> State for SetRepo<S> {
6666+ type Collection = S::Collection;
6767+ type Repo = Set<members::repo>;
6868 type Rkey = S::Rkey;
6969 }
7070 ///State transition - sets the `rkey` field to Set
7171 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
7272 impl<S: State> sealed::Sealed for SetRkey<S> {}
7373 impl<S: State> State for SetRkey<S> {
7474- type Repo = S::Repo;
7574 type Collection = S::Collection;
7575+ type Repo = S::Repo;
7676 type Rkey = Set<members::rkey>;
7777 }
7878 /// Marker types for field names
7979 #[allow(non_camel_case_types)]
8080 pub mod members {
8181+ ///Marker type for the `collection` field
8282+ pub struct collection(());
8183 ///Marker type for the `repo` field
8284 pub struct repo(());
8383- ///Marker type for the `collection` field
8484- pub struct collection(());
8585 ///Marker type for the `rkey` field
8686 pub struct rkey(());
8787 }
···204204impl<'a, S> GetRecordBuilder<'a, S>
205205where
206206 S: get_record_state::State,
207207- S::Repo: get_record_state::IsSet,
208207 S::Collection: get_record_state::IsSet,
208208+ S::Repo: get_record_state::IsSet,
209209 S::Rkey: get_record_state::IsSet,
210210{
211211 /// Build the final struct
···4040 }
4141 /// State trait tracking which required fields have been set
4242 pub trait State: sealed::Sealed {
4343- type Repo;
4443 type Collection;
4444+ type Repo;
4545 }
4646 /// Empty state - all required fields are unset
4747 pub struct Empty(());
4848 impl sealed::Sealed for Empty {}
4949 impl State for Empty {
5050- type Repo = Unset;
5150 type Collection = Unset;
5252- }
5353- ///State transition - sets the `repo` field to Set
5454- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
5555- impl<S: State> sealed::Sealed for SetRepo<S> {}
5656- impl<S: State> State for SetRepo<S> {
5757- type Repo = Set<members::repo>;
5858- type Collection = S::Collection;
5151+ type Repo = Unset;
5952 }
6053 ///State transition - sets the `collection` field to Set
6154 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
6255 impl<S: State> sealed::Sealed for SetCollection<S> {}
6356 impl<S: State> State for SetCollection<S> {
6464- type Repo = S::Repo;
6557 type Collection = Set<members::collection>;
5858+ type Repo = S::Repo;
5959+ }
6060+ ///State transition - sets the `repo` field to Set
6161+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
6262+ impl<S: State> sealed::Sealed for SetRepo<S> {}
6363+ impl<S: State> State for SetRepo<S> {
6464+ type Collection = S::Collection;
6565+ type Repo = Set<members::repo>;
6666 }
6767 /// Marker types for field names
6868 #[allow(non_camel_case_types)]
6969 pub mod members {
7070+ ///Marker type for the `collection` field
7171+ pub struct collection(());
7072 ///Marker type for the `repo` field
7173 pub struct repo(());
7272- ///Marker type for the `collection` field
7373- pub struct collection(());
7474 }
7575}
7676···188188impl<'a, S> ListRecordsBuilder<'a, S>
189189where
190190 S: list_records_state::State,
191191- S::Repo: list_records_state::IsSet,
192191 S::Collection: list_records_state::IsSet,
192192+ S::Repo: list_records_state::IsSet,
193193{
194194 /// Build the final struct
195195 pub fn build(self) -> ListRecords<'a> {
···278278 }
279279 /// State trait tracking which required fields have been set
280280 pub trait State: sealed::Sealed {
281281- type Uri;
282281 type Cid;
282282+ type Uri;
283283 type Value;
284284 }
285285 /// Empty state - all required fields are unset
286286 pub struct Empty(());
287287 impl sealed::Sealed for Empty {}
288288 impl State for Empty {
289289- type Uri = Unset;
290289 type Cid = Unset;
290290+ type Uri = Unset;
291291 type Value = Unset;
292292 }
293293- ///State transition - sets the `uri` field to Set
294294- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
295295- impl<S: State> sealed::Sealed for SetUri<S> {}
296296- impl<S: State> State for SetUri<S> {
297297- type Uri = Set<members::uri>;
298298- type Cid = S::Cid;
299299- type Value = S::Value;
300300- }
301293 ///State transition - sets the `cid` field to Set
302294 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
303295 impl<S: State> sealed::Sealed for SetCid<S> {}
304296 impl<S: State> State for SetCid<S> {
305305- type Uri = S::Uri;
306297 type Cid = Set<members::cid>;
298298+ type Uri = S::Uri;
299299+ type Value = S::Value;
300300+ }
301301+ ///State transition - sets the `uri` field to Set
302302+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
303303+ impl<S: State> sealed::Sealed for SetUri<S> {}
304304+ impl<S: State> State for SetUri<S> {
305305+ type Cid = S::Cid;
306306+ type Uri = Set<members::uri>;
307307 type Value = S::Value;
308308 }
309309 ///State transition - sets the `value` field to Set
310310 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
311311 impl<S: State> sealed::Sealed for SetValue<S> {}
312312 impl<S: State> State for SetValue<S> {
313313- type Uri = S::Uri;
314313 type Cid = S::Cid;
314314+ type Uri = S::Uri;
315315 type Value = Set<members::value>;
316316 }
317317 /// Marker types for field names
318318 #[allow(non_camel_case_types)]
319319 pub mod members {
320320- ///Marker type for the `uri` field
321321- pub struct uri(());
322320 ///Marker type for the `cid` field
323321 pub struct cid(());
322322+ ///Marker type for the `uri` field
323323+ pub struct uri(());
324324 ///Marker type for the `value` field
325325 pub struct value(());
326326 }
···415415impl<'a, S> RecordBuilder<'a, S>
416416where
417417 S: record_state::State,
418418- S::Uri: record_state::IsSet,
419418 S::Cid: record_state::IsSet,
419419+ S::Uri: record_state::IsSet,
420420 S::Value: record_state::IsSet,
421421{
422422 /// Build the final struct
···5454 }
5555 /// State trait tracking which required fields have been set
5656 pub trait State: sealed::Sealed {
5757- type Repo;
5757+ type Record;
5858 type Collection;
5959 type Rkey;
6060- type Record;
6060+ type Repo;
6161 }
6262 /// Empty state - all required fields are unset
6363 pub struct Empty(());
6464 impl sealed::Sealed for Empty {}
6565 impl State for Empty {
6666- type Repo = Unset;
6666+ type Record = Unset;
6767 type Collection = Unset;
6868 type Rkey = Unset;
6969- type Record = Unset;
6969+ type Repo = Unset;
7070 }
7171- ///State transition - sets the `repo` field to Set
7272- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
7373- impl<S: State> sealed::Sealed for SetRepo<S> {}
7474- impl<S: State> State for SetRepo<S> {
7575- type Repo = Set<members::repo>;
7171+ ///State transition - sets the `record` field to Set
7272+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
7373+ impl<S: State> sealed::Sealed for SetRecord<S> {}
7474+ impl<S: State> State for SetRecord<S> {
7575+ type Record = Set<members::record>;
7676 type Collection = S::Collection;
7777 type Rkey = S::Rkey;
7878- type Record = S::Record;
7878+ type Repo = S::Repo;
7979 }
8080 ///State transition - sets the `collection` field to Set
8181 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
8282 impl<S: State> sealed::Sealed for SetCollection<S> {}
8383 impl<S: State> State for SetCollection<S> {
8484- type Repo = S::Repo;
8484+ type Record = S::Record;
8585 type Collection = Set<members::collection>;
8686 type Rkey = S::Rkey;
8787- type Record = S::Record;
8787+ type Repo = S::Repo;
8888 }
8989 ///State transition - sets the `rkey` field to Set
9090 pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
9191 impl<S: State> sealed::Sealed for SetRkey<S> {}
9292 impl<S: State> State for SetRkey<S> {
9393- type Repo = S::Repo;
9393+ type Record = S::Record;
9494 type Collection = S::Collection;
9595 type Rkey = Set<members::rkey>;
9696- type Record = S::Record;
9797- }
9898- ///State transition - sets the `record` field to Set
9999- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
100100- impl<S: State> sealed::Sealed for SetRecord<S> {}
101101- impl<S: State> State for SetRecord<S> {
10296 type Repo = S::Repo;
9797+ }
9898+ ///State transition - sets the `repo` field to Set
9999+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
100100+ impl<S: State> sealed::Sealed for SetRepo<S> {}
101101+ impl<S: State> State for SetRepo<S> {
102102+ type Record = S::Record;
103103 type Collection = S::Collection;
104104 type Rkey = S::Rkey;
105105- type Record = Set<members::record>;
105105+ type Repo = Set<members::repo>;
106106 }
107107 /// Marker types for field names
108108 #[allow(non_camel_case_types)]
109109 pub mod members {
110110- ///Marker type for the `repo` field
111111- pub struct repo(());
110110+ ///Marker type for the `record` field
111111+ pub struct record(());
112112 ///Marker type for the `collection` field
113113 pub struct collection(());
114114 ///Marker type for the `rkey` field
115115 pub struct rkey(());
116116- ///Marker type for the `record` field
117117- pub struct record(());
116116+ ///Marker type for the `repo` field
117117+ pub struct repo(());
118118 }
119119}
120120···289289impl<'a, S> PutRecordBuilder<'a, S>
290290where
291291 S: put_record_state::State,
292292- S::Repo: put_record_state::IsSet,
292292+ S::Record: put_record_state::IsSet,
293293 S::Collection: put_record_state::IsSet,
294294 S::Rkey: put_record_state::IsSet,
295295- S::Record: put_record_state::IsSet,
295295+ S::Repo: put_record_state::IsSet,
296296{
297297 /// Build the final struct
298298 pub fn build(self) -> PutRecord<'a> {
+70-70
crates/weaver-api/src/com_atproto/server.rs
···6666 }
6767 /// State trait tracking which required fields have been set
6868 pub trait State: sealed::Sealed {
6969+ type Disabled;
7070+ type CreatedBy;
7171+ type Uses;
7272+ type CreatedAt;
6973 type Code;
7074 type Available;
7171- type Disabled;
7275 type ForAccount;
7373- type CreatedBy;
7474- type CreatedAt;
7575- type Uses;
7676 }
7777 /// Empty state - all required fields are unset
7878 pub struct Empty(());
7979 impl sealed::Sealed for Empty {}
8080 impl State for Empty {
8181- type Code = Unset;
8282- type Available = Unset;
8381 type Disabled = Unset;
8484- type ForAccount = Unset;
8582 type CreatedBy = Unset;
8686- type CreatedAt = Unset;
8783 type Uses = Unset;
8888- }
8989- ///State transition - sets the `code` field to Set
9090- pub struct SetCode<S: State = Empty>(PhantomData<fn() -> S>);
9191- impl<S: State> sealed::Sealed for SetCode<S> {}
9292- impl<S: State> State for SetCode<S> {
9393- type Code = Set<members::code>;
9494- type Available = S::Available;
9595- type Disabled = S::Disabled;
9696- type ForAccount = S::ForAccount;
9797- type CreatedBy = S::CreatedBy;
9898- type CreatedAt = S::CreatedAt;
9999- type Uses = S::Uses;
100100- }
101101- ///State transition - sets the `available` field to Set
102102- pub struct SetAvailable<S: State = Empty>(PhantomData<fn() -> S>);
103103- impl<S: State> sealed::Sealed for SetAvailable<S> {}
104104- impl<S: State> State for SetAvailable<S> {
105105- type Code = S::Code;
106106- type Available = Set<members::available>;
107107- type Disabled = S::Disabled;
108108- type ForAccount = S::ForAccount;
109109- type CreatedBy = S::CreatedBy;
110110- type CreatedAt = S::CreatedAt;
111111- type Uses = S::Uses;
8484+ type CreatedAt = Unset;
8585+ type Code = Unset;
8686+ type Available = Unset;
8787+ type ForAccount = Unset;
11288 }
11389 ///State transition - sets the `disabled` field to Set
11490 pub struct SetDisabled<S: State = Empty>(PhantomData<fn() -> S>);
11591 impl<S: State> sealed::Sealed for SetDisabled<S> {}
11692 impl<S: State> State for SetDisabled<S> {
117117- type Code = S::Code;
118118- type Available = S::Available;
11993 type Disabled = Set<members::disabled>;
120120- type ForAccount = S::ForAccount;
12194 type CreatedBy = S::CreatedBy;
122122- type CreatedAt = S::CreatedAt;
12395 type Uses = S::Uses;
124124- }
125125- ///State transition - sets the `for_account` field to Set
126126- pub struct SetForAccount<S: State = Empty>(PhantomData<fn() -> S>);
127127- impl<S: State> sealed::Sealed for SetForAccount<S> {}
128128- impl<S: State> State for SetForAccount<S> {
9696+ type CreatedAt = S::CreatedAt;
12997 type Code = S::Code;
13098 type Available = S::Available;
131131- type Disabled = S::Disabled;
132132- type ForAccount = Set<members::for_account>;
133133- type CreatedBy = S::CreatedBy;
134134- type CreatedAt = S::CreatedAt;
135135- type Uses = S::Uses;
9999+ type ForAccount = S::ForAccount;
136100 }
137101 ///State transition - sets the `created_by` field to Set
138102 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
139103 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
140104 impl<S: State> State for SetCreatedBy<S> {
105105+ type Disabled = S::Disabled;
106106+ type CreatedBy = Set<members::created_by>;
107107+ type Uses = S::Uses;
108108+ type CreatedAt = S::CreatedAt;
141109 type Code = S::Code;
142110 type Available = S::Available;
143143- type Disabled = S::Disabled;
144111 type ForAccount = S::ForAccount;
145145- type CreatedBy = Set<members::created_by>;
112112+ }
113113+ ///State transition - sets the `uses` field to Set
114114+ pub struct SetUses<S: State = Empty>(PhantomData<fn() -> S>);
115115+ impl<S: State> sealed::Sealed for SetUses<S> {}
116116+ impl<S: State> State for SetUses<S> {
117117+ type Disabled = S::Disabled;
118118+ type CreatedBy = S::CreatedBy;
119119+ type Uses = Set<members::uses>;
146120 type CreatedAt = S::CreatedAt;
147147- type Uses = S::Uses;
121121+ type Code = S::Code;
122122+ type Available = S::Available;
123123+ type ForAccount = S::ForAccount;
148124 }
149125 ///State transition - sets the `created_at` field to Set
150126 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
151127 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
152128 impl<S: State> State for SetCreatedAt<S> {
129129+ type Disabled = S::Disabled;
130130+ type CreatedBy = S::CreatedBy;
131131+ type Uses = S::Uses;
132132+ type CreatedAt = Set<members::created_at>;
153133 type Code = S::Code;
154134 type Available = S::Available;
135135+ type ForAccount = S::ForAccount;
136136+ }
137137+ ///State transition - sets the `code` field to Set
138138+ pub struct SetCode<S: State = Empty>(PhantomData<fn() -> S>);
139139+ impl<S: State> sealed::Sealed for SetCode<S> {}
140140+ impl<S: State> State for SetCode<S> {
155141 type Disabled = S::Disabled;
156156- type ForAccount = S::ForAccount;
157142 type CreatedBy = S::CreatedBy;
158158- type CreatedAt = Set<members::created_at>;
159143 type Uses = S::Uses;
160160- }
161161- ///State transition - sets the `uses` field to Set
162162- pub struct SetUses<S: State = Empty>(PhantomData<fn() -> S>);
163163- impl<S: State> sealed::Sealed for SetUses<S> {}
164164- impl<S: State> State for SetUses<S> {
165165- type Code = S::Code;
144144+ type CreatedAt = S::CreatedAt;
145145+ type Code = Set<members::code>;
166146 type Available = S::Available;
147147+ type ForAccount = S::ForAccount;
148148+ }
149149+ ///State transition - sets the `available` field to Set
150150+ pub struct SetAvailable<S: State = Empty>(PhantomData<fn() -> S>);
151151+ impl<S: State> sealed::Sealed for SetAvailable<S> {}
152152+ impl<S: State> State for SetAvailable<S> {
167153 type Disabled = S::Disabled;
154154+ type CreatedBy = S::CreatedBy;
155155+ type Uses = S::Uses;
156156+ type CreatedAt = S::CreatedAt;
157157+ type Code = S::Code;
158158+ type Available = Set<members::available>;
168159 type ForAccount = S::ForAccount;
160160+ }
161161+ ///State transition - sets the `for_account` field to Set
162162+ pub struct SetForAccount<S: State = Empty>(PhantomData<fn() -> S>);
163163+ impl<S: State> sealed::Sealed for SetForAccount<S> {}
164164+ impl<S: State> State for SetForAccount<S> {
165165+ type Disabled = S::Disabled;
169166 type CreatedBy = S::CreatedBy;
167167+ type Uses = S::Uses;
170168 type CreatedAt = S::CreatedAt;
171171- type Uses = Set<members::uses>;
169169+ type Code = S::Code;
170170+ type Available = S::Available;
171171+ type ForAccount = Set<members::for_account>;
172172 }
173173 /// Marker types for field names
174174 #[allow(non_camel_case_types)]
175175 pub mod members {
176176- ///Marker type for the `code` field
177177- pub struct code(());
178178- ///Marker type for the `available` field
179179- pub struct available(());
180176 ///Marker type for the `disabled` field
181177 pub struct disabled(());
182182- ///Marker type for the `for_account` field
183183- pub struct for_account(());
184178 ///Marker type for the `created_by` field
185179 pub struct created_by(());
186186- ///Marker type for the `created_at` field
187187- pub struct created_at(());
188180 ///Marker type for the `uses` field
189181 pub struct uses(());
182182+ ///Marker type for the `created_at` field
183183+ pub struct created_at(());
184184+ ///Marker type for the `code` field
185185+ pub struct code(());
186186+ ///Marker type for the `available` field
187187+ pub struct available(());
188188+ ///Marker type for the `for_account` field
189189+ pub struct for_account(());
190190 }
191191}
192192···359359impl<'a, S> InviteCodeBuilder<'a, S>
360360where
361361 S: invite_code_state::State,
362362- S::Code: invite_code_state::IsSet,
363363- S::Available: invite_code_state::IsSet,
364362 S::Disabled: invite_code_state::IsSet,
365365- S::ForAccount: invite_code_state::IsSet,
366363 S::CreatedBy: invite_code_state::IsSet,
367367- S::CreatedAt: invite_code_state::IsSet,
368364 S::Uses: invite_code_state::IsSet,
365365+ S::CreatedAt: invite_code_state::IsSet,
366366+ S::Code: invite_code_state::IsSet,
367367+ S::Available: invite_code_state::IsSet,
368368+ S::ForAccount: invite_code_state::IsSet,
369369{
370370 /// Build the final struct
371371 pub fn build(self) -> InviteCode<'a> {
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939+ type CreatedAt;
3940 type Name;
4041 type Password;
4141- type CreatedAt;
4242 }
4343 /// Empty state - all required fields are unset
4444 pub struct Empty(());
4545 impl sealed::Sealed for Empty {}
4646 impl State for Empty {
4747+ type CreatedAt = Unset;
4748 type Name = Unset;
4849 type Password = Unset;
4949- type CreatedAt = Unset;
5050+ }
5151+ ///State transition - sets the `created_at` field to Set
5252+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5353+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5454+ impl<S: State> State for SetCreatedAt<S> {
5555+ type CreatedAt = Set<members::created_at>;
5656+ type Name = S::Name;
5757+ type Password = S::Password;
5058 }
5159 ///State transition - sets the `name` field to Set
5260 pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5361 impl<S: State> sealed::Sealed for SetName<S> {}
5462 impl<S: State> State for SetName<S> {
6363+ type CreatedAt = S::CreatedAt;
5564 type Name = Set<members::name>;
5665 type Password = S::Password;
5757- type CreatedAt = S::CreatedAt;
5866 }
5967 ///State transition - sets the `password` field to Set
6068 pub struct SetPassword<S: State = Empty>(PhantomData<fn() -> S>);
6169 impl<S: State> sealed::Sealed for SetPassword<S> {}
6270 impl<S: State> State for SetPassword<S> {
6363- type Name = S::Name;
6464- type Password = Set<members::password>;
6571 type CreatedAt = S::CreatedAt;
6666- }
6767- ///State transition - sets the `created_at` field to Set
6868- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7070- impl<S: State> State for SetCreatedAt<S> {
7172 type Name = S::Name;
7272- type Password = S::Password;
7373- type CreatedAt = Set<members::created_at>;
7373+ type Password = Set<members::password>;
7474 }
7575 /// Marker types for field names
7676 #[allow(non_camel_case_types)]
7777 pub mod members {
7878+ ///Marker type for the `created_at` field
7979+ pub struct created_at(());
7880 ///Marker type for the `name` field
7981 pub struct name(());
8082 ///Marker type for the `password` field
8183 pub struct password(());
8282- ///Marker type for the `created_at` field
8383- pub struct created_at(());
8484 }
8585}
8686···187187impl<'a, S> AppPasswordBuilder<'a, S>
188188where
189189 S: app_password_state::State,
190190+ S::CreatedAt: app_password_state::IsSet,
190191 S::Name: app_password_state::IsSet,
191192 S::Password: app_password_state::IsSet,
192192- S::CreatedAt: app_password_state::IsSet,
193193{
194194 /// Build the final struct
195195 pub fn build(self) -> AppPassword<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Account;
3736 type Codes;
3737+ type Account;
3838 }
3939 /// Empty state - all required fields are unset
4040 pub struct Empty(());
4141 impl sealed::Sealed for Empty {}
4242 impl State for Empty {
4343- type Account = Unset;
4443 type Codes = Unset;
4545- }
4646- ///State transition - sets the `account` field to Set
4747- pub struct SetAccount<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetAccount<S> {}
4949- impl<S: State> State for SetAccount<S> {
5050- type Account = Set<members::account>;
5151- type Codes = S::Codes;
4444+ type Account = Unset;
5245 }
5346 ///State transition - sets the `codes` field to Set
5447 pub struct SetCodes<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetCodes<S> {}
5649 impl<S: State> State for SetCodes<S> {
5757- type Account = S::Account;
5850 type Codes = Set<members::codes>;
5151+ type Account = S::Account;
5252+ }
5353+ ///State transition - sets the `account` field to Set
5454+ pub struct SetAccount<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetAccount<S> {}
5656+ impl<S: State> State for SetAccount<S> {
5757+ type Codes = S::Codes;
5858+ type Account = Set<members::account>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `account` field
6464- pub struct account(());
6563 ///Marker type for the `codes` field
6664 pub struct codes(());
6565+ ///Marker type for the `account` field
6666+ pub struct account(());
6767 }
6868}
6969···136136impl<'a, S> AccountCodesBuilder<'a, S>
137137where
138138 S: account_codes_state::State,
139139- S::Account: account_codes_state::IsSet,
140139 S::Codes: account_codes_state::IsSet,
140140+ S::Account: account_codes_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> AccountCodes<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Name;
3837 type CreatedAt;
3838+ type Name;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type Name = Unset;
4544 type CreatedAt = Unset;
4646- }
4747- ///State transition - sets the `name` field to Set
4848- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetName<S> {}
5050- impl<S: State> State for SetName<S> {
5151- type Name = Set<members::name>;
5252- type CreatedAt = S::CreatedAt;
4545+ type Name = Unset;
5346 }
5447 ///State transition - sets the `created_at` field to Set
5548 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5750 impl<S: State> State for SetCreatedAt<S> {
5858- type Name = S::Name;
5951 type CreatedAt = Set<members::created_at>;
5252+ type Name = S::Name;
5353+ }
5454+ ///State transition - sets the `name` field to Set
5555+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetName<S> {}
5757+ impl<S: State> State for SetName<S> {
5858+ type CreatedAt = S::CreatedAt;
5959+ type Name = Set<members::name>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `name` field
6565- pub struct name(());
6664 ///Marker type for the `created_at` field
6765 pub struct created_at(());
6666+ ///Marker type for the `name` field
6767+ pub struct name(());
6868 }
6969}
7070···151151impl<'a, S> AppPasswordBuilder<'a, S>
152152where
153153 S: app_password_state::State,
154154- S::Name: app_password_state::IsSet,
155154 S::CreatedAt: app_password_state::IsSet,
155155+ S::Name: app_password_state::IsSet,
156156{
157157 /// Build the final struct
158158 pub fn build(self) -> AppPassword<'a> {
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Did;
4040- type Collection;
4139 type Rkey;
4040+ type Collection;
4141+ type Did;
4242 }
4343 /// Empty state - all required fields are unset
4444 pub struct Empty(());
4545 impl sealed::Sealed for Empty {}
4646 impl State for Empty {
4747+ type Rkey = Unset;
4848+ type Collection = Unset;
4749 type Did = Unset;
4848- type Collection = Unset;
4949- type Rkey = Unset;
5050 }
5151- ///State transition - sets the `did` field to Set
5252- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
5353- impl<S: State> sealed::Sealed for SetDid<S> {}
5454- impl<S: State> State for SetDid<S> {
5555- type Did = Set<members::did>;
5151+ ///State transition - sets the `rkey` field to Set
5252+ pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
5353+ impl<S: State> sealed::Sealed for SetRkey<S> {}
5454+ impl<S: State> State for SetRkey<S> {
5555+ type Rkey = Set<members::rkey>;
5656 type Collection = S::Collection;
5757- type Rkey = S::Rkey;
5757+ type Did = S::Did;
5858 }
5959 ///State transition - sets the `collection` field to Set
6060 pub struct SetCollection<S: State = Empty>(PhantomData<fn() -> S>);
6161 impl<S: State> sealed::Sealed for SetCollection<S> {}
6262 impl<S: State> State for SetCollection<S> {
6363- type Did = S::Did;
6464- type Collection = Set<members::collection>;
6563 type Rkey = S::Rkey;
6464+ type Collection = Set<members::collection>;
6565+ type Did = S::Did;
6666 }
6767- ///State transition - sets the `rkey` field to Set
6868- pub struct SetRkey<S: State = Empty>(PhantomData<fn() -> S>);
6969- impl<S: State> sealed::Sealed for SetRkey<S> {}
7070- impl<S: State> State for SetRkey<S> {
7171- type Did = S::Did;
6767+ ///State transition - sets the `did` field to Set
6868+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
6969+ impl<S: State> sealed::Sealed for SetDid<S> {}
7070+ impl<S: State> State for SetDid<S> {
7171+ type Rkey = S::Rkey;
7272 type Collection = S::Collection;
7373- type Rkey = Set<members::rkey>;
7373+ type Did = Set<members::did>;
7474 }
7575 /// Marker types for field names
7676 #[allow(non_camel_case_types)]
7777 pub mod members {
7878+ ///Marker type for the `rkey` field
7979+ pub struct rkey(());
8080+ ///Marker type for the `collection` field
8181+ pub struct collection(());
7882 ///Marker type for the `did` field
7983 pub struct did(());
8080- ///Marker type for the `collection` field
8181- pub struct collection(());
8282- ///Marker type for the `rkey` field
8383- pub struct rkey(());
8484 }
8585}
8686···181181impl<'a, S> GetRecordBuilder<'a, S>
182182where
183183 S: get_record_state::State,
184184- S::Did: get_record_state::IsSet,
185185- S::Collection: get_record_state::IsSet,
186184 S::Rkey: get_record_state::IsSet,
185185+ S::Collection: get_record_state::IsSet,
186186+ S::Did: get_record_state::IsSet,
187187{
188188 /// Build the final struct
189189 pub fn build(self) -> GetRecord<'a> {
···4141 /// State trait tracking which required fields have been set
4242 pub trait State: sealed::Sealed {
4343 type Seq;
4444+ type Active;
4445 type Did;
4546 type Time;
4646- type Active;
4747 }
4848 /// Empty state - all required fields are unset
4949 pub struct Empty(());
5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252 type Seq = Unset;
5353+ type Active = Unset;
5354 type Did = Unset;
5455 type Time = Unset;
5555- type Active = Unset;
5656 }
5757 ///State transition - sets the `seq` field to Set
5858 pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
5959 impl<S: State> sealed::Sealed for SetSeq<S> {}
6060 impl<S: State> State for SetSeq<S> {
6161 type Seq = Set<members::seq>;
6262+ type Active = S::Active;
6263 type Did = S::Did;
6364 type Time = S::Time;
6464- type Active = S::Active;
6565+ }
6666+ ///State transition - sets the `active` field to Set
6767+ pub struct SetActive<S: State = Empty>(PhantomData<fn() -> S>);
6868+ impl<S: State> sealed::Sealed for SetActive<S> {}
6969+ impl<S: State> State for SetActive<S> {
7070+ type Seq = S::Seq;
7171+ type Active = Set<members::active>;
7272+ type Did = S::Did;
7373+ type Time = S::Time;
6574 }
6675 ///State transition - sets the `did` field to Set
6776 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
6877 impl<S: State> sealed::Sealed for SetDid<S> {}
6978 impl<S: State> State for SetDid<S> {
7079 type Seq = S::Seq;
8080+ type Active = S::Active;
7181 type Did = Set<members::did>;
7282 type Time = S::Time;
7373- type Active = S::Active;
7483 }
7584 ///State transition - sets the `time` field to Set
7685 pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
7786 impl<S: State> sealed::Sealed for SetTime<S> {}
7887 impl<S: State> State for SetTime<S> {
7988 type Seq = S::Seq;
8080- type Did = S::Did;
8181- type Time = Set<members::time>;
8289 type Active = S::Active;
8383- }
8484- ///State transition - sets the `active` field to Set
8585- pub struct SetActive<S: State = Empty>(PhantomData<fn() -> S>);
8686- impl<S: State> sealed::Sealed for SetActive<S> {}
8787- impl<S: State> State for SetActive<S> {
8888- type Seq = S::Seq;
8990 type Did = S::Did;
9090- type Time = S::Time;
9191- type Active = Set<members::active>;
9191+ type Time = Set<members::time>;
9292 }
9393 /// Marker types for field names
9494 #[allow(non_camel_case_types)]
9595 pub mod members {
9696 ///Marker type for the `seq` field
9797 pub struct seq(());
9898+ ///Marker type for the `active` field
9999+ pub struct active(());
98100 ///Marker type for the `did` field
99101 pub struct did(());
100102 ///Marker type for the `time` field
101103 pub struct time(());
102102- ///Marker type for the `active` field
103103- pub struct active(());
104104 }
105105}
106106···231231where
232232 S: account_state::State,
233233 S::Seq: account_state::IsSet,
234234+ S::Active: account_state::IsSet,
234235 S::Did: account_state::IsSet,
235236 S::Time: account_state::IsSet,
236236- S::Active: account_state::IsSet,
237237{
238238 /// Build the final struct
239239 pub fn build(self) -> Account<'a> {
···929929 #[serde(borrow)]
930930 pub blobs: Vec<jacquard_common::types::cid::CidLink<'a>>,
931931 /// CAR file containing relevant blocks, as a diff since the previous repo state. The commit must be included as a block, and the commit block CID must be the first entry in the CAR header 'roots' list.
932932+ #[serde(with = "jacquard_common::serde_bytes_helper")]
932933 pub blocks: bytes::Bytes,
933934 /// Repo commit object CID.
934935 #[serde(borrow)]
···949950 /// The stream sequence number of this message.
950951 pub seq: i64,
951952 /// The rev of the last emitted commit from this repo (if any).
952952- pub since: jacquard_common::types::string::Tid,
953953+ pub since: std::option::Option<jacquard_common::types::string::Tid>,
953954 /// Timestamp of when this message was originally broadcast.
954955 pub time: jacquard_common::types::string::Datetime,
955956 /// DEPRECATED -- replaced by #sync event and data limits. Indicates that this commit contained too many ops, or data size was too large. Consumers will need to make a separate request to get missing data.
···967968 /// State trait tracking which required fields have been set
968969 pub trait State: sealed::Sealed {
969970 type Seq;
970970- type Rebase;
971971 type TooBig;
972972- type Repo;
973973- type Commit;
974974- type Rev;
975975- type Since;
976976- type Blocks;
977972 type Ops;
978973 type Blobs;
974974+ type Blocks;
975975+ type Rev;
979976 type Time;
977977+ type Rebase;
978978+ type Repo;
979979+ type Commit;
980980 }
981981 /// Empty state - all required fields are unset
982982 pub struct Empty(());
983983 impl sealed::Sealed for Empty {}
984984 impl State for Empty {
985985 type Seq = Unset;
986986- type Rebase = Unset;
987986 type TooBig = Unset;
988988- type Repo = Unset;
989989- type Commit = Unset;
990990- type Rev = Unset;
991991- type Since = Unset;
992992- type Blocks = Unset;
993987 type Ops = Unset;
994988 type Blobs = Unset;
989989+ type Blocks = Unset;
990990+ type Rev = Unset;
995991 type Time = Unset;
992992+ type Rebase = Unset;
993993+ type Repo = Unset;
994994+ type Commit = Unset;
996995 }
997996 ///State transition - sets the `seq` field to Set
998997 pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
999998 impl<S: State> sealed::Sealed for SetSeq<S> {}
1000999 impl<S: State> State for SetSeq<S> {
10011000 type Seq = Set<members::seq>;
10021002- type Rebase = S::Rebase;
10031001 type TooBig = S::TooBig;
10041004- type Repo = S::Repo;
10051005- type Commit = S::Commit;
10061006- type Rev = S::Rev;
10071007- type Since = S::Since;
10081008- type Blocks = S::Blocks;
10091002 type Ops = S::Ops;
10101003 type Blobs = S::Blobs;
10041004+ type Blocks = S::Blocks;
10051005+ type Rev = S::Rev;
10111006 type Time = S::Time;
10121012- }
10131013- ///State transition - sets the `rebase` field to Set
10141014- pub struct SetRebase<S: State = Empty>(PhantomData<fn() -> S>);
10151015- impl<S: State> sealed::Sealed for SetRebase<S> {}
10161016- impl<S: State> State for SetRebase<S> {
10171017- type Seq = S::Seq;
10181018- type Rebase = Set<members::rebase>;
10191019- type TooBig = S::TooBig;
10071007+ type Rebase = S::Rebase;
10201008 type Repo = S::Repo;
10211009 type Commit = S::Commit;
10221022- type Rev = S::Rev;
10231023- type Since = S::Since;
10241024- type Blocks = S::Blocks;
10251025- type Ops = S::Ops;
10261026- type Blobs = S::Blobs;
10271027- type Time = S::Time;
10281010 }
10291011 ///State transition - sets the `too_big` field to Set
10301012 pub struct SetTooBig<S: State = Empty>(PhantomData<fn() -> S>);
10311013 impl<S: State> sealed::Sealed for SetTooBig<S> {}
10321014 impl<S: State> State for SetTooBig<S> {
10331015 type Seq = S::Seq;
10341034- type Rebase = S::Rebase;
10351016 type TooBig = Set<members::too_big>;
10361036- type Repo = S::Repo;
10371037- type Commit = S::Commit;
10381038- type Rev = S::Rev;
10391039- type Since = S::Since;
10401040- type Blocks = S::Blocks;
10411017 type Ops = S::Ops;
10421018 type Blobs = S::Blobs;
10191019+ type Blocks = S::Blocks;
10201020+ type Rev = S::Rev;
10431021 type Time = S::Time;
10441044- }
10451045- ///State transition - sets the `repo` field to Set
10461046- pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
10471047- impl<S: State> sealed::Sealed for SetRepo<S> {}
10481048- impl<S: State> State for SetRepo<S> {
10491049- type Seq = S::Seq;
10501022 type Rebase = S::Rebase;
10511051- type TooBig = S::TooBig;
10521052- type Repo = Set<members::repo>;
10231023+ type Repo = S::Repo;
10531024 type Commit = S::Commit;
10541054- type Rev = S::Rev;
10551055- type Since = S::Since;
10561056- type Blocks = S::Blocks;
10571057- type Ops = S::Ops;
10581058- type Blobs = S::Blobs;
10591059- type Time = S::Time;
10601025 }
10611061- ///State transition - sets the `commit` field to Set
10621062- pub struct SetCommit<S: State = Empty>(PhantomData<fn() -> S>);
10631063- impl<S: State> sealed::Sealed for SetCommit<S> {}
10641064- impl<S: State> State for SetCommit<S> {
10261026+ ///State transition - sets the `ops` field to Set
10271027+ pub struct SetOps<S: State = Empty>(PhantomData<fn() -> S>);
10281028+ impl<S: State> sealed::Sealed for SetOps<S> {}
10291029+ impl<S: State> State for SetOps<S> {
10651030 type Seq = S::Seq;
10661066- type Rebase = S::Rebase;
10671031 type TooBig = S::TooBig;
10681068- type Repo = S::Repo;
10691069- type Commit = Set<members::commit>;
10321032+ type Ops = Set<members::ops>;
10331033+ type Blobs = S::Blobs;
10341034+ type Blocks = S::Blocks;
10701035 type Rev = S::Rev;
10711071- type Since = S::Since;
10721072- type Blocks = S::Blocks;
10731073- type Ops = S::Ops;
10741074- type Blobs = S::Blobs;
10751036 type Time = S::Time;
10761076- }
10771077- ///State transition - sets the `rev` field to Set
10781078- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
10791079- impl<S: State> sealed::Sealed for SetRev<S> {}
10801080- impl<S: State> State for SetRev<S> {
10811081- type Seq = S::Seq;
10821037 type Rebase = S::Rebase;
10831083- type TooBig = S::TooBig;
10841038 type Repo = S::Repo;
10851039 type Commit = S::Commit;
10861086- type Rev = Set<members::rev>;
10871087- type Since = S::Since;
10401040+ }
10411041+ ///State transition - sets the `blobs` field to Set
10421042+ pub struct SetBlobs<S: State = Empty>(PhantomData<fn() -> S>);
10431043+ impl<S: State> sealed::Sealed for SetBlobs<S> {}
10441044+ impl<S: State> State for SetBlobs<S> {
10451045+ type Seq = S::Seq;
10461046+ type TooBig = S::TooBig;
10471047+ type Ops = S::Ops;
10481048+ type Blobs = Set<members::blobs>;
10881049 type Blocks = S::Blocks;
10891089- type Ops = S::Ops;
10901090- type Blobs = S::Blobs;
10501050+ type Rev = S::Rev;
10911051 type Time = S::Time;
10921092- }
10931093- ///State transition - sets the `since` field to Set
10941094- pub struct SetSince<S: State = Empty>(PhantomData<fn() -> S>);
10951095- impl<S: State> sealed::Sealed for SetSince<S> {}
10961096- impl<S: State> State for SetSince<S> {
10971097- type Seq = S::Seq;
10981052 type Rebase = S::Rebase;
10991099- type TooBig = S::TooBig;
11001053 type Repo = S::Repo;
11011054 type Commit = S::Commit;
11021102- type Rev = S::Rev;
11031103- type Since = Set<members::since>;
11041104- type Blocks = S::Blocks;
11051105- type Ops = S::Ops;
11061106- type Blobs = S::Blobs;
11071107- type Time = S::Time;
11081055 }
11091056 ///State transition - sets the `blocks` field to Set
11101057 pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
11111058 impl<S: State> sealed::Sealed for SetBlocks<S> {}
11121059 impl<S: State> State for SetBlocks<S> {
11131060 type Seq = S::Seq;
11141114- type Rebase = S::Rebase;
11151061 type TooBig = S::TooBig;
11161116- type Repo = S::Repo;
11171117- type Commit = S::Commit;
11181118- type Rev = S::Rev;
11191119- type Since = S::Since;
11201120- type Blocks = Set<members::blocks>;
11211062 type Ops = S::Ops;
11221063 type Blobs = S::Blobs;
10641064+ type Blocks = Set<members::blocks>;
10651065+ type Rev = S::Rev;
11231066 type Time = S::Time;
11241124- }
11251125- ///State transition - sets the `ops` field to Set
11261126- pub struct SetOps<S: State = Empty>(PhantomData<fn() -> S>);
11271127- impl<S: State> sealed::Sealed for SetOps<S> {}
11281128- impl<S: State> State for SetOps<S> {
11291129- type Seq = S::Seq;
11301067 type Rebase = S::Rebase;
11311131- type TooBig = S::TooBig;
11321068 type Repo = S::Repo;
11331069 type Commit = S::Commit;
11341134- type Rev = S::Rev;
11351135- type Since = S::Since;
11361136- type Blocks = S::Blocks;
11371137- type Ops = Set<members::ops>;
11381138- type Blobs = S::Blobs;
11391139- type Time = S::Time;
11401070 }
11411141- ///State transition - sets the `blobs` field to Set
11421142- pub struct SetBlobs<S: State = Empty>(PhantomData<fn() -> S>);
11431143- impl<S: State> sealed::Sealed for SetBlobs<S> {}
11441144- impl<S: State> State for SetBlobs<S> {
10711071+ ///State transition - sets the `rev` field to Set
10721072+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
10731073+ impl<S: State> sealed::Sealed for SetRev<S> {}
10741074+ impl<S: State> State for SetRev<S> {
11451075 type Seq = S::Seq;
11461146- type Rebase = S::Rebase;
11471076 type TooBig = S::TooBig;
11481148- type Repo = S::Repo;
11491149- type Commit = S::Commit;
11501150- type Rev = S::Rev;
11511151- type Since = S::Since;
11521152- type Blocks = S::Blocks;
11531077 type Ops = S::Ops;
11541154- type Blobs = Set<members::blobs>;
10781078+ type Blobs = S::Blobs;
10791079+ type Blocks = S::Blocks;
10801080+ type Rev = Set<members::rev>;
11551081 type Time = S::Time;
10821082+ type Rebase = S::Rebase;
10831083+ type Repo = S::Repo;
10841084+ type Commit = S::Commit;
11561085 }
11571086 ///State transition - sets the `time` field to Set
11581087 pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
11591088 impl<S: State> sealed::Sealed for SetTime<S> {}
11601089 impl<S: State> State for SetTime<S> {
11611090 type Seq = S::Seq;
11621162- type Rebase = S::Rebase;
11631091 type TooBig = S::TooBig;
10921092+ type Ops = S::Ops;
10931093+ type Blobs = S::Blobs;
10941094+ type Blocks = S::Blocks;
10951095+ type Rev = S::Rev;
10961096+ type Time = Set<members::time>;
10971097+ type Rebase = S::Rebase;
11641098 type Repo = S::Repo;
11651099 type Commit = S::Commit;
11001100+ }
11011101+ ///State transition - sets the `rebase` field to Set
11021102+ pub struct SetRebase<S: State = Empty>(PhantomData<fn() -> S>);
11031103+ impl<S: State> sealed::Sealed for SetRebase<S> {}
11041104+ impl<S: State> State for SetRebase<S> {
11051105+ type Seq = S::Seq;
11061106+ type TooBig = S::TooBig;
11071107+ type Ops = S::Ops;
11081108+ type Blobs = S::Blobs;
11091109+ type Blocks = S::Blocks;
11661110 type Rev = S::Rev;
11671167- type Since = S::Since;
11111111+ type Time = S::Time;
11121112+ type Rebase = Set<members::rebase>;
11131113+ type Repo = S::Repo;
11141114+ type Commit = S::Commit;
11151115+ }
11161116+ ///State transition - sets the `repo` field to Set
11171117+ pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
11181118+ impl<S: State> sealed::Sealed for SetRepo<S> {}
11191119+ impl<S: State> State for SetRepo<S> {
11201120+ type Seq = S::Seq;
11211121+ type TooBig = S::TooBig;
11221122+ type Ops = S::Ops;
11231123+ type Blobs = S::Blobs;
11681124 type Blocks = S::Blocks;
11251125+ type Rev = S::Rev;
11261126+ type Time = S::Time;
11271127+ type Rebase = S::Rebase;
11281128+ type Repo = Set<members::repo>;
11291129+ type Commit = S::Commit;
11301130+ }
11311131+ ///State transition - sets the `commit` field to Set
11321132+ pub struct SetCommit<S: State = Empty>(PhantomData<fn() -> S>);
11331133+ impl<S: State> sealed::Sealed for SetCommit<S> {}
11341134+ impl<S: State> State for SetCommit<S> {
11351135+ type Seq = S::Seq;
11361136+ type TooBig = S::TooBig;
11691137 type Ops = S::Ops;
11701138 type Blobs = S::Blobs;
11711171- type Time = Set<members::time>;
11391139+ type Blocks = S::Blocks;
11401140+ type Rev = S::Rev;
11411141+ type Time = S::Time;
11421142+ type Rebase = S::Rebase;
11431143+ type Repo = S::Repo;
11441144+ type Commit = Set<members::commit>;
11721145 }
11731146 /// Marker types for field names
11741147 #[allow(non_camel_case_types)]
11751148 pub mod members {
11761149 ///Marker type for the `seq` field
11771150 pub struct seq(());
11781178- ///Marker type for the `rebase` field
11791179- pub struct rebase(());
11801151 ///Marker type for the `too_big` field
11811152 pub struct too_big(());
11821182- ///Marker type for the `repo` field
11831183- pub struct repo(());
11841184- ///Marker type for the `commit` field
11851185- pub struct commit(());
11861186- ///Marker type for the `rev` field
11871187- pub struct rev(());
11881188- ///Marker type for the `since` field
11891189- pub struct since(());
11901190- ///Marker type for the `blocks` field
11911191- pub struct blocks(());
11921153 ///Marker type for the `ops` field
11931154 pub struct ops(());
11941155 ///Marker type for the `blobs` field
11951156 pub struct blobs(());
11571157+ ///Marker type for the `blocks` field
11581158+ pub struct blocks(());
11591159+ ///Marker type for the `rev` field
11601160+ pub struct rev(());
11961161 ///Marker type for the `time` field
11971162 pub struct time(());
11631163+ ///Marker type for the `rebase` field
11641164+ pub struct rebase(());
11651165+ ///Marker type for the `repo` field
11661166+ pub struct repo(());
11671167+ ///Marker type for the `commit` field
11681168+ pub struct commit(());
11981169 }
11991170}
12001171···14221393 }
14231394}
1424139514251425-impl<'a, S> CommitBuilder<'a, S>
14261426-where
14271427- S: commit_state::State,
14281428- S::Since: commit_state::IsUnset,
14291429-{
14301430- /// Set the `since` field (required)
13961396+impl<'a, S: commit_state::State> CommitBuilder<'a, S> {
13971397+ /// Set the `since` field (optional)
14311398 pub fn since(
14321399 mut self,
14331433- value: impl Into<jacquard_common::types::string::Tid>,
14341434- ) -> CommitBuilder<'a, commit_state::SetSince<S>> {
14351435- self.__unsafe_private_named.9 = ::core::option::Option::Some(value.into());
14361436- CommitBuilder {
14371437- _phantom_state: ::core::marker::PhantomData,
14381438- __unsafe_private_named: self.__unsafe_private_named,
14391439- _phantom: ::core::marker::PhantomData,
14401440- }
14001400+ value: impl Into<Option<jacquard_common::types::string::Tid>>,
14011401+ ) -> Self {
14021402+ self.__unsafe_private_named.9 = value.into();
14031403+ self
14041404+ }
14051405+ /// Set the `since` field to an Option value (optional)
14061406+ pub fn maybe_since(
14071407+ mut self,
14081408+ value: Option<jacquard_common::types::string::Tid>,
14091409+ ) -> Self {
14101410+ self.__unsafe_private_named.9 = value;
14111411+ self
14411412 }
14421413}
14431414···14831454where
14841455 S: commit_state::State,
14851456 S::Seq: commit_state::IsSet,
14861486- S::Rebase: commit_state::IsSet,
14871457 S::TooBig: commit_state::IsSet,
14881488- S::Repo: commit_state::IsSet,
14891489- S::Commit: commit_state::IsSet,
14901490- S::Rev: commit_state::IsSet,
14911491- S::Since: commit_state::IsSet,
14921492- S::Blocks: commit_state::IsSet,
14931458 S::Ops: commit_state::IsSet,
14941459 S::Blobs: commit_state::IsSet,
14601460+ S::Blocks: commit_state::IsSet,
14611461+ S::Rev: commit_state::IsSet,
14951462 S::Time: commit_state::IsSet,
14631463+ S::Rebase: commit_state::IsSet,
14641464+ S::Repo: commit_state::IsSet,
14651465+ S::Commit: commit_state::IsSet,
14961466{
14971467 /// Build the final struct
14981468 pub fn build(self) -> Commit<'a> {
···15061476 repo: self.__unsafe_private_named.6.unwrap(),
15071477 rev: self.__unsafe_private_named.7.unwrap(),
15081478 seq: self.__unsafe_private_named.8.unwrap(),
15091509- since: self.__unsafe_private_named.9.unwrap(),
14791479+ since: self.__unsafe_private_named.9,
15101480 time: self.__unsafe_private_named.10.unwrap(),
15111481 too_big: self.__unsafe_private_named.11.unwrap(),
15121482 extra_data: Default::default(),
···15301500 repo: self.__unsafe_private_named.6.unwrap(),
15311501 rev: self.__unsafe_private_named.7.unwrap(),
15321502 seq: self.__unsafe_private_named.8.unwrap(),
15331533- since: self.__unsafe_private_named.9.unwrap(),
15031503+ since: self.__unsafe_private_named.9,
15341504 time: self.__unsafe_private_named.10.unwrap(),
15351505 too_big: self.__unsafe_private_named.11.unwrap(),
15361506 extra_data: Some(extra_data),
···16011571 }
16021572 /// State trait tracking which required fields have been set
16031573 pub trait State: sealed::Sealed {
16041604- type Seq;
16051574 type Did;
16061575 type Time;
15761576+ type Seq;
16071577 }
16081578 /// Empty state - all required fields are unset
16091579 pub struct Empty(());
16101580 impl sealed::Sealed for Empty {}
16111581 impl State for Empty {
16121612- type Seq = Unset;
16131582 type Did = Unset;
16141583 type Time = Unset;
16151615- }
16161616- ///State transition - sets the `seq` field to Set
16171617- pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
16181618- impl<S: State> sealed::Sealed for SetSeq<S> {}
16191619- impl<S: State> State for SetSeq<S> {
16201620- type Seq = Set<members::seq>;
16211621- type Did = S::Did;
16221622- type Time = S::Time;
15841584+ type Seq = Unset;
16231585 }
16241586 ///State transition - sets the `did` field to Set
16251587 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
16261588 impl<S: State> sealed::Sealed for SetDid<S> {}
16271589 impl<S: State> State for SetDid<S> {
16281628- type Seq = S::Seq;
16291590 type Did = Set<members::did>;
16301591 type Time = S::Time;
15921592+ type Seq = S::Seq;
16311593 }
16321594 ///State transition - sets the `time` field to Set
16331595 pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
16341596 impl<S: State> sealed::Sealed for SetTime<S> {}
16351597 impl<S: State> State for SetTime<S> {
15981598+ type Did = S::Did;
15991599+ type Time = Set<members::time>;
16361600 type Seq = S::Seq;
16011601+ }
16021602+ ///State transition - sets the `seq` field to Set
16031603+ pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
16041604+ impl<S: State> sealed::Sealed for SetSeq<S> {}
16051605+ impl<S: State> State for SetSeq<S> {
16371606 type Did = S::Did;
16381638- type Time = Set<members::time>;
16071607+ type Time = S::Time;
16081608+ type Seq = Set<members::seq>;
16391609 }
16401610 /// Marker types for field names
16411611 #[allow(non_camel_case_types)]
16421612 pub mod members {
16431643- ///Marker type for the `seq` field
16441644- pub struct seq(());
16451613 ///Marker type for the `did` field
16461614 pub struct did(());
16471615 ///Marker type for the `time` field
16481616 pub struct time(());
16171617+ ///Marker type for the `seq` field
16181618+ pub struct seq(());
16491619 }
16501620}
16511621···17581728impl<'a, S> IdentityBuilder<'a, S>
17591729where
17601730 S: identity_state::State,
17611761- S::Seq: identity_state::IsSet,
17621731 S::Did: identity_state::IsSet,
17631732 S::Time: identity_state::IsSet,
17331733+ S::Seq: identity_state::IsSet,
17641734{
17651735 /// Build the final struct
17661736 pub fn build(self) -> Identity<'a> {
···20792049 pub action: jacquard_common::CowStr<'a>,
20802050 /// For creates and updates, the new record CID. For deletions, null.
20812051 #[serde(borrow)]
20822082- pub cid: jacquard_common::types::cid::CidLink<'a>,
20522052+ pub cid: std::option::Option<jacquard_common::types::cid::CidLink<'a>>,
20832053 #[serde(borrow)]
20842054 pub path: jacquard_common::CowStr<'a>,
20852055 /// For updates and deletes, the previous record CID (required for inductive firehose). For creations, field should not be defined.
···20982068 }
20992069 /// State trait tracking which required fields have been set
21002070 pub trait State: sealed::Sealed {
21012101- type Action;
21022071 type Path;
21032103- type Cid;
20722072+ type Action;
21042073 }
21052074 /// Empty state - all required fields are unset
21062075 pub struct Empty(());
21072076 impl sealed::Sealed for Empty {}
21082077 impl State for Empty {
21092109- type Action = Unset;
21102078 type Path = Unset;
21112111- type Cid = Unset;
21122112- }
21132113- ///State transition - sets the `action` field to Set
21142114- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
21152115- impl<S: State> sealed::Sealed for SetAction<S> {}
21162116- impl<S: State> State for SetAction<S> {
21172117- type Action = Set<members::action>;
21182118- type Path = S::Path;
21192119- type Cid = S::Cid;
20792079+ type Action = Unset;
21202080 }
21212081 ///State transition - sets the `path` field to Set
21222082 pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
21232083 impl<S: State> sealed::Sealed for SetPath<S> {}
21242084 impl<S: State> State for SetPath<S> {
21252125- type Action = S::Action;
21262085 type Path = Set<members::path>;
21272127- type Cid = S::Cid;
20862086+ type Action = S::Action;
21282087 }
21292129- ///State transition - sets the `cid` field to Set
21302130- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
21312131- impl<S: State> sealed::Sealed for SetCid<S> {}
21322132- impl<S: State> State for SetCid<S> {
21332133- type Action = S::Action;
20882088+ ///State transition - sets the `action` field to Set
20892089+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
20902090+ impl<S: State> sealed::Sealed for SetAction<S> {}
20912091+ impl<S: State> State for SetAction<S> {
21342092 type Path = S::Path;
21352135- type Cid = Set<members::cid>;
20932093+ type Action = Set<members::action>;
21362094 }
21372095 /// Marker types for field names
21382096 #[allow(non_camel_case_types)]
21392097 pub mod members {
20982098+ ///Marker type for the `path` field
20992099+ pub struct path(());
21402100 ///Marker type for the `action` field
21412101 pub struct action(());
21422142- ///Marker type for the `path` field
21432143- pub struct path(());
21442144- ///Marker type for the `cid` field
21452145- pub struct cid(());
21462102 }
21472103}
21482104···21952151 }
21962152}
2197215321982198-impl<'a, S> RepoOpBuilder<'a, S>
21992199-where
22002200- S: repo_op_state::State,
22012201- S::Cid: repo_op_state::IsUnset,
22022202-{
22032203- /// Set the `cid` field (required)
21542154+impl<'a, S: repo_op_state::State> RepoOpBuilder<'a, S> {
21552155+ /// Set the `cid` field (optional)
22042156 pub fn cid(
22052157 mut self,
22062206- value: impl Into<jacquard_common::types::cid::CidLink<'a>>,
22072207- ) -> RepoOpBuilder<'a, repo_op_state::SetCid<S>> {
22082208- self.__unsafe_private_named.1 = ::core::option::Option::Some(value.into());
22092209- RepoOpBuilder {
22102210- _phantom_state: ::core::marker::PhantomData,
22112211- __unsafe_private_named: self.__unsafe_private_named,
22122212- _phantom: ::core::marker::PhantomData,
22132213- }
21582158+ value: impl Into<Option<jacquard_common::types::cid::CidLink<'a>>>,
21592159+ ) -> Self {
21602160+ self.__unsafe_private_named.1 = value.into();
21612161+ self
21622162+ }
21632163+ /// Set the `cid` field to an Option value (optional)
21642164+ pub fn maybe_cid(
21652165+ mut self,
21662166+ value: Option<jacquard_common::types::cid::CidLink<'a>>,
21672167+ ) -> Self {
21682168+ self.__unsafe_private_named.1 = value;
21692169+ self
22142170 }
22152171}
22162172···22552211impl<'a, S> RepoOpBuilder<'a, S>
22562212where
22572213 S: repo_op_state::State,
22582258- S::Action: repo_op_state::IsSet,
22592214 S::Path: repo_op_state::IsSet,
22602260- S::Cid: repo_op_state::IsSet,
22152215+ S::Action: repo_op_state::IsSet,
22612216{
22622217 /// Build the final struct
22632218 pub fn build(self) -> RepoOp<'a> {
22642219 RepoOp {
22652220 action: self.__unsafe_private_named.0.unwrap(),
22662266- cid: self.__unsafe_private_named.1.unwrap(),
22212221+ cid: self.__unsafe_private_named.1,
22672222 path: self.__unsafe_private_named.2.unwrap(),
22682223 prev: self.__unsafe_private_named.3,
22692224 extra_data: Default::default(),
···22792234 ) -> RepoOp<'a> {
22802235 RepoOp {
22812236 action: self.__unsafe_private_named.0.unwrap(),
22822282- cid: self.__unsafe_private_named.1.unwrap(),
22372237+ cid: self.__unsafe_private_named.1,
22832238 path: self.__unsafe_private_named.2.unwrap(),
22842239 prev: self.__unsafe_private_named.3,
22852240 extra_data: Some(extra_data),
···23182273#[serde(rename_all = "camelCase")]
23192274pub struct Sync<'a> {
23202275 /// CAR file containing the commit, as a block. The CAR header must include the commit block CID as the first 'root'.
22762276+ #[serde(with = "jacquard_common::serde_bytes_helper")]
23212277 pub blocks: bytes::Bytes,
23222278 /// The account this repo event corresponds to. Must match that in the commit object.
23232279 #[serde(borrow)]
···23412297 }
23422298 /// State trait tracking which required fields have been set
23432299 pub trait State: sealed::Sealed {
23002300+ type Rev;
23012301+ type Time;
23442302 type Seq;
23452303 type Did;
23462304 type Blocks;
23472347- type Rev;
23482348- type Time;
23492305 }
23502306 /// Empty state - all required fields are unset
23512307 pub struct Empty(());
23522308 impl sealed::Sealed for Empty {}
23532309 impl State for Empty {
23102310+ type Rev = Unset;
23112311+ type Time = Unset;
23542312 type Seq = Unset;
23552313 type Did = Unset;
23562314 type Blocks = Unset;
23572357- type Rev = Unset;
23582358- type Time = Unset;
23152315+ }
23162316+ ///State transition - sets the `rev` field to Set
23172317+ pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
23182318+ impl<S: State> sealed::Sealed for SetRev<S> {}
23192319+ impl<S: State> State for SetRev<S> {
23202320+ type Rev = Set<members::rev>;
23212321+ type Time = S::Time;
23222322+ type Seq = S::Seq;
23232323+ type Did = S::Did;
23242324+ type Blocks = S::Blocks;
23252325+ }
23262326+ ///State transition - sets the `time` field to Set
23272327+ pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
23282328+ impl<S: State> sealed::Sealed for SetTime<S> {}
23292329+ impl<S: State> State for SetTime<S> {
23302330+ type Rev = S::Rev;
23312331+ type Time = Set<members::time>;
23322332+ type Seq = S::Seq;
23332333+ type Did = S::Did;
23342334+ type Blocks = S::Blocks;
23592335 }
23602336 ///State transition - sets the `seq` field to Set
23612337 pub struct SetSeq<S: State = Empty>(PhantomData<fn() -> S>);
23622338 impl<S: State> sealed::Sealed for SetSeq<S> {}
23632339 impl<S: State> State for SetSeq<S> {
23402340+ type Rev = S::Rev;
23412341+ type Time = S::Time;
23642342 type Seq = Set<members::seq>;
23652343 type Did = S::Did;
23662344 type Blocks = S::Blocks;
23672367- type Rev = S::Rev;
23682368- type Time = S::Time;
23692345 }
23702346 ///State transition - sets the `did` field to Set
23712347 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
23722348 impl<S: State> sealed::Sealed for SetDid<S> {}
23732349 impl<S: State> State for SetDid<S> {
23502350+ type Rev = S::Rev;
23512351+ type Time = S::Time;
23742352 type Seq = S::Seq;
23752353 type Did = Set<members::did>;
23762354 type Blocks = S::Blocks;
23772377- type Rev = S::Rev;
23782378- type Time = S::Time;
23792355 }
23802356 ///State transition - sets the `blocks` field to Set
23812357 pub struct SetBlocks<S: State = Empty>(PhantomData<fn() -> S>);
23822358 impl<S: State> sealed::Sealed for SetBlocks<S> {}
23832359 impl<S: State> State for SetBlocks<S> {
23842384- type Seq = S::Seq;
23852385- type Did = S::Did;
23862386- type Blocks = Set<members::blocks>;
23872360 type Rev = S::Rev;
23882361 type Time = S::Time;
23892389- }
23902390- ///State transition - sets the `rev` field to Set
23912391- pub struct SetRev<S: State = Empty>(PhantomData<fn() -> S>);
23922392- impl<S: State> sealed::Sealed for SetRev<S> {}
23932393- impl<S: State> State for SetRev<S> {
23942362 type Seq = S::Seq;
23952363 type Did = S::Did;
23962396- type Blocks = S::Blocks;
23972397- type Rev = Set<members::rev>;
23982398- type Time = S::Time;
23992399- }
24002400- ///State transition - sets the `time` field to Set
24012401- pub struct SetTime<S: State = Empty>(PhantomData<fn() -> S>);
24022402- impl<S: State> sealed::Sealed for SetTime<S> {}
24032403- impl<S: State> State for SetTime<S> {
24042404- type Seq = S::Seq;
24052405- type Did = S::Did;
24062406- type Blocks = S::Blocks;
24072407- type Rev = S::Rev;
24082408- type Time = Set<members::time>;
23642364+ type Blocks = Set<members::blocks>;
24092365 }
24102366 /// Marker types for field names
24112367 #[allow(non_camel_case_types)]
24122368 pub mod members {
23692369+ ///Marker type for the `rev` field
23702370+ pub struct rev(());
23712371+ ///Marker type for the `time` field
23722372+ pub struct time(());
24132373 ///Marker type for the `seq` field
24142374 pub struct seq(());
24152375 ///Marker type for the `did` field
24162376 pub struct did(());
24172377 ///Marker type for the `blocks` field
24182378 pub struct blocks(());
24192419- ///Marker type for the `rev` field
24202420- pub struct rev(());
24212421- ///Marker type for the `time` field
24222422- pub struct time(());
24232379 }
24242380}
24252381···25522508impl<'a, S> SyncBuilder<'a, S>
25532509where
25542510 S: sync_state::State,
25112511+ S::Rev: sync_state::IsSet,
25122512+ S::Time: sync_state::IsSet,
25552513 S::Seq: sync_state::IsSet,
25562514 S::Did: sync_state::IsSet,
25572515 S::Blocks: sync_state::IsSet,
25582558- S::Rev: sync_state::IsSet,
25592559- S::Time: sync_state::IsSet,
25602516{
25612517 /// Build the final struct
25622518 pub fn build(self) -> Sync<'a> {
···692692 }
693693 /// State trait tracking which required fields have been set
694694 pub trait State: sealed::Sealed {
695695- type Handle;
696695 type Method;
696696+ type Handle;
697697 }
698698 /// Empty state - all required fields are unset
699699 pub struct Empty(());
700700 impl sealed::Sealed for Empty {}
701701 impl State for Empty {
702702- type Handle = Unset;
703702 type Method = Unset;
704704- }
705705- ///State transition - sets the `handle` field to Set
706706- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
707707- impl<S: State> sealed::Sealed for SetHandle<S> {}
708708- impl<S: State> State for SetHandle<S> {
709709- type Handle = Set<members::handle>;
710710- type Method = S::Method;
703703+ type Handle = Unset;
711704 }
712705 ///State transition - sets the `method` field to Set
713706 pub struct SetMethod<S: State = Empty>(PhantomData<fn() -> S>);
714707 impl<S: State> sealed::Sealed for SetMethod<S> {}
715708 impl<S: State> State for SetMethod<S> {
716716- type Handle = S::Handle;
717709 type Method = Set<members::method>;
710710+ type Handle = S::Handle;
711711+ }
712712+ ///State transition - sets the `handle` field to Set
713713+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
714714+ impl<S: State> sealed::Sealed for SetHandle<S> {}
715715+ impl<S: State> State for SetHandle<S> {
716716+ type Method = S::Method;
717717+ type Handle = Set<members::handle>;
718718 }
719719 /// Marker types for field names
720720 #[allow(non_camel_case_types)]
721721 pub mod members {
722722- ///Marker type for the `handle` field
723723- pub struct handle(());
724722 ///Marker type for the `method` field
725723 pub struct method(());
724724+ ///Marker type for the `handle` field
725725+ pub struct handle(());
726726 }
727727}
728728···795795impl<'a, S> SuggestionBuilder<'a, S>
796796where
797797 S: suggestion_state::State,
798798- S::Handle: suggestion_state::IsSet,
799798 S::Method: suggestion_state::IsSet,
799799+ S::Handle: suggestion_state::IsSet,
800800{
801801 /// Build the final struct
802802 pub fn build(self) -> Suggestion<'a> {
+29-28
crates/weaver-api/src/sh_weaver/actor.rs
···2525 pub did: jacquard_common::types::string::Did<'a>,
2626 /// signed bytes of the corresponding notebook record in the author's repo
2727 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2828+ #[serde(default, with = "jacquard_common::opt_serde_bytes_helper")]
2829 pub signature: std::option::Option<bytes::Bytes>,
2930}
3031···19611962 }
19621963 /// State trait tracking which required fields have been set
19631964 pub trait State: sealed::Sealed {
19641964- type Did;
19651965 type Handle;
19661966+ type Did;
19661967 }
19671968 /// Empty state - all required fields are unset
19681969 pub struct Empty(());
19691970 impl sealed::Sealed for Empty {}
19701971 impl State for Empty {
19711971- type Did = Unset;
19721972 type Handle = Unset;
19731973- }
19741974- ///State transition - sets the `did` field to Set
19751975- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
19761976- impl<S: State> sealed::Sealed for SetDid<S> {}
19771977- impl<S: State> State for SetDid<S> {
19781978- type Did = Set<members::did>;
19791979- type Handle = S::Handle;
19731973+ type Did = Unset;
19801974 }
19811975 ///State transition - sets the `handle` field to Set
19821976 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
19831977 impl<S: State> sealed::Sealed for SetHandle<S> {}
19841978 impl<S: State> State for SetHandle<S> {
19851985- type Did = S::Did;
19861979 type Handle = Set<members::handle>;
19801980+ type Did = S::Did;
19811981+ }
19821982+ ///State transition - sets the `did` field to Set
19831983+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
19841984+ impl<S: State> sealed::Sealed for SetDid<S> {}
19851985+ impl<S: State> State for SetDid<S> {
19861986+ type Handle = S::Handle;
19871987+ type Did = Set<members::did>;
19871988 }
19881989 /// Marker types for field names
19891990 #[allow(non_camel_case_types)]
19901991 pub mod members {
19911991- ///Marker type for the `did` field
19921992- pub struct did(());
19931992 ///Marker type for the `handle` field
19941993 pub struct handle(());
19941994+ ///Marker type for the `did` field
19951995+ pub struct did(());
19951996 }
19961997}
19971998···21842185impl<'a, S> ProfileViewBasicBuilder<'a, S>
21852186where
21862187 S: profile_view_basic_state::State,
21872187- S::Did: profile_view_basic_state::IsSet,
21882188 S::Handle: profile_view_basic_state::IsSet,
21892189+ S::Did: profile_view_basic_state::IsSet,
21892190{
21902191 /// Build the final struct
21912192 pub fn build(self) -> ProfileViewBasic<'a> {
···23212322 }
23222323 /// State trait tracking which required fields have been set
23232324 pub trait State: sealed::Sealed {
23242324- type Bluesky;
23252325 type Did;
23262326+ type Bluesky;
23262327 type Handle;
23272328 }
23282329 /// Empty state - all required fields are unset
23292330 pub struct Empty(());
23302331 impl sealed::Sealed for Empty {}
23312332 impl State for Empty {
23322332- type Bluesky = Unset;
23332333 type Did = Unset;
23342334+ type Bluesky = Unset;
23342335 type Handle = Unset;
23352336 }
23362336- ///State transition - sets the `bluesky` field to Set
23372337- pub struct SetBluesky<S: State = Empty>(PhantomData<fn() -> S>);
23382338- impl<S: State> sealed::Sealed for SetBluesky<S> {}
23392339- impl<S: State> State for SetBluesky<S> {
23402340- type Bluesky = Set<members::bluesky>;
23412341- type Did = S::Did;
23422342- type Handle = S::Handle;
23432343- }
23442337 ///State transition - sets the `did` field to Set
23452338 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
23462339 impl<S: State> sealed::Sealed for SetDid<S> {}
23472340 impl<S: State> State for SetDid<S> {
23482348- type Bluesky = S::Bluesky;
23492341 type Did = Set<members::did>;
23422342+ type Bluesky = S::Bluesky;
23432343+ type Handle = S::Handle;
23442344+ }
23452345+ ///State transition - sets the `bluesky` field to Set
23462346+ pub struct SetBluesky<S: State = Empty>(PhantomData<fn() -> S>);
23472347+ impl<S: State> sealed::Sealed for SetBluesky<S> {}
23482348+ impl<S: State> State for SetBluesky<S> {
23492349+ type Did = S::Did;
23502350+ type Bluesky = Set<members::bluesky>;
23502351 type Handle = S::Handle;
23512352 }
23522353 ///State transition - sets the `handle` field to Set
23532354 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
23542355 impl<S: State> sealed::Sealed for SetHandle<S> {}
23552356 impl<S: State> State for SetHandle<S> {
23562356- type Bluesky = S::Bluesky;
23572357 type Did = S::Did;
23582358+ type Bluesky = S::Bluesky;
23582359 type Handle = Set<members::handle>;
23592360 }
23602361 /// Marker types for field names
23612362 #[allow(non_camel_case_types)]
23622363 pub mod members {
23632363- ///Marker type for the `bluesky` field
23642364- pub struct bluesky(());
23652364 ///Marker type for the `did` field
23662365 pub struct did(());
23662366+ ///Marker type for the `bluesky` field
23672367+ pub struct bluesky(());
23672368 ///Marker type for the `handle` field
23682369 pub struct handle(());
23692370 }
···25552556impl<'a, S> TangledProfileViewBuilder<'a, S>
25562557where
25572558 S: tangled_profile_view_state::State,
25582558- S::Bluesky: tangled_profile_view_state::IsSet,
25592559 S::Did: tangled_profile_view_state::IsSet,
25602560+ S::Bluesky: tangled_profile_view_state::IsSet,
25602561 S::Handle: tangled_profile_view_state::IsSet,
25612562{
25622563 /// Build the final struct
+15-15
crates/weaver-api/src/sh_weaver/collab/invite.rs
···134134 }
135135 /// State trait tracking which required fields have been set
136136 pub trait State: sealed::Sealed {
137137+ type CreatedAt;
137138 type Resource;
138139 type Invitee;
139139- type CreatedAt;
140140 }
141141 /// Empty state - all required fields are unset
142142 pub struct Empty(());
143143 impl sealed::Sealed for Empty {}
144144 impl State for Empty {
145145+ type CreatedAt = Unset;
145146 type Resource = Unset;
146147 type Invitee = Unset;
147147- type CreatedAt = Unset;
148148+ }
149149+ ///State transition - sets the `created_at` field to Set
150150+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
151151+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
152152+ impl<S: State> State for SetCreatedAt<S> {
153153+ type CreatedAt = Set<members::created_at>;
154154+ type Resource = S::Resource;
155155+ type Invitee = S::Invitee;
148156 }
149157 ///State transition - sets the `resource` field to Set
150158 pub struct SetResource<S: State = Empty>(PhantomData<fn() -> S>);
151159 impl<S: State> sealed::Sealed for SetResource<S> {}
152160 impl<S: State> State for SetResource<S> {
161161+ type CreatedAt = S::CreatedAt;
153162 type Resource = Set<members::resource>;
154163 type Invitee = S::Invitee;
155155- type CreatedAt = S::CreatedAt;
156164 }
157165 ///State transition - sets the `invitee` field to Set
158166 pub struct SetInvitee<S: State = Empty>(PhantomData<fn() -> S>);
159167 impl<S: State> sealed::Sealed for SetInvitee<S> {}
160168 impl<S: State> State for SetInvitee<S> {
161161- type Resource = S::Resource;
162162- type Invitee = Set<members::invitee>;
163169 type CreatedAt = S::CreatedAt;
164164- }
165165- ///State transition - sets the `created_at` field to Set
166166- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
167167- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
168168- impl<S: State> State for SetCreatedAt<S> {
169170 type Resource = S::Resource;
170170- type Invitee = S::Invitee;
171171- type CreatedAt = Set<members::created_at>;
171171+ type Invitee = Set<members::invitee>;
172172 }
173173 /// Marker types for field names
174174 #[allow(non_camel_case_types)]
175175 pub mod members {
176176+ ///Marker type for the `created_at` field
177177+ pub struct created_at(());
176178 ///Marker type for the `resource` field
177179 pub struct resource(());
178180 ///Marker type for the `invitee` field
179181 pub struct invitee(());
180180- ///Marker type for the `created_at` field
181181- pub struct created_at(());
182182 }
183183}
184184···328328impl<'a, S> InviteBuilder<'a, S>
329329where
330330 S: invite_state::State,
331331+ S::CreatedAt: invite_state::IsSet,
331332 S::Resource: invite_state::IsSet,
332333 S::Invitee: invite_state::IsSet,
333333- S::CreatedAt: invite_state::IsSet,
334334{
335335 /// Build the final struct
336336 pub fn build(self) -> Invite<'a> {
···759759 }
760760 /// State trait tracking which required fields have been set
761761 pub trait State: sealed::Sealed {
762762- type Container;
763762 type Id;
763763+ type Container;
764764 }
765765 /// Empty state - all required fields are unset
766766 pub struct Empty(());
767767 impl sealed::Sealed for Empty {}
768768 impl State for Empty {
769769- type Container = Unset;
770769 type Id = Unset;
771771- }
772772- ///State transition - sets the `container` field to Set
773773- pub struct SetContainer<S: State = Empty>(PhantomData<fn() -> S>);
774774- impl<S: State> sealed::Sealed for SetContainer<S> {}
775775- impl<S: State> State for SetContainer<S> {
776776- type Container = Set<members::container>;
777777- type Id = S::Id;
770770+ type Container = Unset;
778771 }
779772 ///State transition - sets the `id` field to Set
780773 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
781774 impl<S: State> sealed::Sealed for SetId<S> {}
782775 impl<S: State> State for SetId<S> {
783783- type Container = S::Container;
784776 type Id = Set<members::id>;
777777+ type Container = S::Container;
778778+ }
779779+ ///State transition - sets the `container` field to Set
780780+ pub struct SetContainer<S: State = Empty>(PhantomData<fn() -> S>);
781781+ impl<S: State> sealed::Sealed for SetContainer<S> {}
782782+ impl<S: State> State for SetContainer<S> {
783783+ type Id = S::Id;
784784+ type Container = Set<members::container>;
785785 }
786786 /// Marker types for field names
787787 #[allow(non_camel_case_types)]
788788 pub mod members {
789789- ///Marker type for the `container` field
790790- pub struct container(());
791789 ///Marker type for the `id` field
792790 pub struct id(());
791791+ ///Marker type for the `container` field
792792+ pub struct container(());
793793 }
794794}
795795···882882impl<'a, S> CursorBuilder<'a, S>
883883where
884884 S: cursor_state::State,
885885- S::Container: cursor_state::IsSet,
886885 S::Id: cursor_state::IsSet,
886886+ S::Container: cursor_state::IsSet,
887887{
888888 /// Build the final struct
889889 pub fn build(self) -> Cursor<'a> {
···10171017 }
10181018 /// State trait tracking which required fields have been set
10191019 pub trait State: sealed::Sealed {
10201020- type Peer;
10211020 type Counter;
10211021+ type Peer;
10221022 type ContainerType;
10231023 }
10241024 /// Empty state - all required fields are unset
10251025 pub struct Empty(());
10261026 impl sealed::Sealed for Empty {}
10271027 impl State for Empty {
10281028- type Peer = Unset;
10291028 type Counter = Unset;
10291029+ type Peer = Unset;
10301030 type ContainerType = Unset;
10311031 }
10321032- ///State transition - sets the `peer` field to Set
10331033- pub struct SetPeer<S: State = Empty>(PhantomData<fn() -> S>);
10341034- impl<S: State> sealed::Sealed for SetPeer<S> {}
10351035- impl<S: State> State for SetPeer<S> {
10361036- type Peer = Set<members::peer>;
10371037- type Counter = S::Counter;
10381038- type ContainerType = S::ContainerType;
10391039- }
10401032 ///State transition - sets the `counter` field to Set
10411033 pub struct SetCounter<S: State = Empty>(PhantomData<fn() -> S>);
10421034 impl<S: State> sealed::Sealed for SetCounter<S> {}
10431035 impl<S: State> State for SetCounter<S> {
10441044- type Peer = S::Peer;
10451036 type Counter = Set<members::counter>;
10371037+ type Peer = S::Peer;
10381038+ type ContainerType = S::ContainerType;
10391039+ }
10401040+ ///State transition - sets the `peer` field to Set
10411041+ pub struct SetPeer<S: State = Empty>(PhantomData<fn() -> S>);
10421042+ impl<S: State> sealed::Sealed for SetPeer<S> {}
10431043+ impl<S: State> State for SetPeer<S> {
10441044+ type Counter = S::Counter;
10451045+ type Peer = Set<members::peer>;
10461046 type ContainerType = S::ContainerType;
10471047 }
10481048 ///State transition - sets the `container_type` field to Set
10491049 pub struct SetContainerType<S: State = Empty>(PhantomData<fn() -> S>);
10501050 impl<S: State> sealed::Sealed for SetContainerType<S> {}
10511051 impl<S: State> State for SetContainerType<S> {
10521052- type Peer = S::Peer;
10531052 type Counter = S::Counter;
10531053+ type Peer = S::Peer;
10541054 type ContainerType = Set<members::container_type>;
10551055 }
10561056 /// Marker types for field names
10571057 #[allow(non_camel_case_types)]
10581058 pub mod members {
10591059- ///Marker type for the `peer` field
10601060- pub struct peer(());
10611059 ///Marker type for the `counter` field
10621060 pub struct counter(());
10611061+ ///Marker type for the `peer` field
10621062+ pub struct peer(());
10631063 ///Marker type for the `container_type` field
10641064 pub struct container_type(());
10651065 }
···11541154impl<'a, S> NormalContainerIdBuilder<'a, S>
11551155where
11561156 S: normal_container_id_state::State,
11571157- S::Peer: normal_container_id_state::IsSet,
11581157 S::Counter: normal_container_id_state::IsSet,
11581158+ S::Peer: normal_container_id_state::IsSet,
11591159 S::ContainerType: normal_container_id_state::IsSet,
11601160{
11611161 /// Build the final struct
+19-32
crates/weaver-api/src/sh_weaver/edit/diff.rs
···88/// An edit record for a notebook.
99#[jacquard_derive::lexicon]
1010#[derive(
1111- serde::Serialize,
1212- serde::Deserialize,
1313- Debug,
1414- Clone,
1515- PartialEq,
1616- Eq,
1717- jacquard_derive::IntoStatic
1111+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
1812)]
1913#[serde(rename_all = "camelCase")]
2014pub struct Diff<'a> {
···2418 pub doc: crate::sh_weaver::edit::DocRef<'a>,
2519 /// An inline diff for for small edit batches. Either this or snapshot must be present to be valid
2620 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2121+ #[serde(default, with = "jacquard_common::opt_serde_bytes_helper")]
2722 pub inline_diff: std::option::Option<bytes::Bytes>,
2823 #[serde(skip_serializing_if = "std::option::Option::is_none")]
2924 #[serde(borrow)]
···38333934pub mod diff_state {
40354141- pub use crate::builder_types::{Set, Unset, IsSet, IsUnset};
3636+ pub use crate::builder_types::{IsSet, IsUnset, Set, Unset};
4237 #[allow(unused)]
4338 use ::core::marker::PhantomData;
4439 mod sealed {
···4641 }
4742 /// State trait tracking which required fields have been set
4843 pub trait State: sealed::Sealed {
4949- type Root;
5044 type Doc;
4545+ type Root;
5146 }
5247 /// Empty state - all required fields are unset
5348 pub struct Empty(());
5449 impl sealed::Sealed for Empty {}
5550 impl State for Empty {
5151+ type Doc = Unset;
5652 type Root = Unset;
5757- type Doc = Unset;
5353+ }
5454+ ///State transition - sets the `doc` field to Set
5555+ pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetDoc<S> {}
5757+ impl<S: State> State for SetDoc<S> {
5858+ type Doc = Set<members::doc>;
5959+ type Root = S::Root;
5860 }
5961 ///State transition - sets the `root` field to Set
6062 pub struct SetRoot<S: State = Empty>(PhantomData<fn() -> S>);
6163 impl<S: State> sealed::Sealed for SetRoot<S> {}
6264 impl<S: State> State for SetRoot<S> {
6363- type Root = Set<members::root>;
6465 type Doc = S::Doc;
6565- }
6666- ///State transition - sets the `doc` field to Set
6767- pub struct SetDoc<S: State = Empty>(PhantomData<fn() -> S>);
6868- impl<S: State> sealed::Sealed for SetDoc<S> {}
6969- impl<S: State> State for SetDoc<S> {
7070- type Root = S::Root;
7171- type Doc = Set<members::doc>;
6666+ type Root = Set<members::root>;
7267 }
7368 /// Marker types for field names
7469 #[allow(non_camel_case_types)]
7570 pub mod members {
7171+ ///Marker type for the `doc` field
7272+ pub struct doc(());
7673 ///Marker type for the `root` field
7774 pub struct root(());
7878- ///Marker type for the `doc` field
7979- pub struct doc(());
8075 }
8176}
8277···223218impl<'a, S> DiffBuilder<'a, S>
224219where
225220 S: diff_state::State,
226226- S::Root: diff_state::IsSet,
227221 S::Doc: diff_state::IsSet,
222222+ S::Root: diff_state::IsSet,
228223{
229224 /// Build the final struct
230225 pub fn build(self) -> Diff<'a> {
···273268274269/// Typed wrapper for GetRecord response with this collection's record type.
275270#[derive(
276276- serde::Serialize,
277277- serde::Deserialize,
278278- Debug,
279279- Clone,
280280- PartialEq,
281281- Eq,
282282- jacquard_derive::IntoStatic
271271+ serde::Serialize, serde::Deserialize, Debug, Clone, PartialEq, Eq, jacquard_derive::IntoStatic,
283272)]
284273#[serde(rename_all = "camelCase")]
285274pub struct DiffGetRecordOutput<'a> {
···336325 }
337326}
338327339339-fn lexicon_doc_sh_weaver_edit_diff() -> ::jacquard_lexicon::lexicon::LexiconDoc<
340340- 'static,
341341-> {
328328+fn lexicon_doc_sh_weaver_edit_diff() -> ::jacquard_lexicon::lexicon::LexiconDoc<'static> {
342329 ::jacquard_lexicon::lexicon::LexiconDoc {
343330 lexicon: ::jacquard_lexicon::lexicon::Lexicon::Lexicon1,
344331 id: ::jacquard_common::CowStr::new_static("sh.weaver.edit.diff"),
···441428 map
442429 },
443430 }
444444-}431431+}
+13-13
crates/weaver-api/src/sh_weaver/embed.rs
···312312 }
313313 /// State trait tracking which required fields have been set
314314 pub trait State: sealed::Sealed {
315315- type Width;
316315 type Height;
316316+ type Width;
317317 }
318318 /// Empty state - all required fields are unset
319319 pub struct Empty(());
320320 impl sealed::Sealed for Empty {}
321321 impl State for Empty {
322322- type Width = Unset;
323322 type Height = Unset;
324324- }
325325- ///State transition - sets the `width` field to Set
326326- pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
327327- impl<S: State> sealed::Sealed for SetWidth<S> {}
328328- impl<S: State> State for SetWidth<S> {
329329- type Width = Set<members::width>;
330330- type Height = S::Height;
323323+ type Width = Unset;
331324 }
332325 ///State transition - sets the `height` field to Set
333326 pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
334327 impl<S: State> sealed::Sealed for SetHeight<S> {}
335328 impl<S: State> State for SetHeight<S> {
336336- type Width = S::Width;
337329 type Height = Set<members::height>;
330330+ type Width = S::Width;
331331+ }
332332+ ///State transition - sets the `width` field to Set
333333+ pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
334334+ impl<S: State> sealed::Sealed for SetWidth<S> {}
335335+ impl<S: State> State for SetWidth<S> {
336336+ type Height = S::Height;
337337+ type Width = Set<members::width>;
338338 }
339339 /// Marker types for field names
340340 #[allow(non_camel_case_types)]
341341 pub mod members {
342342- ///Marker type for the `width` field
343343- pub struct width(());
344342 ///Marker type for the `height` field
345343 pub struct height(());
344344+ ///Marker type for the `width` field
345345+ pub struct width(());
346346 }
347347}
348348···412412impl<'a, S> PixelSizeBuilder<'a, S>
413413where
414414 S: pixel_size_state::State,
415415- S::Width: pixel_size_state::IsSet,
416415 S::Height: pixel_size_state::IsSet,
416416+ S::Width: pixel_size_state::IsSet,
417417{
418418 /// Build the final struct
419419 pub fn build(self) -> PixelSize<'a> {
+39-39
crates/weaver-api/src/sh_weaver/embed/external.rs
···3838 }
3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141+ type Description;
4142 type Uri;
4243 type Title;
4343- type Description;
4444 }
4545 /// Empty state - all required fields are unset
4646 pub struct Empty(());
4747 impl sealed::Sealed for Empty {}
4848 impl State for Empty {
4949+ type Description = Unset;
4950 type Uri = Unset;
5051 type Title = Unset;
5151- type Description = Unset;
5252+ }
5353+ ///State transition - sets the `description` field to Set
5454+ pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetDescription<S> {}
5656+ impl<S: State> State for SetDescription<S> {
5757+ type Description = Set<members::description>;
5858+ type Uri = S::Uri;
5959+ type Title = S::Title;
5260 }
5361 ///State transition - sets the `uri` field to Set
5462 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
5563 impl<S: State> sealed::Sealed for SetUri<S> {}
5664 impl<S: State> State for SetUri<S> {
6565+ type Description = S::Description;
5766 type Uri = Set<members::uri>;
5867 type Title = S::Title;
5959- type Description = S::Description;
6068 }
6169 ///State transition - sets the `title` field to Set
6270 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
6371 impl<S: State> sealed::Sealed for SetTitle<S> {}
6472 impl<S: State> State for SetTitle<S> {
6565- type Uri = S::Uri;
6666- type Title = Set<members::title>;
6773 type Description = S::Description;
6868- }
6969- ///State transition - sets the `description` field to Set
7070- pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
7171- impl<S: State> sealed::Sealed for SetDescription<S> {}
7272- impl<S: State> State for SetDescription<S> {
7374 type Uri = S::Uri;
7474- type Title = S::Title;
7575- type Description = Set<members::description>;
7575+ type Title = Set<members::title>;
7676 }
7777 /// Marker types for field names
7878 #[allow(non_camel_case_types)]
7979 pub mod members {
8080+ ///Marker type for the `description` field
8181+ pub struct description(());
8082 ///Marker type for the `uri` field
8183 pub struct uri(());
8284 ///Marker type for the `title` field
8385 pub struct title(());
8484- ///Marker type for the `description` field
8585- pub struct description(());
8686 }
8787}
8888···195195impl<'a, S> ExternalEmbedBuilder<'a, S>
196196where
197197 S: external_embed_state::State,
198198+ S::Description: external_embed_state::IsSet,
198199 S::Uri: external_embed_state::IsSet,
199200 S::Title: external_embed_state::IsSet,
200200- S::Description: external_embed_state::IsSet,
201201{
202202 /// Build the final struct
203203 pub fn build(self) -> ExternalEmbed<'a> {
···817817 }
818818 /// State trait tracking which required fields have been set
819819 pub trait State: sealed::Sealed {
820820- type Uri;
821821- type Title;
822820 type Description;
821821+ type Title;
822822+ type Uri;
823823 }
824824 /// Empty state - all required fields are unset
825825 pub struct Empty(());
826826 impl sealed::Sealed for Empty {}
827827 impl State for Empty {
828828+ type Description = Unset;
829829+ type Title = Unset;
828830 type Uri = Unset;
829829- type Title = Unset;
830830- type Description = Unset;
831831 }
832832- ///State transition - sets the `uri` field to Set
833833- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
834834- impl<S: State> sealed::Sealed for SetUri<S> {}
835835- impl<S: State> State for SetUri<S> {
836836- type Uri = Set<members::uri>;
832832+ ///State transition - sets the `description` field to Set
833833+ pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
834834+ impl<S: State> sealed::Sealed for SetDescription<S> {}
835835+ impl<S: State> State for SetDescription<S> {
836836+ type Description = Set<members::description>;
837837 type Title = S::Title;
838838- type Description = S::Description;
838838+ type Uri = S::Uri;
839839 }
840840 ///State transition - sets the `title` field to Set
841841 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
842842 impl<S: State> sealed::Sealed for SetTitle<S> {}
843843 impl<S: State> State for SetTitle<S> {
844844- type Uri = S::Uri;
845845- type Title = Set<members::title>;
846844 type Description = S::Description;
845845+ type Title = Set<members::title>;
846846+ type Uri = S::Uri;
847847 }
848848- ///State transition - sets the `description` field to Set
849849- pub struct SetDescription<S: State = Empty>(PhantomData<fn() -> S>);
850850- impl<S: State> sealed::Sealed for SetDescription<S> {}
851851- impl<S: State> State for SetDescription<S> {
852852- type Uri = S::Uri;
848848+ ///State transition - sets the `uri` field to Set
849849+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
850850+ impl<S: State> sealed::Sealed for SetUri<S> {}
851851+ impl<S: State> State for SetUri<S> {
852852+ type Description = S::Description;
853853 type Title = S::Title;
854854- type Description = Set<members::description>;
854854+ type Uri = Set<members::uri>;
855855 }
856856 /// Marker types for field names
857857 #[allow(non_camel_case_types)]
858858 pub mod members {
859859+ ///Marker type for the `description` field
860860+ pub struct description(());
861861+ ///Marker type for the `title` field
862862+ pub struct title(());
859863 ///Marker type for the `uri` field
860864 pub struct uri(());
861861- ///Marker type for the `title` field
862862- pub struct title(());
863863- ///Marker type for the `description` field
864864- pub struct description(());
865865 }
866866}
867867···974974impl<'a, S> ViewExternalBuilder<'a, S>
975975where
976976 S: view_external_state::State,
977977- S::Uri: view_external_state::IsSet,
978978- S::Title: view_external_state::IsSet,
979977 S::Description: view_external_state::IsSet,
978978+ S::Title: view_external_state::IsSet,
979979+ S::Uri: view_external_state::IsSet,
980980{
981981 /// Build the final struct
982982 pub fn build(self) -> ViewExternal<'a> {
+28-28
crates/weaver-api/src/sh_weaver/embed/images.rs
···4444 }
4545 /// State trait tracking which required fields have been set
4646 pub trait State: sealed::Sealed {
4747- type Image;
4847 type Alt;
4848+ type Image;
4949 }
5050 /// Empty state - all required fields are unset
5151 pub struct Empty(());
5252 impl sealed::Sealed for Empty {}
5353 impl State for Empty {
5454- type Image = Unset;
5554 type Alt = Unset;
5656- }
5757- ///State transition - sets the `image` field to Set
5858- pub struct SetImage<S: State = Empty>(PhantomData<fn() -> S>);
5959- impl<S: State> sealed::Sealed for SetImage<S> {}
6060- impl<S: State> State for SetImage<S> {
6161- type Image = Set<members::image>;
6262- type Alt = S::Alt;
5555+ type Image = Unset;
6356 }
6457 ///State transition - sets the `alt` field to Set
6558 pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
6659 impl<S: State> sealed::Sealed for SetAlt<S> {}
6760 impl<S: State> State for SetAlt<S> {
6868- type Image = S::Image;
6961 type Alt = Set<members::alt>;
6262+ type Image = S::Image;
6363+ }
6464+ ///State transition - sets the `image` field to Set
6565+ pub struct SetImage<S: State = Empty>(PhantomData<fn() -> S>);
6666+ impl<S: State> sealed::Sealed for SetImage<S> {}
6767+ impl<S: State> State for SetImage<S> {
6868+ type Alt = S::Alt;
6969+ type Image = Set<members::image>;
7070 }
7171 /// Marker types for field names
7272 #[allow(non_camel_case_types)]
7373 pub mod members {
7474- ///Marker type for the `image` field
7575- pub struct image(());
7674 ///Marker type for the `alt` field
7775 pub struct alt(());
7676+ ///Marker type for the `image` field
7777+ pub struct image(());
7878 }
7979}
8080···195195impl<'a, S> ImageBuilder<'a, S>
196196where
197197 S: image_state::State,
198198- S::Image: image_state::IsSet,
199198 S::Alt: image_state::IsSet,
199199+ S::Image: image_state::IsSet,
200200{
201201 /// Build the final struct
202202 pub fn build(self) -> Image<'a> {
···902902 }
903903 /// State trait tracking which required fields have been set
904904 pub trait State: sealed::Sealed {
905905- type Thumb;
906905 type Fullsize;
907906 type Alt;
907907+ type Thumb;
908908 }
909909 /// Empty state - all required fields are unset
910910 pub struct Empty(());
911911 impl sealed::Sealed for Empty {}
912912 impl State for Empty {
913913- type Thumb = Unset;
914913 type Fullsize = Unset;
915914 type Alt = Unset;
916916- }
917917- ///State transition - sets the `thumb` field to Set
918918- pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
919919- impl<S: State> sealed::Sealed for SetThumb<S> {}
920920- impl<S: State> State for SetThumb<S> {
921921- type Thumb = Set<members::thumb>;
922922- type Fullsize = S::Fullsize;
923923- type Alt = S::Alt;
915915+ type Thumb = Unset;
924916 }
925917 ///State transition - sets the `fullsize` field to Set
926918 pub struct SetFullsize<S: State = Empty>(PhantomData<fn() -> S>);
927919 impl<S: State> sealed::Sealed for SetFullsize<S> {}
928920 impl<S: State> State for SetFullsize<S> {
929929- type Thumb = S::Thumb;
930921 type Fullsize = Set<members::fullsize>;
931922 type Alt = S::Alt;
923923+ type Thumb = S::Thumb;
932924 }
933925 ///State transition - sets the `alt` field to Set
934926 pub struct SetAlt<S: State = Empty>(PhantomData<fn() -> S>);
935927 impl<S: State> sealed::Sealed for SetAlt<S> {}
936928 impl<S: State> State for SetAlt<S> {
937937- type Thumb = S::Thumb;
938929 type Fullsize = S::Fullsize;
939930 type Alt = Set<members::alt>;
931931+ type Thumb = S::Thumb;
932932+ }
933933+ ///State transition - sets the `thumb` field to Set
934934+ pub struct SetThumb<S: State = Empty>(PhantomData<fn() -> S>);
935935+ impl<S: State> sealed::Sealed for SetThumb<S> {}
936936+ impl<S: State> State for SetThumb<S> {
937937+ type Fullsize = S::Fullsize;
938938+ type Alt = S::Alt;
939939+ type Thumb = Set<members::thumb>;
940940 }
941941 /// Marker types for field names
942942 #[allow(non_camel_case_types)]
943943 pub mod members {
944944- ///Marker type for the `thumb` field
945945- pub struct thumb(());
946944 ///Marker type for the `fullsize` field
947945 pub struct fullsize(());
948946 ///Marker type for the `alt` field
949947 pub struct alt(());
948948+ ///Marker type for the `thumb` field
949949+ pub struct thumb(());
950950 }
951951}
952952···10731073impl<'a, S> ViewImageBuilder<'a, S>
10741074where
10751075 S: view_image_state::State,
10761076- S::Thumb: view_image_state::IsSet,
10771076 S::Fullsize: view_image_state::IsSet,
10781077 S::Alt: view_image_state::IsSet,
10781078+ S::Thumb: view_image_state::IsSet,
10791079{
10801080 /// Build the final struct
10811081 pub fn build(self) -> ViewImage<'a> {
···3333 }
3434 /// State trait tracking which required fields have been set
3535 pub trait State: sealed::Sealed {
3636- type Records;
3736 type Media;
3737+ type Records;
3838 }
3939 /// Empty state - all required fields are unset
4040 pub struct Empty(());
4141 impl sealed::Sealed for Empty {}
4242 impl State for Empty {
4343- type Records = Unset;
4443 type Media = Unset;
4545- }
4646- ///State transition - sets the `records` field to Set
4747- pub struct SetRecords<S: State = Empty>(PhantomData<fn() -> S>);
4848- impl<S: State> sealed::Sealed for SetRecords<S> {}
4949- impl<S: State> State for SetRecords<S> {
5050- type Records = Set<members::records>;
5151- type Media = S::Media;
4444+ type Records = Unset;
5245 }
5346 ///State transition - sets the `media` field to Set
5447 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>);
5548 impl<S: State> sealed::Sealed for SetMedia<S> {}
5649 impl<S: State> State for SetMedia<S> {
5757- type Records = S::Records;
5850 type Media = Set<members::media>;
5151+ type Records = S::Records;
5252+ }
5353+ ///State transition - sets the `records` field to Set
5454+ pub struct SetRecords<S: State = Empty>(PhantomData<fn() -> S>);
5555+ impl<S: State> sealed::Sealed for SetRecords<S> {}
5656+ impl<S: State> State for SetRecords<S> {
5757+ type Media = S::Media;
5858+ type Records = Set<members::records>;
5959 }
6060 /// Marker types for field names
6161 #[allow(non_camel_case_types)]
6262 pub mod members {
6363- ///Marker type for the `records` field
6464- pub struct records(());
6563 ///Marker type for the `media` field
6664 pub struct media(());
6565+ ///Marker type for the `records` field
6666+ pub struct records(());
6767 }
6868}
6969···136136impl<'a, S> RecordWithMediaBuilder<'a, S>
137137where
138138 S: record_with_media_state::State,
139139- S::Records: record_with_media_state::IsSet,
140139 S::Media: record_with_media_state::IsSet,
140140+ S::Records: record_with_media_state::IsSet,
141141{
142142 /// Build the final struct
143143 pub fn build(self) -> RecordWithMedia<'a> {
···323323 }
324324 /// State trait tracking which required fields have been set
325325 pub trait State: sealed::Sealed {
326326- type Record;
327326 type Media;
327327+ type Record;
328328 }
329329 /// Empty state - all required fields are unset
330330 pub struct Empty(());
331331 impl sealed::Sealed for Empty {}
332332 impl State for Empty {
333333- type Record = Unset;
334333 type Media = Unset;
335335- }
336336- ///State transition - sets the `record` field to Set
337337- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
338338- impl<S: State> sealed::Sealed for SetRecord<S> {}
339339- impl<S: State> State for SetRecord<S> {
340340- type Record = Set<members::record>;
341341- type Media = S::Media;
334334+ type Record = Unset;
342335 }
343336 ///State transition - sets the `media` field to Set
344337 pub struct SetMedia<S: State = Empty>(PhantomData<fn() -> S>);
345338 impl<S: State> sealed::Sealed for SetMedia<S> {}
346339 impl<S: State> State for SetMedia<S> {
347347- type Record = S::Record;
348340 type Media = Set<members::media>;
341341+ type Record = S::Record;
342342+ }
343343+ ///State transition - sets the `record` field to Set
344344+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
345345+ impl<S: State> sealed::Sealed for SetRecord<S> {}
346346+ impl<S: State> State for SetRecord<S> {
347347+ type Media = S::Media;
348348+ type Record = Set<members::record>;
349349 }
350350 /// Marker types for field names
351351 #[allow(non_camel_case_types)]
352352 pub mod members {
353353- ///Marker type for the `record` field
354354- pub struct record(());
355353 ///Marker type for the `media` field
356354 pub struct media(());
355355+ ///Marker type for the `record` field
356356+ pub struct record(());
357357 }
358358}
359359···426426impl<'a, S> ViewBuilder<'a, S>
427427where
428428 S: view_state::State,
429429- S::Record: view_state::IsSet,
430429 S::Media: view_state::IsSet,
430430+ S::Record: view_state::IsSet,
431431{
432432 /// Build the final struct
433433 pub fn build(self) -> View<'a> {
+73-73
crates/weaver-api/src/sh_weaver/embed/records.rs
···11871187 }
11881188 /// State trait tracking which required fields have been set
11891189 pub trait State: sealed::Sealed {
11901190- type Uri;
11911190 type Blocked;
11921191 type Author;
11921192+ type Uri;
11931193 }
11941194 /// Empty state - all required fields are unset
11951195 pub struct Empty(());
11961196 impl sealed::Sealed for Empty {}
11971197 impl State for Empty {
11981198- type Uri = Unset;
11991198 type Blocked = Unset;
12001199 type Author = Unset;
12011201- }
12021202- ///State transition - sets the `uri` field to Set
12031203- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
12041204- impl<S: State> sealed::Sealed for SetUri<S> {}
12051205- impl<S: State> State for SetUri<S> {
12061206- type Uri = Set<members::uri>;
12071207- type Blocked = S::Blocked;
12081208- type Author = S::Author;
12001200+ type Uri = Unset;
12091201 }
12101202 ///State transition - sets the `blocked` field to Set
12111203 pub struct SetBlocked<S: State = Empty>(PhantomData<fn() -> S>);
12121204 impl<S: State> sealed::Sealed for SetBlocked<S> {}
12131205 impl<S: State> State for SetBlocked<S> {
12141214- type Uri = S::Uri;
12151206 type Blocked = Set<members::blocked>;
12161207 type Author = S::Author;
12081208+ type Uri = S::Uri;
12171209 }
12181210 ///State transition - sets the `author` field to Set
12191211 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
12201212 impl<S: State> sealed::Sealed for SetAuthor<S> {}
12211213 impl<S: State> State for SetAuthor<S> {
12141214+ type Blocked = S::Blocked;
12151215+ type Author = Set<members::author>;
12221216 type Uri = S::Uri;
12171217+ }
12181218+ ///State transition - sets the `uri` field to Set
12191219+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
12201220+ impl<S: State> sealed::Sealed for SetUri<S> {}
12211221+ impl<S: State> State for SetUri<S> {
12231222 type Blocked = S::Blocked;
12241224- type Author = Set<members::author>;
12231223+ type Author = S::Author;
12241224+ type Uri = Set<members::uri>;
12251225 }
12261226 /// Marker types for field names
12271227 #[allow(non_camel_case_types)]
12281228 pub mod members {
12291229- ///Marker type for the `uri` field
12301230- pub struct uri(());
12311229 ///Marker type for the `blocked` field
12321230 pub struct blocked(());
12331231 ///Marker type for the `author` field
12341232 pub struct author(());
12331233+ ///Marker type for the `uri` field
12341234+ pub struct uri(());
12351235 }
12361236}
12371237···13241324impl<'a, S> ViewBlockedBuilder<'a, S>
13251325where
13261326 S: view_blocked_state::State,
13271327- S::Uri: view_blocked_state::IsSet,
13281327 S::Blocked: view_blocked_state::IsSet,
13291328 S::Author: view_blocked_state::IsSet,
13291329+ S::Uri: view_blocked_state::IsSet,
13301330{
13311331 /// Build the final struct
13321332 pub fn build(self) -> ViewBlocked<'a> {
···13981398 }
13991399 /// State trait tracking which required fields have been set
14001400 pub trait State: sealed::Sealed {
14011401- type Uri;
14021401 type Detached;
14021402+ type Uri;
14031403 }
14041404 /// Empty state - all required fields are unset
14051405 pub struct Empty(());
14061406 impl sealed::Sealed for Empty {}
14071407 impl State for Empty {
14081408+ type Detached = Unset;
14081409 type Uri = Unset;
14091409- type Detached = Unset;
14101410+ }
14111411+ ///State transition - sets the `detached` field to Set
14121412+ pub struct SetDetached<S: State = Empty>(PhantomData<fn() -> S>);
14131413+ impl<S: State> sealed::Sealed for SetDetached<S> {}
14141414+ impl<S: State> State for SetDetached<S> {
14151415+ type Detached = Set<members::detached>;
14161416+ type Uri = S::Uri;
14101417 }
14111418 ///State transition - sets the `uri` field to Set
14121419 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
14131420 impl<S: State> sealed::Sealed for SetUri<S> {}
14141421 impl<S: State> State for SetUri<S> {
14221422+ type Detached = S::Detached;
14151423 type Uri = Set<members::uri>;
14161416- type Detached = S::Detached;
14171417- }
14181418- ///State transition - sets the `detached` field to Set
14191419- pub struct SetDetached<S: State = Empty>(PhantomData<fn() -> S>);
14201420- impl<S: State> sealed::Sealed for SetDetached<S> {}
14211421- impl<S: State> State for SetDetached<S> {
14221422- type Uri = S::Uri;
14231423- type Detached = Set<members::detached>;
14241424 }
14251425 /// Marker types for field names
14261426 #[allow(non_camel_case_types)]
14271427 pub mod members {
14281428+ ///Marker type for the `detached` field
14291429+ pub struct detached(());
14281430 ///Marker type for the `uri` field
14291431 pub struct uri(());
14301430- ///Marker type for the `detached` field
14311431- pub struct detached(());
14321432 }
14331433}
14341434···15011501impl<'a, S> ViewDetachedBuilder<'a, S>
15021502where
15031503 S: view_detached_state::State,
15041504- S::Uri: view_detached_state::IsSet,
15051504 S::Detached: view_detached_state::IsSet,
15051505+ S::Uri: view_detached_state::IsSet,
15061506{
15071507 /// Build the final struct
15081508 pub fn build(self) -> ViewDetached<'a> {
···15721572 }
15731573 /// State trait tracking which required fields have been set
15741574 pub trait State: sealed::Sealed {
15751575- type Uri;
15761575 type NotFound;
15761576+ type Uri;
15771577 }
15781578 /// Empty state - all required fields are unset
15791579 pub struct Empty(());
15801580 impl sealed::Sealed for Empty {}
15811581 impl State for Empty {
15821582+ type NotFound = Unset;
15821583 type Uri = Unset;
15831583- type NotFound = Unset;
15841584- }
15851585- ///State transition - sets the `uri` field to Set
15861586- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
15871587- impl<S: State> sealed::Sealed for SetUri<S> {}
15881588- impl<S: State> State for SetUri<S> {
15891589- type Uri = Set<members::uri>;
15901590- type NotFound = S::NotFound;
15911584 }
15921585 ///State transition - sets the `not_found` field to Set
15931586 pub struct SetNotFound<S: State = Empty>(PhantomData<fn() -> S>);
15941587 impl<S: State> sealed::Sealed for SetNotFound<S> {}
15951588 impl<S: State> State for SetNotFound<S> {
15961596- type Uri = S::Uri;
15971589 type NotFound = Set<members::not_found>;
15901590+ type Uri = S::Uri;
15911591+ }
15921592+ ///State transition - sets the `uri` field to Set
15931593+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
15941594+ impl<S: State> sealed::Sealed for SetUri<S> {}
15951595+ impl<S: State> State for SetUri<S> {
15961596+ type NotFound = S::NotFound;
15971597+ type Uri = Set<members::uri>;
15981598 }
15991599 /// Marker types for field names
16001600 #[allow(non_camel_case_types)]
16011601 pub mod members {
16021602+ ///Marker type for the `not_found` field
16031603+ pub struct not_found(());
16021604 ///Marker type for the `uri` field
16031605 pub struct uri(());
16041604- ///Marker type for the `not_found` field
16051605- pub struct not_found(());
16061606 }
16071607}
16081608···16751675impl<'a, S> ViewNotFoundBuilder<'a, S>
16761676where
16771677 S: view_not_found_state::State,
16781678- S::Uri: view_not_found_state::IsSet,
16791678 S::NotFound: view_not_found_state::IsSet,
16791679+ S::Uri: view_not_found_state::IsSet,
16801680{
16811681 /// Build the final struct
16821682 pub fn build(self) -> ViewNotFound<'a> {
···17691769 }
17701770 /// State trait tracking which required fields have been set
17711771 pub trait State: sealed::Sealed {
17721772- type Uri;
17731772 type Cid;
17741773 type Author;
17741774+ type IndexedAt;
17751775 type Value;
17761776- type IndexedAt;
17761776+ type Uri;
17771777 }
17781778 /// Empty state - all required fields are unset
17791779 pub struct Empty(());
17801780 impl sealed::Sealed for Empty {}
17811781 impl State for Empty {
17821782- type Uri = Unset;
17831782 type Cid = Unset;
17841783 type Author = Unset;
17841784+ type IndexedAt = Unset;
17851785 type Value = Unset;
17861786- type IndexedAt = Unset;
17871787- }
17881788- ///State transition - sets the `uri` field to Set
17891789- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
17901790- impl<S: State> sealed::Sealed for SetUri<S> {}
17911791- impl<S: State> State for SetUri<S> {
17921792- type Uri = Set<members::uri>;
17931793- type Cid = S::Cid;
17941794- type Author = S::Author;
17951795- type Value = S::Value;
17961796- type IndexedAt = S::IndexedAt;
17861786+ type Uri = Unset;
17971787 }
17981788 ///State transition - sets the `cid` field to Set
17991789 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
18001790 impl<S: State> sealed::Sealed for SetCid<S> {}
18011791 impl<S: State> State for SetCid<S> {
18021802- type Uri = S::Uri;
18031792 type Cid = Set<members::cid>;
18041793 type Author = S::Author;
17941794+ type IndexedAt = S::IndexedAt;
18051795 type Value = S::Value;
18061806- type IndexedAt = S::IndexedAt;
17961796+ type Uri = S::Uri;
18071797 }
18081798 ///State transition - sets the `author` field to Set
18091799 pub struct SetAuthor<S: State = Empty>(PhantomData<fn() -> S>);
18101800 impl<S: State> sealed::Sealed for SetAuthor<S> {}
18111801 impl<S: State> State for SetAuthor<S> {
18021802+ type Cid = S::Cid;
18031803+ type Author = Set<members::author>;
18041804+ type IndexedAt = S::IndexedAt;
18051805+ type Value = S::Value;
18121806 type Uri = S::Uri;
18071807+ }
18081808+ ///State transition - sets the `indexed_at` field to Set
18091809+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
18101810+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
18111811+ impl<S: State> State for SetIndexedAt<S> {
18131812 type Cid = S::Cid;
18141814- type Author = Set<members::author>;
18131813+ type Author = S::Author;
18141814+ type IndexedAt = Set<members::indexed_at>;
18151815 type Value = S::Value;
18161816- type IndexedAt = S::IndexedAt;
18161816+ type Uri = S::Uri;
18171817 }
18181818 ///State transition - sets the `value` field to Set
18191819 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
18201820 impl<S: State> sealed::Sealed for SetValue<S> {}
18211821 impl<S: State> State for SetValue<S> {
18221822- type Uri = S::Uri;
18231822 type Cid = S::Cid;
18241823 type Author = S::Author;
18251825- type Value = Set<members::value>;
18261824 type IndexedAt = S::IndexedAt;
18271827- }
18281828- ///State transition - sets the `indexed_at` field to Set
18291829- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
18301830- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
18311831- impl<S: State> State for SetIndexedAt<S> {
18251825+ type Value = Set<members::value>;
18321826 type Uri = S::Uri;
18271827+ }
18281828+ ///State transition - sets the `uri` field to Set
18291829+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
18301830+ impl<S: State> sealed::Sealed for SetUri<S> {}
18311831+ impl<S: State> State for SetUri<S> {
18331832 type Cid = S::Cid;
18341833 type Author = S::Author;
18341834+ type IndexedAt = S::IndexedAt;
18351835 type Value = S::Value;
18361836- type IndexedAt = Set<members::indexed_at>;
18361836+ type Uri = Set<members::uri>;
18371837 }
18381838 /// Marker types for field names
18391839 #[allow(non_camel_case_types)]
18401840 pub mod members {
18411841- ///Marker type for the `uri` field
18421842- pub struct uri(());
18431841 ///Marker type for the `cid` field
18441842 pub struct cid(());
18451843 ///Marker type for the `author` field
18461844 pub struct author(());
18471847- ///Marker type for the `value` field
18481848- pub struct value(());
18491845 ///Marker type for the `indexed_at` field
18501846 pub struct indexed_at(());
18471847+ ///Marker type for the `value` field
18481848+ pub struct value(());
18491849+ ///Marker type for the `uri` field
18501850+ pub struct uri(());
18511851 }
18521852}
18531853···20922092impl<'a, S> ViewRecordBuilder<'a, S>
20932093where
20942094 S: view_record_state::State,
20952095- S::Uri: view_record_state::IsSet,
20962095 S::Cid: view_record_state::IsSet,
20972096 S::Author: view_record_state::IsSet,
20982098- S::Value: view_record_state::IsSet,
20992097 S::IndexedAt: view_record_state::IsSet,
20982098+ S::Value: view_record_state::IsSet,
20992099+ S::Uri: view_record_state::IsSet,
21002100{
21012101 /// Build the final struct
21022102 pub fn build(self) -> ViewRecord<'a> {
+26-26
crates/weaver-api/src/sh_weaver/embed/video.rs
···3232 }
3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535- type Lang;
3635 type File;
3636+ type Lang;
3737 }
3838 /// Empty state - all required fields are unset
3939 pub struct Empty(());
4040 impl sealed::Sealed for Empty {}
4141 impl State for Empty {
4242- type Lang = Unset;
4342 type File = Unset;
4444- }
4545- ///State transition - sets the `lang` field to Set
4646- pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetLang<S> {}
4848- impl<S: State> State for SetLang<S> {
4949- type Lang = Set<members::lang>;
5050- type File = S::File;
4343+ type Lang = Unset;
5144 }
5245 ///State transition - sets the `file` field to Set
5346 pub struct SetFile<S: State = Empty>(PhantomData<fn() -> S>);
5447 impl<S: State> sealed::Sealed for SetFile<S> {}
5548 impl<S: State> State for SetFile<S> {
5656- type Lang = S::Lang;
5749 type File = Set<members::file>;
5050+ type Lang = S::Lang;
5151+ }
5252+ ///State transition - sets the `lang` field to Set
5353+ pub struct SetLang<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetLang<S> {}
5555+ impl<S: State> State for SetLang<S> {
5656+ type File = S::File;
5757+ type Lang = Set<members::lang>;
5858 }
5959 /// Marker types for field names
6060 #[allow(non_camel_case_types)]
6161 pub mod members {
6262- ///Marker type for the `lang` field
6363- pub struct lang(());
6462 ///Marker type for the `file` field
6563 pub struct file(());
6464+ ///Marker type for the `lang` field
6565+ pub struct lang(());
6666 }
6767}
6868···135135impl<'a, S> CaptionBuilder<'a, S>
136136where
137137 S: caption_state::State,
138138- S::Lang: caption_state::IsSet,
139138 S::File: caption_state::IsSet,
139139+ S::Lang: caption_state::IsSet,
140140{
141141 /// Build the final struct
142142 pub fn build(self) -> Caption<'a> {
···940940 }
941941 /// State trait tracking which required fields have been set
942942 pub trait State: sealed::Sealed {
943943- type Cid;
944943 type Playlist;
944944+ type Cid;
945945 }
946946 /// Empty state - all required fields are unset
947947 pub struct Empty(());
948948 impl sealed::Sealed for Empty {}
949949 impl State for Empty {
950950- type Cid = Unset;
951950 type Playlist = Unset;
952952- }
953953- ///State transition - sets the `cid` field to Set
954954- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
955955- impl<S: State> sealed::Sealed for SetCid<S> {}
956956- impl<S: State> State for SetCid<S> {
957957- type Cid = Set<members::cid>;
958958- type Playlist = S::Playlist;
951951+ type Cid = Unset;
959952 }
960953 ///State transition - sets the `playlist` field to Set
961954 pub struct SetPlaylist<S: State = Empty>(PhantomData<fn() -> S>);
962955 impl<S: State> sealed::Sealed for SetPlaylist<S> {}
963956 impl<S: State> State for SetPlaylist<S> {
964964- type Cid = S::Cid;
965957 type Playlist = Set<members::playlist>;
958958+ type Cid = S::Cid;
959959+ }
960960+ ///State transition - sets the `cid` field to Set
961961+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
962962+ impl<S: State> sealed::Sealed for SetCid<S> {}
963963+ impl<S: State> State for SetCid<S> {
964964+ type Playlist = S::Playlist;
965965+ type Cid = Set<members::cid>;
966966 }
967967 /// Marker types for field names
968968 #[allow(non_camel_case_types)]
969969 pub mod members {
970970- ///Marker type for the `cid` field
971971- pub struct cid(());
972970 ///Marker type for the `playlist` field
973971 pub struct playlist(());
972972+ ///Marker type for the `cid` field
973973+ pub struct cid(());
974974 }
975975}
976976···11081108impl<'a, S> ViewBuilder<'a, S>
11091109where
11101110 S: view_state::State,
11111111- S::Cid: view_state::IsSet,
11121111 S::Playlist: view_state::IsSet,
11121112+ S::Cid: view_state::IsSet,
11131113{
11141114 /// Build the final struct
11151115 pub fn build(self) -> View<'a> {
+13-13
crates/weaver-api/src/sh_weaver/graph/like.rs
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Subject;
3837 type CreatedAt;
3838+ type Subject;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type Subject = Unset;
4544 type CreatedAt = Unset;
4646- }
4747- ///State transition - sets the `subject` field to Set
4848- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetSubject<S> {}
5050- impl<S: State> State for SetSubject<S> {
5151- type Subject = Set<members::subject>;
5252- type CreatedAt = S::CreatedAt;
4545+ type Subject = Unset;
5346 }
5447 ///State transition - sets the `created_at` field to Set
5548 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5750 impl<S: State> State for SetCreatedAt<S> {
5858- type Subject = S::Subject;
5951 type CreatedAt = Set<members::created_at>;
5252+ type Subject = S::Subject;
5353+ }
5454+ ///State transition - sets the `subject` field to Set
5555+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetSubject<S> {}
5757+ impl<S: State> State for SetSubject<S> {
5858+ type CreatedAt = S::CreatedAt;
5959+ type Subject = Set<members::subject>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `subject` field
6565- pub struct subject(());
6664 ///Marker type for the `created_at` field
6765 pub struct created_at(());
6666+ ///Marker type for the `subject` field
6767+ pub struct subject(());
6868 }
6969}
7070···137137impl<'a, S> LikeBuilder<'a, S>
138138where
139139 S: like_state::State,
140140- S::Subject: like_state::IsSet,
141140 S::CreatedAt: like_state::IsSet,
141141+ S::Subject: like_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> Like<'a> {
+15-15
crates/weaver-api/src/sh_weaver/graph/listitem.rs
···3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040 type Subject;
4141- type List;
4241 type CreatedAt;
4242+ type List;
4343 }
4444 /// Empty state - all required fields are unset
4545 pub struct Empty(());
4646 impl sealed::Sealed for Empty {}
4747 impl State for Empty {
4848 type Subject = Unset;
4949- type List = Unset;
5049 type CreatedAt = Unset;
5050+ type List = Unset;
5151 }
5252 ///State transition - sets the `subject` field to Set
5353 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
5454 impl<S: State> sealed::Sealed for SetSubject<S> {}
5555 impl<S: State> State for SetSubject<S> {
5656 type Subject = Set<members::subject>;
5757- type List = S::List;
5857 type CreatedAt = S::CreatedAt;
5959- }
6060- ///State transition - sets the `list` field to Set
6161- pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
6262- impl<S: State> sealed::Sealed for SetList<S> {}
6363- impl<S: State> State for SetList<S> {
6464- type Subject = S::Subject;
6565- type List = Set<members::list>;
6666- type CreatedAt = S::CreatedAt;
5858+ type List = S::List;
6759 }
6860 ///State transition - sets the `created_at` field to Set
6961 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
7062 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
7163 impl<S: State> State for SetCreatedAt<S> {
7264 type Subject = S::Subject;
7373- type List = S::List;
7465 type CreatedAt = Set<members::created_at>;
6666+ type List = S::List;
6767+ }
6868+ ///State transition - sets the `list` field to Set
6969+ pub struct SetList<S: State = Empty>(PhantomData<fn() -> S>);
7070+ impl<S: State> sealed::Sealed for SetList<S> {}
7171+ impl<S: State> State for SetList<S> {
7272+ type Subject = S::Subject;
7373+ type CreatedAt = S::CreatedAt;
7474+ type List = Set<members::list>;
7575 }
7676 /// Marker types for field names
7777 #[allow(non_camel_case_types)]
7878 pub mod members {
7979 ///Marker type for the `subject` field
8080 pub struct subject(());
8181+ ///Marker type for the `created_at` field
8282+ pub struct created_at(());
8183 ///Marker type for the `list` field
8284 pub struct list(());
8383- ///Marker type for the `created_at` field
8484- pub struct created_at(());
8585 }
8686}
8787···175175where
176176 S: listitem_state::State,
177177 S::Subject: listitem_state::IsSet,
178178- S::List: listitem_state::IsSet,
179178 S::CreatedAt: listitem_state::IsSet,
179179+ S::List: listitem_state::IsSet,
180180{
181181 /// Build the final struct
182182 pub fn build(self) -> Listitem<'a> {
···3434 }
3535 /// State trait tracking which required fields have been set
3636 pub trait State: sealed::Sealed {
3737- type Subscribe;
3837 type CreatedAt;
3838+ type Subscribe;
3939 }
4040 /// Empty state - all required fields are unset
4141 pub struct Empty(());
4242 impl sealed::Sealed for Empty {}
4343 impl State for Empty {
4444- type Subscribe = Unset;
4544 type CreatedAt = Unset;
4646- }
4747- ///State transition - sets the `subscribe` field to Set
4848- pub struct SetSubscribe<S: State = Empty>(PhantomData<fn() -> S>);
4949- impl<S: State> sealed::Sealed for SetSubscribe<S> {}
5050- impl<S: State> State for SetSubscribe<S> {
5151- type Subscribe = Set<members::subscribe>;
5252- type CreatedAt = S::CreatedAt;
4545+ type Subscribe = Unset;
5346 }
5447 ///State transition - sets the `created_at` field to Set
5548 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
5649 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
5750 impl<S: State> State for SetCreatedAt<S> {
5858- type Subscribe = S::Subscribe;
5951 type CreatedAt = Set<members::created_at>;
5252+ type Subscribe = S::Subscribe;
5353+ }
5454+ ///State transition - sets the `subscribe` field to Set
5555+ pub struct SetSubscribe<S: State = Empty>(PhantomData<fn() -> S>);
5656+ impl<S: State> sealed::Sealed for SetSubscribe<S> {}
5757+ impl<S: State> State for SetSubscribe<S> {
5858+ type CreatedAt = S::CreatedAt;
5959+ type Subscribe = Set<members::subscribe>;
6060 }
6161 /// Marker types for field names
6262 #[allow(non_camel_case_types)]
6363 pub mod members {
6464- ///Marker type for the `subscribe` field
6565- pub struct subscribe(());
6664 ///Marker type for the `created_at` field
6765 pub struct created_at(());
6666+ ///Marker type for the `subscribe` field
6767+ pub struct subscribe(());
6868 }
6969}
7070···137137impl<'a, S> SubscribeAcceptBuilder<'a, S>
138138where
139139 S: subscribe_accept_state::State,
140140- S::Subscribe: subscribe_accept_state::IsSet,
141140 S::CreatedAt: subscribe_accept_state::IsSet,
141141+ S::Subscribe: subscribe_accept_state::IsSet,
142142{
143143 /// Build the final struct
144144 pub fn build(self) -> SubscribeAccept<'a> {
+78-78
crates/weaver-api/src/sh_weaver/notebook.rs
···13671367 }
13681368 /// State trait tracking which required fields have been set
13691369 pub trait State: sealed::Sealed {
13701370- type Uri;
13711370 type Cid;
13721371 type Authors;
13731372 type Record;
13741373 type IndexedAt;
13741374+ type Uri;
13751375 }
13761376 /// Empty state - all required fields are unset
13771377 pub struct Empty(());
13781378 impl sealed::Sealed for Empty {}
13791379 impl State for Empty {
13801380- type Uri = Unset;
13811380 type Cid = Unset;
13821381 type Authors = Unset;
13831382 type Record = Unset;
13841383 type IndexedAt = Unset;
13851385- }
13861386- ///State transition - sets the `uri` field to Set
13871387- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
13881388- impl<S: State> sealed::Sealed for SetUri<S> {}
13891389- impl<S: State> State for SetUri<S> {
13901390- type Uri = Set<members::uri>;
13911391- type Cid = S::Cid;
13921392- type Authors = S::Authors;
13931393- type Record = S::Record;
13941394- type IndexedAt = S::IndexedAt;
13841384+ type Uri = Unset;
13951385 }
13961386 ///State transition - sets the `cid` field to Set
13971387 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
13981388 impl<S: State> sealed::Sealed for SetCid<S> {}
13991389 impl<S: State> State for SetCid<S> {
14001400- type Uri = S::Uri;
14011390 type Cid = Set<members::cid>;
14021391 type Authors = S::Authors;
14031392 type Record = S::Record;
14041393 type IndexedAt = S::IndexedAt;
13941394+ type Uri = S::Uri;
14051395 }
14061396 ///State transition - sets the `authors` field to Set
14071397 pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
14081398 impl<S: State> sealed::Sealed for SetAuthors<S> {}
14091399 impl<S: State> State for SetAuthors<S> {
14101410- type Uri = S::Uri;
14111400 type Cid = S::Cid;
14121401 type Authors = Set<members::authors>;
14131402 type Record = S::Record;
14141403 type IndexedAt = S::IndexedAt;
14041404+ type Uri = S::Uri;
14151405 }
14161406 ///State transition - sets the `record` field to Set
14171407 pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
14181408 impl<S: State> sealed::Sealed for SetRecord<S> {}
14191409 impl<S: State> State for SetRecord<S> {
14201420- type Uri = S::Uri;
14211410 type Cid = S::Cid;
14221411 type Authors = S::Authors;
14231412 type Record = Set<members::record>;
14241413 type IndexedAt = S::IndexedAt;
14141414+ type Uri = S::Uri;
14251415 }
14261416 ///State transition - sets the `indexed_at` field to Set
14271417 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
14281418 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
14291419 impl<S: State> State for SetIndexedAt<S> {
14301430- type Uri = S::Uri;
14311420 type Cid = S::Cid;
14321421 type Authors = S::Authors;
14331422 type Record = S::Record;
14341423 type IndexedAt = Set<members::indexed_at>;
14241424+ type Uri = S::Uri;
14251425+ }
14261426+ ///State transition - sets the `uri` field to Set
14271427+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
14281428+ impl<S: State> sealed::Sealed for SetUri<S> {}
14291429+ impl<S: State> State for SetUri<S> {
14301430+ type Cid = S::Cid;
14311431+ type Authors = S::Authors;
14321432+ type Record = S::Record;
14331433+ type IndexedAt = S::IndexedAt;
14341434+ type Uri = Set<members::uri>;
14351435 }
14361436 /// Marker types for field names
14371437 #[allow(non_camel_case_types)]
14381438 pub mod members {
14391439- ///Marker type for the `uri` field
14401440- pub struct uri(());
14411439 ///Marker type for the `cid` field
14421440 pub struct cid(());
14431441 ///Marker type for the `authors` field
···14461444 pub struct record(());
14471445 ///Marker type for the `indexed_at` field
14481446 pub struct indexed_at(());
14471447+ ///Marker type for the `uri` field
14481448+ pub struct uri(());
14491449 }
14501450}
14511451···16891689impl<'a, S> EntryViewBuilder<'a, S>
16901690where
16911691 S: entry_view_state::State,
16921692- S::Uri: entry_view_state::IsSet,
16931692 S::Cid: entry_view_state::IsSet,
16941693 S::Authors: entry_view_state::IsSet,
16951694 S::Record: entry_view_state::IsSet,
16961695 S::IndexedAt: entry_view_state::IsSet,
16961696+ S::Uri: entry_view_state::IsSet,
16971697{
16981698 /// Build the final struct
16991699 pub fn build(self) -> EntryView<'a> {
···17991799 }
18001800 /// State trait tracking which required fields have been set
18011801 pub trait State: sealed::Sealed {
18021802- type Uri;
18021802+ type Record;
18031803 type Cid;
18041804+ type Uri;
18041805 type Authors;
18051805- type Record;
18061806 type IndexedAt;
18071807 }
18081808 /// Empty state - all required fields are unset
18091809 pub struct Empty(());
18101810 impl sealed::Sealed for Empty {}
18111811 impl State for Empty {
18121812- type Uri = Unset;
18121812+ type Record = Unset;
18131813 type Cid = Unset;
18141814+ type Uri = Unset;
18141815 type Authors = Unset;
18151815- type Record = Unset;
18161816 type IndexedAt = Unset;
18171817 }
18181818- ///State transition - sets the `uri` field to Set
18191819- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
18201820- impl<S: State> sealed::Sealed for SetUri<S> {}
18211821- impl<S: State> State for SetUri<S> {
18221822- type Uri = Set<members::uri>;
18181818+ ///State transition - sets the `record` field to Set
18191819+ pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
18201820+ impl<S: State> sealed::Sealed for SetRecord<S> {}
18211821+ impl<S: State> State for SetRecord<S> {
18221822+ type Record = Set<members::record>;
18231823 type Cid = S::Cid;
18241824+ type Uri = S::Uri;
18241825 type Authors = S::Authors;
18251825- type Record = S::Record;
18261826 type IndexedAt = S::IndexedAt;
18271827 }
18281828 ///State transition - sets the `cid` field to Set
18291829 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
18301830 impl<S: State> sealed::Sealed for SetCid<S> {}
18311831 impl<S: State> State for SetCid<S> {
18321832+ type Record = S::Record;
18331833+ type Cid = Set<members::cid>;
18321834 type Uri = S::Uri;
18331833- type Cid = Set<members::cid>;
18341835 type Authors = S::Authors;
18361836+ type IndexedAt = S::IndexedAt;
18371837+ }
18381838+ ///State transition - sets the `uri` field to Set
18391839+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
18401840+ impl<S: State> sealed::Sealed for SetUri<S> {}
18411841+ impl<S: State> State for SetUri<S> {
18351842 type Record = S::Record;
18431843+ type Cid = S::Cid;
18441844+ type Uri = Set<members::uri>;
18451845+ type Authors = S::Authors;
18361846 type IndexedAt = S::IndexedAt;
18371847 }
18381848 ///State transition - sets the `authors` field to Set
18391849 pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
18401850 impl<S: State> sealed::Sealed for SetAuthors<S> {}
18411851 impl<S: State> State for SetAuthors<S> {
18421842- type Uri = S::Uri;
18431843- type Cid = S::Cid;
18441844- type Authors = Set<members::authors>;
18451852 type Record = S::Record;
18461846- type IndexedAt = S::IndexedAt;
18471847- }
18481848- ///State transition - sets the `record` field to Set
18491849- pub struct SetRecord<S: State = Empty>(PhantomData<fn() -> S>);
18501850- impl<S: State> sealed::Sealed for SetRecord<S> {}
18511851- impl<S: State> State for SetRecord<S> {
18531853+ type Cid = S::Cid;
18521854 type Uri = S::Uri;
18531853- type Cid = S::Cid;
18541854- type Authors = S::Authors;
18551855- type Record = Set<members::record>;
18551855+ type Authors = Set<members::authors>;
18561856 type IndexedAt = S::IndexedAt;
18571857 }
18581858 ///State transition - sets the `indexed_at` field to Set
18591859 pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
18601860 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
18611861 impl<S: State> State for SetIndexedAt<S> {
18621862+ type Record = S::Record;
18631863+ type Cid = S::Cid;
18621864 type Uri = S::Uri;
18631863- type Cid = S::Cid;
18641865 type Authors = S::Authors;
18651865- type Record = S::Record;
18661866 type IndexedAt = Set<members::indexed_at>;
18671867 }
18681868 /// Marker types for field names
18691869 #[allow(non_camel_case_types)]
18701870 pub mod members {
18711871+ ///Marker type for the `record` field
18721872+ pub struct record(());
18731873+ ///Marker type for the `cid` field
18741874+ pub struct cid(());
18711875 ///Marker type for the `uri` field
18721876 pub struct uri(());
18731873- ///Marker type for the `cid` field
18741874- pub struct cid(());
18751877 ///Marker type for the `authors` field
18761878 pub struct authors(());
18771877- ///Marker type for the `record` field
18781878- pub struct record(());
18791879 ///Marker type for the `indexed_at` field
18801880 pub struct indexed_at(());
18811881 }
···21002100impl<'a, S> NotebookViewBuilder<'a, S>
21012101where
21022102 S: notebook_view_state::State,
21032103- S::Uri: notebook_view_state::IsSet,
21032103+ S::Record: notebook_view_state::IsSet,
21042104 S::Cid: notebook_view_state::IsSet,
21052105+ S::Uri: notebook_view_state::IsSet,
21052106 S::Authors: notebook_view_state::IsSet,
21062106- S::Record: notebook_view_state::IsSet,
21072107 S::IndexedAt: notebook_view_state::IsSet,
21082108{
21092109 /// Build the final struct
···21982198 }
21992199 /// State trait tracking which required fields have been set
22002200 pub trait State: sealed::Sealed {
22012201- type Did;
22012201+ type GrantedAt;
22022202 type Scope;
22032203+ type Did;
22032204 type Source;
22042204- type GrantedAt;
22052205 }
22062206 /// Empty state - all required fields are unset
22072207 pub struct Empty(());
22082208 impl sealed::Sealed for Empty {}
22092209 impl State for Empty {
22102210- type Did = Unset;
22102210+ type GrantedAt = Unset;
22112211 type Scope = Unset;
22122212+ type Did = Unset;
22122213 type Source = Unset;
22132213- type GrantedAt = Unset;
22142214 }
22152215- ///State transition - sets the `did` field to Set
22162216- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
22172217- impl<S: State> sealed::Sealed for SetDid<S> {}
22182218- impl<S: State> State for SetDid<S> {
22192219- type Did = Set<members::did>;
22152215+ ///State transition - sets the `granted_at` field to Set
22162216+ pub struct SetGrantedAt<S: State = Empty>(PhantomData<fn() -> S>);
22172217+ impl<S: State> sealed::Sealed for SetGrantedAt<S> {}
22182218+ impl<S: State> State for SetGrantedAt<S> {
22192219+ type GrantedAt = Set<members::granted_at>;
22202220 type Scope = S::Scope;
22212221+ type Did = S::Did;
22212222 type Source = S::Source;
22222222- type GrantedAt = S::GrantedAt;
22232223 }
22242224 ///State transition - sets the `scope` field to Set
22252225 pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
22262226 impl<S: State> sealed::Sealed for SetScope<S> {}
22272227 impl<S: State> State for SetScope<S> {
22282228+ type GrantedAt = S::GrantedAt;
22292229+ type Scope = Set<members::scope>;
22282230 type Did = S::Did;
22292229- type Scope = Set<members::scope>;
22302231 type Source = S::Source;
22322232+ }
22332233+ ///State transition - sets the `did` field to Set
22342234+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
22352235+ impl<S: State> sealed::Sealed for SetDid<S> {}
22362236+ impl<S: State> State for SetDid<S> {
22312237 type GrantedAt = S::GrantedAt;
22382238+ type Scope = S::Scope;
22392239+ type Did = Set<members::did>;
22402240+ type Source = S::Source;
22322241 }
22332242 ///State transition - sets the `source` field to Set
22342243 pub struct SetSource<S: State = Empty>(PhantomData<fn() -> S>);
22352244 impl<S: State> sealed::Sealed for SetSource<S> {}
22362245 impl<S: State> State for SetSource<S> {
22372237- type Did = S::Did;
22462246+ type GrantedAt = S::GrantedAt;
22382247 type Scope = S::Scope;
22482248+ type Did = S::Did;
22392249 type Source = Set<members::source>;
22402240- type GrantedAt = S::GrantedAt;
22412241- }
22422242- ///State transition - sets the `granted_at` field to Set
22432243- pub struct SetGrantedAt<S: State = Empty>(PhantomData<fn() -> S>);
22442244- impl<S: State> sealed::Sealed for SetGrantedAt<S> {}
22452245- impl<S: State> State for SetGrantedAt<S> {
22462246- type Did = S::Did;
22472247- type Scope = S::Scope;
22482248- type Source = S::Source;
22492249- type GrantedAt = Set<members::granted_at>;
22502250 }
22512251 /// Marker types for field names
22522252 #[allow(non_camel_case_types)]
22532253 pub mod members {
22542254- ///Marker type for the `did` field
22552255- pub struct did(());
22542254+ ///Marker type for the `granted_at` field
22552255+ pub struct granted_at(());
22562256 ///Marker type for the `scope` field
22572257 pub struct scope(());
22582258+ ///Marker type for the `did` field
22592259+ pub struct did(());
22582260 ///Marker type for the `source` field
22592261 pub struct source(());
22602260- ///Marker type for the `granted_at` field
22612261- pub struct granted_at(());
22622262 }
22632263}
22642264···23712371impl<'a, S> PermissionGrantBuilder<'a, S>
23722372where
23732373 S: permission_grant_state::State,
23742374- S::Did: permission_grant_state::IsSet,
23742374+ S::GrantedAt: permission_grant_state::IsSet,
23752375 S::Scope: permission_grant_state::IsSet,
23762376+ S::Did: permission_grant_state::IsSet,
23762377 S::Source: permission_grant_state::IsSet,
23772377- S::GrantedAt: permission_grant_state::IsSet,
23782378{
23792379 /// Build the final struct
23802380 pub fn build(self) -> PermissionGrant<'a> {
+13-13
crates/weaver-api/src/sh_weaver/notebook/book.rs
···5252 }
5353 /// State trait tracking which required fields have been set
5454 pub trait State: sealed::Sealed {
5555- type Authors;
5655 type EntryList;
5656+ type Authors;
5757 }
5858 /// Empty state - all required fields are unset
5959 pub struct Empty(());
6060 impl sealed::Sealed for Empty {}
6161 impl State for Empty {
6262- type Authors = Unset;
6362 type EntryList = Unset;
6464- }
6565- ///State transition - sets the `authors` field to Set
6666- pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
6767- impl<S: State> sealed::Sealed for SetAuthors<S> {}
6868- impl<S: State> State for SetAuthors<S> {
6969- type Authors = Set<members::authors>;
7070- type EntryList = S::EntryList;
6363+ type Authors = Unset;
7164 }
7265 ///State transition - sets the `entry_list` field to Set
7366 pub struct SetEntryList<S: State = Empty>(PhantomData<fn() -> S>);
7467 impl<S: State> sealed::Sealed for SetEntryList<S> {}
7568 impl<S: State> State for SetEntryList<S> {
7676- type Authors = S::Authors;
7769 type EntryList = Set<members::entry_list>;
7070+ type Authors = S::Authors;
7171+ }
7272+ ///State transition - sets the `authors` field to Set
7373+ pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
7474+ impl<S: State> sealed::Sealed for SetAuthors<S> {}
7575+ impl<S: State> State for SetAuthors<S> {
7676+ type EntryList = S::EntryList;
7777+ type Authors = Set<members::authors>;
7878 }
7979 /// Marker types for field names
8080 #[allow(non_camel_case_types)]
8181 pub mod members {
8282- ///Marker type for the `authors` field
8383- pub struct authors(());
8482 ///Marker type for the `entry_list` field
8583 pub struct entry_list(());
8484+ ///Marker type for the `authors` field
8585+ pub struct authors(());
8686 }
8787}
8888···275275impl<'a, S> BookBuilder<'a, S>
276276where
277277 S: book_state::State,
278278- S::Authors: book_state::IsSet,
279278 S::EntryList: book_state::IsSet,
279279+ S::Authors: book_state::IsSet,
280280{
281281 /// Build the final struct
282282 pub fn build(self) -> Book<'a> {
···3838 }
3939 /// State trait tracking which required fields have been set
4040 pub trait State: sealed::Sealed {
4141- type Name;
4241 type Variant;
4342 type Colours;
4343+ type Name;
4444 }
4545 /// Empty state - all required fields are unset
4646 pub struct Empty(());
4747 impl sealed::Sealed for Empty {}
4848 impl State for Empty {
4949- type Name = Unset;
5049 type Variant = Unset;
5150 type Colours = Unset;
5252- }
5353- ///State transition - sets the `name` field to Set
5454- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5555- impl<S: State> sealed::Sealed for SetName<S> {}
5656- impl<S: State> State for SetName<S> {
5757- type Name = Set<members::name>;
5858- type Variant = S::Variant;
5959- type Colours = S::Colours;
5151+ type Name = Unset;
6052 }
6153 ///State transition - sets the `variant` field to Set
6254 pub struct SetVariant<S: State = Empty>(PhantomData<fn() -> S>);
6355 impl<S: State> sealed::Sealed for SetVariant<S> {}
6456 impl<S: State> State for SetVariant<S> {
6565- type Name = S::Name;
6657 type Variant = Set<members::variant>;
6758 type Colours = S::Colours;
5959+ type Name = S::Name;
6860 }
6961 ///State transition - sets the `colours` field to Set
7062 pub struct SetColours<S: State = Empty>(PhantomData<fn() -> S>);
7163 impl<S: State> sealed::Sealed for SetColours<S> {}
7264 impl<S: State> State for SetColours<S> {
7373- type Name = S::Name;
7465 type Variant = S::Variant;
7566 type Colours = Set<members::colours>;
6767+ type Name = S::Name;
6868+ }
6969+ ///State transition - sets the `name` field to Set
7070+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
7171+ impl<S: State> sealed::Sealed for SetName<S> {}
7272+ impl<S: State> State for SetName<S> {
7373+ type Variant = S::Variant;
7474+ type Colours = S::Colours;
7575+ type Name = Set<members::name>;
7676 }
7777 /// Marker types for field names
7878 #[allow(non_camel_case_types)]
7979 pub mod members {
8080- ///Marker type for the `name` field
8181- pub struct name(());
8280 ///Marker type for the `variant` field
8381 pub struct variant(());
8482 ///Marker type for the `colours` field
8583 pub struct colours(());
8484+ ///Marker type for the `name` field
8585+ pub struct name(());
8686 }
8787}
8888···175175impl<'a, S> ColourSchemeBuilder<'a, S>
176176where
177177 S: colour_scheme_state::State,
178178- S::Name: colour_scheme_state::IsSet,
179178 S::Variant: colour_scheme_state::IsSet,
180179 S::Colours: colour_scheme_state::IsSet,
180180+ S::Name: colour_scheme_state::IsSet,
181181{
182182 /// Build the final struct
183183 pub fn build(self) -> ColourScheme<'a> {
+26-26
crates/weaver-api/src/sh_weaver/notebook/entry.rs
···5353 /// State trait tracking which required fields have been set
5454 pub trait State: sealed::Sealed {
5555 type Content;
5656- type Title;
5757- type Path;
5856 type CreatedAt;
5757+ type Path;
5858+ type Title;
5959 }
6060 /// Empty state - all required fields are unset
6161 pub struct Empty(());
6262 impl sealed::Sealed for Empty {}
6363 impl State for Empty {
6464 type Content = Unset;
6565- type Title = Unset;
6666- type Path = Unset;
6765 type CreatedAt = Unset;
6666+ type Path = Unset;
6767+ type Title = Unset;
6868 }
6969 ///State transition - sets the `content` field to Set
7070 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
7171 impl<S: State> sealed::Sealed for SetContent<S> {}
7272 impl<S: State> State for SetContent<S> {
7373 type Content = Set<members::content>;
7474- type Title = S::Title;
7575- type Path = S::Path;
7674 type CreatedAt = S::CreatedAt;
7575+ type Path = S::Path;
7676+ type Title = S::Title;
7777 }
7878- ///State transition - sets the `title` field to Set
7979- pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
8080- impl<S: State> sealed::Sealed for SetTitle<S> {}
8181- impl<S: State> State for SetTitle<S> {
7878+ ///State transition - sets the `created_at` field to Set
7979+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
8080+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
8181+ impl<S: State> State for SetCreatedAt<S> {
8282 type Content = S::Content;
8383- type Title = Set<members::title>;
8383+ type CreatedAt = Set<members::created_at>;
8484 type Path = S::Path;
8585- type CreatedAt = S::CreatedAt;
8585+ type Title = S::Title;
8686 }
8787 ///State transition - sets the `path` field to Set
8888 pub struct SetPath<S: State = Empty>(PhantomData<fn() -> S>);
8989 impl<S: State> sealed::Sealed for SetPath<S> {}
9090 impl<S: State> State for SetPath<S> {
9191 type Content = S::Content;
9292- type Title = S::Title;
9292+ type CreatedAt = S::CreatedAt;
9393 type Path = Set<members::path>;
9494- type CreatedAt = S::CreatedAt;
9494+ type Title = S::Title;
9595 }
9696- ///State transition - sets the `created_at` field to Set
9797- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
9898- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
9999- impl<S: State> State for SetCreatedAt<S> {
9696+ ///State transition - sets the `title` field to Set
9797+ pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
9898+ impl<S: State> sealed::Sealed for SetTitle<S> {}
9999+ impl<S: State> State for SetTitle<S> {
100100 type Content = S::Content;
101101- type Title = S::Title;
101101+ type CreatedAt = S::CreatedAt;
102102 type Path = S::Path;
103103- type CreatedAt = Set<members::created_at>;
103103+ type Title = Set<members::title>;
104104 }
105105 /// Marker types for field names
106106 #[allow(non_camel_case_types)]
107107 pub mod members {
108108 ///Marker type for the `content` field
109109 pub struct content(());
110110- ///Marker type for the `title` field
111111- pub struct title(());
112112- ///Marker type for the `path` field
113113- pub struct path(());
114110 ///Marker type for the `created_at` field
115111 pub struct created_at(());
112112+ ///Marker type for the `path` field
113113+ pub struct path(());
114114+ ///Marker type for the `title` field
115115+ pub struct title(());
116116 }
117117}
118118···300300where
301301 S: entry_state::State,
302302 S::Content: entry_state::IsSet,
303303- S::Title: entry_state::IsSet,
304304- S::Path: entry_state::IsSet,
305303 S::CreatedAt: entry_state::IsSet,
304304+ S::Path: entry_state::IsSet,
305305+ S::Title: entry_state::IsSet,
306306{
307307 /// Build the final struct
308308 pub fn build(self) -> Entry<'a> {
···3232 }
3333 /// State trait tracking which required fields have been set
3434 pub trait State: sealed::Sealed {
3535- type Actor;
3635 type Title;
3636+ type Actor;
3737 }
3838 /// Empty state - all required fields are unset
3939 pub struct Empty(());
4040 impl sealed::Sealed for Empty {}
4141 impl State for Empty {
4242- type Actor = Unset;
4342 type Title = Unset;
4444- }
4545- ///State transition - sets the `actor` field to Set
4646- pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
4747- impl<S: State> sealed::Sealed for SetActor<S> {}
4848- impl<S: State> State for SetActor<S> {
4949- type Actor = Set<members::actor>;
5050- type Title = S::Title;
4343+ type Actor = Unset;
5144 }
5245 ///State transition - sets the `title` field to Set
5346 pub struct SetTitle<S: State = Empty>(PhantomData<fn() -> S>);
5447 impl<S: State> sealed::Sealed for SetTitle<S> {}
5548 impl<S: State> State for SetTitle<S> {
5656- type Actor = S::Actor;
5749 type Title = Set<members::title>;
5050+ type Actor = S::Actor;
5151+ }
5252+ ///State transition - sets the `actor` field to Set
5353+ pub struct SetActor<S: State = Empty>(PhantomData<fn() -> S>);
5454+ impl<S: State> sealed::Sealed for SetActor<S> {}
5555+ impl<S: State> State for SetActor<S> {
5656+ type Title = S::Title;
5757+ type Actor = Set<members::actor>;
5858 }
5959 /// Marker types for field names
6060 #[allow(non_camel_case_types)]
6161 pub mod members {
6262- ///Marker type for the `actor` field
6363- pub struct actor(());
6462 ///Marker type for the `title` field
6563 pub struct title(());
6464+ ///Marker type for the `actor` field
6565+ pub struct actor(());
6666 }
6767}
6868···135135impl<'a, S> GetNotebookByTitleBuilder<'a, S>
136136where
137137 S: get_notebook_by_title_state::State,
138138- S::Actor: get_notebook_by_title_state::IsSet,
139138 S::Title: get_notebook_by_title_state::IsSet,
139139+ S::Actor: get_notebook_by_title_state::IsSet,
140140{
141141 /// Build the final struct
142142 pub fn build(self) -> GetNotebookByTitle<'a> {
+15-15
crates/weaver-api/src/sh_weaver/notebook/page.rs
···4444 }
4545 /// State trait tracking which required fields have been set
4646 pub trait State: sealed::Sealed {
4747- type Notebook;
4847 type Authors;
4948 type EntryList;
4949+ type Notebook;
5050 }
5151 /// Empty state - all required fields are unset
5252 pub struct Empty(());
5353 impl sealed::Sealed for Empty {}
5454 impl State for Empty {
5555- type Notebook = Unset;
5655 type Authors = Unset;
5756 type EntryList = Unset;
5858- }
5959- ///State transition - sets the `notebook` field to Set
6060- pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
6161- impl<S: State> sealed::Sealed for SetNotebook<S> {}
6262- impl<S: State> State for SetNotebook<S> {
6363- type Notebook = Set<members::notebook>;
6464- type Authors = S::Authors;
6565- type EntryList = S::EntryList;
5757+ type Notebook = Unset;
6658 }
6759 ///State transition - sets the `authors` field to Set
6860 pub struct SetAuthors<S: State = Empty>(PhantomData<fn() -> S>);
6961 impl<S: State> sealed::Sealed for SetAuthors<S> {}
7062 impl<S: State> State for SetAuthors<S> {
7171- type Notebook = S::Notebook;
7263 type Authors = Set<members::authors>;
7364 type EntryList = S::EntryList;
6565+ type Notebook = S::Notebook;
7466 }
7567 ///State transition - sets the `entry_list` field to Set
7668 pub struct SetEntryList<S: State = Empty>(PhantomData<fn() -> S>);
7769 impl<S: State> sealed::Sealed for SetEntryList<S> {}
7870 impl<S: State> State for SetEntryList<S> {
7979- type Notebook = S::Notebook;
8071 type Authors = S::Authors;
8172 type EntryList = Set<members::entry_list>;
7373+ type Notebook = S::Notebook;
7474+ }
7575+ ///State transition - sets the `notebook` field to Set
7676+ pub struct SetNotebook<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetNotebook<S> {}
7878+ impl<S: State> State for SetNotebook<S> {
7979+ type Authors = S::Authors;
8080+ type EntryList = S::EntryList;
8181+ type Notebook = Set<members::notebook>;
8282 }
8383 /// Marker types for field names
8484 #[allow(non_camel_case_types)]
8585 pub mod members {
8686- ///Marker type for the `notebook` field
8787- pub struct notebook(());
8886 ///Marker type for the `authors` field
8987 pub struct authors(());
9088 ///Marker type for the `entry_list` field
9189 pub struct entry_list(());
9090+ ///Marker type for the `notebook` field
9191+ pub struct notebook(());
9292 }
9393}
9494···221221impl<'a, S> PageBuilder<'a, S>
222222where
223223 S: page_state::State,
224224- S::Notebook: page_state::IsSet,
225224 S::Authors: page_state::IsSet,
226225 S::EntryList: page_state::IsSet,
226226+ S::Notebook: page_state::IsSet,
227227{
228228 /// Build the final struct
229229 pub fn build(self) -> Page<'a> {
+62-62
crates/weaver-api/src/sh_weaver/notebook/theme.rs
···3636 }
3737 /// State trait tracking which required fields have been set
3838 pub trait State: sealed::Sealed {
3939- type Name;
4039 type Did;
4140 type Content;
4141+ type Name;
4242 }
4343 /// Empty state - all required fields are unset
4444 pub struct Empty(());
4545 impl sealed::Sealed for Empty {}
4646 impl State for Empty {
4747- type Name = Unset;
4847 type Did = Unset;
4948 type Content = Unset;
5050- }
5151- ///State transition - sets the `name` field to Set
5252- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5353- impl<S: State> sealed::Sealed for SetName<S> {}
5454- impl<S: State> State for SetName<S> {
5555- type Name = Set<members::name>;
5656- type Did = S::Did;
5757- type Content = S::Content;
4949+ type Name = Unset;
5850 }
5951 ///State transition - sets the `did` field to Set
6052 pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
6153 impl<S: State> sealed::Sealed for SetDid<S> {}
6254 impl<S: State> State for SetDid<S> {
6363- type Name = S::Name;
6455 type Did = Set<members::did>;
6556 type Content = S::Content;
5757+ type Name = S::Name;
6658 }
6759 ///State transition - sets the `content` field to Set
6860 pub struct SetContent<S: State = Empty>(PhantomData<fn() -> S>);
6961 impl<S: State> sealed::Sealed for SetContent<S> {}
7062 impl<S: State> State for SetContent<S> {
7171- type Name = S::Name;
7263 type Did = S::Did;
7364 type Content = Set<members::content>;
6565+ type Name = S::Name;
6666+ }
6767+ ///State transition - sets the `name` field to Set
6868+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
6969+ impl<S: State> sealed::Sealed for SetName<S> {}
7070+ impl<S: State> State for SetName<S> {
7171+ type Did = S::Did;
7272+ type Content = S::Content;
7373+ type Name = Set<members::name>;
7474 }
7575 /// Marker types for field names
7676 #[allow(non_camel_case_types)]
7777 pub mod members {
7878- ///Marker type for the `name` field
7979- pub struct name(());
8078 ///Marker type for the `did` field
8179 pub struct did(());
8280 ///Marker type for the `content` field
8381 pub struct content(());
8282+ ///Marker type for the `name` field
8383+ pub struct name(());
8484 }
8585}
8686···173173impl<'a, S> CodeThemeFileBuilder<'a, S>
174174where
175175 S: code_theme_file_state::State,
176176- S::Name: code_theme_file_state::IsSet,
177176 S::Did: code_theme_file_state::IsSet,
178177 S::Content: code_theme_file_state::IsSet,
178178+ S::Name: code_theme_file_state::IsSet,
179179{
180180 /// Build the final struct
181181 pub fn build(self) -> CodeThemeFile<'a> {
···10671067 }
10681068 /// State trait tracking which required fields have been set
10691069 pub trait State: sealed::Sealed {
10701070- type DarkScheme;
10711071- type LightScheme;
10721070 type Fonts;
10711071+ type LightCodeTheme;
10721072+ type LightScheme;
10731073 type Spacing;
10741074 type DarkCodeTheme;
10751075- type LightCodeTheme;
10751075+ type DarkScheme;
10761076 }
10771077 /// Empty state - all required fields are unset
10781078 pub struct Empty(());
10791079 impl sealed::Sealed for Empty {}
10801080 impl State for Empty {
10811081- type DarkScheme = Unset;
10811081+ type Fonts = Unset;
10821082+ type LightCodeTheme = Unset;
10821083 type LightScheme = Unset;
10831083- type Fonts = Unset;
10841084 type Spacing = Unset;
10851085 type DarkCodeTheme = Unset;
10861086- type LightCodeTheme = Unset;
10861086+ type DarkScheme = Unset;
10871087 }
10881088- ///State transition - sets the `dark_scheme` field to Set
10891089- pub struct SetDarkScheme<S: State = Empty>(PhantomData<fn() -> S>);
10901090- impl<S: State> sealed::Sealed for SetDarkScheme<S> {}
10911091- impl<S: State> State for SetDarkScheme<S> {
10921092- type DarkScheme = Set<members::dark_scheme>;
10881088+ ///State transition - sets the `fonts` field to Set
10891089+ pub struct SetFonts<S: State = Empty>(PhantomData<fn() -> S>);
10901090+ impl<S: State> sealed::Sealed for SetFonts<S> {}
10911091+ impl<S: State> State for SetFonts<S> {
10921092+ type Fonts = Set<members::fonts>;
10931093+ type LightCodeTheme = S::LightCodeTheme;
10931094 type LightScheme = S::LightScheme;
10951095+ type Spacing = S::Spacing;
10961096+ type DarkCodeTheme = S::DarkCodeTheme;
10971097+ type DarkScheme = S::DarkScheme;
10981098+ }
10991099+ ///State transition - sets the `light_code_theme` field to Set
11001100+ pub struct SetLightCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11011101+ impl<S: State> sealed::Sealed for SetLightCodeTheme<S> {}
11021102+ impl<S: State> State for SetLightCodeTheme<S> {
10941103 type Fonts = S::Fonts;
11041104+ type LightCodeTheme = Set<members::light_code_theme>;
11051105+ type LightScheme = S::LightScheme;
10951106 type Spacing = S::Spacing;
10961107 type DarkCodeTheme = S::DarkCodeTheme;
10971097- type LightCodeTheme = S::LightCodeTheme;
11081108+ type DarkScheme = S::DarkScheme;
10981109 }
10991110 ///State transition - sets the `light_scheme` field to Set
11001111 pub struct SetLightScheme<S: State = Empty>(PhantomData<fn() -> S>);
11011112 impl<S: State> sealed::Sealed for SetLightScheme<S> {}
11021113 impl<S: State> State for SetLightScheme<S> {
11031103- type DarkScheme = S::DarkScheme;
11041104- type LightScheme = Set<members::light_scheme>;
11051114 type Fonts = S::Fonts;
11061106- type Spacing = S::Spacing;
11071107- type DarkCodeTheme = S::DarkCodeTheme;
11081115 type LightCodeTheme = S::LightCodeTheme;
11091109- }
11101110- ///State transition - sets the `fonts` field to Set
11111111- pub struct SetFonts<S: State = Empty>(PhantomData<fn() -> S>);
11121112- impl<S: State> sealed::Sealed for SetFonts<S> {}
11131113- impl<S: State> State for SetFonts<S> {
11141114- type DarkScheme = S::DarkScheme;
11151115- type LightScheme = S::LightScheme;
11161116- type Fonts = Set<members::fonts>;
11161116+ type LightScheme = Set<members::light_scheme>;
11171117 type Spacing = S::Spacing;
11181118 type DarkCodeTheme = S::DarkCodeTheme;
11191119- type LightCodeTheme = S::LightCodeTheme;
11191119+ type DarkScheme = S::DarkScheme;
11201120 }
11211121 ///State transition - sets the `spacing` field to Set
11221122 pub struct SetSpacing<S: State = Empty>(PhantomData<fn() -> S>);
11231123 impl<S: State> sealed::Sealed for SetSpacing<S> {}
11241124 impl<S: State> State for SetSpacing<S> {
11251125- type DarkScheme = S::DarkScheme;
11251125+ type Fonts = S::Fonts;
11261126+ type LightCodeTheme = S::LightCodeTheme;
11261127 type LightScheme = S::LightScheme;
11271127- type Fonts = S::Fonts;
11281128 type Spacing = Set<members::spacing>;
11291129 type DarkCodeTheme = S::DarkCodeTheme;
11301130- type LightCodeTheme = S::LightCodeTheme;
11301130+ type DarkScheme = S::DarkScheme;
11311131 }
11321132 ///State transition - sets the `dark_code_theme` field to Set
11331133 pub struct SetDarkCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11341134 impl<S: State> sealed::Sealed for SetDarkCodeTheme<S> {}
11351135 impl<S: State> State for SetDarkCodeTheme<S> {
11361136- type DarkScheme = S::DarkScheme;
11371137- type LightScheme = S::LightScheme;
11381136 type Fonts = S::Fonts;
11371137+ type LightCodeTheme = S::LightCodeTheme;
11381138+ type LightScheme = S::LightScheme;
11391139 type Spacing = S::Spacing;
11401140 type DarkCodeTheme = Set<members::dark_code_theme>;
11411141- type LightCodeTheme = S::LightCodeTheme;
11421142- }
11431143- ///State transition - sets the `light_code_theme` field to Set
11441144- pub struct SetLightCodeTheme<S: State = Empty>(PhantomData<fn() -> S>);
11451145- impl<S: State> sealed::Sealed for SetLightCodeTheme<S> {}
11461146- impl<S: State> State for SetLightCodeTheme<S> {
11471141 type DarkScheme = S::DarkScheme;
11421142+ }
11431143+ ///State transition - sets the `dark_scheme` field to Set
11441144+ pub struct SetDarkScheme<S: State = Empty>(PhantomData<fn() -> S>);
11451145+ impl<S: State> sealed::Sealed for SetDarkScheme<S> {}
11461146+ impl<S: State> State for SetDarkScheme<S> {
11471147+ type Fonts = S::Fonts;
11481148+ type LightCodeTheme = S::LightCodeTheme;
11481149 type LightScheme = S::LightScheme;
11491149- type Fonts = S::Fonts;
11501150 type Spacing = S::Spacing;
11511151 type DarkCodeTheme = S::DarkCodeTheme;
11521152- type LightCodeTheme = Set<members::light_code_theme>;
11521152+ type DarkScheme = Set<members::dark_scheme>;
11531153 }
11541154 /// Marker types for field names
11551155 #[allow(non_camel_case_types)]
11561156 pub mod members {
11571157- ///Marker type for the `dark_scheme` field
11581158- pub struct dark_scheme(());
11571157+ ///Marker type for the `fonts` field
11581158+ pub struct fonts(());
11591159+ ///Marker type for the `light_code_theme` field
11601160+ pub struct light_code_theme(());
11591161 ///Marker type for the `light_scheme` field
11601162 pub struct light_scheme(());
11611161- ///Marker type for the `fonts` field
11621162- pub struct fonts(());
11631163 ///Marker type for the `spacing` field
11641164 pub struct spacing(());
11651165 ///Marker type for the `dark_code_theme` field
11661166 pub struct dark_code_theme(());
11671167- ///Marker type for the `light_code_theme` field
11681168- pub struct light_code_theme(());
11671167+ ///Marker type for the `dark_scheme` field
11681168+ pub struct dark_scheme(());
11691169 }
11701170}
11711171···13381338impl<'a, S> ThemeBuilder<'a, S>
13391339where
13401340 S: theme_state::State,
13411341- S::DarkScheme: theme_state::IsSet,
13421342- S::LightScheme: theme_state::IsSet,
13431341 S::Fonts: theme_state::IsSet,
13421342+ S::LightCodeTheme: theme_state::IsSet,
13431343+ S::LightScheme: theme_state::IsSet,
13441344 S::Spacing: theme_state::IsSet,
13451345 S::DarkCodeTheme: theme_state::IsSet,
13461346- S::LightCodeTheme: theme_state::IsSet,
13461346+ S::DarkScheme: theme_state::IsSet,
13471347{
13481348 /// Build the final struct
13491349 pub fn build(self) -> Theme<'a> {
···5555 }
5656 /// State trait tracking which required fields have been set
5757 pub trait State: sealed::Sealed {
5858- type Id;
5959- type Name;
6058 type ContentMarkdown;
5959+ type Id;
6160 type Disabled;
6262- type LastUpdatedBy;
6361 type CreatedAt;
6462 type UpdatedAt;
6363+ type Name;
6464+ type LastUpdatedBy;
6565 }
6666 /// Empty state - all required fields are unset
6767 pub struct Empty(());
6868 impl sealed::Sealed for Empty {}
6969 impl State for Empty {
7070- type Id = Unset;
7171- type Name = Unset;
7270 type ContentMarkdown = Unset;
7171+ type Id = Unset;
7372 type Disabled = Unset;
7474- type LastUpdatedBy = Unset;
7573 type CreatedAt = Unset;
7674 type UpdatedAt = Unset;
7575+ type Name = Unset;
7676+ type LastUpdatedBy = Unset;
7777+ }
7878+ ///State transition - sets the `content_markdown` field to Set
7979+ pub struct SetContentMarkdown<S: State = Empty>(PhantomData<fn() -> S>);
8080+ impl<S: State> sealed::Sealed for SetContentMarkdown<S> {}
8181+ impl<S: State> State for SetContentMarkdown<S> {
8282+ type ContentMarkdown = Set<members::content_markdown>;
8383+ type Id = S::Id;
8484+ type Disabled = S::Disabled;
8585+ type CreatedAt = S::CreatedAt;
8686+ type UpdatedAt = S::UpdatedAt;
8787+ type Name = S::Name;
8888+ type LastUpdatedBy = S::LastUpdatedBy;
7789 }
7890 ///State transition - sets the `id` field to Set
7991 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
8092 impl<S: State> sealed::Sealed for SetId<S> {}
8193 impl<S: State> State for SetId<S> {
9494+ type ContentMarkdown = S::ContentMarkdown;
8295 type Id = Set<members::id>;
8383- type Name = S::Name;
8484- type ContentMarkdown = S::ContentMarkdown;
8596 type Disabled = S::Disabled;
8686- type LastUpdatedBy = S::LastUpdatedBy;
8797 type CreatedAt = S::CreatedAt;
8898 type UpdatedAt = S::UpdatedAt;
8989- }
9090- ///State transition - sets the `name` field to Set
9191- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
9292- impl<S: State> sealed::Sealed for SetName<S> {}
9393- impl<S: State> State for SetName<S> {
9494- type Id = S::Id;
9595- type Name = Set<members::name>;
9696- type ContentMarkdown = S::ContentMarkdown;
9797- type Disabled = S::Disabled;
9898- type LastUpdatedBy = S::LastUpdatedBy;
9999- type CreatedAt = S::CreatedAt;
100100- type UpdatedAt = S::UpdatedAt;
101101- }
102102- ///State transition - sets the `content_markdown` field to Set
103103- pub struct SetContentMarkdown<S: State = Empty>(PhantomData<fn() -> S>);
104104- impl<S: State> sealed::Sealed for SetContentMarkdown<S> {}
105105- impl<S: State> State for SetContentMarkdown<S> {
106106- type Id = S::Id;
10799 type Name = S::Name;
108108- type ContentMarkdown = Set<members::content_markdown>;
109109- type Disabled = S::Disabled;
110100 type LastUpdatedBy = S::LastUpdatedBy;
111111- type CreatedAt = S::CreatedAt;
112112- type UpdatedAt = S::UpdatedAt;
113101 }
114102 ///State transition - sets the `disabled` field to Set
115103 pub struct SetDisabled<S: State = Empty>(PhantomData<fn() -> S>);
116104 impl<S: State> sealed::Sealed for SetDisabled<S> {}
117105 impl<S: State> State for SetDisabled<S> {
118118- type Id = S::Id;
119119- type Name = S::Name;
120106 type ContentMarkdown = S::ContentMarkdown;
107107+ type Id = S::Id;
121108 type Disabled = Set<members::disabled>;
122122- type LastUpdatedBy = S::LastUpdatedBy;
123109 type CreatedAt = S::CreatedAt;
124110 type UpdatedAt = S::UpdatedAt;
125125- }
126126- ///State transition - sets the `last_updated_by` field to Set
127127- pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
128128- impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
129129- impl<S: State> State for SetLastUpdatedBy<S> {
130130- type Id = S::Id;
131111 type Name = S::Name;
132132- type ContentMarkdown = S::ContentMarkdown;
133133- type Disabled = S::Disabled;
134134- type LastUpdatedBy = Set<members::last_updated_by>;
135135- type CreatedAt = S::CreatedAt;
136136- type UpdatedAt = S::UpdatedAt;
112112+ type LastUpdatedBy = S::LastUpdatedBy;
137113 }
138114 ///State transition - sets the `created_at` field to Set
139115 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
140116 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
141117 impl<S: State> State for SetCreatedAt<S> {
118118+ type ContentMarkdown = S::ContentMarkdown;
142119 type Id = S::Id;
143143- type Name = S::Name;
144144- type ContentMarkdown = S::ContentMarkdown;
145120 type Disabled = S::Disabled;
146146- type LastUpdatedBy = S::LastUpdatedBy;
147121 type CreatedAt = Set<members::created_at>;
148122 type UpdatedAt = S::UpdatedAt;
123123+ type Name = S::Name;
124124+ type LastUpdatedBy = S::LastUpdatedBy;
149125 }
150126 ///State transition - sets the `updated_at` field to Set
151127 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
152128 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
153129 impl<S: State> State for SetUpdatedAt<S> {
130130+ type ContentMarkdown = S::ContentMarkdown;
154131 type Id = S::Id;
132132+ type Disabled = S::Disabled;
133133+ type CreatedAt = S::CreatedAt;
134134+ type UpdatedAt = Set<members::updated_at>;
155135 type Name = S::Name;
136136+ type LastUpdatedBy = S::LastUpdatedBy;
137137+ }
138138+ ///State transition - sets the `name` field to Set
139139+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
140140+ impl<S: State> sealed::Sealed for SetName<S> {}
141141+ impl<S: State> State for SetName<S> {
156142 type ContentMarkdown = S::ContentMarkdown;
143143+ type Id = S::Id;
157144 type Disabled = S::Disabled;
145145+ type CreatedAt = S::CreatedAt;
146146+ type UpdatedAt = S::UpdatedAt;
147147+ type Name = Set<members::name>;
158148 type LastUpdatedBy = S::LastUpdatedBy;
149149+ }
150150+ ///State transition - sets the `last_updated_by` field to Set
151151+ pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
152152+ impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
153153+ impl<S: State> State for SetLastUpdatedBy<S> {
154154+ type ContentMarkdown = S::ContentMarkdown;
155155+ type Id = S::Id;
156156+ type Disabled = S::Disabled;
159157 type CreatedAt = S::CreatedAt;
160160- type UpdatedAt = Set<members::updated_at>;
158158+ type UpdatedAt = S::UpdatedAt;
159159+ type Name = S::Name;
160160+ type LastUpdatedBy = Set<members::last_updated_by>;
161161 }
162162 /// Marker types for field names
163163 #[allow(non_camel_case_types)]
164164 pub mod members {
165165+ ///Marker type for the `content_markdown` field
166166+ pub struct content_markdown(());
165167 ///Marker type for the `id` field
166168 pub struct id(());
167167- ///Marker type for the `name` field
168168- pub struct name(());
169169- ///Marker type for the `content_markdown` field
170170- pub struct content_markdown(());
171169 ///Marker type for the `disabled` field
172170 pub struct disabled(());
173173- ///Marker type for the `last_updated_by` field
174174- pub struct last_updated_by(());
175171 ///Marker type for the `created_at` field
176172 pub struct created_at(());
177173 ///Marker type for the `updated_at` field
178174 pub struct updated_at(());
175175+ ///Marker type for the `name` field
176176+ pub struct name(());
177177+ ///Marker type for the `last_updated_by` field
178178+ pub struct last_updated_by(());
179179 }
180180}
181181···395395impl<'a, S> TemplateViewBuilder<'a, S>
396396where
397397 S: template_view_state::State,
398398+ S::ContentMarkdown: template_view_state::IsSet,
398399 S::Id: template_view_state::IsSet,
399399- S::Name: template_view_state::IsSet,
400400- S::ContentMarkdown: template_view_state::IsSet,
401400 S::Disabled: template_view_state::IsSet,
402402- S::LastUpdatedBy: template_view_state::IsSet,
403401 S::CreatedAt: template_view_state::IsSet,
404402 S::UpdatedAt: template_view_state::IsSet,
403403+ S::Name: template_view_state::IsSet,
404404+ S::LastUpdatedBy: template_view_state::IsSet,
405405{
406406 /// Build the final struct
407407 pub fn build(self) -> TemplateView<'a> {
···462462 }
463463 /// State trait tracking which required fields have been set
464464 pub trait State: sealed::Sealed {
465465+ type CreatedAt;
465466 type Details;
466467 type CreatedBy;
467467- type CreatedAt;
468468 }
469469 /// Empty state - all required fields are unset
470470 pub struct Empty(());
471471 impl sealed::Sealed for Empty {}
472472 impl State for Empty {
473473+ type CreatedAt = Unset;
473474 type Details = Unset;
474475 type CreatedBy = Unset;
475475- type CreatedAt = Unset;
476476+ }
477477+ ///State transition - sets the `created_at` field to Set
478478+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
479479+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
480480+ impl<S: State> State for SetCreatedAt<S> {
481481+ type CreatedAt = Set<members::created_at>;
482482+ type Details = S::Details;
483483+ type CreatedBy = S::CreatedBy;
476484 }
477485 ///State transition - sets the `details` field to Set
478486 pub struct SetDetails<S: State = Empty>(PhantomData<fn() -> S>);
479487 impl<S: State> sealed::Sealed for SetDetails<S> {}
480488 impl<S: State> State for SetDetails<S> {
489489+ type CreatedAt = S::CreatedAt;
481490 type Details = Set<members::details>;
482491 type CreatedBy = S::CreatedBy;
483483- type CreatedAt = S::CreatedAt;
484492 }
485493 ///State transition - sets the `created_by` field to Set
486494 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
487495 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
488496 impl<S: State> State for SetCreatedBy<S> {
489489- type Details = S::Details;
490490- type CreatedBy = Set<members::created_by>;
491497 type CreatedAt = S::CreatedAt;
492492- }
493493- ///State transition - sets the `created_at` field to Set
494494- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
495495- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
496496- impl<S: State> State for SetCreatedAt<S> {
497498 type Details = S::Details;
498498- type CreatedBy = S::CreatedBy;
499499- type CreatedAt = Set<members::created_at>;
499499+ type CreatedBy = Set<members::created_by>;
500500 }
501501 /// Marker types for field names
502502 #[allow(non_camel_case_types)]
503503 pub mod members {
504504+ ///Marker type for the `created_at` field
505505+ pub struct created_at(());
504506 ///Marker type for the `details` field
505507 pub struct details(());
506508 ///Marker type for the `created_by` field
507509 pub struct created_by(());
508508- ///Marker type for the `created_at` field
509509- pub struct created_at(());
510510 }
511511}
512512···599599impl<'a, S> EventBuilder<'a, S>
600600where
601601 S: event_state::State,
602602+ S::CreatedAt: event_state::IsSet,
602603 S::Details: event_state::IsSet,
603604 S::CreatedBy: event_state::IsSet,
604604- S::CreatedAt: event_state::IsSet,
605605{
606606 /// Build the final struct
607607 pub fn build(self) -> Event<'a> {
+499-499
crates/weaver-api/src/tools_ozone/moderation.rs
···5555 }
5656 /// State trait tracking which required fields have been set
5757 pub trait State: sealed::Sealed {
5858- type Timestamp;
5958 type Active;
5959+ type Timestamp;
6060 }
6161 /// Empty state - all required fields are unset
6262 pub struct Empty(());
6363 impl sealed::Sealed for Empty {}
6464 impl State for Empty {
6565- type Timestamp = Unset;
6665 type Active = Unset;
6767- }
6868- ///State transition - sets the `timestamp` field to Set
6969- pub struct SetTimestamp<S: State = Empty>(PhantomData<fn() -> S>);
7070- impl<S: State> sealed::Sealed for SetTimestamp<S> {}
7171- impl<S: State> State for SetTimestamp<S> {
7272- type Timestamp = Set<members::timestamp>;
7373- type Active = S::Active;
6666+ type Timestamp = Unset;
7467 }
7568 ///State transition - sets the `active` field to Set
7669 pub struct SetActive<S: State = Empty>(PhantomData<fn() -> S>);
7770 impl<S: State> sealed::Sealed for SetActive<S> {}
7871 impl<S: State> State for SetActive<S> {
7979- type Timestamp = S::Timestamp;
8072 type Active = Set<members::active>;
7373+ type Timestamp = S::Timestamp;
7474+ }
7575+ ///State transition - sets the `timestamp` field to Set
7676+ pub struct SetTimestamp<S: State = Empty>(PhantomData<fn() -> S>);
7777+ impl<S: State> sealed::Sealed for SetTimestamp<S> {}
7878+ impl<S: State> State for SetTimestamp<S> {
7979+ type Active = S::Active;
8080+ type Timestamp = Set<members::timestamp>;
8181 }
8282 /// Marker types for field names
8383 #[allow(non_camel_case_types)]
8484 pub mod members {
8585- ///Marker type for the `timestamp` field
8686- pub struct timestamp(());
8785 ///Marker type for the `active` field
8886 pub struct active(());
8787+ ///Marker type for the `timestamp` field
8888+ pub struct timestamp(());
8989 }
9090}
9191···192192impl<'a, S> AccountEventBuilder<'a, S>
193193where
194194 S: account_event_state::State,
195195- S::Timestamp: account_event_state::IsSet,
196195 S::Active: account_event_state::IsSet,
196196+ S::Timestamp: account_event_state::IsSet,
197197{
198198 /// Build the final struct
199199 pub fn build(self) -> AccountEvent<'a> {
···50975097 }
50985098 /// State trait tracking which required fields have been set
50995099 pub trait State: sealed::Sealed {
51005100- type CreatedAt;
51015100 type Status;
51025101 type AttemptId;
51025102+ type CreatedAt;
51035103 }
51045104 /// Empty state - all required fields are unset
51055105 pub struct Empty(());
51065106 impl sealed::Sealed for Empty {}
51075107 impl State for Empty {
51085108- type CreatedAt = Unset;
51095108 type Status = Unset;
51105109 type AttemptId = Unset;
51115111- }
51125112- ///State transition - sets the `created_at` field to Set
51135113- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
51145114- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
51155115- impl<S: State> State for SetCreatedAt<S> {
51165116- type CreatedAt = Set<members::created_at>;
51175117- type Status = S::Status;
51185118- type AttemptId = S::AttemptId;
51105110+ type CreatedAt = Unset;
51195111 }
51205112 ///State transition - sets the `status` field to Set
51215113 pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
51225114 impl<S: State> sealed::Sealed for SetStatus<S> {}
51235115 impl<S: State> State for SetStatus<S> {
51245124- type CreatedAt = S::CreatedAt;
51255116 type Status = Set<members::status>;
51265117 type AttemptId = S::AttemptId;
51185118+ type CreatedAt = S::CreatedAt;
51275119 }
51285120 ///State transition - sets the `attempt_id` field to Set
51295121 pub struct SetAttemptId<S: State = Empty>(PhantomData<fn() -> S>);
51305122 impl<S: State> sealed::Sealed for SetAttemptId<S> {}
51315123 impl<S: State> State for SetAttemptId<S> {
51325132- type CreatedAt = S::CreatedAt;
51335124 type Status = S::Status;
51345125 type AttemptId = Set<members::attempt_id>;
51265126+ type CreatedAt = S::CreatedAt;
51275127+ }
51285128+ ///State transition - sets the `created_at` field to Set
51295129+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
51305130+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
51315131+ impl<S: State> State for SetCreatedAt<S> {
51325132+ type Status = S::Status;
51335133+ type AttemptId = S::AttemptId;
51345134+ type CreatedAt = Set<members::created_at>;
51355135 }
51365136 /// Marker types for field names
51375137 #[allow(non_camel_case_types)]
51385138 pub mod members {
51395139- ///Marker type for the `created_at` field
51405140- pub struct created_at(());
51415139 ///Marker type for the `status` field
51425140 pub struct status(());
51435141 ///Marker type for the `attempt_id` field
51445142 pub struct attempt_id(());
51435143+ ///Marker type for the `created_at` field
51445144+ pub struct created_at(());
51455145 }
51465146}
51475147···53795379impl<'a, S> AgeAssuranceEventBuilder<'a, S>
53805380where
53815381 S: age_assurance_event_state::State,
53825382- S::CreatedAt: age_assurance_event_state::IsSet,
53835382 S::Status: age_assurance_event_state::IsSet,
53845383 S::AttemptId: age_assurance_event_state::IsSet,
53845384+ S::CreatedAt: age_assurance_event_state::IsSet,
53855385{
53865386 /// Build the final struct
53875387 pub fn build(self) -> AgeAssuranceEvent<'a> {
···55185518 }
55195519 /// State trait tracking which required fields have been set
55205520 pub trait State: sealed::Sealed {
55215521- type Cid;
55225521 type MimeType;
55235522 type Size;
55245523 type CreatedAt;
55245524+ type Cid;
55255525 }
55265526 /// Empty state - all required fields are unset
55275527 pub struct Empty(());
55285528 impl sealed::Sealed for Empty {}
55295529 impl State for Empty {
55305530- type Cid = Unset;
55315530 type MimeType = Unset;
55325531 type Size = Unset;
55335532 type CreatedAt = Unset;
55345534- }
55355535- ///State transition - sets the `cid` field to Set
55365536- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
55375537- impl<S: State> sealed::Sealed for SetCid<S> {}
55385538- impl<S: State> State for SetCid<S> {
55395539- type Cid = Set<members::cid>;
55405540- type MimeType = S::MimeType;
55415541- type Size = S::Size;
55425542- type CreatedAt = S::CreatedAt;
55335533+ type Cid = Unset;
55435534 }
55445535 ///State transition - sets the `mime_type` field to Set
55455536 pub struct SetMimeType<S: State = Empty>(PhantomData<fn() -> S>);
55465537 impl<S: State> sealed::Sealed for SetMimeType<S> {}
55475538 impl<S: State> State for SetMimeType<S> {
55485548- type Cid = S::Cid;
55495539 type MimeType = Set<members::mime_type>;
55505540 type Size = S::Size;
55515541 type CreatedAt = S::CreatedAt;
55425542+ type Cid = S::Cid;
55525543 }
55535544 ///State transition - sets the `size` field to Set
55545545 pub struct SetSize<S: State = Empty>(PhantomData<fn() -> S>);
55555546 impl<S: State> sealed::Sealed for SetSize<S> {}
55565547 impl<S: State> State for SetSize<S> {
55575557- type Cid = S::Cid;
55585548 type MimeType = S::MimeType;
55595549 type Size = Set<members::size>;
55605550 type CreatedAt = S::CreatedAt;
55515551+ type Cid = S::Cid;
55615552 }
55625553 ///State transition - sets the `created_at` field to Set
55635554 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
55645555 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
55655556 impl<S: State> State for SetCreatedAt<S> {
55575557+ type MimeType = S::MimeType;
55585558+ type Size = S::Size;
55595559+ type CreatedAt = Set<members::created_at>;
55665560 type Cid = S::Cid;
55615561+ }
55625562+ ///State transition - sets the `cid` field to Set
55635563+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
55645564+ impl<S: State> sealed::Sealed for SetCid<S> {}
55655565+ impl<S: State> State for SetCid<S> {
55675566 type MimeType = S::MimeType;
55685567 type Size = S::Size;
55695569- type CreatedAt = Set<members::created_at>;
55685568+ type CreatedAt = S::CreatedAt;
55695569+ type Cid = Set<members::cid>;
55705570 }
55715571 /// Marker types for field names
55725572 #[allow(non_camel_case_types)]
55735573 pub mod members {
55745574- ///Marker type for the `cid` field
55755575- pub struct cid(());
55765574 ///Marker type for the `mime_type` field
55775575 pub struct mime_type(());
55785576 ///Marker type for the `size` field
55795577 pub struct size(());
55805578 ///Marker type for the `created_at` field
55815579 pub struct created_at(());
55805580+ ///Marker type for the `cid` field
55815581+ pub struct cid(());
55825582 }
55835583}
55845584···57255725impl<'a, S> BlobViewBuilder<'a, S>
57265726where
57275727 S: blob_view_state::State,
57285728- S::Cid: blob_view_state::IsSet,
57295728 S::MimeType: blob_view_state::IsSet,
57305729 S::Size: blob_view_state::IsSet,
57315730 S::CreatedAt: blob_view_state::IsSet,
57315731+ S::Cid: blob_view_state::IsSet,
57325732{
57335733 /// Build the final struct
57345734 pub fn build(self) -> BlobView<'a> {
···77257725 /// State trait tracking which required fields have been set
77267726 pub trait State: sealed::Sealed {
77277727 type Id;
77287728- type Event;
77297729- type Subject;
77307730- type SubjectBlobCids;
77317728 type CreatedBy;
77327729 type CreatedAt;
77307730+ type Subject;
77317731+ type SubjectBlobCids;
77327732+ type Event;
77337733 }
77347734 /// Empty state - all required fields are unset
77357735 pub struct Empty(());
77367736 impl sealed::Sealed for Empty {}
77377737 impl State for Empty {
77387738 type Id = Unset;
77397739- type Event = Unset;
77397739+ type CreatedBy = Unset;
77407740+ type CreatedAt = Unset;
77407741 type Subject = Unset;
77417742 type SubjectBlobCids = Unset;
77427742- type CreatedBy = Unset;
77437743- type CreatedAt = Unset;
77437743+ type Event = Unset;
77447744 }
77457745 ///State transition - sets the `id` field to Set
77467746 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
77477747 impl<S: State> sealed::Sealed for SetId<S> {}
77487748 impl<S: State> State for SetId<S> {
77497749 type Id = Set<members::id>;
77507750- type Event = S::Event;
77507750+ type CreatedBy = S::CreatedBy;
77517751+ type CreatedAt = S::CreatedAt;
77517752 type Subject = S::Subject;
77527753 type SubjectBlobCids = S::SubjectBlobCids;
77537753- type CreatedBy = S::CreatedBy;
77547754- type CreatedAt = S::CreatedAt;
77547754+ type Event = S::Event;
77557755 }
77567756- ///State transition - sets the `event` field to Set
77577757- pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
77587758- impl<S: State> sealed::Sealed for SetEvent<S> {}
77597759- impl<S: State> State for SetEvent<S> {
77567756+ ///State transition - sets the `created_by` field to Set
77577757+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
77587758+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
77597759+ impl<S: State> State for SetCreatedBy<S> {
77607760 type Id = S::Id;
77617761- type Event = Set<members::event>;
77617761+ type CreatedBy = Set<members::created_by>;
77627762+ type CreatedAt = S::CreatedAt;
77627763 type Subject = S::Subject;
77637764 type SubjectBlobCids = S::SubjectBlobCids;
77657765+ type Event = S::Event;
77667766+ }
77677767+ ///State transition - sets the `created_at` field to Set
77687768+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
77697769+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
77707770+ impl<S: State> State for SetCreatedAt<S> {
77717771+ type Id = S::Id;
77647772 type CreatedBy = S::CreatedBy;
77657765- type CreatedAt = S::CreatedAt;
77737773+ type CreatedAt = Set<members::created_at>;
77747774+ type Subject = S::Subject;
77757775+ type SubjectBlobCids = S::SubjectBlobCids;
77767776+ type Event = S::Event;
77667777 }
77677778 ///State transition - sets the `subject` field to Set
77687779 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
77697780 impl<S: State> sealed::Sealed for SetSubject<S> {}
77707781 impl<S: State> State for SetSubject<S> {
77717782 type Id = S::Id;
77727772- type Event = S::Event;
77837783+ type CreatedBy = S::CreatedBy;
77847784+ type CreatedAt = S::CreatedAt;
77737785 type Subject = Set<members::subject>;
77747786 type SubjectBlobCids = S::SubjectBlobCids;
77757775- type CreatedBy = S::CreatedBy;
77767776- type CreatedAt = S::CreatedAt;
77877787+ type Event = S::Event;
77777788 }
77787789 ///State transition - sets the `subject_blob_cids` field to Set
77797790 pub struct SetSubjectBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
77807791 impl<S: State> sealed::Sealed for SetSubjectBlobCids<S> {}
77817792 impl<S: State> State for SetSubjectBlobCids<S> {
77827793 type Id = S::Id;
77837783- type Event = S::Event;
77947794+ type CreatedBy = S::CreatedBy;
77957795+ type CreatedAt = S::CreatedAt;
77847796 type Subject = S::Subject;
77857797 type SubjectBlobCids = Set<members::subject_blob_cids>;
77867786- type CreatedBy = S::CreatedBy;
77877787- type CreatedAt = S::CreatedAt;
77987798+ type Event = S::Event;
77887799 }
77897789- ///State transition - sets the `created_by` field to Set
77907790- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
77917791- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
77927792- impl<S: State> State for SetCreatedBy<S> {
78007800+ ///State transition - sets the `event` field to Set
78017801+ pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
78027802+ impl<S: State> sealed::Sealed for SetEvent<S> {}
78037803+ impl<S: State> State for SetEvent<S> {
77937804 type Id = S::Id;
77947794- type Event = S::Event;
77957795- type Subject = S::Subject;
77967796- type SubjectBlobCids = S::SubjectBlobCids;
77977797- type CreatedBy = Set<members::created_by>;
78057805+ type CreatedBy = S::CreatedBy;
77987806 type CreatedAt = S::CreatedAt;
77997799- }
78007800- ///State transition - sets the `created_at` field to Set
78017801- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
78027802- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
78037803- impl<S: State> State for SetCreatedAt<S> {
78047804- type Id = S::Id;
78057805- type Event = S::Event;
78067807 type Subject = S::Subject;
78077808 type SubjectBlobCids = S::SubjectBlobCids;
78087808- type CreatedBy = S::CreatedBy;
78097809- type CreatedAt = Set<members::created_at>;
78097809+ type Event = Set<members::event>;
78107810 }
78117811 /// Marker types for field names
78127812 #[allow(non_camel_case_types)]
78137813 pub mod members {
78147814 ///Marker type for the `id` field
78157815 pub struct id(());
78167816- ///Marker type for the `event` field
78177817- pub struct event(());
78167816+ ///Marker type for the `created_by` field
78177817+ pub struct created_by(());
78187818+ ///Marker type for the `created_at` field
78197819+ pub struct created_at(());
78187820 ///Marker type for the `subject` field
78197821 pub struct subject(());
78207822 ///Marker type for the `subject_blob_cids` field
78217823 pub struct subject_blob_cids(());
78227822- ///Marker type for the `created_by` field
78237823- pub struct created_by(());
78247824- ///Marker type for the `created_at` field
78257825- pub struct created_at(());
78247824+ ///Marker type for the `event` field
78257825+ pub struct event(());
78267826 }
78277827}
78287828···80468046where
80478047 S: mod_event_view_state::State,
80488048 S::Id: mod_event_view_state::IsSet,
80498049- S::Event: mod_event_view_state::IsSet,
80508050- S::Subject: mod_event_view_state::IsSet,
80518051- S::SubjectBlobCids: mod_event_view_state::IsSet,
80528049 S::CreatedBy: mod_event_view_state::IsSet,
80538050 S::CreatedAt: mod_event_view_state::IsSet,
80518051+ S::Subject: mod_event_view_state::IsSet,
80528052+ S::SubjectBlobCids: mod_event_view_state::IsSet,
80538053+ S::Event: mod_event_view_state::IsSet,
80548054{
80558055 /// Build the final struct
80568056 pub fn build(self) -> ModEventView<'a> {
···82448244 }
82458245 /// State trait tracking which required fields have been set
82468246 pub trait State: sealed::Sealed {
82478247- type Id;
82488248- type Event;
82498249- type Subject;
82508247 type SubjectBlobs;
82518248 type CreatedBy;
82528249 type CreatedAt;
82508250+ type Id;
82518251+ type Subject;
82528252+ type Event;
82538253 }
82548254 /// Empty state - all required fields are unset
82558255 pub struct Empty(());
82568256 impl sealed::Sealed for Empty {}
82578257 impl State for Empty {
82588258- type Id = Unset;
82598259- type Event = Unset;
82608260- type Subject = Unset;
82618258 type SubjectBlobs = Unset;
82628259 type CreatedBy = Unset;
82638260 type CreatedAt = Unset;
82648264- }
82658265- ///State transition - sets the `id` field to Set
82668266- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
82678267- impl<S: State> sealed::Sealed for SetId<S> {}
82688268- impl<S: State> State for SetId<S> {
82698269- type Id = Set<members::id>;
82708270- type Event = S::Event;
82718271- type Subject = S::Subject;
82728272- type SubjectBlobs = S::SubjectBlobs;
82738273- type CreatedBy = S::CreatedBy;
82748274- type CreatedAt = S::CreatedAt;
82758275- }
82768276- ///State transition - sets the `event` field to Set
82778277- pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
82788278- impl<S: State> sealed::Sealed for SetEvent<S> {}
82798279- impl<S: State> State for SetEvent<S> {
82808280- type Id = S::Id;
82818281- type Event = Set<members::event>;
82828282- type Subject = S::Subject;
82838283- type SubjectBlobs = S::SubjectBlobs;
82848284- type CreatedBy = S::CreatedBy;
82858285- type CreatedAt = S::CreatedAt;
82868286- }
82878287- ///State transition - sets the `subject` field to Set
82888288- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
82898289- impl<S: State> sealed::Sealed for SetSubject<S> {}
82908290- impl<S: State> State for SetSubject<S> {
82918291- type Id = S::Id;
82928292- type Event = S::Event;
82938293- type Subject = Set<members::subject>;
82948294- type SubjectBlobs = S::SubjectBlobs;
82958295- type CreatedBy = S::CreatedBy;
82968296- type CreatedAt = S::CreatedAt;
82618261+ type Id = Unset;
82628262+ type Subject = Unset;
82638263+ type Event = Unset;
82978264 }
82988265 ///State transition - sets the `subject_blobs` field to Set
82998266 pub struct SetSubjectBlobs<S: State = Empty>(PhantomData<fn() -> S>);
83008267 impl<S: State> sealed::Sealed for SetSubjectBlobs<S> {}
83018268 impl<S: State> State for SetSubjectBlobs<S> {
83028302- type Id = S::Id;
83038303- type Event = S::Event;
83048304- type Subject = S::Subject;
83058269 type SubjectBlobs = Set<members::subject_blobs>;
83068270 type CreatedBy = S::CreatedBy;
83078271 type CreatedAt = S::CreatedAt;
82728272+ type Id = S::Id;
82738273+ type Subject = S::Subject;
82748274+ type Event = S::Event;
83088275 }
83098276 ///State transition - sets the `created_by` field to Set
83108277 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
83118278 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
83128279 impl<S: State> State for SetCreatedBy<S> {
83138313- type Id = S::Id;
83148314- type Event = S::Event;
83158315- type Subject = S::Subject;
83168280 type SubjectBlobs = S::SubjectBlobs;
83178281 type CreatedBy = Set<members::created_by>;
83188282 type CreatedAt = S::CreatedAt;
82838283+ type Id = S::Id;
82848284+ type Subject = S::Subject;
82858285+ type Event = S::Event;
83198286 }
83208287 ///State transition - sets the `created_at` field to Set
83218288 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
83228289 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
83238290 impl<S: State> State for SetCreatedAt<S> {
82918291+ type SubjectBlobs = S::SubjectBlobs;
82928292+ type CreatedBy = S::CreatedBy;
82938293+ type CreatedAt = Set<members::created_at>;
83248294 type Id = S::Id;
82958295+ type Subject = S::Subject;
83258296 type Event = S::Event;
82978297+ }
82988298+ ///State transition - sets the `id` field to Set
82998299+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
83008300+ impl<S: State> sealed::Sealed for SetId<S> {}
83018301+ impl<S: State> State for SetId<S> {
83028302+ type SubjectBlobs = S::SubjectBlobs;
83038303+ type CreatedBy = S::CreatedBy;
83048304+ type CreatedAt = S::CreatedAt;
83058305+ type Id = Set<members::id>;
83268306 type Subject = S::Subject;
83078307+ type Event = S::Event;
83088308+ }
83098309+ ///State transition - sets the `subject` field to Set
83108310+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
83118311+ impl<S: State> sealed::Sealed for SetSubject<S> {}
83128312+ impl<S: State> State for SetSubject<S> {
83278313 type SubjectBlobs = S::SubjectBlobs;
83288314 type CreatedBy = S::CreatedBy;
83298329- type CreatedAt = Set<members::created_at>;
83158315+ type CreatedAt = S::CreatedAt;
83168316+ type Id = S::Id;
83178317+ type Subject = Set<members::subject>;
83188318+ type Event = S::Event;
83198319+ }
83208320+ ///State transition - sets the `event` field to Set
83218321+ pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
83228322+ impl<S: State> sealed::Sealed for SetEvent<S> {}
83238323+ impl<S: State> State for SetEvent<S> {
83248324+ type SubjectBlobs = S::SubjectBlobs;
83258325+ type CreatedBy = S::CreatedBy;
83268326+ type CreatedAt = S::CreatedAt;
83278327+ type Id = S::Id;
83288328+ type Subject = S::Subject;
83298329+ type Event = Set<members::event>;
83308330 }
83318331 /// Marker types for field names
83328332 #[allow(non_camel_case_types)]
83338333 pub mod members {
83348334- ///Marker type for the `id` field
83358335- pub struct id(());
83368336- ///Marker type for the `event` field
83378337- pub struct event(());
83388338- ///Marker type for the `subject` field
83398339- pub struct subject(());
83408334 ///Marker type for the `subject_blobs` field
83418335 pub struct subject_blobs(());
83428336 ///Marker type for the `created_by` field
83438337 pub struct created_by(());
83448338 ///Marker type for the `created_at` field
83458339 pub struct created_at(());
83408340+ ///Marker type for the `id` field
83418341+ pub struct id(());
83428342+ ///Marker type for the `subject` field
83438343+ pub struct subject(());
83448344+ ///Marker type for the `event` field
83458345+ pub struct event(());
83468346 }
83478347}
83488348···85158515impl<'a, S> ModEventViewDetailBuilder<'a, S>
85168516where
85178517 S: mod_event_view_detail_state::State,
85188518- S::Id: mod_event_view_detail_state::IsSet,
85198519- S::Event: mod_event_view_detail_state::IsSet,
85208520- S::Subject: mod_event_view_detail_state::IsSet,
85218518 S::SubjectBlobs: mod_event_view_detail_state::IsSet,
85228519 S::CreatedBy: mod_event_view_detail_state::IsSet,
85238520 S::CreatedAt: mod_event_view_detail_state::IsSet,
85218521+ S::Id: mod_event_view_detail_state::IsSet,
85228522+ S::Subject: mod_event_view_detail_state::IsSet,
85238523+ S::Event: mod_event_view_detail_state::IsSet,
85248524{
85258525 /// Build the final struct
85268526 pub fn build(self) -> ModEventViewDetail<'a> {
···90889088 }
90899089 /// State trait tracking which required fields have been set
90909090 pub trait State: sealed::Sealed {
90919091- type Uri;
90929091 type Cid;
90939093- type Value;
90949092 type BlobCids;
90959095- type IndexedAt;
90969093 type Moderation;
90949094+ type Value;
90959095+ type Uri;
90979096 type Repo;
90979097+ type IndexedAt;
90989098 }
90999099 /// Empty state - all required fields are unset
91009100 pub struct Empty(());
91019101 impl sealed::Sealed for Empty {}
91029102 impl State for Empty {
91039103- type Uri = Unset;
91049103 type Cid = Unset;
91059105- type Value = Unset;
91069104 type BlobCids = Unset;
91079107- type IndexedAt = Unset;
91089105 type Moderation = Unset;
91069106+ type Value = Unset;
91079107+ type Uri = Unset;
91099108 type Repo = Unset;
91109110- }
91119111- ///State transition - sets the `uri` field to Set
91129112- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
91139113- impl<S: State> sealed::Sealed for SetUri<S> {}
91149114- impl<S: State> State for SetUri<S> {
91159115- type Uri = Set<members::uri>;
91169116- type Cid = S::Cid;
91179117- type Value = S::Value;
91189118- type BlobCids = S::BlobCids;
91199119- type IndexedAt = S::IndexedAt;
91209120- type Moderation = S::Moderation;
91219121- type Repo = S::Repo;
91099109+ type IndexedAt = Unset;
91229110 }
91239111 ///State transition - sets the `cid` field to Set
91249112 pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
91259113 impl<S: State> sealed::Sealed for SetCid<S> {}
91269114 impl<S: State> State for SetCid<S> {
91279127- type Uri = S::Uri;
91289115 type Cid = Set<members::cid>;
91299129- type Value = S::Value;
91309116 type BlobCids = S::BlobCids;
91319131- type IndexedAt = S::IndexedAt;
91329117 type Moderation = S::Moderation;
91339133- type Repo = S::Repo;
91349134- }
91359135- ///State transition - sets the `value` field to Set
91369136- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
91379137- impl<S: State> sealed::Sealed for SetValue<S> {}
91389138- impl<S: State> State for SetValue<S> {
91189118+ type Value = S::Value;
91399119 type Uri = S::Uri;
91409140- type Cid = S::Cid;
91419141- type Value = Set<members::value>;
91429142- type BlobCids = S::BlobCids;
91209120+ type Repo = S::Repo;
91439121 type IndexedAt = S::IndexedAt;
91449144- type Moderation = S::Moderation;
91459145- type Repo = S::Repo;
91469122 }
91479123 ///State transition - sets the `blob_cids` field to Set
91489124 pub struct SetBlobCids<S: State = Empty>(PhantomData<fn() -> S>);
91499125 impl<S: State> sealed::Sealed for SetBlobCids<S> {}
91509126 impl<S: State> State for SetBlobCids<S> {
91519151- type Uri = S::Uri;
91529127 type Cid = S::Cid;
91539153- type Value = S::Value;
91549128 type BlobCids = Set<members::blob_cids>;
91559155- type IndexedAt = S::IndexedAt;
91569129 type Moderation = S::Moderation;
91579157- type Repo = S::Repo;
91589158- }
91599159- ///State transition - sets the `indexed_at` field to Set
91609160- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
91619161- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
91629162- impl<S: State> State for SetIndexedAt<S> {
91309130+ type Value = S::Value;
91639131 type Uri = S::Uri;
91649164- type Cid = S::Cid;
91659165- type Value = S::Value;
91669166- type BlobCids = S::BlobCids;
91679167- type IndexedAt = Set<members::indexed_at>;
91689168- type Moderation = S::Moderation;
91699132 type Repo = S::Repo;
91339133+ type IndexedAt = S::IndexedAt;
91709134 }
91719135 ///State transition - sets the `moderation` field to Set
91729136 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
91739137 impl<S: State> sealed::Sealed for SetModeration<S> {}
91749138 impl<S: State> State for SetModeration<S> {
91399139+ type Cid = S::Cid;
91409140+ type BlobCids = S::BlobCids;
91419141+ type Moderation = Set<members::moderation>;
91429142+ type Value = S::Value;
91759143 type Uri = S::Uri;
91449144+ type Repo = S::Repo;
91459145+ type IndexedAt = S::IndexedAt;
91469146+ }
91479147+ ///State transition - sets the `value` field to Set
91489148+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
91499149+ impl<S: State> sealed::Sealed for SetValue<S> {}
91509150+ impl<S: State> State for SetValue<S> {
91769151 type Cid = S::Cid;
91779177- type Value = S::Value;
91789152 type BlobCids = S::BlobCids;
91539153+ type Moderation = S::Moderation;
91549154+ type Value = Set<members::value>;
91559155+ type Uri = S::Uri;
91569156+ type Repo = S::Repo;
91799157 type IndexedAt = S::IndexedAt;
91809180- type Moderation = Set<members::moderation>;
91589158+ }
91599159+ ///State transition - sets the `uri` field to Set
91609160+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
91619161+ impl<S: State> sealed::Sealed for SetUri<S> {}
91629162+ impl<S: State> State for SetUri<S> {
91639163+ type Cid = S::Cid;
91649164+ type BlobCids = S::BlobCids;
91659165+ type Moderation = S::Moderation;
91669166+ type Value = S::Value;
91679167+ type Uri = Set<members::uri>;
91819168 type Repo = S::Repo;
91699169+ type IndexedAt = S::IndexedAt;
91829170 }
91839171 ///State transition - sets the `repo` field to Set
91849172 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
91859173 impl<S: State> sealed::Sealed for SetRepo<S> {}
91869174 impl<S: State> State for SetRepo<S> {
91879187- type Uri = S::Uri;
91889175 type Cid = S::Cid;
91899189- type Value = S::Value;
91909176 type BlobCids = S::BlobCids;
91919191- type IndexedAt = S::IndexedAt;
91929177 type Moderation = S::Moderation;
91789178+ type Value = S::Value;
91799179+ type Uri = S::Uri;
91939180 type Repo = Set<members::repo>;
91819181+ type IndexedAt = S::IndexedAt;
91829182+ }
91839183+ ///State transition - sets the `indexed_at` field to Set
91849184+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
91859185+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
91869186+ impl<S: State> State for SetIndexedAt<S> {
91879187+ type Cid = S::Cid;
91889188+ type BlobCids = S::BlobCids;
91899189+ type Moderation = S::Moderation;
91909190+ type Value = S::Value;
91919191+ type Uri = S::Uri;
91929192+ type Repo = S::Repo;
91939193+ type IndexedAt = Set<members::indexed_at>;
91949194 }
91959195 /// Marker types for field names
91969196 #[allow(non_camel_case_types)]
91979197 pub mod members {
91989198- ///Marker type for the `uri` field
91999199- pub struct uri(());
92009198 ///Marker type for the `cid` field
92019199 pub struct cid(());
92029202- ///Marker type for the `value` field
92039203- pub struct value(());
92049200 ///Marker type for the `blob_cids` field
92059201 pub struct blob_cids(());
92069206- ///Marker type for the `indexed_at` field
92079207- pub struct indexed_at(());
92089202 ///Marker type for the `moderation` field
92099203 pub struct moderation(());
92049204+ ///Marker type for the `value` field
92059205+ pub struct value(());
92069206+ ///Marker type for the `uri` field
92079207+ pub struct uri(());
92109208 ///Marker type for the `repo` field
92119209 pub struct repo(());
92109210+ ///Marker type for the `indexed_at` field
92119211+ pub struct indexed_at(());
92129212 }
92139213}
92149214···93819381impl<'a, S> RecordViewBuilder<'a, S>
93829382where
93839383 S: record_view_state::State,
93849384- S::Uri: record_view_state::IsSet,
93859384 S::Cid: record_view_state::IsSet,
93869386- S::Value: record_view_state::IsSet,
93879385 S::BlobCids: record_view_state::IsSet,
93889388- S::IndexedAt: record_view_state::IsSet,
93899386 S::Moderation: record_view_state::IsSet,
93879387+ S::Value: record_view_state::IsSet,
93889388+ S::Uri: record_view_state::IsSet,
93909389 S::Repo: record_view_state::IsSet,
93909390+ S::IndexedAt: record_view_state::IsSet,
93919391{
93929392 /// Build the final struct
93939393 pub fn build(self) -> RecordView<'a> {
···94809480 }
94819481 /// State trait tracking which required fields have been set
94829482 pub trait State: sealed::Sealed {
94839483- type Uri;
94849484- type Cid;
94859483 type Value;
94849484+ type Uri;
94859485+ type IndexedAt;
94869486 type Blobs;
94879487- type IndexedAt;
94889487 type Moderation;
94899488 type Repo;
94899489+ type Cid;
94909490 }
94919491 /// Empty state - all required fields are unset
94929492 pub struct Empty(());
94939493 impl sealed::Sealed for Empty {}
94949494 impl State for Empty {
94959495+ type Value = Unset;
94959496 type Uri = Unset;
94969496- type Cid = Unset;
94979497- type Value = Unset;
94989498- type Blobs = Unset;
94999497 type IndexedAt = Unset;
94989498+ type Blobs = Unset;
95009499 type Moderation = Unset;
95019500 type Repo = Unset;
95019501+ type Cid = Unset;
95029502+ }
95039503+ ///State transition - sets the `value` field to Set
95049504+ pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
95059505+ impl<S: State> sealed::Sealed for SetValue<S> {}
95069506+ impl<S: State> State for SetValue<S> {
95079507+ type Value = Set<members::value>;
95089508+ type Uri = S::Uri;
95099509+ type IndexedAt = S::IndexedAt;
95109510+ type Blobs = S::Blobs;
95119511+ type Moderation = S::Moderation;
95129512+ type Repo = S::Repo;
95139513+ type Cid = S::Cid;
95029514 }
95039515 ///State transition - sets the `uri` field to Set
95049516 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
95059517 impl<S: State> sealed::Sealed for SetUri<S> {}
95069518 impl<S: State> State for SetUri<S> {
95079507- type Uri = Set<members::uri>;
95089508- type Cid = S::Cid;
95099519 type Value = S::Value;
95109510- type Blobs = S::Blobs;
95209520+ type Uri = Set<members::uri>;
95119521 type IndexedAt = S::IndexedAt;
95129512- type Moderation = S::Moderation;
95139513- type Repo = S::Repo;
95149514- }
95159515- ///State transition - sets the `cid` field to Set
95169516- pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
95179517- impl<S: State> sealed::Sealed for SetCid<S> {}
95189518- impl<S: State> State for SetCid<S> {
95199519- type Uri = S::Uri;
95209520- type Cid = Set<members::cid>;
95219521- type Value = S::Value;
95229522 type Blobs = S::Blobs;
95239523- type IndexedAt = S::IndexedAt;
95249523 type Moderation = S::Moderation;
95259524 type Repo = S::Repo;
95259525+ type Cid = S::Cid;
95269526 }
95279527- ///State transition - sets the `value` field to Set
95289528- pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
95299529- impl<S: State> sealed::Sealed for SetValue<S> {}
95309530- impl<S: State> State for SetValue<S> {
95279527+ ///State transition - sets the `indexed_at` field to Set
95289528+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
95299529+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
95309530+ impl<S: State> State for SetIndexedAt<S> {
95319531+ type Value = S::Value;
95319532 type Uri = S::Uri;
95329532- type Cid = S::Cid;
95339533- type Value = Set<members::value>;
95339533+ type IndexedAt = Set<members::indexed_at>;
95349534 type Blobs = S::Blobs;
95359535- type IndexedAt = S::IndexedAt;
95369535 type Moderation = S::Moderation;
95379536 type Repo = S::Repo;
95379537+ type Cid = S::Cid;
95389538 }
95399539 ///State transition - sets the `blobs` field to Set
95409540 pub struct SetBlobs<S: State = Empty>(PhantomData<fn() -> S>);
95419541 impl<S: State> sealed::Sealed for SetBlobs<S> {}
95429542 impl<S: State> State for SetBlobs<S> {
95439543+ type Value = S::Value;
95439544 type Uri = S::Uri;
95449544- type Cid = S::Cid;
95459545- type Value = S::Value;
95459545+ type IndexedAt = S::IndexedAt;
95469546 type Blobs = Set<members::blobs>;
95479547- type IndexedAt = S::IndexedAt;
95489547 type Moderation = S::Moderation;
95499548 type Repo = S::Repo;
95509550- }
95519551- ///State transition - sets the `indexed_at` field to Set
95529552- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
95539553- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
95549554- impl<S: State> State for SetIndexedAt<S> {
95559555- type Uri = S::Uri;
95569549 type Cid = S::Cid;
95579557- type Value = S::Value;
95589558- type Blobs = S::Blobs;
95599559- type IndexedAt = Set<members::indexed_at>;
95609560- type Moderation = S::Moderation;
95619561- type Repo = S::Repo;
95629550 }
95639551 ///State transition - sets the `moderation` field to Set
95649552 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
95659553 impl<S: State> sealed::Sealed for SetModeration<S> {}
95669554 impl<S: State> State for SetModeration<S> {
95559555+ type Value = S::Value;
95679556 type Uri = S::Uri;
95689568- type Cid = S::Cid;
95699569- type Value = S::Value;
95709570- type Blobs = S::Blobs;
95719557 type IndexedAt = S::IndexedAt;
95589558+ type Blobs = S::Blobs;
95729559 type Moderation = Set<members::moderation>;
95739560 type Repo = S::Repo;
95619561+ type Cid = S::Cid;
95749562 }
95759563 ///State transition - sets the `repo` field to Set
95769564 pub struct SetRepo<S: State = Empty>(PhantomData<fn() -> S>);
95779565 impl<S: State> sealed::Sealed for SetRepo<S> {}
95789566 impl<S: State> State for SetRepo<S> {
95679567+ type Value = S::Value;
95799568 type Uri = S::Uri;
95699569+ type IndexedAt = S::IndexedAt;
95709570+ type Blobs = S::Blobs;
95719571+ type Moderation = S::Moderation;
95729572+ type Repo = Set<members::repo>;
95809573 type Cid = S::Cid;
95749574+ }
95759575+ ///State transition - sets the `cid` field to Set
95769576+ pub struct SetCid<S: State = Empty>(PhantomData<fn() -> S>);
95779577+ impl<S: State> sealed::Sealed for SetCid<S> {}
95789578+ impl<S: State> State for SetCid<S> {
95819579 type Value = S::Value;
95809580+ type Uri = S::Uri;
95819581+ type IndexedAt = S::IndexedAt;
95829582 type Blobs = S::Blobs;
95839583- type IndexedAt = S::IndexedAt;
95849583 type Moderation = S::Moderation;
95859585- type Repo = Set<members::repo>;
95849584+ type Repo = S::Repo;
95859585+ type Cid = Set<members::cid>;
95869586 }
95879587 /// Marker types for field names
95889588 #[allow(non_camel_case_types)]
95899589 pub mod members {
95909590+ ///Marker type for the `value` field
95919591+ pub struct value(());
95909592 ///Marker type for the `uri` field
95919593 pub struct uri(());
95929592- ///Marker type for the `cid` field
95939593- pub struct cid(());
95949594- ///Marker type for the `value` field
95959595- pub struct value(());
95949594+ ///Marker type for the `indexed_at` field
95959595+ pub struct indexed_at(());
95969596 ///Marker type for the `blobs` field
95979597 pub struct blobs(());
95989598- ///Marker type for the `indexed_at` field
95999599- pub struct indexed_at(());
96009598 ///Marker type for the `moderation` field
96019599 pub struct moderation(());
96029600 ///Marker type for the `repo` field
96039601 pub struct repo(());
96029602+ ///Marker type for the `cid` field
96039603+ pub struct cid(());
96049604 }
96059605}
96069606···97939793impl<'a, S> RecordViewDetailBuilder<'a, S>
97949794where
97959795 S: record_view_detail_state::State,
97969796- S::Uri: record_view_detail_state::IsSet,
97979797- S::Cid: record_view_detail_state::IsSet,
97989796 S::Value: record_view_detail_state::IsSet,
97999799- S::Blobs: record_view_detail_state::IsSet,
97979797+ S::Uri: record_view_detail_state::IsSet,
98009798 S::IndexedAt: record_view_detail_state::IsSet,
97999799+ S::Blobs: record_view_detail_state::IsSet,
98019800 S::Moderation: record_view_detail_state::IsSet,
98029801 S::Repo: record_view_detail_state::IsSet,
98029802+ S::Cid: record_view_detail_state::IsSet,
98039803{
98049804 /// Build the final struct
98059805 pub fn build(self) -> RecordViewDetail<'a> {
···1010010100 }
1010110101 /// State trait tracking which required fields have been set
1010210102 pub trait State: sealed::Sealed {
1010310103- type Did;
1010310103+ type IndexedAt;
1010410104 type Handle;
1010510105+ type Did;
1010510106 type RelatedRecords;
1010610106- type IndexedAt;
1010710107 type Moderation;
1010810108 }
1010910109 /// Empty state - all required fields are unset
1011010110 pub struct Empty(());
1011110111 impl sealed::Sealed for Empty {}
1011210112 impl State for Empty {
1011310113- type Did = Unset;
1011310113+ type IndexedAt = Unset;
1011410114 type Handle = Unset;
1011510115+ type Did = Unset;
1011510116 type RelatedRecords = Unset;
1011610116- type IndexedAt = Unset;
1011710117 type Moderation = Unset;
1011810118 }
1011910119- ///State transition - sets the `did` field to Set
1012010120- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1012110121- impl<S: State> sealed::Sealed for SetDid<S> {}
1012210122- impl<S: State> State for SetDid<S> {
1012310123- type Did = Set<members::did>;
1011910119+ ///State transition - sets the `indexed_at` field to Set
1012010120+ pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1012110121+ impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1012210122+ impl<S: State> State for SetIndexedAt<S> {
1012310123+ type IndexedAt = Set<members::indexed_at>;
1012410124 type Handle = S::Handle;
1012510125+ type Did = S::Did;
1012510126 type RelatedRecords = S::RelatedRecords;
1012610126- type IndexedAt = S::IndexedAt;
1012710127 type Moderation = S::Moderation;
1012810128 }
1012910129 ///State transition - sets the `handle` field to Set
1013010130 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1013110131 impl<S: State> sealed::Sealed for SetHandle<S> {}
1013210132 impl<S: State> State for SetHandle<S> {
1013310133- type Did = S::Did;
1013310133+ type IndexedAt = S::IndexedAt;
1013410134 type Handle = Set<members::handle>;
1013510135+ type Did = S::Did;
1013510136 type RelatedRecords = S::RelatedRecords;
1013710137+ type Moderation = S::Moderation;
1013810138+ }
1013910139+ ///State transition - sets the `did` field to Set
1014010140+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1014110141+ impl<S: State> sealed::Sealed for SetDid<S> {}
1014210142+ impl<S: State> State for SetDid<S> {
1013610143 type IndexedAt = S::IndexedAt;
1014410144+ type Handle = S::Handle;
1014510145+ type Did = Set<members::did>;
1014610146+ type RelatedRecords = S::RelatedRecords;
1013710147 type Moderation = S::Moderation;
1013810148 }
1013910149 ///State transition - sets the `related_records` field to Set
1014010150 pub struct SetRelatedRecords<S: State = Empty>(PhantomData<fn() -> S>);
1014110151 impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1014210152 impl<S: State> State for SetRelatedRecords<S> {
1015310153+ type IndexedAt = S::IndexedAt;
1015410154+ type Handle = S::Handle;
1014310155 type Did = S::Did;
1014410144- type Handle = S::Handle;
1014510156 type RelatedRecords = Set<members::related_records>;
1014610146- type IndexedAt = S::IndexedAt;
1014710147- type Moderation = S::Moderation;
1014810148- }
1014910149- ///State transition - sets the `indexed_at` field to Set
1015010150- pub struct SetIndexedAt<S: State = Empty>(PhantomData<fn() -> S>);
1015110151- impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1015210152- impl<S: State> State for SetIndexedAt<S> {
1015310153- type Did = S::Did;
1015410154- type Handle = S::Handle;
1015510155- type RelatedRecords = S::RelatedRecords;
1015610156- type IndexedAt = Set<members::indexed_at>;
1015710157 type Moderation = S::Moderation;
1015810158 }
1015910159 ///State transition - sets the `moderation` field to Set
1016010160 pub struct SetModeration<S: State = Empty>(PhantomData<fn() -> S>);
1016110161 impl<S: State> sealed::Sealed for SetModeration<S> {}
1016210162 impl<S: State> State for SetModeration<S> {
1016310163- type Did = S::Did;
1016310163+ type IndexedAt = S::IndexedAt;
1016410164 type Handle = S::Handle;
1016510165+ type Did = S::Did;
1016510166 type RelatedRecords = S::RelatedRecords;
1016610166- type IndexedAt = S::IndexedAt;
1016710167 type Moderation = Set<members::moderation>;
1016810168 }
1016910169 /// Marker types for field names
1017010170 #[allow(non_camel_case_types)]
1017110171 pub mod members {
1017210172- ///Marker type for the `did` field
1017310173- pub struct did(());
1017210172+ ///Marker type for the `indexed_at` field
1017310173+ pub struct indexed_at(());
1017410174 ///Marker type for the `handle` field
1017510175 pub struct handle(());
1017610176+ ///Marker type for the `did` field
1017710177+ pub struct did(());
1017610178 ///Marker type for the `related_records` field
1017710179 pub struct related_records(());
1017810178- ///Marker type for the `indexed_at` field
1017910179- pub struct indexed_at(());
1018010180 ///Marker type for the `moderation` field
1018110181 pub struct moderation(());
1018210182 }
···1043410434impl<'a, S> RepoViewBuilder<'a, S>
1043510435where
1043610436 S: repo_view_state::State,
1043710437- S::Did: repo_view_state::IsSet,
1043710437+ S::IndexedAt: repo_view_state::IsSet,
1043810438 S::Handle: repo_view_state::IsSet,
1043910439+ S::Did: repo_view_state::IsSet,
1043910440 S::RelatedRecords: repo_view_state::IsSet,
1044010440- S::IndexedAt: repo_view_state::IsSet,
1044110441 S::Moderation: repo_view_state::IsSet,
1044210442{
1044310443 /// Build the final struct
···1056110561 /// State trait tracking which required fields have been set
1056210562 pub trait State: sealed::Sealed {
1056310563 type Did;
1056410564- type Handle;
1056510564 type RelatedRecords;
1056610565 type IndexedAt;
1056610566+ type Handle;
1056710567 type Moderation;
1056810568 }
1056910569 /// Empty state - all required fields are unset
···1057110571 impl sealed::Sealed for Empty {}
1057210572 impl State for Empty {
1057310573 type Did = Unset;
1057410574- type Handle = Unset;
1057510574 type RelatedRecords = Unset;
1057610575 type IndexedAt = Unset;
1057610576+ type Handle = Unset;
1057710577 type Moderation = Unset;
1057810578 }
1057910579 ///State transition - sets the `did` field to Set
···1058110581 impl<S: State> sealed::Sealed for SetDid<S> {}
1058210582 impl<S: State> State for SetDid<S> {
1058310583 type Did = Set<members::did>;
1058410584- type Handle = S::Handle;
1058510584 type RelatedRecords = S::RelatedRecords;
1058610585 type IndexedAt = S::IndexedAt;
1058710587- type Moderation = S::Moderation;
1058810588- }
1058910589- ///State transition - sets the `handle` field to Set
1059010590- pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1059110591- impl<S: State> sealed::Sealed for SetHandle<S> {}
1059210592- impl<S: State> State for SetHandle<S> {
1059310593- type Did = S::Did;
1059410594- type Handle = Set<members::handle>;
1059510595- type RelatedRecords = S::RelatedRecords;
1059610596- type IndexedAt = S::IndexedAt;
1058610586+ type Handle = S::Handle;
1059710587 type Moderation = S::Moderation;
1059810588 }
1059910589 ///State transition - sets the `related_records` field to Set
···1060110591 impl<S: State> sealed::Sealed for SetRelatedRecords<S> {}
1060210592 impl<S: State> State for SetRelatedRecords<S> {
1060310593 type Did = S::Did;
1060410604- type Handle = S::Handle;
1060510594 type RelatedRecords = Set<members::related_records>;
1060610595 type IndexedAt = S::IndexedAt;
1059610596+ type Handle = S::Handle;
1060710597 type Moderation = S::Moderation;
1060810598 }
1060910599 ///State transition - sets the `indexed_at` field to Set
···1061110601 impl<S: State> sealed::Sealed for SetIndexedAt<S> {}
1061210602 impl<S: State> State for SetIndexedAt<S> {
1061310603 type Did = S::Did;
1060410604+ type RelatedRecords = S::RelatedRecords;
1060510605+ type IndexedAt = Set<members::indexed_at>;
1061410606 type Handle = S::Handle;
1060710607+ type Moderation = S::Moderation;
1060810608+ }
1060910609+ ///State transition - sets the `handle` field to Set
1061010610+ pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
1061110611+ impl<S: State> sealed::Sealed for SetHandle<S> {}
1061210612+ impl<S: State> State for SetHandle<S> {
1061310613+ type Did = S::Did;
1061510614 type RelatedRecords = S::RelatedRecords;
1061610616- type IndexedAt = Set<members::indexed_at>;
1061510615+ type IndexedAt = S::IndexedAt;
1061610616+ type Handle = Set<members::handle>;
1061710617 type Moderation = S::Moderation;
1061810618 }
1061910619 ///State transition - sets the `moderation` field to Set
···1062110621 impl<S: State> sealed::Sealed for SetModeration<S> {}
1062210622 impl<S: State> State for SetModeration<S> {
1062310623 type Did = S::Did;
1062410624- type Handle = S::Handle;
1062510624 type RelatedRecords = S::RelatedRecords;
1062610625 type IndexedAt = S::IndexedAt;
1062610626+ type Handle = S::Handle;
1062710627 type Moderation = Set<members::moderation>;
1062810628 }
1062910629 /// Marker types for field names
···1063110631 pub mod members {
1063210632 ///Marker type for the `did` field
1063310633 pub struct did(());
1063410634- ///Marker type for the `handle` field
1063510635- pub struct handle(());
1063610634 ///Marker type for the `related_records` field
1063710635 pub struct related_records(());
1063810636 ///Marker type for the `indexed_at` field
1063910637 pub struct indexed_at(());
1063810638+ ///Marker type for the `handle` field
1063910639+ pub struct handle(());
1064010640 ///Marker type for the `moderation` field
1064110641 pub struct moderation(());
1064210642 }
···1095810958where
1095910959 S: repo_view_detail_state::State,
1096010960 S::Did: repo_view_detail_state::IsSet,
1096110961- S::Handle: repo_view_detail_state::IsSet,
1096210961 S::RelatedRecords: repo_view_detail_state::IsSet,
1096310962 S::IndexedAt: repo_view_detail_state::IsSet,
1096310963+ S::Handle: repo_view_detail_state::IsSet,
1096410964 S::Moderation: repo_view_detail_state::IsSet,
1096510965{
1096610966 /// Build the final struct
···1120811208 }
1120911209 /// State trait tracking which required fields have been set
1121011210 pub trait State: sealed::Sealed {
1121111211- type Did;
1121211211 type AccountReportCount;
1121311212 type RecordReportCount;
1121411213 type ReportedAccountCount;
1121511215- type ReportedRecordCount;
1121611216- type TakendownAccountCount;
1121711217- type TakendownRecordCount;
1121811214 type LabeledAccountCount;
1121511215+ type TakendownAccountCount;
1121911216 type LabeledRecordCount;
1121711217+ type Did;
1121811218+ type TakendownRecordCount;
1121911219+ type ReportedRecordCount;
1122011220 }
1122111221 /// Empty state - all required fields are unset
1122211222 pub struct Empty(());
1122311223 impl sealed::Sealed for Empty {}
1122411224 impl State for Empty {
1122511225- type Did = Unset;
1122611225 type AccountReportCount = Unset;
1122711226 type RecordReportCount = Unset;
1122811227 type ReportedAccountCount = Unset;
1122911229- type ReportedRecordCount = Unset;
1123011230- type TakendownAccountCount = Unset;
1123111231- type TakendownRecordCount = Unset;
1123211228 type LabeledAccountCount = Unset;
1122911229+ type TakendownAccountCount = Unset;
1123311230 type LabeledRecordCount = Unset;
1123411234- }
1123511235- ///State transition - sets the `did` field to Set
1123611236- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1123711237- impl<S: State> sealed::Sealed for SetDid<S> {}
1123811238- impl<S: State> State for SetDid<S> {
1123911239- type Did = Set<members::did>;
1124011240- type AccountReportCount = S::AccountReportCount;
1124111241- type RecordReportCount = S::RecordReportCount;
1124211242- type ReportedAccountCount = S::ReportedAccountCount;
1124311243- type ReportedRecordCount = S::ReportedRecordCount;
1124411244- type TakendownAccountCount = S::TakendownAccountCount;
1124511245- type TakendownRecordCount = S::TakendownRecordCount;
1124611246- type LabeledAccountCount = S::LabeledAccountCount;
1124711247- type LabeledRecordCount = S::LabeledRecordCount;
1123111231+ type Did = Unset;
1123211232+ type TakendownRecordCount = Unset;
1123311233+ type ReportedRecordCount = Unset;
1124811234 }
1124911235 ///State transition - sets the `account_report_count` field to Set
1125011236 pub struct SetAccountReportCount<S: State = Empty>(PhantomData<fn() -> S>);
1125111237 impl<S: State> sealed::Sealed for SetAccountReportCount<S> {}
1125211238 impl<S: State> State for SetAccountReportCount<S> {
1125311253- type Did = S::Did;
1125411239 type AccountReportCount = Set<members::account_report_count>;
1125511240 type RecordReportCount = S::RecordReportCount;
1125611241 type ReportedAccountCount = S::ReportedAccountCount;
1125711257- type ReportedRecordCount = S::ReportedRecordCount;
1124211242+ type LabeledAccountCount = S::LabeledAccountCount;
1125811243 type TakendownAccountCount = S::TakendownAccountCount;
1125911259- type TakendownRecordCount = S::TakendownRecordCount;
1126011260- type LabeledAccountCount = S::LabeledAccountCount;
1126111244 type LabeledRecordCount = S::LabeledRecordCount;
1124511245+ type Did = S::Did;
1124611246+ type TakendownRecordCount = S::TakendownRecordCount;
1124711247+ type ReportedRecordCount = S::ReportedRecordCount;
1126211248 }
1126311249 ///State transition - sets the `record_report_count` field to Set
1126411250 pub struct SetRecordReportCount<S: State = Empty>(PhantomData<fn() -> S>);
1126511251 impl<S: State> sealed::Sealed for SetRecordReportCount<S> {}
1126611252 impl<S: State> State for SetRecordReportCount<S> {
1126711267- type Did = S::Did;
1126811253 type AccountReportCount = S::AccountReportCount;
1126911254 type RecordReportCount = Set<members::record_report_count>;
1127011255 type ReportedAccountCount = S::ReportedAccountCount;
1127111271- type ReportedRecordCount = S::ReportedRecordCount;
1127211272- type TakendownAccountCount = S::TakendownAccountCount;
1127311273- type TakendownRecordCount = S::TakendownRecordCount;
1127411256 type LabeledAccountCount = S::LabeledAccountCount;
1125711257+ type TakendownAccountCount = S::TakendownAccountCount;
1127511258 type LabeledRecordCount = S::LabeledRecordCount;
1125911259+ type Did = S::Did;
1126011260+ type TakendownRecordCount = S::TakendownRecordCount;
1126111261+ type ReportedRecordCount = S::ReportedRecordCount;
1127611262 }
1127711263 ///State transition - sets the `reported_account_count` field to Set
1127811264 pub struct SetReportedAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1127911265 impl<S: State> sealed::Sealed for SetReportedAccountCount<S> {}
1128011266 impl<S: State> State for SetReportedAccountCount<S> {
1128111281- type Did = S::Did;
1128211267 type AccountReportCount = S::AccountReportCount;
1128311268 type RecordReportCount = S::RecordReportCount;
1128411269 type ReportedAccountCount = Set<members::reported_account_count>;
1128511285- type ReportedRecordCount = S::ReportedRecordCount;
1127011270+ type LabeledAccountCount = S::LabeledAccountCount;
1128611271 type TakendownAccountCount = S::TakendownAccountCount;
1128711287- type TakendownRecordCount = S::TakendownRecordCount;
1128811288- type LabeledAccountCount = S::LabeledAccountCount;
1128911272 type LabeledRecordCount = S::LabeledRecordCount;
1127311273+ type Did = S::Did;
1127411274+ type TakendownRecordCount = S::TakendownRecordCount;
1127511275+ type ReportedRecordCount = S::ReportedRecordCount;
1129011276 }
1129111291- ///State transition - sets the `reported_record_count` field to Set
1129211292- pub struct SetReportedRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1129311293- impl<S: State> sealed::Sealed for SetReportedRecordCount<S> {}
1129411294- impl<S: State> State for SetReportedRecordCount<S> {
1129511295- type Did = S::Did;
1127711277+ ///State transition - sets the `labeled_account_count` field to Set
1127811278+ pub struct SetLabeledAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1127911279+ impl<S: State> sealed::Sealed for SetLabeledAccountCount<S> {}
1128011280+ impl<S: State> State for SetLabeledAccountCount<S> {
1129611281 type AccountReportCount = S::AccountReportCount;
1129711282 type RecordReportCount = S::RecordReportCount;
1129811283 type ReportedAccountCount = S::ReportedAccountCount;
1129911299- type ReportedRecordCount = Set<members::reported_record_count>;
1128411284+ type LabeledAccountCount = Set<members::labeled_account_count>;
1130011285 type TakendownAccountCount = S::TakendownAccountCount;
1130111301- type TakendownRecordCount = S::TakendownRecordCount;
1130211302- type LabeledAccountCount = S::LabeledAccountCount;
1130311286 type LabeledRecordCount = S::LabeledRecordCount;
1128711287+ type Did = S::Did;
1128811288+ type TakendownRecordCount = S::TakendownRecordCount;
1128911289+ type ReportedRecordCount = S::ReportedRecordCount;
1130411290 }
1130511291 ///State transition - sets the `takendown_account_count` field to Set
1130611292 pub struct SetTakendownAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1130711293 impl<S: State> sealed::Sealed for SetTakendownAccountCount<S> {}
1130811294 impl<S: State> State for SetTakendownAccountCount<S> {
1130911309- type Did = S::Did;
1131011295 type AccountReportCount = S::AccountReportCount;
1131111296 type RecordReportCount = S::RecordReportCount;
1131211297 type ReportedAccountCount = S::ReportedAccountCount;
1131311313- type ReportedRecordCount = S::ReportedRecordCount;
1129811298+ type LabeledAccountCount = S::LabeledAccountCount;
1131411299 type TakendownAccountCount = Set<members::takendown_account_count>;
1130011300+ type LabeledRecordCount = S::LabeledRecordCount;
1130111301+ type Did = S::Did;
1131511302 type TakendownRecordCount = S::TakendownRecordCount;
1130311303+ type ReportedRecordCount = S::ReportedRecordCount;
1130411304+ }
1130511305+ ///State transition - sets the `labeled_record_count` field to Set
1130611306+ pub struct SetLabeledRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1130711307+ impl<S: State> sealed::Sealed for SetLabeledRecordCount<S> {}
1130811308+ impl<S: State> State for SetLabeledRecordCount<S> {
1130911309+ type AccountReportCount = S::AccountReportCount;
1131011310+ type RecordReportCount = S::RecordReportCount;
1131111311+ type ReportedAccountCount = S::ReportedAccountCount;
1131611312 type LabeledAccountCount = S::LabeledAccountCount;
1131311313+ type TakendownAccountCount = S::TakendownAccountCount;
1131411314+ type LabeledRecordCount = Set<members::labeled_record_count>;
1131511315+ type Did = S::Did;
1131611316+ type TakendownRecordCount = S::TakendownRecordCount;
1131711317+ type ReportedRecordCount = S::ReportedRecordCount;
1131811318+ }
1131911319+ ///State transition - sets the `did` field to Set
1132011320+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1132111321+ impl<S: State> sealed::Sealed for SetDid<S> {}
1132211322+ impl<S: State> State for SetDid<S> {
1132311323+ type AccountReportCount = S::AccountReportCount;
1132411324+ type RecordReportCount = S::RecordReportCount;
1132511325+ type ReportedAccountCount = S::ReportedAccountCount;
1132611326+ type LabeledAccountCount = S::LabeledAccountCount;
1132711327+ type TakendownAccountCount = S::TakendownAccountCount;
1131711328 type LabeledRecordCount = S::LabeledRecordCount;
1132911329+ type Did = Set<members::did>;
1133011330+ type TakendownRecordCount = S::TakendownRecordCount;
1133111331+ type ReportedRecordCount = S::ReportedRecordCount;
1131811332 }
1131911333 ///State transition - sets the `takendown_record_count` field to Set
1132011334 pub struct SetTakendownRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1132111335 impl<S: State> sealed::Sealed for SetTakendownRecordCount<S> {}
1132211336 impl<S: State> State for SetTakendownRecordCount<S> {
1132311323- type Did = S::Did;
1132411337 type AccountReportCount = S::AccountReportCount;
1132511338 type RecordReportCount = S::RecordReportCount;
1132611339 type ReportedAccountCount = S::ReportedAccountCount;
1132711327- type ReportedRecordCount = S::ReportedRecordCount;
1132811328- type TakendownAccountCount = S::TakendownAccountCount;
1132911329- type TakendownRecordCount = Set<members::takendown_record_count>;
1133011340 type LabeledAccountCount = S::LabeledAccountCount;
1134111341+ type TakendownAccountCount = S::TakendownAccountCount;
1133111342 type LabeledRecordCount = S::LabeledRecordCount;
1134311343+ type Did = S::Did;
1134411344+ type TakendownRecordCount = Set<members::takendown_record_count>;
1134511345+ type ReportedRecordCount = S::ReportedRecordCount;
1133211346 }
1133311333- ///State transition - sets the `labeled_account_count` field to Set
1133411334- pub struct SetLabeledAccountCount<S: State = Empty>(PhantomData<fn() -> S>);
1133511335- impl<S: State> sealed::Sealed for SetLabeledAccountCount<S> {}
1133611336- impl<S: State> State for SetLabeledAccountCount<S> {
1133711337- type Did = S::Did;
1134711347+ ///State transition - sets the `reported_record_count` field to Set
1134811348+ pub struct SetReportedRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1134911349+ impl<S: State> sealed::Sealed for SetReportedRecordCount<S> {}
1135011350+ impl<S: State> State for SetReportedRecordCount<S> {
1133811351 type AccountReportCount = S::AccountReportCount;
1133911352 type RecordReportCount = S::RecordReportCount;
1134011353 type ReportedAccountCount = S::ReportedAccountCount;
1134111341- type ReportedRecordCount = S::ReportedRecordCount;
1135411354+ type LabeledAccountCount = S::LabeledAccountCount;
1134211355 type TakendownAccountCount = S::TakendownAccountCount;
1134311343- type TakendownRecordCount = S::TakendownRecordCount;
1134411344- type LabeledAccountCount = Set<members::labeled_account_count>;
1134511356 type LabeledRecordCount = S::LabeledRecordCount;
1134611346- }
1134711347- ///State transition - sets the `labeled_record_count` field to Set
1134811348- pub struct SetLabeledRecordCount<S: State = Empty>(PhantomData<fn() -> S>);
1134911349- impl<S: State> sealed::Sealed for SetLabeledRecordCount<S> {}
1135011350- impl<S: State> State for SetLabeledRecordCount<S> {
1135111357 type Did = S::Did;
1135211352- type AccountReportCount = S::AccountReportCount;
1135311353- type RecordReportCount = S::RecordReportCount;
1135411354- type ReportedAccountCount = S::ReportedAccountCount;
1135511355- type ReportedRecordCount = S::ReportedRecordCount;
1135611356- type TakendownAccountCount = S::TakendownAccountCount;
1135711358 type TakendownRecordCount = S::TakendownRecordCount;
1135811358- type LabeledAccountCount = S::LabeledAccountCount;
1135911359- type LabeledRecordCount = Set<members::labeled_record_count>;
1135911359+ type ReportedRecordCount = Set<members::reported_record_count>;
1136011360 }
1136111361 /// Marker types for field names
1136211362 #[allow(non_camel_case_types)]
1136311363 pub mod members {
1136411364- ///Marker type for the `did` field
1136511365- pub struct did(());
1136611364 ///Marker type for the `account_report_count` field
1136711365 pub struct account_report_count(());
1136811366 ///Marker type for the `record_report_count` field
1136911367 pub struct record_report_count(());
1137011368 ///Marker type for the `reported_account_count` field
1137111369 pub struct reported_account_count(());
1137211372- ///Marker type for the `reported_record_count` field
1137311373- pub struct reported_record_count(());
1137011370+ ///Marker type for the `labeled_account_count` field
1137111371+ pub struct labeled_account_count(());
1137411372 ///Marker type for the `takendown_account_count` field
1137511373 pub struct takendown_account_count(());
1137411374+ ///Marker type for the `labeled_record_count` field
1137511375+ pub struct labeled_record_count(());
1137611376+ ///Marker type for the `did` field
1137711377+ pub struct did(());
1137611378 ///Marker type for the `takendown_record_count` field
1137711379 pub struct takendown_record_count(());
1137811378- ///Marker type for the `labeled_account_count` field
1137911379- pub struct labeled_account_count(());
1138011380- ///Marker type for the `labeled_record_count` field
1138111381- pub struct labeled_record_count(());
1138011380+ ///Marker type for the `reported_record_count` field
1138111381+ pub struct reported_record_count(());
1138211382 }
1138311383}
1138411384···1160111601impl<'a, S> ReporterStatsBuilder<'a, S>
1160211602where
1160311603 S: reporter_stats_state::State,
1160411604- S::Did: reporter_stats_state::IsSet,
1160511604 S::AccountReportCount: reporter_stats_state::IsSet,
1160611605 S::RecordReportCount: reporter_stats_state::IsSet,
1160711606 S::ReportedAccountCount: reporter_stats_state::IsSet,
1160811608- S::ReportedRecordCount: reporter_stats_state::IsSet,
1160711607+ S::LabeledAccountCount: reporter_stats_state::IsSet,
1160911608 S::TakendownAccountCount: reporter_stats_state::IsSet,
1160911609+ S::LabeledRecordCount: reporter_stats_state::IsSet,
1161011610+ S::Did: reporter_stats_state::IsSet,
1161011611 S::TakendownRecordCount: reporter_stats_state::IsSet,
1161111611- S::LabeledAccountCount: reporter_stats_state::IsSet,
1161211612- S::LabeledRecordCount: reporter_stats_state::IsSet,
1161211612+ S::ReportedRecordCount: reporter_stats_state::IsSet,
1161311613{
1161411614 /// Build the final struct
1161511615 pub fn build(self) -> ReporterStats<'a> {
···1188811888 /// State trait tracking which required fields have been set
1188911889 pub trait State: sealed::Sealed {
1189011890 type Id;
1189111891- type Action;
1189211892- type Did;
1189111891+ type Status;
1189311892 type CreatedBy;
1189311893+ type Action;
1189411894 type CreatedAt;
1189511895- type Status;
1189511895+ type Did;
1189611896 }
1189711897 /// Empty state - all required fields are unset
1189811898 pub struct Empty(());
1189911899 impl sealed::Sealed for Empty {}
1190011900 impl State for Empty {
1190111901 type Id = Unset;
1190211902- type Action = Unset;
1190311903- type Did = Unset;
1190211902+ type Status = Unset;
1190411903 type CreatedBy = Unset;
1190411904+ type Action = Unset;
1190511905 type CreatedAt = Unset;
1190611906- type Status = Unset;
1190611906+ type Did = Unset;
1190711907 }
1190811908 ///State transition - sets the `id` field to Set
1190911909 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
1191011910 impl<S: State> sealed::Sealed for SetId<S> {}
1191111911 impl<S: State> State for SetId<S> {
1191211912 type Id = Set<members::id>;
1191311913- type Action = S::Action;
1191411914- type Did = S::Did;
1191311913+ type Status = S::Status;
1191511914 type CreatedBy = S::CreatedBy;
1191511915+ type Action = S::Action;
1191611916 type CreatedAt = S::CreatedAt;
1191711917- type Status = S::Status;
1191711917+ type Did = S::Did;
1191811918 }
1191911919- ///State transition - sets the `action` field to Set
1192011920- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
1192111921- impl<S: State> sealed::Sealed for SetAction<S> {}
1192211922- impl<S: State> State for SetAction<S> {
1191911919+ ///State transition - sets the `status` field to Set
1192011920+ pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
1192111921+ impl<S: State> sealed::Sealed for SetStatus<S> {}
1192211922+ impl<S: State> State for SetStatus<S> {
1192311923 type Id = S::Id;
1192411924- type Action = Set<members::action>;
1192511925- type Did = S::Did;
1192411924+ type Status = Set<members::status>;
1192611925 type CreatedBy = S::CreatedBy;
1192711927- type CreatedAt = S::CreatedAt;
1192811928- type Status = S::Status;
1192911929- }
1193011930- ///State transition - sets the `did` field to Set
1193111931- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1193211932- impl<S: State> sealed::Sealed for SetDid<S> {}
1193311933- impl<S: State> State for SetDid<S> {
1193411934- type Id = S::Id;
1193511926 type Action = S::Action;
1193611936- type Did = Set<members::did>;
1193711937- type CreatedBy = S::CreatedBy;
1193811927 type CreatedAt = S::CreatedAt;
1193911939- type Status = S::Status;
1192811928+ type Did = S::Did;
1194011929 }
1194111930 ///State transition - sets the `created_by` field to Set
1194211931 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
1194311932 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
1194411933 impl<S: State> State for SetCreatedBy<S> {
1194511934 type Id = S::Id;
1194611946- type Action = S::Action;
1194711947- type Did = S::Did;
1193511935+ type Status = S::Status;
1194811936 type CreatedBy = Set<members::created_by>;
1193711937+ type Action = S::Action;
1194911938 type CreatedAt = S::CreatedAt;
1193911939+ type Did = S::Did;
1194011940+ }
1194111941+ ///State transition - sets the `action` field to Set
1194211942+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
1194311943+ impl<S: State> sealed::Sealed for SetAction<S> {}
1194411944+ impl<S: State> State for SetAction<S> {
1194511945+ type Id = S::Id;
1195011946 type Status = S::Status;
1194711947+ type CreatedBy = S::CreatedBy;
1194811948+ type Action = Set<members::action>;
1194911949+ type CreatedAt = S::CreatedAt;
1195011950+ type Did = S::Did;
1195111951 }
1195211952 ///State transition - sets the `created_at` field to Set
1195311953 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1195411954 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
1195511955 impl<S: State> State for SetCreatedAt<S> {
1195611956 type Id = S::Id;
1195711957- type Action = S::Action;
1195811958- type Did = S::Did;
1195711957+ type Status = S::Status;
1195911958 type CreatedBy = S::CreatedBy;
1195911959+ type Action = S::Action;
1196011960 type CreatedAt = Set<members::created_at>;
1196111961- type Status = S::Status;
1196111961+ type Did = S::Did;
1196211962 }
1196311963- ///State transition - sets the `status` field to Set
1196411964- pub struct SetStatus<S: State = Empty>(PhantomData<fn() -> S>);
1196511965- impl<S: State> sealed::Sealed for SetStatus<S> {}
1196611966- impl<S: State> State for SetStatus<S> {
1196311963+ ///State transition - sets the `did` field to Set
1196411964+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
1196511965+ impl<S: State> sealed::Sealed for SetDid<S> {}
1196611966+ impl<S: State> State for SetDid<S> {
1196711967 type Id = S::Id;
1196811968- type Action = S::Action;
1196911969- type Did = S::Did;
1196811968+ type Status = S::Status;
1197011969 type CreatedBy = S::CreatedBy;
1197011970+ type Action = S::Action;
1197111971 type CreatedAt = S::CreatedAt;
1197211972- type Status = Set<members::status>;
1197211972+ type Did = Set<members::did>;
1197311973 }
1197411974 /// Marker types for field names
1197511975 #[allow(non_camel_case_types)]
1197611976 pub mod members {
1197711977 ///Marker type for the `id` field
1197811978 pub struct id(());
1197911979+ ///Marker type for the `status` field
1198011980+ pub struct status(());
1198111981+ ///Marker type for the `created_by` field
1198211982+ pub struct created_by(());
1197911983 ///Marker type for the `action` field
1198011984 pub struct action(());
1198511985+ ///Marker type for the `created_at` field
1198611986+ pub struct created_at(());
1198111987 ///Marker type for the `did` field
1198211988 pub struct did(());
1198311983- ///Marker type for the `created_by` field
1198411984- pub struct created_by(());
1198511985- ///Marker type for the `created_at` field
1198611986- pub struct created_at(());
1198711987- ///Marker type for the `status` field
1198811988- pub struct status(());
1198911989 }
1199011990}
1199111991···1232312323where
1232412324 S: scheduled_action_view_state::State,
1232512325 S::Id: scheduled_action_view_state::IsSet,
1232612326+ S::Status: scheduled_action_view_state::IsSet,
1232712327+ S::CreatedBy: scheduled_action_view_state::IsSet,
1232612328 S::Action: scheduled_action_view_state::IsSet,
1232712327- S::Did: scheduled_action_view_state::IsSet,
1232812328- S::CreatedBy: scheduled_action_view_state::IsSet,
1232912329 S::CreatedAt: scheduled_action_view_state::IsSet,
1233012330- S::Status: scheduled_action_view_state::IsSet,
1233012330+ S::Did: scheduled_action_view_state::IsSet,
1233112331{
1233212332 /// Build the final struct
1233312333 pub fn build(self) -> ScheduledActionView<'a> {
···1261712617 }
1261812618 /// State trait tracking which required fields have been set
1261912619 pub trait State: sealed::Sealed {
1262012620- type Id;
1262112621- type Subject;
1262212622- type CreatedAt;
1262312620 type UpdatedAt;
1262412621 type ReviewState;
1262212622+ type Id;
1262312623+ type CreatedAt;
1262412624+ type Subject;
1262512625 }
1262612626 /// Empty state - all required fields are unset
1262712627 pub struct Empty(());
1262812628 impl sealed::Sealed for Empty {}
1262912629 impl State for Empty {
1263012630+ type UpdatedAt = Unset;
1263112631+ type ReviewState = Unset;
1263012632 type Id = Unset;
1263312633+ type CreatedAt = Unset;
1263112634 type Subject = Unset;
1263212632- type CreatedAt = Unset;
1263312633- type UpdatedAt = Unset;
1263412634- type ReviewState = Unset;
1263512635+ }
1263612636+ ///State transition - sets the `updated_at` field to Set
1263712637+ pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1263812638+ impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
1263912639+ impl<S: State> State for SetUpdatedAt<S> {
1264012640+ type UpdatedAt = Set<members::updated_at>;
1264112641+ type ReviewState = S::ReviewState;
1264212642+ type Id = S::Id;
1264312643+ type CreatedAt = S::CreatedAt;
1264412644+ type Subject = S::Subject;
1264512645+ }
1264612646+ ///State transition - sets the `review_state` field to Set
1264712647+ pub struct SetReviewState<S: State = Empty>(PhantomData<fn() -> S>);
1264812648+ impl<S: State> sealed::Sealed for SetReviewState<S> {}
1264912649+ impl<S: State> State for SetReviewState<S> {
1265012650+ type UpdatedAt = S::UpdatedAt;
1265112651+ type ReviewState = Set<members::review_state>;
1265212652+ type Id = S::Id;
1265312653+ type CreatedAt = S::CreatedAt;
1265412654+ type Subject = S::Subject;
1263512655 }
1263612656 ///State transition - sets the `id` field to Set
1263712657 pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
1263812658 impl<S: State> sealed::Sealed for SetId<S> {}
1263912659 impl<S: State> State for SetId<S> {
1264012640- type Id = Set<members::id>;
1264112641- type Subject = S::Subject;
1264212642- type CreatedAt = S::CreatedAt;
1264312660 type UpdatedAt = S::UpdatedAt;
1264412661 type ReviewState = S::ReviewState;
1264512645- }
1264612646- ///State transition - sets the `subject` field to Set
1264712647- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
1264812648- impl<S: State> sealed::Sealed for SetSubject<S> {}
1264912649- impl<S: State> State for SetSubject<S> {
1265012650- type Id = S::Id;
1265112651- type Subject = Set<members::subject>;
1266212662+ type Id = Set<members::id>;
1265212663 type CreatedAt = S::CreatedAt;
1265312653- type UpdatedAt = S::UpdatedAt;
1265412654- type ReviewState = S::ReviewState;
1266412664+ type Subject = S::Subject;
1265512665 }
1265612666 ///State transition - sets the `created_at` field to Set
1265712667 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1265812668 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
1265912669 impl<S: State> State for SetCreatedAt<S> {
1266012660- type Id = S::Id;
1266112661- type Subject = S::Subject;
1266212662- type CreatedAt = Set<members::created_at>;
1266312670 type UpdatedAt = S::UpdatedAt;
1266412671 type ReviewState = S::ReviewState;
1266512665- }
1266612666- ///State transition - sets the `updated_at` field to Set
1266712667- pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
1266812668- impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
1266912669- impl<S: State> State for SetUpdatedAt<S> {
1267012672 type Id = S::Id;
1267312673+ type CreatedAt = Set<members::created_at>;
1267112674 type Subject = S::Subject;
1267212672- type CreatedAt = S::CreatedAt;
1267312673- type UpdatedAt = Set<members::updated_at>;
1267412674- type ReviewState = S::ReviewState;
1267512675 }
1267612676- ///State transition - sets the `review_state` field to Set
1267712677- pub struct SetReviewState<S: State = Empty>(PhantomData<fn() -> S>);
1267812678- impl<S: State> sealed::Sealed for SetReviewState<S> {}
1267912679- impl<S: State> State for SetReviewState<S> {
1267612676+ ///State transition - sets the `subject` field to Set
1267712677+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
1267812678+ impl<S: State> sealed::Sealed for SetSubject<S> {}
1267912679+ impl<S: State> State for SetSubject<S> {
1268012680+ type UpdatedAt = S::UpdatedAt;
1268112681+ type ReviewState = S::ReviewState;
1268012682 type Id = S::Id;
1268112681- type Subject = S::Subject;
1268212683 type CreatedAt = S::CreatedAt;
1268312683- type UpdatedAt = S::UpdatedAt;
1268412684- type ReviewState = Set<members::review_state>;
1268412684+ type Subject = Set<members::subject>;
1268512685 }
1268612686 /// Marker types for field names
1268712687 #[allow(non_camel_case_types)]
1268812688 pub mod members {
1268912689+ ///Marker type for the `updated_at` field
1269012690+ pub struct updated_at(());
1269112691+ ///Marker type for the `review_state` field
1269212692+ pub struct review_state(());
1268912693 ///Marker type for the `id` field
1269012694 pub struct id(());
1269512695+ ///Marker type for the `created_at` field
1269612696+ pub struct created_at(());
1269112697 ///Marker type for the `subject` field
1269212698 pub struct subject(());
1269312693- ///Marker type for the `created_at` field
1269412694- pub struct created_at(());
1269512695- ///Marker type for the `updated_at` field
1269612696- pub struct updated_at(());
1269712697- ///Marker type for the `review_state` field
1269812698- pub struct review_state(());
1269912699 }
1270012700}
1270112701···1323013230impl<'a, S> SubjectStatusViewBuilder<'a, S>
1323113231where
1323213232 S: subject_status_view_state::State,
1323313233+ S::UpdatedAt: subject_status_view_state::IsSet,
1323413234+ S::ReviewState: subject_status_view_state::IsSet,
1323313235 S::Id: subject_status_view_state::IsSet,
1323413234- S::Subject: subject_status_view_state::IsSet,
1323513236 S::CreatedAt: subject_status_view_state::IsSet,
1323613236- S::UpdatedAt: subject_status_view_state::IsSet,
1323713237- S::ReviewState: subject_status_view_state::IsSet,
1323713237+ S::Subject: subject_status_view_state::IsSet,
1323813238{
1323913239 /// Build the final struct
1324013240 pub fn build(self) -> SubjectStatusView<'a> {
···1374613746 }
1374713747 /// State trait tracking which required fields have been set
1374813748 pub trait State: sealed::Sealed {
1374913749- type Width;
1375013749 type Height;
1375013750+ type Width;
1375113751 type Length;
1375213752 }
1375313753 /// Empty state - all required fields are unset
1375413754 pub struct Empty(());
1375513755 impl sealed::Sealed for Empty {}
1375613756 impl State for Empty {
1375713757- type Width = Unset;
1375813757 type Height = Unset;
1375813758+ type Width = Unset;
1375913759 type Length = Unset;
1376013760 }
1376113761- ///State transition - sets the `width` field to Set
1376213762- pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
1376313763- impl<S: State> sealed::Sealed for SetWidth<S> {}
1376413764- impl<S: State> State for SetWidth<S> {
1376513765- type Width = Set<members::width>;
1376613766- type Height = S::Height;
1376713767- type Length = S::Length;
1376813768- }
1376913761 ///State transition - sets the `height` field to Set
1377013762 pub struct SetHeight<S: State = Empty>(PhantomData<fn() -> S>);
1377113763 impl<S: State> sealed::Sealed for SetHeight<S> {}
1377213764 impl<S: State> State for SetHeight<S> {
1377313773- type Width = S::Width;
1377413765 type Height = Set<members::height>;
1376613766+ type Width = S::Width;
1376713767+ type Length = S::Length;
1376813768+ }
1376913769+ ///State transition - sets the `width` field to Set
1377013770+ pub struct SetWidth<S: State = Empty>(PhantomData<fn() -> S>);
1377113771+ impl<S: State> sealed::Sealed for SetWidth<S> {}
1377213772+ impl<S: State> State for SetWidth<S> {
1377313773+ type Height = S::Height;
1377413774+ type Width = Set<members::width>;
1377513775 type Length = S::Length;
1377613776 }
1377713777 ///State transition - sets the `length` field to Set
1377813778 pub struct SetLength<S: State = Empty>(PhantomData<fn() -> S>);
1377913779 impl<S: State> sealed::Sealed for SetLength<S> {}
1378013780 impl<S: State> State for SetLength<S> {
1378113781- type Width = S::Width;
1378213781 type Height = S::Height;
1378213782+ type Width = S::Width;
1378313783 type Length = Set<members::length>;
1378413784 }
1378513785 /// Marker types for field names
1378613786 #[allow(non_camel_case_types)]
1378713787 pub mod members {
1378813788+ ///Marker type for the `height` field
1378913789+ pub struct height(());
1378813790 ///Marker type for the `width` field
1378913791 pub struct width(());
1379013790- ///Marker type for the `height` field
1379113791- pub struct height(());
1379213792 ///Marker type for the `length` field
1379313793 pub struct length(());
1379413794 }
···1388313883impl<'a, S> VideoDetailsBuilder<'a, S>
1388413884where
1388513885 S: video_details_state::State,
1388613886- S::Width: video_details_state::IsSet,
1388713886 S::Height: video_details_state::IsSet,
1388713887+ S::Width: video_details_state::IsSet,
1388813888 S::Length: video_details_state::IsSet,
1388913889{
1389013890 /// Build the final struct
···3737 }
3838 /// State trait tracking which required fields have been set
3939 pub trait State: sealed::Sealed {
4040- type Succeeded;
4140 type Failed;
4141+ type Succeeded;
4242 }
4343 /// Empty state - all required fields are unset
4444 pub struct Empty(());
4545 impl sealed::Sealed for Empty {}
4646 impl State for Empty {
4747- type Succeeded = Unset;
4847 type Failed = Unset;
4949- }
5050- ///State transition - sets the `succeeded` field to Set
5151- pub struct SetSucceeded<S: State = Empty>(PhantomData<fn() -> S>);
5252- impl<S: State> sealed::Sealed for SetSucceeded<S> {}
5353- impl<S: State> State for SetSucceeded<S> {
5454- type Succeeded = Set<members::succeeded>;
5555- type Failed = S::Failed;
4848+ type Succeeded = Unset;
5649 }
5750 ///State transition - sets the `failed` field to Set
5851 pub struct SetFailed<S: State = Empty>(PhantomData<fn() -> S>);
5952 impl<S: State> sealed::Sealed for SetFailed<S> {}
6053 impl<S: State> State for SetFailed<S> {
6161- type Succeeded = S::Succeeded;
6254 type Failed = Set<members::failed>;
5555+ type Succeeded = S::Succeeded;
5656+ }
5757+ ///State transition - sets the `succeeded` field to Set
5858+ pub struct SetSucceeded<S: State = Empty>(PhantomData<fn() -> S>);
5959+ impl<S: State> sealed::Sealed for SetSucceeded<S> {}
6060+ impl<S: State> State for SetSucceeded<S> {
6161+ type Failed = S::Failed;
6262+ type Succeeded = Set<members::succeeded>;
6363 }
6464 /// Marker types for field names
6565 #[allow(non_camel_case_types)]
6666 pub mod members {
6767- ///Marker type for the `succeeded` field
6868- pub struct succeeded(());
6967 ///Marker type for the `failed` field
7068 pub struct failed(());
6969+ ///Marker type for the `succeeded` field
7070+ pub struct succeeded(());
7171 }
7272}
7373···152152impl<'a, S> CancellationResultsBuilder<'a, S>
153153where
154154 S: cancellation_results_state::State,
155155- S::Succeeded: cancellation_results_state::IsSet,
156155 S::Failed: cancellation_results_state::IsSet,
156156+ S::Succeeded: cancellation_results_state::IsSet,
157157{
158158 /// Build the final struct
159159 pub fn build(self) -> CancellationResults<'a> {
···4747 }
4848 /// State trait tracking which required fields have been set
4949 pub trait State: sealed::Sealed {
5050- type Event;
5151- type Subject;
5250 type CreatedBy;
5151+ type Subject;
5252+ type Event;
5353 }
5454 /// Empty state - all required fields are unset
5555 pub struct Empty(());
5656 impl sealed::Sealed for Empty {}
5757 impl State for Empty {
5858+ type CreatedBy = Unset;
5959+ type Subject = Unset;
5860 type Event = Unset;
5959- type Subject = Unset;
6060- type CreatedBy = Unset;
6161 }
6262- ///State transition - sets the `event` field to Set
6363- pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
6464- impl<S: State> sealed::Sealed for SetEvent<S> {}
6565- impl<S: State> State for SetEvent<S> {
6666- type Event = Set<members::event>;
6262+ ///State transition - sets the `created_by` field to Set
6363+ pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
6565+ impl<S: State> State for SetCreatedBy<S> {
6666+ type CreatedBy = Set<members::created_by>;
6767 type Subject = S::Subject;
6868- type CreatedBy = S::CreatedBy;
6868+ type Event = S::Event;
6969 }
7070 ///State transition - sets the `subject` field to Set
7171 pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
7272 impl<S: State> sealed::Sealed for SetSubject<S> {}
7373 impl<S: State> State for SetSubject<S> {
7474- type Event = S::Event;
7575- type Subject = Set<members::subject>;
7674 type CreatedBy = S::CreatedBy;
7575+ type Subject = Set<members::subject>;
7676+ type Event = S::Event;
7777 }
7878- ///State transition - sets the `created_by` field to Set
7979- pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
8080- impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
8181- impl<S: State> State for SetCreatedBy<S> {
8282- type Event = S::Event;
7878+ ///State transition - sets the `event` field to Set
7979+ pub struct SetEvent<S: State = Empty>(PhantomData<fn() -> S>);
8080+ impl<S: State> sealed::Sealed for SetEvent<S> {}
8181+ impl<S: State> State for SetEvent<S> {
8282+ type CreatedBy = S::CreatedBy;
8383 type Subject = S::Subject;
8484- type CreatedBy = Set<members::created_by>;
8484+ type Event = Set<members::event>;
8585 }
8686 /// Marker types for field names
8787 #[allow(non_camel_case_types)]
8888 pub mod members {
8989+ ///Marker type for the `created_by` field
9090+ pub struct created_by(());
9191+ ///Marker type for the `subject` field
9292+ pub struct subject(());
8993 ///Marker type for the `event` field
9094 pub struct event(());
9191- ///Marker type for the `subject` field
9292- pub struct subject(());
9393- ///Marker type for the `created_by` field
9494- pub struct created_by(());
9595 }
9696}
9797···244244impl<'a, S> EmitEventBuilder<'a, S>
245245where
246246 S: emit_event_state::State,
247247- S::Event: emit_event_state::IsSet,
248248- S::Subject: emit_event_state::IsSet,
249247 S::CreatedBy: emit_event_state::IsSet,
248248+ S::Subject: emit_event_state::IsSet,
249249+ S::Event: emit_event_state::IsSet,
250250{
251251 /// Build the final struct
252252 pub fn build(self) -> EmitEvent<'a> {
···575575 }
576576 /// State trait tracking which required fields have been set
577577 pub trait State: sealed::Sealed {
578578+ type Count;
578579 type EventSubjectType;
579580 type EventType;
580580- type Count;
581581 }
582582 /// Empty state - all required fields are unset
583583 pub struct Empty(());
584584 impl sealed::Sealed for Empty {}
585585 impl State for Empty {
586586+ type Count = Unset;
586587 type EventSubjectType = Unset;
587588 type EventType = Unset;
588588- type Count = Unset;
589589+ }
590590+ ///State transition - sets the `count` field to Set
591591+ pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
592592+ impl<S: State> sealed::Sealed for SetCount<S> {}
593593+ impl<S: State> State for SetCount<S> {
594594+ type Count = Set<members::count>;
595595+ type EventSubjectType = S::EventSubjectType;
596596+ type EventType = S::EventType;
589597 }
590598 ///State transition - sets the `event_subject_type` field to Set
591599 pub struct SetEventSubjectType<S: State = Empty>(PhantomData<fn() -> S>);
592600 impl<S: State> sealed::Sealed for SetEventSubjectType<S> {}
593601 impl<S: State> State for SetEventSubjectType<S> {
602602+ type Count = S::Count;
594603 type EventSubjectType = Set<members::event_subject_type>;
595604 type EventType = S::EventType;
596596- type Count = S::Count;
597605 }
598606 ///State transition - sets the `event_type` field to Set
599607 pub struct SetEventType<S: State = Empty>(PhantomData<fn() -> S>);
600608 impl<S: State> sealed::Sealed for SetEventType<S> {}
601609 impl<S: State> State for SetEventType<S> {
602602- type EventSubjectType = S::EventSubjectType;
603603- type EventType = Set<members::event_type>;
604610 type Count = S::Count;
605605- }
606606- ///State transition - sets the `count` field to Set
607607- pub struct SetCount<S: State = Empty>(PhantomData<fn() -> S>);
608608- impl<S: State> sealed::Sealed for SetCount<S> {}
609609- impl<S: State> State for SetCount<S> {
610611 type EventSubjectType = S::EventSubjectType;
611611- type EventType = S::EventType;
612612- type Count = Set<members::count>;
612612+ type EventType = Set<members::event_type>;
613613 }
614614 /// Marker types for field names
615615 #[allow(non_camel_case_types)]
616616 pub mod members {
617617+ ///Marker type for the `count` field
618618+ pub struct count(());
617619 ///Marker type for the `event_subject_type` field
618620 pub struct event_subject_type(());
619621 ///Marker type for the `event_type` field
620622 pub struct event_type(());
621621- ///Marker type for the `count` field
622622- pub struct count(());
623623 }
624624}
625625···715715impl<'a, S> TimelineItemSummaryBuilder<'a, S>
716716where
717717 S: timeline_item_summary_state::State,
718718+ S::Count: timeline_item_summary_state::IsSet,
718719 S::EventSubjectType: timeline_item_summary_state::IsSet,
719720 S::EventType: timeline_item_summary_state::IsSet,
720720- S::Count: timeline_item_summary_state::IsSet,
721721{
722722 /// Build the final struct
723723 pub fn build(self) -> TimelineItemSummary<'a> {
···762762 /// State trait tracking which required fields have been set
763763 pub trait State: sealed::Sealed {
764764 type Action;
765765- type Subjects;
766765 type CreatedBy;
767766 type Scheduling;
767767+ type Subjects;
768768 }
769769 /// Empty state - all required fields are unset
770770 pub struct Empty(());
771771 impl sealed::Sealed for Empty {}
772772 impl State for Empty {
773773 type Action = Unset;
774774- type Subjects = Unset;
775774 type CreatedBy = Unset;
776775 type Scheduling = Unset;
776776+ type Subjects = Unset;
777777 }
778778 ///State transition - sets the `action` field to Set
779779 pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
780780 impl<S: State> sealed::Sealed for SetAction<S> {}
781781 impl<S: State> State for SetAction<S> {
782782 type Action = Set<members::action>;
783783- type Subjects = S::Subjects;
784783 type CreatedBy = S::CreatedBy;
785784 type Scheduling = S::Scheduling;
786786- }
787787- ///State transition - sets the `subjects` field to Set
788788- pub struct SetSubjects<S: State = Empty>(PhantomData<fn() -> S>);
789789- impl<S: State> sealed::Sealed for SetSubjects<S> {}
790790- impl<S: State> State for SetSubjects<S> {
791791- type Action = S::Action;
792792- type Subjects = Set<members::subjects>;
793793- type CreatedBy = S::CreatedBy;
794794- type Scheduling = S::Scheduling;
785785+ type Subjects = S::Subjects;
795786 }
796787 ///State transition - sets the `created_by` field to Set
797788 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
798789 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
799790 impl<S: State> State for SetCreatedBy<S> {
800791 type Action = S::Action;
801801- type Subjects = S::Subjects;
802792 type CreatedBy = Set<members::created_by>;
803793 type Scheduling = S::Scheduling;
794794+ type Subjects = S::Subjects;
804795 }
805796 ///State transition - sets the `scheduling` field to Set
806797 pub struct SetScheduling<S: State = Empty>(PhantomData<fn() -> S>);
807798 impl<S: State> sealed::Sealed for SetScheduling<S> {}
808799 impl<S: State> State for SetScheduling<S> {
809800 type Action = S::Action;
810810- type Subjects = S::Subjects;
811801 type CreatedBy = S::CreatedBy;
812802 type Scheduling = Set<members::scheduling>;
803803+ type Subjects = S::Subjects;
804804+ }
805805+ ///State transition - sets the `subjects` field to Set
806806+ pub struct SetSubjects<S: State = Empty>(PhantomData<fn() -> S>);
807807+ impl<S: State> sealed::Sealed for SetSubjects<S> {}
808808+ impl<S: State> State for SetSubjects<S> {
809809+ type Action = S::Action;
810810+ type CreatedBy = S::CreatedBy;
811811+ type Scheduling = S::Scheduling;
812812+ type Subjects = Set<members::subjects>;
813813 }
814814 /// Marker types for field names
815815 #[allow(non_camel_case_types)]
816816 pub mod members {
817817 ///Marker type for the `action` field
818818 pub struct action(());
819819- ///Marker type for the `subjects` field
820820- pub struct subjects(());
821819 ///Marker type for the `created_by` field
822820 pub struct created_by(());
823821 ///Marker type for the `scheduling` field
824822 pub struct scheduling(());
823823+ ///Marker type for the `subjects` field
824824+ pub struct subjects(());
825825 }
826826}
827827···961961where
962962 S: schedule_action_state::State,
963963 S::Action: schedule_action_state::IsSet,
964964- S::Subjects: schedule_action_state::IsSet,
965964 S::CreatedBy: schedule_action_state::IsSet,
966965 S::Scheduling: schedule_action_state::IsSet,
966966+ S::Subjects: schedule_action_state::IsSet,
967967{
968968 /// Build the final struct
969969 pub fn build(self) -> ScheduleAction<'a> {
+122-122
crates/weaver-api/src/tools_ozone/safelink.rs
···138138 }
139139 /// State trait tracking which required fields have been set
140140 pub trait State: sealed::Sealed {
141141- type Id;
142141 type EventType;
142142+ type Id;
143143 type Url;
144144- type Pattern;
145145- type Action;
146144 type Reason;
145145+ type Pattern;
147146 type CreatedBy;
148147 type CreatedAt;
148148+ type Action;
149149 }
150150 /// Empty state - all required fields are unset
151151 pub struct Empty(());
152152 impl sealed::Sealed for Empty {}
153153 impl State for Empty {
154154- type Id = Unset;
155154 type EventType = Unset;
155155+ type Id = Unset;
156156 type Url = Unset;
157157- type Pattern = Unset;
158158- type Action = Unset;
159157 type Reason = Unset;
158158+ type Pattern = Unset;
160159 type CreatedBy = Unset;
161160 type CreatedAt = Unset;
162162- }
163163- ///State transition - sets the `id` field to Set
164164- pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
165165- impl<S: State> sealed::Sealed for SetId<S> {}
166166- impl<S: State> State for SetId<S> {
167167- type Id = Set<members::id>;
168168- type EventType = S::EventType;
169169- type Url = S::Url;
170170- type Pattern = S::Pattern;
171171- type Action = S::Action;
172172- type Reason = S::Reason;
173173- type CreatedBy = S::CreatedBy;
174174- type CreatedAt = S::CreatedAt;
161161+ type Action = Unset;
175162 }
176163 ///State transition - sets the `event_type` field to Set
177164 pub struct SetEventType<S: State = Empty>(PhantomData<fn() -> S>);
178165 impl<S: State> sealed::Sealed for SetEventType<S> {}
179166 impl<S: State> State for SetEventType<S> {
180180- type Id = S::Id;
181167 type EventType = Set<members::event_type>;
168168+ type Id = S::Id;
182169 type Url = S::Url;
170170+ type Reason = S::Reason;
183171 type Pattern = S::Pattern;
172172+ type CreatedBy = S::CreatedBy;
173173+ type CreatedAt = S::CreatedAt;
184174 type Action = S::Action;
175175+ }
176176+ ///State transition - sets the `id` field to Set
177177+ pub struct SetId<S: State = Empty>(PhantomData<fn() -> S>);
178178+ impl<S: State> sealed::Sealed for SetId<S> {}
179179+ impl<S: State> State for SetId<S> {
180180+ type EventType = S::EventType;
181181+ type Id = Set<members::id>;
182182+ type Url = S::Url;
185183 type Reason = S::Reason;
184184+ type Pattern = S::Pattern;
186185 type CreatedBy = S::CreatedBy;
187186 type CreatedAt = S::CreatedAt;
187187+ type Action = S::Action;
188188 }
189189 ///State transition - sets the `url` field to Set
190190 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
191191 impl<S: State> sealed::Sealed for SetUrl<S> {}
192192 impl<S: State> State for SetUrl<S> {
193193- type Id = S::Id;
194193 type EventType = S::EventType;
194194+ type Id = S::Id;
195195 type Url = Set<members::url>;
196196+ type Reason = S::Reason;
196197 type Pattern = S::Pattern;
198198+ type CreatedBy = S::CreatedBy;
199199+ type CreatedAt = S::CreatedAt;
197200 type Action = S::Action;
198198- type Reason = S::Reason;
201201+ }
202202+ ///State transition - sets the `reason` field to Set
203203+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
204204+ impl<S: State> sealed::Sealed for SetReason<S> {}
205205+ impl<S: State> State for SetReason<S> {
206206+ type EventType = S::EventType;
207207+ type Id = S::Id;
208208+ type Url = S::Url;
209209+ type Reason = Set<members::reason>;
210210+ type Pattern = S::Pattern;
199211 type CreatedBy = S::CreatedBy;
200212 type CreatedAt = S::CreatedAt;
213213+ type Action = S::Action;
201214 }
202215 ///State transition - sets the `pattern` field to Set
203216 pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
204217 impl<S: State> sealed::Sealed for SetPattern<S> {}
205218 impl<S: State> State for SetPattern<S> {
206206- type Id = S::Id;
207219 type EventType = S::EventType;
208208- type Url = S::Url;
209209- type Pattern = Set<members::pattern>;
210210- type Action = S::Action;
211211- type Reason = S::Reason;
212212- type CreatedBy = S::CreatedBy;
213213- type CreatedAt = S::CreatedAt;
214214- }
215215- ///State transition - sets the `action` field to Set
216216- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
217217- impl<S: State> sealed::Sealed for SetAction<S> {}
218218- impl<S: State> State for SetAction<S> {
219220 type Id = S::Id;
220220- type EventType = S::EventType;
221221 type Url = S::Url;
222222- type Pattern = S::Pattern;
223223- type Action = Set<members::action>;
224222 type Reason = S::Reason;
223223+ type Pattern = Set<members::pattern>;
225224 type CreatedBy = S::CreatedBy;
226225 type CreatedAt = S::CreatedAt;
227227- }
228228- ///State transition - sets the `reason` field to Set
229229- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
230230- impl<S: State> sealed::Sealed for SetReason<S> {}
231231- impl<S: State> State for SetReason<S> {
232232- type Id = S::Id;
233233- type EventType = S::EventType;
234234- type Url = S::Url;
235235- type Pattern = S::Pattern;
236226 type Action = S::Action;
237237- type Reason = Set<members::reason>;
238238- type CreatedBy = S::CreatedBy;
239239- type CreatedAt = S::CreatedAt;
240227 }
241228 ///State transition - sets the `created_by` field to Set
242229 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
243230 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
244231 impl<S: State> State for SetCreatedBy<S> {
245245- type Id = S::Id;
246232 type EventType = S::EventType;
233233+ type Id = S::Id;
247234 type Url = S::Url;
235235+ type Reason = S::Reason;
248236 type Pattern = S::Pattern;
249249- type Action = S::Action;
250250- type Reason = S::Reason;
251237 type CreatedBy = Set<members::created_by>;
252238 type CreatedAt = S::CreatedAt;
239239+ type Action = S::Action;
253240 }
254241 ///State transition - sets the `created_at` field to Set
255242 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
256243 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
257244 impl<S: State> State for SetCreatedAt<S> {
258258- type Id = S::Id;
259245 type EventType = S::EventType;
246246+ type Id = S::Id;
260247 type Url = S::Url;
248248+ type Reason = S::Reason;
261249 type Pattern = S::Pattern;
250250+ type CreatedBy = S::CreatedBy;
251251+ type CreatedAt = Set<members::created_at>;
262252 type Action = S::Action;
253253+ }
254254+ ///State transition - sets the `action` field to Set
255255+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
256256+ impl<S: State> sealed::Sealed for SetAction<S> {}
257257+ impl<S: State> State for SetAction<S> {
258258+ type EventType = S::EventType;
259259+ type Id = S::Id;
260260+ type Url = S::Url;
263261 type Reason = S::Reason;
262262+ type Pattern = S::Pattern;
264263 type CreatedBy = S::CreatedBy;
265265- type CreatedAt = Set<members::created_at>;
264264+ type CreatedAt = S::CreatedAt;
265265+ type Action = Set<members::action>;
266266 }
267267 /// Marker types for field names
268268 #[allow(non_camel_case_types)]
269269 pub mod members {
270270- ///Marker type for the `id` field
271271- pub struct id(());
272270 ///Marker type for the `event_type` field
273271 pub struct event_type(());
272272+ ///Marker type for the `id` field
273273+ pub struct id(());
274274 ///Marker type for the `url` field
275275 pub struct url(());
276276+ ///Marker type for the `reason` field
277277+ pub struct reason(());
276278 ///Marker type for the `pattern` field
277279 pub struct pattern(());
278278- ///Marker type for the `action` field
279279- pub struct action(());
280280- ///Marker type for the `reason` field
281281- pub struct reason(());
282280 ///Marker type for the `created_by` field
283281 pub struct created_by(());
284282 ///Marker type for the `created_at` field
285283 pub struct created_at(());
284284+ ///Marker type for the `action` field
285285+ pub struct action(());
286286 }
287287}
288288···502502impl<'a, S> EventBuilder<'a, S>
503503where
504504 S: event_state::State,
505505- S::Id: event_state::IsSet,
506505 S::EventType: event_state::IsSet,
506506+ S::Id: event_state::IsSet,
507507 S::Url: event_state::IsSet,
508508- S::Pattern: event_state::IsSet,
509509- S::Action: event_state::IsSet,
510508 S::Reason: event_state::IsSet,
509509+ S::Pattern: event_state::IsSet,
511510 S::CreatedBy: event_state::IsSet,
512511 S::CreatedAt: event_state::IsSet,
512512+ S::Action: event_state::IsSet,
513513{
514514 /// Build the final struct
515515 pub fn build(self) -> Event<'a> {
···12331233 }
12341234 /// State trait tracking which required fields have been set
12351235 pub trait State: sealed::Sealed {
12361236- type Url;
12371237- type Pattern;
12381238- type Action;
12391236 type Reason;
12371237+ type Url;
12401238 type CreatedBy;
12411239 type CreatedAt;
12401240+ type Action;
12421241 type UpdatedAt;
12421242+ type Pattern;
12431243 }
12441244 /// Empty state - all required fields are unset
12451245 pub struct Empty(());
12461246 impl sealed::Sealed for Empty {}
12471247 impl State for Empty {
12481248- type Url = Unset;
12491249- type Pattern = Unset;
12501250- type Action = Unset;
12511248 type Reason = Unset;
12491249+ type Url = Unset;
12521250 type CreatedBy = Unset;
12531251 type CreatedAt = Unset;
12521252+ type Action = Unset;
12541253 type UpdatedAt = Unset;
12551255- }
12561256- ///State transition - sets the `url` field to Set
12571257- pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
12581258- impl<S: State> sealed::Sealed for SetUrl<S> {}
12591259- impl<S: State> State for SetUrl<S> {
12601260- type Url = Set<members::url>;
12611261- type Pattern = S::Pattern;
12621262- type Action = S::Action;
12631263- type Reason = S::Reason;
12641264- type CreatedBy = S::CreatedBy;
12651265- type CreatedAt = S::CreatedAt;
12661266- type UpdatedAt = S::UpdatedAt;
12541254+ type Pattern = Unset;
12671255 }
12681268- ///State transition - sets the `pattern` field to Set
12691269- pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
12701270- impl<S: State> sealed::Sealed for SetPattern<S> {}
12711271- impl<S: State> State for SetPattern<S> {
12561256+ ///State transition - sets the `reason` field to Set
12571257+ pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
12581258+ impl<S: State> sealed::Sealed for SetReason<S> {}
12591259+ impl<S: State> State for SetReason<S> {
12601260+ type Reason = Set<members::reason>;
12721261 type Url = S::Url;
12731273- type Pattern = Set<members::pattern>;
12741274- type Action = S::Action;
12751275- type Reason = S::Reason;
12761262 type CreatedBy = S::CreatedBy;
12771263 type CreatedAt = S::CreatedAt;
12641264+ type Action = S::Action;
12781265 type UpdatedAt = S::UpdatedAt;
12791279- }
12801280- ///State transition - sets the `action` field to Set
12811281- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
12821282- impl<S: State> sealed::Sealed for SetAction<S> {}
12831283- impl<S: State> State for SetAction<S> {
12841284- type Url = S::Url;
12851266 type Pattern = S::Pattern;
12861286- type Action = Set<members::action>;
12671267+ }
12681268+ ///State transition - sets the `url` field to Set
12691269+ pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
12701270+ impl<S: State> sealed::Sealed for SetUrl<S> {}
12711271+ impl<S: State> State for SetUrl<S> {
12871272 type Reason = S::Reason;
12731273+ type Url = Set<members::url>;
12881274 type CreatedBy = S::CreatedBy;
12891275 type CreatedAt = S::CreatedAt;
12901290- type UpdatedAt = S::UpdatedAt;
12911291- }
12921292- ///State transition - sets the `reason` field to Set
12931293- pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
12941294- impl<S: State> sealed::Sealed for SetReason<S> {}
12951295- impl<S: State> State for SetReason<S> {
12961296- type Url = S::Url;
12971297- type Pattern = S::Pattern;
12981276 type Action = S::Action;
12991299- type Reason = Set<members::reason>;
13001300- type CreatedBy = S::CreatedBy;
13011301- type CreatedAt = S::CreatedAt;
13021277 type UpdatedAt = S::UpdatedAt;
12781278+ type Pattern = S::Pattern;
13031279 }
13041280 ///State transition - sets the `created_by` field to Set
13051281 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
13061282 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
13071283 impl<S: State> State for SetCreatedBy<S> {
13081308- type Url = S::Url;
13091309- type Pattern = S::Pattern;
13101310- type Action = S::Action;
13111284 type Reason = S::Reason;
12851285+ type Url = S::Url;
13121286 type CreatedBy = Set<members::created_by>;
13131287 type CreatedAt = S::CreatedAt;
12881288+ type Action = S::Action;
13141289 type UpdatedAt = S::UpdatedAt;
12901290+ type Pattern = S::Pattern;
13151291 }
13161292 ///State transition - sets the `created_at` field to Set
13171293 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13181294 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
13191295 impl<S: State> State for SetCreatedAt<S> {
12961296+ type Reason = S::Reason;
13201297 type Url = S::Url;
13211321- type Pattern = S::Pattern;
12981298+ type CreatedBy = S::CreatedBy;
12991299+ type CreatedAt = Set<members::created_at>;
13221300 type Action = S::Action;
13011301+ type UpdatedAt = S::UpdatedAt;
13021302+ type Pattern = S::Pattern;
13031303+ }
13041304+ ///State transition - sets the `action` field to Set
13051305+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
13061306+ impl<S: State> sealed::Sealed for SetAction<S> {}
13071307+ impl<S: State> State for SetAction<S> {
13231308 type Reason = S::Reason;
13091309+ type Url = S::Url;
13241310 type CreatedBy = S::CreatedBy;
13251325- type CreatedAt = Set<members::created_at>;
13111311+ type CreatedAt = S::CreatedAt;
13121312+ type Action = Set<members::action>;
13261313 type UpdatedAt = S::UpdatedAt;
13141314+ type Pattern = S::Pattern;
13271315 }
13281316 ///State transition - sets the `updated_at` field to Set
13291317 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
13301318 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
13311319 impl<S: State> State for SetUpdatedAt<S> {
13201320+ type Reason = S::Reason;
13321321 type Url = S::Url;
13221322+ type CreatedBy = S::CreatedBy;
13231323+ type CreatedAt = S::CreatedAt;
13241324+ type Action = S::Action;
13251325+ type UpdatedAt = Set<members::updated_at>;
13331326 type Pattern = S::Pattern;
13341334- type Action = S::Action;
13271327+ }
13281328+ ///State transition - sets the `pattern` field to Set
13291329+ pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
13301330+ impl<S: State> sealed::Sealed for SetPattern<S> {}
13311331+ impl<S: State> State for SetPattern<S> {
13351332 type Reason = S::Reason;
13331333+ type Url = S::Url;
13361334 type CreatedBy = S::CreatedBy;
13371335 type CreatedAt = S::CreatedAt;
13381338- type UpdatedAt = Set<members::updated_at>;
13361336+ type Action = S::Action;
13371337+ type UpdatedAt = S::UpdatedAt;
13381338+ type Pattern = Set<members::pattern>;
13391339 }
13401340 /// Marker types for field names
13411341 #[allow(non_camel_case_types)]
13421342 pub mod members {
13431343- ///Marker type for the `url` field
13441344- pub struct url(());
13451345- ///Marker type for the `pattern` field
13461346- pub struct pattern(());
13471347- ///Marker type for the `action` field
13481348- pub struct action(());
13491343 ///Marker type for the `reason` field
13501344 pub struct reason(());
13451345+ ///Marker type for the `url` field
13461346+ pub struct url(());
13511347 ///Marker type for the `created_by` field
13521348 pub struct created_by(());
13531349 ///Marker type for the `created_at` field
13541350 pub struct created_at(());
13511351+ ///Marker type for the `action` field
13521352+ pub struct action(());
13551353 ///Marker type for the `updated_at` field
13561354 pub struct updated_at(());
13551355+ ///Marker type for the `pattern` field
13561356+ pub struct pattern(());
13571357 }
13581358}
13591359···15431543impl<'a, S> UrlRuleBuilder<'a, S>
15441544where
15451545 S: url_rule_state::State,
15461546- S::Url: url_rule_state::IsSet,
15471547- S::Pattern: url_rule_state::IsSet,
15481548- S::Action: url_rule_state::IsSet,
15491546 S::Reason: url_rule_state::IsSet,
15471547+ S::Url: url_rule_state::IsSet,
15501548 S::CreatedBy: url_rule_state::IsSet,
15511549 S::CreatedAt: url_rule_state::IsSet,
15501550+ S::Action: url_rule_state::IsSet,
15521551 S::UpdatedAt: url_rule_state::IsSet,
15521552+ S::Pattern: url_rule_state::IsSet,
15531553{
15541554 /// Build the final struct
15551555 pub fn build(self) -> UrlRule<'a> {
···4848 pub trait State: sealed::Sealed {
4949 type Url;
5050 type Pattern;
5151- type Action;
5251 type Reason;
5252+ type Action;
5353 }
5454 /// Empty state - all required fields are unset
5555 pub struct Empty(());
···5757 impl State for Empty {
5858 type Url = Unset;
5959 type Pattern = Unset;
6060- type Action = Unset;
6160 type Reason = Unset;
6161+ type Action = Unset;
6262 }
6363 ///State transition - sets the `url` field to Set
6464 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
···6666 impl<S: State> State for SetUrl<S> {
6767 type Url = Set<members::url>;
6868 type Pattern = S::Pattern;
6969- type Action = S::Action;
7069 type Reason = S::Reason;
7070+ type Action = S::Action;
7171 }
7272 ///State transition - sets the `pattern` field to Set
7373 pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
···7575 impl<S: State> State for SetPattern<S> {
7676 type Url = S::Url;
7777 type Pattern = Set<members::pattern>;
7878- type Action = S::Action;
7979- type Reason = S::Reason;
8080- }
8181- ///State transition - sets the `action` field to Set
8282- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
8383- impl<S: State> sealed::Sealed for SetAction<S> {}
8484- impl<S: State> State for SetAction<S> {
8585- type Url = S::Url;
8686- type Pattern = S::Pattern;
8787- type Action = Set<members::action>;
8878 type Reason = S::Reason;
7979+ type Action = S::Action;
8980 }
9081 ///State transition - sets the `reason` field to Set
9182 pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
···9384 impl<S: State> State for SetReason<S> {
9485 type Url = S::Url;
9586 type Pattern = S::Pattern;
9696- type Action = S::Action;
9787 type Reason = Set<members::reason>;
8888+ type Action = S::Action;
8989+ }
9090+ ///State transition - sets the `action` field to Set
9191+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
9292+ impl<S: State> sealed::Sealed for SetAction<S> {}
9393+ impl<S: State> State for SetAction<S> {
9494+ type Url = S::Url;
9595+ type Pattern = S::Pattern;
9696+ type Reason = S::Reason;
9797+ type Action = Set<members::action>;
9898 }
9999 /// Marker types for field names
100100 #[allow(non_camel_case_types)]
···103103 pub struct url(());
104104 ///Marker type for the `pattern` field
105105 pub struct pattern(());
106106+ ///Marker type for the `reason` field
107107+ pub struct reason(());
106108 ///Marker type for the `action` field
107109 pub struct action(());
108108- ///Marker type for the `reason` field
109109- pub struct reason(());
110110 }
111111}
112112···258258 S: add_rule_state::State,
259259 S::Url: add_rule_state::IsSet,
260260 S::Pattern: add_rule_state::IsSet,
261261- S::Action: add_rule_state::IsSet,
262261 S::Reason: add_rule_state::IsSet,
262262+ S::Action: add_rule_state::IsSet,
263263{
264264 /// Build the final struct
265265 pub fn build(self) -> AddRule<'a> {
···4242 }
4343 /// State trait tracking which required fields have been set
4444 pub trait State: sealed::Sealed {
4545- type Url;
4645 type Pattern;
4646+ type Url;
4747 }
4848 /// Empty state - all required fields are unset
4949 pub struct Empty(());
5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252- type Url = Unset;
5352 type Pattern = Unset;
5454- }
5555- ///State transition - sets the `url` field to Set
5656- pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
5757- impl<S: State> sealed::Sealed for SetUrl<S> {}
5858- impl<S: State> State for SetUrl<S> {
5959- type Url = Set<members::url>;
6060- type Pattern = S::Pattern;
5353+ type Url = Unset;
6154 }
6255 ///State transition - sets the `pattern` field to Set
6356 pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
6457 impl<S: State> sealed::Sealed for SetPattern<S> {}
6558 impl<S: State> State for SetPattern<S> {
6666- type Url = S::Url;
6759 type Pattern = Set<members::pattern>;
6060+ type Url = S::Url;
6161+ }
6262+ ///State transition - sets the `url` field to Set
6363+ pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
6464+ impl<S: State> sealed::Sealed for SetUrl<S> {}
6565+ impl<S: State> State for SetUrl<S> {
6666+ type Pattern = S::Pattern;
6767+ type Url = Set<members::url>;
6868 }
6969 /// Marker types for field names
7070 #[allow(non_camel_case_types)]
7171 pub mod members {
7272- ///Marker type for the `url` field
7373- pub struct url(());
7472 ///Marker type for the `pattern` field
7573 pub struct pattern(());
7474+ ///Marker type for the `url` field
7575+ pub struct url(());
7676 }
7777}
7878···182182impl<'a, S> RemoveRuleBuilder<'a, S>
183183where
184184 S: remove_rule_state::State,
185185- S::Url: remove_rule_state::IsSet,
186185 S::Pattern: remove_rule_state::IsSet,
186186+ S::Url: remove_rule_state::IsSet,
187187{
188188 /// Build the final struct
189189 pub fn build(self) -> RemoveRule<'a> {
···4848 pub trait State: sealed::Sealed {
4949 type Url;
5050 type Pattern;
5151- type Action;
5251 type Reason;
5252+ type Action;
5353 }
5454 /// Empty state - all required fields are unset
5555 pub struct Empty(());
···5757 impl State for Empty {
5858 type Url = Unset;
5959 type Pattern = Unset;
6060- type Action = Unset;
6160 type Reason = Unset;
6161+ type Action = Unset;
6262 }
6363 ///State transition - sets the `url` field to Set
6464 pub struct SetUrl<S: State = Empty>(PhantomData<fn() -> S>);
···6666 impl<S: State> State for SetUrl<S> {
6767 type Url = Set<members::url>;
6868 type Pattern = S::Pattern;
6969- type Action = S::Action;
7069 type Reason = S::Reason;
7070+ type Action = S::Action;
7171 }
7272 ///State transition - sets the `pattern` field to Set
7373 pub struct SetPattern<S: State = Empty>(PhantomData<fn() -> S>);
···7575 impl<S: State> State for SetPattern<S> {
7676 type Url = S::Url;
7777 type Pattern = Set<members::pattern>;
7878- type Action = S::Action;
7979- type Reason = S::Reason;
8080- }
8181- ///State transition - sets the `action` field to Set
8282- pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
8383- impl<S: State> sealed::Sealed for SetAction<S> {}
8484- impl<S: State> State for SetAction<S> {
8585- type Url = S::Url;
8686- type Pattern = S::Pattern;
8787- type Action = Set<members::action>;
8878 type Reason = S::Reason;
7979+ type Action = S::Action;
8980 }
9081 ///State transition - sets the `reason` field to Set
9182 pub struct SetReason<S: State = Empty>(PhantomData<fn() -> S>);
···9384 impl<S: State> State for SetReason<S> {
9485 type Url = S::Url;
9586 type Pattern = S::Pattern;
9696- type Action = S::Action;
9787 type Reason = Set<members::reason>;
8888+ type Action = S::Action;
8989+ }
9090+ ///State transition - sets the `action` field to Set
9191+ pub struct SetAction<S: State = Empty>(PhantomData<fn() -> S>);
9292+ impl<S: State> sealed::Sealed for SetAction<S> {}
9393+ impl<S: State> State for SetAction<S> {
9494+ type Url = S::Url;
9595+ type Pattern = S::Pattern;
9696+ type Reason = S::Reason;
9797+ type Action = Set<members::action>;
9898 }
9999 /// Marker types for field names
100100 #[allow(non_camel_case_types)]
···103103 pub struct url(());
104104 ///Marker type for the `pattern` field
105105 pub struct pattern(());
106106+ ///Marker type for the `reason` field
107107+ pub struct reason(());
106108 ///Marker type for the `action` field
107109 pub struct action(());
108108- ///Marker type for the `reason` field
109109- pub struct reason(());
110110 }
111111}
112112···258258 S: update_rule_state::State,
259259 S::Url: update_rule_state::IsSet,
260260 S::Pattern: update_rule_state::IsSet,
261261- S::Action: update_rule_state::IsSet,
262261 S::Reason: update_rule_state::IsSet,
262262+ S::Action: update_rule_state::IsSet,
263263{
264264 /// Build the final struct
265265 pub fn build(self) -> UpdateRule<'a> {
+30-30
crates/weaver-api/src/tools_ozone/set.rs
···300300 }
301301 /// State trait tracking which required fields have been set
302302 pub trait State: sealed::Sealed {
303303- type Name;
304303 type SetSize;
305305- type CreatedAt;
306304 type UpdatedAt;
305305+ type Name;
306306+ type CreatedAt;
307307 }
308308 /// Empty state - all required fields are unset
309309 pub struct Empty(());
310310 impl sealed::Sealed for Empty {}
311311 impl State for Empty {
312312- type Name = Unset;
313312 type SetSize = Unset;
314314- type CreatedAt = Unset;
315313 type UpdatedAt = Unset;
316316- }
317317- ///State transition - sets the `name` field to Set
318318- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
319319- impl<S: State> sealed::Sealed for SetName<S> {}
320320- impl<S: State> State for SetName<S> {
321321- type Name = Set<members::name>;
322322- type SetSize = S::SetSize;
323323- type CreatedAt = S::CreatedAt;
324324- type UpdatedAt = S::UpdatedAt;
314314+ type Name = Unset;
315315+ type CreatedAt = Unset;
325316 }
326317 ///State transition - sets the `set_size` field to Set
327318 pub struct SetSetSize<S: State = Empty>(PhantomData<fn() -> S>);
328319 impl<S: State> sealed::Sealed for SetSetSize<S> {}
329320 impl<S: State> State for SetSetSize<S> {
330330- type Name = S::Name;
331321 type SetSize = Set<members::set_size>;
332332- type CreatedAt = S::CreatedAt;
333322 type UpdatedAt = S::UpdatedAt;
334334- }
335335- ///State transition - sets the `created_at` field to Set
336336- pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
337337- impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
338338- impl<S: State> State for SetCreatedAt<S> {
339323 type Name = S::Name;
340340- type SetSize = S::SetSize;
341341- type CreatedAt = Set<members::created_at>;
342342- type UpdatedAt = S::UpdatedAt;
324324+ type CreatedAt = S::CreatedAt;
343325 }
344326 ///State transition - sets the `updated_at` field to Set
345327 pub struct SetUpdatedAt<S: State = Empty>(PhantomData<fn() -> S>);
346328 impl<S: State> sealed::Sealed for SetUpdatedAt<S> {}
347329 impl<S: State> State for SetUpdatedAt<S> {
330330+ type SetSize = S::SetSize;
331331+ type UpdatedAt = Set<members::updated_at>;
348332 type Name = S::Name;
333333+ type CreatedAt = S::CreatedAt;
334334+ }
335335+ ///State transition - sets the `name` field to Set
336336+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
337337+ impl<S: State> sealed::Sealed for SetName<S> {}
338338+ impl<S: State> State for SetName<S> {
349339 type SetSize = S::SetSize;
340340+ type UpdatedAt = S::UpdatedAt;
341341+ type Name = Set<members::name>;
350342 type CreatedAt = S::CreatedAt;
351351- type UpdatedAt = Set<members::updated_at>;
343343+ }
344344+ ///State transition - sets the `created_at` field to Set
345345+ pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
346346+ impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
347347+ impl<S: State> State for SetCreatedAt<S> {
348348+ type SetSize = S::SetSize;
349349+ type UpdatedAt = S::UpdatedAt;
350350+ type Name = S::Name;
351351+ type CreatedAt = Set<members::created_at>;
352352 }
353353 /// Marker types for field names
354354 #[allow(non_camel_case_types)]
355355 pub mod members {
356356- ///Marker type for the `name` field
357357- pub struct name(());
358356 ///Marker type for the `set_size` field
359357 pub struct set_size(());
358358+ ///Marker type for the `updated_at` field
359359+ pub struct updated_at(());
360360+ ///Marker type for the `name` field
361361+ pub struct name(());
360362 ///Marker type for the `created_at` field
361363 pub struct created_at(());
362362- ///Marker type for the `updated_at` field
363363- pub struct updated_at(());
364364 }
365365}
366366···493493impl<'a, S> SetViewBuilder<'a, S>
494494where
495495 S: set_view_state::State,
496496- S::Name: set_view_state::IsSet,
497496 S::SetSize: set_view_state::IsSet,
498498- S::CreatedAt: set_view_state::IsSet,
499497 S::UpdatedAt: set_view_state::IsSet,
498498+ S::Name: set_view_state::IsSet,
499499+ S::CreatedAt: set_view_state::IsSet,
500500{
501501 /// Build the final struct
502502 pub fn build(self) -> SetView<'a> {
···3535 }
3636 /// State trait tracking which required fields have been set
3737 pub trait State: sealed::Sealed {
3838- type Name;
3938 type Values;
3939+ type Name;
4040 }
4141 /// Empty state - all required fields are unset
4242 pub struct Empty(());
4343 impl sealed::Sealed for Empty {}
4444 impl State for Empty {
4545- type Name = Unset;
4645 type Values = Unset;
4747- }
4848- ///State transition - sets the `name` field to Set
4949- pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5050- impl<S: State> sealed::Sealed for SetName<S> {}
5151- impl<S: State> State for SetName<S> {
5252- type Name = Set<members::name>;
5353- type Values = S::Values;
4646+ type Name = Unset;
5447 }
5548 ///State transition - sets the `values` field to Set
5649 pub struct SetValues<S: State = Empty>(PhantomData<fn() -> S>);
5750 impl<S: State> sealed::Sealed for SetValues<S> {}
5851 impl<S: State> State for SetValues<S> {
5959- type Name = S::Name;
6052 type Values = Set<members::values>;
5353+ type Name = S::Name;
5454+ }
5555+ ///State transition - sets the `name` field to Set
5656+ pub struct SetName<S: State = Empty>(PhantomData<fn() -> S>);
5757+ impl<S: State> sealed::Sealed for SetName<S> {}
5858+ impl<S: State> State for SetName<S> {
5959+ type Values = S::Values;
6060+ type Name = Set<members::name>;
6161 }
6262 /// Marker types for field names
6363 #[allow(non_camel_case_types)]
6464 pub mod members {
6565- ///Marker type for the `name` field
6666- pub struct name(());
6765 ///Marker type for the `values` field
6866 pub struct values(());
6767+ ///Marker type for the `name` field
6868+ pub struct name(());
6969 }
7070}
7171···138138impl<'a, S> AddValuesBuilder<'a, S>
139139where
140140 S: add_values_state::State,
141141- S::Name: add_values_state::IsSet,
142141 S::Values: add_values_state::IsSet,
142142+ S::Name: add_values_state::IsSet,
143143{
144144 /// Build the final struct
145145 pub fn build(self) -> AddValues<'a> {
+34-34
crates/weaver-api/src/tools_ozone/setting.rs
···5555 }
5656 /// State trait tracking which required fields have been set
5757 pub trait State: sealed::Sealed {
5858- type Key;
5858+ type Did;
5959 type Value;
6060- type Did;
6160 type Scope;
6261 type CreatedBy;
6362 type LastUpdatedBy;
6363+ type Key;
6464 }
6565 /// Empty state - all required fields are unset
6666 pub struct Empty(());
6767 impl sealed::Sealed for Empty {}
6868 impl State for Empty {
6969- type Key = Unset;
6969+ type Did = Unset;
7070 type Value = Unset;
7171- type Did = Unset;
7271 type Scope = Unset;
7372 type CreatedBy = Unset;
7473 type LastUpdatedBy = Unset;
7474+ type Key = Unset;
7575 }
7676- ///State transition - sets the `key` field to Set
7777- pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
7878- impl<S: State> sealed::Sealed for SetKey<S> {}
7979- impl<S: State> State for SetKey<S> {
8080- type Key = Set<members::key>;
7676+ ///State transition - sets the `did` field to Set
7777+ pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
7878+ impl<S: State> sealed::Sealed for SetDid<S> {}
7979+ impl<S: State> State for SetDid<S> {
8080+ type Did = Set<members::did>;
8181 type Value = S::Value;
8282- type Did = S::Did;
8382 type Scope = S::Scope;
8483 type CreatedBy = S::CreatedBy;
8584 type LastUpdatedBy = S::LastUpdatedBy;
8585+ type Key = S::Key;
8686 }
8787 ///State transition - sets the `value` field to Set
8888 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
8989 impl<S: State> sealed::Sealed for SetValue<S> {}
9090 impl<S: State> State for SetValue<S> {
9191- type Key = S::Key;
9292- type Value = Set<members::value>;
9391 type Did = S::Did;
9292+ type Value = Set<members::value>;
9493 type Scope = S::Scope;
9594 type CreatedBy = S::CreatedBy;
9695 type LastUpdatedBy = S::LastUpdatedBy;
9797- }
9898- ///State transition - sets the `did` field to Set
9999- pub struct SetDid<S: State = Empty>(PhantomData<fn() -> S>);
100100- impl<S: State> sealed::Sealed for SetDid<S> {}
101101- impl<S: State> State for SetDid<S> {
10296 type Key = S::Key;
103103- type Value = S::Value;
104104- type Did = Set<members::did>;
105105- type Scope = S::Scope;
106106- type CreatedBy = S::CreatedBy;
107107- type LastUpdatedBy = S::LastUpdatedBy;
10897 }
10998 ///State transition - sets the `scope` field to Set
11099 pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
111100 impl<S: State> sealed::Sealed for SetScope<S> {}
112101 impl<S: State> State for SetScope<S> {
113113- type Key = S::Key;
102102+ type Did = S::Did;
114103 type Value = S::Value;
115115- type Did = S::Did;
116104 type Scope = Set<members::scope>;
117105 type CreatedBy = S::CreatedBy;
118106 type LastUpdatedBy = S::LastUpdatedBy;
107107+ type Key = S::Key;
119108 }
120109 ///State transition - sets the `created_by` field to Set
121110 pub struct SetCreatedBy<S: State = Empty>(PhantomData<fn() -> S>);
122111 impl<S: State> sealed::Sealed for SetCreatedBy<S> {}
123112 impl<S: State> State for SetCreatedBy<S> {
124124- type Key = S::Key;
113113+ type Did = S::Did;
125114 type Value = S::Value;
126126- type Did = S::Did;
127115 type Scope = S::Scope;
128116 type CreatedBy = Set<members::created_by>;
129117 type LastUpdatedBy = S::LastUpdatedBy;
118118+ type Key = S::Key;
130119 }
131120 ///State transition - sets the `last_updated_by` field to Set
132121 pub struct SetLastUpdatedBy<S: State = Empty>(PhantomData<fn() -> S>);
133122 impl<S: State> sealed::Sealed for SetLastUpdatedBy<S> {}
134123 impl<S: State> State for SetLastUpdatedBy<S> {
135135- type Key = S::Key;
124124+ type Did = S::Did;
136125 type Value = S::Value;
137137- type Did = S::Did;
138126 type Scope = S::Scope;
139127 type CreatedBy = S::CreatedBy;
140128 type LastUpdatedBy = Set<members::last_updated_by>;
129129+ type Key = S::Key;
130130+ }
131131+ ///State transition - sets the `key` field to Set
132132+ pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
133133+ impl<S: State> sealed::Sealed for SetKey<S> {}
134134+ impl<S: State> State for SetKey<S> {
135135+ type Did = S::Did;
136136+ type Value = S::Value;
137137+ type Scope = S::Scope;
138138+ type CreatedBy = S::CreatedBy;
139139+ type LastUpdatedBy = S::LastUpdatedBy;
140140+ type Key = Set<members::key>;
141141 }
142142 /// Marker types for field names
143143 #[allow(non_camel_case_types)]
144144 pub mod members {
145145- ///Marker type for the `key` field
146146- pub struct key(());
147147- ///Marker type for the `value` field
148148- pub struct value(());
149145 ///Marker type for the `did` field
150146 pub struct did(());
147147+ ///Marker type for the `value` field
148148+ pub struct value(());
151149 ///Marker type for the `scope` field
152150 pub struct scope(());
153151 ///Marker type for the `created_by` field
154152 pub struct created_by(());
155153 ///Marker type for the `last_updated_by` field
156154 pub struct last_updated_by(());
155155+ ///Marker type for the `key` field
156156+ pub struct key(());
157157 }
158158}
159159···397397impl<'a, S> DefsOptionBuilder<'a, S>
398398where
399399 S: defs_option_state::State,
400400- S::Key: defs_option_state::IsSet,
400400+ S::Did: defs_option_state::IsSet,
401401 S::Value: defs_option_state::IsSet,
402402- S::Did: defs_option_state::IsSet,
403402 S::Scope: defs_option_state::IsSet,
404403 S::CreatedBy: defs_option_state::IsSet,
405404 S::LastUpdatedBy: defs_option_state::IsSet,
405405+ S::Key: defs_option_state::IsSet,
406406{
407407 /// Build the final struct
408408 pub fn build(self) -> DefsOption<'a> {
···4242 /// State trait tracking which required fields have been set
4343 pub trait State: sealed::Sealed {
4444 type Key;
4545- type Scope;
4645 type Value;
4646+ type Scope;
4747 }
4848 /// Empty state - all required fields are unset
4949 pub struct Empty(());
5050 impl sealed::Sealed for Empty {}
5151 impl State for Empty {
5252 type Key = Unset;
5353- type Scope = Unset;
5453 type Value = Unset;
5454+ type Scope = Unset;
5555 }
5656 ///State transition - sets the `key` field to Set
5757 pub struct SetKey<S: State = Empty>(PhantomData<fn() -> S>);
5858 impl<S: State> sealed::Sealed for SetKey<S> {}
5959 impl<S: State> State for SetKey<S> {
6060 type Key = Set<members::key>;
6161- type Scope = S::Scope;
6261 type Value = S::Value;
6363- }
6464- ///State transition - sets the `scope` field to Set
6565- pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
6666- impl<S: State> sealed::Sealed for SetScope<S> {}
6767- impl<S: State> State for SetScope<S> {
6868- type Key = S::Key;
6969- type Scope = Set<members::scope>;
7070- type Value = S::Value;
6262+ type Scope = S::Scope;
7163 }
7264 ///State transition - sets the `value` field to Set
7365 pub struct SetValue<S: State = Empty>(PhantomData<fn() -> S>);
7466 impl<S: State> sealed::Sealed for SetValue<S> {}
7567 impl<S: State> State for SetValue<S> {
7668 type Key = S::Key;
7777- type Scope = S::Scope;
7869 type Value = Set<members::value>;
7070+ type Scope = S::Scope;
7171+ }
7272+ ///State transition - sets the `scope` field to Set
7373+ pub struct SetScope<S: State = Empty>(PhantomData<fn() -> S>);
7474+ impl<S: State> sealed::Sealed for SetScope<S> {}
7575+ impl<S: State> State for SetScope<S> {
7676+ type Key = S::Key;
7777+ type Value = S::Value;
7878+ type Scope = Set<members::scope>;
7979 }
8080 /// Marker types for field names
8181 #[allow(non_camel_case_types)]
8282 pub mod members {
8383 ///Marker type for the `key` field
8484 pub struct key(());
8585+ ///Marker type for the `value` field
8686+ pub struct value(());
8587 ///Marker type for the `scope` field
8688 pub struct scope(());
8787- ///Marker type for the `value` field
8888- pub struct value(());
8989 }
9090}
9191···219219where
220220 S: upsert_option_state::State,
221221 S::Key: upsert_option_state::IsSet,
222222- S::Scope: upsert_option_state::IsSet,
223222 S::Value: upsert_option_state::IsSet,
223223+ S::Scope: upsert_option_state::IsSet,
224224{
225225 /// Build the final struct
226226 pub fn build(self) -> UpsertOption<'a> {
+47-47
crates/weaver-api/src/tools_ozone/verification.rs
···7474 }
7575 /// State trait tracking which required fields have been set
7676 pub trait State: sealed::Sealed {
7777- type Issuer;
7878- type Uri;
7977 type Subject;
8080- type Handle;
7878+ type Uri;
8179 type DisplayName;
8080+ type Issuer;
8181+ type Handle;
8282 type CreatedAt;
8383 }
8484 /// Empty state - all required fields are unset
8585 pub struct Empty(());
8686 impl sealed::Sealed for Empty {}
8787 impl State for Empty {
8888- type Issuer = Unset;
8888+ type Subject = Unset;
8989 type Uri = Unset;
9090- type Subject = Unset;
9191- type Handle = Unset;
9290 type DisplayName = Unset;
9191+ type Issuer = Unset;
9292+ type Handle = Unset;
9393 type CreatedAt = Unset;
9494 }
9595- ///State transition - sets the `issuer` field to Set
9696- pub struct SetIssuer<S: State = Empty>(PhantomData<fn() -> S>);
9797- impl<S: State> sealed::Sealed for SetIssuer<S> {}
9898- impl<S: State> State for SetIssuer<S> {
9999- type Issuer = Set<members::issuer>;
9595+ ///State transition - sets the `subject` field to Set
9696+ pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
9797+ impl<S: State> sealed::Sealed for SetSubject<S> {}
9898+ impl<S: State> State for SetSubject<S> {
9999+ type Subject = Set<members::subject>;
100100 type Uri = S::Uri;
101101- type Subject = S::Subject;
102102- type Handle = S::Handle;
103101 type DisplayName = S::DisplayName;
102102+ type Issuer = S::Issuer;
103103+ type Handle = S::Handle;
104104 type CreatedAt = S::CreatedAt;
105105 }
106106 ///State transition - sets the `uri` field to Set
107107 pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
108108 impl<S: State> sealed::Sealed for SetUri<S> {}
109109 impl<S: State> State for SetUri<S> {
110110+ type Subject = S::Subject;
111111+ type Uri = Set<members::uri>;
112112+ type DisplayName = S::DisplayName;
110113 type Issuer = S::Issuer;
111111- type Uri = Set<members::uri>;
112112- type Subject = S::Subject;
113114 type Handle = S::Handle;
114114- type DisplayName = S::DisplayName;
115115 type CreatedAt = S::CreatedAt;
116116 }
117117- ///State transition - sets the `subject` field to Set
118118- pub struct SetSubject<S: State = Empty>(PhantomData<fn() -> S>);
119119- impl<S: State> sealed::Sealed for SetSubject<S> {}
120120- impl<S: State> State for SetSubject<S> {
121121- type Issuer = S::Issuer;
117117+ ///State transition - sets the `display_name` field to Set
118118+ pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
119119+ impl<S: State> sealed::Sealed for SetDisplayName<S> {}
120120+ impl<S: State> State for SetDisplayName<S> {
121121+ type Subject = S::Subject;
122122 type Uri = S::Uri;
123123- type Subject = Set<members::subject>;
123123+ type DisplayName = Set<members::display_name>;
124124+ type Issuer = S::Issuer;
124125 type Handle = S::Handle;
126126+ type CreatedAt = S::CreatedAt;
127127+ }
128128+ ///State transition - sets the `issuer` field to Set
129129+ pub struct SetIssuer<S: State = Empty>(PhantomData<fn() -> S>);
130130+ impl<S: State> sealed::Sealed for SetIssuer<S> {}
131131+ impl<S: State> State for SetIssuer<S> {
132132+ type Subject = S::Subject;
133133+ type Uri = S::Uri;
125134 type DisplayName = S::DisplayName;
135135+ type Issuer = Set<members::issuer>;
136136+ type Handle = S::Handle;
126137 type CreatedAt = S::CreatedAt;
127138 }
128139 ///State transition - sets the `handle` field to Set
129140 pub struct SetHandle<S: State = Empty>(PhantomData<fn() -> S>);
130141 impl<S: State> sealed::Sealed for SetHandle<S> {}
131142 impl<S: State> State for SetHandle<S> {
132132- type Issuer = S::Issuer;
133133- type Uri = S::Uri;
134143 type Subject = S::Subject;
135135- type Handle = Set<members::handle>;
144144+ type Uri = S::Uri;
136145 type DisplayName = S::DisplayName;
137137- type CreatedAt = S::CreatedAt;
138138- }
139139- ///State transition - sets the `display_name` field to Set
140140- pub struct SetDisplayName<S: State = Empty>(PhantomData<fn() -> S>);
141141- impl<S: State> sealed::Sealed for SetDisplayName<S> {}
142142- impl<S: State> State for SetDisplayName<S> {
143146 type Issuer = S::Issuer;
144144- type Uri = S::Uri;
145145- type Subject = S::Subject;
146146- type Handle = S::Handle;
147147- type DisplayName = Set<members::display_name>;
147147+ type Handle = Set<members::handle>;
148148 type CreatedAt = S::CreatedAt;
149149 }
150150 ///State transition - sets the `created_at` field to Set
151151 pub struct SetCreatedAt<S: State = Empty>(PhantomData<fn() -> S>);
152152 impl<S: State> sealed::Sealed for SetCreatedAt<S> {}
153153 impl<S: State> State for SetCreatedAt<S> {
154154+ type Subject = S::Subject;
155155+ type Uri = S::Uri;
156156+ type DisplayName = S::DisplayName;
154157 type Issuer = S::Issuer;
155155- type Uri = S::Uri;
156156- type Subject = S::Subject;
157158 type Handle = S::Handle;
158158- type DisplayName = S::DisplayName;
159159 type CreatedAt = Set<members::created_at>;
160160 }
161161 /// Marker types for field names
162162 #[allow(non_camel_case_types)]
163163 pub mod members {
164164- ///Marker type for the `issuer` field
165165- pub struct issuer(());
164164+ ///Marker type for the `subject` field
165165+ pub struct subject(());
166166 ///Marker type for the `uri` field
167167 pub struct uri(());
168168- ///Marker type for the `subject` field
169169- pub struct subject(());
168168+ ///Marker type for the `display_name` field
169169+ pub struct display_name(());
170170+ ///Marker type for the `issuer` field
171171+ pub struct issuer(());
170172 ///Marker type for the `handle` field
171173 pub struct handle(());
172172- ///Marker type for the `display_name` field
173173- pub struct display_name(());
174174 ///Marker type for the `created_at` field
175175 pub struct created_at(());
176176 }
···479479impl<'a, S> VerificationViewBuilder<'a, S>
480480where
481481 S: verification_view_state::State,
482482- S::Issuer: verification_view_state::IsSet,
483483- S::Uri: verification_view_state::IsSet,
484482 S::Subject: verification_view_state::IsSet,
485485- S::Handle: verification_view_state::IsSet,
483483+ S::Uri: verification_view_state::IsSet,
486484 S::DisplayName: verification_view_state::IsSet,
485485+ S::Issuer: verification_view_state::IsSet,
486486+ S::Handle: verification_view_state::IsSet,
487487 S::CreatedAt: verification_view_state::IsSet,
488488{
489489 /// Build the final struct
···236236 }
237237 /// State trait tracking which required fields have been set
238238 pub trait State: sealed::Sealed {
239239- type Uri;
240239 type Error;
240240+ type Uri;
241241 }
242242 /// Empty state - all required fields are unset
243243 pub struct Empty(());
244244 impl sealed::Sealed for Empty {}
245245 impl State for Empty {
246246- type Uri = Unset;
247246 type Error = Unset;
248248- }
249249- ///State transition - sets the `uri` field to Set
250250- pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
251251- impl<S: State> sealed::Sealed for SetUri<S> {}
252252- impl<S: State> State for SetUri<S> {
253253- type Uri = Set<members::uri>;
254254- type Error = S::Error;
247247+ type Uri = Unset;
255248 }
256249 ///State transition - sets the `error` field to Set
257250 pub struct SetError<S: State = Empty>(PhantomData<fn() -> S>);
258251 impl<S: State> sealed::Sealed for SetError<S> {}
259252 impl<S: State> State for SetError<S> {
260260- type Uri = S::Uri;
261253 type Error = Set<members::error>;
254254+ type Uri = S::Uri;
255255+ }
256256+ ///State transition - sets the `uri` field to Set
257257+ pub struct SetUri<S: State = Empty>(PhantomData<fn() -> S>);
258258+ impl<S: State> sealed::Sealed for SetUri<S> {}
259259+ impl<S: State> State for SetUri<S> {
260260+ type Error = S::Error;
261261+ type Uri = Set<members::uri>;
262262 }
263263 /// Marker types for field names
264264 #[allow(non_camel_case_types)]
265265 pub mod members {
266266- ///Marker type for the `uri` field
267267- pub struct uri(());
268266 ///Marker type for the `error` field
269267 pub struct error(());
268268+ ///Marker type for the `uri` field
269269+ pub struct uri(());
270270 }
271271}
272272···339339impl<'a, S> RevokeErrorBuilder<'a, S>
340340where
341341 S: revoke_error_state::State,
342342- S::Uri: revoke_error_state::IsSet,
343342 S::Error: revoke_error_state::IsSet,
343343+ S::Uri: revoke_error_state::IsSet,
344344{
345345 /// Build the final struct
346346 pub fn build(self) -> RevokeError<'a> {
+2
crates/weaver-app/Cargo.toml
···5555web-time = "1.1"
5656urlencoding = "2.1"
5757tracing-subscriber = { version = "0.3", default-features = false, features = ["std", "registry"] }
5858+dioxus-sdk = { version = "0.7", features = ["time"] }
58595960# OG image generation (server-only)
6061resvg = { version = "0.44", optional = true }
···8283js-sys = "0.3"
8384gloo-storage = "0.3"
8485gloo-timers = "0.3"
8686+8587lol_alloc = "0.4.1"
86888789[build-dependencies]
···44use jacquard::IntoStatic;
55use jacquard::prelude::*;
66use jacquard::types::collection::Collection;
77-use jacquard::types::string::{AtUri, Cid, Datetime, Did, Nsid};
77+use jacquard::types::string::{AtUri, Cid, Datetime, Did, Nsid, RecordKey};
88use jacquard::types::uri::Uri;
99use reqwest::Url;
1010+use std::collections::HashSet;
1011use weaver_api::com_atproto::repo::list_records::ListRecords;
1112use weaver_api::com_atproto::repo::strong_ref::StrongRef;
1213use weaver_api::sh_weaver::collab::{accept::Accept, invite::Invite};
1414+use weaver_api::sh_weaver::notebook::entry::Entry;
1315use weaver_common::WeaverError;
1416use weaver_common::constellation::GetBacklinksQuery;
1517···243245244246 Ok(invites)
245247}
248248+249249+/// Find all participants (owner + collaborators) for a resource by its rkey.
250250+///
251251+/// This works regardless of which copy of the entry you're viewing because it
252252+/// queries for invites by rkey pattern, then collects all involved DIDs.
253253+pub async fn find_all_participants(
254254+ fetcher: &Fetcher,
255255+ resource_uri: &AtUri<'_>,
256256+) -> Result<Vec<Did<'static>>, WeaverError> {
257257+ let Some(rkey) = resource_uri.rkey() else {
258258+ return Ok(vec![]);
259259+ };
260260+261261+ let constellation_url = Url::parse(CONSTELLATION_URL)
262262+ .map_err(|e| WeaverError::InvalidNotebook(format!("Invalid constellation URL: {}", e)))?;
263263+264264+ // Query for all invite records that reference entries with this rkey
265265+ // We search for invites where resource.uri contains the rkey
266266+ // The source pattern matches the JSON path in the invite record
267267+ let query = GetBacklinksQuery {
268268+ subject: Uri::At(resource_uri.clone().into_static()),
269269+ source: format!("{}:resource.uri", Invite::NSID).into(),
270270+ cursor: None,
271271+ did: vec![],
272272+ limit: 100,
273273+ };
274274+275275+ let mut participants: HashSet<Did<'static>> = HashSet::new();
276276+277277+ // First try with the exact URI
278278+ if let Ok(response) = fetcher.client.xrpc(constellation_url.clone()).send(&query).await {
279279+ if let Ok(output) = response.into_output() {
280280+ for record_id in &output.records {
281281+ // The inviter (owner) is the DID that created the invite
282282+ participants.insert(record_id.did.clone().into_static());
283283+284284+ // Now we need to fetch the invite to get the invitee
285285+ let uri_string = format!(
286286+ "at://{}/{}/{}",
287287+ record_id.did,
288288+ Invite::NSID,
289289+ record_id.rkey.as_ref()
290290+ );
291291+ if let Ok(invite_uri) = AtUri::new(&uri_string) {
292292+ if let Ok(response) = fetcher.get_record::<Invite>(&invite_uri).await {
293293+ if let Ok(record) = response.into_output() {
294294+ let invite = &record.value;
295295+ // Check if this invite was accepted
296296+ if check_invite_accepted(fetcher, &invite_uri.into_static()).await {
297297+ participants.insert(invite.invitee.clone().into_static());
298298+ }
299299+ }
300300+ }
301301+ }
302302+ }
303303+ }
304304+ }
305305+306306+ // Also try querying with the owner's URI if we can determine it
307307+ // This handles the case where we're viewing from a collaborator's copy
308308+ let authority_did = match resource_uri.authority() {
309309+ jacquard::types::ident::AtIdentifier::Did(d) => Some(d.clone().into_static()),
310310+ _ => None,
311311+ };
312312+313313+ if let Some(ref did) = authority_did {
314314+ participants.insert(did.clone());
315315+ }
316316+317317+ // If no participants found via invites, return just the current entry's authority
318318+ if participants.is_empty() {
319319+ if let Some(did) = authority_did {
320320+ return Ok(vec![did]);
321321+ }
322322+ }
323323+324324+ Ok(participants.into_iter().collect())
325325+}
···104104 /// Version vector at the time of last sync to PDS.
105105 /// Used to export only changes since last sync.
106106 /// None if never synced.
107107- last_synced_version: Option<VersionVector>,
107107+ /// Signal so cloned docs share the same sync state.
108108+ last_synced_version: Signal<Option<VersionVector>>,
108109109110 // --- Editor state (non-reactive) ---
110111 /// Undo manager for the document.
···176177177178/// Information about the most recent edit, used for incremental rendering optimization.
178179/// Derives PartialEq so it can be used with Dioxus memos for change detection.
179179-#[derive(Clone, Debug, Default, PartialEq)]
180180+#[derive(Clone, Debug, PartialEq)]
180181pub struct EditInfo {
181182 /// Character offset where the edit occurred
182183 pub edit_char_pos: usize,
···193194 /// Used to detect stale edit info - if current doc length doesn't match,
194195 /// the edit info is from a previous render cycle and shouldn't be used.
195196 pub doc_len_after: usize,
197197+ /// When this edit occurred. Used for idle detection in collaborative sync.
198198+ pub timestamp: web_time::Instant,
196199}
197200198201/// Max distance from line start where block syntax can appear.
···202205/// Pre-loaded document state that can be created outside of reactive context.
203206///
204207/// This struct holds the raw LoroDoc (which is safe outside reactive context)
205205-/// along with sync state metadata. Use `EditorDocument::from_loaded_state()`
208208+/// along with sync state metadata. Use `EditorDocument::from_loaded_state()`
206209/// inside a `use_hook` to convert this into a reactive EditorDocument.
207210///
208211/// Note: Clone is a shallow/reference clone for LoroDoc (Arc-backed).
···221224 /// Used to determine what changes need to be synced.
222225 /// None if never synced to PDS.
223226 pub synced_version: Option<VersionVector>,
227227+ /// Pre-resolved embed content fetched during load.
228228+ /// Avoids embed pop-in on initial render.
229229+ pub resolved_content: weaver_common::ResolvedContent,
224230}
225231226232impl PartialEq for LoadedDocState {
···304310 entry_ref: Signal::new(None),
305311 edit_root: Signal::new(None),
306312 last_diff: Signal::new(None),
307307- last_synced_version: None,
313313+ last_synced_version: Signal::new(None),
308314 undo_mgr: Rc::new(RefCell::new(undo_mgr)),
309315 loro_cursor,
310316 // Reactive editor state - wrapped in Signals
···347353 doc.add_image(&img.clone().into_static(), None);
348354 }
349355 }
356356+357357+ if let Some(ref records) = embeds.records {
358358+ for record in &records.records {
359359+ doc.add_record(&record.clone().into_static());
360360+ }
361361+ }
350362 }
351363352364 // Set the entry_ref so subsequent publishes update this record
···580592 images_list.push(json).ok();
581593 }
582594595595+ pub fn add_record(&mut self, record: &RecordEmbed<'_>) {
596596+ // Serialize the Record embed to serde_json::Value
597597+ let json = serde_json::to_value(record).expect("Record serializes");
598598+599599+ // Insert into the record list
600600+ let record_list = self.get_records_list();
601601+ record_list.push(json).ok();
602602+ }
603603+604604+ pub fn remove_record(&mut self, index: usize) {
605605+ let record_list = self.get_records_list();
606606+ if index < record_list.len() {
607607+ record_list.delete(index, 1).ok();
608608+ }
609609+ }
610610+583611 /// Remove an image by index.
584612 pub fn remove_image(&mut self, index: usize) {
585613 let images_list = self.get_images_list();
···639667 }
640668641669 /// Convert a LoroValue at the given index to a RecordEmbed.
642642- fn loro_value_to_record_embed(&self, list: &LoroList, index: usize) -> Option<RecordEmbed<'static>> {
670670+ fn loro_value_to_record_embed(
671671+ &self,
672672+ list: &LoroList,
673673+ index: usize,
674674+ ) -> Option<RecordEmbed<'static>> {
643675 let value = list.get(index)?;
644676 let loro_value = value.as_value()?;
645677 let json = loro_value.to_json_value();
646646- from_json_value::<RecordEmbed>(json).ok().map(|r| r.into_static())
678678+ from_json_value::<RecordEmbed>(json)
679679+ .ok()
680680+ .map(|r| r.into_static())
647681 }
648682649683 /// Insert text into content and record edit info for incremental rendering.
···659693 contains_newline: text.contains('\n'),
660694 in_block_syntax_zone,
661695 doc_len_after: len_after,
696696+ timestamp: web_time::Instant::now(),
662697 }));
663698 result
664699 }
···676711 contains_newline: text.contains('\n'),
677712 in_block_syntax_zone,
678713 doc_len_after: len_after,
714714+ timestamp: web_time::Instant::now(),
679715 }));
680716 result
681717 }
···694730 contains_newline,
695731 in_block_syntax_zone,
696732 doc_len_after: self.content.len_unicode(),
733733+ timestamp: web_time::Instant::now(),
697734 }));
698735 result
699736 }
···720757 contains_newline: delete_has_newline || text.contains('\n'),
721758 in_block_syntax_zone,
722759 doc_len_after: len_after,
760760+ timestamp: web_time::Instant::now(),
723761 }));
724762 Ok(())
725763 }
···873911874912 /// Check if there are unsynced changes since the last PDS sync.
875913 pub fn has_unsynced_changes(&self) -> bool {
876876- match &self.last_synced_version {
914914+ match &*self.last_synced_version.read() {
877915 Some(synced_vv) => self.doc.oplog_vv() != *synced_vv,
878916 None => true, // Never synced, so there are changes
879917 }
···883921 /// Returns None if there are no changes to export.
884922 /// After successful upload, call `mark_synced()` to update the sync marker.
885923 pub fn export_updates_since_sync(&self) -> Option<Vec<u8>> {
886886- let from_vv = self.last_synced_version.clone().unwrap_or_default();
924924+ let from_vv = self.last_synced_version.read().clone().unwrap_or_default();
887925 let current_vv = self.doc.oplog_vv();
888926889927 // No changes since last sync
···909947 /// Mark the current state as synced.
910948 /// Call this after successfully uploading a diff to the PDS.
911949 pub fn mark_synced(&mut self) {
912912- self.last_synced_version = Some(self.doc.oplog_vv());
950950+ self.last_synced_version.set(Some(self.doc.oplog_vv()));
913951 }
914952915953 /// Import updates from a PDS diff blob.
···929967 ) {
930968 self.edit_root.set(Some(edit_root));
931969 self.last_diff.set(last_diff);
932932- self.last_synced_version = Some(self.doc.oplog_vv());
970970+ self.last_synced_version.set(Some(self.doc.oplog_vv()));
933971 }
934972935973 /// Create a new EditorDocument from a binary snapshot.
···10011039 entry_ref: Signal::new(None),
10021040 edit_root: Signal::new(None),
10031041 last_diff: Signal::new(None),
10041004- last_synced_version: None,
10421042+ last_synced_version: Signal::new(None),
10051043 undo_mgr: Rc::new(RefCell::new(undo_mgr)),
10061044 loro_cursor,
10071045 // Reactive editor state - wrapped in Signals
···10471085 };
10481086 let loro_cursor = content.get_cursor(cursor_offset, Side::default());
1049108710501050- // Use the synced version from state (tracks the PDS version vector)
10511051- let last_synced_version = state.synced_version;
10521052-10531088 Self {
10541089 doc,
10551090 content,
···10611096 entry_ref: Signal::new(state.entry_ref),
10621097 edit_root: Signal::new(state.edit_root),
10631098 last_diff: Signal::new(state.last_diff),
10641064- last_synced_version,
10991099+ // Use the synced version from state (tracks the PDS version vector)
11001100+ last_synced_version: Signal::new(state.synced_version),
10651101 undo_mgr: Rc::new(RefCell::new(undo_mgr)),
10661102 loro_cursor,
10671103 cursor: Signal::new(cursor_state),
···279279 old_paragraphs: &[ParagraphRender],
280280 new_paragraphs: &[ParagraphRender],
281281 cursor_offset: usize,
282282+ force: bool,
282283) -> bool {
283284 use wasm_bindgen::JsCast;
284285···311312 let para_id = format!("para-{}", idx);
312313313314 if let Some(old_para) = old_paragraphs.get(idx) {
314314- if new_para.source_hash != old_para.source_hash {
315315+ if force || new_para.source_hash != old_para.source_hash {
315316 // Changed - clear and update innerHTML
316317 // We clear first to ensure any browser-added content (from IME composition,
317318 // contenteditable quirks, etc.) is fully removed before setting new content
318319 if let Some(elem) = document.get_element_by_id(¶_id) {
319319- elem.set_text_content(None); // Clear completely
320320- elem.set_inner_html(&new_para.html);
320320+ if force && cursor_para_idx.is_some() {
321321+ // skip re-rendering where the cursor is if we're forcing it
322322+ // we don't want to fuck up what the user is doing
323323+ } else {
324324+ elem.set_text_content(None); // Clear completely
325325+ elem.set_inner_html(&new_para.html);
326326+ }
321327 }
322328323323- if Some(idx) == cursor_para_idx {
324324- cursor_para_updated = true;
329329+ if !force {
330330+ if Some(idx) == cursor_para_idx {
331331+ cursor_para_updated = true;
332332+ }
325333 }
326334 }
327335 } else {
···342350 if new_paragraphs.len() < old_paragraphs.len() {
343351 cursor_para_updated = true;
344352 }
353353+ // TODO: i think this is the cause of a number of bits of cursor jank
345354 for idx in new_paragraphs.len()..old_paragraphs.len() {
346355 let para_id = format!("para-{}", idx);
347356 if let Some(elem) = document.get_element_by_id(¶_id) {
···358367 _old_paragraphs: &[ParagraphRender],
359368 _new_paragraphs: &[ParagraphRender],
360369 _cursor_offset: usize,
370370+ _force: bool,
361371) -> bool {
362372 false
363373}
364364-
···7474 Ok(())
7575}
76767777+/// Register blob mappings from entry images with the service worker
7878+#[cfg(all(target_family = "wasm", target_os = "unknown"))]
7979+pub async fn register_standalone_entry_blobs(
8080+ ident: &jacquard::types::ident::AtIdentifier<'_>,
8181+ rkey: &str,
8282+ images: &weaver_api::sh_weaver::embed::images::Images<'_>,
8383+ fetcher: &crate::fetch::Fetcher,
8484+) -> Result<(), JsValue> {
8585+ use jacquard::prelude::IdentityResolver;
8686+ use std::collections::HashMap;
8787+8888+ tracing::debug!("registering blobs for {}", rkey);
8989+ let mut blob_mappings = HashMap::new();
9090+9191+ // Resolve DID and PDS URL
9292+ let (did, pds_url) = match ident {
9393+ jacquard::types::ident::AtIdentifier::Did(d) => {
9494+ let pds = fetcher.client.pds_for_did(d).await.ok();
9595+ (d.clone(), pds)
9696+ }
9797+ jacquard::types::ident::AtIdentifier::Handle(h) => {
9898+ if let Ok((did, pds)) = fetcher.client.pds_for_handle(h).await {
9999+ (did, Some(pds))
100100+ } else {
101101+ return Ok(());
102102+ }
103103+ }
104104+ };
105105+106106+ if let Some(pds_url) = pds_url {
107107+ for image in &images.images {
108108+ let cid = image.image.blob().cid();
109109+110110+ if let Some(name) = &image.name {
111111+ let blob_url = format!(
112112+ "{}xrpc/com.atproto.sync.getBlob?did={}&cid={}",
113113+ pds_url.as_str(),
114114+ did.as_ref(),
115115+ cid.as_ref()
116116+ );
117117+ blob_mappings.insert(name.as_ref().to_string(), blob_url);
118118+ }
119119+ }
120120+ }
121121+122122+ // Send mappings to service worker
123123+ if !blob_mappings.is_empty() {
124124+ send_blob_rkey_mappings(rkey, ident.as_str(), blob_mappings)?;
125125+ }
126126+ //}
127127+128128+ Ok(())
129129+}
130130+77131#[cfg(all(target_family = "wasm", target_os = "unknown"))]
78132fn send_blob_mappings(
79133 notebook: &str,
···102156103157 controller.post_message(&msg)?;
104158 tracing::debug!("sent blob mappings for {}", notebook);
159159+160160+ Ok(())
161161+}
162162+163163+#[cfg(all(target_family = "wasm", target_os = "unknown"))]
164164+fn send_blob_rkey_mappings(
165165+ rkey: &str,
166166+ ident: &str,
167167+ mappings: std::collections::HashMap<String, String>,
168168+) -> Result<(), JsValue> {
169169+ let window = web_sys::window().ok_or_else(|| JsValue::from_str("no window"))?;
170170+ let navigator = window.navigator();
171171+ let sw_container = navigator.service_worker();
172172+173173+ tracing::debug!("sending blob mappings for {}", rkey);
174174+ let controller = sw_container
175175+ .controller()
176176+ .ok_or_else(|| JsValue::from_str("no service worker controller"))?;
177177+178178+ // Build message object
179179+ let msg = js_sys::Object::new();
180180+ js_sys::Reflect::set(&msg, &"type".into(), &"register_rkey_mappings".into())?;
181181+ js_sys::Reflect::set(&msg, &"rkey".into(), &rkey.into())?;
182182+ js_sys::Reflect::set(&msg, &"ident".into(), &ident.into())?;
183183+184184+ // Convert HashMap to JS Object
185185+ let blobs_obj = js_sys::Object::new();
186186+ for (name, url) in mappings {
187187+ js_sys::Reflect::set(&blobs_obj, &name.into(), &url.into())?;
188188+ }
189189+ js_sys::Reflect::set(&msg, &"blobs".into(), &blobs_obj)?;
190190+191191+ controller.post_message(&msg)?;
192192+ tracing::debug!("sent blob mappings for {}", rkey);
105193106194 Ok(())
107195}
+197-171
crates/weaver-common/src/agent.rs
···11-use weaver_api::app_bsky::actor::get_profile::GetProfile;
21// Re-export view types for use elsewhere
32pub use weaver_api::sh_weaver::notebook::{
43 AuthorListView, BookEntryRef, BookEntryView, EntryView, NotebookView, PermissionGrant,
···1817use jacquard::types::tid::Tid;
1918use jacquard::types::uri::Uri;
2019use jacquard::url::Url;
2121-use jacquard::xrpc::Response;
2222-use jacquard::{CowStr, IntoStatic, xrpc};
2020+use jacquard::{CowStr, IntoStatic};
2321use mime_sniffer::MimeTypeSniffer;
2422use std::path::Path;
2525-use weaver_api::com_atproto::repo::get_record::GetRecordResponse;
2623use weaver_api::com_atproto::repo::strong_ref::StrongRef;
2724use weaver_api::sh_weaver::notebook::entry;
2825use weaver_api::sh_weaver::publish::blob::Blob as PublishedBlob;
···6764/// - `agent.upload_blob()` - Upload a single blob
6865///
6966/// This trait is for multi-step workflows that coordinate between multiple operations.
7070-//#[cfg_attr(not(target_arch = "wasm32"), trait_variant::make(Send))]
7167pub trait WeaverExt: AgentSessionExt + XrpcExt + Send + Sync + Sized {
7268 /// Publish a blob to the user's PDS
7369 ///
···112108 uri: &'a AtUri<'a>,
113109 ) -> impl Future<Output = Result<StrongRef<'static>, WeaverError>> + 'a {
114110 async move {
115115- let rkey = uri.rkey().ok_or_else(|| {
116116- AgentError::from(
117117- ClientError::invalid_request("AtUri missing rkey")
118118- .with_help("ensure the URI includes a record key after the collection"),
119119- )
111111+ let record = self.fetch_record_slingshot(uri).await?;
112112+ let cid = record.cid.ok_or_else(|| {
113113+ AgentError::from(ClientError::invalid_request("Record missing CID"))
120114 })?;
121121-122122- // Resolve authority (DID or handle) to get DID and PDS
123123- use jacquard::types::ident::AtIdentifier;
124124- let (repo_did, pds_url) = match uri.authority() {
125125- AtIdentifier::Did(did) => {
126126- let pds =
127127- self.pds_for_did(did).await.map_err(|e| {
128128- AgentError::from(ClientError::from(e).with_context(
129129- "DID document resolution failed during record retrieval",
130130- ))
131131- })?;
132132- (did.clone(), pds)
133133- }
134134- AtIdentifier::Handle(handle) => self.pds_for_handle(handle).await.map_err(|e| {
135135- AgentError::from(
136136- ClientError::from(e)
137137- .with_context("handle resolution failed during record retrieval"),
138138- )
139139- })?,
140140- };
141141-142142- // Make stateless XRPC call to that PDS (no auth required for public records)
143143- use weaver_api::com_atproto::repo::get_record::GetRecord;
144144- let request = GetRecord::new()
145145- .repo(AtIdentifier::Did(repo_did))
146146- .collection(
147147- uri.collection()
148148- .expect("collection should exist if rkey does")
149149- .clone(),
150150- )
151151- .rkey(rkey.clone())
152152- .build();
153153-154154- let response: Response<GetRecordResponse> = {
155155- let http_request = xrpc::build_http_request(&pds_url, &request, &self.opts().await)
156156- .map_err(|e| AgentError::from(ClientError::transport(e)))?;
157157-158158- let http_response = self
159159- .send_http(http_request)
160160- .await
161161- .map_err(|e| AgentError::from(ClientError::transport(e)))?;
162162-163163- xrpc::process_response(http_response)
164164- }
165165- .map_err(|e| AgentError::new(AgentErrorKind::Client, Some(e.into())))?;
166166- let record = response.parse().map_err(|e| AgentError::xrpc(e))?;
167167- let strong_ref = StrongRef::new()
168168- .uri(record.uri)
169169- .cid(record.cid.expect("when does this NOT have a CID?"))
170170- .build();
171171- Ok(strong_ref.into_static())
115115+ Ok(StrongRef::new()
116116+ .uri(record.uri.into_static())
117117+ .cid(cid.into_static())
118118+ .build())
172119 }
173120 }
174121···504451505452 let entry_uri = Entry::uri(entry_ref.uri.clone())
506453 .map_err(|_| AgentError::from(ClientError::invalid_request("Invalid entry URI")))?;
507507- let entry = self.fetch_record(&entry_uri).await?;
508454509509- let title = entry.value.title.clone();
510510- let path = entry.value.path.clone();
511511- let tags = entry.value.tags.clone();
455455+ // Get the rkey for version lookup
456456+ let rkey = entry_uri.rkey().ok_or_else(|| {
457457+ AgentError::from(ClientError::invalid_request("Entry URI missing rkey"))
458458+ })?;
512459513460 // Fetch permissions for this entry (includes inherited notebook permissions)
514461 let permissions = self.get_permissions_for_resource(&entry_uri).await?;
515462463463+ // Get all collaborators (owner + invited)
464464+ let owner_did = match entry_uri.authority() {
465465+ jacquard::types::ident::AtIdentifier::Did(d) => d.clone().into_static(),
466466+ jacquard::types::ident::AtIdentifier::Handle(h) => {
467467+ let (did, _) = self.pds_for_handle(h).await.map_err(|e| {
468468+ AgentError::from(
469469+ ClientError::from(e).with_context("Failed to resolve handle"),
470470+ )
471471+ })?;
472472+ did.into_static()
473473+ }
474474+ };
475475+ let collaborators = self
476476+ .find_collaborators_for_resource(&entry_uri)
477477+ .await
478478+ .unwrap_or_default();
479479+ let all_dids: Vec<Did<'static>> = std::iter::once(owner_did)
480480+ .chain(collaborators.into_iter())
481481+ .collect();
482482+483483+ // Find all versions across collaborators, get latest by updatedAt
484484+ let versions = self
485485+ .find_all_versions(
486486+ <Entry as jacquard::types::collection::Collection>::NSID,
487487+ rkey.0.as_str(),
488488+ &all_dids,
489489+ )
490490+ .await
491491+ .unwrap_or_default();
492492+493493+ // Use latest version if found, otherwise fall back to original entry_ref
494494+ let (entry_data, final_uri, final_cid) = if let Some(latest) = versions.first() {
495495+ // Deserialize from the latest version's value
496496+ let entry: Entry = jacquard::from_data(&latest.value).map_err(|_| {
497497+ AgentError::from(ClientError::invalid_request(
498498+ "Failed to deserialize latest entry",
499499+ ))
500500+ })?;
501501+ (entry.into_static(), latest.uri.clone(), latest.cid.clone())
502502+ } else {
503503+ // No versions found via find_all_versions, fetch directly
504504+ let entry = self.fetch_record(&entry_uri).await?;
505505+ let cid = entry.cid.ok_or_else(|| {
506506+ AgentError::from(ClientError::invalid_request("Entry missing CID"))
507507+ })?;
508508+ (
509509+ entry.value.into_static(),
510510+ entry.uri.into_static(),
511511+ cid.into_static(),
512512+ )
513513+ };
514514+515515+ let title = entry_data.title.clone();
516516+ let path = entry_data.path.clone();
517517+ let tags = entry_data.tags.clone();
518518+516519 // Fetch contributors (evidence-based authors) for this entry
517520 let contributor_dids = self.find_contributors_for_resource(&entry_uri).await?;
518521 let mut authors = Vec::new();
···528531 }
529532530533 Ok(EntryView::new()
531531- .cid(entry.cid.ok_or_else(|| {
532532- AgentError::from(ClientError::invalid_request("Entry missing CID"))
533533- })?)
534534- .uri(entry.uri)
534534+ .cid(final_cid)
535535+ .uri(final_uri)
535536 .indexed_at(jacquard::types::string::Datetime::now())
536536- .record(to_data(&entry.value).map_err(|_| {
537537+ .record(to_data(&entry_data).map_err(|_| {
537538 AgentError::from(ClientError::invalid_request("Failed to serialize entry"))
538539 })?)
539540 .maybe_tags(tags)
···975976 use jacquard::to_data;
976977 use weaver_api::sh_weaver::notebook::page::Page;
977978978978- let entry_uri = Page::uri(entry_ref.uri.clone())
979979+ let page_uri = Page::uri(entry_ref.uri.clone())
979980 .map_err(|_| AgentError::from(ClientError::invalid_request("Invalid page URI")))?;
980980- let entry = self.fetch_record(&entry_uri).await?;
981981982982- let title = entry.value.title.clone();
983983- let tags = entry.value.tags.clone();
982982+ // Get the rkey for version lookup
983983+ let rkey = page_uri.rkey().ok_or_else(|| {
984984+ AgentError::from(ClientError::invalid_request("Page URI missing rkey"))
985985+ })?;
984986985987 // Fetch permissions for this page (includes inherited notebook permissions)
986986- let permissions = self.get_permissions_for_resource(&entry_uri).await?;
988988+ let permissions = self.get_permissions_for_resource(&page_uri).await?;
989989+990990+ // Get all collaborators (owner + invited)
991991+ let owner_did = match page_uri.authority() {
992992+ jacquard::types::ident::AtIdentifier::Did(d) => d.clone().into_static(),
993993+ jacquard::types::ident::AtIdentifier::Handle(h) => {
994994+ let (did, _) = self.pds_for_handle(h).await.map_err(|e| {
995995+ AgentError::from(
996996+ ClientError::from(e).with_context("Failed to resolve handle"),
997997+ )
998998+ })?;
999999+ did.into_static()
10001000+ }
10011001+ };
10021002+ let collaborators = self
10031003+ .find_collaborators_for_resource(&page_uri)
10041004+ .await
10051005+ .unwrap_or_default();
10061006+ let all_dids: Vec<Did<'static>> = std::iter::once(owner_did)
10071007+ .chain(collaborators.into_iter())
10081008+ .collect();
10091009+10101010+ // Find all versions across collaborators, get latest by updatedAt
10111011+ let versions = self
10121012+ .find_all_versions(
10131013+ <Page as jacquard::types::collection::Collection>::NSID,
10141014+ rkey.0.as_str(),
10151015+ &all_dids,
10161016+ )
10171017+ .await
10181018+ .unwrap_or_default();
10191019+10201020+ // Use latest version if found, otherwise fall back to direct fetch
10211021+ let (page_data, final_uri, final_cid) = if let Some(latest) = versions.first() {
10221022+ let page: Page = jacquard::from_data(&latest.value).map_err(|_| {
10231023+ AgentError::from(ClientError::invalid_request(
10241024+ "Failed to deserialize latest page",
10251025+ ))
10261026+ })?;
10271027+ (page.into_static(), latest.uri.clone(), latest.cid.clone())
10281028+ } else {
10291029+ // No versions found, fetch directly from PDS
10301030+ let page = self.fetch_record(&page_uri).await?;
10311031+ let cid = page.cid.ok_or_else(|| {
10321032+ AgentError::from(ClientError::invalid_request("Page missing CID"))
10331033+ })?;
10341034+ (
10351035+ page.value.into_static(),
10361036+ page.uri.into_static(),
10371037+ cid.into_static(),
10381038+ )
10391039+ };
10401040+10411041+ let title = page_data.title.clone();
10421042+ let tags = page_data.tags.clone();
98710439881044 // Fetch contributors (evidence-based authors) for this page
989989- let contributor_dids = self.find_contributors_for_resource(&entry_uri).await?;
10451045+ let contributor_dids = self.find_contributors_for_resource(&page_uri).await?;
9901046 let mut authors = Vec::new();
9911047 for (index, did) in contributor_dids.iter().enumerate() {
9921048 let (profile_uri, profile_view) = self.hydrate_profile_view(did).await?;
···10001056 }
1001105710021058 Ok(EntryView::new()
10031003- .cid(entry.cid.ok_or_else(|| {
10041004- AgentError::from(ClientError::invalid_request("Page missing CID"))
10051005- })?)
10061006- .uri(entry.uri)
10591059+ .cid(final_cid)
10601060+ .uri(final_uri)
10071061 .indexed_at(jacquard::types::string::Datetime::now())
10081008- .record(to_data(&entry.value).map_err(|_| {
10621062+ .record(to_data(&page_data).map_err(|_| {
10091063 AgentError::from(ClientError::invalid_request("Failed to serialize page"))
10101064 })?)
10111065 .maybe_tags(tags)
···11021156 async move {
11031157 use jacquard::to_data;
11041158 use jacquard::types::collection::Collection;
11051105- use weaver_api::com_atproto::repo::get_record::GetRecord;
1106115911071107- // Resolve DID and PDS from ident
11081108- let (repo_did, pds_url) = match ident {
11091109- jacquard::types::ident::AtIdentifier::Did(did) => {
11101110- let pds = self.pds_for_did(did).await.map_err(|e| {
11111111- AgentError::from(
11121112- ClientError::from(e).with_context("Failed to resolve PDS for DID"),
11131113- )
11141114- })?;
11151115- (did.clone(), pds)
11161116- }
11601160+ // Resolve DID from ident
11611161+ let repo_did = match ident {
11621162+ jacquard::types::ident::AtIdentifier::Did(did) => did.clone(),
11171163 jacquard::types::ident::AtIdentifier::Handle(handle) => {
11181118- self.pds_for_handle(handle).await.map_err(|e| {
11641164+ let (did, _pds) = self.pds_for_handle(handle).await.map_err(|e| {
11191165 AgentError::from(
11201166 ClientError::from(e).with_context("Failed to resolve handle"),
11211167 )
11221122- })?
11681168+ })?;
11691169+ did
11231170 }
11241171 };
1125117211261126- // Fetch the entry record
11271127- let request = GetRecord::new()
11281128- .repo(jacquard::types::ident::AtIdentifier::Did(repo_did.clone()))
11291129- .collection(jacquard::types::nsid::Nsid::raw(entry::Entry::NSID))
11301130- .rkey(RecordKey::any(rkey)?)
11311131- .build();
11731173+ // Build entry URI for contributor/permission queries
11741174+ let entry_uri_str = format!("at://{}/{}/{}", repo_did, entry::Entry::NSID, rkey);
11751175+ let entry_uri = AtUri::new(&entry_uri_str)
11761176+ .map_err(|_| AgentError::from(ClientError::invalid_request("Invalid entry URI")))?
11771177+ .into_static();
1132117811331133- let response: Response<GetRecordResponse> = {
11341134- let http_request = xrpc::build_http_request(&pds_url, &request, &self.opts().await)
11351135- .map_err(|e| AgentError::from(ClientError::transport(e)))?;
11791179+ // Get collaborators for version lookup
11801180+ let collaborators = self
11811181+ .find_collaborators_for_resource(&entry_uri)
11821182+ .await
11831183+ .unwrap_or_default();
11841184+ let all_dids: Vec<Did<'static>> = std::iter::once(repo_did.clone().into_static())
11851185+ .chain(collaborators.into_iter())
11861186+ .collect();
1136118711371137- let http_response = self
11381138- .send_http(http_request)
11391139- .await
11401140- .map_err(|e| AgentError::from(ClientError::transport(e)))?;
11881188+ // Find all versions across collaborators, get latest by updatedAt
11891189+ let versions = self
11901190+ .find_all_versions(entry::Entry::NSID, rkey, &all_dids)
11911191+ .await
11921192+ .unwrap_or_default();
1141119311421142- xrpc::process_response(http_response)
11431143- }
11441144- .map_err(|e| AgentError::new(AgentErrorKind::Client, Some(e.into())))?;
11941194+ // Use latest version if found, otherwise fetch directly from original ident
11951195+ let (entry_value, final_uri, final_cid) = if let Some(latest) = versions.first() {
11961196+ let entry: entry::Entry = jacquard::from_data(&latest.value).map_err(|e| {
11971197+ AgentError::from(ClientError::invalid_request(format!(
11981198+ "Failed to deserialize latest entry: {}",
11991199+ e
12001200+ )))
12011201+ })?;
12021202+ (entry.into_static(), latest.uri.clone(), latest.cid.clone())
12031203+ } else {
12041204+ // Fallback: fetch directly via slingshot
12051205+ let record = self.fetch_record_slingshot(&entry_uri).await?;
1145120611461146- let record = response.into_output().map_err(|e| {
11471147- AgentError::from(ClientError::invalid_request(format!(
11481148- "Failed to parse entry record: {}",
11491149- e
11501150- )))
11511151- })?;
12071207+ let entry: entry::Entry = jacquard::from_data(&record.value).map_err(|e| {
12081208+ AgentError::from(ClientError::invalid_request(format!(
12091209+ "Failed to deserialize entry: {}",
12101210+ e
12111211+ )))
12121212+ })?;
1152121311531153- // Parse the entry value
11541154- let entry_value: entry::Entry = jacquard::from_data(&record.value).map_err(|e| {
11551155- AgentError::from(ClientError::invalid_request(format!(
11561156- "Failed to deserialize entry: {}",
11571157- e
11581158- )))
11591159- })?;
12141214+ let cid = record.cid.ok_or_else(|| {
12151215+ AgentError::from(ClientError::invalid_request("Entry missing CID"))
12161216+ })?;
1160121711611161- // Build entry URI for contributor/permission queries
11621162- let entry_uri = entry::Entry::uri(record.uri.clone())
11631163- .map_err(|_| AgentError::from(ClientError::invalid_request("Invalid entry URI")))?;
12181218+ (
12191219+ entry.into_static(),
12201220+ record.uri.into_static(),
12211221+ cid.into_static(),
12221222+ )
12231223+ };
1164122411651225 // Fetch contributors (evidence-based authors)
11661226 let contributor_dids = self.find_contributors_for_resource(&entry_uri).await?;
···11801240 let permissions = self.get_permissions_for_resource(&entry_uri).await?;
1181124111821242 let entry_view = EntryView::new()
11831183- .cid(record.cid.ok_or_else(|| {
11841184- AgentError::from(ClientError::invalid_request("Entry missing CID"))
11851185- })?)
11861186- .uri(record.uri)
12431243+ .cid(final_cid)
12441244+ .uri(final_uri)
11871245 .indexed_at(jacquard::types::string::Datetime::now())
11881246 .record(to_data(&entry_value).map_err(|_| {
11891247 AgentError::from(ClientError::invalid_request("Failed to serialize entry"))
···13851443 {
13861444 async move {
13871445 use jacquard::Data;
13881388- use weaver_api::com_atproto::repo::get_record::GetRecord;
1389144613901447 let mut versions = Vec::new();
1391144813921449 for collab_did in collaborators {
13931393- let Ok(pds_url) = self.pds_for_did(collab_did).await else {
14501450+ // Build URI for this collaborator's version
14511451+ let uri_str = format!("at://{}/{}/{}", collab_did, collection, rkey);
14521452+ let Ok(uri) = AtUri::new(&uri_str) else {
13941453 continue;
13951454 };
1396145513971397- let Ok(record_key) = RecordKey::any(rkey) else {
13981398- continue;
13991399- };
14001400- let request = GetRecord::new()
14011401- .repo(jacquard::types::ident::AtIdentifier::Did(
14021402- collab_did.clone(),
14031403- ))
14041404- .collection(jacquard::types::nsid::Nsid::raw(collection))
14051405- .rkey(record_key)
14061406- .build();
14071407-14081408- let Ok(http_request) =
14091409- xrpc::build_http_request(&pds_url, &request, &self.opts().await)
14101410- else {
14111411- continue;
14121412- };
14131413-14141414- let Ok(http_response) = self.send_http(http_request).await else {
14151415- continue;
14161416- };
14171417-14181418- let response: Response<GetRecordResponse> =
14191419- match xrpc::process_response(http_response) {
14201420- Ok(r) => r,
14211421- Err(_) => continue,
14221422- };
14231423-14241424- let Ok(record) = response.into_output() else {
14561456+ // Fetch via slingshot (handles cross-PDS routing)
14571457+ let Ok(record) = self.fetch_record_slingshot(&uri).await else {
14251458 continue;
14261459 };
14271460···1916194919171950 if let (Some(rkey), Some(collection)) = (rkey, collection) {
19181951 for collab_did in collaborators {
19191919- // Try to fetch their version of the record
19521952+ // Try to fetch their version of the record via slingshot
19201953 let collab_uri_str = format!(
19211954 "at://{}/{}/{}",
19221955 collab_did.as_ref(),
···19241957 rkey.as_ref()
19251958 );
19261959 if let Ok(collab_uri) = AtUri::new(&collab_uri_str) {
19271927- // Check if record actually exists (200 = found, 400 = not found)
19281928- if let Ok(response) = self
19291929- .get_record::<weaver_api::sh_weaver::notebook::entry::Entry>(
19301930- &collab_uri,
19311931- )
19321932- .await
19331933- {
19341934- if response.status().is_success() {
19351935- contributors.insert(collab_did);
19361936- }
19601960+ // Check if record actually exists
19611961+ if self.fetch_record_slingshot(&collab_uri).await.is_ok() {
19621962+ contributors.insert(collab_did);
19371963 }
19381964 }
19391965 }
+2-2
crates/weaver-common/src/lib.rs
···1010pub use agent::WeaverExt;
1111pub use error::WeaverError;
1212pub use resolve::{EntryIndex, ExtractedRef, RefCollector, ResolvedContent, ResolvedEntry};
1313-#[cfg(any(test, feature = "standalone-collection"))]
1414-pub use resolve::collect_refs_from_markdown;
1313+1514pub use jacquard;
1615use jacquard::CowStr;
1716use jacquard::client::{Agent, AgentSession};
···1918use jacquard::types::ident::AtIdentifier;
2019use jacquard::types::string::{AtUri, Cid, Did, Handle};
2120use jacquard::types::tid::Ticker;
2121+pub use resolve::collect_refs_from_markdown;
2222use std::sync::LazyLock;
2323use tokio::sync::Mutex;
2424use weaver_api::com_atproto::repo::strong_ref::StrongRef;
-1
crates/weaver-common/src/resolve.rs
···252252/// **Note:** This does a separate parsing pass. For production use, prefer
253253/// passing a `RefCollector` to the renderer to collect during the render pass.
254254/// This function is primarily useful for testing or quick analysis.
255255-#[cfg(any(test, feature = "standalone-collection"))]
256255pub fn collect_refs_from_markdown(markdown: &str) -> Vec<ExtractedRef> {
257256 use markdown_weaver::{Event, LinkType, Options, Parser, Tag};
258257